:root {
  --navy: #0A1F44;
  --navy-deep: #061532;
  --navy-card: #12305F;
  --navy-line: #24427A;
  --teal: #2ABFAB;
  --teal-dark: #1E9B8B;
  --teal-soft: rgba(42, 191, 171, 0.14);
  --white: #FFFFFF;
  --ink: #EAF0FA;
  --muted: #A9B8D3;
  --danger: #FF7A7A;
  --amber: #F5C36B;
  --head: "Trebuchet MS", "Lucida Grande", "Segoe UI", Helvetica, Arial, sans-serif;
  --body: Calibri, "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --rail-w: 264px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--navy);
  min-height: 100vh;
}
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; margin: 0; color: var(--white); letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--teal); }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
img { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.logo { height: 34px; width: auto; }

/* ---------- Landing ---------- */
.landing-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 36px clamp(24px, 6vw, 96px);
  background:
    radial-gradient(900px 600px at 85% 15%, rgba(42,191,171,0.18), transparent 60%),
    radial-gradient(600px 500px at 10% 100%, rgba(42,191,171,0.10), transparent 60%),
    var(--navy);
}
.landing-hero { align-self: center; max-width: 620px; padding: 40px 0; }
.landing-hero h1 { font-size: clamp(40px, 6vw, 68px); }
.landing-lead { margin-top: 20px; font-size: 20px; color: var(--muted); max-width: 54ch; }
.code-form { margin-top: 36px; display: flex; gap: 12px; max-width: 520px; }
.code-form input {
  flex: 1; min-width: 0;
  font-family: var(--head); font-size: 28px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 16px 20px; border-radius: 12px; border: 2px solid var(--navy-line);
  background: var(--navy-deep); color: var(--white);
}
.code-form input::placeholder { color: #55689A; letter-spacing: 0.14em; }
.code-form input:focus { border-color: var(--teal); outline: none; }
.code-form button, .btn {
  font-family: var(--head); font-weight: bold; font-size: 18px;
  padding: 16px 28px; border-radius: 12px; border: 0;
  background: var(--teal); color: var(--navy-deep);
  transition: background .15s;
}
.code-form button:hover, .btn:hover { background: #4ED2C0; }
.form-error { margin-top: 14px; color: var(--danger); }
.landing-note { margin-top: 22px; color: var(--muted); font-size: 16px; }
.landing-foot { display: flex; gap: 24px; color: var(--muted); font-size: 15px; }
.landing-foot a { color: var(--teal); text-decoration: none; }
.landing-foot a:hover { text-decoration: underline; }

/* ---------- Doc (privacy) ---------- */
.doc-wrap { max-width: 760px; margin: 0 auto; padding: 48px clamp(20px, 5vw, 48px) 80px; }
.doc-back { display: inline-block; margin-bottom: 32px; font-family: var(--head); text-decoration: none; }
.doc-wrap h1 { font-size: 40px; }
.doc-meta { color: var(--muted); margin: 8px 0 32px; }
.doc-wrap h2 { font-size: 22px; margin: 32px 0 10px; }
.doc-wrap p, .doc-wrap li { color: var(--ink); }
.doc-wrap ul { padding-left: 22px; }
.doc-wrap li { margin-bottom: 8px; }
.doc-foot { margin-top: 56px; }

/* ---------- Event shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail-w) 1fr; min-height: 100vh; }

.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 28px 22px 22px;
  background: var(--navy-deep);
  border-right: 1px solid rgba(255,255,255,0.06);
}
.rail-logo img { height: 30px; width: auto; }
.rail-event { margin-top: 14px; font-size: 14px; color: var(--muted); line-height: 1.35; }
.rail-steps { list-style: none; margin: 28px 0 0; padding: 0; flex: 1; overflow: auto; }
.rail-steps li { margin: 0 0 4px; }
.rail-steps button {
  width: 100%; text-align: left; display: flex; gap: 12px; align-items: baseline;
  background: transparent; border: 0; color: var(--muted);
  padding: 9px 10px; border-radius: 8px; font-size: 15px; line-height: 1.25;
}
.rail-steps button:hover { background: rgba(255,255,255,0.05); color: var(--ink); }
.rail-steps li.is-done button { color: var(--ink); }
.rail-steps li.is-current button { background: var(--teal-soft); color: var(--white); }
.rail-n { font-family: var(--head); font-size: 12px; width: 18px; flex: none; color: var(--teal); }
.rail-foot { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.rail-foot a { color: var(--teal); text-decoration: none; }
.rail-foot a:hover { text-decoration: underline; }
.rail-hint { color: #5E72A0; }

.topbar { display: none; }

.stage {
  padding: clamp(28px, 5vh, 64px) clamp(24px, 5vw, 80px) 120px;
  max-width: 1180px;
  width: 100%;
  outline: none;
}

.stagenav {
  position: fixed; bottom: 0; left: var(--rail-w); right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(24px, 5vw, 80px);
  background: linear-gradient(to top, var(--navy) 65%, rgba(10,31,68,0));
  pointer-events: none;
}
.stagenav > * { pointer-events: auto; }
.nav-btn {
  font-family: var(--head); font-weight: bold; font-size: 16px;
  padding: 12px 22px; border-radius: 10px; border: 2px solid var(--navy-line);
  background: var(--navy-deep); color: var(--ink);
}
.nav-btn:hover { border-color: var(--teal); }
.nav-next { background: var(--teal); color: var(--navy-deep); border-color: var(--teal); }
.nav-next:hover { background: #4ED2C0; }
.nav-btn[disabled] { opacity: .35; cursor: default; }
.nav-pos { color: var(--muted); font-size: 14px; }

/* ---------- Screen basics ---------- */
.screen { animation: screenIn .28s ease-out; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen, .flip-inner, .finding, .qa-line { animation: none !important; transition: none !important; } }

.kicker { font-family: var(--head); font-size: 14px; color: var(--teal); margin-bottom: 10px; }
.screen h1 { font-size: clamp(30px, 3.6vw, 46px); max-width: 24ch; }
.screen h1.wide { max-width: 34ch; font-size: clamp(26px, 3vw, 38px); }
.lead { margin-top: 14px; color: var(--muted); max-width: 66ch; font-size: 18px; }
.source { margin-top: 28px; font-size: 14px; color: #6F82AE; max-width: 80ch; font-style: italic; }
.note { margin-top: 18px; font-size: 16px; color: var(--muted); max-width: 70ch; }
.body-block { margin-top: 32px; }

/* Title screen */
.title-screen { min-height: calc(100vh - 200px); display: flex; flex-direction: column; justify-content: center; }
.title-screen h1 { font-size: clamp(38px, 5.2vw, 66px); max-width: 18ch; }
.title-sub { margin-top: 20px; font-size: clamp(20px, 2vw, 26px); color: var(--teal); max-width: 40ch; }
.title-meta { margin-top: 48px; color: var(--muted); font-size: 16px; max-width: 70ch; }
.title-meta strong { color: var(--white); display: block; font-size: 19px; margin-bottom: 4px; }
.title-cta { margin-top: 40px; }

/* Process (7 steps) */
.process { margin-top: 34px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.pstep {
  background: var(--navy-card); border: 2px solid transparent; border-radius: var(--radius);
  padding: 18px 14px; text-align: left; color: var(--ink); min-height: 116px; position: relative;
}
.pstep:hover { border-color: var(--navy-line); }
.pstep.is-on { border-color: var(--teal); background: #143a63; }
.pstep .pn { font-family: var(--head); font-size: 12px; color: var(--teal); }
.pstep .pname { font-family: var(--head); font-weight: bold; color: var(--white); display: block; margin-top: 4px; }
.pstep .psub { font-size: 14px; color: var(--muted); display: block; margin-top: 4px; line-height: 1.3; }
.pdetail { margin-top: 18px; padding: 22px 26px; border-radius: var(--radius); background: var(--teal-soft); border-left: 4px solid var(--teal); min-height: 92px; }
.pdetail .pname { font-family: var(--head); font-weight: bold; color: var(--white); }
.pdetail p { margin-top: 4px; max-width: 70ch; }
.pdetail.is-empty { color: var(--muted); border-left-color: var(--navy-line); background: rgba(255,255,255,0.03); }

/* Flip cards */
.cards { margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.flip { perspective: 1200px; background: none; border: 0; padding: 0; text-align: left; min-height: 180px; color: inherit; }
.flip-inner { position: relative; width: 100%; height: 100%; min-height: 180px; transition: transform .5s; transform-style: preserve-3d; }
.flip.is-open .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.flip-front { background: var(--navy-card); }
.flip-front h3 { font-size: 22px; }
.flip-front .flip-ask { color: var(--teal); font-family: var(--head); font-size: 14px; }
.flip-back { background: var(--teal); color: var(--navy-deep); transform: rotateY(180deg); font-size: 17px; line-height: 1.45; }
.flip-back h3 { color: var(--navy-deep); font-size: 17px; margin-bottom: 8px; }
.flip-count { margin-top: 20px; color: var(--muted); font-size: 16px; }

/* Compare */
.compare-toggle { margin-top: 30px; display: inline-flex; background: var(--navy-deep); border-radius: 12px; padding: 4px; border: 1px solid var(--navy-line); }
.compare-toggle button { border: 0; background: transparent; color: var(--muted); padding: 10px 22px; border-radius: 9px; font-family: var(--head); font-weight: bold; }
.compare-toggle button.is-on { background: var(--teal); color: var(--navy-deep); }
.compare-pane { margin-top: 22px; padding: 32px; border-radius: var(--radius); background: var(--navy-card); max-width: 820px; }
.compare-pane.is-agent { background: var(--teal-soft); border: 1px solid rgba(42,191,171,0.4); }
.compare-pane h2 { font-size: 26px; max-width: 30ch; }
.compare-pane ul { margin: 18px 0 0; padding-left: 22px; }
.compare-pane li { margin-bottom: 6px; }
.definition { margin-top: 26px; font-family: var(--head); font-size: 20px; color: var(--white); max-width: 40ch; padding-left: 18px; border-left: 4px solid var(--teal); }

/* Levels 0–5 */
.levels { margin-top: 30px; display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
.level-list { display: flex; flex-direction: column-reverse; gap: 6px; }
.level-btn { display: flex; gap: 14px; align-items: center; text-align: left; background: var(--navy-card); border: 2px solid transparent; border-radius: 12px; padding: 12px 14px; color: var(--ink); }
.level-btn:hover { border-color: var(--navy-line); }
.level-btn.is-on { border-color: var(--teal); background: #143a63; }
.level-btn.is-target { box-shadow: inset 4px 0 0 var(--teal); }
.level-n { font-family: var(--head); font-weight: bold; font-size: 22px; color: var(--teal); width: 26px; flex: none; }
.level-detail { padding: 28px 30px; border-radius: var(--radius); background: var(--navy-card); min-height: 220px; position: sticky; top: 24px; }
.level-detail .kicker { margin-bottom: 6px; }
.level-detail h2 { font-size: 28px; }
.level-detail p { margin-top: 14px; font-size: 19px; }
.level-target { margin-top: 18px; padding: 14px 18px; border-radius: 10px; background: var(--teal-soft); color: var(--white); font-size: 16px; }

/* Ladder 1–8 */
.ladder { margin-top: 28px; display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.rungs { display: flex; flex-direction: column-reverse; gap: 6px; }
.rung { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 12px 14px; border-radius: 12px; background: var(--navy-card); border: 2px solid transparent; cursor: pointer; }
.rung:hover { border-color: var(--navy-line); }
.rung.is-checked { border-color: var(--teal); }
.rung.is-hi { background: #143a63; }
.rung input { width: 22px; height: 22px; margin: 4px 0 0 0; accent-color: var(--teal); cursor: pointer; }
.rung .rn { font-family: var(--head); font-size: 12px; color: var(--teal); }
.rung .rname { font-family: var(--head); font-weight: bold; color: var(--white); }
.rung .rhow { font-size: 15px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.rung .rex { font-size: 14px; color: var(--teal); margin-top: 4px; }
.ladder-result { position: sticky; top: 24px; padding: 26px 28px; border-radius: var(--radius); background: var(--navy-card); }
.ladder-result .big { font-family: var(--head); font-size: 64px; font-weight: bold; line-height: 1; color: var(--teal); }
.ladder-result .big small { font-size: 20px; color: var(--muted); font-weight: normal; margin-left: 6px; }
.ladder-result h3 { margin-top: 12px; font-size: 20px; }
.ladder-result p { margin-top: 8px; color: var(--ink); font-size: 16px; }
.ladder-result .hint { color: var(--muted); }

/* Anatomy */
.anatomy { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.part { text-align: left; background: var(--navy-card); border: 2px solid var(--teal); border-radius: var(--radius); padding: 22px; color: var(--ink); transition: opacity .2s, border-color .2s; }
.part.is-off { border-color: var(--navy-line); opacity: .55; }
.part.is-off .part-state { color: var(--danger); }
.part-state { font-family: var(--head); font-size: 13px; color: var(--teal); }
.part h3 { font-size: 24px; margin-top: 6px; }
.part .pw { margin-top: 6px; }
.part .pe { margin-top: 12px; font-size: 15px; color: var(--muted); font-style: italic; }
.outcome { margin-top: 18px; padding: 24px 28px; border-radius: var(--radius); background: var(--teal-soft); border-left: 4px solid var(--teal); font-size: 20px; max-width: 820px; }
.outcome.is-bad { background: rgba(255,122,122,0.10); border-left-color: var(--danger); }
.outcome .olabel { font-family: var(--head); font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* QA simulation (Kotryna) */
.qa { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.qa-doc { background: var(--white); color: #1B2A48; border-radius: var(--radius); padding: 26px 28px; font-family: Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.6; min-height: 300px; }
.qa-doc .doc-head { font-family: var(--body); font-size: 12px; color: #6F82AE; margin-bottom: 14px; letter-spacing: .04em; }
.qa-doc p + p { margin-top: 12px; }
.mark { position: relative; border-radius: 4px; padding: 0 3px; transition: background .3s, color .3s; }
.mark.is-hit { background: #FFE2E2; color: #9B1C1C; box-shadow: 0 2px 0 #E05555; }
.mark.is-hit::after { content: attr(data-n); position: absolute; top: -12px; right: -8px; width: 18px; height: 18px; border-radius: 50%; background: #E05555; color: #fff; font-family: var(--head); font-size: 11px; font-weight: bold; display: grid; place-items: center; }
.qa-side { display: flex; flex-direction: column; gap: 14px; }
.qa-inputs { display: flex; gap: 8px; flex-wrap: wrap; }
.qa-chip { padding: 8px 14px; border-radius: 999px; background: var(--navy-card); font-size: 15px; display: inline-flex; gap: 8px; align-items: center; }
.qa-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.qa-console { background: var(--navy-deep); border: 1px solid var(--navy-line); border-radius: var(--radius); padding: 18px 20px; min-height: 250px; font-size: 16px; }
.qa-line { color: var(--muted); animation: screenIn .3s; }
.qa-line.is-name { color: var(--teal); font-family: var(--head); }
.finding { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--navy-card); display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; animation: screenIn .35s; }
.finding .fn { width: 22px; height: 22px; border-radius: 50%; background: #E05555; color: #fff; font-family: var(--head); font-size: 12px; font-weight: bold; display: grid; place-items: center; margin-top: 2px; }
.finding .fwhat { font-family: var(--head); font-weight: bold; color: var(--white); }
.finding .ffound { font-size: 15px; color: var(--ink); margin-top: 2px; }
.finding .fwhere { font-size: 13px; color: var(--muted); margin-top: 2px; }
.finding .fsev { font-size: 12px; font-family: var(--head); padding: 3px 8px; border-radius: 6px; background: rgba(255,122,122,0.18); color: #FFB0B0; white-space: nowrap; }
.finding .fsev.mid { background: rgba(245,195,107,0.18); color: var(--amber); }
.qa-closing { margin-top: 14px; font-family: var(--head); font-weight: bold; color: var(--white); animation: screenIn .35s; }
.qa-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn-ghost { background: transparent; border: 2px solid var(--navy-line); color: var(--ink); border-radius: 12px; padding: 12px 20px; font-family: var(--head); font-weight: bold; }
.btn-ghost:hover { border-color: var(--teal); }
.disclaimer { font-size: 14px; color: #6F82AE; }
.dots::after { content: ""; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* Rules + plan */
.two-col { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.human-list { display: flex; flex-direction: column; gap: 10px; }
.human-item { padding: 16px 18px; border-radius: 12px; background: var(--navy-card); }
.human-item strong { font-family: var(--head); color: var(--white); display: block; }
.human-item span { color: var(--muted); font-size: 16px; }
.rules { display: flex; flex-direction: column; gap: 10px; }
.rule { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 12px; background: var(--teal-soft); border: 1px solid rgba(42,191,171,0.35); font-family: var(--head); font-weight: bold; font-size: 19px; color: var(--white); }
.rule .rn { width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: var(--navy-deep); display: grid; place-items: center; font-size: 14px; flex: none; }
.plan-title { margin-top: 36px; font-size: 24px; }
.plan { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.week { padding: 18px; border-radius: 12px; background: var(--navy-card); }
.week .wk { font-family: var(--head); font-size: 13px; color: var(--teal); }
.week strong { display: block; font-family: var(--head); color: var(--white); margin-top: 4px; }
.week p { margin-top: 6px; font-size: 15px; color: var(--muted); }
.pitfalls { margin-top: 22px; font-size: 15px; color: var(--muted); max-width: 90ch; }

/* Gate: choice + form + unlocked */
.agents { margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.agent { text-align: left; background: var(--navy-card); border: 2px solid transparent; border-radius: var(--radius); padding: 20px 18px; color: var(--ink); display: flex; flex-direction: column; gap: 10px; }
.agent:hover { border-color: var(--navy-line); }
.agent.is-on { border-color: var(--teal); background: #143a63; }
.agent h3 { font-size: 24px; }
.agent .arole { color: var(--teal); font-family: var(--head); font-size: 14px; margin-top: -8px; }
.agent .arow { font-size: 15px; }
.agent .arow b { display: block; font-family: var(--head); font-size: 12px; color: var(--muted); font-weight: normal; }
.gate-grid { margin-top: 30px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 28px; align-items: start; }
.unlock-box { padding: 26px 28px; border-radius: var(--radius); background: var(--teal-soft); border: 1px solid rgba(42,191,171,0.35); }
.unlock-box h2 { font-size: 22px; }
.unlock-box ul { margin: 14px 0 0; padding-left: 20px; }
.unlock-box li { margin-bottom: 8px; }
.unlock-box .already { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 15px; color: var(--muted); }
.unlock-box .already form { display: flex; gap: 8px; margin-top: 8px; }
.unlock-box .already input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--navy-line); background: var(--navy-deep); color: var(--white); font-size: 15px; }
.unlock-box .already button { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--teal); background: transparent; color: var(--teal); font-family: var(--head); font-weight: bold; font-size: 14px; }

.lead-form { padding: 26px 28px; border-radius: var(--radius); background: var(--navy-card); display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.lead-form .full { grid-column: 1 / -1; }
.lead-form label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 5px; font-family: var(--head); }
.lead-form input[type=text], .lead-form input[type=email], .lead-form select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--navy-line);
  background: var(--navy-deep); color: var(--white); font-size: 17px; font-family: var(--body);
}
.lead-form select {
  -webkit-appearance: none; appearance: none; height: 50px; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232ABFAB' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.lead-form input[type=text], .lead-form input[type=email] { height: 50px; }
.lead-form input:focus, .lead-form select:focus { border-color: var(--teal); outline: none; }
.lead-form .hp { position: absolute; left: -9999px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--teal); flex: none; }
.check.call { padding: 14px 16px; border-radius: 10px; background: var(--teal-soft); border: 1px solid rgba(42,191,171,0.35); font-family: var(--head); font-weight: bold; color: var(--white); }
.check a { color: var(--teal); }
.rating { display: flex; gap: 6px; }
.rating button { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--navy-line); background: var(--navy-deep); color: var(--muted); font-family: var(--head); font-weight: bold; }
.rating button.is-on { background: var(--teal); color: var(--navy-deep); border-color: var(--teal); }
.form-msg { grid-column: 1 / -1; font-size: 15px; min-height: 22px; }
.form-msg.is-err { color: var(--danger); }
.lead-form .btn { grid-column: 1 / -1; justify-self: start; }
.lead-form .btn[disabled] { opacity: .6; cursor: wait; }

/* Unlocked */
.unlocked { margin-top: 28px; display: grid; gap: 22px; }
.reco { padding: 28px 30px; border-radius: var(--radius); background: var(--teal); color: var(--navy-deep); }
.reco .rk { font-family: var(--head); font-size: 14px; opacity: .8; }
.reco h2 { color: var(--navy-deep); font-size: 30px; margin-top: 6px; max-width: 26ch; }
.reco p { margin-top: 10px; font-size: 18px; max-width: 70ch; }
.reco .reco-plan { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.reco .reco-plan div { background: rgba(6,21,50,0.12); border-radius: 10px; padding: 12px; font-size: 14px; }
.reco .reco-plan b { display: block; font-family: var(--head); }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.res-card { padding: 24px 26px; border-radius: var(--radius); background: var(--navy-card); display: flex; flex-direction: column; gap: 10px; }
.res-card h3 { font-size: 22px; }
.res-card p { color: var(--muted); font-size: 16px; }
.res-card .btn { align-self: flex-start; text-decoration: none; display: inline-block; font-size: 16px; padding: 12px 20px; }
.prompts h2 { font-size: 24px; margin-bottom: 6px; }
.prompts > p { color: var(--muted); }
.prompt-tabs { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.prompt-tabs button { border: 2px solid var(--navy-line); background: var(--navy-deep); color: var(--ink); border-radius: 10px; padding: 10px 18px; font-family: var(--head); font-weight: bold; }
.prompt-tabs button.is-on { border-color: var(--teal); background: var(--teal-soft); color: var(--white); }
.prompt-body { margin-top: 12px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.prompt-text { background: var(--navy-deep); border: 1px solid var(--navy-line); border-radius: var(--radius); padding: 20px; position: relative; }
.prompt-text pre { margin: 0; white-space: pre-wrap; font-family: var(--body); font-size: 15px; line-height: 1.5; color: var(--ink); max-height: 380px; overflow: auto; }
.prompt-text .copy { position: absolute; top: 14px; right: 14px; }
.copy { border: 0; background: var(--teal); color: var(--navy-deep); font-family: var(--head); font-weight: bold; border-radius: 8px; padding: 8px 14px; font-size: 14px; }
.copy.is-done { background: var(--white); }
.prompt-memory { background: var(--navy-card); border-radius: var(--radius); padding: 20px; }
.prompt-memory h4 { font-size: 16px; }
.prompt-memory ul { margin: 10px 0 0; padding-left: 20px; font-size: 15px; }
.prompt-memory li { margin-bottom: 6px; }
.prompt-memory .where { margin-top: 16px; font-size: 14px; color: var(--muted); }
.next-step { padding: 24px 28px; border-radius: var(--radius); background: var(--navy-deep); border: 1px solid var(--navy-line); }
.next-step h3 { font-size: 20px; }
.next-step p { margin-top: 8px; color: var(--muted); }
.next-step a { font-family: var(--head); font-weight: bold; font-size: 22px; }

/* ---------- Fullscreen / presenter ---------- */
body.is-fullscreen .rail { display: none; }
body.is-fullscreen .shell { grid-template-columns: 1fr; }
body.is-fullscreen .stagenav { left: 0; }
body.is-fullscreen .stage { max-width: 1280px; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .process { grid-template-columns: repeat(4, 1fr); }
  .agents { grid-template-columns: repeat(2, 1fr); }
  .plan { grid-template-columns: repeat(2, 1fr); }
  .levels { grid-template-columns: 1fr; }
  .level-detail { position: static; }
  .ladder { grid-template-columns: 1fr; }
  .ladder-result { position: static; }
  .qa { grid-template-columns: 1fr; }
  .gate-grid { grid-template-columns: 1fr; }
  .prompt-body { grid-template-columns: 1fr; }
  .reco .reco-plan { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .topbar { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; position: sticky; top: 0; z-index: 5; padding: 12px 16px 14px; background: var(--navy-deep); }
  .topbar-logo img { height: 22px; width: auto; }
  .topbar-title { font-family: var(--head); font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-count { font-size: 13px; color: var(--muted); }
  .topbar-progress { grid-column: 1 / -1; height: 3px; background: var(--navy-line); border-radius: 2px; overflow: hidden; }
  .topbar-progress span { display: block; height: 100%; background: var(--teal); width: 0; transition: width .3s; }
  .stage { padding: 22px 18px 110px; }
  .stagenav { left: 0; padding: 12px 18px; }
  .nav-pos { display: none; }
  .title-screen { min-height: auto; padding-top: 20px; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .pstep { min-height: auto; }
  .cards { grid-template-columns: 1fr; }
  .anatomy { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .plan { grid-template-columns: 1fr; }
  .agents { grid-template-columns: 1fr; }
  .lead-form { grid-template-columns: 1fr; padding: 20px; }
  .res-grid { grid-template-columns: 1fr; }
  .reco .reco-plan { grid-template-columns: 1fr; }
  .rail-hint { display: none; }
  .code-form { flex-direction: column; }
}

/* checkbox rows inside the form: override the generic field-label style */
.lead-form .check { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-family: var(--body); font-size: 15px; color: var(--ink); }
.lead-form .check.call { font-family: var(--head); font-weight: bold; color: var(--white); font-size: 16px; }

.replay { margin-top: 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.replay span { color: var(--muted); font-size: 15px; }
.reco-link { margin-top: 12px; background: var(--navy-deep); color: var(--white); border: 0; border-radius: 10px; padding: 10px 16px; font-family: var(--head); font-weight: bold; font-size: 15px; }
.reco-link:hover { background: var(--navy); }

.thanks h2 { font-size: 28px; }
.thanks p { margin-top: 6px; color: var(--muted); }
.res-card .btn-ghost { align-self: flex-start; }
