/* ════════════════════════════════════════════════════════════════
   Shared base — brand-neutral.
   Uses ONLY the token contract below; every brand defines these in its
   own tokens.css. Never hard-code colours, fonts, radii or timings here.

   Token contract
   colour   --c-bg --c-surface --c-surface-2 --c-ink --c-ink-2 --c-ink-3 --c-line
            --c-accent --c-accent-hover --c-on-accent --c-accent-soft
            --c-positive --c-error --c-notice-bg --c-notice-ink --c-focus
   type     --font-display --font-body --fw-regular --fw-medium --fw-semibold --fw-bold
            --fs-xs --fs-sm --fs-base --fs-lg --fs-xl --fs-2xl --fs-3xl --fs-display
            --lh-tight --lh-snug --lh-body --ls-display --ls-eyebrow
   space    --space-1 … --space-10      layout  --container --gutter
   radius   --radius-sm --radius-md --radius-lg --radius-xl --radius-pill
   shadow   --shadow-sm --shadow-md --shadow-lg
   motion   --dur-fast --dur-base --dur-slow --ease-out --ease-emph --reveal-distance
   ════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: var(--lh-tight); font-weight: var(--fw-bold); }
.tabular { font-variant-numeric: tabular-nums; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; border-radius: var(--radius-sm); }

/* ── Preview notice (top bar) ───────────────────────────── */
.notice-bar {
  background: var(--c-notice-bg); color: var(--c-notice-ink);
  font-size: var(--fs-sm); line-height: var(--lh-snug);
  padding: var(--space-2) var(--gutter); text-align: center;
}
.notice-bar a { font-weight: var(--fw-semibold); text-underline-offset: 3px; }
.dot-live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; margin-right: 8px; vertical-align: middle; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-5);
  border: 1.5px solid transparent; border-radius: var(--btn-radius, var(--radius-pill));
  font-weight: var(--fw-semibold); font-size: var(--fs-base); line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn--primary:hover { background: var(--c-accent-hover); }
.btn--ghost { background: transparent; border-color: var(--c-line); color: var(--c-ink); }
.btn--ghost:hover { border-color: var(--c-ink-3); }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 var(--space-4); font-size: var(--fs-sm); }
.btn svg { width: 18px; height: 18px; flex: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase;
}

/* ── Calculator (structure only; brands style the card) ─── */
.calc { display: grid; gap: var(--space-3); }
.calc__row {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: var(--c-surface-2); border: 1.5px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.calc__row:focus-within { border-color: var(--c-accent); background: var(--c-surface); }
.calc__label { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--c-ink-3); font-weight: var(--fw-medium); }
.calc__input {
  width: 100%; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-2xl); line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.calc__input:disabled { color: var(--c-ink-3); }
.calc__ccy { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--fw-semibold); font-size: var(--fs-base); }
.calc__flag { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 1px var(--c-line); }
.calc__flag svg { width: 100%; height: 100%; }
.calc__meta { display: grid; gap: var(--space-2); font-size: var(--fs-sm); color: var(--c-ink-2); padding: var(--space-1) var(--space-1) 0; }
.calc__meta-row { display: flex; justify-content: space-between; gap: var(--space-3); }
.calc__meta-row dd { color: var(--c-ink); font-weight: var(--fw-medium); text-align: right; font-variant-numeric: tabular-nums; }
.calc__meta-row dd.is-muted { color: var(--c-ink-3); font-weight: var(--fw-regular); }
.calc__status { font-size: var(--fs-xs); color: var(--c-ink-3); line-height: var(--lh-snug); }
.calc__status.is-error { color: var(--c-error); }
.calc__status a, .link-btn { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font-weight: var(--fw-semibold); }
.calc__disclaimer { font-size: var(--fs-xs); line-height: var(--lh-snug); color: var(--c-ink-3); }
.calc .skeleton { display: inline-block; width: 7em; height: 1em; border-radius: 4px; background: var(--c-line); animation: pulse 1.2s ease-in-out infinite; vertical-align: middle; }
@keyframes pulse { 50% { opacity: .45; } }

/* ── Forms ──────────────────────────────────────────────── */
.form { display: grid; gap: var(--space-4); }
.field { display: grid; gap: var(--space-2); }
.field__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-ink); }
.field__hint { font-size: var(--fs-xs); color: var(--c-ink-3); font-weight: var(--fw-regular); }
.input, .select {
  width: 100%; min-height: 52px; padding: 0 var(--space-4);
  background: var(--c-surface); border: 1.5px solid var(--c-line); border-radius: var(--input-radius, var(--radius-md));
  font-size: var(--fs-base); /* ≥16px avoids iOS zoom */
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
.select {
  padding-right: var(--space-8); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.input:hover, .select:hover { border-color: var(--c-ink-3); }
.input:focus, .select:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 4px var(--c-accent-soft); }
.input-affix { position: relative; }
.input-affix .input { padding-left: 2.6em; }
.input-affix__pre { position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%); color: var(--c-ink-3); font-weight: var(--fw-semibold); pointer-events: none; }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .chips { border-color: var(--c-error); }
.field__error { display: none; font-size: var(--fs-xs); color: var(--c-error); font-weight: var(--fw-medium); }
.field.is-invalid .field__error { display: block; }
.form__grid { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .form__grid--2 { grid-template-columns: 1fr 1fr; } }

/* Choice chips (radio group) */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); border: 1.5px solid transparent; border-radius: var(--radius-md); }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-4);
  border: 1.5px solid var(--c-line); border-radius: var(--chip-radius, var(--radius-pill));
  font-size: var(--fs-sm); font-weight: var(--fw-medium); background: var(--c-surface);
  transition: all var(--dur-fast) var(--ease-out);
}
.chip:hover span { border-color: var(--c-ink-3); }
.chip input:checked + span { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-surface); }
.chip input:focus-visible + span { outline: 2px solid var(--c-focus); outline-offset: 2px; }

.check { display: grid; grid-template-columns: 22px 1fr; gap: var(--space-3); align-items: start; font-size: var(--fs-sm); color: var(--c-ink-2); line-height: var(--lh-snug); cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--c-accent); cursor: pointer; }

.form__success { display: none; text-align: left; }
.form-wrap.is-done .form { display: none; }
.form-wrap.is-done .form__success { display: grid; gap: var(--space-3); animation: rise var(--dur-slow) var(--ease-emph) both; }
.form__fineprint { font-size: var(--fs-xs); color: var(--c-ink-3); line-height: var(--lh-snug); }
.form__notice { font-size: var(--fs-xs); color: var(--c-ink-2); line-height: var(--lh-snug); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--c-surface-2); border: 1px solid var(--c-line); }
.form__notice a { color: inherit; text-underline-offset: 2px; }

/* ── FAQ (native details) ──────────────────────────────── */
.faq { display: grid; }
.faq details { border-bottom: 1px solid var(--c-line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-5) 0; font-weight: var(--fw-semibold); font-size: var(--fs-lg); line-height: var(--lh-snug);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 12px; height: 12px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-3px, -3px); transition: transform var(--dur-base) var(--ease-out); opacity: .6;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq details p { padding: 0 0 var(--space-5); color: var(--c-ink-2); max-width: 68ch; }
.faq details[open] p { animation: rise var(--dur-base) var(--ease-out) both; }

/* ── Reveal on scroll (only when JS is running) ─────────── */
.js [data-reveal] { opacity: 0; transform: translateY(var(--reveal-distance)); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-emph); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(var(--reveal-distance)); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ── Form: spam trap, error box, busy state ─────────────── */
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__error {
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--c-error) 10%, var(--c-surface)); color: var(--c-error);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: var(--lh-snug);
}
.form__error[hidden] { display: none; }
.btn:disabled, .btn[aria-busy="true"] { opacity: .65; cursor: progress; }

/* ── Consent banner (first-party analytics) ─────────────── */
.consent {
  position: fixed; z-index: 100; left: var(--space-3); right: var(--space-3); bottom: var(--space-3);
  max-width: 560px; margin-inline: auto;
  display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-5);
  background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm); line-height: var(--lh-snug);
  animation: rise var(--dur-slow) var(--ease-emph) both;
}
.consent[hidden] { display: none; }
.consent__text { color: var(--c-ink-2); }
.consent__text strong { color: var(--c-ink); }
.consent__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
@media (min-width: 720px) { .consent { right: auto; left: var(--space-5); bottom: var(--space-5); margin: 0; } }

/* ── Confirmation result page (verified.html) ───────────── */
.result { min-height: 70vh; display: grid; place-items: center; padding: var(--space-8) var(--gutter); }
.result__card { max-width: 520px; width: 100%; text-align: left; display: grid; gap: var(--space-4);
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  padding: var(--space-6); box-shadow: var(--shadow-md); }
.result__card h1 { font-size: var(--fs-2xl); }
.result__card p { color: var(--c-ink-2); }

/* Short illustration note directly under the calculator result (both brands). */
.calc__hint { margin-top: var(--space-2); font-size: var(--fs-xs); line-height: var(--lh-snug); color: var(--c-ink-3); }

/* Interest form: numbered questions + the "why we ask" points next to it (both brands). */
.form { counter-reset: q; }
.form .field__label::before {
  counter-increment: q; content: counter(q);
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; vertical-align: 1px;
  border-radius: 50%; background: var(--c-accent-soft); color: var(--c-accent); font-size: 12px; font-weight: var(--fw-bold);
}
.ask-points { list-style: none; margin-top: var(--space-6); display: grid; gap: var(--space-5); }
.ask-points li { display: flex; gap: var(--space-4); align-items: flex-start; }
.ask-points__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--c-accent-soft); }
.ask-points__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--c-accent); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ask-points strong { display: block; font-size: var(--fs-base); color: var(--c-ink); }
.ask-points li > div > span { display: block; margin-top: 2px; font-size: var(--fs-sm); line-height: var(--lh-snug); color: var(--c-ink-2); }
