:root {
  --brand: #2E3192; --brand-btn: #384BDB; --brand-tint: #EEF1FF; --accent: #D22128;
  --link: #0b63f6; --fg: #1b1b1f; --muted: #6b7280; --border: #e5e7eb; --bg: #f7f7f8;
  --surface: #fff; --radius: 14px; --hl: #ff8a00;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--fg); background: var(--bg); }
a { color: var(--link); }
.site-head { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; background: var(--surface); border-bottom: 3px solid var(--brand); }
.site-logo img { display: block; height: 38px; width: auto; }
.site-title { font-weight: 700; color: var(--brand); text-decoration: none; margin-right: auto; }
.lang-nav a { padding: .25rem .5rem; border-radius: 6px; text-decoration: none; color: var(--muted); font-weight: 600; }
.lang-nav a[aria-current] { background: var(--brand); color: #fff; }
.site-main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.site-foot { padding: 1rem; text-align: center; color: var(--muted); border-top: 1px solid var(--border); background: var(--surface); }
h1 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; margin: 0 0 1rem; }
.intro { color: var(--muted); max-width: 60ch; }
.choices { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.choice { display: block; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--fg); min-height: 5rem; }
.choice:hover, .choice:focus-visible { border-color: var(--brand-btn); box-shadow: 0 0 0 3px var(--brand-tint); outline: none; }
.choice strong { display: block; font-size: 1.1rem; color: var(--brand); }
.choice > span { display: block; color: var(--muted); font-size: .95rem; margin-top: .25rem; }
.back { text-decoration: none; }
.callout { padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--brand-tint); border-left: 5px solid var(--brand); max-width: 70ch; }
.callout-warn { background: #fff4f4; border-left-color: var(--accent); }
.btn { display: inline-block; padding: .6rem 1.1rem; border-radius: 10px; border: 1px solid var(--brand-btn); background: var(--brand-btn); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-ghost { background: var(--surface); color: var(--brand-btn); }
.btn[disabled] { opacity: .4; cursor: default; }

.guide-head h1 { margin-bottom: .5rem; }
.crumbs { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted); margin: 0 0 .5rem; }
.guide-tools { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.email-field { display: grid; gap: .25rem; font-weight: 600; max-width: 26rem; }
.email-field input { font: inherit; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: 10px; width: 100%; }
.email-field small { font-weight: 400; color: var(--muted); }
.guide-links { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin: 0; }
.guide-links a[aria-current] { font-weight: 700; text-decoration: none; color: var(--fg); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 2rem; }
.step { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.step-text p { margin: .25rem 0 .75rem; max-width: 70ch; font-size: 1.05rem; }
.step-num { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }
.step-screen { overflow-x: auto; padding: .5rem; }
.summary { border-collapse: collapse; }
.summary th, .summary td { text-align: left; vertical-align: top; padding: .5rem 1rem .5rem 0; border-bottom: 1px solid var(--border); }
.trouble li { margin-bottom: .4rem; max-width: 70ch; }
.modelled { color: var(--muted); font-size: .85rem; }
.walk-nav { display: none; }

/* one step at a time — only when the script is running */
.js .guide[data-mode="walk"] .step { display: none; }
.js .guide[data-mode="walk"] .step.is-current { display: grid; }
.js .guide[data-mode="walk"] .walk-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.25rem 0; position: sticky; bottom: 0; z-index: 5; background: var(--bg); padding: .75rem 0; }

/* replica screens */
.screen { width: 640px; max-width: none; margin: 0 auto; font-size: 13px; line-height: 1.35; color: #15141a; box-shadow: 0 10px 30px rgba(0,0,0,.18); border-radius: 8px; overflow: hidden; background: #fff; user-select: none; }
.screen-body { position: relative; }
.screen .field { display: block; min-height: 26px; padding: 4px 8px; border: 1px solid #8f8f9d; border-radius: 4px; background: #fff; overflow-wrap: anywhere; }
.screen .field.short { width: 5em; }
.screen .field.select::after { content: "▾"; float: right; color: #5b5b66; }
[data-hl-on] { outline: 3px solid var(--hl); outline-offset: 3px; border-radius: 4px; cursor: pointer; animation: hl-pulse 1.6s ease-in-out infinite; position: relative; z-index: 2; }
.hl-inset[data-hl-on] { outline-offset: -3px; }
@keyframes hl-pulse { 50% { outline-color: rgba(255,138,0,.35); } }
@media (prefers-reduced-motion: reduce) { [data-hl-on] { animation: none; } }

/* replicas are fixed-size; on narrow screens they are zoomed down so they fit without sideways scrolling */
@media (max-width: 720px) { .step { padding: .75rem; } .step-screen { padding: 0; } .step-screen .screen { zoom: .85; } }
@media (max-width: 610px) { .step-screen .screen { zoom: .7; } }
@media (max-width: 515px) { .step-screen .screen { zoom: .6; } }
@media (max-width: 450px) { .step-screen .screen { zoom: .49; } }
@media (max-width: 372px) { .step-screen .screen { zoom: .4; } }

@media print {
  .site-head .lang-nav, .site-foot, .guide-tools, .walk-nav, .crumbs a { display: none !important; }
  body { background: #fff; }
  /* Safari ignores break-inside on the items of a grid or flex container: print the list as plain blocks */
  .steps { display: block; }
  /* an inline-block is never split across pages, in Safari too; break-inside alone left the text of a step behind */
  .guide .step { display: inline-block !important; width: 100%; vertical-align: top; box-sizing: border-box; break-inside: avoid; page-break-inside: avoid; border: 0; padding: 0 0 1rem; margin: 0 0 1rem; }
  .step-text { break-after: avoid; page-break-after: avoid; }
  .step-text p { margin-bottom: .5rem; }
  .step-screen { overflow: visible; padding: 0; break-inside: avoid; page-break-inside: avoid; }
  .step-screen .screen { break-inside: avoid; page-break-inside: avoid; }
  .callout { break-inside: avoid; page-break-inside: avoid; }
  .summary, .step-finish ul { break-inside: avoid; page-break-inside: avoid; }
  .screen { box-shadow: none; border: 1px solid #999; zoom: .72; }
  .step-finish { break-before: auto; }
  [data-hl-on] { animation: none; outline-color: #000; }
}

/* long personalised addresses must never widen the page */
.step > * { min-width: 0; }
.summary { table-layout: fixed; width: 100%; max-width: 44rem; }
.summary td, .summary th { overflow-wrap: anywhere; }
.screen label { min-width: 0; }
.screen label > .field { min-width: 0; }

.review h2 small { font-weight: 400; color: var(--muted); font-size: .8em; }
.review-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.5rem; }
.review-langs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.review-screen .screen { zoom: .6; margin: 0; }
.review-keys { border-collapse: collapse; font-size: .9rem; margin-top: .5rem; }
.review-keys th, .review-keys td { border: 1px solid var(--border); padding: .3rem .5rem; text-align: left; }
.site-main:has(.review) { max-width: 1500px; }
@media (max-width: 900px) { .review-langs { grid-template-columns: 1fr; } }

.choice.has-icon { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 1rem; align-items: center; }
.choice-icon { grid-row: span 2; width: 48px; height: 48px; }
.choice.has-icon strong:only-of-type:last-child { grid-row: span 2; }

.choices-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.choice-thumb { margin-top: .9rem; overflow: hidden; pointer-events: none; }
.choice-thumb .screen { zoom: .52; margin: 0; box-shadow: none; border: 1px solid var(--border); }
@media (max-width: 450px) { .choice-thumb .screen { zoom: .42; } }
.guide-notice { margin: 0 0 1rem; }

.guide-for { margin: .25rem 0 .75rem; }
.guide-for[data-for="off"] { display: none; }
.hd-badge { margin-left: .4rem; padding: .1rem .45rem; border-radius: 6px; background: var(--brand); color: #fff; font-size: .75rem; vertical-align: middle; }
.hd-logout { margin: 0; }
.hd-logout .btn { padding: .3rem .7rem; }
.hd { max-width: 44rem; }
.hd-form { display: grid; gap: 1rem; }
.hd-form label { display: grid; gap: .25rem; font-weight: 600; }
.hd-form select, .hd-form input[type="email"], .hd-form input[type="text"], .hd-form input[type="password"] { font: inherit; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: 10px; width: 100%; background: var(--surface); }
.hd-form fieldset { display: grid; gap: .6rem; margin: 0; padding: .75rem 1rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.hd-form legend { font-weight: 700; padding: 0 .4rem; }
.hd-form .hd-choice { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.hd-note { margin: 0; color: var(--muted); font-size: .9rem; }
.hd-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 0; }
@media print { .hd-logout, .hd-badge { display: none !important; } }
.screen { position: relative; }
.screen-mark { position: absolute; right: 8px; bottom: 3px; font-size: 9px; line-height: 1; color: rgba(0, 0, 0, .22); pointer-events: none; white-space: nowrap; }
.skin-ios .screen-mark { right: 0; left: 0; bottom: 5px; text-align: center; }
.ico { display: inline-block; width: 1.200em; height: 1.200em; vertical-align: -.220em; flex: none; }
@media print { .screen.screen { box-shadow: none; } }

/* questions below the chooser pages; never printed */
.faq { max-width: 70ch; margin: 2.5rem 0 0; }
.faq h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 .5rem; }
.faq summary { padding: .8rem 1rem; font-weight: 600; cursor: pointer; }
.faq details p { margin: 0; padding: 0 1rem 1rem; overflow-wrap: anywhere; }
.foot-legal, .foot-legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1rem; }
.foot-legal { margin-top: .6rem; font-size: .875rem; }
@media print { .faq { display: none !important; } }
/* start page, language not known: the four languages as buttons above the systems */
.lang-pick { margin: 0 0 1.5rem; padding: 1rem 1.25rem; background: var(--brand-tint); border-radius: var(--radius); }
.lang-pick-title { margin: 0 0 .6rem; font-weight: 700; color: var(--brand); }
.lang-pick-links { margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
@media print { .lang-pick { display: none !important; } }
/* licence page for companies */
.license { max-width: 70ch; }
.license h2 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; }
.license ul { padding-left: 1.25rem; }
.license li { margin: 0 0 .4rem; }
.license-price { font-weight: 600; }
