/* Layout: a dark cardiothoracic ICU world over a fixed dark-red myocardial-fiber
   backdrop; a live arterial trace in the hero; long-form sections on smoked glass.
   One accent: arterial red. Single dark look by design. */
:root {
  --ink: #0b0a0e;            /* page ground under the backdrop */
  --glass: rgba(14, 12, 17, 0.72);   /* smoked panels over the backdrop */
  --glass-2: rgba(22, 18, 25, 0.86);
  --line: rgba(255, 228, 232, 0.12);
  --line-2: rgba(255, 228, 232, 0.22);
  --text: #f1ecee;
  --muted: #b3a7ac;
  --faint: #7d7176;
  --art: #e8475d;            /* arterial red: the accent */
  --art-soft: rgba(232, 71, 93, 0.16);
  --cvp: #62c6d8;            /* CVP cyan: secondary trace only */
  --open: #73d6a4;           /* semantic: module open */
  --warm: #ffcf7a;           /* microwave light */

  --f-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 6.5rem;
  --wrap: 72rem;
  --radius: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1.08rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
/* fixed backdrop: stays put while the page scrolls (works on iOS too) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: var(--ink) url("img/backdrop.jpg") 64% center / cover no-repeat;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,10,14,0.20) 0%, rgba(11,10,14,0.42) 55%, rgba(11,10,14,0.58) 100%);
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cvp); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: max(1rem, 4vw); }

h1, h2, h3 { font-family: var(--f-display); line-height: 1.08; margin: 0; text-wrap: balance; font-weight: 600; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.012em; }
h3 { font-size: 1.4rem; font-weight: 600; }
p { margin: 0; }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.32rem); max-width: 38em; }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--f-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--art); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(11, 10, 14, 0.78);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-3); }
.wordmark { font-family: var(--f-body); font-weight: 700; font-size: 1.4rem; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.wordmark .ct { color: var(--art); }
.nav-links { display: flex; align-items: center; gap: var(--s-5); font-size: 1rem; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
@media (max-width: 680px) { .nav-links .hide-sm { display: none; } .nav-links { gap: var(--s-4); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font: 600 1rem/1 var(--f-body); text-decoration: none; cursor: pointer;
  padding: 0.85rem 1.3rem; border-radius: 999px; border: 1px solid transparent;
  background: none; color: var(--text); white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--art); color: #fff; }
.btn-primary:hover { background: #f25c71; }
.btn-ghost { border-color: var(--line-2); background: rgba(11,10,14,0.4); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.92rem; }
.btn-course { border-color: var(--line-2); font-size: 0.92rem; padding: 0.6rem 1rem; }
.btn-course:hover { border-color: var(--art); color: var(--text); background: var(--art-soft); }
.btn-course .arr { color: var(--art); }

/* ---------- hero ---------- */
.hero { position: relative; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--s-7); align-items: center; padding-block: var(--s-8) var(--s-7);
}
.hero-copy { display: grid; gap: var(--s-5); min-width: 0; }
.hero h1 { font-size: clamp(2.8rem, 6.6vw, 5.4rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.02; }
.hero h1 em { font-style: italic; color: var(--art); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.hero-note { font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); }

.hero-media {
  position: relative; aspect-ratio: 4 / 3; max-width: 100%;
  border-radius: 14px; overflow: hidden;
  background: rgba(8, 9, 12, 0.88);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.monitor-readout { position: absolute; z-index: 3; right: var(--s-4); bottom: var(--s-4); font-family: var(--f-mono); text-align: right; line-height: 1.25; }
.monitor-readout .lbl { font-size: 0.72rem; letter-spacing: 0.12em; }
.monitor-readout .art { color: var(--art); }
.monitor-readout .cvp { color: var(--cvp); }
.monitor-readout .val { font-size: 1.5rem; font-weight: 500; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-block: var(--s-7); }
  .hero-media { aspect-ratio: 16 / 10; }
}

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.stat { padding: var(--s-5) var(--s-5); border-right: 1px solid var(--line); display: grid; gap: var(--s-1); }
.stat:last-child { border-right: 0; }
.stat .n { font-family: var(--f-display); font-weight: 600; font-size: clamp(2rem, 3.6vw, 2.8rem); font-variant-numeric: tabular-nums; line-height: 1; }
.stat .l { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ---------- sections ---------- */
.section { padding-block: var(--s-9); }
.section-head { display: grid; gap: var(--s-3); margin-bottom: var(--s-7); max-width: 48rem; }
.section-head .lede { color: var(--muted); }

/* photo band */
.photos { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--s-4); }
.photo { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; max-width: 100%; background: var(--glass-2); border: 1px solid var(--line); }
.photo:first-child { aspect-ratio: auto; min-height: 18rem; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--s-6) var(--s-4) var(--s-4); background: linear-gradient(0deg, rgba(11,10,14,0.94), rgba(11,10,14,0)); display: grid; gap: 2px; }
.photo figcaption b { font-family: var(--f-display); font-size: 1.3rem; font-weight: 600; }
.photo figcaption span { color: var(--muted); font-size: 0.95rem; }
.photo.empty img { display: none; }
.photo.empty { background: radial-gradient(90% 70% at 30% 20%, rgba(232,71,93,0.18), transparent 70%), var(--glass-2); }
.photo.empty::before { content: attr(data-slot); position: absolute; top: var(--s-4); left: var(--s-4); font-family: var(--f-mono); font-size: 0.72rem; color: var(--faint); letter-spacing: 0.08em; }
@media (max-width: 860px) {
  .photos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .photo:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; min-height: 0; }
}
@media (max-width: 480px) { .photos { grid-template-columns: minmax(0, 1fr); } .photo { aspect-ratio: 16 / 10; } }

/* module anatomy */
.anatomy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
.anat { display: grid; gap: var(--s-2); align-content: start; padding-top: var(--s-4); border-top: 2px solid var(--line-2); min-width: 0; }
.anat .k { font-family: var(--f-mono); font-size: 0.78rem; color: var(--cvp); letter-spacing: 0.06em; }
.anat p { color: var(--muted); }
@media (max-width: 860px) { .anatomy { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .anatomy { grid-template-columns: minmax(0, 1fr); } }

/* core module list */
.core-list { list-style: none; margin: 0; padding: 0; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.core-item { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; gap: var(--s-5); align-items: start; padding: var(--s-5) var(--s-5); }
.core-item + .core-item { border-top: 1px solid var(--line); }
.core-item .code { font-family: var(--f-mono); color: var(--art); font-size: 0.95rem; padding-top: 0.35rem; }
.core-item .body { display: grid; gap: var(--s-2); min-width: 0; }
.core-item h3 { font-size: 1.45rem; }
.core-item p { color: var(--muted); max-width: 44em; }
.core-item .btn-course { margin-top: 0.15rem; }
@media (max-width: 640px) {
  .core-item { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding: var(--s-5) var(--s-4); }
  .core-item .code { padding-top: 0; }
  .core-item .btn-course { justify-self: start; }
}

/* release cards */
.releases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 760px) { .releases { grid-template-columns: minmax(0, 1fr); } }
.release {
  display: grid; gap: var(--s-3); align-content: start; text-align: left; cursor: pointer;
  padding: var(--s-5); border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--glass); color: var(--text); font: inherit;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.release:hover { border-color: var(--line-2); background: var(--glass-2); }
.release.is-core { border-color: rgba(232,71,93,0.55); background: linear-gradient(135deg, rgba(232,71,93,0.18), transparent 60%), var(--glass); }
.release-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.release .num { font-family: var(--f-mono); font-size: 0.78rem; color: var(--faint); letter-spacing: 0.1em; }
.release.is-core .num { color: var(--art); }
.release .cnt { font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.release h3 { font-size: 1.55rem; }
.release p { color: var(--muted); font-size: 1rem; }
.cats { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.cat { font-size: 0.8rem; padding: 0.22rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.release .open-hint { font-size: 0.92rem; color: var(--text); }
.release .open-hint .arr { color: var(--art); }

/* category table of contents */
.toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--s-2); }
.toc a { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: var(--s-1) var(--s-3); align-items: baseline; padding: var(--s-4); border-radius: var(--radius); border: 1px solid var(--line); background: var(--glass); text-decoration: none; transition: border-color 0.15s, background 0.15s; min-width: 0; }
.toc a:hover { border-color: var(--line-2); background: var(--glass-2); }
.toc .letter { font-family: var(--f-display); font-weight: 600; font-size: 1.9rem; line-height: 1; color: var(--art); grid-row: span 2; }
.toc .gname { font-weight: 600; line-height: 1.3; }
.toc .gmeta { font-family: var(--f-mono); font-size: 0.76rem; color: var(--muted); }

/* faculty */
.faculty { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.faculty .photo { aspect-ratio: 4 / 5; }
.faculty-body { display: grid; gap: var(--s-4); }
.creds { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.cred { font-family: var(--f-mono); font-size: 0.78rem; padding: 0.35rem 0.7rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); }
@media (max-width: 760px) { .faculty { grid-template-columns: minmax(0, 1fr); } .faculty .photo { max-width: 18rem; } }

.cta-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-6); align-items: center; padding: var(--s-7) var(--s-6); border-radius: 16px; background: linear-gradient(120deg, var(--art-soft), transparent 60%), var(--glass-2); border: 1px solid var(--line-2); }
@media (max-width: 760px) { .cta-box { grid-template-columns: minmax(0, 1fr); padding: var(--s-6) var(--s-5); } }

footer { border-top: 1px solid var(--line); padding-block: var(--s-6); color: var(--muted); font-size: 0.92rem; background: rgba(11,10,14,0.7); }
.foot { display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; }

/* ---------- module rows (dialogs + curriculum page) ---------- */
.mods { list-style: none; margin: 0; padding: 0; }
.mod { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.mod .code { font-family: var(--f-mono); font-size: 0.88rem; color: var(--muted); }
.mod.core .code, .mod.live .code { color: var(--art); }
.mod .t { min-width: 0; line-height: 1.4; }
.mod .rel { display: block; font-family: var(--f-mono); font-size: 0.72rem; color: var(--faint); margin-top: 2px; letter-spacing: 0.02em; }
.mod.pending .t { color: var(--muted); }
.mod .btn-course { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
.mod.pending .btn-course { color: var(--muted); border-color: var(--line); }
@media (max-width: 520px) {
  .mod { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .mod .btn-course { grid-column: 2; justify-self: start; }
}

/* ---------- dialogs ---------- */
dialog {
  width: min(46rem, calc(100vw - 2rem)); max-height: min(86vh, 52rem);
  padding: 0; border: 1px solid var(--line-2); border-radius: 16px;
  background: #141117; color: var(--text);
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
}
dialog::backdrop { background: rgba(6, 4, 8, 0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dlg { display: grid; grid-template-rows: auto auto minmax(0, 1fr); max-height: min(86vh, 52rem); }
.dlg-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4); align-items: start; padding: var(--s-5) var(--s-5) var(--s-3); }
.dlg-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.dlg-head p { color: var(--muted); margin-top: var(--s-2); }
.x { width: 2.4rem; height: 2.4rem; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.x:hover { border-color: var(--muted); }
.tabs { display: flex; gap: var(--s-2); overflow-x: auto; padding: var(--s-2) var(--s-5) var(--s-4); border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tab { flex: none; font: 600 0.88rem/1 var(--f-body); color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 0.55rem 0.9rem; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--text); border-color: var(--art); background: var(--art-soft); }
.tab .n { font-family: var(--f-mono); font-weight: 400; color: var(--faint); margin-left: 0.35rem; }
.dlg-body { overflow-y: auto; padding: 0 var(--s-5) var(--s-5); }
.dlg-body .cat-h { font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--art); padding: var(--s-4) 0 var(--s-2); }

/* microwave */
.cook { width: min(30rem, calc(100vw - 2rem)); }
.cook .dlg { grid-template-rows: auto; }
.cook-body { display: grid; gap: var(--s-4); justify-items: center; text-align: center; padding: var(--s-5) var(--s-5) var(--s-6); position: relative; }
.cook-body .x { position: absolute; top: var(--s-4); right: var(--s-4); }
.cook svg { width: 100%; max-width: 22rem; height: auto; overflow: visible; }
.cook h2 { font-size: clamp(1.6rem, 4vw, 2rem); }
.cook p { color: var(--muted); }
.cook .which { font-family: var(--f-mono); font-size: 0.8rem; color: var(--faint); }
.mw-glow { animation: hum 1.6s ease-in-out infinite; }
.mw-heart { animation: spin 3s linear infinite; transform-box: view-box; transform-origin: 112px 120px; }
.mw-steam path { stroke-dasharray: 40; animation: steam 2.4s ease-in-out infinite; opacity: 0; }
.mw-steam path:nth-child(2) { animation-delay: 0.8s; }
.mw-steam path:nth-child(3) { animation-delay: 1.6s; }
.mw-dot { animation: blink 1s steps(1) infinite; }
@keyframes hum { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
@keyframes spin { 0% { transform: scaleX(1); } 25% { transform: scaleX(0.15); } 50% { transform: scaleX(-1); } 75% { transform: scaleX(-0.15); } 100% { transform: scaleX(1); } }
@keyframes steam { 0% { opacity: 0; stroke-dashoffset: 40; transform: translateY(6px); } 30% { opacity: 0.7; } 100% { opacity: 0; stroke-dashoffset: 0; transform: translateY(-14px); } }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mw-glow, .mw-heart, .mw-steam path, .mw-dot { animation: none; } .mw-steam path { opacity: 0.5; } }

/* ---------- curriculum page ---------- */
.page-head { padding-block: var(--s-8) var(--s-6); display: grid; gap: var(--s-4); }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.02em; }
.page-head .lede { color: var(--muted); }
.cur { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: var(--s-6); align-items: start; padding-bottom: var(--s-9); }
.side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 4.6rem); display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); max-height: calc(100vh - 6rem); overflow-y: auto; }
.side .search { width: 100%; }
.side nav { display: grid; gap: 2px; }
.side nav a { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: var(--s-2); padding: 0.35rem 0.4rem; border-radius: 6px; text-decoration: none; font-size: 0.92rem; color: var(--muted); }
.side nav a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.side nav b { font-family: var(--f-display); color: var(--art); font-weight: 600; }
.search { font: 400 0.98rem var(--f-body); color: var(--text); background: rgba(0,0,0,0.35); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.55rem 1rem; }
.check { display: flex; gap: var(--s-2); align-items: center; font-size: 0.92rem; color: var(--muted); }
@media (max-width: 860px) {
  .cur { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; }
  .side nav { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
}
.group { padding: var(--s-5); border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); scroll-margin-top: 5.5rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.group + .group { margin-top: var(--s-4); }
.group-h { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: var(--s-3); align-items: baseline; margin-bottom: var(--s-3); }
.group-h .letter { font-family: var(--f-display); font-weight: 600; font-size: 2.4rem; line-height: 1; color: var(--art); }
.group-h h2 { font-size: 1.6rem; }
.group-h .count { font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 520px) { .group-h { grid-template-columns: 2.4rem minmax(0, 1fr); } .group-h .count { grid-column: 2; } }
.empty-msg { padding-block: var(--s-7); color: var(--muted); }

/* ---------- jump buttons (hero) ---------- */
.jumps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-4); }
.jump {
  position: relative; display: grid; gap: 2px; align-content: start;
  padding: var(--s-5) var(--s-5) var(--s-5); padding-right: 3rem; text-decoration: none;
  border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--glass);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.jump:hover { border-color: var(--art); background: var(--glass-2); transform: translateY(-2px); }
.jump.is-primary { background: linear-gradient(135deg, rgba(232,71,93,0.32), rgba(232,71,93,0.08)), var(--glass); border-color: rgba(232,71,93,0.6); }
.jump .jk { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--art); }
.jump .jt { font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; line-height: 1.15; }
.jump .jd { color: var(--muted); font-size: 0.92rem; }
.jump .arr { position: absolute; right: var(--s-5); top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--art); }
@media (prefers-reduced-motion: reduce) { .jump:hover { transform: none; } }
@media (max-width: 960px) { .jumps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .jumps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- pathway page ---------- */
.progress { display: grid; gap: var(--s-2); padding: var(--s-4) var(--s-5); border-radius: var(--radius); background: var(--glass-2); border: 1px solid var(--line-2); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 4.4rem); z-index: 10; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.progress-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.progress b { font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--art); border-radius: 999px; transition: width 0.3s; }
.link-btn { font: 600 0.9rem var(--f-body); background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }
.stage { margin-top: var(--s-6); padding: var(--s-5); border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); scroll-margin-top: 10rem; }
.stage.is-core { border-color: rgba(232,71,93,0.55); }
.stage-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2) var(--s-4); align-items: baseline; margin-bottom: var(--s-3); }
.stage-h h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.stage-h .sn { font-family: var(--f-mono); font-size: 0.76rem; letter-spacing: 0.12em; color: var(--art); text-transform: uppercase; grid-column: 1 / -1; }
.stage-h .sc { font-family: var(--f-mono); font-size: 0.82rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stage-h p { grid-column: 1 / -1; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: auto 2.4rem 3rem minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; padding: 0.75rem 0; border-top: 1px solid var(--line); }
.step .num { font-family: var(--f-mono); font-size: 0.78rem; color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.step .code { font-family: var(--f-mono); font-size: 0.88rem; color: var(--art); }
.step .t { min-width: 0; line-height: 1.4; }
.step .cat { display: inline-block; margin-top: 3px; font-size: 0.74rem; }
.step.done .t > span:first-child { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(232,71,93,0.6); }
.step .btn-course { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
/* big checkbox */
.tick { position: relative; width: 2rem; height: 2rem; flex: none; }
.tick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tick .box { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; border: 2px solid var(--line-2); background: rgba(0,0,0,0.35); transition: background 0.15s, border-color 0.15s; pointer-events: none; }
.tick .box svg { width: 1.2rem; height: 1.2rem; opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.15s; }
.tick input:hover + .box { border-color: var(--art); }
.tick input:focus-visible + .box { outline: 2px solid var(--cvp); outline-offset: 2px; }
.tick input:checked + .box { background: var(--art); border-color: var(--art); }
.tick input:checked + .box svg { opacity: 1; transform: scale(1); }
@media (max-width: 600px) {
  .step { grid-template-columns: auto 3rem minmax(0, 1fr); }
  .step .num { display: none; }
  .step .btn-course { grid-column: 3; justify-self: start; }
}
.stage-nav { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.stage-nav a { font-size: 0.85rem; padding: 0.4rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); background: rgba(0,0,0,0.25); }
.stage-nav a:hover { color: var(--text); border-color: var(--line-2); }

/* ---------- hero, image version: copy left, heart visible right, trace strip below ---------- */
.hero-grid { grid-template-columns: minmax(0, 40rem); padding-block: var(--s-9) var(--s-6); }
.hero-copy { text-shadow: 0 2px 24px rgba(0,0,0,0.55); }
.trace-strip { position: relative; height: 150px; margin-bottom: var(--s-6); }
.trace-strip canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.trace-strip::before, .trace-strip::after { content: ""; position: absolute; top: 0; bottom: 0; width: 12%; z-index: 1; pointer-events: none; }
.trace-strip::before { left: 0; background: linear-gradient(90deg, rgba(11,10,14,0.85), transparent); }
.trace-strip::after { right: 0; background: linear-gradient(270deg, rgba(11,10,14,0.6), transparent); }
.readout-wrap { position: relative; height: 100%; z-index: 2; }
.trace-strip .monitor-readout { right: max(1rem, 4vw); bottom: 0.4rem; text-shadow: 0 1px 10px rgba(0,0,0,0.8); }
@media (max-width: 860px) { .hero-grid { padding-block: var(--s-7) var(--s-5); } .trace-strip { height: 120px; } }
@media (max-width: 700px) {
  body::after { background: linear-gradient(180deg, rgba(11,10,14,0.55) 0%, rgba(11,10,14,0.6) 55%, rgba(11,10,14,0.75) 100%); }
}
