:root {
  color-scheme: dark;
  --ink: #171714;
  --paper: #f3f1e9;
  --paper-soft: #dad8cf;
  --ink-soft: #22221e;
  --yellow: #e7ff76;
  --mint: #9de9c5;
  --blue: #9ab8ff;
  --pink: #ff9ec4;
  --orange: #ffb36b;
  --white: #fffef8;
  --radius: 4px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  /* surfaces */
  --page-bg: #171714;
  --code-bg: #171714;
  --glass-bg: rgba(23, 23, 20, 0.92);
  --panel-bg: #20201d;
  --panel-dot: #5b5a53;
  --faint-fill: rgba(255, 255, 255, 0.06);
  --grid-line: rgba(255, 255, 255, 0.045);
  /* text (semantic) */
  --text-secondary: #c9c7bf;
  --text-tertiary: #aaa89f;
  --text-quaternary: #97958d;
  --text-placeholder: #a8a69e;
  --text-on-dark: #f3f1e9;
  /* card text (always dark — on colored/light backgrounds) */
  --on-card: rgba(23, 23, 20, 0.65);
  --on-card-deep: rgba(23, 23, 20, 0.68);
  --on-card-faint: rgba(23, 23, 20, 0.55);
  --on-card-body: rgba(23, 23, 20, 0.72);
  --on-card-text: #171714;
  --on-card-label: #8d8f8a;
  --on-card-secondary: #4c4d49;
  --on-card-dim: #666862;
  --on-card-muted: #5b5d58;
  /* effects */
  --border: rgba(255, 255, 255, 0.18);
  --border-light: rgba(23, 23, 20, 0.2);
  --glow-mint: rgba(157, 233, 197, 0.12);
  --callout-bg: rgba(231, 255, 118, 0.08);
  --pink-border: rgba(255, 158, 196, 0.45);
  --placeholder-bg: #c6c7c2;
}
html.light-mode {
  color-scheme: light;
  --ink: #f3f1e9;
  --paper: #1a1a17;
  --paper-soft: #73716a;
  --ink-soft: #eeece4;
  --yellow: #8a6d10;
  /* surfaces */
  --page-bg: #faf9f4;
  --code-bg: #171714;
  --glass-bg: rgba(250, 249, 244, 0.92);
  --panel-bg: #eeece4;
  --panel-dot: #bbb9b0;
  --faint-fill: rgba(26, 26, 23, 0.05);
  --grid-line: rgba(26, 26, 23, 0.12);
  /* text */
  --text-secondary: #4a4a45;
  --text-tertiary: #555550;
  --text-quaternary: #666660;
  --text-placeholder: #8a8880;
  --text-on-dark: #f3f1e9;
  /* effects */
  --border: rgba(26, 26, 23, 0.15);
  --border-light: rgba(26, 26, 23, 0.12);
  --glow-mint: rgba(80, 180, 130, 0.12);
  --callout-bg: rgba(231, 255, 118, 0.18);
  --pink-border: rgba(255, 100, 150, 0.35);
  --placeholder-bg: #d8d7d0;
  --card-neutral: #e8e6de;
}

html.light-mode .github-card {
  background: var(--card-neutral);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  min-height: 100vh;
  overflow-x: clip;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, auto) minmax(210px, 320px) 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 82px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  margin-top: 4px;
  color: var(--paper-soft);
  font-size: 9px;
  font-weight: 700;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--faint-fill);
}

.search-box span {
  color: var(--paper-soft);
  font-size: 12px;
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
}

.search-box input::placeholder {
  color: var(--text-placeholder);
}

.nav-list {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}

.nav-link img {
  width: 15px;
  height: 15px;
  filter: grayscale(1) invert(1);
  opacity: 0.75;
}

html.light-mode .nav-link img {
  filter: none;
}

.nav-link:hover,
.nav-link.is-active {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.nav-link:hover img,
.nav-link.is-active img {
  filter: none;
  opacity: 1;
}

html.light-mode .nav-link:hover img,
html.light-mode .nav-link.is-active img {
  filter: invert(1);
}

.sidebar-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--paper-soft);
  font-size: 11px;
}

.sidebar-note p {
  max-width: 130px;
  margin: 0;
  line-height: 1.35;
}

.status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px var(--glow-mint);
}

.content {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 0 32px 100px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 46px;
  min-height: min(760px, calc(100vh - 130px));
  align-items: center;
  padding: 72px 0 64px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 10px;
  font-size: 96px;
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-award {
  margin-bottom: 28px;
  color: var(--paper);
  font-size: 38px;
  font-weight: 650;
  line-height: 1.2;
}

.hero-statement {
  width: fit-content;
  margin-bottom: 24px;
  padding: 10px 14px;
  border: 1px solid var(--yellow);
  border-radius: 999px;
  color: var(--yellow);
  font-size: 14px;
  font-weight: 700;
}

.hero-text {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 19px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  font-weight: 750;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--on-card-text);
}

.button.secondary {
  background: transparent;
  color: var(--paper);
}

.workflow-panel {
  position: relative;
  padding: 18px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: 14px 14px 0 var(--pink);
  transform: rotate(1.5deg);
}

.panel-header {
  display: flex;
  gap: 7px;
  padding-bottom: 18px;
}

.panel-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--panel-dot);
}

.workflow-stage {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--on-card-text);
}

.workflow-stage.active {
  background: var(--mint);
}

.workflow-stage:nth-of-type(4) {
  background: var(--blue);
}

.workflow-stage:nth-of-type(6) {
  background: var(--orange);
}

.workflow-stage img {
  width: 32px;
  height: 32px;
}

.workflow-stage strong,
.workflow-stage small {
  display: block;
}

.workflow-stage strong {
  font-size: 17px;
}

.workflow-stage small {
  margin-top: 5px;
  color: var(--on-card);
}

.workflow-line {
  width: 1px;
  height: 16px;
  margin-left: 31px;
  background: var(--paper);
}

.capability-ticker {
  overflow: hidden;
  margin: 0 -32px;
  border-top: 1px solid var(--paper);
  border-bottom: 1px solid var(--paper);
  background: var(--yellow);
  color: var(--on-card-text);
}

.capability-ticker div {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 24px;
  padding: 15px 0;
  animation: ticker 24s linear infinite;
}

.capability-ticker span {
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.capability-ticker b {
  font-size: 20px;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

.metrics-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.8fr;
  margin: 42px 0 0;
  border-top: 1px solid var(--paper);
  border-left: 1px solid var(--paper);
}

.metric,
.path-item,
.lesson-card,
.resource-card,
.notion-doc {
  border-radius: var(--radius);
}

.metric {
  min-height: 230px;
  padding: 24px;
  border-right: 1px solid var(--on-card-text);
  border-bottom: 1px solid var(--on-card-text);
  color: var(--on-card-text);
}

.metric:nth-child(1) {
  background: var(--pink);
}

.metric:nth-child(2) {
  background: var(--blue);
}

.metric:nth-child(3) {
  background: var(--mint);
}

.metric span,
.tag,
.resource-card span,
.doc-label {
  display: inline-flex;
  margin-bottom: 30px;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-bottom: 12px;
  font-size: 34px;
  line-height: 1.05;
}

.metric p,
.path-item p,
.lesson-card p,
.resource-card p,
.section-heading p,
.notion-doc p {
  line-height: 1.7;
}

.metric p {
  color: var(--on-card-deep);
}

.section-block {
  padding: 128px 0 0;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 46px;
}

.section-heading.compact {
  max-width: none;
}

.section-heading h2 {
  margin-bottom: 20px;
  font-size: 64px;
  line-height: 0.98;
}

.section-heading > p:last-child {
  max-width: 720px;
  color: var(--text-tertiary);
  font-size: 17px;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  border-top: 1px solid var(--paper);
  border-left: 1px solid var(--paper);
}

.path-item {
  position: relative;
  display: flex;
  grid-column: span 3;
  flex-direction: column;
  min-height: 320px;
  padding: 24px;
  border-right: 1px solid var(--on-card-text);
  border-bottom: 1px solid var(--on-card-text);
  color: var(--on-card-text);
}

.path-item:nth-child(1) {
  grid-column: span 4;
  background: var(--yellow);
}

.path-item:nth-child(2) {
  background: var(--pink);
}

.path-item:nth-child(3) {
  background: var(--blue);
}

.path-item:nth-child(4) {
  grid-column: span 2;
  background: var(--orange);
}

.path-item.is-placeholder {
  overflow: hidden;
  padding-top: 38px;
  background: var(--placeholder-bg);
  color: var(--on-card-secondary);
}

.path-item.is-placeholder::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 12px;
  background: var(--on-card-label);
  content: "";
}

.path-item.is-placeholder p {
  color: var(--on-card-dim);
}

.step-number {
  width: fit-content;
  margin-bottom: 58px;
  padding-bottom: 5px;
  border-bottom: 2px solid currentColor;
  font-size: 12px;
  font-weight: 850;
}

.path-item h3,
.lesson-card h3,
.resource-card h3 {
  margin-bottom: 12px;
}

.path-item h3 {
  font-size: 30px;
  line-height: 1.05;
}

.path-item p {
  color: var(--on-card-deep);
}

.path-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.course-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--on-card-text);
  border-radius: 999px;
  background: var(--on-card-text);
  color: var(--text-on-dark);
  font-size: 12px;
  font-weight: 850;
}

.course-link:hover {
  background: transparent;
  color: var(--on-card-text);
}

.course-link.is-secondary {
  background: transparent;
  color: var(--on-card-text);
}

.course-link.is-secondary:hover {
  background: var(--on-card-text);
  color: var(--text-on-dark);
}

.upcoming-status {
  width: fit-content;
  margin-top: auto;
  padding: 8px 13px;
  border: 1px solid #686a65;
  border-radius: 999px;
  color: var(--on-card-muted);
  font-size: 12px;
  font-weight: 750;
}

.lesson-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.lesson-card {
  display: flex;
  grid-column: span 5;
  min-height: 330px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--paper);
  background: var(--paper);
  color: var(--on-card-text);
}

.lesson-card.is-next {
  grid-column: span 7;
  min-height: 440px;
  background: var(--yellow);
}

.lesson-card:nth-child(3) {
  grid-column: 8 / span 5;
  margin-top: -90px;
  background: var(--pink);
}

.lesson-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: auto;
  border: 1px solid var(--on-card);
  border-radius: 50%;
  background: transparent;
}

.lesson-icon img {
  width: 30px;
  height: 30px;
}

.lesson-content {
  margin-top: 56px;
}

.lesson-card h3 {
  max-width: 760px;
  font-size: 35px;
  line-height: 1.08;
}

.lesson-card p {
  max-width: 720px;
  color: var(--on-card-deep);
}

.tag {
  margin-bottom: 12px;
  color: var(--on-card);
}

.tag.muted {
  color: var(--on-card-faint);
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.lesson-meta span {
  padding: 7px 10px;
  border: 1px solid var(--on-card);
  border-radius: 999px;
  font-size: 11px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 70px;
  align-items: start;
}

.sticky-heading {
  position: sticky;
  top: 112px;
}

.notion-doc {
  padding: 38px;
  border: 1px solid #d5d3cb;
  background: #e8e6de;
  color: #171714;
  box-shadow: 16px 16px 0 var(--blue);
}

.notion-doc header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 34px;
}

.doc-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--on-card);
  border-radius: 50%;
  background: var(--pink);
  font-size: 26px;
  font-weight: 900;
}

.doc-label {
  margin-bottom: 5px;
  color: rgba(23, 23, 20, 0.55);
}

.notion-doc h3 {
  margin: 0;
  font-size: 34px;
  color: #171714;
}

.notion-doc h4 {
  margin: 34px 0 14px;
  font-size: 19px;
  color: #171714;
}

.notion-doc p {
  color: rgba(23, 23, 20, 0.68);
}

.callout {
  padding: 17px 18px;
  border: 1px solid var(--on-card);
  background: var(--mint);
}

.callout p {
  margin-bottom: 0;
}

.check-list {
  display: grid;
  gap: 11px;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

pre {
  position: relative;
  overflow: auto;
  margin: 16px 0 0;
  padding: 50px 18px 18px;
  border: 1px solid var(--code-bg);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--text-on-dark);
}

code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
}

.copy-button {
  position: absolute;
  top: 11px;
  right: 11px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--text-on-dark);
  border-radius: 999px;
  background: transparent;
  color: var(--text-on-dark);
  cursor: pointer;
}

.copy-button:hover {
  background: var(--text-on-dark);
  color: var(--code-bg);
}

/* Lesson pages */
.lesson-page {
  background-color: var(--ink);
}

.lesson-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
}

.lesson-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.lesson-brand img {
  width: 48px;
  height: 48px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  object-fit: cover;
}

.lesson-brand strong,
.lesson-brand small {
  display: block;
}

.lesson-brand strong {
  font-size: 14px;
}

.lesson-brand small {
  margin-top: 3px;
  color: var(--paper-soft);
  font-size: 9px;
  font-weight: 700;
}

.back-link {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--paper-soft);
  font-size: 12px;
  font-weight: 750;
}

.back-link:hover {
  border-color: var(--paper);
  color: var(--paper);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lesson-main {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
}

.lesson-hero {
  min-height: 610px;
  padding: 112px 0 80px;
  border-bottom: 1px solid var(--paper);
}

.lesson-hero h1 {
  max-width: none;
  margin: 28px 0 32px;
  font-size: clamp(54px, 6.2vw, 88px);
  line-height: 0.98;
}

.lesson-lead {
  max-width: 800px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1.75;
}

.lesson-lead strong {
  color: var(--yellow);
}

.lesson-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.lesson-meta-row span {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--paper-soft);
  font-size: 11px;
  font-weight: 800;
}

.lesson-section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}

.section-index {
  margin: 0 0 18px;
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.lesson-section > h2,
.split-section h2 {
  max-width: 1120px;
  margin: 0 0 44px;
  font-size: 50px;
  line-height: 1.05;
}

.origin-timeline {
  border-top: 1px solid var(--paper);
}

.origin-timeline article {
  display: grid;
  grid-template-columns: minmax(100px, 0.22fr) minmax(0, 1fr);
  gap: 30px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}

.origin-timeline time {
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 900;
}

.origin-timeline h3,
.origin-timeline p {
  margin: 0;
}

.origin-timeline h3 {
  margin-bottom: 10px;
  font-size: 23px;
}

.origin-timeline p {
  max-width: 820px;
  color: var(--text-tertiary);
  line-height: 1.75;
}

.relation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

.relation-card {
  min-height: 310px;
  padding: 26px;
  border-radius: var(--radius);
  color: var(--on-card-text);
}

.relation-card img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.relation-card > span {
  display: block;
  margin-top: 50px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.relation-card h3 {
  margin: 8px 0 14px;
  font-size: 38px;
}

.relation-card p {
  margin: 0;
  color: var(--on-card-body);
  line-height: 1.7;
}

.git-card {
  background: var(--yellow);
}

.github-card {
  background: var(--paper);
}

.gitlab-card {
  background: var(--orange);
}

.relation-plus,
.relation-or {
  display: grid;
  place-items: center;
  width: 32px;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 900;
}

.lesson-callout {
  margin-top: 18px;
  padding: 22px 24px;
  border-left: 4px solid var(--yellow);
  background: var(--callout-bg);
  color: var(--paper-soft);
  line-height: 1.75;
}

.lesson-callout strong {
  color: var(--yellow);
}

.compare-table {
  overflow: hidden;
  border: 1px solid var(--paper);
  border-radius: var(--radius);
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr) minmax(0, 1fr);
}

.compare-row + .compare-row {
  border-top: 1px solid var(--border);
}

.compare-row > * {
  min-width: 0;
  padding: 20px;
  line-height: 1.55;
}

.compare-row > * + * {
  border-left: 1px solid var(--border);
}

.compare-head {
  background: var(--paper);
  color: var(--on-card-text);
  font-size: 12px;
  font-weight: 900;
}

.lesson-note {
  max-width: 820px;
  margin: 22px 0 0;
  color: var(--text-tertiary);
  font-size: 14px;
  line-height: 1.75;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 72px;
}

.reason-list {
  border-top: 1px solid var(--paper);
}

.reason-list article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}

.reason-list article > span {
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 850;
}

.reason-list h3,
.reason-list p {
  margin: 0;
}

.reason-list h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.reason-list p {
  color: var(--text-tertiary);
  line-height: 1.65;
}

.workflow-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.workflow-steps span {
  flex: 0 0 auto;
  padding: 12px 15px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.workflow-steps b {
  color: var(--yellow);
}

.lesson-section pre {
  margin-top: 28px;
  border: 1px solid var(--code-bg);
  box-shadow: 9px 9px 0 var(--blue);
}

.quiz-section details {
  border-top: 1px solid var(--paper);
}

.quiz-section details:last-child {
  border-bottom: 1px solid var(--paper);
}

.quiz-section summary {
  padding: 24px 42px 24px 0;
  color: var(--paper);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.55;
  cursor: pointer;
}

.quiz-section details p {
  max-width: 760px;
  margin: 0;
  padding: 0 0 24px;
  color: var(--yellow);
  line-height: 1.7;
}

.lesson-summary {
  margin: 96px 0 32px;
  padding: 52px;
  background: var(--yellow);
  color: var(--on-card-text);
  box-shadow: 12px 12px 0 var(--pink);
}

.lesson-summary p {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.lesson-summary h2 {
  max-width: 850px;
  margin: 0 0 38px;
  font-size: 52px;
  line-height: 1.08;
}

.lesson-summary a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--on-card-text);
  border-radius: 999px;
  background: var(--on-card-text);
  color: var(--text-on-dark);
  font-size: 12px;
  font-weight: 850;
}

.lesson-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.lesson-summary a.is-outline {
  background: transparent;
  color: var(--on-card-text);
}

.lesson-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 34px 0 70px;
  color: var(--text-quaternary);
  font-size: 12px;
}

.lesson-sources span {
  color: var(--paper);
  font-weight: 850;
}

.lesson-sources a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lesson-sources a:hover {
  color: var(--yellow);
}

.compact-lesson-hero h1 {
  max-width: 1100px;
}

.command-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--paper);
}

.command-guide-single {
  grid-template-columns: 1fr;
}

.command-guide article {
  padding: 28px 24px 28px 0;
  border-bottom: 1px solid var(--border);
}

.command-guide:not(.command-guide-single) article:nth-child(odd) {
  padding-right: 28px;
  border-right: 1px solid var(--border);
}

.command-guide:not(.command-guide-single) article:nth-child(even) {
  padding-left: 28px;
}

.command-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.command-copy span {
  font-size: 15px;
  font-weight: 850;
}

.command-copy code,
.avoid-list code {
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--faint-fill);
  color: var(--yellow);
}

.command-guide article > p {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--text-tertiary);
  line-height: 1.7;
}

.push-explainer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid var(--paper);
  border-bottom: 1px solid var(--paper);
}

.push-explainer span {
  padding: 20px 18px;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.6;
}

.push-explainer span + span {
  border-left: 1px solid var(--border);
}

.push-explainer strong {
  display: block;
  margin-bottom: 6px;
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 15px;
}

.mr-steps {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--paper);
  list-style: none;
}

.mr-steps li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.mr-steps li > span {
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.mr-steps p {
  max-width: 850px;
  margin: 0;
  color: var(--text-tertiary);
  line-height: 1.75;
}

.mr-steps strong,
.mr-steps b {
  color: var(--paper);
}

.avoid-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  padding-top: 10px;
}

.avoid-list code {
  border-color: var(--pink-border);
  color: var(--pink);
}

.avoid-list p {
  flex-basis: 100%;
  margin: 18px 0 0;
  color: var(--text-tertiary);
  line-height: 1.75;
}

@media (max-width: 820px) {
  .lesson-topbar {
    padding-right: 20px;
    padding-left: 20px;
  }

  .lesson-main {
    width: min(100% - 40px, 1180px);
  }

  .lesson-hero {
    min-height: auto;
    padding: 80px 0 64px;
  }

  .lesson-hero h1 {
    font-size: 50px;
  }

  .relation-grid {
    grid-template-columns: 1fr;
  }

  .relation-plus,
  .relation-or {
    width: auto;
    min-height: 32px;
  }

  .split-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .push-explainer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .push-explainer span:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .push-explainer span:nth-child(4) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 620px) {
  .lesson-topbar {
    min-height: 68px;
  }

  .lesson-brand img {
    width: 42px;
    height: 42px;
  }

  .lesson-brand small {
    display: none;
  }

  .back-link {
    padding: 8px 10px;
    font-size: 11px;
  }

  .lesson-main {
    width: calc(100% - 32px);
  }

  .lesson-hero {
    padding: 64px 0 54px;
  }

  .lesson-hero h1 {
    margin: 22px 0 26px;
    font-size: 42px;
    line-height: 1.02;
  }

  .lesson-lead {
    font-size: 17px;
  }

  .lesson-section {
    padding: 68px 0;
  }

  .lesson-section > h2,
  .split-section h2 {
    margin-bottom: 32px;
    font-size: 38px;
  }

  .origin-timeline article {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .command-guide {
    grid-template-columns: 1fr;
  }

  .command-guide:not(.command-guide-single) article:nth-child(odd),
  .command-guide:not(.command-guide-single) article:nth-child(even) {
    padding-right: 0;
    padding-left: 0;
    border-right: 0;
  }

  .command-copy {
    align-items: flex-start;
    flex-direction: column;
  }

  .push-explainer {
    grid-template-columns: 1fr;
  }

  .push-explainer span + span,
  .push-explainer span:nth-child(3),
  .push-explainer span:nth-child(4) {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .relation-card {
    min-height: 270px;
    padding: 22px;
  }

  .compare-table {
    overflow-x: auto;
  }

  .compare-row {
    min-width: 660px;
  }

  .lesson-summary {
    margin-top: 68px;
    padding: 34px 24px;
    box-shadow: 8px 8px 0 var(--pink);
  }

  .lesson-summary h2 {
    font-size: 36px;
  }
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-chip {
  min-height: 39px;
  padding: 0 15px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}

.filter-chip.is-selected,
.filter-chip:hover {
  background: var(--paper);
  color: var(--ink);
}

.resource-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.2fr;
  border-top: 1px solid var(--paper);
  border-left: 1px solid var(--paper);
}

.resource-card {
  min-height: 310px;
  padding: 25px;
  border-right: 1px solid var(--on-card);
  border-bottom: 1px solid var(--on-card);
  color: var(--on-card-text);
}

.resource-card:nth-child(1) {
  background: var(--pink);
}

.resource-card:nth-child(2) {
  background: var(--mint);
}

.resource-card:nth-child(3) {
  background: var(--orange);
}

.resource-card img {
  width: 42px;
  height: 42px;
  margin-bottom: 70px;
}

.resource-card span {
  margin-bottom: 10px;
  color: var(--on-card-faint);
}

.resource-card h3 {
  font-size: 28px;
}

.resource-card p {
  color: var(--on-card-deep);
}

.resource-card.is-hidden,
.searchable.is-hidden {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  transform: translateX(-50%) translateY(16px);
  padding: 11px 16px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--on-card-text);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1200px) {
  .sidebar {
    grid-template-columns: minmax(240px, auto) minmax(180px, 250px) 1fr;
  }

  .sidebar-note {
    display: none;
  }

  .nav-link {
    padding: 0 9px;
  }

  .nav-link img {
    display: none;
  }

  h1 {
    font-size: 76px;
  }

  .hero-section {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  }

  .path-item,
  .path-item:nth-child(1),
  .path-item:nth-child(4) {
    grid-column: span 6;
  }
}

@media (max-width: 920px) {
  html {
    scroll-padding-top: 148px;
  }

  .sidebar {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 18px;
  }

  .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .nav-list {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-link img {
    display: block;
  }

  .content {
    padding: 0 18px 80px;
  }

  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 64px 0 74px;
  }

  h1 {
    font-size: 64px;
  }

  .workflow-panel {
    max-width: 600px;
    transform: none;
  }

  .capability-ticker {
    margin: 0 -18px;
  }

  .metrics-row,
  .resource-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric:nth-child(3),
  .resource-card:nth-child(3) {
    grid-column: 1 / -1;
  }

  .lesson-card,
  .lesson-card.is-next,
  .lesson-card:nth-child(3) {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .sticky-heading {
    position: static;
  }
}

@media (max-width: 620px) {
  .sidebar {
    grid-template-columns: 1fr;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .nav-list {
    grid-row: 2;
  }

  .search-box {
    grid-row: 3;
  }

  h1 {
    font-size: 44px;
    line-height: 1.08;
  }

  .hero-award {
    margin-bottom: 22px;
    font-size: 25px;
  }

  .hero-section {
    gap: 24px;
    padding: 36px 0 20px;
  }

  .hero-statement {
    font-size: 12px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .workflow-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
    box-shadow: 6px 6px 0 var(--pink);
  }

  .panel-header {
    display: none;
  }

  .workflow-stage {
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 8px;
  }

  .workflow-stage img {
    width: 24px;
    height: 24px;
  }

  .workflow-stage strong {
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
  }

  .workflow-stage small {
    display: none;
  }

  .workflow-line {
    display: none;
  }

  .section-block {
    padding-top: 92px;
  }

  .section-heading h2 {
    font-size: 46px;
  }

  .metrics-row,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .metric:nth-child(3),
  .resource-card:nth-child(3) {
    grid-column: auto;
  }

  .metric {
    min-height: 190px;
  }

  .path-grid {
    grid-template-columns: 1fr;
  }

  .path-item,
  .path-item:nth-child(1),
  .path-item:nth-child(4) {
    grid-column: auto;
    min-height: 260px;
  }

  .lesson-board {
    grid-template-columns: 1fr;
  }

  .lesson-card,
  .lesson-card.is-next,
  .lesson-card:nth-child(3) {
    grid-column: auto;
    min-height: 330px;
  }

  .lesson-card h3 {
    font-size: 29px;
  }

  .notion-doc {
    padding: 24px 18px;
    box-shadow: 8px 8px 0 var(--blue);
  }

  .resource-card {
    min-height: 250px;
  }
}

/* Light mode: workflow panel stays as surface color */
html.light-mode .workflow-panel {
  background: var(--panel-bg);
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--paper-soft);
  font-size: 16px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--paper);
  color: var(--ink);
}

.theme-toggle .toggle-sun {
  display: none;
}

.theme-toggle .toggle-moon {
  display: inline;
}

html.light-mode .theme-toggle .toggle-sun {
  display: inline;
}

html.light-mode .theme-toggle .toggle-moon {
  display: none;
}

html.light-mode .theme-toggle {
  border-color: var(--border);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .capability-ticker div {
    animation: none;
  }

  .button,
  .toast,
  .theme-toggle {
    transition: none;
  }
}

/* auth gate */
.auth-gate {
  position: fixed;
  inset: 0;
  background: var(--page-bg, #171714);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.auth-logo {
  margin-bottom: 20px;
  border-radius: 12px;
}
.auth-title {
  color: var(--text-on-dark, #f3f1e9);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.auth-sub {
  color: var(--text-tertiary, #aaa89f);
  font-size: 14px;
  margin: 0 0 28px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-form input {
  padding: 14px 16px;
  border-radius: var(--radius, 4px);
  border: 1px solid var(--border, rgba(255,255,255,0.18));
  background: var(--faint-fill, rgba(255,255,255,0.06));
  color: var(--text-on-dark, #f3f1e9);
  font-size: 15px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s;
}
.auth-form input:focus {
  border-color: var(--mint, #9de9c5);
}
.auth-form input::placeholder {
  color: var(--text-placeholder, #a8a69e);
}
.auth-form button {
  padding: 14px 16px;
  border-radius: var(--radius, 4px);
  border: none;
  background: var(--yellow, #e7ff76);
  color: var(--ink, #171714);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.15s;
}
.auth-form button:hover {
  opacity: 0.9;
}
.auth-error {
  color: var(--pink, #ff9ec4);
  font-size: 13px;
  margin: 4px 0 0;
}

/* team-project-template lesson styles */

/* problem cards */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.problem-card {
  padding: 24px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.problem-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 12px;
}
.problem-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--text-on-dark);
}
.problem-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* layers stack */
.layers-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.layer-card {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  padding: 20px 24px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: start;
}
.layer-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: -0.02em;
}
.layer-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.layer-card h3 code {
  font-size: 12px;
  padding: 2px 8px;
  background: var(--faint-fill);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--mint);
}
.layer-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* agent grid */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.agent-card {
  padding: 22px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.agent-card.controller {
  background: var(--yellow);
  color: var(--ink);
}
.agent-card.controller h3,
.agent-card.controller p {
  color: var(--ink);
}
.agent-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--orange);
  color: var(--ink);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 10px;
}
.agent-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--text-on-dark);
  font-family: var(--font-mono);
}
.agent-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* hooks grid */
.hooks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.hook-card {
  padding: 20px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.hook-card > code {
  display: inline-block;
  padding: 2px 8px;
  background: var(--mint);
  color: var(--ink);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 8px;
}
.hook-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-on-dark);
  font-family: var(--font-mono);
}
.hook-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

/* skill pipeline */
.skill-pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.skill-step {
  padding: 18px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.skill-step code {
  display: block;
  font-size: 13px;
  color: var(--mint);
  margin-bottom: 6px;
  word-break: break-all;
}
.skill-step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

/* evolution flow */
.evolution-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.evo-stage {
  padding: 20px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.evo-stage > span {
  display: inline-block;
  width: 42px;
  height: 42px;
  line-height: 42px;
  text-align: center;
  background: var(--pink);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  border-radius: 50%;
  margin-bottom: 12px;
}
.evo-stage h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-on-dark);
}
.evo-stage p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .problem-grid,
  .hooks-grid {
    grid-template-columns: 1fr;
  }
  .evolution-flow {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .evolution-flow {
    grid-template-columns: 1fr;
  }
  .layer-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .layer-num {
    font-size: 24px;
  }
}
