/* Concept 1, configurator edition. Product-launch minimalism: one lit object
   on a quiet stage, a narrow spec panel, pill selectors. Dark only. */
[hidden] { display: none !important; }

/* Colors live in tokens.css, loaded first. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; background: var(--bg); color: var(--ink); padding: 8px 12px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button { font: inherit; color: inherit; }

/* Header */
.bar {
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 40px); position: relative; z-index: 5;
}
.mark { font-weight: 600; font-size: 15px; letter-spacing: .06em; }
.bar__right { display: flex; align-items: center; gap: 22px; }
.bar__note { font-size: 13px; color: var(--ink-2); }

/* App frame: the stage fills the screen, then yields room to the panel. */
.app {
  display: grid; grid-template-columns: minmax(0, 1fr) 0px;
  height: calc(100svh - 60px); min-height: 600px;
  transition: grid-template-columns .8s cubic-bezier(.65,0,.35,1);
}
.is-quiz .app, .is-result .app { grid-template-columns: minmax(0, 1fr) 460px; }

.stage {
  position: relative; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(ellipse 60% 55% at 50% 52%, var(--spot) 0%, var(--spot-edge) 100%);
  transition: background .4s ease;
}
/* Landing: the micro1 stat is the hero; the cylinder waits until the questions start. */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 40px 20px 56px; max-width: 760px; position: relative;
}
.hero::before {
  content: ""; position: absolute; left: 50%; top: 46%; width: 640px; height: 360px; margin: -180px 0 0 -320px; z-index: -1;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--strata-docs) 16%, transparent), transparent 65%); pointer-events: none;
}
h1 { margin: 0 0 34px; font: 500 clamp(32px, 4.4vw, 50px)/1.1 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif; letter-spacing: -.025em; max-width: 22ch; text-wrap: balance; }
.stat { margin: 0 0 30px; }
.stat__range {
  margin: 0; font: 600 clamp(54px, 9vw, 108px)/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stat__range span { color: var(--ink); }
.stat__range { color: var(--ink-3); }
.stat__line { margin: 14px auto 0; max-width: 34em; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.btn.btn--hero { height: 52px; min-width: 260px; font-size: 16px; border-radius: 6px; }
.intro__meta { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }
.hero__fine { margin: 22px 0 0; max-width: 30em; font-size: 12px; color: var(--ink-3); }
.is-quiz .hero, .is-result .hero { display: none; }
.is-intro .rig { display: none; }
.rig { animation: rigIn .6s ease both; }
@keyframes rigIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 24px;
  border-radius: 4px; border: 0; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
  transition: background-color .2s, color .2s, opacity .2s;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:disabled { opacity: .35; cursor: default; }
.btn--secondary { background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--ink); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line); }
.btn--secondary:hover { background: var(--bg-2); }
.btn--text { background: none; color: var(--ink-2); padding: 0 8px; }
.btn--text:hover { color: var(--ink); }
.btn--wide { width: 100%; height: 48px; font-size: 15px; }

/* The core sample: a lit cylinder built from stacked layers. */
/* --kbase is the normal layer scale; app.js derives --k from it so only a
   qualifying company fills the tube to the top. */
.rig {
  --w: 156px; --e: 34px; --kbase: 1.6; --k: 1.6;
  position: relative; width: var(--w); height: 470px; margin-top: 30px;
}
.ghost {
  position: absolute; inset: 20px 0 0; border-radius: calc(var(--w) / 2) / calc(var(--e) / 2);
  border: 1px dashed var(--glass); overflow: hidden; transition: opacity .5s;
}
.ghost::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--e);
  border-radius: 50%; border-bottom: 1px dashed var(--glass);
}
.ghost__scan {
  position: absolute; left: 0; right: 0; height: 2px; top: 50%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 70%, transparent), transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 70%, transparent); animation: scan 3.6s ease-in-out infinite;
}
@keyframes scan { 0%, 100% { top: 12%; } 50% { top: 88%; } }
.has-layers .ghost { opacity: .5; }
.has-layers .ghost__scan { display: none; }

.stack { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column-reverse; }
.layer {
  --shade: linear-gradient(90deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,.1) 16%, rgba(255,255,255,.28) 33%, rgba(255,255,255,.06) 50%, rgba(0,0,0,.14) 76%, rgba(0,0,0,.5) 100%);
  position: relative; height: 0; flex: none;
  background: var(--shade), var(--tex, linear-gradient(transparent, transparent)), var(--c);
  transition: height .8s cubic-bezier(.2,.9,.25,1);
}
.layer.in { height: calc(var(--s) * var(--k) * 1px); }
/* Each layer's curved lower edge overlaps the one below, like strata seen on a real core. */
.layer::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(var(--e) / -2); height: var(--e);
  border-radius: 50%; background: inherit; z-index: 0;
}
.layer:last-child::before {
  content: ""; position: absolute; left: 0; right: 0; top: calc(var(--e) / -2); height: var(--e); z-index: 2;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 40%, rgba(255,255,255,.45), rgba(255,255,255,0) 70%), color-mix(in srgb, var(--c) 78%, #fff);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,.18);
}
.floor {
  position: absolute; left: -40%; right: -40%; bottom: -26px; height: 44px; z-index: -1;
  background: radial-gradient(ellipse at center, var(--floor), transparent 70%);
}

.t-bedrock { --c: var(--strata-bedrock); --tex: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 6px, transparent 6px 12px); }
.t-people { --c: var(--strata-people); --tex: radial-gradient(circle at 3px 3px, rgba(0,0,0,.18) 1.2px, transparent 1.5px) 0 0/8px 8px; }
.t-industry { --tex: linear-gradient(transparent, transparent); }
.t-comms { --c: var(--strata-comms); --tex: repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 1px, transparent 1px 5px); }
.t-docs { --c: var(--strata-docs); --tex: repeating-linear-gradient(0deg, rgba(255,255,255,.35) 0 1px, transparent 1px 4px); }
.t-struct { --c: var(--strata-struct); --tex: linear-gradient(90deg, rgba(0,0,0,.14) 1px, transparent 1px) 0 0/8px 8px; }
.t-history { --c: var(--strata-history); --tex: repeating-linear-gradient(0deg, rgba(255,255,255,.1) 0 1px, transparent 1px 3px); }
.t-volume { --c: var(--strata-volume); --tex: radial-gradient(rgba(0,0,0,.14) .8px, transparent 1px) 0 0/4px 4px; }

/* Spec labels with hairline leaders, set to the right of the sample. */
.labels { position: absolute; left: calc(100% + 18px); bottom: 0; width: 230px; height: 100%; pointer-events: none; }
.lbl {
  position: absolute; left: 0; display: flex; align-items: center; gap: 10px; white-space: nowrap;
  opacity: 0; transform: translateX(-6px); transition: opacity .4s ease .35s, transform .4s ease .35s, bottom .5s ease;
}
.lbl.in { opacity: 1; transform: none; }
.lbl::before { content: ""; width: 28px; height: 1px; background: var(--ink-3); }
.lbl span { display: block; font-size: 11px; color: var(--ink-3); line-height: 1.2; }
.lbl b { display: block; font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.25; }

/* Panel */
.panel {
  background: var(--bg); display: flex; flex-direction: column; min-width: 0;
  border-left: 1px solid var(--line); animation: panelIn .7s .25s both;
  min-height: 0; overflow: hidden;
}
@keyframes panelIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.panel__inner { flex: 1; padding: 36px 40px 24px; overflow-y: auto; }
.segs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 28px; }
.segs span { height: 3px; border-radius: 2px; background: var(--bg-3); transition: background .4s; }
.segs span.done { background: var(--ink); }
.step { margin: 0 0 6px; font-size: 13px; color: var(--ink-3); }
.question h2 { margin: 0 0 6px; font: 500 26px/1.18 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif; letter-spacing: -.015em; }
.question .hint { margin: 0 0 24px; color: var(--ink-2); font-size: 14px; }
.question { animation: qIn .45s ease both; }
@keyframes qIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.opts { display: grid; gap: 10px; }
.opt {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 54px;
  padding: 12px 18px; border: 0; border-radius: 10px; background: var(--bg-2); text-align: left;
  font-size: 15px; font-weight: 500; cursor: pointer; box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow .2s, background-color .2s;
}
.opt:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.opt::after {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--ink-3); transition: box-shadow .2s;
}
.opt[aria-checked="true"] { background: var(--bg); box-shadow: inset 0 0 0 2px var(--accent); }
.opt[aria-checked="true"]::after { box-shadow: inset 0 0 0 5.5px var(--accent); }

.fam { margin: 0 0 20px; padding: 0; border: 0; }
.fam legend { padding: 0; margin-bottom: 10px; font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 0; border-radius: 999px; padding: 9px 15px; background: var(--bg-2); font-size: 14px; font-weight: 500; cursor: pointer;
  box-shadow: inset 0 0 0 1px transparent; transition: background-color .2s, color .2s, box-shadow .2s;
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.hint-gap { height: 18px; }
.find input {
  width: 100%; height: 42px; margin: 0 0 18px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--bg-2); color: var(--ink);
  font: inherit; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line);
}
.find input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.find__empty { margin: 0 0 18px; font-size: 13px; color: var(--ink-2); }
.meter { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; padding: 12px 14px; border-radius: 10px; background: var(--bg-2); }
.meter__segs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; flex: 1; max-width: 168px; }
.meter__segs span { height: 6px; border-radius: 3px; background: var(--bg-3); transition: background-color .3s; }
.meter__segs span.on { background: var(--ink); }
.meter--full .meter__segs span { background: var(--accent); }
.meter__text { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.meter--full .meter__text { color: var(--accent); }

.panel__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 40px; border-top: 1px solid var(--line); background: var(--bg);
}
.panel__bar .btn--primary { min-width: 160px; }
.is-result .panel__bar { display: none; }

/* Result */
.result:focus { outline: none; }
.result { animation: qIn .5s ease both; }
.result__kicker { margin: 0 0 6px; font-size: 13px; color: var(--ink-3); }
.result h2 { margin: 0 0 10px; font: 500 30px/1.12 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif; letter-spacing: -.02em; }
.result__lede { margin: 0 0 26px; color: var(--ink-2); font-size: 14px; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 28px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs div { text-align: center; }
.specs div + div { border-left: 1px solid var(--line); }
.specs b { display: block; font: 500 26px/1.1 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif; letter-spacing: -.02em; }
.specs span { font-size: 12px; color: var(--ink-2); }
.result h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.famlist { list-style: none; margin: 0 0 26px; padding: 0; }
.famlist li { display: grid; grid-template-columns: 14px 1fr; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.famlist .dot { margin-top: 6px; }
.famlist b { font-weight: 500; }
.famlist small { grid-column: 2; color: var(--ink-2); font-size: 13px; }
.checks { list-style: none; margin: 0 0 26px; padding: 0; }
.checks li { display: flex; gap: 12px; padding: 8px 0; font-size: 14px; }
.checks svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.checks .ok svg { stroke: var(--accent); }
.checks .no svg { stroke: var(--danger); }
.checks .no { color: var(--ink-2); }
.cta { background: var(--bg-2); border-radius: 12px; padding: 22px; margin: 0 0 16px; }
.cta h3 { font-size: 17px; margin-bottom: 6px; }
.cta p { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }
.cta .fine { margin: 12px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.cta a.link { color: var(--accent); font-weight: 500; text-decoration: none; }
.retake { background: none; border: 0; padding: 0; color: var(--ink-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.disclosure { border-top: 1px solid var(--line); padding: 24px clamp(16px, 3vw, 40px) 72px; font-size: 12px; color: var(--ink-3); }
.disclosure p { max-width: 74em; margin: 0 0 6px; }
.disclosure strong { color: var(--ink-2); font-weight: 600; }

@media (max-width: 1100px) {
  .is-quiz .app, .is-result .app { grid-template-columns: minmax(0, 1fr) 400px; }
  .labels { display: none; }
}
@media (max-width: 820px) {
  .bar__note { display: none; }
  .app, .is-quiz .app, .is-result .app { grid-template-columns: 1fr; transition: none; height: auto; min-height: 0; }
  .panel { overflow: visible; }
  .stage { min-height: calc(100svh - 60px); }
  .is-quiz .stage, .is-result .stage { min-height: 300px; }
  .rig { --w: 120px; --e: 26px; --kbase: 1; height: 420px; }
  .is-quiz .rig, .is-result .rig { --w: 92px; --e: 20px; --kbase: .8; height: 240px; margin-top: 10px; }
  /* A qualifying phone gets the whole screen for the fill, then the pop-up. */
  .is-celebrate .stage { min-height: calc(100svh - 60px); }
  .is-celebrate .rig { --w: 124px; --e: 26px; height: 440px; margin-top: 30px; }
  .is-celebrate .panel { display: none; }
  .hero { padding: 28px 20px 72px; }
  .btn.btn--hero { width: 100%; max-width: 360px; min-width: 0; }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .panel__inner { padding: 26px 20px 20px; overflow: visible; }
  .panel__bar { position: sticky; bottom: 0; padding: 12px 20px calc(12px + 52px); }
}
/* Qualifying moment */
.halo, .ring, .badge { position: absolute; pointer-events: none; }
.halo {
  left: 50%; top: 50%; width: 520px; height: 620px; margin: -310px 0 0 -260px; z-index: -2; opacity: 0;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--accent) 55%, transparent), transparent 62%);
}
.ring {
  left: 0; right: 0; bottom: calc(var(--e) / -2); height: var(--e); border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0;
}
.badge {
  left: 50%; top: -38px; display: flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 14px 7px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 600; opacity: 0; transform: translate(-50%, 8px) scale(.9);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 45%, transparent);
}
.badge svg { width: 15px; height: 15px; fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.stack::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.6) 50%, transparent 65%) 0 0 / 300% 100% no-repeat;
}
.rig.celebrate { animation: lift 1.6s cubic-bezier(.2,.9,.2,1) both; }
.rig.celebrate .halo { animation: halo 2.4s ease-out forwards; }
.rig.celebrate .ring { animation: ring 1.2s ease-out .15s; }
.rig.celebrate .badge { animation: badge .5s cubic-bezier(.3,1.5,.5,1) .55s forwards; }
.rig.celebrate .stack::after { animation: sheen 1.1s ease-in-out .1s; }
.rig.celebrate .ghost { opacity: 0; }
@keyframes lift { 0% { transform: none; } 35% { transform: translateY(-18px); } 100% { transform: translateY(-8px); } }
@keyframes halo { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: .35; } }
@keyframes ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
@keyframes badge { to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes sheen { 0% { opacity: 1; background-position: 100% 0; } 100% { opacity: 1; background-position: 0 0; } }
.spark { position: absolute; left: 50%; top: 0; width: 7px; height: 7px; margin: -3px; border-radius: 2px; pointer-events: none; z-index: 4; }

/* Phone pop-up */
.pop {
  border: 0; padding: 30px 22px 22px; width: min(92vw, 420px); max-height: 88svh; overflow: auto;
  border-radius: 18px; background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.pop:focus { outline: none; }
.pop[open] { animation: popIn .45s cubic-bezier(.3,1.4,.5,1); }
.pop::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
.pop__close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg-2); cursor: pointer; display: grid; place-items: center; }
.pop__close svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; }
.pop__mark { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; margin: 0 0 16px; box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 50%, transparent); }
.pop__mark svg { width: 26px; height: 26px; fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pop h2 { margin: 0 0 8px; font: 500 26px/1.15 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif; letter-spacing: -.015em; }
.pop .result__lede { margin: 0 0 20px; color: var(--ink-2); font-size: 14px; }
/* Pre-qualified pop-up: a copper light circles the rim, a warm glow breathes around it, and
   the Continue button pulses so the next step is the obvious one. */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.pop--win {
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    conic-gradient(from var(--spin),
      color-mix(in srgb, var(--accent) 15%, transparent) 0deg,
      var(--accent-hover) 50deg,
      color-mix(in srgb, var(--accent) 15%, transparent) 130deg,
      color-mix(in srgb, var(--accent) 15%, transparent) 180deg,
      var(--accent) 230deg,
      color-mix(in srgb, var(--accent) 15%, transparent) 310deg) border-box;
}
.pop--win[open] {
  animation:
    popIn .45s cubic-bezier(.3,1.4,.5,1),
    rimSpin 3.2s linear infinite,
    winGlow 2.2s ease-in-out .45s infinite alternate;
}
@keyframes rimSpin { to { --spin: 360deg; } }
@keyframes winGlow {
  from { box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 28px 0 color-mix(in srgb, var(--accent) 22%, transparent); }
  to { box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 72px 8px color-mix(in srgb, var(--accent) 42%, transparent); }
}
.pop--win .pop__mark { animation: markIn .6s cubic-bezier(.3,1.6,.5,1) .2s both; }
@keyframes markIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.pop--win [data-apply] { animation: ctaPulse 2.2s ease-out 1s infinite; }
@keyframes ctaPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .pop--win { box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 50px 4px color-mix(in srgb, var(--accent) 35%, transparent); }
}

/* Pre-qualified hand-off: what happens next at micro1, then the referral button. */
.next { list-style: none; counter-reset: n; margin: 0 0 22px; padding: 0; }
.next li { counter-increment: n; position: relative; padding: 10px 0 10px 38px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.next li::before { content: counter(n); position: absolute; left: 0; top: 9px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--accent); font-size: 12px; font-weight: 600; }
.next b { color: var(--ink); font-weight: 600; }
#resultBody .fine { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  .rig.celebrate .halo { opacity: .35; }
  .rig.celebrate .badge { opacity: 1; transform: translate(-50%, 0); }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.disclosure a { color: var(--ink-2); }

/* Landing scroll: micro1's published program details, credited. Only on the intro screen. */
.btn.btn--hero { box-shadow: none; font-weight: 600; }
.is-quiz .more, .is-result .more { display: none; }
.more { padding: 0 clamp(20px, 5vw, 64px); }
.sec { max-width: 860px; margin: 0 auto; padding: clamp(64px, 10vw, 120px) 0 0; }
.sec h2 { margin: 0 0 18px; font: 500 clamp(28px, 3.6vw, 42px)/1.12 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif; letter-spacing: -.022em; max-width: 24ch; text-wrap: balance; }
.sec p { color: var(--ink-2); font-size: 17px; line-height: 1.6; max-width: 38em; margin: 0; }
.sec .sec__lede { margin: 0 0 36px; }
.sec .sec__src { margin: 22px 0 0; font-size: 12px; color: var(--ink-3); }
.sec--why h2 { max-width: 20ch; }

/* Tiers drawn as core-sample strata: thicker band, bigger tier. */
.strata { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.strata__band { display: grid; grid-template-columns: minmax(180px, 250px) 1fr; align-items: center; gap: 24px; padding: 0 28px; }
.strata__band b { font: 600 clamp(22px, 2.6vw, 30px)/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strata__band span { color: var(--ink-2); font-size: 15px; }
.strata__band--1 { min-height: 84px; background: linear-gradient(90deg, rgba(0,0,0,.25), transparent), var(--tier-1); }
.strata__band--2 { min-height: 116px; background: linear-gradient(90deg, rgba(0,0,0,.25), transparent), var(--tier-2); }
.strata__band--3 { min-height: 150px; background: linear-gradient(90deg, rgba(0,0,0,.28), transparent), linear-gradient(90deg, rgba(0,0,0,.12) 1px, transparent 1px) 0 0/8px 8px, var(--tier-3); }
.strata__band--3 span { color: var(--tier-3-ink); }
.strata__band--2 span { color: var(--tier-2-ink); }

.depts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.depts div { padding: 22px 24px 24px 0; border-bottom: 1px solid var(--line); }
.depts dt { font-weight: 600; font-size: 16px; margin: 0 0 6px; }
.depts dd { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; max-width: 24em; }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { counter-increment: s; position: relative; padding: 22px 0 22px 64px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 18px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--ink-3); color: var(--ink); font-size: 14px; font-weight: 600; }
.steps b, .facts b { color: var(--ink); font-weight: 600; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.facts li { color: var(--ink-2); font-size: 15px; line-height: 1.55; padding-left: 18px; border-left: 2px solid color-mix(in srgb, var(--c, var(--accent)) 80%, #fff); }
.facts b { display: block; margin: 0 0 4px; font-size: 16px; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-size: 17px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 22px; font-size: 15px; }

.sec--end { text-align: center; padding-bottom: clamp(80px, 12vw, 140px); display: flex; flex-direction: column; align-items: center; }
.sec--end h2 { margin-bottom: 28px; }

@media (max-width: 820px) {
  .strata__band { grid-template-columns: 1fr; gap: 6px; padding: 20px 22px; }
  .depts { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .depts { grid-template-columns: 1fr; }
  .sec p { font-size: 16px; }
}

/* Scroll core sample: text on the left, a sticky cylinder that gains one stratum per section. */
.more__grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: clamp(32px, 6vw, 96px); max-width: 1120px; margin: 0 auto; }
.more__body .sec { max-width: 720px; margin: 0; }
.srig-wrap { position: sticky; top: calc(50vh - 230px); align-self: start; height: 460px; margin-top: clamp(64px, 10vw, 120px); display: flex; flex-direction: column; align-items: center; }
.srig { --w: 120px; --e: 26px; --k: 1; position: relative; width: var(--w); height: 400px; }
.srig .ghost { inset: 14px 0 0; }
.srig .layer { transition: height .9s cubic-bezier(.2,.9,.25,1); }
.srig__lbl { margin: 30px 0 0; min-height: 1.4em; font-size: 13px; color: var(--ink-2); text-align: center; transition: opacity .3s; }
.srig.full .stack::after { animation: sheen 1.3s ease-in-out .5s; }

/* Each section heading carries a chip of its stratum; it lights up when that layer lands. */
.sec[data-stratum] h2::before {
  content: ""; display: block; width: 34px; height: 10px; margin: 0 0 18px; border-radius: 3px;
  background: var(--tex, linear-gradient(transparent, transparent)), var(--c); opacity: .25;
  transform: scaleX(.6); transform-origin: left; transition: opacity .6s, transform .6s cubic-bezier(.2,.9,.25,1);
}
.sec[data-stratum].is-in h2::before { opacity: 1; transform: none; }

/* A slow drift in the hero glow, so the landing never sits perfectly still. */
.hero::before { animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift {
  0% { transform: translate(-6%, -4%) scale(1); opacity: .85; }
  50% { transform: translate(5%, 3%) scale(1.12); opacity: 1; }
  100% { transform: translate(-3%, 6%) scale(.96); opacity: .8; }
}

@media (max-width: 960px) {
  .more__grid { grid-template-columns: minmax(0, 1fr); }
  /* On narrow screens the sample shrinks into a corner and follows you down the page. */
  .srig-wrap {
    position: fixed; top: auto; right: 14px; bottom: 18px; height: auto; margin: 0; z-index: 8;
    padding: 12px 10px 8px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 75%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line);
    opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s;
  }
  .in-more .srig-wrap { opacity: 1; transform: none; }
  .srig { --w: 34px; --e: 9px; --k: .27; height: 112px; }
  .srig .ghost { inset: 6px 0 0; }
  .srig .floor { display: none; }
  .srig__lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
  .srig .layer, .sec[data-stratum] h2::before { transition: none; }
}

/* Floating pill header: logo only, hugging its content. The CTA slides out of it once the
   hero's own button scrolls away, so the pill grows instead of jumping. */
.bar { height: 0; padding: 0; display: block; }
.pill {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 12;
  height: 46px; padding: 0 16px; display: flex; align-items: center;
  border-radius: 999px; background: color-mix(in srgb, var(--pill-bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 30px rgba(0,0,0,.35);
  transition: padding .35s cubic-bezier(.2,.9,.25,1);
}
.show-cta .pill { padding-right: 5px; }
.mark { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; }
.mark__icon { width: 13px; height: 19px; }
.pill__cta {
  height: 36px; max-width: 0; margin-left: 0; padding: 0; overflow: hidden; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: max-width .35s cubic-bezier(.2,.9,.25,1), padding .35s cubic-bezier(.2,.9,.25,1), margin .35s, opacity .25s, background .2s;
}
.show-cta .pill__cta { max-width: 180px; margin-left: 18px; padding: 0 16px; opacity: 1; pointer-events: auto; }
.is-quiz .pill__cta, .is-result .pill__cta { display: none; }
.app { height: 100svh; }

/* Every "Get your estimate" button is Liquid Glass in the current Apple sense: nearly clear,
   a hairline rim lit from the top left, a faint inner glow, floating on a soft shadow, and a
   light that follows the pointer (app.js sets --mx/--my). No gloss band, no bevel. */
.btn.btn--hero, .pill__cta {
  --mx: 50%; --my: 0%;
  position: relative; overflow: hidden; isolation: isolate; border-radius: 999px; color: #fff;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(12px) saturate(180%) brightness(1.08); -webkit-backdrop-filter: blur(12px) saturate(180%) brightness(1.08);
  box-shadow:
    inset 0 0 0 .5px rgba(255,255,255,.28),
    inset 1.5px 1.5px 0 -1px rgba(255,255,255,.75),
    inset -1.5px -1.5px 0 -1px rgba(255,255,255,.22),
    inset 0 0 16px rgba(255,255,255,.05),
    0 8px 30px rgba(0,0,0,.30);
}
.btn.btn--hero::before, .pill__cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(140px circle at var(--mx) var(--my), rgba(255,255,255,.22), transparent 65%);
  transition: opacity .4s;
}
.btn.btn--hero:hover::before, .pill__cta:hover::before { opacity: 1; }
.btn.btn--hero:hover { background: rgba(255,255,255,.10); }
.btn.btn--hero:active, .pill__cta:active { transform: scale(.98); }

/* Hero: a faint warm tan wash, the color of the core's document layer, drifting under the stat. */
.hero::before { background: radial-gradient(ellipse at center, color-mix(in srgb, var(--strata-docs) 16%, transparent), transparent 65%); width: 760px; height: 440px; margin: -220px 0 0 -380px; }
.is-intro .stage {
  background:
    radial-gradient(ellipse 55% 45% at 30% 20%, color-mix(in srgb, var(--strata-docs) 10%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 45% at 78% 82%, color-mix(in srgb, var(--accent-deep) 5%, transparent), transparent 70%),
    radial-gradient(ellipse 60% 55% at 50% 52%, var(--spot) 0%, var(--spot-edge) 100%);
}

/* The pill floats, so the stage (and its glow) runs to the very top of the page. */
.stage { padding-top: 60px; }
.panel__inner { padding-top: 84px; }
@media (max-width: 820px) {
  .stage { min-height: 100svh; padding-top: 70px; }
  .is-quiz .stage, .is-result .stage { min-height: 300px; }
  .is-celebrate .stage { min-height: 100svh; }
  .panel__inner { padding-top: 26px; }
}

/* Landing entrance: one soft sequence, top to bottom. Opacity and a short rise only, with a
   long, gentle ease; the range arrives as one piece rather than in fragments. */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pillIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes glowIn { from { opacity: 0; } to { opacity: 1; } }
.pill { animation: pillIn 1.2s cubic-bezier(.22,.61,.36,1) .1s both; }
.hero h1 { animation: rise 1.3s cubic-bezier(.22,.61,.36,1) .2s both; }
.stat__range .stat__to { color: var(--ink-3); }
.hero .stat__range { animation: rise 1.4s cubic-bezier(.22,.61,.36,1) .45s both; }
.hero .stat__line { animation: rise 1.3s cubic-bezier(.22,.61,.36,1) .75s both; }
.hero #start { animation: rise 1.3s cubic-bezier(.22,.61,.36,1) .95s both; }
.hero .hero__fine { animation: rise 1.3s cubic-bezier(.22,.61,.36,1) 1.1s both; }

/* Scroll reveals: each section's pieces drift up softly, one after another, as they enter. */
.rv { opacity: 0; transform: translateY(16px); transition: opacity 1s cubic-bezier(.22,.61,.36,1), transform 1s cubic-bezier(.22,.61,.36,1); transition-delay: calc(var(--i, 0) * 80ms); }
.rv.in { opacity: 1; transform: none; }
.hero::before { animation: glowIn 2s ease-out both, drift 14s ease-in-out 2s infinite alternate; }
/* The header CTA is the same glass, tinted copper so it stands out while floating. */
.pill__cta {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 88%, transparent);
  box-shadow:
    inset 0 0 0 .5px rgba(255,226,210,.55),
    inset 1.5px 1.5px 0 -1px rgba(255,240,232,.95),
    inset -1.5px -1.5px 0 -1px rgba(255,220,200,.35),
    inset 0 0 14px rgba(255,236,226,.18),
    0 6px 20px color-mix(in srgb, var(--accent-deep) 32%, transparent);
}
.pill__cta:hover { background: color-mix(in srgb, var(--accent-hover) 92%, transparent); }

/* "Other" reads as a catch-all: dashed outline until picked. */
.chip--other:not([aria-pressed="true"]) { background: transparent; outline: 1px dashed var(--ink-3); outline-offset: -1px; }
