@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Tiro Devanagari Hindi"; src: url("fonts/tiro-devanagari-hindi.woff2") format("woff2"); font-display: swap; }

:root {
  --brand: #0f5c4d;
  --accent: #b4540a;
  --deep: color-mix(in srgb, var(--brand) 52%, #04100c);
  --deeper: color-mix(in srgb, var(--brand) 26%, #030a08);
  --gold: #f2b54a;
  --ink: #17201c;
  --muted: #5d675f;
  --line: #e4dece;
  --paper: #f6f1e6;
  --card: #fffdf8;
  --ok: #12804a;
  --ok-bg: #e2f4e8;
  --wait: #8a5a00;
  --wait-bg: #fff1cf;
  --no: #8b2b2b;
  --no-bg: #f6e7e4;
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: "Fraunces", "Tiro Devanagari Hindi", Georgia, serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  font-family: var(--text);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.12; margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 560; letter-spacing: -0.02em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ---- Page progress: how many questions are answered. ---- */
.page-progress { position: fixed; inset: 0 0 auto; height: 4px; z-index: 30; pointer-events: none; }
.page-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--accent)); box-shadow: 0 0 14px var(--gold); transition: width .6s var(--ease); border-radius: 0 4px 4px 0; }

/* ---- The dark stage: header, hero and the scheme wheel. ---- */
.stage {
  position: relative; overflow: hidden; color: #f4efe2; isolation: isolate;
  background:
    radial-gradient(900px 620px at 82% 38%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 62%),
    radial-gradient(760px 560px at 8% 0%, color-mix(in srgb, var(--brand) 85%, #fff 0%), transparent 66%),
    linear-gradient(160deg, var(--deep), var(--deeper));
  border-radius: 0 0 44px 44px;
}
.stage::before {
  /* Fine grain, so the gradients do not band. */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .22; mix-blend-mode: overlay; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.2px); background-size: 4px 4px;
}
.top {
  max-width: 1240px; margin: 0 auto; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { text-decoration: none; color: inherit; font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 12px; letter-spacing: .01em; }
.brand-mark { font-family: "Tiro Devanagari Hindi", var(--display); color: var(--deeper); background: linear-gradient(135deg, #ffe2a6, var(--gold)); padding: 4px 14px 2px; border-radius: 999px; font-size: 1.15rem; font-weight: 400; box-shadow: 0 6px 22px rgba(242, 181, 74, .35); }
.top nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.top nav a { text-decoration: none; font-weight: 600; color: inherit; padding: 8px 14px; border-radius: 999px; transition: background .25s; }
.top nav a:hover { background: rgba(255, 255, 255, .12); }
.sound { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); color: inherit; padding: 8px 14px; border-radius: 999px; font-size: .9rem; }
.sound:hover { background: rgba(255,255,255,.16); }
.sound-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.sound-bars i { width: 3px; background: var(--gold); border-radius: 2px; height: 30%; animation: bars 1s ease-in-out infinite; }
.sound-bars i:nth-child(2) { animation-delay: .2s; }
.sound-bars i:nth-child(3) { animation-delay: .4s; }
.sound[aria-pressed="false"] .sound-bars i { animation: none; background: rgba(255,255,255,.45); }
@keyframes bars { 50% { height: 100%; } }

.hero {
  position: relative; max-width: 1240px; margin: 0 auto; padding: 36px 24px 20px;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 36px; align-items: center;
}
.hero-word {
  position: absolute; left: -2%; bottom: -16%; z-index: -1; pointer-events: none; white-space: nowrap;
  font-family: "Tiro Devanagari Hindi", serif; font-size: clamp(9rem, 26vw, 24rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .09);
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #ffe2a6; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); }
.pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #6ee7a4; box-shadow: 0 0 0 0 rgba(110,231,164,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(110,231,164,0); } 100% { box-shadow: 0 0 0 0 rgba(110,231,164,0); } }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); font-weight: 520; text-wrap: balance; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: rgba(244, 239, 226, .8); margin: 22px 0 28px; max-width: 34em; }
.hero-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin: 0 0 30px; }
.cta {
  position: relative; overflow: hidden; display: inline-flex; gap: 12px; align-items: center; text-decoration: none; font-weight: 700; font-size: 1.05rem;
  color: var(--deeper); background: linear-gradient(135deg, #ffe2a6, var(--gold)); padding: 15px 26px; border-radius: 999px;
  box-shadow: 0 14px 40px rgba(242, 181, 74, .35); transition: transform .3s var(--ease), box-shadow .3s;
}
.cta:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 20px 50px rgba(242, 181, 74, .5); }
.cta span { transition: transform .3s var(--ease); }
.cta:hover span { transform: translateX(5px); }
.cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%); transform: translateX(-120%); animation: sheen 4.5s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.ghost { color: rgba(244,239,226,.85); font-weight: 600; }
.promises { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.promises li { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px); font-size: .9rem; color: rgba(244,239,226,.78); transition: transform .3s var(--ease), background .3s; }
.promises li:hover { transform: translateY(-4px); background: rgba(255,255,255,.1); }
.promises strong { display: block; color: #ffe2a6; font-family: var(--display); font-size: 1.15rem; font-weight: 560; margin-bottom: 4px; }
.scope { max-width: 1240px; margin: 0 auto; padding: 8px 24px 34px; color: rgba(244,239,226,.55); font-size: .9rem; }

/* Entrance: the hero's parts rise in turn. */
.hero-copy > *, .hero-wheel { animation: rise .9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }
.hero-wheel { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }

/* ---- The scheme wheel. ---- */
.hero-wheel { display: grid; justify-items: center; gap: 10px; }
.wheel-frame { position: relative; width: min(100%, 460px); aspect-ratio: 1; filter: drop-shadow(0 30px 60px rgba(0,0,0,.35)); }
.wheel-frame::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gold) 36%, transparent), transparent 68%); animation: glow 5s ease-in-out infinite; }
@keyframes glow { 50% { transform: scale(1.12); opacity: .7; } }
#wheel { position: relative; width: 100%; height: 100%; overflow: visible; }
.wheel-outer { animation: spin 140s linear infinite; transform-origin: 0 0; }
.wheel-middle { animation: spin 90s linear infinite reverse; transform-origin: 0 0; }
.wheel-rings { animation: spin 220s linear infinite; transform-origin: 0 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.petal { cursor: pointer; stroke-width: 1.4; transition: fill .7s var(--ease), stroke .7s, opacity .7s, filter .5s; animation: bloom .9s var(--ease) both; animation-delay: calc(var(--i) * 28ms + .3s); }
@keyframes bloom { from { opacity: 0; } }
.petal:hover { filter: brightness(1.35) drop-shadow(0 0 8px rgba(255,255,255,.6)); }
.petal-needs_info { fill: rgba(242, 181, 74, .2); stroke: rgba(242, 181, 74, .75); }
.petal-eligible { fill: #46d68b; stroke: #c8ffe0; filter: drop-shadow(0 0 7px rgba(70, 214, 139, .85)); }
.petal-not_eligible { fill: rgba(255,255,255,.035); stroke: rgba(255,255,255,.16); }
.leaf { fill: rgba(255, 226, 166, .14); stroke: rgba(255, 226, 166, .5); stroke-width: 1; }
.ring { fill: none; stroke: rgba(255,255,255,.2); stroke-width: 1; }
.ring-dots { stroke-dasharray: 1 11; stroke-width: 3; stroke-linecap: round; stroke: rgba(255, 226, 166, .5); }
.ring-dash { stroke-dasharray: 5 7; }
.wheel-core { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.wheel-number { font-family: var(--display); font-size: clamp(3rem, 7vw, 4.6rem); font-weight: 600; line-height: .9; color: #fff; text-shadow: 0 0 34px rgba(70, 214, 139, .8); display: inline-block; }
.wheel-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(244,239,226,.75); margin-top: 6px; }
.wheel-caption { min-height: 3em; max-width: 30em; margin: 0; text-align: center; font-size: .9rem; color: rgba(244,239,226,.72); }
.legend { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center; }
.legend li { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); font-size: .88rem; }
.legend li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.legend b { font-family: var(--display); font-size: 1.1rem; display: inline-block; }
.legend-eligible::before { background: #46d68b; box-shadow: 0 0 10px #46d68b; }
.legend-needs_info::before { background: var(--gold); }
.legend-not_eligible::before { background: rgba(255,255,255,.3); }

/* ---- Sample people. ---- */
.personas { display: grid; grid-template-columns: minmax(240px, 1fr) 2.2fr; gap: 28px; align-items: center; margin-top: 36px; }
.personas h2 { font-size: 1.9rem; }
.personas p { color: var(--muted); margin: 10px 0 0; }
.persona-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.persona {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; text-align: left; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px;
  box-shadow: 0 20px 44px -30px rgba(40, 50, 30, .4); transition: translate .35s var(--ease), box-shadow .35s, border-color .35s;
}
.persona:hover { translate: 0 -5px; border-color: var(--gold); box-shadow: 0 28px 50px -26px rgba(180, 120, 20, .55); }
.persona-face { grid-row: span 3; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-family: var(--display); font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--deep)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 45%, transparent); }
.persona:nth-child(2) .persona-face { background: linear-gradient(135deg, var(--accent), #6d2f05); }
.persona:nth-child(3) .persona-face { background: linear-gradient(135deg, #7a3c8f, #3c1c52); }
.persona strong { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.persona span:not(.persona-face) { color: var(--muted); font-size: .9rem; font-weight: 400; }
.persona em { font-style: normal; font-weight: 700; font-size: .85rem; color: var(--accent); }

/* ---- Panels. ---- */
main { max-width: 1240px; margin: 0 auto; padding: 0 24px 56px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-top: 28px;
  box-shadow: 0 1px 0 #fff inset, 0 24px 60px -30px rgba(40, 50, 30, .28);
}
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].is-seen { opacity: 1; transform: none; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel h2 { font-size: 1.7rem; }
.progress { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 999px; background: #ece5d3; margin: 12px 0 4px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--gold)); transition: width .6s var(--ease); }
.hint { color: var(--muted); margin: 8px 0 18px; font-size: .95rem; }
.check { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 28px; }
.check .panel { margin-top: 0; }
.form-panel { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; scrollbar-width: thin; }

/* ---- Questions. ---- */
.group { border: 0; padding: 0; margin: 0 0 22px; }
.group legend { font-weight: 700; color: var(--accent); padding: 0; margin-bottom: 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; display: flex; align-items: center; gap: 10px; width: 100%; }
.group legend::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.question { display: grid; gap: 8px; margin: 0 -10px 6px; padding: 10px; border-radius: 14px; border: 2px solid transparent; transition: background .3s, border-color .3s; }
.question label, .q-label { font-weight: 600; font-size: .95rem; position: relative; padding-left: 18px; }
.question label::before, .q-label::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; border: 2px solid #c9c1ab; transition: all .35s var(--ease); }
.question.is-answered label::before, .question.is-answered .q-label::before { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.question small { color: var(--muted); padding-left: 18px; }
.question select, .question input[type="number"] {
  font: inherit; padding: 11px 14px; border: 1.5px solid #d6cdb6; border-radius: 12px; background: #fff; color: var(--ink); width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.question select:focus, .question input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #fff; color: var(--ink); border: 1.5px solid #d6cdb6; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .92rem;
  transition: transform .2s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.chip:hover { border-color: var(--brand); transform: translateY(-1px); }
.chip:active { transform: scale(.94); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px var(--brand); animation: press .4s var(--ease); }
@keyframes press { 40% { transform: scale(1.1); } }
.question.is-asked { border-color: var(--accent); background: #fff3e2; animation: nudge .9s ease 3; }
.question.is-asked label::after, .question.is-asked .q-label::after { content: "  ← answer here"; color: var(--accent); font-weight: 700; }
@keyframes nudge { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 22%, transparent); } }
.form-status { color: var(--no); min-height: 1.2em; margin: 4px 0; font-weight: 600; }
button { font: inherit; cursor: pointer; border-radius: 999px; border: 1.5px solid var(--brand); background: var(--brand); color: #fff; padding: 9px 18px; font-weight: 600; transition: transform .2s var(--ease), background .25s, box-shadow .25s; }
button:active { transform: scale(.96); }
button:disabled { opacity: .4; cursor: default; }
button.quiet, .card-actions button { background: transparent; color: var(--brand); }
button.quiet:not(:disabled):hover, .card-actions button:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.card-actions button.is-planned { background: var(--brand); color: #fff; }
.plan-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
a.share { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 9px 18px; font-weight: 600; text-decoration: none; background: #128c4a; color: #fff; border: 1.5px solid #128c4a; transition: transform .2s var(--ease), box-shadow .25s; }
a.share::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #9df2bf; box-shadow: 0 0 0 4px rgba(157, 242, 191, .25); }
a.share:hover { box-shadow: 0 8px 22px -10px #128c4a; transform: translateY(-1px); }
.decided { margin: 0 0 10px; font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.decided::before { content: "⚖ "; color: var(--brand); }
button.link-button { background: none; border: 0; color: var(--accent); padding: 0; text-decoration: underline; margin: 4px 0 8px; border-radius: 4px; }

/* ---- Results. ---- */
.verdict { margin-top: 24px; }
.verdict h3 { font-size: 1.05rem; display: inline-flex; align-items: center; gap: 12px; }
.verdict > summary { cursor: pointer; list-style: none; }
.verdict > summary::-webkit-details-marker { display: none; }
.verdict > summary h3::after { content: "Show"; font-size: .8rem; font-weight: 600; color: var(--brand); text-decoration: underline; }
.verdict[open] > summary h3::after { content: "Hide"; }
.count { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 999px; font-family: var(--display); font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.verdict-eligible .count { background: var(--ok); color: #fff; box-shadow: 0 8px 22px -8px var(--ok); }
.verdict-needs_info .count { background: var(--wait-bg); color: var(--wait); }
.verdict-not_eligible .count { background: var(--no-bg); color: var(--no); }
.empty { color: var(--muted); margin: 12px 0; padding: 18px; border: 1.5px dashed var(--line); border-radius: 16px; text-align: center; }
.card {
  position: relative; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin-top: 12px; background: #fff;
  transition: box-shadow .35s var(--ease), border-color .35s, translate .35s var(--ease);
}
.card:hover { box-shadow: 0 18px 40px -22px rgba(40, 50, 30, .45); translate: 0 -2px; }
.card-eligible { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: linear-gradient(180deg, #f3fbf5, #fff 70%); }
.card-not_eligible { background: #fbf8f2; }
.card-not_eligible .card-name { color: var(--muted); }
.card.is-moved { animation: arrive 1.5s var(--ease); }
@keyframes arrive { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 80%, transparent); } 30% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--gold) 45%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.card summary { cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; list-style: none; border-radius: 10px; }
.card summary::-webkit-details-marker { display: none; }
.card-name { font-weight: 700; font-size: 1.04rem; }
.card-name::before { content: "▸"; display: inline-block; margin-right: 8px; color: var(--muted); transition: transform .25s var(--ease); }
.card[open] .card-name::before { transform: rotate(90deg); }
.card-tag { font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: #f3eee0; border-radius: 999px; padding: 3px 10px; align-self: start; }
.card-benefit { grid-column: 1 / -1; color: var(--muted); font-size: .95rem; }
.meter { grid-column: 1 / -1; display: flex; gap: 4px; margin-top: 8px; }
.meter i { flex: 1; max-width: 56px; height: 5px; border-radius: 999px; background: #e9e2cf; transition: background .5s; }
.meter .segment-pass { background: var(--ok); }
.meter .segment-fail { background: #d48a80; }
.meter .segment-unknown { background: repeating-linear-gradient(90deg, #e9c46a 0 5px, #f6e3a8 5px 10px); }
.card[open] summary { margin-bottom: 14px; }
.card[open] > :not(summary) { animation: unfold .45s var(--ease) both; }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }
.criteria { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 7px; }
.criterion { display: flex; gap: 10px; align-items: baseline; }
.criterion b { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .78rem; translate: 0 2px; }
.criterion-pass b { background: var(--ok-bg); color: var(--ok); }
.criterion-fail b { background: var(--no-bg); color: var(--no); }
.criterion-unknown b { background: var(--wait-bg); color: var(--wait); }
.criterion-fail { color: var(--no); }
.criterion-unknown { color: var(--wait); }
.caveat { background: var(--wait-bg); border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-size: .93rem; }
.documents { color: var(--muted); }
.card p { margin: 8px 0; }
.card-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.card small { color: var(--muted); }
.disclaimer { color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); padding-top: 16px; margin: 24px 0 0; }
.to-results { display: none; font-weight: 600; }
.form-foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 0; }

/* ---- Plan, assistant, open files. ---- */
.plan { border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); background: linear-gradient(180deg, #fff8e6, var(--card) 40%); animation: rise .7s var(--ease) both; }
.plan-grid, .open-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 18px; }
.plan h3, .open h3 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; color: var(--accent); }
.plan ol { padding-left: 22px; margin: 0; display: grid; gap: 10px; }
.checklist, .files { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist label { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); cursor: pointer; transition: background .25s, border-color .25s; }
.checklist label:has(:checked) { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.checklist input { width: 18px; height: 18px; accent-color: var(--ok); }
.open-grid > div { padding: 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); transition: translate .35s var(--ease), box-shadow .35s; }
.open-grid > div:hover { translate: 0 -4px; box-shadow: 0 22px 44px -26px rgba(40, 50, 30, .5); }
.files a { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.assistant { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 7%, var(--card)), var(--card) 240px); }
.assistant-note { color: var(--muted); font-size: .93rem; max-width: 60em; }
#assistant-status { font-weight: 600; }
footer { text-align: center; color: var(--muted); padding: 24px 20px 90px; font-size: .9rem; }

/* ---- The results dock on a phone, and the sparks. ---- */
.dock { display: none; position: fixed; left: 50%; bottom: 16px; translate: -50% 0; z-index: 20; text-decoration: none; white-space: nowrap; color: #fff; background: var(--deeper); border: 1px solid rgba(255,255,255,.2); padding: 12px 20px; border-radius: 999px; box-shadow: 0 16px 40px rgba(0,0,0,.35); font-size: .95rem; }
.dock b { color: var(--gold); font-family: var(--display); font-size: 1.1rem; display: inline-block; }
.burst { position: fixed; z-index: 40; pointer-events: none; }
.burst i { position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 50%; }

@media (max-width: 980px) {
  .personas, .persona-list { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .wheel-frame { width: min(86vw, 400px); }
  .promises { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .check { grid-template-columns: 1fr; }
  .form-panel { position: static; max-height: none; }
  .to-results { display: inline; }
  .dock { display: block; }
  .stage { border-radius: 0 0 28px 28px; }
  .panel { padding: 20px; }
  .top nav a { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}
@media print {
  .stage, .personas, .check, .assistant, .open, footer, .plan-actions, .dock, .page-progress { display: none; }
  .panel { border: 0; box-shadow: none; }
}

/* Assistant layout. Append to the site's stylesheet and set the colors to the site's palette. */


/* The runtime reads these variables for its chat, settings and agent panels.
   The chat background below also uses --ns-bg. White text sits on --ns-primary (the
   visitor's messages, Send, and the chat form and settings buttons) and on --ns-accent
   (Send while a turn is steered), so give both at least 4.5:1 contrast with white.
   --ns-accent also underlines the chat header. */
#agent-app {
  --ns-font: "Inter", system-ui, sans-serif;
  --ns-bg: #ffffff;
  --ns-fg: #1f2328;
  --ns-primary: var(--brand);
  --ns-accent: var(--accent);
  --ns-border: #e2dccb;
  --ns-panelbg: #ffffff;
  --ns-msgbg: #f4f1e8;
  --ns-muted: #59636e;
}

.assistant-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  margin-top: 16px;
}

/* Set the height once the runtime has mounted the chat, so a failed load leaves no
   empty box. */
#agent-app.ns-composed-app [data-ns-slot="chat"] { height: 720px; }
/* The runtime gives the chat no background of its own. Keep --ns-msgbg different from
   --ns-bg, or bot replies lose their bubble. */
#agent-app .ns-chat { background: var(--ns-bg); }

/* Site-wide form rules often stretch the runtime's own controls. Undo them here. */
#agent-app input[type="checkbox"],
#agent-app input[type="radio"] { width: auto; }
#agent-app .ns-header { flex-wrap: wrap; }
/* Site label rules add margins and bold text, and the inputs inside the labels inherit
   the weight. */
#agent-app .ns-settings-body label { margin: 4px 0; font-weight: 400; }
/* Chat forms label radio groups with a legend, so site legend fonts would reach them. */
#agent-app .ns-w-label { font-family: inherit; }
/* Site label rules add margins to chat form fields and make their options bold. */
#agent-app .ns-widget label { margin: 0; }
#agent-app .ns-w-radio label,
#agent-app .ns-w-multi label,
#agent-app .ns-w-toggle { font-weight: 400; }
/* The runtime sizes radio and multi-choice options but not the checkbox label. */
#agent-app .ns-w-toggle { font-size: 13px; }
/* The runtime spaces its buttons with gap. A site's button margin pushes Send below the input. */
#agent-app button { margin: 0; }
/* Chat choices are buttons with a light background. A site's button color can hide their
   titles. */
#agent-app .ns-w-choice { color: var(--ns-fg); }
/* A site's button:hover background also reaches the runtime's plain buttons, behind
   their dark text. Keep the runtime's own backgrounds. */
#agent-app .ns-devtoggle:not(.on):hover,
#agent-app .ns-modal-close:hover { background: transparent; }
#agent-app .ns-w-choice:disabled:hover { background: #fafbfc; }
/* The runtime's message rule hides the partner consent card's own background, and its
   Decline label then has too little contrast. */
#agent-app .ns-consent { background: #fffbeb; }
/* While a consent card waits, the status line above it already says "Contacting", though
   nothing has been sent. Hide it until the visitor answers. */
#agent-app .ns-msgs:has(.ns-consent-actions) > .ns-turn-status { display: none; }
/* Long links in a reply would run out of the bubble on a phone. "anywhere" would also
   let the consent card's buttons shrink and split their labels. */
#agent-app .ns-msg { overflow-wrap: break-word; }
/* On a phone the consent card is too narrow for its three buttons in one row, and
   "Always allow" breaks onto two lines. Keep each label whole and wrap the row. */
#agent-app .ns-consent-actions { flex-wrap: wrap; }
#agent-app .ns-consent-actions button { white-space: nowrap; }

/* site.js and the runtime add their confirmation dialogs to <body>, outside #agent-app.
   Site h2 rules reach the heading, and the two buttons touch. A right margin keeps
   wrapped buttons lined up on the left. */
body > dialog h2 { margin: 0 0 12px; font: 700 1.25em system-ui, sans-serif; }
body > dialog button { margin-right: 8px; }
/* site.js's dialog: the details in two columns, and a plain decline button, so the two
   choices do not look the same. */
.assistant-review { max-width: 640px; width: 85%; max-height: 85vh; overflow: auto; border: 1px solid #888; border-radius: 12px; padding: 24px; font: 16px system-ui, sans-serif; }
.assistant-review dl { display: grid; grid-template-columns: fit-content(40%) 1fr; gap: 4px 16px; margin: 12px 0; }
.assistant-review dt { font-weight: 600; }
.assistant-review dd { margin: 0; overflow-wrap: anywhere; }
.assistant-review details { margin: 12px 0; }
.assistant-review pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-review .assistant-decline { background: transparent; color: inherit; border: 1px solid currentColor; }

@media (max-width: 760px) {
  .assistant-panels { grid-template-columns: 1fr; }
  /* On a phone, each detail goes under its label, so an email is not split. */
  .assistant-review dl { grid-template-columns: 1fr; gap: 0; }
  .assistant-review dd { margin-bottom: 8px; }
}
