:root {
  --navy: #1d3766;
  --navy-deep: #142749;
  --gold: #c8932b;
  --gold-soft: #f6ead2;
  --bg: #f4f5f8;
  --surface: #ffffff;
  --text: #1c2433;
  --muted: #5d6779;
  --line: #dfe3ea;
  --good: #1f8a4c;
  --good-soft: #e3f4ea;
  --bad: #c23b3b;
  --bad-soft: #fbe9e9;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 39, 73, .06), 0 6px 20px rgba(20, 39, 73, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1624;
    --surface: #182236;
    --text: #e8ecf3;
    --muted: #9aa5b8;
    --line: #2a3650;
    --gold-soft: #3a2f17;
    --good-soft: #15392a;
    --bad-soft: #442020;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0; text-wrap: balance; }
p { margin: 0 0 .9em; }
a { color: var(--navy); }
@media (prefers-color-scheme: dark) { a { color: #9db9ee; } }
code { background: var(--gold-soft); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
button { font: inherit; cursor: pointer; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 20px;
  background: var(--navy-deep); color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { border-radius: 8px; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand strong { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { color: #e6c98b; font-size: .8rem; }
.topbar-progress { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: #d5dcec; white-space: nowrap; }
.meter { width: 120px; height: 8px; background: rgba(255, 255, 255, .18); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--gold); border-radius: 99px; transition: width .4s; }

main { max-width: 1040px; margin: 0 auto; padding: 28px 16px 60px; }

.footer {
  max-width: 1040px; margin: 0 auto; padding: 0 16px 40px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  color: var(--muted); font-size: .85rem;
}
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600;
}
.btn:hover { border-color: var(--gold); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-deep); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1c1403; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, .hotspot:focus-visible, .opt:focus-visible, .tab:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Home */
.hero {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff; border-radius: 16px; padding: 32px; margin-bottom: 28px;
}
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 8px; }
.hero p { color: #d5dcec; max-width: 56ch; }
.hero .by { color: #e6c98b; font-weight: 600; margin-bottom: 14px; }
.hero img { width: 120px; height: 120px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 6px; }
.hero-actions span { color: #d5dcec; font-size: .9rem; }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; padding: 24px; } .hero img { display: none; } }

.track { margin-bottom: 32px; }
.track-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.track-head h2 { font-size: 1.3rem; }
.track-head span { color: var(--muted); font-size: .95rem; }
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.module {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.module.soon { box-shadow: none; opacity: .8; }
.module-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.module-num {
  flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-weight: 700; font-variant-numeric: tabular-nums;
}
.module.soon .module-num { background: var(--line); color: var(--muted); }
.module h3 { font-size: 1.02rem; padding-top: 5px; }
.badge { margin-left: auto; flex: none; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--line); color: var(--muted); white-space: nowrap; }
.badge.done { background: var(--good-soft); color: var(--good); }
.badge.live { background: var(--gold-soft); color: #8a6212; }
@media (prefers-color-scheme: dark) { .badge.live { color: #e6c98b; } }
a.module.tool { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); border-top: 4px solid var(--gold); }
a.module.tool:hover { border-color: var(--gold); transform: translateY(-2px); }
a.module.tool h3 { font-size: 1.12rem; }
.tool-name { font-size: .78rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; }
.tool-link { margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--navy); }
@media (prefers-color-scheme: dark) { .tool-link { color: #9db9ee; } }
@media (prefers-reduced-motion: reduce) { a.module.tool:hover { transform: none; } }
.pitch {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 28px; box-shadow: var(--shadow);
}
.pitch.done { background: var(--good-soft); border-left-color: var(--good); }
.pitch h2 { font-size: 1.2rem; margin-bottom: 6px; }
.pitch p { margin: 0 0 10px; max-width: 68ch; color: var(--muted); }
.pitch.done p { color: var(--text); margin-bottom: 0; }
.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 68ch; }
.service-list li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; font-size: .95rem; }
@media (max-width: 640px) { .service-list li { grid-template-columns: 1fr; gap: 2px; } }
.nudge { color: var(--muted); font-size: .95rem; }
.cloud-offer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.done-card .cloud-offer { justify-content: center; border-top: 0; padding-top: 0; }
.cloud-offer p { margin: 0; font-weight: 600; color: var(--text); }
.module.service { box-shadow: none; }
.module.service .module-num { background: var(--gold); color: #1c1403; }
.module .blurb { color: var(--muted); font-size: .93rem; margin: 0 0 10px; }
.topic-list { margin: 0; padding-left: 1.1em; color: var(--text); font-size: .92rem; }
.topic-list li { margin-bottom: .3em; }
.service-note {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--gold-soft); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px;
}
.service-note p { margin: 0; max-width: 70ch; }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li { border-top: 1px solid var(--line); }
.lesson-list a, .lesson-list span.row {
  display: flex; align-items: center; gap: 10px; padding: 9px 2px; text-decoration: none; color: var(--text); font-size: .93rem;
}
.lesson-list a:hover { color: var(--navy); }
.lesson-list span.row { color: var(--muted); }
.tick { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 11px; color: transparent; }
.tick.on { background: var(--good); border-color: var(--good); color: #fff; }
.lesson-list .mins { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* Lesson */
.crumb { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.crumb a { color: inherit; }
.lesson-head { margin-bottom: 18px; }
.lesson-head h1 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
.lesson-head p { color: var(--muted); margin: 6px 0 0; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-weight: 600; font-size: .92rem;
}
.tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tab .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: var(--line); color: var(--muted); }
.tab[aria-selected="true"] .n { background: rgba(255, 255, 255, .22); color: #fff; }
.tab.ok .n { background: var(--good); color: #fff; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.panel > h3, .panel h3 { font-size: 1.1rem; margin: 1.4em 0 .5em; }
.panel h3:first-child { margin-top: 0; }
.lead { font-size: 1.1rem; }
.panel ul { padding-left: 1.2em; margin: 0 0 .9em; }
.panel li { margin-bottom: .35em; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 1em; }
.card { border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; padding: 12px 14px; }
.card h4 { font-size: .98rem; margin-bottom: 4px; }
.card p { margin: 0; font-size: .92rem; color: var(--muted); }
.note { background: var(--gold-soft); border-radius: 8px; padding: 12px 14px; margin: 0 0 1em; font-size: .95rem; }
table.plain { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .94rem; }
table.plain th, table.plain td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.table-wrap { overflow-x: auto; }
.panel-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Walkthrough: full-window stage with the coach bar docked at the bottom */
body.walking { overflow: hidden; }
.stage { position: fixed; inset: 0; z-index: 50; background: #e4e4e4; display: flex; flex-direction: column; }
.stage-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 14px; background: var(--navy-deep); color: #d5dcec; font-size: .9rem;
}
.stage-top .btn { padding: 6px 12px; background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.stage-top .btn:hover { border-color: var(--gold); }
.stage-screen { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 16px; display: flex; }
.stage .shot { width: 100%; margin: auto; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .12); }
.stage .info-card { max-width: 560px; margin: auto; background: var(--surface); }
.coach {
  flex: none;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; align-items: center;
  background: var(--surface); color: var(--text);
  border-top: 4px solid var(--gold); box-shadow: 0 -6px 24px rgba(0, 0, 0, .14);
  padding: 12px max(18px, calc((100vw - 1000px) / 2)) 14px;
}
.coach .dots { grid-column: 1 / -1; margin: 0; }
.coach .count { font-size: .78rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; }
.coach h3 { font-size: 1.1rem; margin: 2px 0 4px; }
.coach .text p:last-child { margin-bottom: 0; }
.walk-nav { display: flex; gap: 8px; }
.dots { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.dots i { height: 5px; flex: 1 1 14px; max-width: 46px; border-radius: 99px; background: var(--line); }
.dots i.on { background: var(--gold); }
.dots i.now { background: var(--navy); }
@media (prefers-color-scheme: dark) { .dots i.now { background: #9db9ee; } }
.feedback { font-size: .92rem; font-weight: 600; margin-top: 6px; min-height: 1.5em; }
.feedback.good { color: var(--good); }
.feedback.bad { color: var(--bad); }
.walk-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-top: 6px; }
.walk-tools:empty { display: none; }
.walk-tools label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
@media (max-width: 640px) {
  .coach { grid-template-columns: 1fr; padding: 10px 14px 12px; }
  .stage-screen { padding: 8px; }
}
.shot { position: relative; margin: 0 auto; }
.shot img { display: block; width: 100%; height: auto; }
.hotspot {
  position: absolute; border: 3px solid var(--gold); border-radius: 8px; background: rgba(200, 147, 43, .14);
  padding: 0; animation: pulse 1.6s ease-in-out infinite;
}
.hotspot:has(.pin) { background: transparent; animation: none; }
.hotspot:has(.pin):hover { background: rgba(200, 147, 43, .14); }
.hotspot.quiet { opacity: 0; animation: none; }
.hotspot.quiet.reveal { opacity: 1; animation: pulse 1.6s ease-in-out infinite; }
.hotspot.visited { border-color: var(--good); background: rgba(31, 138, 76, .12); animation: none; }
.hotspot.current { box-shadow: 0 0 0 4px rgba(29, 55, 102, .35); }
.hotspot .pin {
  position: absolute; top: -12px; left: -12px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold); color: #1c1403; font-size: .78rem; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.hotspot.visited .pin { background: var(--good); color: #fff; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(200, 147, 43, .55); } 50% { box-shadow: 0 0 0 9px rgba(200, 147, 43, 0); } }
@media (prefers-reduced-motion: reduce) { .hotspot { animation: none !important; } .meter i { transition: none; } }
.shot.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.typebox { position: absolute; container-type: size; }
.typebox input {
  width: 100%; height: 100%; border: 2px solid var(--gold); border-radius: 6px; background: #fff; color: #111;
  padding: 0 4cqh 0 28cqh; font: inherit; font-size: clamp(9px, 44cqh, 20px);
  box-shadow: 0 0 0 4px rgba(200, 147, 43, .25); outline: none;
}
.typebox input.right { text-align: right; padding: 0 22cqh; }
.typebox input.done { border-color: var(--good); box-shadow: 0 0 0 4px rgba(31, 138, 76, .22); }

.info-card { padding: 40px 24px; text-align: center; color: var(--muted); background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; }
.explore-note { border-left: 4px solid var(--gold); background: var(--gold-soft); border-radius: 8px; padding: 10px 14px; margin-top: 8px; }
.explore-note strong.t { display: block; }

.done-card { text-align: center; padding: 32px 16px; }
.done-card .big { font-size: 2.4rem; line-height: 1; color: var(--good); }
.done-card h3 { margin: 10px 0 6px; font-size: 1.25rem; }
.done-card p { color: var(--muted); }
.done-card .panel-actions { justify-content: center; }

/* Practice */
.tasks { list-style: none; padding: 0 !important; margin: 0 0 1em; }
.tasks li { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.tasks label { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; cursor: pointer; }
.tasks input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--navy); flex: none; }
.tasks input:checked + span { color: var(--muted); text-decoration: line-through; }
.expect { background: var(--good-soft); border-radius: 8px; padding: 12px 14px; }
.expect strong { color: var(--good); }

/* Quiz */
.question { border-top: 1px solid var(--line); padding: 18px 0; }
.question:first-of-type { border-top: 0; padding-top: 0; }
.question h4 { font-size: 1.02rem; margin-bottom: 10px; }
.opts { display: grid; gap: 8px; }
.opt { text-align: left; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.opt:hover:not(:disabled) { border-color: var(--gold); }
.opt.right { background: var(--good-soft); border-color: var(--good); font-weight: 600; }
.opt.wrong { background: var(--bad-soft); border-color: var(--bad); }
.opt:disabled { cursor: default; color: var(--text); opacity: 1; }
.why { margin-top: 8px; font-size: .93rem; color: var(--muted); }
.score { font-weight: 700; }

.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

@media (max-width: 640px) {
  main { padding: 18px 16px 48px; }
  .panel { padding: 16px; }
  .meter { width: 70px; }
  .brand small { display: none; }
}
