:root {
  --ink: #102033;
  --navy: #0a1c2e;
  --navy-2: #143044;
  --amber: #d4a017;
  --cream: #f3eee4;
  --paper: #fffdf8;
  --line: rgba(16, 32, 51, 0.12);
  --muted: #5c6b7a;
  --ok: #1f7a4d;
  --pad: max(1rem, env(safe-area-inset-left));
  --tap: 44px;
  --rail: 11.5rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Figtree, system-ui, sans-serif;
  line-height: 1.45;
}
a { color: #1c6d75; }
h1, h2, h3, .brand strong {
  font-family: Fraunces, Georgia, serif;
  letter-spacing: -0.03em;
}
h1 { font-size: clamp(1.8rem, 6vw, 3rem); line-height: 1.08; margin: 0 0 0.5rem; }
h2 { font-size: clamp(1.25rem, 3.5vw, 1.7rem); margin: 0 0 0.55rem; }
p { margin: 0 0 0.75rem; }
.skip { position: absolute; left: -999px; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem;
  padding: calc(0.7rem + env(safe-area-inset-top)) var(--pad) 0.7rem;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--navy); min-height: var(--tap); }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--navy) url("/favicon.svg") center / 32px no-repeat; }
.brand small { display: block; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; font-family: Figtree, sans-serif; }
.top-meta { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.solid, .ghost {
  border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 1rem; border-radius: 999px;
  font-weight: 700; font-family: inherit; font-size: 0.95rem;
}
.solid { background: var(--amber); color: var(--navy); }
.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }

.chooser { max-width: 1080px; margin: 0 auto; padding: 2rem var(--pad) 3rem; }
.chooser .lede { font-size: 1.15rem; color: var(--muted); max-width: 36rem; }
.ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
  margin: 1.6rem 0 1.4rem;
}
.ws-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1.15rem 1.1rem;
  text-decoration: none;
  color: inherit;
  min-height: 200px;
  display: flex; flex-direction: column;
}
.ws-card:hover { border-color: var(--amber); }
.ws-card .tag { margin-bottom: 0.7rem; }
.ws-card h2 { flex: 1; }
.ws-card .go { font-weight: 700; color: var(--navy); margin-top: 0.8rem; }
.fineprint { display: flex; flex-wrap: wrap; gap: 1rem 2rem; color: var(--muted); font-size: 0.88rem; }
.foot {
  padding: 1.1rem var(--pad) calc(1.3rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.85rem;
  display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem;
}
.foot a { color: inherit; }

.os {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  min-height: calc(100vh - 58px);
}
.rail {
  padding: 1rem 0.7rem 2rem;
  border-right: 1px solid var(--line);
}
.rail a, .rail button {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; text-align: left;
  padding: 0.65rem 0.7rem; margin-bottom: 0.25rem;
  border: 0; background: none; font: inherit; font-weight: 700;
  color: var(--ink); text-decoration: none; border-radius: 10px; cursor: pointer;
}
.rail a.on, .rail button.on { background: var(--navy); color: var(--paper); }
.rail .num { font-size: 0.75rem; color: var(--muted); }
.rail a.on .num, .rail button.on .num { color: var(--amber); }
.stage { padding: 1.2rem var(--pad) 2.5rem; max-width: 920px; }
.journey {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem;
  cursor: pointer; font: inherit; text-align: left; color: inherit;
}
.step.on { border-color: var(--navy); background: #fff; }
.step b { display: block; font-family: Fraunces, Georgia, serif; font-size: 1.1rem; }
.panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; padding: 1.1rem;
}
.tag {
  display: inline-block;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.card {
  display: flex; flex-direction: column; gap: 0.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  min-height: 150px;
}
.card:hover { border-color: var(--amber); }
.card h3 { margin: 0.15rem 0 0.2rem; font-size: 1.12rem; }
.card p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ok); }
.done { color: var(--ok); font-size: 0.8rem; font-weight: 700; }
.crumb { font-size: 0.85rem; margin-bottom: 0.8rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.lessons { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }
.lesson {
  text-align: left; width: 100%;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 0.85rem 1rem;
  cursor: pointer; font: inherit; color: inherit;
}
.lesson.on { border-color: var(--amber); background: #fff; }
.lesson b { display: block; }
.nav-lessons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.quiz-q { margin: 1rem 0; }
.quiz-q label {
  display: block; margin: 0.35rem 0; padding: 0.55rem 0.7rem;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff;
}
.quiz-q label:has(input:checked) { border-color: var(--amber); }
.note { color: var(--muted); font-size: 0.88rem; }
.chat-log { min-height: 8rem; margin-bottom: 0.8rem; }
.chat-log .me, .chat-log .bot {
  padding: 0.65rem 0.8rem; border-radius: 12px; margin-bottom: 0.45rem; max-width: 40rem;
}
.chat-log .me { background: var(--navy); color: var(--paper); margin-left: auto; }
.chat-log .bot { background: #fff; border: 1px solid var(--line); }
.ask {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
}
.ask input, .ask textarea, .cert input {
  font: inherit; padding: 0.6rem 0.75rem; border-radius: 10px;
  border: 1px solid var(--line); flex: 1; min-width: 12rem;
}
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 1rem; }
.pills button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 0.35rem 0.75rem; font: inherit; cursor: pointer;
}
.deck { display: grid; gap: 0.7rem; }
.slide-card {
  background: var(--navy); color: var(--paper);
  border-radius: 14px; padding: 1.2rem; min-height: 8rem;
}
.slide-card h3 { color: var(--amber); margin: 0 0 0.4rem; }
.stage-slide {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 920px;
  border-radius: 12px;
  padding: 1.6rem 1.7rem 2.2rem;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(10, 28, 46, 0.12);
}
.stage-slide.cover { background: var(--navy); color: var(--paper); }
.stage-slide.content { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.stage-slide h2 { font-size: clamp(1.4rem, 4vw, 2.3rem); max-width: 18ch; }
.stage-slide .eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 700;
  color: var(--amber); margin: 0 0 0.7rem;
}
.stage-slide.content .eyebrow { color: #c48a0c; }
.stage-slide .wordmark {
  position: absolute; top: 1.2rem; right: 1.4rem;
  font-size: 0.75rem; font-weight: 700; opacity: 0.8;
}
.brandbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: linear-gradient(90deg, #d4a017, #f0c24a, #9a6e0a);
}
body.presenting .top, body.presenting .rail, body.presenting .foot, body.presenting .nav-lessons, body.presenting h1, body.presenting .tag, body.presenting .note { display: none !important; }
body.presenting .os { grid-template-columns: 1fr; min-height: 100vh; }
body.presenting .stage { padding: 4vh 4vw; }
body.presenting .stage-slide { max-width: none; height: 92vh; aspect-ratio: auto; border-radius: 0; }
.cert {
  border: 2px solid var(--navy); border-radius: 12px;
  padding: 1.2rem; background: #fff; text-align: center; margin-top: 1rem;
}
.lanes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.4rem;
}
.lane {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.05rem;
}
@media (max-width: 800px) {
  .os { grid-template-columns: 1fr; }
  .rail { display: flex; gap: 0.25rem; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail a, .rail button { width: auto; flex: none; }
  .journey { grid-template-columns: 1fr 1fr; }
}
@media print {
  .top, .rail, .foot, .ghost, button.solid, .ask, .pills { display: none !important; }
}
