/* ─── Deck page body ─────────────────────────────────────────────────────── */
html, body {
  height: 100%;
  overflow: hidden;
  background: var(--surface);
}

/* ─── Progress bar ───────────────────────────────────────────────────────── */
.progress-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--border);
  z-index: 100;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3ae070, var(--accent));
  transition: width var(--transition);
}

/* ─── Deck ───────────────────────────────────────────────────────────────── */
.deck {
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* ─── Slides ─────────────────────────────────────────────────────────────── */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding-top: 52px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity var(--transition), transform var(--transition), visibility 0s linear 0.35s;
}
.slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity var(--transition), transform var(--transition), visibility 0s;
  z-index: 1;
}

.slide-cover {
  align-items: center;
  justify-content: center;
  padding: 52px clamp(1.5rem, 5vw, 3rem) 5.5rem;
  background: var(--surface);
}
.slide-cover .slide-inner {
  max-width: min(100%, 580px);
  text-align: center;
}

.slide-full {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: var(--surface);
  margin-bottom: 80px;
}
.slide-full .card {
  width: 100%;
  min-height: calc(100vh - 52px - 5.5rem);
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 5vw, 3.5rem) 5.5rem;
  background: var(--surface);
}

.slide-inner { width: 100%; }

/* ─── Week/phase badges ──────────────────────────────────────────────────── */
.week-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  margin-bottom: 0.85rem;
}
.week-badge--intro  { background: var(--accent-soft); color: var(--accent-ink); }
.week-badge--goal   { background: #e0f2fe; color: #0c4a6e; }
.week-badge--ddd    { background: var(--ddd-soft); color: var(--ddd); }
.week-badge--arch   { background: var(--arch-soft); color: var(--arch); }
.week-badge--infra  { background: var(--infra-soft); color: #78350f; }
.week-badge--api    { background: var(--api-soft); color: #831843; }
.week-badge--w1     { background: var(--week1-soft); color: var(--week1); }
.week-badge--w2     { background: var(--week2-soft); color: var(--week2); }
.week-badge--w3     { background: var(--week3-soft); color: #78350f; }
.week-badge--w4     { background: var(--week4-soft); color: #831843; }
.week-badge--res    { background: #f1f5f9; color: #475569; }

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
p.lead {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.7;
  color: var(--text-muted);
}
.subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.6;
}
.text-small {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Section label ──────────────────────────────────────────────────────── */
.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.25rem 0 0.5rem;
}
.section-label:first-child { margin-top: 0; }

/* ─── Slide header row ───────────────────────────────────────────────────── */
.slide-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.slide-header-row .week-badge { margin-bottom: 0; }

/* ─── Marker list ────────────────────────────────────────────────────────── */
.marker-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.marker-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.5;
  color: var(--text);
}
.marker-list li .marker {
  width: 3px;
  min-width: 3px;
  border-radius: 2px;
  background: var(--accent);
  align-self: stretch;
  flex-shrink: 0;
  min-height: 1.4rem;
  margin-top: 0.05rem;
}
.marker-list li .marker--ddd   { background: var(--ddd); }
.marker-list li .marker--arch  { background: var(--arch); }
.marker-list li .marker--infra { background: var(--infra); }
.marker-list li .marker--api   { background: var(--api); }

/* ─── Architecture flow diagram ──────────────────────────────────────────── */
.arch-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 1rem 0;
}
.arch-node {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  text-align: center;
}
.arch-node strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.arch-node span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.arch-node--accent { border-color: var(--accent); background: var(--accent-soft); }
.arch-node--accent strong { color: var(--accent-ink); }
.arch-node--ddd   { border-color: var(--ddd); background: var(--ddd-soft); }
.arch-node--ddd strong { color: var(--ddd); }
.arch-node--arch  { border-color: var(--arch); background: var(--arch-soft); }
.arch-node--arch strong { color: var(--arch); }
.arch-node--infra { border-color: var(--infra); background: var(--infra-soft); }
.arch-node--infra strong { color: #78350f; }

.arch-arrow {
  width: 1.5px;
  height: 1.5rem;
  background: var(--accent);
  position: relative;
  margin: 0 auto;
}
.arch-arrow::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--accent);
}
.arch-arrow--ddd  { background: var(--ddd); }
.arch-arrow--ddd::after { border-top-color: var(--ddd); }
.arch-arrow--arch { background: var(--arch); }
.arch-arrow--arch::after { border-top-color: var(--arch); }
.arch-arrow--fork { height: 1rem; }

.arch-fork {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}
.arch-fork-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.arch-fork-branch .arch-node { max-width: 100%; }

/* ─── Callout box ────────────────────────────────────────────────────────── */
.callout {
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-top: 1.25rem;
}
.callout--accent { background: var(--accent-soft); }
.callout--ddd    { background: var(--ddd-soft); }
.callout--arch   { background: var(--arch-soft); }
.callout--infra  { background: var(--infra-soft); }
.callout--api    { background: var(--api-soft); }
.callout--w1     { background: var(--week1-soft); }
.callout--w2     { background: var(--week2-soft); }
.callout--w3     { background: var(--week3-soft); }
.callout--w4     { background: var(--week4-soft); }
.callout p { font-size: 0.875rem; line-height: 1.6; }
.callout--accent p { color: var(--accent-ink); }
.callout--ddd    p { color: var(--ddd); }
.callout--arch   p { color: var(--arch); }
.callout--infra  p { color: #78350f; }
.callout--api    p { color: #831843; }
.callout--w1     p { color: var(--week1); }
.callout--w2     p { color: var(--week2); }
.callout--w3     p { color: #78350f; }
.callout--w4     p { color: #831843; }

/* ─── Two-column layout ──────────────────────────────────────────────────── */
.two-col {
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
}
@media (min-width: 720px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}

/* ─── Tracks grid ────────────────────────────────────────────────────────── */
.tracks-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
}
@media (min-width: 560px) { .tracks-grid { grid-template-columns: repeat(3, 1fr); } }

.track-card {
  border-radius: 10px;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
}
.track-card h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.track-card p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.5; }
.track-card--ddd   h3 { background: var(--ddd-soft);   color: var(--ddd); }
.track-card--arch  h3 { background: var(--arch-soft);  color: var(--arch); }
.track-card--infra h3 { background: var(--infra-soft); color: #78350f; }
.track-card--api   h3 { background: var(--api-soft);   color: #831843; }
.track-card--accent h3 { background: var(--accent-soft); color: var(--accent-ink); }

/* ─── Intro stats ────────────────────────────────────────────────────────── */
.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.intro-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.75rem;
  text-align: center;
}
.intro-stat .stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.intro-stat .stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Evolution bar ──────────────────────────────────────────────────────── */
.evo-bar {
  display: flex;
  align-items: center;
  margin: 1.25rem 0 0;
  overflow-x: auto;
}
.evo-step {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 0.5rem 0.35rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.evo-step .evo-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.evo-step .evo-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.2rem;
  line-height: 1.3;
}
.evo-arrow {
  color: var(--accent);
  font-size: 1rem;
  padding: 0 0.3rem;
  flex-shrink: 0;
  font-weight: 700;
}

/* ─── Path cards ─────────────────────────────────────────────────────────── */
.paths {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
}
@media (min-width: 560px) { .paths { grid-template-columns: 1fr 1fr; } }

.path-card {
  border-radius: 10px;
  padding: 1rem;
  border: 2px solid transparent;
}
.path-card--a { background: var(--ddd-soft); border-color: #93c5fd; }
.path-card--b { background: var(--arch-soft); border-color: #c4b5fd; }
.path-card h3 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}
.path-card--a h3 { color: var(--ddd); }
.path-card--b h3 { color: var(--arch); }
.path-card p { font-size: 0.87rem; line-height: 1.5; color: var(--text-muted); }
.path-card .path-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}
.path-card--a .path-tag { background: #ede9fe; color: var(--week2); }
.path-card--b .path-tag { background: #dcfce7; color: #15803d; }

/* ─── Hex layer visual ───────────────────────────────────────────────────── */
.hex-layers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}
.hex-layer {
  border-radius: 10px;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.hex-layer--outer { background: var(--infra-soft); border: 1.5px solid var(--infra); }
.hex-layer--mid   { background: var(--arch-soft);  border: 1.5px solid var(--arch); }
.hex-layer--inner { background: var(--ddd-soft);   border: 1.5px solid var(--ddd); }
.hex-layer--core  { background: var(--accent-soft); border: 1.5px solid var(--accent); }
.hex-layer-name { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.hex-layer-desc { font-size: 0.78rem; color: var(--text-muted); text-align: right; line-height: 1.4; }

/* ─── Code blocks ────────────────────────────────────────────────────────── */
code {
  font-size: 0.9em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-family: ui-monospace, "Cascadia Code", monospace;
}
pre {
  background: #0f1419;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 0.85rem 0;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  color: #a8d8b9;
  font-family: ui-monospace, "Cascadia Code", monospace;
  line-height: 1.6;
  white-space: pre;
}
.pre-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

/* ─── Layer table ────────────────────────────────────────────────────────── */
.layer-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.85rem;
  font-size: 0.875rem;
}
.layer-table th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--border);
}
.layer-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
  color: var(--text);
}
.layer-table tr:last-child td { border-bottom: none; }
.layer-table td:first-child { font-weight: 700; white-space: nowrap; }

/* ─── Method badge ───────────────────────────────────────────────────────── */
.method-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: ui-monospace, "Cascadia Code", monospace;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  background: var(--ddd-soft);
  color: var(--ddd);
  margin: 0.15rem 0.15rem 0.15rem 0;
}

/* ─── Nav bar ────────────────────────────────────────────────────────────── */
.nav-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 1.25rem;
  background: linear-gradient(to top, var(--surface) 60%, transparent);
  z-index: 60;
}
.nav-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 4px 18px rgba(84,250,128,0.45);
}
.nav-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(84,250,128,0.55);
}
.nav-btn:active:not(:disabled) { transform: translateY(0); }
.nav-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.nav-btn--ghost {
  background: var(--surface);
  color: var(--accent-ink);
  border: 2px solid var(--accent);
  box-shadow: none;
}
.dots {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
  max-width: min(92vw, 420px);
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}
.dot:hover { transform: scale(1.15); background: #b8f0c8; }
.dot.is-current { background: var(--accent); transform: scale(1.2); }
