/* ==========================================================================
   Chamber OS — chamberos.in — the user guide
   Design tokens, page chrome and the 3D backdrop are carried over unchanged
   from the previous site. Everything from .guide downwards is new.

   The phone mock-ups use the APP's own palette (--a-*), lifted from
   public/style.css, so a reader recognises the screen in front of them.
   ========================================================================== */

:root {
  --ink: #12100f;
  --paper: #f5f0e7;
  --cream: #fffaf2;
  --white: #ffffff;
  --coral: #ff5a36;
  --coral-dark: #e64625;
  --blue: #3158b8;
  --gold: #d9a228;
  --sage: #b6c8b0;
  --line: rgba(18, 16, 15, 0.16);
  --muted: #6e6861;
  --ok: #3d7d34;
  --error: #a61b2e;
  --error-tint: #fbecec;

  --font-geist-sans: "Geist", "Segoe UI", Arial, sans-serif;
  --font-geist-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* the app's palette, for the screen mock-ups */
  --a-surface: #faf8f2;  --a-card: #fffefa;    --a-border: #e6e1d1;
  --a-container: #f4f1e8; --a-high: #ebe7da;
  --a-primary: #4d5c42;  --a-primary-tint: #dde9cd; --a-on-primary: #fff;
  --a-secondary-tint: #e3e8d3;
  --a-ink: #1d1d14;      --a-ink-mid: #46493c; --a-ink-soft: #787b6c;
  --a-line: #cdd0bf;
  --a-error: #a61b2e;    --a-error-tint: #fbecec;
  --a-warn: #8f6400;     --a-warn-tint: #f9e7bb;
  --type-session: #3e6386; --type-session-tint: #dbe8f4; --type-session-ink: #1d3a55;
  --type-family: #8a5a70;  --type-family-tint: #f2dfe7;  --type-family-ink: #4e2c3e;
  --type-lower: #587743;   --type-lower-tint: #dfe9d2;   --type-lower-ink: #26391b;
  --type-unmarked: #aaab9f;
}

*, *::before, *::after { box-sizing: border-box; }
blockquote, dl, dd, h1, h2, h3, h4, h5, h6, figure, p, pre, table { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
table { border-collapse: collapse; }

html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-geist-sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
main { overflow: hidden; }
:target { scroll-margin-top: 110px; }

.court-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none; opacity: .96;
  filter: saturate(1.06) contrast(1.025);
}

/* ---------------- header ---------------- */
.site-header {
  width: 100%; height: 82px; padding: 0 4.5vw;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  border-bottom: 1px solid var(--line); background: rgba(245,240,231,.92);
  backdrop-filter: blur(18px); position: fixed; top: 0; z-index: 40;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.03em; font-size: 19px; width: fit-content; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ink); color: var(--paper); flex: 0 0 auto; }
.brand-mark span { font: 700 9px/1 var(--font-geist-mono); letter-spacing: -.08em; }
.nav { display: flex; align-items: center; gap: 30px; font-size: 13px; font-weight: 550; }
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px; background: var(--ink); transition: right .25s ease; }
.nav a:hover::after { right: 0; }
.header-spacer { justify-self: end; }
.menu-toggle { display: none; border: 0; background: none; padding: 10px; }

/* ---------------- hero ---------------- */
.guide-hero {
  min-height: 620px; padding: 175px 4.5vw 95px;
  display: grid; align-items: center; border-bottom: 1px solid var(--line); position: relative;
}
.guide-hero::before { content: ""; width: 260px; height: 260px; border: 1px solid rgba(18,16,15,.09); border-radius: 50%; position: absolute; left: -165px; top: 155px; }
.hero-copy { padding-left: 2vw; position: relative; z-index: 2; max-width: 780px; }
.hero-copy::before { content: ""; position: absolute; inset: -70px -90px; background: radial-gradient(ellipse at 32% 45%, rgba(245,240,231,.95) 40%, rgba(245,240,231,0) 76%); z-index: -1; pointer-events: none; }
.eyebrow, .section-kicker, .part-kicker { font: 650 10px/1 var(--font-geist-mono); letter-spacing: .13em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 26px; }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(255,90,54,.14); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(255,90,54,0); } }
h1 { font-size: clamp(48px, 5.4vw, 86px); line-height: .92; letter-spacing: -.065em; margin-bottom: 30px; font-weight: 590; }
h1 em, h2 em { color: var(--coral); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.hero-lead { max-width: 620px; color: #514b46; font-size: clamp(16px, 1.3vw, 20px); line-height: 1.6; letter-spacing: -.018em; }
.hero-facts { display: flex; gap: 38px; margin-top: 38px; flex-wrap: wrap; }
.hero-facts div { display: flex; flex-direction: column; gap: 3px; }
.hero-facts b { font-size: 32px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.hero-facts span { font: 600 9px/1.3 var(--font-geist-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 22px; border-radius: 99px; padding: 15px 21px; font-weight: 650; font-size: 13px; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: var(--ink); }
.button-primary:hover { background: var(--coral-dark); }
.text-link { font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }
.text-link span { margin-left: 8px; }

/* ---------------- guide layout ---------------- */
.guide {
  display: grid; grid-template-columns: 246px minmax(0, 1fr);
  gap: 4vw; padding: 0 4.5vw 40px; background: rgba(255, 250, 242, .62);
  border-bottom: 1px solid var(--line);
}
.toc { position: relative; }
.toc-inner { position: sticky; top: 112px; padding: 46px 0 40px; max-height: calc(100vh - 130px); overflow-y: auto; }
.toc-title { font: 650 10px/1 var(--font-geist-mono); letter-spacing: .13em; text-transform: uppercase; color: var(--coral-dark); margin-bottom: 16px; }
#toc-nav { display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--line); }
#toc-nav .toc-part { font: 650 9px/1 var(--font-geist-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 16px 0 7px 14px; }
#toc-nav a { font-size: 12.5px; color: #5f5952; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; transition: .15s ease; }
#toc-nav a:hover { color: var(--ink); }
#toc-nav a.on { color: var(--coral-dark); font-weight: 650; border-left-color: var(--coral); }

.lessons { padding: 40px 0 20px; min-width: 0; }

/* ---------------- parts & lessons ---------------- */
.part { padding: 62px 0 10px; }
.part:first-child { padding-top: 22px; }
.part-kicker { color: var(--coral-dark); margin-bottom: 16px; }
.part h2 { font-size: clamp(38px, 4.2vw, 60px); line-height: 1; letter-spacing: -.055em; font-weight: 570; }
.part-lede { margin-top: 14px; color: var(--muted); font-size: 17px; max-width: 560px; }

.lesson {
  display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: 3.4vw; align-items: start;
  padding: 44px 0; border-bottom: 1px solid var(--line);
}
.lesson.full { grid-template-columns: 1fr; }
.lesson-copy { min-width: 0; }
.lesson-copy.wide { max-width: 900px; }
.lesson-no { font: 650 9px/1 var(--font-geist-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--coral-dark); }
.lesson h3 { font-size: 30px; line-height: 1.1; letter-spacing: -.045em; font-weight: 580; margin: 11px 0 15px; }
.lesson h3.spaced { margin-top: 52px; }
.lesson-copy p { color: #4f4943; font-size: 15px; line-height: 1.68; margin-bottom: 13px; }
.lesson-copy p b, .lesson-copy li b, .lesson-copy dd b { font-weight: 650; color: var(--ink); }

.steps { counter-reset: s; margin: 4px 0 16px; display: flex; flex-direction: column; gap: 9px; }
.steps li { counter-increment: s; position: relative; padding-left: 34px; font-size: 15px; line-height: 1.6; color: #4f4943; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper);
  font: 650 10px/22px var(--font-geist-mono); text-align: center;
}
.steps.numbered-big li::before { background: var(--coral); }

.bullets { margin: 4px 0 16px; display: flex; flex-direction: column; gap: 8px; }
.bullets li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.6; color: #4f4943; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.bullets.wide li { font-size: 15.5px; }

.callout { margin: 16px 0; padding: 15px 17px; background: rgba(245,240,231,.85); border-left: 2px solid var(--coral); border-radius: 0 8px 8px 0; font-size: 14px; line-height: 1.62; color: #524c46; }
.callout.warn { background: var(--error-tint); border-left-color: var(--error); color: #6d1c27; }
.callout b { color: var(--ink); font-weight: 650; }
.callout.warn b { color: #4d0d16; }

.deflist { margin: 6px 0 14px; }
.deflist dt { font-size: 14.5px; font-weight: 650; color: var(--ink); margin-top: 15px; display: flex; align-items: center; gap: 8px; }
.deflist dt:first-child { margin-top: 0; }
.deflist dd { font-size: 14.5px; line-height: 1.62; color: #4f4943; margin: 4px 0 0; }
.deflist.tight dt { margin-top: 11px; }
.deflist.glossary dt { color: var(--coral-dark); }
.deflist em { font-style: italic; }
.tagdot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.tagdot.bad { background: var(--error); }
.tagdot.warn { background: var(--gold); }

.two-doors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 16px; }
.door { border: 1px solid var(--line); border-radius: 10px; padding: 17px 18px; background: rgba(255,255,255,.5); }
.door > b { display: block; font-size: 13px; font-weight: 700; margin-bottom: 9px; color: var(--coral-dark); }
.door p { font-size: 13.5px; line-height: 1.6; margin-bottom: 9px; }
.door p:last-child { margin-bottom: 0; }

.choice-guide { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 16px; }
.cg { border: 1px solid var(--line); border-radius: 10px; padding: 15px 17px; background: rgba(255,255,255,.5); }
.cg b { display: block; font-size: 14px; font-weight: 680; margin-bottom: 6px; }
.cg p { font-size: 13.5px; line-height: 1.6; margin: 0; }

.inline-example { font: 600 14px/1 var(--font-geist-mono) !important; letter-spacing: -.01em; background: var(--ink); color: var(--paper); display: inline-block; padding: 10px 14px; border-radius: 7px; margin: 4px 0 16px !important; }
.practice-lead { font-weight: 650; color: var(--ink) !important; margin-top: 18px !important; }

.tablewrap { overflow-x: auto; margin: 4px 0 10px; }
.reftable { width: 100%; min-width: 520px; font-size: 14px; }
.reftable th { text-align: left; font: 650 9px/1 var(--font-geist-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 14px 10px 0; border-bottom: 1px solid var(--line); }
.reftable td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.55; color: #4f4943; }
.reftable td:first-child { font-weight: 650; color: var(--ink); white-space: nowrap; }
.reftable td:nth-child(2) { font: 600 13px/1.5 var(--font-geist-mono); color: var(--coral-dark); white-space: nowrap; }

/* ==========================================================================
   PHONE MOCK-UPS — the app's own look
   ========================================================================== */
.phone {
  position: sticky; top: 112px;
  border: 1px solid rgba(18,16,15,.22); border-radius: 22px; overflow: hidden;
  background: var(--a-surface); box-shadow: 0 24px 52px rgba(38,32,22,.14);
  font-size: 13px; color: var(--a-ink);
}
.phone.wide { position: static; }
.phone-screen { padding: 13px; display: flex; flex-direction: column; gap: 9px; max-height: 640px; overflow: hidden; }
.phone-screen.center-screen { align-items: center; justify-content: center; padding: 46px 20px; gap: 12px; text-align: center; min-height: 330px; }
.phone figcaption { padding: 10px 14px; border-top: 1px solid var(--a-border); background: var(--a-container); font: 600 9px/1 var(--font-geist-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--a-ink-soft); }
.phone-nav { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--a-border); background: var(--a-card); }
.phone-nav span { padding: 11px 2px; text-align: center; font-size: 8.5px; color: var(--a-ink-soft); }
.phone-nav span.on { color: var(--a-primary); font-weight: 700; box-shadow: inset 0 2px 0 var(--a-primary); }

.app-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid var(--a-border); font-size: 12px; font-weight: 650; }
.lang-chip { border: 1px solid var(--a-line); border-radius: 99px; padding: 4px 9px; font-size: 9px; font-weight: 600; color: var(--a-ink-mid); }
.lang-chip.on { background: var(--a-primary); color: #fff; border-color: var(--a-primary); }

.crest { font-size: 34px; }
.app-h1 { font-family: Georgia, serif; font-size: 24px; letter-spacing: -.01em; }
.rule-line { width: 44px; height: 1px; background: var(--a-line); }
.app-sub { font-size: 11px; color: var(--a-ink-soft); }
.gbtn { margin-top: 8px; display: inline-flex; align-items: center; gap: 9px; background: #1a73e8; color: #fff; border-radius: 6px; padding: 10px 18px; font-size: 11.5px; font-weight: 600; }
.gbtn .g { background: #fff; color: #1a73e8; width: 17px; height: 17px; border-radius: 3px; display: grid; place-items: center; font-weight: 700; font-size: 11px; }

.greeting { display: flex; flex-direction: column; gap: 2px; padding: 3px 0 2px; }
.greeting small { font: 650 8px/1 var(--font-geist-mono); letter-spacing: .12em; color: var(--a-ink-soft); }
.greeting strong { font-family: Georgia, serif; font-size: 21px; font-weight: 400; letter-spacing: -.01em; }
.greeting span { font-size: 10px; color: var(--a-ink-soft); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat { background: var(--a-card); border: 1px solid var(--a-border); border-radius: 11px; padding: 9px 5px; text-align: center; }
.stat b { display: block; font-size: 17px; font-weight: 650; letter-spacing: -.03em; }
.stat span { font-size: 7.5px; color: var(--a-ink-soft); line-height: 1.25; display: block; margin-top: 2px; }
.stat.alert b { color: var(--a-error); }

.mcard { display: grid; grid-template-columns: 30px 1fr 12px; gap: 10px; align-items: center; background: var(--a-card); border: 1px solid var(--a-border); border-radius: 12px; padding: 11px 12px; }
.mcard.urgent { border-color: rgba(166,27,46,.25); background: linear-gradient(to right, var(--a-error-tint), var(--a-card) 55%); }
.mcard .mi { width: 28px; height: 28px; border-radius: 8px; background: var(--a-primary-tint); color: var(--a-primary); display: grid; place-items: center; font-size: 13px; }
.mcard.urgent .mi { background: var(--a-error-tint); color: var(--a-error); }
.mcard div { min-width: 0; }
.mcard b { font-size: 12px; display: flex; align-items: center; gap: 6px; }
.mcard small { display: block; font-size: 9px; color: var(--a-ink-soft); margin-top: 1px; }
.mcard .ch { color: var(--a-ink-soft); }
.badge { background: var(--a-error); color: #fff; border-radius: 99px; font: 700 8px/1 var(--font-geist-mono); padding: 3px 5px; font-style: normal; }

.datebox { background: var(--a-card); border: 1px solid var(--a-border); border-radius: 9px; padding: 9px 12px; font-size: 12px; }
.datebox.placeholder { color: var(--a-ink-soft); }
.dayline { display: flex; align-items: center; gap: 5px; font: 600 9px/1 var(--font-geist-mono); color: var(--a-ink-soft); padding: 1px 2px; }
.dayline .ok { color: var(--a-primary); }
.dayline .bad { color: var(--a-error); }
.dayline .sep { opacity: .5; }

.sect-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 2px 2px; }
.sect-head span { font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.sect-head span::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--type-unmarked); }
.sect-head.session span { color: var(--type-session-ink); } .sect-head.session span::before { background: var(--type-session); }
.sect-head.family span { color: var(--type-family-ink); } .sect-head.family span::before { background: var(--type-family); }
.sect-head.lower span { color: var(--type-lower-ink); } .sect-head.lower span::before { background: var(--type-lower); }
.sect-head small { font: 600 8px/1 var(--font-geist-mono); color: var(--a-ink-soft); }

.acard { position: relative; background: var(--a-card); border: 1px solid var(--a-border); border-radius: 12px; padding: 11px 12px 11px 14px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.acard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.acard.t-session::before { background: var(--type-session); }
.acard.t-family::before { background: var(--type-family); }
.acard.t-lower::before { background: var(--type-lower); }
.acard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acard-head strong { font-size: 12px; font-weight: 650; line-height: 1.3; }
.acard-line { font-size: 10px; color: var(--a-ink-soft); line-height: 1.4; }
.acard-line.result { color: var(--a-ink-mid); }
.acard-foot { display: flex; align-items: center; gap: 6px; }
.acard-foot.spread { justify-content: space-between; }
.acard-btns { display: flex; gap: 6px; margin-top: 4px; }
.apill { font: 650 8px/1 var(--font-geist-mono); letter-spacing: .04em; padding: 4px 7px; border-radius: 99px; background: var(--a-high); color: var(--a-ink-mid); white-space: nowrap; }
.apill.id { margin-left: auto; }
.apill.ok { background: var(--a-primary-tint); color: var(--a-primary); }
.apill.bad { background: var(--a-error); color: #fff; }
.apill.warn { background: var(--a-warn-tint); color: var(--a-warn); }
.apill.gold { background: var(--a-secondary-tint); color: #3f4633; }
.apill.type-s { background: var(--type-session-tint); color: var(--type-session-ink); }
.apill.type-l { background: var(--type-lower-tint); color: var(--type-lower-ink); }
.nextpill { font: 650 9px/1 var(--font-geist-mono); color: var(--a-primary); background: var(--a-primary-tint); padding: 4px 7px; border-radius: 99px; display: inline-block; }

.afield { display: flex; flex-direction: column; gap: 4px; }
.afield label { font-size: 9.5px; font-weight: 650; color: var(--a-ink-mid); }
.ainput { background: var(--a-card); border: 1px solid var(--a-line); border-radius: 8px; padding: 9px 11px; font-size: 11.5px; }
.ainput.tall { min-height: 46px; line-height: 1.45; }
.ainput.small { padding: 9px 8px; }
.ainput.placeholder, .datebox.placeholder { color: #a8a89a; }
.afield small { font-size: 8.5px; color: var(--a-ink-soft); }
.aselect { background: var(--a-card); border: 1px solid var(--a-line); border-radius: 8px; padding: 9px 11px; font-size: 11.5px; display: flex; justify-content: space-between; }
.abtn { background: var(--a-primary); color: #fff; border-radius: 99px; padding: 10px 14px; text-align: center; font-size: 11.5px; font-weight: 650; }
.abtn.ghost { background: transparent; color: var(--a-primary); border: 1px solid var(--a-line); }
.abtn.danger { background: var(--a-error); }
.opts { display: flex; flex-direction: column; gap: 4px; }
.opt { border: 1px solid var(--a-line); border-radius: 7px; padding: 7px 10px; font-size: 10.5px; color: var(--a-ink-soft); }
.opt.on { border-color: var(--a-primary); background: var(--a-primary-tint); color: var(--a-primary); font-weight: 650; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 10px; color: var(--a-ink-mid); line-height: 1.45; }
.cbox { width: 15px; height: 15px; border-radius: 4px; background: var(--a-primary); color: #fff; display: grid; place-items: center; font-size: 9px; flex: 0 0 auto; }
.modal-sub { font-size: 10px; color: var(--a-ink-soft); }
.hintbox { background: var(--a-container); border-radius: 9px; padding: 11px 12px; font-size: 10px; line-height: 1.5; color: var(--a-ink-mid); }
.hintbox.warn { background: var(--a-error-tint); color: #6d1c27; }

.lang-demo { display: flex; flex-direction: column; gap: 5px; }
.lang-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--a-card); border: 1px solid var(--a-border); border-radius: 9px; padding: 9px 11px; font-size: 11px; }
.lang-row span { color: var(--a-ink-soft); }
.lang-row b { font-weight: 650; }

.hitem { background: var(--a-card); border: 1px solid var(--a-border); border-radius: 11px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.hitem.faded { opacity: .58; }
.hdate { font: 700 10px/1 var(--font-geist-mono); display: flex; align-items: center; gap: 7px; }
.hflag { font: 650 7.5px/1 var(--font-geist-mono); background: var(--a-high); color: var(--a-ink-soft); padding: 3px 5px; border-radius: 99px; }
.hnext { font: 650 9px/1 var(--font-geist-mono); color: var(--a-primary); }
.hsum { font-size: 11px; line-height: 1.4; }
.hmeta { font-size: 9px; color: var(--a-ink-soft); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hbtn { border: 1px solid var(--a-line); border-radius: 99px; padding: 4px 8px; font-size: 8.5px; color: var(--a-ink-mid); white-space: nowrap; }
.hbtn.danger { color: var(--a-error); border-color: rgba(166,27,46,.3); }

.hero-case { display: flex; flex-direction: column; gap: 5px; padding-bottom: 9px; border-bottom: 1px solid var(--a-border); }
.hero-case strong { font-family: Georgia, serif; font-size: 16px; font-weight: 400; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.case-btns { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.cbtn { border: 1px solid var(--a-line); border-radius: 99px; padding: 6px 10px; font-size: 9px; color: var(--a-ink-mid); }
.cbtn.on { background: var(--a-primary); color: #fff; border-color: var(--a-primary); font-weight: 650; }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--a-border); font-size: 11px; }
.frow span { color: var(--a-ink-soft); font-size: 10px; }
.frow b.gold { color: var(--a-warn); }
.sect-title { font-size: 12px; font-weight: 700; padding: 8px 2px 2px; display: flex; align-items: center; gap: 8px; }
.sect-title.danger { color: var(--a-error); }
.sect-title .count { font: 650 8px/1 var(--font-geist-mono); background: var(--a-high); padding: 4px 6px; border-radius: 99px; color: var(--a-ink-soft); }

.compose { background: var(--a-container); border-radius: 11px; padding: 10px; display: flex; flex-direction: column; gap: 7px; }
.compose-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quota { font: 650 9px/1 var(--font-geist-mono); color: var(--a-ink-soft); background: var(--a-container); border-radius: 99px; padding: 7px 11px; width: fit-content; }
.tokenbox { background: var(--a-primary-tint); border-radius: 9px; padding: 11px 12px; font-size: 9.5px; color: #26391b; line-height: 1.5; }
.token { font: 600 9px/1.4 var(--font-geist-mono); word-break: break-all; background: rgba(255,255,255,.6); border-radius: 6px; padding: 7px 8px; margin: 6px 0; }
.ziplist { display: flex; flex-direction: column; gap: 4px; }
.zrow { background: var(--a-card); border: 1px solid var(--a-border); border-radius: 7px; padding: 8px 10px; font: 600 10px/1 var(--font-geist-mono); color: var(--a-ink-mid); }

.flow { gap: 12px; align-items: center; text-align: center; padding: 22px 16px; }
.flow-in { background: var(--a-primary); color: #fff; border-radius: 99px; padding: 10px 20px; font-size: 12px; font-weight: 650; }
.flow-arrow { color: var(--a-ink-soft); }
.flow-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 100%; }
.fbox { background: var(--a-card); border: 1px solid var(--a-border); border-radius: 9px; padding: 10px 5px; font-size: 8.5px; line-height: 1.3; color: var(--a-ink-mid); }
.fbox b { display: block; width: 17px; height: 17px; margin: 0 auto 5px; border-radius: 50%; background: var(--a-primary); color: #fff; font: 650 9px/17px var(--font-geist-mono); }
.flow-note { font: 650 9px/1 var(--font-geist-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--a-primary); }

/* ==========================================================================
   PRACTICE BLOCKS (the interactive demos)
   ========================================================================== */
.practice { border: 1px solid rgba(18,16,15,.24); border-radius: 14px; overflow: hidden; background: var(--cream); box-shadow: 0 22px 46px rgba(38,46,34,.13); position: sticky; top: 112px; }
.practice-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(245,240,231,.7); font-size: 13px; font-weight: 650; }
.practice-tag { font: 650 8px/1 var(--font-geist-mono); letter-spacing: .11em; text-transform: uppercase; background: var(--coral); color: #fff; padding: 5px 8px; border-radius: 99px; }
.practice .stage-body { padding: 20px 22px 24px; max-height: 70vh; overflow-y: auto; }
.practice.dark { background: rgba(24, 22, 20, .93); border-color: #45403c; color: #e8e3de; }
.practice.dark .practice-head { background: rgba(0,0,0,.25); border-bottom-color: #45403c; color: #fff; }

.mini-form { display: flex; flex-direction: column; gap: 13px; }
.mini-field { display: flex; flex-direction: column; gap: 6px; }
.mini-field label { font: 600 8px/1 var(--font-geist-mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.mini-field input, .mini-field textarea { border: 1px solid var(--line); border-radius: 7px; padding: 10px 11px; font-size: 12.5px; background: white; color: var(--ink); width: 100%; }
.mini-field textarea { resize: none; min-height: 54px; line-height: 1.45; }
.mini-field input:focus, .mini-field textarea:focus { outline: 2px solid rgba(49,88,184,.35); outline-offset: 1px; }
.mini-field input:disabled { background: #f4f1ea; color: var(--muted); }

.choice-set { display: flex; flex-direction: column; gap: 7px; }
.choice { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; cursor: pointer; background: white; transition: .16s ease; }
.choice:hover { border-color: rgba(18,16,15,.4); }
.choice.selected { border-color: var(--blue); background: #f2f5fd; box-shadow: inset 0 0 0 1px var(--blue); }
.choice i { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid #b3aca4; flex: 0 0 auto; margin-top: 1px; position: relative; }
.choice.selected i { border-color: var(--blue); }
.choice.selected i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--blue); }
.choice div { display: flex; flex-direction: column; gap: 2px; }
.choice strong { font-size: 12.5px; font-weight: 600; }
.choice small { font-size: 10.5px; color: var(--muted); line-height: 1.45; }

.stage-actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.stage-btn { border: 0; border-radius: 99px; background: var(--ink); color: white; padding: 10px 17px; font-size: 12px; font-weight: 650; cursor: pointer; transition: .18s ease; }
.stage-btn:hover { background: var(--coral-dark); }
.stage-btn.ghost { background: none; color: var(--muted); border: 1px solid var(--line); }
.stage-btn.ghost:hover { background: none; border-color: var(--ink); color: var(--ink); }
.stage-hint { font-size: 11px; color: var(--muted); }

.tables { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.table-col { border: 1px solid var(--line); border-radius: 9px; background: white; overflow: hidden; }
.table-col > header { padding: 9px 10px; border-bottom: 1px solid var(--line); background: #faf7f1; }
.table-col > header b { display: block; font: 650 7px/1 var(--font-geist-mono); letter-spacing: .1em; color: var(--coral-dark); margin-bottom: 4px; }
.table-col > header span { font-size: 10px; font-weight: 600; }
.table-col > header small { display: block; font-size: 8.5px; color: var(--muted); margin-top: 2px; }
.row-list { padding: 7px; display: flex; flex-direction: column; gap: 6px; }
.trow { border: 1px solid var(--line); border-radius: 6px; padding: 8px 9px; font-size: 10px; line-height: 1.45; background: white; }
.trow.fresh { animation: rowIn .45s ease; border-color: var(--ok); background: #f2f8f0; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } }
.trow.closed { opacity: .62; background: #f6f4f0; }
.trow.superseded { opacity: .58; background: #f6f4f0; }
.trow b { display: block; font: 650 8px/1 var(--font-geist-mono); color: var(--muted); margin-bottom: 4px; }
.trow .stat { display: inline-block; font: 650 7px/1 var(--font-geist-mono); letter-spacing: .06em; padding: 3px 6px; border-radius: 99px; margin-top: 5px; }
.stat-scheduled { background: #e6ecf6; color: var(--type-session-ink); }
.stat-completed { background: #e4f0e0; color: var(--ok); }
.stat-live { background: #e4f0e0; color: var(--ok); }
.stat-dead { background: #eeeae4; color: var(--muted); }
.empty-slot { padding: 13px 9px; font-size: 10px; color: #a49d95; text-align: center; font-style: italic; }

.movements { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 13px; }
.movements > b { display: block; font: 650 7px/1 var(--font-geist-mono); letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.movements ol { display: flex; flex-direction: column; gap: 5px; }
.movements li { display: flex; align-items: center; gap: 9px; font-size: 11px; color: #a49d95; transition: color .25s ease; }
.movements li span { width: 17px; height: 17px; flex: 0 0 auto; border-radius: 50%; border: 1px solid #d5cec5; display: grid; place-items: center; font: 650 7px/1 var(--font-geist-mono); color: #b5aea6; transition: .25s ease; }
.movements li.on { color: var(--ink); }
.movements li.on span { background: var(--ok); border-color: var(--ok); color: white; }
.txn-banner { margin-top: 12px; border-radius: 7px; padding: 10px 12px; font-size: 11px; line-height: 1.5; background: #edf3e9; color: #3f4b3c; }
.txn-banner.warn { background: var(--error-tint); color: #7c1b28; }
.txn-banner b { font-weight: 650; }

.reason-legend { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 13px; }
.an-row { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.an-row:last-child { border-bottom: 0; }
.an-row > i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.an-row.notreported > i { background: var(--error); }
.an-row.nonext > i { background: var(--gold); }
.an-row div { display: flex; flex-direction: column; min-width: 0; }
.an-row strong { font-size: 12.5px; }
.an-row small { font-size: 10px; color: var(--muted); margin-top: 2px; }
.an-row > span { font: 650 7px/1 var(--font-geist-mono); letter-spacing: .06em; padding: 5px 8px; border-radius: 99px; white-space: nowrap; }
.an-row.notreported > span { background: var(--error-tint); color: var(--error); }
.an-row.nonext > span { background: #f9f0d8; color: #7a5a10; }

.wall { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wall-side { border: 1px solid #45403c; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.04); }
.wall-side > header { padding: 11px 13px; border-bottom: 1px solid #45403c; }
.wall-side > header b { display: block; font: 650 7px/1 var(--font-geist-mono); letter-spacing: .1em; color: #ff886e; margin-bottom: 4px; }
.wall-side > header span { font-size: 12px; font-weight: 600; color: white; }
.wall-side > header small { display: block; font: 500 8px/1 var(--font-geist-mono); color: #8a837d; margin-top: 5px; }
.wall-body { padding: 11px 13px 14px; display: flex; flex-direction: column; gap: 6px; }
.wall-row { border: 1px solid #45403c; border-radius: 6px; padding: 7px 9px; font-size: 10.5px; color: #cfc9c3; }
.wall-row small { display: block; font: 600 8px/1 var(--font-geist-mono); color: #8a837d; margin-top: 3px; }
.wall-miss { border: 1px dashed #5c4340; border-radius: 6px; padding: 13px 9px; text-align: center; font-size: 10.5px; color: #c98b7e; font-style: italic; }
.wall-search { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.wall-search input { flex: 1 1 190px; border: 1px solid #45403c; background: rgba(0,0,0,.3); border-radius: 7px; padding: 10px 12px; color: white; font-size: 12px; }
.wall-search input:focus { outline: 2px solid rgba(255,136,110,.4); outline-offset: 1px; }
.wall-search button { border: 0; border-radius: 99px; background: #ff886e; color: #201a18; padding: 10px 16px; font-size: 11.5px; font-weight: 650; cursor: pointer; }
.wall-search button:hover { background: white; }
.wall-verdict { margin-top: 13px; border-radius: 8px; padding: 12px 14px; font-size: 12px; line-height: 1.55; background: rgba(255,136,110,.11); color: #e8d7d1; }
.wall-verdict b { color: white; }
.wall-verdict code { font: 600 11px/1 var(--font-geist-mono); color: #ffb9a6; }

/* ---------------- closing + footer ---------------- */
.closing { min-height: 520px; padding: 110px 6vw; background: rgba(255, 90, 54, .86); color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.closing > *:not(.early-orbit) { position: relative; z-index: 2; }
.section-kicker.light { color: #ffe1d9; margin-bottom: 26px; }
.closing h2 { font-size: clamp(50px, 6.2vw, 92px); line-height: .89; letter-spacing: -.07em; font-weight: 560; margin-bottom: 26px; }
.closing h2 em { color: #201a18; }
.closing > p:not(.section-kicker) { max-width: 620px; color: #ffe5dd; font-size: 17px; line-height: 1.6; }
.closing-rule { width: 54px; height: 1px; background: rgba(255,255,255,.5); margin-top: 32px; }
.early-orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.26); }
.orbit-one { width: 850px; height: 850px; top: 60px; }
.orbit-two { width: 560px; height: 560px; top: 205px; }
.closing::before, .closing::after { content: ""; position: absolute; width: 14px; height: 14px; background: white; border-radius: 50%; }
.closing::before { left: 18%; top: 33%; }
.closing::after { right: 15%; bottom: 25%; background: var(--ink); }

footer { padding: 62px 5vw 25px; background: rgba(18, 16, 15, .92); color: white; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand .brand-mark { background: var(--coral); }
.footer-brand div { display: flex; flex-direction: column; }
.footer-brand strong { font-size: 22px; letter-spacing: -.04em; }
.footer-brand span { font-size: 11px; color: #8f8984; }
.footer-links { display: flex; gap: 26px; justify-content: flex-end; font-size: 12px; margin-top: -30px; flex-wrap: wrap; }
.footer-links a:hover { color: #ff886e; }
.footer-bottom { margin-top: 58px; border-top: 1px solid #3c3835; padding-top: 22px; display: grid; grid-template-columns: 1fr 1fr 1fr; font-size: 9px; color: #8f8984; }
.footer-bottom span:nth-child(2) { text-align: center; }
.footer-bottom a { text-align: right; color: white; }

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .guide { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .lesson { grid-template-columns: 1fr; gap: 26px; }
  .phone, .practice { position: static; }
  .phone { max-width: 460px; }
}

@media (max-width: 780px) {
  .court-canvas { display: none; }
  .site-header { height: 68px; padding: 0 20px; display: flex; justify-content: space-between; }
  .header-spacer { display: none; }
  .menu-toggle { display: flex; width: 42px; height: 42px; flex-direction: column; justify-content: center; gap: 6px; cursor: pointer; z-index: 3; }
  .menu-toggle span { width: 21px; border-top: 1.5px solid var(--ink); }
  .nav { position: absolute; top: 67px; left: 0; right: 0; padding: 20px; flex-direction: column; align-items: flex-start; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); transform: translateY(-140%); transition: transform .25s ease; z-index: -1; }
  .nav.open { transform: translateY(0); }
  .nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
  :target { scroll-margin-top: 84px; }
  .guide-hero { min-height: 0; padding: 108px 20px 56px; }
  .hero-copy { padding: 0; }
  .hero-lead { font-size: 16px; }
  .hero-facts { gap: 24px; }
  .hero-facts b { font-size: 26px; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 18px; }
  .guide { padding: 0 20px 30px; }
  .lessons { padding: 24px 0 10px; }
  .part h2 { font-size: 36px; }
  .lesson h3 { font-size: 25px; }
  .two-doors { grid-template-columns: 1fr; }
  .tables { grid-template-columns: 1fr; }
  .wall { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .practice .stage-body { padding: 16px 15px 20px; max-height: none; }
  .closing { min-height: 460px; padding: 90px 20px; }
  .closing h2 { font-size: 48px; }
  .footer-links { margin: 36px 0 0; justify-content: flex-start; }
  .footer-bottom { grid-template-columns: 1fr; gap: 10px; }
  .footer-bottom span:nth-child(2), .footer-bottom a { text-align: left; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .flow-grid { grid-template-columns: 1fr; }
  .closing h2 { font-size: 40px; }
  .lesson h3 { font-size: 22px; }
}

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