/* Hao Dang Team onboarding — calm, card-based stepper inspired by clean onboarding flows.
   Brand navy from the HD monogram; a brighter blue is reserved for actions and progress. */

:root {
  --navy: #0d3466;
  --ink: #18212d;
  --slate: #566170;
  --faint: #8a94a3;
  --page: #e8ebef;
  --panel: #f5f6f8;
  --card: #ffffff;
  --line: #e0e4ea;
  --action: #1858c9;
  --action-hover: #1249aa;
  --action-tint: #e9f0fc;
  --done: #1d8556;
  --done-tint: #e6f4ec;
  --warn: #9a5b00;
  --warn-tint: #fdf4e3;

  --serif: 'Marcellus', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 4px;
  --r-md: 6px;
  --shadow: 0 1px 2px rgba(16, 32, 64, .05), 0 8px 24px -12px rgba(16, 32, 64, .12);
  --sidebar: 420px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--action); }
a:hover { color: var(--action-hover); }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--card); padding: 8px 14px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh; }
main { padding: 40px clamp(16px, 4vw, 56px) 64px; outline: none; min-width: 0; }

.topbar { display: none; }

.sidebar {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  background: var(--card); border-right: 1px solid var(--line);
  padding: 28px 20px 40px;
}
.brand { display: block; width: 150px; margin: 0 auto 24px; }
.overall { margin-bottom: 18px; }
.overall p { margin: 6px 0 0; font-size: 13px; color: var(--slate); }
.bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--action); transition: width .3s ease; }

.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; margin-bottom: 16px; color: var(--faint); }
.search:focus-within { border-color: var(--action); }
.search svg { width: 16px; height: 16px; }
.search input { border: 0; outline: 0; font: inherit; font-size: 15px; padding: 9px 0; width: 100%; background: none; color: var(--ink); }

.nav-week { border-top: 1px solid var(--line); }
.nav-week summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; padding: 12px 4px; }
.nav-week summary::-webkit-details-marker { display: none; }
.nav-week .wk { font-size: 13px; color: var(--slate); }
.nav-week .wt { font-weight: 500; }
.nav-week .wc { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.nav-week ul { list-style: none; margin: 0 0 10px; padding: 0; }
.nav-week li a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: 15px; min-height: 36px; }
.nav-week li a:hover { background: var(--panel); }
.nav-week li a.active { background: var(--action-tint); color: var(--action); }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c3cad4; display: grid; place-items: center; }
.dot.part { border-color: var(--action); background: linear-gradient(90deg, var(--action-tint) 50%, transparent 50%); }
.dot.full { border-color: var(--done); background: var(--done); color: #fff; }
.dot svg { width: 11px; height: 11px; stroke-width: 3; }

.results { list-style: none; margin: 0; padding: 0; }
.results a { display: block; padding: 8px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.results a:hover { background: var(--panel); }
.results small { display: block; color: var(--slate); font-size: 13px; }
.empty { color: var(--slate); font-size: 14px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 18px; border-radius: var(--r-sm); font: 500 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease; }
.btn.primary { background: var(--action); color: #fff; }
.btn.primary:hover { background: var(--action-hover); color: #fff; }
.btn.ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn.ghost:hover { border-color: #b9c1cc; color: var(--ink); }
.btn.text { color: var(--ink); }
.btn.text:hover { background: var(--panel); color: var(--ink); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); border: 0; background: none; color: var(--slate); cursor: pointer; }
.icon-btn:hover { background: var(--panel); color: var(--ink); }

/* ---------- Home ---------- */
.home { max-width: 1080px; margin: 0 auto; }
.hero { background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); display: grid; grid-template-columns: 1.4fr 1fr; overflow: hidden; position: relative; }
.hero::before { content: ''; position: absolute; inset: 0 auto auto 0; height: 2px; width: 38%; background: var(--action); }
.hero > div { padding: 56px 48px; }
.hero h1 { font: 400 clamp(32px, 4vw, 44px)/1.15 var(--serif); color: var(--navy); margin: 0 0 16px; letter-spacing: -.01em; }
.hero-sub { color: var(--slate); max-width: 46ch; margin: 0 0 28px; font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { margin: 0; background: var(--panel); padding: 56px 40px; display: grid; gap: 22px; align-content: center; }
.hero-meta dt { font-size: 13px; color: var(--slate); }
.hero-meta dd { margin: 2px 0 0; font-weight: 500; }

.weeks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; counter-reset: wk; }
.week-link { display: grid; grid-template-columns: 220px 1fr 220px; gap: 8px 32px; align-items: start; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 24px 28px; text-decoration: none; color: inherit; border: 1px solid transparent; transition: border-color .15s ease; }
.week-link:hover { border-color: #c9d3e2; color: inherit; }
.week-head .wk-num { font-size: 13px; color: var(--slate); }
.week-head h2 { font: 400 24px/1.25 var(--serif); color: var(--navy); margin: 2px 0 0; }
.week-link > p { margin: 0; color: var(--slate); grid-column: 2; }
.week-link .mods { font-size: 14px; color: var(--faint); grid-column: 2; }
.week-foot { grid-column: 3; grid-row: 1 / span 2; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; font-size: 14px; color: var(--slate); align-self: center; font-variant-numeric: tabular-nums; }
.week.complete .bar span { background: var(--done); }
.week-foot svg { color: var(--faint); }

/* ---------- Lesson card (split stepper) ---------- */
.step-card {
  position: relative; max-width: 1180px; margin: 0 auto;
  background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: 1fr auto;
  min-height: min(760px, calc(100dvh - 80px)); overflow: hidden;
}
.card-progress { position: absolute; inset: 0 0 auto 0; height: 2px; background: transparent; z-index: 2; }
.card-progress span { display: block; height: 100%; background: var(--action); transition: width .3s ease; }
.close { position: absolute; top: 14px; right: 14px; z-index: 3; }

.steps-panel { grid-row: 1 / span 2; background: var(--panel); padding: 28px 24px; display: flex; flex-direction: column; gap: 20px; }
.step-label { margin: 0; font-size: 13px; color: var(--slate); }
.steps-toggle summary { display: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.steps a { display: flex; gap: 12px; align-items: flex-start; padding: 7px 6px; border-radius: var(--r-sm); text-decoration: none; color: var(--faint); font-size: 14px; line-height: 1.4; }
.steps a:hover { background: rgba(0, 0, 0, .035); color: var(--ink); }
.steps .done a { color: var(--slate); }
.steps .current a { color: var(--ink); font-weight: 500; }
.ring { width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 1.5px solid #c6ccd5; display: grid; place-items: center; flex: none; }
.steps .current .ring { border: 2px solid var(--ink); }
.steps .done .ring { border-color: var(--done); color: var(--done); }
.ring svg { width: 12px; height: 12px; stroke-width: 3; }
.panel-foot { margin: auto 0 0; display: flex; gap: 10px; font-size: 13px; color: var(--faint); line-height: 1.5; }
.panel-foot svg { width: 16px; height: 16px; margin-top: 2px; }

.step-body { padding: 72px clamp(24px, 5vw, 72px) 32px; min-width: 0; }
.step-body h1 { font: 400 clamp(26px, 3vw, 34px)/1.2 var(--sans); letter-spacing: -.015em; margin: 0 0 20px; max-width: 26ch; outline: none; text-wrap: balance; }

.step-foot { grid-column: 2; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 20px clamp(24px, 5vw, 72px) 28px; border-top: 1px solid var(--line); }
.mark { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--slate); cursor: pointer; min-height: 40px; }
.mark input { width: 18px; height: 18px; accent-color: var(--done); margin: 0; cursor: pointer; }
.nav-btns { display: flex; gap: 12px; margin-left: auto; }

/* ---------- Prose ---------- */
.prose { max-width: 68ch; }
.prose > :first-child { margin-top: 0; }
.prose .lede { font-size: 18px; color: var(--slate); margin: 0 0 20px; }
.prose h3 { font: 600 16px/1.4 var(--sans); margin: 28px 0 8px; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 16px; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--faint); }
.prose blockquote.script { margin: 12px 0 20px; padding: 16px 20px; background: var(--panel); border-left: 2px solid var(--navy); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: ''; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border: 1.5px solid #c6ccd5; border-radius: 3px; }

.timeline { list-style: none; padding-left: 0 !important; border-left: 1.5px solid var(--line); margin-left: 6px !important; }
.timeline li { position: relative; padding: 4px 0 10px 22px; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--navy); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }

.callout { margin: 20px 0; padding: 14px 18px; border-radius: var(--r-sm); font-size: 15px; }
.callout strong { display: block; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.callout p { margin: 0; }
.callout.tip { background: var(--action-tint); }
.callout.tip strong { color: var(--action); }
.callout.note { background: var(--panel); border-left: 2px solid var(--ink); }
.callout.fill { background: var(--warn-tint); border: 1px dashed #e2b866; }
.callout.fill strong { color: var(--warn); }

.table-wrap { overflow-x: auto; margin: 12px 0 20px; border: 1px solid var(--line); border-radius: var(--r-sm); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--slate); background: var(--panel); font-size: 14px; }
tr:last-child td { border-bottom: 0; }
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Call-script dialog */
.dialog { display: grid; gap: 8px; margin: 16px 0 20px; }
.dialog p { margin: 0; max-width: 54ch; padding: 10px 14px; border-radius: var(--r-md); font-size: 15px; }
.dialog p span { display: block; font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.dialog .me { background: var(--action-tint); justify-self: start; }
.dialog .me span { color: var(--action); }
.dialog .them { background: var(--panel); justify-self: end; }
.dialog .them span { color: var(--slate); }

/* People */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 8px 0 16px; }
.person { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
.person h4 { margin: 0; font-size: 16px; font-weight: 600; }
.person .role { margin: 0 0 6px; font-size: 13px; color: var(--slate); }
.person p { margin: 0; font-size: 14px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font: 400 16px var(--serif); flex: none; }

/* Community */
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0 0 20px; padding: 14px 18px; background: var(--panel); border-radius: var(--r-sm); }
.facts dt { font-size: 13px; color: var(--slate); }
.facts dd { margin: 0; font-weight: 500; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pros-cons section { border-top: 2px solid; padding-top: 4px; }
.pros-cons .pro { border-color: var(--done); }
.pros-cons .con { border-color: var(--warn); }
.pros-cons h3 { margin-top: 10px !important; }

.link-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 12px 0; }
.link-list a { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; font-weight: 500; }
.link-list a:hover { border-color: var(--action); }

/* Media */
.media { margin: 24px 0; max-width: 820px; }
.media video { width: 100%; aspect-ratio: 16 / 9; background: #0c1520; border-radius: var(--r-md); }
.media .vimeo { aspect-ratio: 16 / 9; background: #0c1520; border-radius: var(--r-md); overflow: hidden; }
.media .vimeo iframe { width: 100%; height: 100%; border: 0; display: block; }
.media figcaption { margin-top: 8px; font-size: 13px; color: var(--faint); }
.media.audio audio { width: 100%; max-width: 480px; }
.media.portrait img { width: 220px; aspect-ratio: 1920 / 2521; object-fit: cover; border-radius: var(--r-md); }

.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.download { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; }
.download:hover { border-color: var(--action); color: var(--action); }
.downloads.top { margin: -4px 0 24px; }
.downloads.top .download { background: var(--action); border-color: var(--action); color: #fff; }
.downloads.top .download:hover { background: var(--action-hover); border-color: var(--action-hover); color: #fff; }

/* ---------- Apps ---------- */
.step-card.wide { max-width: 1280px; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 24px; }
.step-card.wide .step-body { padding-left: clamp(24px, 3vw, 48px); padding-right: clamp(24px, 3vw, 48px); }
.app { border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
.app-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.app-mono { width: 40px; height: 40px; border-radius: 10px; background: var(--panel); color: var(--navy); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.app h3 { margin: 0; font-size: 16px; font-weight: 600; }
.app-head p { margin: 2px 0 0; font-size: 14px; color: var(--slate); line-height: 1.45; }
.qrs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qr { display: grid; justify-items: center; gap: 8px; padding: 12px 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; }
.qr:hover { border-color: var(--action); color: var(--action); }
.qr img { width: 100%; max-width: 132px; height: auto; aspect-ratio: 1; }
.qr span { display: inline-flex; align-items: center; gap: 6px; }
.qr svg { width: 16px; height: 16px; }
.apps-help { font-size: 14px; color: var(--faint); margin: 16px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .week-link { grid-template-columns: 1fr; }
  .week-link > p, .week-link .mods, .week-foot { grid-column: 1; grid-row: auto; }
}

@media (max-width: 860px) {
  :root { --sidebar: 0px; }
  .shell { display: block; }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); padding: 6px 8px; }
  .topbar-logo { display: block; }
  .topbar-logo img { height: 28px; width: auto; }
  .topbar-progress { margin-left: auto; padding-right: 8px; font-size: 13px; color: var(--slate); font-variant-numeric: tabular-nums; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: min(320px, 86vw); transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  .scrim { position: fixed; inset: 0; z-index: 30; background: rgba(12, 21, 32, .4); }
  main { padding: 16px 16px 48px; }

  .hero { grid-template-columns: 1fr; }
  .hero > div { padding: 36px 24px; }
  .hero-meta { padding: 24px; }

  .step-card { grid-template-columns: 1fr; grid-template-rows: auto; min-height: 0; }
  .steps-panel { grid-row: auto; padding: 20px 16px 16px; gap: 10px; }
  .steps-toggle summary { display: list-item; cursor: pointer; font-weight: 500; min-height: 32px; }
  .steps-toggle[open] summary { margin-bottom: 8px; }
  .panel-foot { display: none; }
  .step-body { padding: 24px 16px 16px; }
  .step-foot { grid-column: 1; padding: 16px; }
  .nav-btns { width: 100%; }
  .nav-btns .btn.primary { flex: 1; }
  .close { top: 10px; right: 6px; }
  .pros-cons, .grid-2 { grid-template-columns: 1fr; }
  .apps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .sidebar, .topbar, .step-foot, .close, .steps-panel { display: none !important; }
  .shell, .step-card { display: block; box-shadow: none; }
  body { background: #fff; }
}

.site-link { display: block; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--slate); }

/* Signed-in state */
body.checking main, body.checking .sidebar, body.checking .topbar { visibility: hidden; }
.account { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.who { margin: 0 0 8px; display: grid; }
.who-name { font-weight: 500; }
.who-email { color: var(--slate); font-size: 13px; overflow-wrap: anywhere; }
.admin-link { display: block; padding: 8px 0; font-weight: 500; }
.signout { background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 12px; font: 500 14px var(--sans); color: var(--ink); cursor: pointer; min-height: 36px; }
.signout:hover { border-color: #b9c1cc; }
.demo-note { margin: 10px 0 0; font-size: 12px; color: var(--warn); }
.handouts-link { display: block; margin-top: 12px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--action); color: #fff; font-weight: 500; font-size: 14px; text-align: center; text-decoration: none; }
.handouts-link:hover { filter: brightness(1.08); color: #fff; }

/* Team handouts page: same cards as the lesson, spread across the full width */
.handouts-page { width: 100%; }
.handouts-head { background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 40px 48px; position: relative; overflow: hidden; }
.handouts-head::before { content: ''; position: absolute; inset: 0 auto auto 0; height: 2px; width: 38%; background: var(--action); }
.handouts-head h1 { font: 400 clamp(30px, 3.5vw, 40px)/1.15 var(--serif); color: var(--navy); margin: 0 0 12px; }
.handouts-head .hero-sub { margin: 0; max-width: 60ch; }
.handouts-page .handout-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; margin: 28px 0; }
.handouts-notes { background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 28px 48px; }
.handouts-notes h3 { margin-top: 0; }
@media (max-width: 720px) { .handouts-head, .handouts-notes { padding: 24px; } .handouts-page .handout-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; margin: 0; padding: 12px 18px; background: var(--ink); color: #fff; border-radius: var(--r-md); font-size: 15px; max-width: calc(100% - 32px); }

/* Quiz gate */
.nav-week li a.locked { color: var(--faint); }
.dot svg { width: 10px; height: 10px; }
.btn.is-disabled { background: #c9d1dc; color: #fff; cursor: not-allowed; }
.btn.is-disabled svg { width: 16px; height: 16px; }
.locked-card { max-width: 560px; margin: 8vh auto 0; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 48px 40px; text-align: center; }
.locked-card h1 { font: 400 26px/1.25 var(--sans); margin: 16px 0 8px; outline: none; }
.locked-card p { color: var(--slate); margin: 0 0 24px; }
.lock-badge { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--panel); color: var(--slate); }
.lock-badge svg { width: 24px; height: 24px; }

/* Quiz */
.quiz { max-width: 68ch; margin-top: 8px; }
.q { border: 0; padding: 0; margin: 0 0 28px; }
.q legend { font-weight: 500; margin-bottom: 10px; padding: 0; }
.q-num { color: var(--slate); margin-right: 4px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 8px; cursor: pointer; min-height: 48px; transition: border-color .15s ease, background-color .15s ease; }
.opt:hover { border-color: #b9c1cc; }
.opt input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--action); flex: none; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--action); background: var(--action-tint); }
.opt:has(input:focus-visible) { outline: 2px solid var(--action); outline-offset: 2px; }
.quiz-error { background: #fdecea; color: #b42318; padding: 10px 14px; border-radius: var(--r-sm); font-size: 15px; }
.quiz-history { font-size: 14px; color: var(--slate); margin: 0 0 16px; }
.quiz-result { display: flex; gap: 24px; align-items: center; padding: 24px; border-radius: var(--r-md); margin: 8px 0 16px; outline: none; max-width: 68ch; }
.quiz-result.pass { background: var(--done-tint); }
.quiz-result.fail { background: var(--warn-tint); }
.quiz-result .score { margin: 0; font: 400 48px/1 var(--serif); min-width: 2.4em; text-align: center; }
.quiz-result.pass .score { color: var(--done); }
.quiz-result.fail .score { color: var(--warn); }
.quiz-result .score svg { width: 40px; height: 40px; }
.quiz-result h2 { font: 600 18px/1.35 var(--sans); margin: 0 0 4px; }
.quiz-result p { margin: 0; color: var(--slate); }
.missed { color: var(--slate); }
.review { padding-left: 1.4em; max-width: 68ch; }
.review li { margin-bottom: 14px; }
.review li p { margin: 0; }
.review .ans { font-size: 15px; display: flex; gap: 6px; align-items: center; color: var(--slate); }
.review .right .ans { color: var(--done); }
.review .wrong .q, .review .wrong .ans { color: #c0362c; }
.review .wrong .ans { font-weight: 500; }
.review .wrong .ans.fix { color: var(--done); font-weight: 400; }
.review .wrong { padding: 8px 12px; margin-left: -12px; background: #fdecea; border-radius: var(--r-sm); }
.review .ans svg { width: 16px; height: 16px; }
.step-foot p.mark { margin: 0; gap: 6px; }
.step-foot p.mark svg { width: 18px; height: 18px; color: var(--done); }
@media (max-width: 860px) { .quiz-result { flex-direction: column; align-items: flex-start; gap: 8px; } }

/* Community home profile */
.homes th[scope="row"] { width: 34%; background: var(--panel); color: var(--slate); font-weight: 500; }
.homes td strong { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.as-of { color: var(--faint); font-size: 13px; }
.source-note { font-size: 13px; color: var(--faint); margin: -8px 0 24px; }
@media (max-width: 600px) { .homes th[scope="row"] { width: 40%; } }

.signature-example { margin: 12px 0 24px; max-width: 560px; }
.signature-example img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.signature-example figcaption { margin-top: 8px; font-size: 13px; color: var(--faint); }

/* Spreadsheet-style example table */
.sheet { border-radius: 2px; border-color: #d4d8de; }
.sheet table { font-size: 13px; width: 100%; min-width: 600px; table-layout: fixed; }
.sheet th, .sheet td { padding: 5px 7px; border: 1px solid #e1e4e8; line-height: 1.4; }
.sheet td, .sheet th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet td:last-child { white-space: normal; overflow: visible; }
.sheet td:last-child { min-width: 0; }
.sheet thead tr:not(.cols) th { background: #ececec; color: var(--ink); font-weight: 700; }
.sheet .cols th { background: #f6f6f6; color: var(--slate); font-weight: 400; text-align: center; font-size: 12px; padding: 3px 10px; }
.sheet .row-num, .sheet .cols th:first-child { background: #f6f6f6; color: var(--slate); font-weight: 400; text-align: center; font-size: 12px; width: 32px; padding: 6px 4px; }

/* Staff photos and contact links */
.avatar.photo { width: 64px; height: 64px; object-fit: cover; object-position: center 20%; background: var(--panel); }
.person .contact { display: grid; gap: 2px; margin-top: 8px; font-size: 14px; }
.person .contact a { text-decoration: none; overflow-wrap: anywhere; }
.person .contact a:hover { text-decoration: underline; }

/* Office staff: front desk group photo */
.office .person { flex-direction: column; }
.desk-team { list-style: none; margin: 0 0 4px; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 12px 20px; }
.desk-team li { display: grid; justify-items: center; gap: 6px; width: 88px; margin: 0; text-align: center; font-size: 14px; font-weight: 700; line-height: 1.3; }

.prose code { font-family: var(--sans); font-weight: 600; font-size: .95em; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; }

.name-rules { list-style: none; padding-left: 0 !important; display: grid; gap: 10px; }
.name-rules li { margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.name-rules .eg { display: block; margin-top: 4px; font-size: 15px; color: var(--slate); }

/* Reserve study walkthrough */
.rs-steps { list-style: none; padding-left: 0 !important; counter-reset: rs; display: grid; gap: 28px; margin-top: 16px !important; }
.rs-steps > li { counter-increment: rs; margin: 0; padding-left: 44px; position: relative; }
.rs-steps > li::before { content: counter(rs); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.rs-steps h4 { margin: 0 0 10px; font-size: 17px; font-weight: 600; }
.rs-shot { margin: 0 0 10px; max-width: 640px; }
.rs-shot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 1px 3px rgba(16, 32, 64, .06); }
.rs-steps p { margin: 0; }
@media (max-width: 600px) { .rs-steps > li { padding-left: 0; padding-top: 38px; } }
.rs-shot a { display: block; cursor: zoom-in; }
.rs-shot.wide { max-width: 760px; }

/* One-time welcome page */
.welcome-card { max-width: 680px; margin: 4vh auto 0; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 48px clamp(24px, 5vw, 56px); position: relative; overflow: hidden; }
.welcome-card::before { content: ''; position: absolute; inset: 0 auto auto 0; height: 2px; width: 40%; background: var(--action); }
.welcome-mark { width: 56px; height: auto; margin-bottom: 20px; }
.welcome-card h1 { font: 400 clamp(28px, 3.4vw, 38px)/1.2 var(--serif); color: var(--navy); margin: 0 0 12px; outline: none; text-wrap: balance; }
.welcome-sub { color: var(--slate); font-size: 17px; margin: 0 0 24px; }
.welcome-points { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.welcome-points li { padding: 14px 18px; background: var(--panel); border-radius: var(--r-sm); border-left: 3px solid var(--navy); }
.welcome-points li:nth-child(2) { background: var(--warn-tint); border-left-color: var(--warn); }
.welcome-stats { display: flex; gap: 32px; margin: 0 0 28px; }
.welcome-stats dt { font-size: 13px; color: var(--slate); }
.welcome-stats dd { margin: 0; font: 400 28px/1.1 var(--serif); color: var(--navy); }
.welcome-card .btn.primary { min-height: 48px; padding: 12px 24px; font-size: 16px; }
@media (max-width: 860px) { .welcome-card { margin-top: 0; padding: 32px 20px; } .welcome-card .btn.primary { width: 100%; } }

/* Copyable AI prompt */
.ai-prompt { margin: 12px 0 8px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); }
.ai-prompt p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; }
.copy-btn { min-height: 36px; padding: 6px 14px; font-size: 14px; }

/* Branching call scripts */
.prose h4.branch { font-size: 15px; font-weight: 600; margin: 22px 0 6px; padding-left: 10px; border-left: 3px solid var(--action); }
.branch-note { font-size: 15px; color: var(--slate); margin: 4px 0 6px; }
.sub-branch { margin-left: 20px; padding-left: 14px; border-left: 1px dashed var(--line); }
.prose h3.group { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--navy); }
.sheet-link .download { margin-top: 10px; background: var(--card); }

/* Home buying roadmap */
.roadmap { --buy: #2aa9b0; --close: #e2b23c; --rowh: 150px; --cy: 30px; margin: 24px 0 8px; padding: 24px 8px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.rm-title { text-align: center; color: var(--navy); font: 600 clamp(20px, 3vw, 28px)/1.1 var(--sans); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 20px; }
.rm-title span, .rm-title em { display: block; font: italic 400 16px/1.4 var(--serif); letter-spacing: 0; text-transform: none; color: var(--slate); }
.rm-rows, .rm-row > ol { list-style: none; margin: 0 !important; padding: 0 !important; }
.rm-row { position: relative; margin: 0 !important; }
.rm-row > ol { display: grid; grid-template-columns: repeat(4, 1fr); height: var(--rowh); position: relative; }
.rm-row.rev > ol { direction: rtl; }
.rm-row.rev .rm-step { direction: ltr; }
/* straight line through the icons */
.rm-row > ol::before { content: ''; position: absolute; top: var(--cy); left: 12.5%; right: 12.5%; height: 3px; background: var(--buy); }
.rm-row.closing > ol::before { background: var(--close); }
/* the U-turn at the end of each row */
.rm-row:not(:last-child)::after { content: ''; position: absolute; top: var(--cy); height: var(--rowh); width: 12.5%; border: 3px solid var(--buy); }
.rm-row:not(.rev):not(:last-child)::after { right: 0; border-left: 0; border-radius: 0 60px 60px 0; }
.rm-row.rev:not(:last-child)::after { left: 0; border-right: 0; border-radius: 60px 0 0 60px; }
.rm-row.to-close::after { border-color: var(--buy) transparent var(--close) var(--buy) !important; }
.rm-row.closing::after { border-color: var(--close) !important; }
.rm-row.closing.rev:not(:last-child)::after { border-right: 0 !important; }
.rm-row.to-close::after { border-right: 0 !important; }
.rm-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 0 6px; margin: 0 !important; z-index: 1; }
.rm-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 3px solid var(--buy); color: var(--buy); }
.closing .rm-icon { border-color: var(--close); color: #b8860b; }
.rm-icon svg { width: 28px; height: 28px; stroke-width: 1.8; }
.rm-num { position: absolute; top: 0; left: calc(50% + 18px); width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.rm-label { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink); max-width: 13ch; }
.rm-closed { display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin: 8px 0 0 6%; font: italic 400 clamp(36px, 6vw, 56px)/1 var(--serif); color: var(--navy); }
.rm-keys svg { width: 44px; height: 44px; color: #b8860b; stroke-width: 1.6; }
.rm-legend { display: flex; justify-content: flex-end; gap: 20px; margin: 8px 8px 0; font-size: 13px; color: var(--slate); }
.rm-legend span::before { content: ''; display: inline-block; width: 28px; height: 3px; margin-right: 8px; vertical-align: middle; background: var(--buy); }
.rm-legend .closing::before { background: var(--close); }

/* Talking points */
.tp-list { list-style: none; padding: 0 !important; display: grid; gap: 12px; margin-top: 12px !important; }
.tp { margin: 0 !important; padding: 14px 18px; border: 1px solid var(--line); border-left: 4px solid #2aa9b0; border-radius: var(--r-sm); background: var(--card); }
.tp.closing { border-left-color: #e2b23c; }
.tp h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.tp-num { width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; display: grid; place-items: center; flex: none; }
.tp ul { margin: 0 !important; }
.tp li { font-size: 15px; }

@media (max-width: 700px) {
  .rm-row > ol, .rm-row.rev > ol { grid-template-columns: 1fr; height: auto; direction: ltr; gap: 10px; padding-left: 4px !important; }
  .rm-row > ol::before, .rm-row::after { display: none; }
  .rm-rows { border-left: 3px solid var(--buy); margin-left: 34px !important; }
  .rm-step { flex-direction: row; text-align: left; gap: 12px; margin-left: -36px !important; padding: 6px 0; }
  .rm-row { margin-bottom: 10px !important; }
  .rm-icon { width: 52px; height: 52px; flex: none; }
  .rm-num { left: 36px; }
  .rm-label { max-width: none; }
  .rm-closed { margin-left: 4px; }
}
.prose h3.tp-part { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-left: 12px; border-left: 4px solid #2aa9b0; }
.prose h3.tp-part.closing { border-left-color: #e2b23c; }
.tp-part span { font-weight: 400; font-size: 14px; color: var(--slate); }
.tp-say { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink); }
.tp-opt { margin-left: 8px; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; background: var(--panel); color: var(--slate); border: 1px solid var(--line); }
.rm-label small { display: block; font-size: 11px; font-weight: 500; color: var(--slate); }
.strategy .tp-say { margin-bottom: 6px; }

/* Community boundary map */
.area-map { margin: 4px 0 20px; }
.area-map iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); }
.area-map figcaption { margin-top: 6px; font-size: 13px; color: var(--faint); }

/* Home product example photos */
.product-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 20px; }
.product-photos figure { margin: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--card); }
.product-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--panel); }
.product-photos figcaption { padding: 8px 10px; display: grid; gap: 2px; }
.product-photos figcaption strong { font-size: 14px; font-weight: 600; line-height: 1.3; }
.product-photos figcaption span { font-size: 11px; color: var(--faint); line-height: 1.3; overflow-wrap: anywhere; }
.photo-credits { margin: 16px 0 0; font-size: 12px; color: var(--faint); }
.photo-credits summary { cursor: pointer; }
.photo-credits p { margin: 6px 0 0; line-height: 1.5; }
.product-photos figcaption { padding: 10px 12px; }

/* Door knocking handout previews */
.handout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin: 20px 0 8px; }
.handout-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.handout-card .thumb { position: relative; aspect-ratio: 8.5 / 11; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; margin-bottom: 6px; container-type: inline-size; transition: box-shadow .15s, border-color .15s; }
.handout-card .thumb iframe { position: absolute; top: 0; left: 0; width: 816px; height: 1056px; border: 0; pointer-events: none; transform-origin: 0 0; transform: scale(calc(100cqw / 816px)); }
.handout-card:hover .thumb { border-color: var(--action); box-shadow: var(--shadow); }
.handout-card strong { font-weight: 600; font-size: 15px; }
.handout-card:hover strong { color: var(--action); }
.handout-card span { font-size: 13.5px; color: var(--slate); line-height: 1.45; }

/* Buyer protection highlights in contract lessons */
.callout.protect { background: var(--done-tint); border-left: 3px solid var(--done); }
.callout.protect strong { color: var(--done); }
.callout.protect.out { background: #fdf0ee; border-left-color: #b4382a; }
.callout.protect.out strong { color: #b4382a; }
tr.term td:first-child { border-left: 3px solid #b4382a; }
tr.keep td:first-child { border-left: 3px solid var(--done); }
.callout.protect.waive { background: var(--warn-tint); border-left-color: #c98a1b; }
.callout.protect.waive strong { color: var(--warn); }
tr.waive td:first-child { border-left: 3px solid #c98a1b; }

/* Offer Guide page screenshots, shown side by side */
.og-pair { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 14px; align-items: flex-start; }
.og-shot { margin: 0; flex: 1 1 260px; max-width: 360px; }
.og-shot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 1px 3px rgba(16, 32, 64, .06); }
.og-shot a { display: block; cursor: zoom-in; }
.og-shot figcaption { font-size: 13px; color: var(--slate); margin-top: 6px; }

/* Example documents (prelim, net sheet, settlement statement) */
.sample-doc { position: relative; margin: 18px 0 22px; padding: 28px 28px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 1px 3px rgba(16, 32, 64, .08); font-size: 14.5px; }
.sample-doc .sample-tag { position: absolute; top: -10px; left: 16px; background: var(--warn-tint); color: var(--warn); border: 1px solid #e2b866; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 10px; }
.sample-doc h5 { font: 400 20px/1.25 var(--serif); color: var(--navy); margin: 0 0 4px; }
.sample-doc h6 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); margin: 18px 0 6px; }
.sample-doc p { margin: 0 0 10px; }
.sample-doc .doc-meta { color: var(--slate); font-size: 13px; }
.doc-table { width: 100%; border-collapse: collapse; }
.doc-table td { border-top: 1px solid var(--line); padding: 7px 8px; vertical-align: top; }
.doc-table td:first-child { width: 32%; color: var(--slate); }
.doc-table.money td:first-child { width: auto; color: inherit; }
.doc-table.money td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-table tr.total td { border-top: 2px solid var(--navy); }
.doc-list { margin: 0; padding-left: 22px; }
.doc-list li { margin: 0 0 5px; }

.overall-split { color: var(--faint); white-space: nowrap; }
