:root {
  --bg: #0a0c10;
  --panel: #11151c;
  --panel2: #171c24;
  --text: #f2f5f9;
  --body: #c3cad6;
  --muted: #98a2b8;
  --line: #ffffff18;
  --line2: #ffffff2b;
  --red: #e11d2e;
  --green: #57e389;
  --r: 14px;
  --display: Bahnschrift, "Avenir Next Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --body-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 16.5px/1.7 var(--body-font);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(#ffffff0e 1px, transparent 1px) 0 0 / 28px 28px;
  pointer-events: none;
}
a { color: var(--text); text-decoration-color: #e11d2e99; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--green); }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 20; background: #fff; color: #111; padding: 10px 16px; }
.skip:focus { left: 0; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: auto; }

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0a0c10e8;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-in { min-height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 15px var(--display); letter-spacing: .06em; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.site-nav { display: flex; gap: 20px; margin-left: auto; }
.site-nav a { color: var(--body); font-size: 14px; text-decoration: none; }
.site-nav a:hover { color: var(--text); }
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.cta:hover { filter: brightness(1.08); text-decoration: none; }

.crumbs { padding: 30px 0 0; font: 600 12px var(--mono); color: var(--muted); }
.crumbs a { color: var(--muted); }
.hero { padding: 40px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 42px; align-items: center; }
.eyebrow,
.section-tag { font: 700 11.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
h1,
h2,
h3 { font-family: var(--display); color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(42px, 6.2vw, 76px); line-height: 1.01; letter-spacing: .005em; margin: 18px 0 22px; }
h2 { font-size: clamp(29px, 4vw, 46px); line-height: 1.12; margin: 8px 0 18px; }
h3 { font-size: 20px; line-height: 1.25; margin: 0 0 8px; }
.lead { max-width: 62ch; font-size: 18px; color: #e4e8ef; }
.byline { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 28px; font: 500 12px var(--mono); color: var(--muted); }
.hero-figure { margin: 0; border: 1px solid var(--line2); border-radius: 22px; overflow: hidden; background: var(--panel); box-shadow: 0 24px 70px #0008; }
.hero-figure img { display: block; width: 100%; height: auto; }
.hero-figure figcaption { padding: 14px 17px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.article-grid { display: grid; grid-template-columns: minmax(0, 760px) 240px; gap: 64px; align-items: start; }
.article-grid > article { min-width: 0; }
.toc { position: sticky; top: 94px; border-left: 2px solid var(--red); padding: 4px 0 4px 20px; }
.toc b { display: block; color: var(--text); margin-bottom: 9px; }
.toc a { display: block; color: var(--muted); font-size: 13.5px; text-decoration: none; padding: 5px 0; }
.toc a:hover { color: var(--text); }
.article-section { padding: 0 0 76px; scroll-margin-top: 92px; }
.article-section p { max-width: 72ch; }

.check-grid,
.variant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.check-grid article,
.variant-grid article { padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.check-grid b { display: block; color: var(--text); font-family: var(--display); font-size: 18px; margin-bottom: 7px; }
.check-grid span { color: var(--muted); font-size: 14px; }
.check-grid.numbered { counter-reset: goals; }
.check-grid.numbered article::before { counter-increment: goals; content: "0" counter(goals); display: block; color: var(--red); font: 800 11px var(--mono); margin-bottom: 12px; }
.note { margin: 26px 0 0; padding: 18px 20px; border-left: 3px solid var(--red); background: #e11d2e10; color: var(--body); }
.note b { color: var(--text); }
.note.success { border-color: var(--green); background: #57e3890d; }

.runway { position: relative; list-style: none; padding: 0; margin: 32px 0 0; }
.runway::before { content: ""; position: absolute; left: 27px; top: 12px; bottom: 12px; width: 1px; background: linear-gradient(var(--green), var(--red)); }
.runway li { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 0 0 30px; }
.runway-time { z-index: 1; display: grid; place-items: center; align-self: start; min-width: 56px; height: 34px; padding: 0 6px; border: 1px solid var(--line2); border-radius: 999px; background: var(--bg); color: var(--green); font: 800 11px var(--mono); }
.runway p { margin: 5px 0; }

.axis-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 30px 0; }
.axis-board article { position: relative; overflow: hidden; min-height: 220px; padding: 52px 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(155deg, var(--panel2), var(--panel)); }
.axis-board article::after { content: ""; position: absolute; width: 88px; height: 88px; border: 1px solid #ffffff17; border-radius: 50%; right: -24px; bottom: -24px; }
.axis-code { position: absolute; top: 16px; left: 18px; color: var(--green); font: 800 12px var(--mono); letter-spacing: .12em; }
.axis-board p { font-size: 13.5px; color: var(--muted); }
.plain-steps { padding-left: 22px; }
.plain-steps li { padding: 6px 0 6px 8px; }
.plain-steps li::marker { color: var(--red); font-weight: 800; }

.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); margin: 28px 0; }
.table-scroll:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
table { border-collapse: collapse; width: 100%; min-width: 660px; font-size: 14px; }
th,
td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
th { font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--panel2); }
td:first-child { color: var(--text); font-weight: 650; }
tr:last-child td { border-bottom: 0; }

.lesson-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 28px 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lesson-meta div { background: var(--panel); padding: 18px; }
.lesson-meta dt { color: var(--muted); font: 700 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.lesson-meta dd { margin: 6px 0 0; color: var(--text); font-weight: 700; }
.prep-list { list-style: none; padding: 0; margin: 24px 0; }
.prep-list li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.prep-list span { color: var(--green); font-family: var(--mono); }
kbd { display: inline-block; min-width: 28px; padding: 4px 7px; border: 1px solid var(--line2); border-bottom-width: 3px; border-radius: 6px; background: var(--panel2); color: var(--text); font: 600 12px var(--mono); text-align: center; }
.teacher-line { padding: 9px 12px; border-radius: 8px; background: var(--panel); font-size: 14px; color: var(--muted); }
.source-box { padding: 28px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }

.closing { margin: 20px 0 88px; padding: 38px; border-radius: 22px; background: linear-gradient(145deg, var(--red), #9d1020); color: #fff; }
.closing h2,
.closing p { color: #fff; }
.closing .cta { background: #fff; color: #111; }
.site-foot { border-top: 1px solid var(--line); padding: 32px 0 46px; color: var(--muted); font-size: 13px; }
.foot-in { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.site-foot a { color: var(--body); }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .head-in .cta { margin-left: auto; }
  .hero-grid,
  .article-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 24px; }
  .hero-figure { max-width: 700px; }
  .toc { position: static; order: -1; display: flex; flex-wrap: wrap; gap: 6px 15px; border-left: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; }
  .toc b { width: 100%; margin: 0; }
  .toc a { padding: 0; }
  .axis-board { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .wrap { width: min(calc(100% - 28px), 1120px); }
  .brand span { display: none; }
  .head-in { gap: 10px; }
  .head-in .cta { font-size: 12.5px; padding: 10px 13px; }
  .hero { padding-bottom: 54px; }
  .hero-grid { gap: 28px; }
  h1 { font-size: clamp(38px, 12.4vw, 58px); }
  .lead { font-size: 16px; }
  .check-grid,
  .variant-grid,
  .lesson-meta,
  .axis-board { grid-template-columns: 1fr; }
  .article-section { padding-bottom: 58px; }
  .runway li { gap: 13px; }
  .closing { padding: 27px 22px; }
  .byline { display: grid; gap: 6px; }
  .hero-figure figcaption { font-size: 11.5px; }
}

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

@media print {
  .site-head,
  .toc,
  .closing,
  .skip { display: none !important; }
  :root { color-scheme: light; --bg: #fff; --panel: #fff; --panel2: #f3f4f6; --text: #111; --body: #222; --muted: #555; --line: #ddd; --line2: #bbb; --red: #a20d22; --green: #176b39; }
  body::before { display: none; }
  .wrap { width: 100%; }
  .hero { padding: 12mm 0 8mm; }
  .hero-grid,
  .article-grid { display: block; }
  .hero-figure { max-width: 120mm; margin: 8mm 0; box-shadow: none; }
  .article-section { padding-bottom: 8mm; break-inside: avoid; }
  .runway li { break-inside: avoid; }
  .site-foot { padding: 8mm 0; }
}
