:root {
  --bg: #0e0d0c;
  --bg-elev: #16140f;
  --surface: #1a1814;
  --surface-soft: #221f19;
  --text: #f5f1ea;
  --text-soft: #c8c1b4;
  --muted: #8e887d;
  --muted-2: #6b665d;
  --border: rgba(255, 245, 230, .08);
  --border-strong: rgba(255, 245, 230, .14);
  --accent: #d97757;
  --accent-hover: #e58767;
  --accent-soft: rgba(217, 119, 87, .12);
  --accent-line: rgba(217, 119, 87, .32);
  --success: #7eb486;
  --success-soft: rgba(126, 180, 134, .12);
  --shadow-pop: 0 16px 60px rgba(0, 0, 0, .55);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --header-height: 64px;
  --sidebar-width: 256px;
  --article-width: 760px;
  --container: 1240px;
  --font: "Inter Tight", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--muted-2) var(--bg); }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { color: var(--text); background: rgba(217, 119, 87, .34); }

:where(a, button, input, select):focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--header-height);
  background: rgba(14, 13, 12, .86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(140%) blur(14px);
}
.header-inner {
  width: min(var(--container), calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-family: "Space Grotesk", var(--font);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  white-space: nowrap;
}
.logo-mark {
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
}
.logo-mark span { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: var(--text-soft); font-size: 14px; transition: color .2s var(--ease); }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a.active { box-shadow: 0 1px 0 var(--accent); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-search {
  width: 210px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.header-search:focus-within { border-color: var(--accent-line); }
.header-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 13px; }
.header-search input::placeholder { color: var(--muted); }
.button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.button:hover { transform: translateY(-1px); }
.button-primary, .button-accent { color: #1a100c; background: var(--accent); }
.button-primary:hover, .button-accent:hover { background: var(--accent-hover); }
.button-secondary { color: var(--text); background: var(--surface); border-color: var(--border-strong); }
.button-secondary:hover { background: var(--surface-soft); border-color: var(--accent-line); }
.menu-toggle, .mobile-search {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: none;
  place-items: center;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}

.page-shell {
  width: min(var(--container), calc(100% - 48px));
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  padding: 40px 0 96px;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding: 0 16px 12px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--muted-2) transparent;
}
.sidebar-home { display: inline-block; margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.sidebar-home:hover { color: var(--accent); }
.sidebar-title { margin: 0 0 7px; font-size: 17px; line-height: 1.25; letter-spacing: -.02em; }
.sidebar-note { margin: 0 0 23px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.sidebar-nav { border-left: 1px solid var(--border); padding-left: 15px; }
.sidebar-group-label {
  margin: 24px 0 9px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sidebar-link {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.3;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.sidebar-link:hover { color: var(--text); background: rgba(255, 245, 230, .035); }
.sidebar-link.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.sidebar-number {
  flex: 0 0 25px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
}
.sidebar-link.active .sidebar-number { color: var(--accent); }
.sidebar-sublist { margin: 5px 0 12px 35px; display: grid; gap: 3px; }
.sidebar-case-label { margin: 17px 9px 6px; padding-top: 13px; border-top: 1px solid var(--border); color: var(--muted-2); font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-course-link { min-width: 0; min-height: 39px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 2px; padding: 8px 9px; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--text-soft); background: rgba(255, 245, 230, .025); font-size: 12px; font-weight: 600; line-height: 1.35; transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease); }
.sidebar-course-link:hover { color: var(--text); background: rgba(255, 245, 230, .05); border-color: var(--border); }
.sidebar-course-link.open { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.sidebar-course-title { min-width: 0; overflow-wrap: anywhere; }
.sidebar-course-meta { display: inline-flex; align-items: center; gap: 3px; color: var(--muted-2); font-family: var(--mono); font-size: 9px; font-weight: 500; white-space: nowrap; }
.sidebar-course-link.open .sidebar-course-meta { color: var(--accent); }
.sidebar-course-chevron { display: inline-block; font-size: 14px; line-height: 1; transition: transform .18s var(--ease); }
.sidebar-course-link.open .sidebar-course-chevron { transform: rotate(90deg); }
.sidebar-lessons { display: grid; gap: 2px; margin: 2px 0 8px 5px; padding: 3px 0 3px 10px; border-left: 1px solid var(--border); }
.sidebar-lesson-link { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; padding: 6px 7px; border-radius: var(--radius-sm); color: var(--muted-2); font-size: 11px; line-height: 1.35; transition: color .18s var(--ease), background .18s var(--ease); }
.sidebar-lesson-link > span:first-child { padding-top: 1px; color: var(--muted-2); font-family: var(--mono); font-size: 9px; }
.sidebar-lesson-link > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.sidebar-lesson-link:hover { color: var(--text-soft); background: rgba(255, 245, 230, .035); }
.sidebar-lesson-link.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.sidebar-lesson-link.active > span:first-child { color: var(--accent); }
.sidebar-open-note { margin-top: 24px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--muted); background: var(--bg-elev); font-size: 12px; line-height: 1.5; }
.sidebar-open-note strong { color: var(--text-soft); }

.main-content { min-width: 0; }
.content-wrap { width: 100%; margin: 0; }
.article-wrap { width: min(100%, var(--article-width)); margin: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; color: var(--muted-2); font-family: var(--mono); font-size: 11px; line-height: 1.6; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.eyebrow { color: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; color: var(--text); letter-spacing: -.035em; }
h1 { max-width: 840px; margin-bottom: 16px; font-size: clamp(36px, 4.2vw, 48px); line-height: 1.08; }
h2 { margin-bottom: 13px; font-size: clamp(23px, 2.3vw, 28px); line-height: 1.18; }
h3 { margin-bottom: 9px; font-size: 18px; line-height: 1.25; }
.lead { max-width: 760px; margin: 0; color: var(--text-soft); font-size: 18px; line-height: 1.65; }
.section { margin-top: 64px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { margin-bottom: 0; }
.section-head p { max-width: 640px; margin: 7px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.text-link { color: var(--accent); font-size: 14px; font-weight: 600; white-space: nowrap; }
.text-link:hover { color: var(--accent-hover); }

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 5vw, 64px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}
.hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -210px;
  top: -250px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  box-shadow: 0 0 90px rgba(217, 119, 87, .08);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 780px; }
.hero h1 { margin-top: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 19px; margin-top: 26px; color: var(--muted); font-size: 13px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { color: var(--success); }

.quick-start { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.quick-start p { color: var(--text-soft); line-height: 1.6; }
.quick-path { display: grid; gap: 8px; }
.quick-step { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-elev); }
.quick-step strong { font-size: 13px; }
.quick-step small { display: block; margin-top: 2px; color: var(--muted); }
.quick-step-number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--accent); background: var(--accent-soft); font-family: var(--mono); font-size: 10px; font-weight: 600; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.one { grid-template-columns: minmax(0, 1fr); }
.course-card, .resource-card, .project-card {
  position: relative;
  min-width: 0;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s var(--ease);
}
a.course-card, a.project-card { display: flex; flex-direction: column; }
.course-card:hover, a.project-card:hover { transform: translateY(-2px); border-color: var(--border-strong); background: #1d1b16; }
.course-card-case { border-color: var(--accent-line); background: linear-gradient(145deg, var(--surface), rgba(217, 119, 87, .045)); }
.resource-card:hover, article.project-card:hover { border-color: var(--border-strong); }
.card-icon { width: 38px; height: 38px; margin-bottom: 18px; display: grid; place-items: center; border: 1px solid var(--accent-line); border-radius: var(--radius-md); color: var(--accent); background: var(--accent-soft); }
.card-number { position: absolute; top: 20px; right: 20px; color: var(--muted-2); font-family: var(--mono); font-size: 11px; }
.course-card h3, .resource-card h3, .project-card h3 { margin-bottom: 8px; font-size: 18px; }
.course-card p, .resource-card p, .project-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); background: var(--bg-elev); font-family: var(--mono); font-size: 10px; font-weight: 500; line-height: 1.35; }
.chip.accent { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.chip.success { color: var(--success); background: var(--success-soft); border-color: rgba(126, 180, 134, .25); }
.card-link { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 19px; color: var(--accent); font-size: 13px; font-weight: 600; }
.card-action { border: 0; background: transparent; cursor: pointer; padding-right: 0; padding-left: 0; padding-bottom: 0; }
.card-action:hover { color: var(--accent-hover); }
.project-card-featured { max-width: 760px; }

.outcome-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.outcome-card { min-width: 0; padding: 17px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: border-color .2s var(--ease), transform .2s var(--ease); }
.outcome-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.outcome-card strong { display: block; margin-bottom: 6px; font-size: 14px; }
.outcome-card span { color: var(--muted); font-size: 12px; line-height: 1.45; }

.course-hero { padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.course-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.course-summary { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; align-items: start; }
.course-outcome { margin: 24px 0 18px; padding: 16px 18px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--accent-soft); }
.course-outcome p { margin: 7px 0 0; color: var(--text); font-size: 16px; line-height: 1.55; }
.course-open-note { margin: 0; color: var(--muted); line-height: 1.65; }
.course-prerequisites ul { margin: 0; padding: 20px 24px 20px 42px; border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text-soft); background: var(--surface); }
.course-prerequisites li { margin: 7px 0; padding-left: 4px; }
.course-aside { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.course-aside-row { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--border); }
.course-aside-row:last-of-type { border: 0; }
.course-aside-row strong { max-width: 58%; color: var(--text); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.course-aside .button { width: 100%; margin-top: 14px; }
.lesson-list { display: grid; gap: 8px; }
.lesson-row { min-width: 0; min-height: 66px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: border-color .18s var(--ease), transform .18s var(--ease); }
.lesson-row:hover { border-color: var(--border-strong); transform: translateX(2px); }
.lesson-index { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--muted); background: var(--bg-elev); border: 1px solid var(--border); font-family: var(--mono); font-size: 10px; }
.lesson-row strong { display: block; margin-bottom: 3px; font-size: 14px; }
.lesson-row small { color: var(--muted); }
.lesson-row-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }

.lesson-page { display: grid; grid-template-columns: minmax(0, var(--article-width)) minmax(150px, 200px); gap: 40px; justify-content: start; }
.lesson-article { min-width: 0; }
.lesson-info { display: flex; flex-wrap: wrap; gap: 15px; margin: 18px 0 28px; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.lesson-info span { display: inline-flex; align-items: center; gap: 6px; }
.lesson-article p, .lesson-article li { color: var(--text-soft); font-size: 16px; line-height: 1.72; }
.lesson-article .lesson-lead { font-size: 18px; line-height: 1.7; }
.lesson-article ol { padding-left: 24px; }
.lesson-article li { padding-left: 5px; margin: 7px 0; }
.lesson-article h2 { margin-top: 48px; font-size: 24px; }
.lesson-article h3 { margin-top: 28px; }
.lesson-steps { margin-bottom: 0; }
.video-frame { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; margin: 30px 0 38px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-slot { min-height: 220px; margin: 30px 0 38px; padding: 28px; border: 1px dashed var(--accent-line); border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; background: linear-gradient(135deg, var(--bg-elev), var(--surface)); }
.video-slot strong { max-width: 560px; margin-top: 12px; font-size: 22px; line-height: 1.25; }
.video-slot p { margin: 18px 0 5px; color: var(--accent); font-family: var(--mono); font-size: 13px; }
.video-slot small { color: var(--muted); }
.prompt-box { margin: 22px 0; border: 1px solid var(--accent-line); border-radius: var(--radius-md); background: var(--bg-elev); overflow: hidden; }
.prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px; border-bottom: 1px solid var(--accent-line); color: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 600; }
.prompt-copy { border: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); background: transparent; cursor: pointer; font-family: var(--font); font-size: 12px; font-weight: 600; }
.prompt-text { padding: 17px; color: var(--text-soft); font-family: var(--mono); font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.callout { margin: 24px 0; padding: 17px 19px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--text-soft); background: var(--accent-soft); font-size: 14px; line-height: 1.6; }
.callout strong { display: block; margin-bottom: 5px; color: var(--accent); }
.prompt-note { margin-top: -4px; }
.mistakes-card { padding: 18px 20px; border: 1px solid rgba(217, 101, 80, .24); border-radius: var(--radius-lg); background: rgba(217, 101, 80, .07); }
.mistakes-card ul { margin: 0; padding-left: 21px; }
.mistakes-card li { margin: 8px 0; }
.practice-card { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.practice-card h3 { margin: 0 0 9px; }
.practice-task { margin: 0; }
.practice-label { margin-top: 20px; color: var(--muted-2); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.checklist { display: grid; gap: 10px; margin-top: 14px; }
.check-item { display: flex; gap: 10px; align-items: flex-start; color: var(--text-soft); font-size: 14px; line-height: 1.5; }
.check-dot { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 1px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--bg-elev); }
.lesson-toc { position: sticky; top: 92px; align-self: start; }
.lesson-toc-title { margin-bottom: 10px; color: var(--muted-2); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.lesson-toc a { display: block; padding: 7px 0 7px 12px; border-left: 1px solid var(--border); color: var(--muted); font-size: 12px; line-height: 1.35; }
.lesson-toc a:hover { color: var(--accent); border-color: var(--accent); }
.lesson-actions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.lesson-actions > :last-child { justify-self: end; }
.complete-button.completed { color: var(--success); background: var(--success-soft); border-color: rgba(126, 180, 134, .25); }
.lesson-resource-section { margin-top: 48px; }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.download-card { min-width: 0; display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: border-color .18s var(--ease), transform .18s var(--ease); }
.download-card:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.download-icon { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--accent); background: var(--accent-soft); }
.download-card span:last-child { min-width: 0; }
.download-card strong { display: block; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.download-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.related-links { display: grid; gap: 8px; }
.related-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-soft); background: var(--surface); font-size: 14px; }
.related-links a:hover { color: var(--accent); border-color: var(--accent-line); }
.project-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 30px 0 24px; }
.project-summary > div { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.project-summary span { display: block; margin-bottom: 5px; color: var(--muted-2); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.project-summary strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.project-course-link { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.project-course-link h2 { margin: 8px 0 7px; }
.project-course-link p { max-width: 520px; margin: 0; color: var(--muted); }
.project-course-link .button { flex: 0 0 auto; }
.project-list { display: grid; gap: 28px; margin-top: 36px; }
.project-block { margin-top: 0; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elev); }
.project-block > h2 { margin: 12px 0 8px; }
.project-block > p { margin: 0; color: var(--muted); }
.project-block .project-course-link { margin-top: 24px; }
.project-block .project-course-link h3 { margin: 8px 0 0; }

.catalog-toolbar { display: grid; grid-template-columns: minmax(210px, 1.25fr) repeat(3, minmax(142px, 1fr)); gap: 9px; margin: 28px 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.catalog-case-section, .case-course-section { margin-top: 54px; padding-top: 30px; border-top: 1px solid var(--border); }
.legacy-notice { display: flex; align-items: flex-start; gap: 12px; margin: 24px 0 0; padding: 14px 16px; border: 1px solid var(--accent-line); border-radius: var(--radius-md); color: var(--text-soft); background: var(--accent-soft); font-size: 13px; line-height: 1.55; }
.legacy-notice strong { flex: 0 0 auto; color: var(--accent); }
.filter-control { min-width: 0; width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-soft); background: var(--bg-elev); outline: 0; font-size: 13px; }
.filter-control:focus { border-color: var(--accent); }
.catalog-empty { padding: 40px 22px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--muted); }
.search-page-form { display: flex; gap: 9px; margin: 22px 0 34px; }
.search-page-form input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-md); outline: 0; color: var(--text); background: var(--surface); }
.search-page-form input::placeholder { color: var(--muted); }
.search-page-form input:focus { border-color: var(--accent); }
.search-result { display: grid; gap: 5px; padding: 17px 0; border-bottom: 1px solid var(--border); }
.search-result:hover strong { color: var(--accent); }
.search-result small { color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.search-result strong { font-size: 17px; transition: color .18s var(--ease); }
.search-result span { color: var(--muted); font-size: 13px; }

.site-footer { border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; padding: 80px 0 52px; display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; }
.footer-brand p { max-width: 280px; margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.footer-col strong { display: block; margin-bottom: 15px; font-size: 13px; }
.footer-col a { display: block; margin: 9px 0; color: var(--muted); font-size: 13px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; padding: 24px 0 32px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 20px; color: var(--muted-2); font-family: var(--mono); font-size: 10px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); color: var(--text); background: var(--surface-soft); box-shadow: var(--shadow-pop); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }
.mobile-overlay { display: none; }

@media (max-width: 1180px) {
  .main-nav { display: none; }
  .course-summary { grid-template-columns: 1fr; gap: 24px; }
  .course-aside { max-width: 460px; }
  .lesson-page { grid-template-columns: minmax(0, 1fr); }
  .lesson-toc { display: none; }
}

@media (max-width: 1050px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outcome-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-search { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  .header-inner { width: calc(100% - 32px); gap: 12px; }
  .header-search { display: none; }
  .menu-toggle, .mobile-search { display: grid; }
  .header-actions { gap: 8px; }
  .page-shell { width: 100%; display: block; padding: 36px 24px 72px; }
  .sidebar { position: fixed; z-index: 95; top: var(--header-height); left: 0; width: min(88vw, 330px); max-height: none; height: calc(100vh - var(--header-height)); padding: 24px 22px 36px; background: var(--bg-elev); border-right: 1px solid var(--border); transform: translateX(-102%); transition: transform .22s var(--ease); box-shadow: var(--shadow-pop); }
  .sidebar.open { transform: translateX(0); }
  .mobile-overlay { position: fixed; z-index: 90; inset: var(--header-height) 0 0; display: block; opacity: 0; pointer-events: none; background: rgba(0, 0, 0, .62); transition: opacity .2s var(--ease); }
  .mobile-overlay.open { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .sidebar-nav { padding-left: 13px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .header-actions .button-primary { display: none; }
  .page-shell { padding: 28px 18px 64px; }
  h1 { font-size: 36px; }
  .lead { font-size: 16px; }
  .hero { padding: 28px 22px; }
  .hero h1 { font-size: 38px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero-meta { display: grid; gap: 9px; }
  .section { margin-top: 48px; }
  .section-head { align-items: start; flex-direction: column; }
  .quick-start { grid-template-columns: 1fr; padding: 22px; }
  .card-grid, .card-grid.two, .outcome-grid { grid-template-columns: 1fr; }
  .course-card, .resource-card, .project-card { padding: 20px; }
  .course-aside { max-width: none; }
  .lesson-row { grid-template-columns: 34px minmax(0, 1fr); }
  .lesson-row-meta { grid-column: 2; flex-wrap: wrap; white-space: normal; }
  .lesson-info { gap: 10px 15px; }
  .lesson-article .lesson-lead { font-size: 16px; }
  .video-slot { min-height: 190px; padding: 22px; }
  .video-slot strong { font-size: 19px; }
  .lesson-actions { grid-template-columns: 1fr; align-items: stretch; }
  .lesson-actions > * { justify-self: stretch !important; }
  .lesson-actions .button { width: 100%; }
  .catalog-toolbar { grid-template-columns: 1fr; }
  .catalog-search { grid-column: auto; }
  .search-page-form { flex-direction: column; }
  .search-page-form .button { width: 100%; }
  .prompt-head { align-items: flex-start; }
  .prompt-copy { flex: 0 0 auto; }
  .download-grid { grid-template-columns: 1fr; }
  .project-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-course-link { align-items: stretch; flex-direction: column; }
  .project-course-link .button { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; padding-top: 64px; }
  .footer-bottom { flex-direction: column; }
  .toast { right: 18px; bottom: 18px; left: 18px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
