/* ===========================================================
   ConsultX — Accounting & Compliance Pre-Quotation Survey
   Design tokens + component system
   Inter (headings / UI) · Roboto (body / form text)
   =========================================================== */

:root {
  /* Brand palette (from ConsultX logo) */
  --cx-black: #0B0B0B;
  --cx-charcoal: #161616;
  --cx-orange: #FF771C;
  --cx-orange-hover: #E65F00;
  --cx-orange-soft: #FFF3EA;
  --cx-orange-tint: #FFE9D6;
  --cx-bg: #F7F7F5;
  --cx-surface: #FFFFFF;
  --cx-surface-soft: #FAFAF8;
  --cx-border: #E2E2DE;
  --cx-border-strong: #C9C9C3;
  --cx-text: #101010;
  --cx-muted: #686868;
  --cx-muted-2: #909090;
  --cx-danger: #B42318;
  --cx-danger-soft: #FEF3F2;
  --cx-success: #16794C;
  --cx-success-soft: #EAF6F0;

  /* Tweakable — accent + shape + density (overridden by Tweaks panel) */
  --accent: var(--cx-orange);
  --accent-hover: var(--cx-orange-hover);
  --accent-soft: var(--cx-orange-soft);
  --accent-tint: var(--cx-orange-tint);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  /* density scale */
  --gap-field: 26px;
  --gap-q: 34px;
  --pad-input: 13px 15px;
  --pad-chip: 11px 16px;
  --pad-card: 18px;

  /* type */
  --font-head: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, sans-serif;

  --shadow-card: 0 1px 2px rgba(16,16,16,.04), 0 12px 32px -16px rgba(16,16,16,.10);
  --shadow-pop: 0 8px 28px -8px rgba(16,16,16,.18);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* density variants */
[data-density="compact"] {
  --gap-field: 18px; --gap-q: 24px;
  --pad-input: 10px 13px; --pad-chip: 8px 13px; --pad-card: 14px;
}
[data-density="comfy"] {
  --gap-field: 32px; --gap-q: 44px;
  --pad-input: 15px 17px; --pad-chip: 13px 18px; --pad-card: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cx-bg);
  color: var(--cx-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-tint); }

/* faint dot-grid atmosphere on the page bg */
.cx-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 1px 1px, rgba(16,16,16,.035) 1px, transparent 0) 0 0 / 26px 26px,
    var(--cx-bg);
}

/* ============================ HEADER ============================ */
.cx-header {
  background: var(--cx-surface);
  border-bottom: 1px solid var(--cx-border);
  position: sticky; top: 0; z-index: 30;
}
.cx-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.cx-logo { display: block; height: 96px; width: auto; }
.cx-header-label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .01em;
  color: var(--cx-muted);
  display: flex; align-items: center; gap: 10px;
}
.cx-header-label::before {
  content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px;
}

/* ============================ SHELL ============================ */
.cx-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.cx-card {
  background: var(--cx-surface);
  border: 1px solid var(--cx-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: grid;
  grid-template-columns: 380px 1fr;
}

/* ============================ LEFT RAIL ============================ */
.cx-rail {
  padding: 44px 40px;
  border-right: 1px solid var(--cx-border);
  background: var(--cx-surface-soft);
  position: sticky; top: 129px;
  align-self: start;
}
.cx-eyebrow {
  font-family: var(--font-head);
  font-weight: 600; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  margin: 0 0 14px;
}
.cx-title {
  font-family: var(--font-head);
  font-weight: 700; font-size: 30px; line-height: 1.14;
  letter-spacing: -.018em; color: var(--cx-text);
  margin: 0 0 16px; text-wrap: balance;
}
.cx-intro {
  font-size: 14.5px; line-height: 1.62; color: var(--cx-muted);
  margin: 0 0 18px;
}
.cx-note {
  font-size: 12.5px; line-height: 1.55; color: var(--cx-muted-2);
  padding: 12px 14px; border-left: 2px solid var(--cx-border-strong);
  background: var(--cx-surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0 0 28px;
}
.cx-badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 32px; }
.cx-badge {
  font-family: var(--font-head); font-weight: 500; font-size: 11.5px;
  color: var(--cx-muted); background: var(--cx-surface);
  border: 1px solid var(--cx-border); border-radius: 999px;
  padding: 5px 11px;
}

/* vertical step progress (desktop) */
.cx-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cx-step {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 9px 0; position: relative; cursor: default;
}
.cx-step + .cx-step { border-top: 1px solid transparent; }
.cx-step-marker {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-head);
  font-weight: 600; font-size: 12px; transition: all .2s ease;
  border: 1.5px solid var(--cx-border-strong); color: var(--cx-muted-2);
  background: var(--cx-surface);
}
.cx-step-line {
  position: absolute; left: 12.5px; top: 35px; bottom: -9px; width: 1.5px;
  background: var(--cx-border); z-index: 0;
}
.cx-step:last-child .cx-step-line { display: none; }
.cx-step-body { padding-top: 3px; min-width: 0; }
.cx-step-k {
  font-family: var(--font-head); font-weight: 600; font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--cx-muted-2);
  margin: 0 0 1px;
}
.cx-step-name {
  font-family: var(--font-head); font-weight: 500; font-size: 13.5px;
  color: var(--cx-muted); line-height: 1.3;
}
.cx-step.is-active .cx-step-marker {
  border-color: var(--accent); color: #fff; background: var(--accent);
  box-shadow: var(--ring);
}
.cx-step.is-active .cx-step-name { color: var(--cx-text); font-weight: 600; }
.cx-step.is-active .cx-step-k { color: var(--accent); }
.cx-step.is-done { cursor: pointer; }
.cx-step.is-done .cx-step-marker {
  border-color: var(--cx-charcoal); background: var(--cx-charcoal); color: #fff;
}
.cx-step.is-done .cx-step-line { background: var(--cx-charcoal); }
.cx-step.is-done .cx-step-name { color: var(--cx-text); }

/* ============================ FORM AREA ============================ */
.cx-form { padding: 44px 48px 36px; min-width: 0; }

/* mobile progress header (hidden on desktop) */
.cx-mhead { display: none; }

.cx-step-head { margin: 0 0 30px; }
.cx-step-head .k {
  font-family: var(--font-head); font-weight: 600; font-size: 12px;
  letter-spacing: .06em; color: var(--accent); margin: 0 0 7px;
}
.cx-step-head h2 {
  font-family: var(--font-head); font-weight: 700; font-size: 22px;
  letter-spacing: -.01em; color: var(--cx-text); margin: 0;
}
.cx-step-head p { font-size: 13.5px; color: var(--cx-muted); margin: 8px 0 0; line-height: 1.55; }

/* sub-section header inside a step */
.cx-subhead {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 14px;
  margin: 6px 0 -10px;
}
.cx-subhead:first-child { margin-top: 0; }
.cx-subhead span {
  font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--cx-text); white-space: nowrap;
}
.cx-subhead::after { content: ""; flex: 1; height: 1px; background: var(--cx-border); }

/* day + month financial year-end */
.cx-daymonth { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cx-daymonth .cx-select { width: auto; }
.cx-daymonth .day { min-width: 92px; }
.cx-daymonth .month { min-width: 150px; }
.cx-daymonth .cx-chip { padding: 11px 16px; }
.cx-daymonth .cx-select:disabled { opacity: .5; cursor: not-allowed; }

/* question grid */
.cx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-q) 36px; }
.cx-q { min-width: 0; display: flex; flex-direction: column; }
.cx-q.col-2 { grid-column: 1 / -1; }

/* labels */
.cx-label {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-head); font-weight: 600; font-size: 14.5px;
  color: var(--cx-text); margin: 0 0 4px;
}
.cx-label .num { color: var(--cx-muted-2); font-weight: 600; }
.cx-req { color: var(--accent); font-size: 13px; line-height: 1; }
.cx-opt {
  font-family: var(--font-body); font-weight: 400; font-size: 11.5px;
  color: var(--cx-muted-2); letter-spacing: .01em;
}
.cx-help { font-size: 12.5px; line-height: 1.5; color: var(--cx-muted); margin: 2px 0 12px; }
.cx-q .cx-help + * { margin-top: 0; }
.cx-controlwrap { margin-top: 10px; }

/* text input + textarea + select */
.cx-input, .cx-textarea, .cx-select {
  width: 100%; font-family: var(--font-body); font-size: 14.5px; color: var(--cx-text);
  background: var(--cx-surface); border: 1px solid var(--cx-border-strong);
  border-radius: var(--radius-sm); padding: var(--pad-input);
  transition: border-color .15s, box-shadow .15s;
}
.cx-input::placeholder, .cx-textarea::placeholder { color: var(--cx-muted-2); }
.cx-textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
.cx-input:focus, .cx-textarea:focus, .cx-select:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring);
}
.cx-select {
  appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23686868' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
.cx-select:invalid { color: var(--cx-muted-2); }

/* fade-in when an option set mounts or changes */
.cx-opts-anim { animation: cx-opts-fade .22s ease both; }
@keyframes cx-opts-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .cx-opts-anim { animation: none; } }

/* chips (single + multi) */
.cx-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.cx-chip {
  font-family: var(--font-head); font-weight: 500; font-size: 13.5px;
  color: var(--cx-text); background: var(--cx-surface);
  border: 1px solid var(--cx-border-strong); border-radius: 999px;
  padding: var(--pad-chip); cursor: pointer; display: inline-flex; align-items: center;
  gap: 9px; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .12s ease;
  user-select: none; line-height: 1.1;
}
.cx-chip:hover { border-color: var(--cx-charcoal); transform: translateY(-1px); }
.cx-chip:active { transform: translateY(0); }
.cx-chip .ind {
  width: 15px; height: 15px; flex: 0 0 auto; border-radius: 50%;
  border: 1.5px solid var(--cx-border-strong); transition: border-color .18s, background .18s, box-shadow .18s;
  display: grid; place-items: center;
}
.cx-chip.multi .ind { border-radius: 5px; }
.cx-chip.is-sel {
  border-color: var(--accent); background: var(--accent-soft); color: var(--cx-text);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
.cx-chip.is-sel .ind { border-color: var(--accent); background: var(--accent); }
.cx-chip.is-sel .ind svg { display: block; }
.cx-chip .ind svg { display: none; width: 10px; height: 10px; color: #fff; }
.cx-chip.single.is-sel .ind { background: var(--accent); box-shadow: inset 0 0 0 3px var(--cx-surface); }
.cx-chip.single.is-sel .ind svg { display: none; }

/* segmented control */
.cx-seg {
  display: inline-flex; background: var(--cx-surface-soft);
  border: 1px solid var(--cx-border-strong); border-radius: 999px; padding: 4px;
  gap: 4px; max-width: 100%; flex-wrap: wrap;
}
.cx-seg button {
  font-family: var(--font-head); font-weight: 500; font-size: 13.5px;
  border: none; background: transparent; color: var(--cx-muted);
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.cx-seg button:hover { color: var(--cx-text); background: color-mix(in srgb, var(--cx-border) 40%, transparent); }
.cx-seg button.is-sel {
  background: var(--accent); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* large selection cards (pricing drivers) */
.cx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 11px; }
.cx-cards.wide { grid-template-columns: 1fr; gap: 10px; }
.cx-selcard {
  position: relative; text-align: left; cursor: pointer;
  background: var(--cx-surface); border: 1.5px solid var(--cx-border); border-radius: var(--radius);
  padding: var(--pad-card); transition: all .15s ease; display: flex; flex-direction: column;
  gap: 4px; min-height: 60px; justify-content: center;
}
.cx-cards.wide .cx-selcard { flex-direction: row; align-items: center; gap: 12px; min-height: 0; }
.cx-selcard:hover { border-color: var(--cx-border-strong); }
.cx-selcard .t {
  font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--cx-text); line-height: 1.2;
}
.cx-selcard .d { font-size: 12.5px; color: var(--cx-muted); line-height: 1.45; }
.cx-selcard .check {
  position: absolute; top: 12px; right: 12px; width: 18px; height: 18px;
  border-radius: 50%; border: 1.5px solid var(--cx-border-strong); background: var(--cx-surface);
  display: grid; place-items: center; transition: all .15s;
}
.cx-cards.wide .cx-selcard .check { position: static; margin-left: auto; }
.cx-selcard .check svg { width: 11px; height: 11px; color: #fff; opacity: 0; transition: opacity .15s; }
.cx-selcard.is-sel {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}
.cx-selcard.is-sel .check { background: var(--accent); border-color: var(--accent); }
.cx-selcard.is-sel .check svg { opacity: 1; }

/* consent checkbox */
.cx-consent {
  display: flex; gap: 13px; align-items: flex-start; padding: 16px 18px;
  border: 1px solid var(--cx-border); background: var(--cx-surface-soft);
  border-radius: var(--radius); cursor: pointer; transition: all .15s;
}
.cx-consent:hover { border-color: var(--cx-border-strong); }
.cx-consent.is-sel { border-color: var(--accent); background: var(--accent-soft); }
.cx-consent .box {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; margin-top: 1px;
  border: 1.5px solid var(--cx-border-strong); background: var(--cx-surface);
  display: grid; place-items: center; transition: all .15s;
}
.cx-consent.is-sel .box { background: var(--accent); border-color: var(--accent); }
.cx-consent .box svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.cx-consent.is-sel .box svg { opacity: 1; }
.cx-consent .txt { font-size: 13px; line-height: 1.55; color: var(--cx-text); }

/* validation */
.cx-q.has-error .cx-input,
.cx-q.has-error .cx-textarea,
.cx-q.has-error .cx-select { border-color: var(--cx-danger); }
.cx-q.has-error .cx-input:focus,
.cx-q.has-error .cx-textarea:focus,
.cx-q.has-error .cx-select:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--cx-danger) 18%, transparent); }
.cx-err {
  display: flex; align-items: center; gap: 6px; color: var(--cx-danger);
  font-size: 12.5px; margin-top: 8px; font-family: var(--font-body);
}
.cx-err svg { width: 13px; height: 13px; flex: 0 0 auto; }

/* ============================ FOOTER NAV (within form) ============================ */
.cx-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--cx-border);
}
.cx-btn {
  font-family: var(--font-head); font-weight: 600; font-size: 14.5px;
  border-radius: var(--radius-sm); padding: 12px 24px; cursor: pointer;
  border: 1px solid transparent; transition: all .15s ease; display: inline-flex;
  align-items: center; gap: 9px; line-height: 1;
}
.cx-btn-primary { background: var(--accent); color: #fff; }
.cx-btn-primary:hover { background: var(--accent-hover); }
.cx-btn-primary:active { transform: translateY(1px); }
.cx-btn-ghost { background: transparent; color: var(--cx-text); border-color: var(--cx-border-strong); }
.cx-btn-ghost:hover { border-color: var(--cx-charcoal); background: var(--cx-surface-soft); }
.cx-btn:disabled { opacity: .5; cursor: not-allowed; }
.cx-btn .sp {
  width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: cxspin .7s linear infinite;
}
@keyframes cxspin { to { transform: rotate(360deg); } }

/* submission-failure banner */
.cx-banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  background: var(--cx-danger-soft); border: 1px solid color-mix(in srgb, var(--cx-danger) 30%, transparent);
  border-radius: var(--radius); margin-bottom: 24px; font-size: 13px; line-height: 1.55; color: var(--cx-danger);
}
.cx-banner svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.cx-banner b { font-family: var(--font-head); }

/* ============================ INTRO / WELCOME ============================ */
.cx-intro-screen {
  grid-column: 1 / -1; width: 100%; max-width: 680px; margin: 0 auto;
  padding: 72px 56px 64px;
}
.cx-intro-title {
  font-family: var(--font-head); font-weight: 700; font-size: 34px; line-height: 1.12;
  letter-spacing: -.02em; color: var(--cx-text); margin: 14px 0 18px; text-wrap: balance;
}
.cx-intro-lead { font-size: 16px; line-height: 1.62; color: var(--cx-muted); margin: 0 0 28px; max-width: 60ch; }
.cx-intro-meta {
  display: flex; align-items: center; gap: 22px; padding: 18px 24px;
  border: 1px solid var(--cx-border); border-radius: var(--radius); background: var(--cx-surface-soft);
  margin: 0 0 30px;
}
.cx-meta-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-meta-item .v { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--cx-text); letter-spacing: -.01em; }
.cx-meta-item .l { font-size: 12.5px; color: var(--cx-muted); white-space: nowrap; }
.cx-meta-sep { width: 1px; align-self: stretch; background: var(--cx-border); flex: 0 0 auto; }
.cx-intro-steps { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 11px; }
.cx-intro-steps li { display: flex; align-items: center; gap: 14px; }
.cx-intro-steps .n {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-tint);
}
.cx-intro-steps .t { font-family: var(--font-head); font-weight: 500; font-size: 15px; color: var(--cx-text); }
.cx-intro-badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 34px; }
.cx-intro-start { font-size: 15.5px; padding: 15px 28px; }
.cx-intro-start .ar { display: inline-flex; }
.cx-intro-note { font-size: 12.5px; line-height: 1.55; color: var(--cx-muted-2); margin: 24px 0 0; max-width: 58ch; }

/* ============================ SUCCESS ============================ */
.cx-success { grid-column: 1 / -1; }

.cxs-wrap { display: flex; justify-content: center; padding: 64px 48px 72px; }
.cxs-inner {
  max-width: 580px; width: 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}

/* animated checkmark */
.cxs-mark {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--cx-success-soft);
  border: 1px solid color-mix(in srgb, var(--cx-success) 28%, transparent);
  display: grid; place-items: center; margin-bottom: 26px;
  animation: cxpop .55s cubic-bezier(.2,.8,.3,1) both;
}
.cxs-mark svg { width: 36px; height: 36px; color: var(--cx-success); }
@keyframes cxpop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* staggered fade-up for all children */
@keyframes cxs-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cxs-mark, .cxs-badge, .cxs-heading, .cxs-sub, .cxs-stats, .cxs-next-head, .cxs-step { animation: none !important; }
}

.cxs-badge {
  font-family: var(--font-head); font-weight: 600; font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--cx-success);
  background: var(--cx-success-soft);
  border: 1px solid color-mix(in srgb, var(--cx-success) 25%, transparent);
  border-radius: 999px; padding: 5px 14px; margin-bottom: 20px;
  animation: cxs-up .45s ease .18s both;
}
.cxs-heading {
  font-family: var(--font-head); font-weight: 700; font-size: 28px;
  letter-spacing: -.018em; line-height: 1.2; color: var(--cx-text);
  margin: 0 0 16px; text-wrap: balance;
  animation: cxs-up .45s ease .28s both;
}
.cxs-sub {
  font-size: 15px; line-height: 1.65; color: var(--cx-muted);
  max-width: 52ch; margin: 0 0 32px;
  animation: cxs-up .45s ease .38s both;
}

/* stat row */
.cxs-stats {
  display: flex; align-items: stretch; width: 100%;
  border: 1px solid var(--cx-border); border-radius: var(--radius);
  background: var(--cx-surface-soft); overflow: hidden; margin-bottom: 40px;
  animation: cxs-up .45s ease .46s both;
}
.cxs-stat { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 20px 24px; align-items: center; }
.cxs-stat-divider { width: 1px; background: var(--cx-border); flex: 0 0 auto; }
.cxs-stat-label {
  font-family: var(--font-head); font-weight: 600; font-size: 10.5px;
  letter-spacing: .09em; text-transform: uppercase; color: var(--cx-muted-2);
}
.cxs-stat-value {
  font-family: var(--font-head); font-weight: 700; font-size: 19px;
  color: var(--cx-text); letter-spacing: -.01em;
}
.cxs-ref { font-size: 15px; color: var(--accent); letter-spacing: .03em; font-weight: 700; }

/* what happens next */
.cxs-next-head {
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  color: var(--cx-text); margin-bottom: 4px; align-self: flex-start;
  animation: cxs-up .45s ease .52s both;
}
.cxs-steps { width: 100%; display: flex; flex-direction: column; }
.cxs-step {
  display: flex; gap: 16px; align-items: flex-start; text-align: left;
  padding: 20px 0; border-top: 1px solid var(--cx-border);
  animation: cxs-up .45s ease both;
}
.cxs-step:last-child { padding-bottom: 0; }
.cxs-step-num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; margin-top: 1px;
  background: var(--accent-soft); border: 1px solid var(--accent-tint);
  color: var(--accent); font-family: var(--font-head); font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
}
.cxs-step-title { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--cx-text); margin-bottom: 4px; }
.cxs-step-desc { font-size: 13.5px; line-height: 1.62; color: var(--cx-muted); }

@media (max-width: 980px) {
  .cxs-wrap { padding: 48px 24px 60px; }
  .cxs-heading { font-size: 23px; }
  .cxs-stats { flex-direction: column; }
  .cxs-stat-divider { width: auto; height: 1px; }
}

/* ============================ YEAR PICKER ============================ */
.cx-yearpicker { position: relative; }
.cx-year-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  text-align: left; background: var(--cx-surface);
  border: 1px solid var(--cx-border-strong); border-radius: var(--radius-sm);
  padding: var(--pad-input); font-family: var(--font-body); font-size: 14.5px;
  color: var(--cx-text); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.cx-year-trigger:hover { border-color: var(--cx-charcoal); }
.cx-year-trigger.is-open,
.cx-year-trigger:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.cx-year-trigger .cy-ph { color: var(--cx-muted-2); }
.cx-year-trigger svg { flex: 0 0 auto; color: var(--cx-muted); transition: transform .2s ease; }
.cx-year-trigger.is-open svg { transform: rotate(180deg); }
.cx-year-list {
  position: absolute; top: calc(100% + 5px); left: 0; right: 0;
  max-height: 220px; overflow-y: auto; background: var(--cx-surface);
  border: 1px solid var(--cx-border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop); z-index: 200; scroll-behavior: smooth;
  animation: cx-dropdown .18s ease both;
}
@keyframes cx-dropdown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.cx-year-opt {
  display: block; width: 100%; padding: 10px 15px; text-align: left; border: none;
  background: none; cursor: pointer; font-family: var(--font-body); font-size: 14.5px;
  color: var(--cx-text); transition: background .1s, color .1s;
}
.cx-year-opt:hover { background: var(--accent-soft); color: var(--accent); }
.cx-year-opt.is-sel { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cx-q.has-error .cx-year-trigger { border-color: var(--cx-danger); }

/* ============================ PAGE FOOTER ============================ */
.cx-foot {
  max-width: 720px; margin: 30px auto 0; text-align: center;
  font-size: 12px; line-height: 1.6; color: var(--cx-muted-2); padding: 0 24px;
}

/* step transition — transform only, content is always visible (never opacity:0 at rest) */
.cx-step-enter { animation: cxfade .3s ease both; }
@keyframes cxfade { from { transform: translateY(8px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cx-step-enter, .cx-success .mark { animation: none; }
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 980px) {
  .cx-card { grid-template-columns: 1fr; }
  .cx-rail { display: none; }
  .cx-form { padding: 0; }
  .cx-shell { padding: 20px 16px 64px; }
  .cx-header-inner { padding: 14px 18px; }

  /* mobile progress header — now flows at top of the form */
  .cx-mhead {
    display: block; margin: -22px -20px 22px; padding: 18px 20px;
    border-bottom: 1px solid var(--cx-border); background: var(--cx-surface-soft);
  }
  .cx-mhead .row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .cx-mhead .of {
    font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: .04em;
    color: var(--accent); text-transform: uppercase;
  }
  .cx-mhead .pct { font-family: var(--font-head); font-size: 12px; color: var(--cx-muted-2); font-weight: 500; }
  .cx-mhead h2 {
    font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--cx-text);
    margin: 6px 0 12px; letter-spacing: -.01em;
  }
  .cx-mbar { height: 5px; border-radius: 999px; background: var(--cx-border); overflow: hidden; }
  .cx-mbar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .35s cubic-bezier(.4,0,.2,1); }

  .cx-mform { padding: 22px 20px 24px; }
  .cx-grid { grid-template-columns: 1fr; gap: var(--gap-q); }
  .cx-step-head { display: none; } /* mobile head replaces it */

  /* sticky bottom nav on mobile */
  .cx-nav {
    position: sticky; bottom: 0; margin: 30px -20px 0; padding: 14px 20px;
    background: color-mix(in srgb, var(--cx-surface) 92%, transparent);
    backdrop-filter: blur(8px); border-top: 1px solid var(--cx-border);
  }
  .cx-btn { flex: 1; justify-content: center; padding: 14px 18px; }
  .cx-cards { grid-template-columns: 1fr 1fr; }
  .cx-success { padding: 56px 22px; }
  .cx-intro-screen { padding: 34px 22px 40px; max-width: none; }
  .cx-intro-title { font-size: 26px; }
  .cx-intro-lead { font-size: 15px; margin-bottom: 24px; }
  .cx-intro-start { width: 100%; justify-content: center; }
}

@media (max-width: 560px) {
  .cx-header-label { display: none; }
  .cx-logo { height: 64px; }
  .cx-cards { grid-template-columns: 1fr; }
  .cx-seg { width: 100%; }
  .cx-seg button { flex: 1; padding: 11px 10px; text-align: center; }
  .cx-intro-meta { gap: 12px; padding: 16px; }
  .cx-meta-item .v { font-size: 16px; }
  .cx-meta-item .l { font-size: 11px; }
}
