/* ==========================================================================
   Fresvo estimator — styling
   --------------------------------------------------------------------------
   Everything brand-specific is a custom property in the :root block below.
   Reskin by editing those ~dozen values and nothing else.

   Theme rule: the complete palette is defined on the bare :root selector.
   prefers-color-scheme: dark and [data-theme="dark"] only REDEFINE those same
   tokens — no component ever reads a colour that exists solely inside a media
   query, so a page rendered with no colour-scheme signal is still complete.
   ========================================================================== */

:root {
  /* ---- brand ---------------------------------------------------------- */
  /* The site's accent. This was a coral left over from the previous identity,
     which is why the estimator read as a different product to the page that
     links to it. */
  --accent:            #5b50c8;
  --accent-deep:       #453ba6;
  --accent-soft:       #e7e5fa;
  --accent-light:      #a79df4;
  --accent-contrast:   #f6f3ea;

  --bg:                #f6f3ea;
  --bg-dim:            #eee9dd;
  --surface:           #fbf9f3;
  --surface-raised:    #ffffff;
  --surface-invert:    #14120f;

  --text:              #14120f;
  --text-soft:         #5b564c;
  --text-faint:        #8d8776;
  --text-invert:       #f6f3ea;
  --text-invert-soft:  #b3ada0;

  --border:            #ddd6c4;
  --border-strong:     #c9c0a8;
  --border-invert:     #34302a;

  /* Floating nav bar */
  --nav-surface: rgba(255, 255, 255, 0.72);
  --nav-edge:    rgba(255, 255, 255, 0.7);
  --nav-icon:    #5b50c8;
  --logo-filter: none;
  --nav-shadow: 0 2px 8px rgba(20, 18, 15, 0.04),
    0 12px 40px -12px rgba(20, 18, 15, 0.12);

  --radius:            14px;
  --radius-lg:         22px;
  --radius-pill:       999px;

  /* The site's three families. Loaded from index.html; the stacks behind them
     are the fallbacks the browser paints while the webfonts arrive. */
  --font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system,
                  "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-sans:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
                  Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
                  Menlo, Consolas, "Liberation Mono", monospace;

  /* ---- glass ----------------------------------------------------------
     The site's panels are glass over the aura: a blur that lifts colour off
     what is behind, a thin tint so text stays legible, and a lit rim that
     reads as a bevelled edge. */
  --glass-tint:   rgba(255, 255, 255, 0.46);
  --glass-blur:   blur(7px) saturate(160%);
  --glass-rim:    inset 2px 2px 1px 0 rgba(255, 255, 255, 0.62),
                  inset -1px -1px 1px 1px rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 6px 6px rgba(20, 18, 15, 0.14),
                  0 0 24px rgba(20, 18, 15, 0.08);
  --glass-chip:   0 1px 2px rgba(20, 18, 15, 0.06),
                  0 6px 16px -8px rgba(20, 18, 15, 0.18);

  /* ---- derived / non-brand -------------------------------------------- */
  --shadow-sm: 0 1px 2px rgba(20, 18, 15, 0.05);
  --shadow-md: 0 6px 24px rgba(20, 18, 15, 0.08);
  --shadow-lg: 0 20px 60px rgba(20, 18, 15, 0.14);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);

  --ok:      #1c7c4a;
  --ok-soft: #e2f3e9;
  --warn:      #8a5a00;
  --warn-soft: #fdf0d8;
  --danger:      #a52418;
  --danger-soft: #fbe3df;

  --step: 0.35s;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --measure: 62ch;
  --shell-max: 880px;
  --nav-max: 1240px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-soft:     #3a1a12;
    --accent-contrast: #14120f;

    --bg:              #100e0c;
    --bg-dim:          #0b0a09;
    --surface:         #1a1815;
    --surface-raised:  #211e1a;
    --surface-invert:  #f6f3ea;

    --text:             #f2eee4;
    --text-soft:        #a9a294;
    --text-faint:       #7d7669;
    --text-invert:      #14120f;
    --text-invert-soft: #5b564c;

    --border:        #2e2a25;
    --border-strong: #423c34;
    --border-invert: #ddd6c4;

    --nav-surface: rgba(33, 30, 26, 0.72);
    --nav-edge:    rgba(255, 255, 255, 0.08);
    --nav-icon:    #8b8bff;
    --logo-filter: invert(1);
    --nav-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
      0 12px 40px -12px rgba(0, 0, 0, 0.5);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);

    --ok:      #5bd08c;
    --ok-soft: #12291d;
    --warn:      #e0b357;
    --warn-soft: #2e2413;
    --danger:      #ff8a7a;
    --danger-soft: #331714;
  }
}

:root[data-theme="dark"] {
  --accent-soft:     #3a1a12;
  --accent-contrast: #14120f;

  --bg:              #100e0c;
  --bg-dim:          #0b0a09;
  --surface:         #1a1815;
  --surface-raised:  #211e1a;
  --surface-invert:  #f6f3ea;

  --text:             #f2eee4;
  --text-soft:        #a9a294;
  --text-faint:       #7d7669;
  --text-invert:      #14120f;
  --text-invert-soft: #5b564c;

  --border:        #2e2a25;
  --border-strong: #423c34;
  --border-invert: #ddd6c4;

  --nav-surface: rgba(33, 30, 26, 0.72);
  --nav-edge:    rgba(255, 255, 255, 0.08);
  --nav-icon:    #8b8bff;
  --logo-filter: invert(1);
  --nav-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
    0 12px 40px -12px rgba(0, 0, 0, 0.5);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);

  --ok:      #5bd08c;
  --ok-soft: #12291d;
  --warn:      #e0b357;
  --warn-soft: #2e2413;
  --danger:      #ff8a7a;
  --danger-soft: #331714;
}

/* ------------------------------------------------------------------ aura
   The lit backdrop, fixed behind everything. Glass has nothing to refract
   over a flat fill, so this supplies both halves of what it needs: slow
   colour, and a ruled grid whose straight lines visibly bend through it. */
.aura {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aura__blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(130px);
}

.aura__blob--peach {
  left: -12%;
  top: -22%;
  width: 78vh;
  height: 78vh;
  background: rgba(255, 138, 92, 0.2);
  animation: aura-drift 22s ease-in-out infinite;
}

.aura__blob--lilac {
  right: -16%;
  top: -10%;
  width: 64vh;
  height: 64vh;
  background: rgba(111, 99, 232, 0.17);
  animation: aura-drift 29s ease-in-out infinite reverse;
}

.aura__blob--gold {
  left: 24%;
  bottom: -46%;
  width: 56vh;
  height: 56vh;
  background: rgba(232, 160, 32, 0.13);
  animation: aura-drift 26s ease-in-out infinite;
}

.aura__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(20, 18, 15, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 18, 15, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(115% 85% at 50% 12%, #000 18%, transparent 78%);
  mask-image: radial-gradient(115% 85% at 50% 12%, #000 18%, transparent 78%);
}

@keyframes aura-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(4%, -6%, 0) scale(1.12); }
  66%      { transform: translate3d(-5%, 4%, 0) scale(0.94); }
}

@media (prefers-reduced-motion: reduce) {
  .aura__blob { animation: none; }
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  /* Transparent, so the fixed aura behind it is visible. The ground colour
     lives on html; a background here would paint straight over it. */
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

/*
 * Inline icons carry no intrinsic size, so without this any icon whose
 * container has no explicit rule renders at the SVG viewport's full size.
 * Every component rule below overrides this as needed.
 */
svg {
  width: 1em;
  height: 1em;
  flex: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

/*
 * Headings are focused programmatically after a screen change so assistive tech
 * lands in the right place. They are not interactive controls, so they get the
 * focus target without the ring — every real control keeps its ring above.
 */
h1[tabindex="-1"]:focus,
h1[tabindex="-1"]:focus-visible {
  box-shadow: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------------- shell */

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.main {
  flex: 1;
  padding: 40px 0 72px;
}

/* --------------------------------------------------------------- topbar
   Geometry and layering copied from the site's nav, which is a <Glass> pill:
   px-4/pt-3 (md: px-8/pt-4) around a 1440 max-width, and inside it four
   stacked layers — refraction, tint, lit rim, content. Fixed rather than
   sticky, so it floats over the aura the way the landing page's does. */
.glassdefs {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding: 12px 16px 0;
}

@media (min-width: 768px) {
  .topbar { padding: 16px 32px 0; }
}

.topbar__inner {
  max-width: 1440px;
  margin: 0 auto;
}

/* The four layers. */
.glass {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 999px;
  box-shadow: 0 6px 6px rgba(20, 18, 15, 0.14), 0 0 24px rgba(20, 18, 15, 0.08);
}

.glass__refract,
.glass__tint,
.glass__rim {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.glass__refract {
  z-index: 0;
  -webkit-backdrop-filter: blur(7px) saturate(160%);
  backdrop-filter: blur(7px) saturate(160%);
  filter: url(#liquid-glass-refraction);
  isolation: isolate;
}

.glass__tint {
  z-index: 10;
  background: rgba(255, 255, 255, 0.46);
}

.glass__rim {
  z-index: 20;
  box-shadow: inset 2px 2px 1px 0 rgba(255, 255, 255, 0.62),
    inset -1px -1px 1px 1px rgba(255, 255, 255, 0.5);
}

.navbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 12px 12px 24px;
}

@media (min-width: 768px) {
  .navbar { padding-left: 32px; }
}

.brandmark { display: flex; flex: 0 0 auto; }
.brandmark img { display: block; height: 24px; width: auto; filter: var(--logo-filter); }

.sitenav {
  display: none;
  margin: 0 auto;
  align-items: center;
  gap: 32px;
}

@media (min-width: 1024px) {
  .sitenav { display: flex; }
}

.sitenav__link {
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  color: var(--text);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color var(--step) var(--ease);
}

.sitenav__link:hover { color: var(--accent); }

.navbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@media (min-width: 1024px) {
  .navbar__right { margin-left: 0; }
}

.navlocale {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface-raised);
  color: rgba(20, 18, 15, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(20, 18, 15, 0.08);
}

.navlocale svg { width: 10px; height: 6px; }

@media (min-width: 768px) {
  .navlocale { display: inline-flex; }
}

.navcta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--surface-invert);
  color: var(--text-invert);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--step) var(--ease);
}

.navcta:hover { background: var(--accent); }
.navcta svg { width: 14px; height: 14px; }

/* ----------------------------------------------------------------- stage
   Two columns while the quiz is running: the rail holds every piece of state
   and the question gets the rest. One column everywhere else, because the
   entry and result screens have no running state to show. */
.stage {
  /* .shell is a column flexbox, and auto side margins disable the default
     stretch — without an explicit width the stage shrink-wraps its content and
     drifts around the viewport as the questions change length. */
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  /* The bar is fixed, so it no longer holds a place in the flow. */
  padding: 104px 16px 0;
}

@media (min-width: 768px) {
  .stage { padding: 112px 32px 0; }
}

.rail { display: none; }

@media (min-width: 1024px) {
  .stage[data-quiz="true"] {
    display: grid;
    grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
    gap: 72px;
    align-items: start;
  }

  .stage[data-quiz="true"] .rail { display: block; }

  /* The grid column already sets the measure; a second centred max-width
     inside it just floats the question away from the rail. */
  .stage[data-quiz="true"] .main .wrap {
    max-width: none;
    margin: 0;
  }
}

.rail__inner {
  position: sticky;
  top: 124px;
  padding: 28px 0 0;
}

.rail__path {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.rail__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 30px;
}

.progress {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.6s var(--ease);
}

.progress__label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  white-space: nowrap;
}

/* The path, step by step, with what was chosen at each. */
.rail__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.rail__step {
  position: relative;
  padding: 0 0 22px 22px;
}

.rail__step:last-child { padding-bottom: 0; }

.rail__dot {
  position: absolute;
  left: -4px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background var(--step) var(--ease), transform var(--step) var(--ease);
}

.rail__step[data-state="done"] .rail__dot { background: var(--accent); opacity: 0.5; }
.rail__step[data-state="active"] .rail__dot {
  background: var(--accent);
  transform: scale(1.45);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.rail__q {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-faint);
  transition: color var(--step) var(--ease);
}

.rail__step[data-state="active"] .rail__q { color: var(--text); font-weight: 500; }

.rail__a {
  display: block;
  margin-top: 3px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--accent);
}

.rail__estimate {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.rail__estimate-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.rail__estimate-value {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-faint);
  animation: value-in 0.45s var(--ease);
}

.rail__estimate[data-priced="true"] .rail__estimate-value { color: var(--text); }

@keyframes value-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------------- type */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.eyebrow--muted {
  color: var(--text-faint);
}

.eyebrow--pill {
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

h1,
.h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 12px;
  text-wrap: balance;
}

.sub {
  color: var(--text-soft);
  margin: 0 0 30px;
  max-width: var(--measure);
  font-size: 1.02rem;
}

.pathtag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}

/* ----------------------------------------------------------- back button */

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 6px 4px;
  margin: 0 0 20px -4px;
  cursor: pointer;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: 8px;
  transition: color var(--step) var(--ease);
}

.back:hover {
  color: var(--text);
}

.back svg {
  width: 15px;
  height: 15px;
}

/* Restart control on the result screen. */
.tryanother {
  margin-bottom: 22px;
  padding: 10px 20px;
  font-size: 0.9rem;
}

.tryanother svg {
  width: 14px;
  height: 14px;
}

/* ---------------------------------------------------------- option cards */

.options {
  display: grid;
  gap: 10px;
  margin: 0 0 26px;
}

.options--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 20px 22px;
  border: 1px solid rgba(20, 18, 15, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.34);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-rim), 0 1px 2px rgba(20, 18, 15, 0.04);
  cursor: pointer;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease),
    transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.option:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 80, 200, 0.28);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--glass-rim), 0 14px 32px -14px rgba(20, 18, 15, 0.3);
}

.option[aria-checked="true"],
.option[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(91, 80, 200, 0.07);
  box-shadow: var(--glass-rim), 0 0 0 1px var(--accent),
    0 14px 32px -16px rgba(91, 80, 200, 0.5);
}

.option__body {
  min-width: 0;
  flex: 1;
}

.option__label {
  font-weight: 600;
  letter-spacing: -0.01em;
  display: block;
}

.option__desc {
  display: block;
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-top: 3px;
}

.option__check {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: background var(--step) var(--ease), border-color var(--step) var(--ease);
}

.option__check svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  color: var(--accent-contrast);
  transition: opacity var(--step) var(--ease);
}

.option[aria-pressed="true"] .option__check {
  background: var(--accent);
  border-color: var(--accent);
}

.option[aria-pressed="true"] .option__check svg {
  opacity: 1;
}

/* -------------------------------------------------------------- controls */

.controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--surface-invert);
  color: var(--text-invert);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--step) var(--ease), opacity var(--step) var(--ease),
    background var(--step) var(--ease);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn--accent {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn svg {
  width: 15px;
  height: 15px;
}

.controls__note {
  color: var(--text-faint);
  font-size: 0.88rem;
}

/* ------------------------------------------------------------ path cards */

.paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  margin-bottom: 26px;
}

.pathcard {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--glass-tint);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-rim), var(--glass-shadow);
  cursor: pointer;
  transition: border-color var(--step) var(--ease), transform var(--step) var(--ease),
    box-shadow var(--step) var(--ease);
}

.pathcard:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--glass-rim), 0 18px 40px -18px rgba(20, 18, 15, 0.32);
}

/* Locked tracks read as offers that exist rather than as broken buttons. */
.pathcard[aria-disabled="true"] {
  cursor: default;
  opacity: 0.62;
}

.pathcard[aria-disabled="true"]:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--glass-rim), var(--glass-shadow);
}

.pathcard__index {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 1.05rem;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.pathcard__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background var(--step) var(--ease);
}

.pathcard:hover .pathcard__dot {
  background: var(--accent);
}

.pathcard__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(91, 80, 200, 0.15);
  margin-bottom: 16px;
  transition: background var(--step) var(--ease), color var(--step) var(--ease);
}

.pathcard:hover .pathcard__icon {
  background: var(--accent);
  color: var(--accent-contrast);
}

.pathcard__icon svg {
  width: 19px;
  height: 19px;
}

.pathcard__title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.pathcard__quote {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin: 0 0 16px;
}

.pathcard__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.pathcard__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.93rem;
}

.pathcard__cta svg {
  width: 14px;
  height: 14px;
  transition: transform var(--step) var(--ease);
}

.pathcard:hover .pathcard__cta svg {
  transform: translateX(3px);
}

.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-dim);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
}

.footnote {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  margin: 0;
}

/* -------------------------------------------------------------- thinking */

.thinking {
  min-height: 52vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.thinking__dial {
  width: 58px;
  height: 58px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.thinking__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.thinking__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.thinking__step {
  opacity: 0.3;
  transition: opacity var(--step) var(--ease), color var(--step) var(--ease);
}

.thinking__step[data-active="true"] {
  opacity: 1;
  color: var(--text-soft);
}

/* ---------------------------------------------------------------- result */

.result__head {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(120% 140% at 8% 0%, rgba(111, 99, 232, 0.2) 0%, transparent 58%),
    radial-gradient(110% 130% at 100% 100%, rgba(255, 138, 92, 0.22) 0%, transparent 62%),
    rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--text);
  padding: 44px 40px 40px;
  margin-bottom: 12px;
  box-shadow: var(--glass-rim), 0 26px 70px -34px rgba(20, 18, 15, 0.4);
}


.result__eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 12px;
}

.result__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 10px;
  text-wrap: balance;
}

.result__recap {
  color: var(--text-soft);
  margin: 0 0 26px;
  font-size: 0.95rem;
}

.result__price {
  position: relative;
  z-index: 1;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(246, 243, 234, 0.16);
}

.result__pricelabel {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 8px;
}

.result__amount {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 11vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-weight: 700;
  margin: 6px 0 0;
  font-variant-numeric: tabular-nums;
}

.result__amount small {
  font-size: 0.3em;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--text-soft);
  margin-left: 8px;
}

.result__pricenote {
  color: var(--text-soft);
  font-size: 0.88rem;
  margin: 10px 0 0;
}

/* facts row */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 12px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-rim), var(--glass-chip);
}

.fact {
  padding: 22px 24px;
  border: 0;
  border-left: 1px solid rgba(20, 18, 15, 0.08);
  border-radius: 0;
  background: transparent;
}

.fact:first-child {
  border-left: 0;
}

.fact__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 7px;
}

.fact__value {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

/* generic panel */

.panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--glass-tint);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-rim), var(--glass-chip);
  margin-bottom: 16px;
}

.panel__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.getlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
}

.getlist li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.93rem;
}

.getlist svg {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 4px;
  color: var(--accent);
}

.recap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.recap .chip {
  background: var(--bg-dim);
  border: 1px solid var(--border);
}

.fixedline {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.fixedline svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 3px;
}

.disclaimer {
  color: var(--text-faint);
  font-size: 0.84rem;
  margin: 0 0 24px;
  max-width: var(--measure);
}

/* --------------------------------------------------- internal-only badge */

.internal {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 15px 18px;
  margin-bottom: 16px;
  background: var(--bg-dim);
}

.internal__tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 9px;
}

.internal__tag svg {
  width: 12px;
  height: 12px;
}

.internal__row {
  display: flex;
  align-items: baseline;
  gap: 11px;
  flex-wrap: wrap;
}

.internal__verdict {
  font-weight: 700;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
}

.internal__verdict[data-band="comfortable"] {
  background: var(--ok-soft);
  color: var(--ok);
}

.internal__verdict[data-band="stretch"] {
  background: var(--warn-soft);
  color: var(--warn);
}

.internal__verdict[data-band="notYet"] {
  background: var(--danger-soft);
  color: var(--danger);
}

.internal__note {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.internal__meta {
  margin: 9px 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  word-break: break-word;
}

/* ------------------------------------------------------------------ form */

.form {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-bottom: 18px;
}

.form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 7px;
}

.field label span {
  color: var(--text-faint);
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--step) var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-faint);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
  min-height: 88px;
}

.field[data-invalid="true"] input,
.field[data-invalid="true"] textarea {
  border-color: var(--danger);
}

.field__error {
  display: block;
  color: var(--danger);
  font-size: 0.83rem;
  margin-top: 6px;
}

.formerror {
  padding: 13px 16px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
}

/* ------------------------------------------------------------------ done */

.done {
  text-align: center;
  padding: 46px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.done__mark {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  display: grid;
  place-items: center;
}

.done__mark svg {
  width: 22px;
  height: 22px;
}

.done__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.done__body {
  color: var(--text-soft);
  margin: 0 auto;
  max-width: 46ch;
}

/* ------------------------------------------------------------ animations */

.enter {
  animation: enter var(--step) var(--ease) both;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/*
 * Step transitions — a horizontal slide.
 *
 * Outgoing content travels from the middle out to the left and fades; incoming
 * content arrives from the right. Only transform and opacity are animated, so
 * the whole thing runs on the compositor and stays smooth on a weak machine.
 * Durations are paired with EXIT_MS in ui.js and with the progress bar's
 * transition, so bar and content finish together.
 */
.main {
  will-change: transform, opacity;
}

.main.is-leaving {
  animation: slideOutLeft 0.26s cubic-bezier(0.4, 0, 1, 1) both;
  /* The outgoing screen stays in the DOM for the length of this animation
     and was still clickable throughout it. A click landing there registered
     against the question already left behind, advancing the flow without
     answering the one now on screen. */
  pointer-events: none;
}

.main.is-entering {
  animation: slideInRight 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0;
    transform: translate3d(-56px, 0, 0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translate3d(56px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* ---- lead-sent confirmation on the result screen ---- */

.sent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--ok);
  background: var(--ok-soft);
  font-size: 0.93rem;
  color: var(--text);
}

.sent strong {
  font-weight: 700;
}

.sent__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ok);
  color: var(--ok-soft);
  margin-top: 1px;
}

.sent__mark svg {
  width: 12px;
  height: 12px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 760px) {
  .paths,
  .facts,
  .getlist,
  .form__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .options--two {
    grid-template-columns: minmax(0, 1fr);
  }

  .main {
    padding: 28px 0 56px;
  }

  .result__head,
  .panel,
  .form {
    padding: 22px 18px;
  }
}

@media (max-width: 980px) {
  /*
   * The section links drop away, but the brandmark stays and still goes
   * home — the estimator must never be a dead end on a phone.
   */
  .sitenav {
    display: none;
  }

  .brandmark {
    margin-right: auto;
  }

  .navbar {
    padding-left: 20px;
  }
}

@media (max-width: 560px) {
  /* Below this the CTA and the step counter cannot both fit. */
  .navcta,
  .progress__label {
    display: none;
  }

  .navbar {
    gap: 12px;
    padding: 10px 10px 10px 16px;
  }
}

@media (max-width: 420px) {
  :root {
    --gutter: 16px;
  }

  .progress {
    max-width: 92px;
  }

  .brandmark {
    font-size: 0.7rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .controls {
    gap: 10px;
  }
}

/* ------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .option:hover,
  .pathcard:hover,
  .btn:hover:not(:disabled) {
    transform: none;
  }

  /* The slide is decorative — cut it, do not slow it. */
  .main.is-leaving,
  .main.is-entering {
    animation: none !important;
  }

  .progress__bar {
    transition-duration: 0.001ms !important;
  }

  .thinking__dial {
    animation: none;
    border-top-color: var(--accent);
    opacity: 0.7;
  }
}

/* ---------------------------------------------------- unavailable path card
 * Shown, not offered. Kept legible rather than greyed into unreadability —
 * the point is that the reader understands the offer and learns it is not
 * open yet, which a 40%-opacity card fails to communicate.
 */
.pathcard--off {
  position: relative;
  cursor: default;
  opacity: 0.72;
}

.pathcard--off:hover,
.pathcard--off:focus-visible {
  transform: none;
  box-shadow: none;
}

.pathcard--off .pathcard__cta {
  opacity: 0.7;
}

