/* MDR Accounts: layout and components, converted from design/MDR Accounts.dc.html.
   Colours come from tokens.css variables only. No inline styles anywhere: the CSP is
   style-src 'self'. */

:root {
  --danger-on-dark: #FF8A8A;  /* danger text on black: #D0021B fails contrast there */
  --font-signature: 'Caveat', cursive;
  --fs-overline: 12px;        /* brief: 12px uppercase overlines */
  --fs-h2: 28px;
  --fs-h3: 20px;
  --gutter: 20px;
  --form-max: 800px;
  --page-max: 1200px;
  --header-h: 64px;
  --stage-glow: radial-gradient(120% 90% at 50% 0%,
                  color-mix(in srgb, var(--mdr-purple) 55%, transparent) 0%,
                  color-mix(in srgb, var(--mdr-plum) 35%, transparent) 45%,
                  var(--mdr-black) 80%);
}
@media (max-width: 767px) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* component display rules must never un-hide */
[id] { scroll-margin-top: calc(var(--header-h) + 24px); }   /* clear the sticky header when jumping */
html, body { margin: 0; padding: 0; }
html { background: var(--mdr-black); }
body { background: var(--mdr-paper); color: var(--fg-1); font-family: var(--font-body);
       font-size: var(--fs-body); line-height: var(--lh-body); display: flex; flex-direction: column;
       min-height: 100vh; }
main { flex: 1 0 auto; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--mdr-magenta-soft); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
           clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--mdr-paper);
             color: var(--fg-1); padding: 10px 16px; border-radius: var(--r-pill); font-weight: 600; }
.skip-link:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Type helpers ---------- */
.overline { margin: 0 0 12px; font-size: var(--fs-overline); font-weight: 700; letter-spacing: var(--tr-ucase);
            text-transform: uppercase; color: var(--mdr-magenta); }
.overline--soft { color: var(--mdr-magenta-soft); }
.overline--deep { color: var(--mdr-magenta-hover); }
.overline--muted { color: var(--mdr-slate); }
.display { margin: 0 0 20px; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-display);
           line-height: 1.05; letter-spacing: var(--tr-tight); color: var(--fg-1-dark); }

/* ---------- Header ---------- */
.site-header { background: var(--mdr-black); position: sticky; top: 0; z-index: 20;
               border-bottom: 1px solid var(--mdr-charcoal); }
.site-header__inner { max-width: var(--page-max); margin: 0 auto; min-height: var(--header-h);
                      padding: 0 var(--gutter); display: flex; align-items: center;
                      justify-content: space-between; gap: 16px; }
.site-header__logo { display: flex; align-items: center; min-height: 44px; flex-shrink: 0; }
.site-header__logo img { height: 36px; width: auto; display: block; }
.site-header__nav { display: flex; align-items: center; gap: 20px; }
.site-header__link { display: flex; align-items: center; gap: 6px; min-height: 44px; color: var(--fg-1-dark);
                     font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.site-header__link--phone { font-weight: 600; }
.site-header__link:hover { color: var(--mdr-magenta-soft); text-decoration: underline; }
.icon { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2;
        stroke-linecap: round; stroke-linejoin: round; }
.only-narrow { display: none; }
@media (max-width: 767px) {
  .only-wide { display: none; }
  .only-narrow { display: inline; }
  .site-header__nav { gap: 12px; }
  .site-header__logo img { height: 30px; }
}

/* ---------- Waves (stage -> showroom) ---------- */
.wave { background: var(--mdr-paper); line-height: 0; }
.wave svg { display: block; width: 100%; height: 56px; }
.wave--short svg { height: 40px; }
.wave__fill { fill: var(--mdr-black); }
.wave__line { fill: none; stroke: var(--mdr-mist); stroke-width: 1.3; }
.wave__line--faint { opacity: .7; }

/* ---------- Stage hero ---------- */
.stage { background: var(--mdr-black); background-image: var(--stage-glow); color: var(--fg-1-dark);
         padding: 64px var(--gutter) 40px; text-align: center; }
.stage__inner { max-width: 720px; margin: 0 auto; }
.stage__lead { margin: 0 auto 12px; max-width: 600px; font-size: 17px; line-height: 1.6; color: var(--fg-2-dark);
               text-wrap: pretty; }
.stage__lead:last-of-type { margin-bottom: 24px; }
.stage__small { margin: 0; font-size: 15px; color: var(--fg-2-dark); }
.stage__small a { color: var(--mdr-magenta-soft); font-weight: 600; }
.stage__small a:hover { color: var(--fg-1-dark); }

/* ---------- Showroom sections ---------- */
.showroom { background: var(--mdr-paper); padding: 24px var(--gutter) 72px; }
.showroom__inner { max-width: 1040px; margin: 0 auto; }
.section-title { margin: 0 0 24px; text-align: center; font-family: var(--font-display); font-weight: 800;
                 font-size: var(--fs-h2); letter-spacing: var(--tr-tight); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px;
       padding: 0 32px; border-radius: var(--r-pill); border: 2px solid transparent; font-family: var(--font-body);
       font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
       transition: background var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard),
                   color var(--dur-fast) var(--ease-standard); }
.btn--primary { background: var(--mdr-magenta); color: var(--accent-fg); }
.btn--primary:hover { background: var(--mdr-magenta-hover); color: var(--accent-fg); box-shadow: var(--sh-pill); }
.btn--primary:active { background: var(--mdr-magenta-press); }
.btn--outline { background: var(--mdr-paper); color: var(--fg-1); border-color: var(--mdr-black); }
.btn--outline:hover { background: var(--mdr-fog); color: var(--fg-1); }
.btn--outline-dark { background: transparent; color: var(--fg-1-dark); border-color: var(--fg-1-dark); }
.btn--outline-dark:hover { background: var(--mdr-ink); color: var(--fg-1-dark); }
.btn[aria-disabled="true"], .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.link-btn { background: none; border: 0; padding: 10px 0; min-height: 44px; font-family: var(--font-body);
            font-size: 15px; font-weight: 600; color: var(--mdr-magenta); cursor: pointer; text-decoration: underline;
            text-underline-offset: 3px; }
.link-btn:hover { color: var(--mdr-magenta-hover); }

/* ---------- Account cards (landing) ---------- */
.acct-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 767px) { .acct-cards { grid-template-columns: 1fr; } }
.acct-card { position: relative; cursor: pointer; background: var(--bg-card); border: 2px solid var(--mdr-mist);
             border-radius: var(--r-lg); box-shadow: var(--sh-card); padding: 32px 28px 28px; display: flex;
             flex-direction: column; gap: 20px;
             transition: transform var(--dur-med) var(--ease-standard), box-shadow var(--dur-med) var(--ease-standard),
                         border-color var(--dur-fast) var(--ease-standard); }
.acct-card:hover { transform: translateY(-2px); box-shadow: var(--sh-card-hi); }
.acct-card:focus-visible { outline: 2px solid var(--mdr-magenta-soft); outline-offset: 3px; }
.acct-card[aria-checked="true"] { border-color: var(--mdr-magenta); }
.acct-card__tick { position: absolute; top: 20px; right: 20px; width: 28px; height: 28px; border-radius: var(--r-pill);
                   border: 2px solid var(--mdr-silver); background: var(--mdr-paper); display: flex;
                   align-items: center; justify-content: center; }
.acct-card__tick svg { width: 16px; height: 16px; fill: none; stroke: var(--accent-fg); stroke-width: 3;
                       stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.acct-card[aria-checked="true"] .acct-card__tick { border-color: var(--mdr-magenta); background: var(--mdr-magenta); }
.acct-card[aria-checked="true"] .acct-card__tick svg { visibility: visible; }
.acct-card__overline { margin: 0 0 8px; }
.acct-card__title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 30px;
                    letter-spacing: var(--tr-tight); line-height: 1.1; padding-right: 40px; }
.acct-card__tagline { margin: 0; font-size: 17px; color: var(--fg-2); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: var(--mdr-magenta);
             stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.acct-card__foot { margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--mdr-mist); font-size: 14px;
                   color: var(--fg-2); }
.pick-error { margin: 16px 0 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--danger); }
.landing-actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center;
                   justify-content: space-between; gap: 16px; }
@media (max-width: 767px) {
  .landing-actions { flex-direction: column-reverse; align-items: stretch; }
  .landing-actions .btn { width: 100%; }
}

/* ---------- Compare table ---------- */
.compare { margin-top: 24px; border: 1px solid var(--mdr-mist); border-radius: var(--r-md); overflow: hidden;
           display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--dur-med) var(--ease-standard); }
.compare table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare caption { text-align: left; padding: 16px 20px; font-family: var(--font-display); font-weight: 800;
                   font-size: 18px; background: var(--mdr-fog); }
.compare thead tr { background: var(--mdr-black); color: var(--fg-1-dark); }
.compare th, .compare td { text-align: left; padding: 12px 16px; vertical-align: top; }
.compare thead th { font-weight: 700; }
.compare thead th:first-child { width: 34%; }
.compare tbody tr { border-top: 1px solid var(--mdr-mist); }
.compare tbody th { font-weight: 600; }
.compare td { color: var(--fg-2); }

/* ---------- Form band (top of every step) ---------- */
.form-band { background: var(--mdr-black); padding: 24px var(--gutter) 8px; }
.form-band__inner { max-width: var(--form-max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center;
                    justify-content: space-between; gap: 12px; }
.applying { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: var(--mdr-ink);
            border: 1px solid var(--mdr-charcoal); border-radius: var(--r-pill); padding: 10px 20px;
            color: var(--fg-1-dark); font-size: 15px; }
.applying__label { color: var(--fg-2-dark); }
.applying__type { font-weight: 700; }
.applying__dot { color: var(--fg-3-dark); }
.applying a { color: var(--mdr-magenta-soft); font-weight: 600; }
.applying a:hover { color: var(--fg-1-dark); }
.saved-note { font-size: 14px; color: var(--fg-2-dark); min-height: 1.5em; }
.saved-note--error { color: var(--danger-on-dark); }

/* ---------- Form column ---------- */
.form-wrap { max-width: var(--form-max); margin: 0 auto; padding: 16px var(--gutter) 64px; }

/* Stepper */
.stepper { margin-bottom: 32px; }
.stepper__list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; justify-content: space-between; gap: 8px; }
.stepper__item { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--fg-3); }
.stepper__mark { width: 26px; height: 26px; flex-shrink: 0; border-radius: var(--r-pill); display: flex;
                 align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800;
                 font-size: 13px; background: var(--mdr-paper); color: var(--fg-3); border: 2px solid var(--mdr-silver); }
.stepper__mark svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3;
                     stroke-linecap: round; stroke-linejoin: round; }
.stepper__item--done { color: var(--fg-1); }
.stepper__item--done .stepper__mark { background: var(--mdr-black); border-color: var(--mdr-black); color: var(--accent-fg); }
.stepper__item--current { color: var(--fg-1); font-weight: 700; }
.stepper__item--current .stepper__mark { background: var(--mdr-magenta); border-color: var(--mdr-magenta); color: var(--accent-fg); }
.stepper__narrow { display: none; margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--fg-2); }
.stepper__narrow strong { color: var(--fg-1); font-weight: 600; }
@media (max-width: 767px) {
  .stepper__list { display: none; }
  .stepper__narrow { display: block; }
}
.progress { height: 6px; background: var(--mdr-mist); border-radius: var(--r-pill); overflow: hidden; }
.progress__bar { height: 100%; width: 0; background: var(--mdr-magenta); border-radius: var(--r-pill);
                 transition: width var(--dur-slow) var(--ease-standard); }

/* Step heading */
.step-head h1 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 5vw, 40px);
                letter-spacing: var(--tr-tight); line-height: 1.1; }
.step-head__sub { margin: 0 0 28px; font-size: 16px; color: var(--fg-2); }
.step-head .overline { margin-bottom: 6px; }

/* Error summary */
.error-summary { margin: 0 0 28px; border: 2px solid var(--danger); border-radius: var(--r-md); padding: 20px 22px;
                 background: var(--mdr-paper); }
.error-summary h2 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 800; font-size: 18px;
                    display: flex; gap: 10px; align-items: center; }
.error-summary h2 svg { width: 22px; height: 22px; fill: none; stroke: var(--danger); stroke-width: 2;
                        stroke-linecap: round; stroke-linejoin: round; }
.error-summary ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.error-summary a { color: var(--danger); font-weight: 600; font-size: 15px; }

/* Placeholder for steps still to be built (stage 1 only) */
.step-placeholder { border: 1px dashed var(--mdr-silver); border-radius: var(--r-lg); padding: 32px 28px;
                    background: var(--mdr-fog); color: var(--fg-2); }
.step-placeholder p { margin: 0; }

/* Action row. Continue is first in the source (Enter submits it); CSS puts it on the right. */
.actions { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--mdr-mist); display: flex;
           align-items: center; gap: 16px; }
.actions__left { order: 0; display: flex; align-items: center; gap: 16px; }
.actions__next { order: 1; margin-left: auto; padding: 0 34px; }
@media (max-width: 767px) {
  .actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .actions__next { order: 0; margin-left: 0; width: 100%; }
  .actions__left { order: 1; justify-content: space-between; gap: 12px; }
  .actions__left .btn { height: 48px; padding: 0 24px; font-size: 15px; }
}

/* ---------- Form fields ---------- */
.step-body { display: flex; flex-direction: column; gap: 40px; }
.group { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.group--tight { gap: 0; }
.group__legend { padding: 0; margin: 0 0 20px; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3);
                 letter-spacing: -.01em; color: var(--fg-1); }
.group--tight .group__legend { margin-bottom: 4px; }
.group__legend--h { margin: 0 0 6px; line-height: var(--lh-heading); }
.group__opt { font-family: var(--font-body); font-weight: 400; font-size: 15px; color: var(--fg-3); }
.group__hint { margin: 0 0 14px; }
.group__intro { margin: 0; font-size: 15px; color: var(--fg-2); }
.group > .group__intro { margin-top: -14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-weight: 600; font-size: var(--fs-label, 15px); color: var(--fg-1); padding: 0; }
.field__opt { font-weight: 400; color: var(--fg-3); }
.field__hint { font-size: 14px; color: var(--fg-3); margin: 0; }
.field-error { margin: 0; font-size: 14px; font-weight: 600; color: var(--danger); }
.input { width: 100%; height: 48px; padding: 0 20px; border: 1px solid var(--mdr-slate); border-radius: var(--r-pill);
         font-family: var(--font-body); font-size: 16px; color: var(--fg-1); background: var(--mdr-paper);
         transition: border-color var(--dur-fast) var(--ease-standard); }
.input:focus { outline: 2px solid var(--mdr-magenta-soft); outline-offset: 2px; }
.input:disabled { background: var(--mdr-fog); color: var(--fg-3); cursor: not-allowed; }
.input.is-invalid, .money.is-invalid { border-color: var(--danger); }
.select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
          background: var(--mdr-paper) url("../img/chevron-down.svg") no-repeat right 18px center; background-size: 16px; }
.field--date .input { padding-right: 16px; }
.grid { display: grid; gap: 20px; }
.grid--240 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid--220 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px 20px; }
.grid--180 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.grid--160 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--20 { gap: 20px; }

.money { display: flex; align-items: center; height: 48px; border: 1px solid var(--mdr-slate); border-radius: var(--r-pill);
         background: var(--mdr-paper); overflow: hidden; }
.money:focus-within { outline: 2px solid var(--mdr-magenta-soft); outline-offset: 2px; }
.money__prefix { padding: 0 4px 0 20px; font-weight: 600; color: var(--fg-2); }
.money__input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0 8px; font-family: var(--font-body);
                font-size: 16px; color: var(--fg-1); background: transparent; }
.money__input:focus { outline: none; }
.money__suffix { padding: 0 20px 0 8px; font-size: 14px; font-weight: 600; color: var(--fg-2); }

.panel { border: 0; margin: 0; padding: 16px 20px; background: var(--mdr-fog); border-radius: var(--r-md); min-width: 0; }
.panel__legend { float: left; width: 100%; padding: 0; margin: 0 0 4px; font-weight: 600; font-size: 15px; }
.panel__hint { clear: both; margin: 0 0 10px; font-size: 14px; color: var(--fg-3); }
.radios { display: flex; gap: 24px; flex-wrap: wrap; }
.radio, .inline-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.radio input, .inline-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--mdr-magenta); }
.panel .field-error { margin-top: 6px; }

.check__label { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.5; cursor: pointer; }
.check__input { flex-shrink: 0; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--mdr-magenta); }
.check .field-error { margin: 6px 0 0 34px; }

/* Switch (a real checkbox, so it posts without JavaScript) */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.switch-row--outline { border: 1px solid var(--mdr-mist); border-radius: var(--r-pill); }
.switch-row--fog { background: var(--mdr-fog); border-radius: var(--r-md); }
.switch-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-row__label { font-weight: 600; font-size: 15px; cursor: pointer; }
.switch-row__hint { font-size: 14px; color: var(--fg-2); }
.switch { appearance: none; -webkit-appearance: none; flex-shrink: 0; position: relative; width: 52px; height: 30px; margin: 0;
          border-radius: var(--r-pill); background: var(--mdr-silver); cursor: pointer;
          transition: background var(--dur-med) var(--ease-standard); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: var(--r-pill);
                 background: var(--mdr-paper); box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
                 transition: transform var(--dur-med) var(--ease-standard); }
.switch:checked { background: var(--mdr-magenta); }
.switch:checked::after { transform: translateX(22px); }
.switch:focus-visible { outline: 2px solid var(--mdr-magenta-soft); outline-offset: 2px; }

/* Chips (brands, roles): checkboxes styled as pills */
.chips-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.chips-group > legend { margin-bottom: 4px; }
.chips-group > .field__hint { margin: 0 0 12px; }
.person .chips-group > legend { margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips--tight { gap: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px;
        border-radius: var(--r-pill); border: 1px solid var(--mdr-slate); background: var(--mdr-paper); color: var(--fg-1);
        font-size: 14px; font-weight: 600; cursor: pointer; user-select: none;
        transition: background var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard); }
.chips--tight .chip { padding: 0 16px; }
.chip:hover { transform: translateY(-1px); }
.chip__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.chip__tick { display: none; width: 14px; height: 14px; fill: none; stroke: var(--accent-fg); stroke-width: 3;
              stroke-linecap: round; stroke-linejoin: round; }
.chip:has(.chip__input:checked) { background: var(--mdr-magenta); border-color: var(--mdr-magenta); color: var(--accent-fg); }
.chip:has(.chip__input:checked) .chip__tick { display: block; }
.chip:has(.chip__input:focus-visible) { outline: 2px solid var(--mdr-magenta-soft); outline-offset: 2px; }

/* Slide-open sections: animate grid rows 0fr -> 1fr, so there's no layout jump */
.reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-med) var(--ease-standard),
                                                              opacity var(--dur-med) var(--ease-standard); opacity: 0; }
.reveal.is-open, .no-js .reveal { grid-template-rows: 1fr; opacity: 1; }
.reveal__inner { min-height: 0; overflow: hidden; }
.reveal.is-open > .reveal__inner { overflow: visible; }
.reveal:not(.is-open) { margin-top: -20px; }    /* cancel the parent's gap while closed */
.step-body > .reveal:not(.is-open) { margin-top: -40px; }
.no-js .reveal { margin-top: 0; }
.preload *, .preload *::before, .preload *::after { transition: none !important; }

.subpanel { display: flex; flex-direction: column; gap: 20px; padding: 20px; background: var(--mdr-fog); border-radius: var(--r-lg); }
.subpanel__title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--fg-1); }
.subpanel .input, .subpanel .money { background: var(--mdr-paper); }

.callout { margin: 16px 0 0; font-size: 14px; color: var(--fg-1); display: flex; gap: 10px; align-items: flex-start; }
.callout__icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--mdr-magenta); stroke-width: 2;
                 stroke-linecap: round; stroke-linejoin: round; }

/* Upload */
.dropzone { border: 2px dashed var(--mdr-silver); background: var(--mdr-paper); border-radius: var(--r-lg); padding: 28px 20px;
            display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
            transition: border-color var(--dur-fast), background var(--dur-fast); }
.dropzone.is-drag { border-color: var(--mdr-magenta); background: var(--mdr-fog); }
.dropzone p { margin: 0; font-size: 15px; color: var(--fg-2); }
.dropzone__icon { width: 32px; height: 32px; fill: none; stroke: var(--fg-1); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-dark { display: inline-flex; align-items: center; justify-content: center; background: var(--mdr-black); color: var(--fg-1-dark);
            border: 0; border-radius: var(--r-pill); padding: 0 24px; height: 44px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-dark:hover { background: var(--mdr-charcoal); }
.btn-dark--sm { padding: 0 20px; font-size: 14px; }
.upload:has(#document:focus-visible) .btn-dark { outline: 2px solid var(--mdr-magenta-soft); outline-offset: 2px; }
.upload-card { border: 1px solid var(--mdr-mist); border-radius: var(--r-lg); padding: 18px 20px; display: flex;
               flex-direction: column; gap: 12px; }
.upload-card--done, .upload-card--error { flex-direction: row; align-items: center; padding: 14px 20px; }
.upload-card--done { border-color: var(--success); }
.upload-card--error { border: 2px solid var(--danger); flex-wrap: wrap; }
.upload-card__row { display: flex; align-items: center; gap: 12px; }
.upload-card__icon { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--fg-1); stroke-width: 1.8;
                     stroke-linecap: round; stroke-linejoin: round; }
.upload-card__icon--danger { stroke: var(--danger); stroke-width: 2; }
.upload-card__name { flex: 1; min-width: 0; display: block; font-size: 15px; font-weight: 600; overflow: hidden;
                     text-overflow: ellipsis; white-space: nowrap; }
.upload-card__pct { font-size: 14px; color: var(--fg-2); }
.upload-card__text { flex: 1; min-width: 0; }
.upload-card__meta { font-size: 13px; color: var(--fg-2); }
.upload-card__ok { width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--success);
                   display: flex; align-items: center; justify-content: center; }
.upload-card__ok svg { width: 16px; height: 16px; fill: none; stroke: var(--accent-fg); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.upload-card__msg { flex: 1; min-width: 200px; font-size: 15px; font-weight: 600; color: var(--danger); }
.progress--thin .progress__bar { transition: width var(--dur-fast) linear; }
.link-btn--sm { font-size: 14px; padding: 0 4px; }

/* People */
.people { display: flex; flex-direction: column; gap: 20px; outline: none; }
.person { border: 1px solid var(--mdr-mist); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column;
          gap: 20px; min-width: 0; }
.person--main { border-color: var(--mdr-black); }
.person__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.person__title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.person__name { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 17px; overflow-wrap: anywhere; color: var(--fg-1); }
.badge { padding: 3px 10px; border-radius: var(--r-pill); background: var(--mdr-black); color: var(--fg-1-dark); font-size: 12px; font-weight: 700; }
.moved-note { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--fg-1); display: flex; gap: 8px; align-items: center; }
.moved-note svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--mdr-magenta); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-outline-sm { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: var(--mdr-paper);
                  color: var(--fg-1); border: 1px solid var(--mdr-black); border-radius: var(--r-pill); padding: 0 22px; height: 44px;
                  font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-outline-sm:hover { background: var(--mdr-fog); }
.btn-outline-sm svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.btn-outline-sm--gap { margin-top: -4px; }
.muted-note { margin: 0; font-size: 14px; color: var(--fg-2); }
.ap-email { max-width: 520px; }

/* Credit */
.subcard { border: 1px solid var(--mdr-mist); border-radius: var(--r-lg); padding: 20px; }
.subcard__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 44px; }
.subcard__title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--fg-1); }
.subcard__title--gap { margin-bottom: 16px; }
.guarantee { border: 2px solid var(--mdr-magenta); border-radius: var(--r-lg); margin: 0; padding: 24px 20px; min-width: 0; }
.guarantee__legend { padding: 0 8px; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); letter-spacing: -.01em; }
.guarantee > .group__intro { margin: 0 0 20px; }

/* Honeypot */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Terms & sign ---------- */
.draft-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-md);
                border: 2px solid var(--warning); background: color-mix(in srgb, var(--warning) 14%, var(--mdr-paper));
                font-size: 15px; color: var(--fg-1); }
.draft-banner svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--fg-1); stroke-width: 2;
                    stroke-linecap: round; stroke-linejoin: round; }
.terms-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.terms-head .group__legend { margin: 0; }
.terms-head__pdf { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 600; }
.terms-head__pdf svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.terms-version { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--fg-2); }
.terms-box { height: 280px; overflow-y: auto; overflow-wrap: break-word; border: 1px solid var(--mdr-slate);
             border-radius: var(--r-lg); padding: 20px 24px; font-size: 14px; line-height: 1.65; color: var(--mdr-charcoal);
             background: var(--mdr-paper); }
.terms-box:focus-visible { outline: 2px solid var(--mdr-magenta-soft); outline-offset: 2px; }
.terms-box p { margin: 0 0 12px; color: inherit; }
.terms-box p:last-child { margin-bottom: 0; }
.terms-box strong { color: var(--fg-1); }
.terms-box h1, .terms-box h2, .terms-box h3 { font-size: 16px; margin: 16px 0 8px; }
.group--16 { gap: 16px; }
.group__legend--16 { margin-bottom: 16px; }

.sig { display: flex; flex-direction: column; gap: 8px; outline: none; }
.sig__head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.sig__draw, .sig__type { display: flex; flex-direction: column; gap: 8px; }
.sig-pad { position: relative; border: 1px solid var(--mdr-slate); border-radius: var(--r-lg); background: var(--mdr-paper); overflow: hidden; }
.sig-pad.is-invalid { border-color: var(--danger); }
.sig-pad__canvas { display: block; width: 100%; height: 160px; touch-action: none; cursor: crosshair; }
.sig-pad__line { position: absolute; left: 24px; right: 24px; bottom: 36px; border-bottom: 1px solid var(--mdr-silver); pointer-events: none; }
.sig-pad__hint { position: absolute; left: 24px; bottom: 44px; font-size: 14px; color: var(--fg-3); pointer-events: none; }
.sig-pad__clear { position: absolute; top: 4px; right: 4px; background: var(--mdr-paper); border: 1px solid var(--mdr-mist);
                  border-radius: var(--r-pill); padding: 0 16px; height: 44px; font-family: var(--font-body); font-size: 13px;
                  font-weight: 600; color: var(--fg-1); cursor: pointer; }
.sig-preview { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px; background: var(--mdr-fog); border-radius: var(--r-md); }
.sig-preview__label { font-size: 14px; font-weight: 600; color: var(--fg-2); }
.sig-preview__img { width: 240px; max-width: 100%; height: 64px; object-fit: contain; object-position: left center;
                    border: 1px solid var(--mdr-mist); border-radius: var(--r-sm); background: var(--mdr-paper); }
.sig-typed { height: 96px; border: 1px solid var(--mdr-mist); border-radius: var(--r-lg); display: flex; align-items: center;
             padding: 0 24px; font-family: var(--font-signature); font-weight: 600; font-size: 42px; color: var(--fg-1);
             overflow: hidden; white-space: nowrap; }
.no-js .sig__draw { display: none !important; }
.no-js .sig__type[hidden] { display: flex !important; }
.no-js [data-sig-toggle] { display: none; }
.field--date-ro { max-width: 240px; }
.input--readonly { border-color: var(--mdr-mist); background: var(--mdr-fog); color: var(--fg-2); }

/* ---------- Review ---------- */
.review-list { display: flex; flex-direction: column; gap: 20px; }
.review { border: 1px solid var(--mdr-mist); border-radius: var(--r-lg); overflow: hidden; }
.review__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 20px; background: var(--mdr-fog); }
.review__head h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.review__head .link-btn { display: inline-flex; align-items: center; }
.review__rows { margin: 0; padding: 6px 20px 14px; }
.review__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 2px 20px;
               padding: 10px 0; border-bottom: 1px solid var(--mdr-fog); }
.review__row dt { font-size: 14px; color: var(--fg-2); }
.review__row dd { margin: 0; font-size: 15px; font-weight: 500; color: var(--fg-1); white-space: pre-line; overflow-wrap: anywhere; }
.review__table-wrap { padding: 10px 10px 0; overflow-x: auto; }
.review__table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 14px; }
.review__table th { text-align: left; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--fg-2); border-bottom: 1px solid var(--mdr-mist); }
.review__table td { padding: 10px; border-bottom: 1px solid var(--mdr-fog); vertical-align: top; }
.review__name { font-weight: 600; }
.review__name span { display: block; font-weight: 400; font-size: 13px; color: var(--fg-2); overflow-wrap: anywhere; }
.role-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.role-tag { padding: 2px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap;
            background: var(--mdr-fog); color: var(--fg-1); }
.role-tag--main { background: var(--mdr-black); color: var(--fg-1-dark); }
.review__sig { padding: 0 20px 20px; }
.review__sig-img { max-width: 300px; width: 100%; aspect-ratio: 1200 / 320; object-fit: contain; object-position: left center;
                   border: 1px solid var(--mdr-mist); border-radius: var(--r-md); background: var(--mdr-paper); }
.review__sig--typed { font-family: var(--font-signature); font-weight: 600; font-size: 38px; }
.review__note { margin: 8px 0 0; font-size: 14px; color: var(--fg-2); }

/* ---------- Done ---------- */
.stage__inner--640 { max-width: 640px; }
.done-check { width: 64px; height: 64px; margin: 0 auto 24px; border-radius: var(--r-pill); background: var(--mdr-magenta);
              display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-glow); }
.done-check svg { width: 32px; height: 32px; fill: none; stroke: var(--accent-fg); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done-title { margin: 0 0 16px; font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 6vw, 52px);
              line-height: 1.08; letter-spacing: var(--tr-tight); color: var(--fg-1-dark); }
.stage__lead--tight, .stage__lead--tight:last-of-type { margin-bottom: 8px; }
.done-ref { color: var(--fg-1-dark); letter-spacing: .02em; }
.showroom__inner--1000 { max-width: 1000px; }
.next-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.next-step { border: 1px solid var(--mdr-mist); border-radius: var(--r-lg); padding: 28px 24px; }
.next-step h3 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.next-step p { margin: 0; font-size: 15px; color: var(--fg-2); }
.next-step__num { display: flex; width: 40px; height: 40px; border-radius: var(--r-pill); background: var(--mdr-black); color: var(--fg-1-dark);
                  align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; margin-bottom: 16px; }
.next-step__num--accent { background: var(--mdr-magenta); }
.done-actions { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.icon--18 { width: 18px; height: 18px; }
.done-note { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--fg-2); }
@media (max-width: 767px) { .done-actions .btn { width: 100%; } }

/* ---------- Save and finish later (modal) ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.modal__card { position: relative; width: 100%; max-width: 460px; background: var(--mdr-paper); border-radius: var(--r-lg);
               padding: 32px 28px 28px; box-shadow: var(--sh-hero); outline: none; }
.modal__x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: var(--r-pill);
            display: flex; align-items: center; justify-content: center; color: var(--fg-1); }
.modal__x:hover { background: var(--mdr-fog); }
.modal__x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.modal__title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: var(--tr-tight); padding-right: 32px; }
.modal__text { margin: 0 0 20px; font-size: 15px; color: var(--fg-2); }
.modal__text strong { color: var(--fg-1); overflow-wrap: anywhere; }
.modal__field { margin-bottom: 20px; }
.modal__btn { width: 100%; }
.modal__icon { width: 52px; height: 52px; border-radius: var(--r-pill); background: var(--mdr-black); display: flex;
               align-items: center; justify-content: center; margin-bottom: 18px; }
.modal__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--fg-1-dark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.has-modal { overflow: hidden; }

/* ---------- Staff admin ---------- */
.admin-main { max-width: var(--page-max); margin: 0 auto; padding: 32px var(--gutter) 64px; width: 100%; }
.admin-user { color: var(--fg-2-dark); font-size: 14px; }
.admin-h1 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: var(--tr-tight); }
.admin-modes { margin: 0 0 24px; color: var(--fg-2); font-size: 14px; }
.admin-back { margin: 0 0 12px; font-size: 14px; }
.admin-empty { color: var(--fg-2); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 10px 12px; background: var(--mdr-black); color: var(--fg-1-dark); font-weight: 600; white-space: nowrap; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--mdr-mist); vertical-align: top; }
.admin-flag { display: inline-block; padding: 2px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600;
              background: var(--mdr-fog); color: var(--fg-1); white-space: nowrap; }
.admin-flag--odoo_done, .admin-flag--mail-sent { background: color-mix(in srgb, var(--success) 18%, var(--mdr-paper)); }
.admin-flag--odoo_failed, .admin-flag--mail-failed, .admin-flag--mail-unknown { background: color-mix(in srgb, var(--danger) 16%, var(--mdr-paper)); }
.admin-flag--warn, .admin-flag--odoo_dry_run { background: color-mix(in srgb, var(--warning) 22%, var(--mdr-paper)); }
.admin-card { border: 1px solid var(--mdr-mist); border-radius: var(--r-lg); padding: 20px 24px; margin-bottom: 20px; }
.admin-card h2 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.admin-card p { color: var(--fg-1); }
.admin-card form { margin: 12px 0; }
.admin-hint { font-size: 13px; color: var(--fg-2) !important; }
.admin-pre { font-family: var(--font-body); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px;   /* house rule: no monospace */ line-height: 1.5; background: var(--mdr-fog);
             border-radius: var(--r-md); padding: 12px 14px; max-height: 480px; overflow: auto; }
.admin-callout { padding: 14px 18px; border-radius: var(--r-md); margin: 0 0 20px; }
.admin-callout--warn { border: 2px solid var(--warning); background: color-mix(in srgb, var(--warning) 14%, var(--mdr-paper)); }
details summary { cursor: pointer; font-weight: 600; margin: 8px 0; }

/* ---------- Welcome back ---------- */
.resume-card { max-width: 560px; margin: 0 auto; border: 1px solid var(--mdr-mist); border-radius: var(--r-lg); padding: 28px 24px;
               box-shadow: var(--sh-card); }
.resume-card__type { margin: 0 0 4px; }
.resume-card__biz { margin: 0 0 20px; font-family: var(--font-display); font-weight: 800; font-size: 24px; overflow-wrap: anywhere; }
.resume-card__progress-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 8px; }
.resume-card__progress-head span:first-child { font-weight: 600; }
.resume-card__progress-head span:last-child { color: var(--fg-2); }
.resume-card__bar { margin-bottom: 16px; }
.resume-card__saved { margin: 0 0 24px; font-size: 14px; color: var(--fg-2); }
.resume-card__go { width: 100%; }
.resume-card__new { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--fg-2); }
.resume-card__new a { font-weight: 600; }

/* ---------- Simple message page (errors) ---------- */
.message { max-width: 640px; margin: 0 auto; padding: 24px var(--gutter) 72px; text-align: center; }
.message p { color: var(--fg-2); }

/* ---------- Footer ---------- */
.footer-wave svg { height: 56px; }
.site-footer { background: var(--mdr-black); color: var(--fg-2-dark); padding: 24px var(--gutter) 32px; }
.site-footer__inner { max-width: var(--page-max); margin: 0 auto; }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
                     gap: 32px 24px; padding-bottom: 32px; border-bottom: 1px solid var(--mdr-charcoal); }
.site-footer__brand { display: flex; flex-direction: column; gap: 14px; }
.site-footer__brand img { height: 40px; width: auto; align-self: flex-start; }
.site-footer__brand p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--fg-2-dark); }
.site-footer h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 800; font-size: 16px;
                  color: var(--fg-1-dark); letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; color: var(--fg-2-dark);
                 text-decoration: none; }
.site-footer ul { gap: 0; }
.site-footer a:hover { color: var(--fg-1-dark); text-decoration: underline; }
.site-footer a.site-footer__strong { color: var(--fg-1-dark); font-weight: 600; }
.site-footer address { font-style: normal; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.6; }
.site-footer address a { color: var(--fg-1-dark); }
.site-footer address span { padding-top: 6px; }
.noscript-start { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.site-footer__legal { margin: 20px 0 0; font-size: 13px; color: var(--fg-3-dark); }
