/* ---------- Foundations ---------- */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink: #0b1930;
  --ink-soft: #39465a;
  --navy: #063b7b;
  --navy-2: #0d67b2;
  --paper: #f4f1e8;
  --paper-2: #ebe7dc;
  --surface: #fbfaf6;
  --gold: #9DD437;
  --gold-bright: #b7e84c;
  --gold-pale: #e7f6c5;
  --coral: #df6d59;
  --sage: #6d947b;
  --blue: #0d67b2;
  --line: rgba(11, 25, 48, .16);
  --line-strong: rgba(11, 25, 48, .3);
  --shadow: 0 24px 70px rgba(10, 25, 47, .12);
  --code-bg: #0b1629;
  --code-text: #dce6f2;
  --code-comment: #7d8ca3;
  --code-keyword: #9DD437;
  --code-string: #86d8ec;
  --code-function: #8fc6ea;
  --code-number: #e68b78;
  --radius: 4px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

:root.dark {
  --ink: #edf2f6;
  --ink-soft: #abb8c8;
  --navy: #07111f;
  --navy-2: #0e213b;
  --paper: #101927;
  --paper-2: #172231;
  --surface: #131f2e;
  --gold-pale: #4a3b24;
  --line: rgba(224, 232, 240, .14);
  --line-strong: rgba(224, 232, 240, .28);
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  --code-bg: #07111f;
  color-scheme: dark;
}

html { scroll-behavior: smooth; scroll-padding-top: 248px; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--gold); color: #09162a; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--gold);
  color: #09162a;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-shell {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.reading-progress {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width .1s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
}
.header-inner {
  display: flex;
  align-items: center;
  width: min(1400px, calc(100% - 48px));
  height: 232px;
  min-height: 232px;
  margin-inline: auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  flex: 0 0 auto;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: visible;
  border: 0;
  background: transparent;
}
.site-header .brand-mark { width: 236px; height: 308px; }
.brand-mark img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.brand-logo-dark { display: none; }
:root.dark .brand-logo-light { display: none; }
:root.dark .brand-logo-dark { display: block; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 30px; letter-spacing: -.015em; white-space: nowrap; }
.brand-copy small {
  margin-top: 7px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  white-space: nowrap;
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
  margin: 0 auto;
}
.desktop-nav a {
  position: relative;
  padding: 27px 0 25px;
  color: var(--ink-soft);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: .11em;
  text-decoration: none;
  text-transform: uppercase;
}
.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  transform: scaleX(0);
  background: var(--gold);
  transition: transform .2s ease;
}
.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after { transform: scaleX(1); }

.header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.language-picker {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.language-picker svg {
  width: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.language-picker select {
  max-width: 112px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 17px;
  font-weight: 750;
  cursor: pointer;
}
.language-picker:focus-within { border-color: var(--gold); }
.search-trigger,
.icon-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 192px;
  height: 40px;
  padding: 0 9px 0 12px;
}
.search-trigger svg,
.search-input-wrap svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}
.search-trigger span { color: var(--ink-soft); font-size: 18px; }
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1;
}
.search-trigger kbd { margin-left: auto; }
.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
}
.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.icon-button:hover,
.search-trigger:hover { border-color: var(--line-strong); background: var(--surface); }
.menu-toggle { display: none; }
.moon-icon { display: none; }
:root.dark .sun-icon { display: none; }
:root.dark .moon-icon { display: block; }

.mobile-menu {
  display: none;
  padding: 20px 24px 32px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.mobile-menu.open { display: grid; }
.mobile-menu a {
  display: flex;
  justify-content: space-between;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 22px;
  text-decoration: none;
}
.mobile-menu a span { color: var(--gold); font-family: var(--sans); font-size: 17px; }

/* ---------- Common type ---------- */
.kicker,
.eyebrow {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 11px; }
.eyebrow span { width: 28px; height: 2px; background: var(--gold); }
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .62fr);
  align-items: end;
  gap: 80px;
  margin-bottom: 58px;
}
.section-heading h2,
.chapter-intro h2,
.sources-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .98;
}
.section-heading h2 em,
.chapter-intro h2 em {
  color: var(--gold);
  font-weight: 400;
}
.section-heading > p {
  max-width: 490px;
  margin: 0 0 3px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.75;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(480px, .78fr);
  align-items: start;
  gap: clamp(52px, 8vw, 116px);
  min-height: calc(100vh - 232px);
  min-height: calc(100svh - 232px);
  padding-block: calc(clamp(26px, 3vw, 46px) + 100px) clamp(72px, 8vw, 118px);
}
.hero-copy { position: relative; z-index: 2; }
.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(65px, 8vw, 114px);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .82;
}
.hero h1 em { position: relative; color: var(--gold); font-weight: 400; }
.hero h1 em::after {
  position: absolute;
  right: 0;
  bottom: -.09em;
  left: .05em;
  height: 7px;
  content: "";
  transform: rotate(-1deg);
  border-radius: 50%;
  background: var(--gold);
  opacity: .5;
}
.hero-lede {
  max-width: 660px;
  margin: 34px 0 0;
  color: var(--ink-soft);
  font-size: clamp(19px, 1.8vw, 22px);
  line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 51px;
  padding: 0 21px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { border-color: var(--navy); background: var(--navy); color: #fff; }
.button-primary span { color: var(--gold); font-size: 18px; }
.button-secondary { background: transparent; color: var(--ink); }
.button-secondary:hover { background: var(--surface); }
:root.dark .button-primary { border-color: var(--gold); background: var(--gold); color: #09162a; }
.hero-meta { display: flex; align-items: center; gap: 16px; margin-top: 45px; }
.hero-meta p { margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.5; }
.hero-meta p strong { color: var(--ink); text-transform: uppercase; letter-spacing: .07em; }
.avatar-stack { display: flex; }
.avatar-stack span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin-left: -7px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}
.avatar-stack span:first-child { margin-left: 0; background: var(--gold); color: #101b2b; }
.avatar-stack span:last-child { background: var(--sage); }

.hero-visual {
  position: relative;
  min-height: 580px;
}
.visual-grid {
  position: absolute;
  inset: -12% -18% -10% -24%;
  opacity: .38;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 43px 43px;
  mask-image: radial-gradient(circle at 55% 50%, #000, transparent 71%);
}
.hero-code-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: min(100%, 530px);
  overflow: hidden;
  transform: translate(-50%, -50%) rotate(1.4deg);
  border: 1px solid rgba(255, 255, 255, .09);
  background: var(--code-bg);
  color: var(--code-text);
  box-shadow: 0 40px 90px rgba(3, 13, 28, .28);
}
.window-bar,
.code-head {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  color: #9aa9bd;
  font-size: 17px;
  letter-spacing: .04em;
}
.window-dots { display: flex; gap: 6px; margin-right: 16px; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #e16f5b; }
.window-dots i:nth-child(2) { background: #e3ae48; }
.window-dots i:nth-child(3) { background: #6fa479; }
.file-status { margin-left: auto; color: #89b99a; font-size: 16px; text-transform: uppercase; }
.hero-code-card pre { min-height: 306px; margin: 0; padding: 32px 30px; }
.hero-code-card pre code { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.85; }
.code-result {
  display: flex;
  justify-content: space-between;
  padding: 14px 17px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  color: #8190a5;
  font-size: 16px;
}
.code-result span { display: flex; align-items: center; gap: 8px; color: #9bc8a8; text-transform: uppercase; letter-spacing: .07em; }
.code-result i { width: 6px; height: 6px; border-radius: 50%; background: #73b287; box-shadow: 0 0 0 4px rgba(115, 178, 135, .12); }
.floating-note {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.floating-note > span:last-child { display: grid; color: var(--ink-soft); font-size: 16px; line-height: 1.45; }
.floating-note strong { color: var(--ink); font-size: 17px; text-transform: uppercase; letter-spacing: .06em; }
.note-readability { top: 9%; left: -8%; transform: rotate(-2deg); }
.note-signal { right: -5%; bottom: 10%; transform: rotate(2deg); }
.note-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
}
.signal-bars { display: flex; align-items: flex-end; gap: 3px; width: 38px; height: 32px; padding: 5px 7px; background: var(--paper-2); }
.signal-bars i { width: 5px; background: var(--sage); }
.signal-bars i:nth-child(1) { height: 9px; }
.signal-bars i:nth-child(2) { height: 15px; }
.signal-bars i:nth-child(3) { height: 22px; }

/* ---------- Style inspector ---------- */
.inspector-section {
  padding: 124px 0 105px;
  scroll-margin-top: 12px;
  background: var(--navy);
  color: #e8eef4;
}
.inspector-heading {
  display: grid;
  grid-template-columns: 1fr .7fr;
  align-items: end;
  gap: 80px;
  margin-bottom: 52px;
}
.inspector-heading .kicker { color: #8190a4; }
.inspector-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .95;
}
.inspector-heading h2 em { color: var(--gold); font-weight: 400; }
.inspector-heading-copy > p {
  margin: 0 0 22px;
  color: #a1afbf;
  font-size: 17px;
  line-height: 1.75;
}
.privacy-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8796aa;
  font-size: 16px;
}
.privacy-pill > span { color: var(--sage); font-size: 17px; }
.privacy-pill strong { color: #dfe6ee; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; }
.inspector-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.17fr) minmax(360px, .83fr);
  align-items: stretch;
  min-height: 665px;
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: 0 35px 90px rgba(0, 0, 0, .28);
}
.editor-panel,
.results-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
}
.editor-panel { scroll-margin-top: 12px; background: #091528; }
.results-panel {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  border-left: 1px solid rgba(255, 255, 255, .13);
  background: var(--surface);
  color: var(--ink);
}
.inspector-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 51px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: #8e9db0;
  font-size: 16px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.results-panel .inspector-panel-head { border-color: var(--line); color: var(--ink-soft); }
.inspector-panel-head > div { display: flex; align-items: center; gap: 10px; }
.inspector-panel-head strong { color: #dfe7ef; font-size: 16px; }
.results-panel .inspector-panel-head strong { color: var(--ink); }
.panel-dot { width: 7px; height: 7px; border-radius: 50%; background: #6b7a8e; }
.panel-dot.gold { background: var(--gold); }
.panel-dot.green { background: var(--sage); }
.code-input-shell {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 525px;
  overflow: hidden;
}
.editor-lines {
  height: 100%;
  padding: 24px 14px 30px 0;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, .08);
  color: #536176;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 20px;
  line-height: 1.85;
  text-align: right;
  user-select: none;
  white-space: pre;
}
.editor-line-number {
  display: block;
  min-height: 1.85em;
  transition: background .2s ease, color .2s ease;
}
.editor-line-number.has-issue.error { background: rgba(223, 109, 89, .14); color: #f09382; }
.editor-line-number.has-issue.warning { background: rgba(232, 168, 45, .12); color: var(--gold-bright); }
.editor-line-number.has-issue.advice { background: rgba(66, 110, 147, .18); color: #8fc6ea; }
.editor-code-wrap {
  position: relative;
  min-width: 0;
  min-height: 525px;
  overflow: hidden;
  background: #091528;
}
.editor-highlight,
#style-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 525px;
  padding: 24px 24px 30px 36px;
  overflow: auto;
  border: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 20px;
  line-height: 1.85;
  tab-size: 4;
  white-space: pre;
}
.editor-highlight {
  z-index: 0;
  margin: 0;
  pointer-events: none;
  scrollbar-width: none;
}
.editor-highlight::-webkit-scrollbar { display: none; }
.editor-highlight > code {
  display: block;
  width: max-content;
  min-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #dce6f2;
  font: inherit;
  line-height: inherit;
  white-space: inherit;
}
.editor-source-line {
  position: relative;
  display: block;
  min-width: 100%;
  min-height: 1.85em;
  padding: 0 132px 0 18px;
  transition: background .2s ease, box-shadow .2s ease;
}
.editor-source-line.has-issue.error { background: rgba(223, 109, 89, .14); box-shadow: inset 4px 0 var(--coral); color: #dce6f2; }
.editor-source-line.has-issue.warning { background: rgba(232, 168, 45, .11); box-shadow: inset 4px 0 var(--gold-bright); color: #dce6f2; }
.editor-source-line.has-issue.advice { background: rgba(66, 110, 147, .16); box-shadow: inset 4px 0 #8fc6ea; color: #dce6f2; }
.editor-source-line.has-issue::after {
  position: absolute;
  top: 50%;
  right: 10px;
  padding: 2px 7px;
  transform: translateY(-50%);
  border: 1px solid currentColor;
  background: #091528;
  content: attr(data-rules);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: .04em;
  line-height: 1.2;
}
.editor-source-line.has-issue.error::after { color: var(--coral); }
.editor-source-line.has-issue.warning::after { color: var(--gold-bright); }
.editor-source-line.has-issue.advice::after { color: #8fc6ea; }
#style-input {
  z-index: 1;
  padding-left: 54px;
  resize: none;
  outline: 0;
  background: transparent;
  color: #dce6f2;
  caret-color: var(--gold);
}
.editor-code-wrap.syntax-ready #style-input {
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.editor-code-wrap.syntax-ready #style-input::selection {
  background: rgba(242, 184, 75, .28);
  color: transparent;
  -webkit-text-fill-color: transparent;
}
#style-input:focus { box-shadow: inset 3px 0 0 var(--gold); }
.editor-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  min-height: 70px;
  padding: 10px 12px 10px 18px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.editor-actions > div { display: flex; gap: 15px; }
.text-action {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  background: transparent;
  color: #8e9db0;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.text-action:hover { border-color: var(--gold); color: var(--gold); }
.editor-actions > span { color: #68778b; font-size: 16px; }
.editor-actions kbd { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: #9ba9b9; }
.inspect-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #101b2b;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}
.inspect-button:hover { transform: translateY(-2px); filter: brightness(1.05); }
.inspect-button svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.score-summary {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 13px;
  padding: 25px 23px;
  border-bottom: 1px solid var(--line);
}
.score-ring {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 126px;
  height: 126px;
  margin-inline: auto;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--score) * 1%), var(--paper-2) 0);
  text-align: center;
}
.score-ring::before {
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}
.score-ring strong,
.score-ring span {
  position: relative;
  z-index: 1;
  display: block;
}
.score-ring strong {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  line-height: .95;
}
.score-ring span {
  max-width: 76px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .09em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}
.severity-summary { display: grid; gap: 1px; background: var(--line); }
.severity-summary-item {
  display: grid;
  grid-template-columns: 12px 30px 1fr;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.severity-summary-item:hover,
.severity-summary-item:focus-visible,
.severity-summary-item.active { background: var(--paper); }
.severity-summary strong { font-family: var(--serif); font-size: 19px; font-weight: 400; }
.severity-summary span { color: var(--ink-soft); font-size: 16px; letter-spacing: .08em; text-transform: uppercase; }
.severity-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.severity-dot.error { background: var(--coral); }
.severity-dot.warning { background: var(--gold); }
.severity-dot.advice { background: var(--blue); }
.result-toolbar { padding: 17px 20px 13px; border-bottom: 1px solid var(--line); }
.result-toolbar > p { margin: 0 0 12px; color: var(--ink-soft); font-family: var(--serif); font-size: 17px; font-style: italic; }
.result-filters { display: flex; gap: 5px; }
.result-filters button {
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.result-filters button:hover,
.result-filters button.active { border-color: var(--gold); background: var(--gold-pale); color: var(--ink); }
.diagnostics-list { max-height: 520px; overflow: auto; }
.diagnostic-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 11px;
  width: 100%;
  padding: 15px 17px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.diagnostic-item:hover { background: var(--paper); }
.diagnostic-severity {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  font-size: 16px;
  font-weight: 900;
}
.diagnostic-item.error .diagnostic-severity { border-color: var(--coral); color: var(--coral); }
.diagnostic-item.warning .diagnostic-severity { border-color: var(--gold); color: color-mix(in srgb, var(--gold) 80%, var(--ink)); }
.diagnostic-item > div { min-width: 0; }
.diagnostic-item p { display: flex; gap: 8px; margin: 0 0 4px; color: var(--ink-soft); font-size: 16px; letter-spacing: .07em; text-transform: uppercase; }
.diagnostic-item p i { color: var(--gold); font-style: normal; font-weight: 900; }
.diagnostic-item h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 20px; font-weight: 400; line-height: 1.3; }
.diagnostic-fix {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  background: var(--paper);
}
.diagnostic-fix b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.diagnostic-fix small { display: block; color: var(--ink-soft); font-size: 17px; line-height: 1.55; }
.diagnostic-example {
  margin: 12px 0 0;
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #091528;
  text-align: left;
}
.diagnostic-example code {
  display: block;
  color: #dce6f2;
  font-size: 17px;
  line-height: 1.65;
  tab-size: 4;
  white-space: pre;
}
.apply-fix-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 12px;
  padding: 0 15px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #09162a;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.apply-fix-button:hover { background: var(--gold-bright); }
.apply-fix-button:disabled {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  cursor: not-allowed;
  opacity: .72;
}
.diagnostic-arrow {
  align-self: center;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 20px;
  cursor: pointer;
}
.results-empty { display: grid; justify-items: center; padding: 42px 25px; color: var(--ink-soft); text-align: center; }
.results-empty > span { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 50%; color: var(--sage); font-family: var(--serif); }
.results-empty strong { color: var(--ink); font-family: var(--serif); font-size: 18px; font-weight: 400; }
.results-empty p { max-width: 280px; margin: 7px 0 0; font-size: 16px; line-height: 1.6; }
.editor-source-line.pulse,
.editor-line-number.pulse { animation: line-pulse 1s ease; }
@keyframes line-pulse {
  50% {
    background: rgba(242, 184, 75, .35);
    color: #fff;
  }
}
.inspector-rules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 22px;
  border-block: 1px solid rgba(255, 255, 255, .1);
}
.inspector-rules p {
  margin: 0;
  padding: 17px 20px;
  border-left: 1px solid rgba(255, 255, 255, .1);
  color: #79889c;
  font-size: 16px;
  line-height: 1.55;
}
.inspector-rules p:first-child { border-left: 0; }
.inspector-rules span { display: block; margin-bottom: 3px; color: var(--gold); font-size: 16px; font-weight: 900; letter-spacing: .12em; }

/* ---------- Trust strip ---------- */
.trust-strip { border-block: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-grid p {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 13px;
  margin: 0;
  padding: 27px clamp(17px, 2.5vw, 34px);
  border-left: 1px solid var(--line);
  line-height: 1.25;
}
.trust-grid p:last-child { border-right: 1px solid var(--line); }
.trust-grid p > span { grid-row: 1 / 3; padding-top: 2px; color: var(--gold); font-size: 16px; font-weight: 850; }
.trust-grid strong { font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }
.trust-grid small { margin-top: 4px; color: var(--ink-soft); font-family: var(--serif); font-size: 17px; font-style: italic; }

/* ---------- Principles ---------- */
.principles { padding-block: 128px; }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.principle-card {
  position: relative;
  min-height: 390px;
  padding: 42px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 46%, transparent);
  transition: background .25s ease, transform .25s ease;
}
.principle-card:hover { z-index: 1; transform: translateY(-4px); background: var(--surface); box-shadow: var(--shadow); }
.card-number {
  position: absolute;
  top: 22px;
  right: 24px;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 800;
}
.principle-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 74px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.icon-eye::before {
  width: 31px;
  height: 17px;
  border: 2px solid var(--ink);
  border-radius: 50% / 65%;
  content: "";
}
.icon-eye span { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.icon-box::before,
.icon-box::after {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--ink);
  content: "";
}
.icon-box::after { transform: translate(5px, -5px); border-color: var(--gold); }
.icon-loop::before { width: 27px; height: 27px; border: 2px dashed var(--ink); border-radius: 50%; content: ""; }
.icon-loop::after { position: absolute; top: 17px; right: 13px; width: 8px; height: 8px; border-top: 2px solid var(--gold); border-right: 2px solid var(--gold); content: ""; transform: rotate(35deg); }
.principle-card h3 { margin: 0 0 15px; font-family: var(--serif); font-size: 27px; font-weight: 400; }
.principle-card p { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.principle-card a {
  position: absolute;
  right: 42px;
  bottom: 32px;
  left: 42px;
  display: flex;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .09em;
  text-decoration: none;
  text-transform: uppercase;
}
.principle-card a span { color: var(--gold); font-size: 18px; }
.zen-quote {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: end;
  gap: 36px;
  margin: 80px 0 0;
  padding: 60px 66px;
  overflow: hidden;
  background: var(--navy);
  color: #e9eef4;
}
.zen-quote::after {
  position: absolute;
  top: -160px;
  right: -120px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 50px rgba(255, 255, 255, .025), 0 0 0 100px rgba(255, 255, 255, .018);
}
.quote-mark { align-self: start; color: var(--gold); font-family: var(--serif); font-size: 82px; line-height: .7; }
.zen-quote p { position: relative; z-index: 1; margin: 0; font-family: var(--serif); font-size: clamp(26px, 3vw, 40px); line-height: 1.35; }
.zen-quote p strong { color: var(--gold-bright); font-weight: 400; }
.zen-quote cite { position: relative; z-index: 1; margin-bottom: 8px; color: #8998ac; font-size: 16px; font-style: normal; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Guide ---------- */
.guide-section { padding: 130px 0; border-top: 1px solid var(--line); background: var(--surface); }
.guide-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(60px, 8vw, 120px); }
.guide-toc { position: relative; }
.toc-inner { position: sticky; top: 116px; }
.toc-inner > p:first-child {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.toc-inner nav { display: grid; }
.toc-inner nav a {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  color: var(--ink-soft);
  font-size: 17px;
  text-decoration: none;
  transition: color .15s ease, transform .15s ease;
}
.toc-inner nav a span { width: 19px; color: var(--line-strong); font-size: 16px; font-weight: 800; }
.toc-inner nav a:hover,
.toc-inner nav a.active { transform: translateX(3px); color: var(--ink); }
.toc-inner nav a.active span { color: var(--gold); }
.toc-rule { width: 44px; height: 2px; margin: 24px 0; background: var(--gold); }
.toc-tip { max-width: 180px; margin: 0; color: var(--ink-soft); font-family: var(--serif); font-size: 17px; font-style: italic; line-height: 1.65; }
.toc-tip strong { display: block; color: var(--ink); font-family: var(--sans); font-size: 16px; font-style: normal; letter-spacing: .1em; text-transform: uppercase; }
.guide-content { min-width: 0; }
.chapter-intro { max-width: 850px; margin-bottom: 125px; }
.chapter-intro > p:last-child { max-width: 680px; margin: 28px 0 0; color: var(--ink-soft); font-size: 19px; line-height: 1.8; }
.guide-chapter { padding: 0 0 125px; scroll-margin-top: 12px; }
.guide-chapter + .guide-chapter { padding-top: 112px; border-top: 1px solid var(--line); }
.guide-chapter:last-child { padding-bottom: 0; }
.chapter-header {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 44px;
  align-items: start;
  margin-bottom: 34px;
}
.chapter-header > div { display: flex; align-items: center; gap: 13px; padding-top: 9px; }
.chapter-header > div span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--gold);
  color: #101b2b;
  font-size: 16px;
  font-weight: 900;
}
.chapter-header > div p { margin: 0; font-size: 16px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.chapter-header h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4.6vw, 62px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: .98;
}
.chapter-lede { max-width: 720px; margin: 0 0 48px 224px; color: var(--ink-soft); font-size: 19px; line-height: 1.8; }
.rule-row {
  display: grid;
  grid-template-columns: 64px minmax(220px, .82fr) minmax(250px, .7fr);
  gap: 26px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.rule-row:last-of-type { border-bottom: 1px solid var(--line); }
.rule-row.simple { grid-template-columns: 64px 1fr; }
.rule-number { padding-top: 3px; color: var(--gold); font-size: 16px; font-weight: 900; letter-spacing: .06em; }
.rule-row h4 { margin: 0 0 8px; font-family: var(--serif); font-size: 22px; font-weight: 400; }
.rule-row p { margin: 0; color: var(--ink-soft); font-size: 18px; line-height: 1.7; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
:not(pre) > code {
  padding: .1em .34em;
  border: 1px solid var(--line);
  background: var(--paper);
  color: color-mix(in srgb, var(--ink) 84%, var(--blue));
  font-size: 1em;
}
.mini-example { padding: 18px; border-left: 2px solid var(--gold); background: var(--paper); }
.mini-example code { color: var(--ink); font-size: 17px; line-height: 1.8; }
.mini-example code .muted-code { color: var(--ink-soft); }
.metric-block {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-left: 2px solid var(--gold);
  background: var(--paper);
}
.metric-block strong { grid-row: span 1; font-family: var(--serif); font-size: 27px; font-weight: 400; }
.metric-block span { color: var(--ink-soft); font-size: 16px; letter-spacing: .07em; text-transform: uppercase; }
.metric-block i { grid-column: 1 / -1; height: 1px; margin: 7px 0; background: var(--line); }
.naming-list { display: grid; gap: 5px; }
.naming-list span { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-left: 2px solid var(--gold); background: var(--paper); }
.naming-list code { border: 0; background: transparent; }
.naming-list i { color: var(--ink-soft); font-family: var(--serif); font-size: 17px; }

.do-dont-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 48px; }
.comparison-card { min-width: 0; }
.comparison-label { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 16px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.comparison-label span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--coral) 18%, transparent); color: var(--coral); font-size: 17px; }
.do .comparison-label span { background: color-mix(in srgb, var(--sage) 20%, transparent); color: var(--sage); }
.code-shell { min-width: 0; overflow: hidden; border: 1px solid rgba(11, 25, 48, .18); background: var(--code-bg); color: var(--code-text); }
.code-head { justify-content: space-between; min-height: 43px; padding-left: 18px; }
.code-head span::before { color: var(--gold); content: "●"; margin-right: 9px; font-size: 16px; }
.copy-button {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: transparent;
  color: #9eacc0;
  font-size: 16px;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
}
.copy-button:hover { border-color: var(--gold); color: var(--gold); }
pre { margin: 0; overflow: auto; }
pre code { display: block; color: var(--code-text); font-size: 17px; line-height: 1.8; tab-size: 4; white-space: pre; }
.code-shell pre { padding: 25px 27px; }
.compact pre { min-height: 215px; padding: 22px; }
.compact pre code { font-size: 17px; }
.token.comment { color: var(--code-comment); font-style: italic; }
.token.keyword { color: var(--code-keyword); }
.token.string { color: var(--code-string); }
.token.function { color: var(--code-function); }
.token.number { color: var(--code-number); }
.token.decorator, .token.type { color: #c6a7e1; }
.token.operator { color: #cad4e0; }

.pattern-grid { display: grid; grid-template-columns: repeat(2, 1fr); margin-bottom: 42px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.pattern-card { position: relative; min-height: 190px; padding: 28px 26px 24px 65px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pattern-icon { position: absolute; top: 28px; left: 25px; color: var(--gold); font-family: var(--serif); font-size: 24px; }
.pattern-card h4 { margin: 0 0 10px; font-family: var(--serif); font-size: 21px; font-weight: 400; }
.pattern-card p { margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.7; }
.annotation-row { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-top: 0; }
.annotation-row span { display: flex; gap: 9px; padding: 14px; border-left: 1px solid var(--line); color: var(--ink-soft); font-size: 16px; line-height: 1.4; }
.annotation-row span:first-child { border-left: 0; }
.annotation-row i { color: var(--gold); font-style: normal; font-weight: 900; }

.type-principles { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 42px; border-block: 1px solid var(--line); }
.type-principles > div { padding: 25px 24px; border-left: 1px solid var(--line); }
.type-principles > div:first-child { border-left: 0; }
.type-principles strong { color: var(--gold); font-family: var(--serif); font-size: 20px; font-weight: 400; }
.type-principles p { margin: 9px 0 0; color: var(--ink-soft); font-size: 17px; line-height: 1.7; }
.callout { display: flex; gap: 14px; margin-top: 22px; padding: 18px 20px; border-left: 2px solid var(--blue); background: color-mix(in srgb, var(--blue) 8%, transparent); }
.callout-mark { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; border: 1px solid var(--blue); border-radius: 50%; color: var(--blue); font-family: var(--serif); font-style: italic; font-weight: 700; }
.callout p { margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.7; }
.callout p strong { color: var(--ink); }
.callout.warning { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, transparent); }
.callout.warning .callout-mark { border-color: var(--gold); color: var(--gold); }

.design-split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; margin-bottom: 60px; }
.design-split h4 { margin: 0 0 18px; padding-bottom: 14px; border-bottom: 2px solid var(--gold); font-family: var(--serif); font-size: 25px; font-weight: 400; }
.check-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 22px; color: var(--ink-soft); font-size: 18px; line-height: 1.65; }
.check-list li::before { position: absolute; top: 9px; left: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); content: ""; }
.architecture-figure { padding: 30px; background: var(--paper); }
.figure-label { color: var(--ink-soft); font-size: 16px; font-weight: 900; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.architecture-canvas { position: relative; height: 390px; max-width: 680px; margin: 0 auto; }
.orbit { position: absolute; top: 50%; left: 50%; border: 1px dashed var(--line-strong); border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-outer { width: 510px; height: 280px; }
.orbit-inner { width: 275px; height: 190px; }
.arch-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 12px color-mix(in srgb, var(--gold) 25%, transparent);
}
.arch-core strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.arch-core span { margin-top: -22px; color: #99a6b9; font-size: 16px; text-transform: uppercase; }
.arch-node { position: absolute; display: grid; place-items: center; min-width: 86px; padding: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-size: 16px; text-transform: uppercase; box-shadow: 0 8px 24px rgba(11, 25, 48, .08); }
.arch-node span { color: var(--gold); font-size: 16px; font-weight: 900; }
.node-web { top: 13%; left: 15%; }
.node-db { right: 12%; bottom: 15%; }
.node-cli { bottom: 9%; left: 20%; }
.node-service { top: 15%; right: 18%; }
.architecture-figure > p { max-width: 560px; margin: -5px auto 0; color: var(--ink-soft); font-family: var(--serif); font-size: 18px; font-style: italic; text-align: center; }

.structure-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; }
.tree-card { overflow: hidden; background: var(--navy); color: #dbe5f1; }
.tree-head { display: flex; align-items: center; gap: 6px; min-height: 43px; padding: 0 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.tree-head > span { width: 7px; height: 7px; border-radius: 50%; background: #e16f5b; }
.tree-head > span:nth-child(2) { background: #e3ae48; }
.tree-head > span:nth-child(3) { background: #6fa479; }
.tree-head p { margin: 0 0 0 8px; color: #8796aa; font-size: 16px; }
.tree-card pre { padding: 25px 28px 29px; }
.tree-card code { color: #dbe5f1; font-size: 17px; line-height: 1.85; }
.structure-notes { display: grid; gap: 1px; background: var(--line); }
.structure-notes > div { position: relative; padding: 20px 20px 18px 48px; background: var(--surface); }
.structure-notes span { position: absolute; top: 22px; left: 18px; color: var(--gold); font-size: 16px; font-weight: 900; }
.structure-notes h4 { margin: 0 0 6px; font-family: var(--serif); font-size: 20px; font-weight: 400; }
.structure-notes p { margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.6; }
.import-order { margin-top: 27px; padding: 20px 24px; border: 1px solid var(--line); }
.import-order > p { margin: 0 0 13px; font-size: 16px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.import-order > div { display: flex; align-items: center; gap: 14px; }
.import-order > div span { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.import-order i { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--gold-pale); color: var(--ink); font-size: 16px; font-style: normal; font-weight: 900; }
.import-order b { color: var(--gold); }
.import-order small { display: block; margin-top: 13px; color: var(--ink-soft); font-family: var(--serif); font-size: 17px; font-style: italic; }

.testing-manifesto { display: grid; grid-template-columns: repeat(2, 1fr); margin-bottom: 40px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.testing-manifesto p { margin: 0; padding: 19px 21px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 17px; }
.testing-manifesto span { display: block; margin-bottom: 4px; color: var(--ink); font-family: var(--serif); font-size: 19px; }
.fine-print { margin: 19px 0 0; color: var(--ink-soft); font-family: var(--serif); font-size: 17px; font-style: italic; text-align: center; }
.reliability-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.reliability-grid section { min-height: 330px; padding: 30px 25px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reliability-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 47px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold); font-family: var(--serif); font-size: 22px; }
.reliability-grid h4 { margin: 0 0 16px; font-family: var(--serif); font-size: 23px; font-weight: 400; }
.reliability-grid ul { display: grid; gap: 9px; margin: 0; padding: 0 0 0 16px; color: var(--ink-soft); font-size: 17px; line-height: 1.6; }
.reliability-grid li::marker { color: var(--gold); }

/* ---------- Toolchain ---------- */
.toolchain-section { padding: 128px 0; background: var(--navy); color: #e7edf3; }
.light-heading .kicker,
.toolchain-section .kicker { color: #8291a5; }
.light-heading > p { color: #a2afbe; }
.pipeline { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); margin: 65px 0 125px; }
.pipeline::before { position: absolute; top: 39px; right: 7%; left: 7%; height: 1px; background: rgba(255, 255, 255, .16); content: ""; }
.pipeline-step { position: relative; display: grid; justify-items: center; text-align: center; }
.pipeline-step > span { color: #68778c; font-size: 16px; font-weight: 900; }
.pipeline-dot { position: relative; z-index: 1; width: 14px; height: 14px; margin: 16px 0 17px; border: 4px solid var(--navy); border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
.pipeline-step.final .pipeline-dot { width: 24px; height: 24px; margin-block: 11px 12px; border-color: var(--gold); background: var(--navy); box-shadow: 0 0 0 5px rgba(232, 168, 45, .15); }
.pipeline-step strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.pipeline-step small { margin-top: 3px; color: #758499; font-size: 16px; }
.toolchain-layout { display: grid; grid-template-columns: .68fr 1.15fr; align-items: center; gap: clamp(60px, 10vw, 140px); }
.toolchain-copy h3 { margin: 0; font-family: var(--serif); font-size: clamp(42px, 5vw, 66px); font-weight: 400; letter-spacing: -.04em; line-height: .98; }
.toolchain-copy > p:not(.kicker) { margin: 26px 0; color: #9eacbc; font-size: 16px; line-height: 1.8; }
.toolchain-copy > p code { border-color: rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .06); color: #e8edf4; }
.toolchain-copy ul { display: grid; gap: 10px; margin: 0 0 32px; padding: 0; list-style: none; }
.toolchain-copy li { color: #a6b2c1; font-size: 17px; }
.toolchain-copy li span { margin-right: 9px; color: var(--gold); }
.button-gold { border-color: var(--gold); background: var(--gold); color: #111d2e; }
.config-shell { border-color: rgba(255, 255, 255, .12); box-shadow: 0 34px 80px rgba(0, 0, 0, .3); }
.config-shell pre { max-height: 650px; padding: 30px 36px; }
.config-note { margin: 35px 0 0 calc(32% + 70px); color: #78889d; font-size: 16px; line-height: 1.6; }
.config-note span { margin-right: 9px; color: var(--gold); font-size: 16px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Checklist ---------- */
.checklist-section { padding-block: 128px; }
.checklist-layout { display: grid; grid-template-columns: 1.3fr .7fr; align-items: start; gap: 24px; }
.checklist-card { border: 1px solid var(--line); background: var(--surface); }
.checklist-progress { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 24px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.checklist-progress > div:first-child { display: flex; align-items: baseline; gap: 5px; }
.checklist-progress #check-count { font-family: var(--serif); font-size: 30px; }
.checklist-progress small { color: var(--ink-soft); font-size: 16px; text-transform: uppercase; }
.progress-track { height: 3px; overflow: hidden; background: var(--paper-2); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--gold); transition: width .25s ease; }
#reset-checklist { padding: 5px 0; border: 0; border-bottom: 1px solid var(--line-strong); background: transparent; color: var(--ink-soft); font-size: 16px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.checklist-items { display: grid; grid-template-columns: 1fr 1fr; }
.checklist-items label {
  display: grid;
  grid-template-columns: 23px 1fr;
  gap: 13px;
  min-height: 104px;
  padding: 21px 23px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.checklist-items label:nth-child(2n) { border-right: 0; }
.checklist-items label:nth-last-child(-n + 2) { border-bottom: 0; }
.checklist-items input { position: absolute; opacity: 0; pointer-events: none; }
.custom-check {
  position: relative;
  display: block;
  width: 21px;
  height: 21px;
  border: 1px solid var(--line-strong);
  transition: background .15s ease, border-color .15s ease;
}
.checklist-items input:focus-visible + .custom-check { outline: 2px solid var(--gold); outline-offset: 3px; }
.checklist-items input:checked + .custom-check { border-color: var(--gold); background: var(--gold); }
.checklist-items input:checked + .custom-check::after {
  position: absolute;
  top: 4px;
  left: 6px;
  width: 6px;
  height: 10px;
  border-right: 2px solid #101b2b;
  border-bottom: 2px solid #101b2b;
  content: "";
  transform: rotate(45deg);
}
.checklist-items label > span:last-child { display: grid; align-content: start; }
.checklist-items strong { font-family: var(--serif); font-size: 17px; font-weight: 400; }
.checklist-items small { margin-top: 4px; color: var(--ink-soft); font-size: 16px; line-height: 1.5; }
.checklist-items input:checked ~ span:last-child { opacity: .56; }
.review-card { min-height: 100%; padding: 32px; background: var(--navy); color: #e8eef4; }
.review-illustration { position: relative; height: 220px; margin: -32px -32px 34px; overflow: hidden; background: var(--gold); }
.review-illustration::after { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(9, 22, 41, .42)); content: ""; }
.review-illustration img { width: 100%; height: 100%; object-fit: cover; object-position: center 39%; filter: saturate(.8) contrast(1.07); mix-blend-mode: luminosity; }
.review-card h3 { margin: 0; font-family: var(--serif); font-size: 38px; font-weight: 400; letter-spacing: -.035em; line-height: 1.03; }
.review-card > p:not(.kicker) { color: #9ba9bb; font-size: 17px; line-height: 1.75; }
.review-card blockquote { margin: 30px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255, 255, 255, .13); color: var(--gold-bright); font-family: var(--serif); font-size: 17px; font-style: italic; line-height: 1.6; }

/* ---------- Bookshelf ---------- */
.books-section {
  padding: 128px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.reading-path {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 45px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: var(--navy);
  color: #e7edf3;
}
.reading-path p {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 20px 24px;
  border-left: 1px solid rgba(255, 255, 255, .1);
  text-align: center;
}
.reading-path p:first-child { border-left: 0; }
.reading-path p > span {
  grid-column: 1 / -1;
  color: #8190a5;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.reading-path strong {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
}
.reading-path i { color: var(--gold); font-style: normal; }
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.book-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  transition: transform .25s ease, box-shadow .25s ease;
}
.book-card:hover {
  z-index: 1;
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.book-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 350px;
  padding: 74px 22px 26px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 29px 29px;
}
.book-visual::after {
  position: absolute;
  right: 14%;
  bottom: 30px;
  left: 14%;
  height: 18px;
  border-radius: 50%;
  background: rgba(9, 22, 41, .18);
  filter: blur(10px);
  content: "";
}
.book-cover {
  position: relative;
  z-index: 1;
  width: 176px;
  height: 234px;
  margin: 0;
  padding: 0;
  transform: rotate(-2deg);
  border-radius: 1px 4px 4px 1px;
  background: #fff;
  box-shadow: -9px 10px 0 rgba(8, 19, 34, .11), 0 18px 35px rgba(8, 19, 34, .22);
}
.book-card:nth-child(2n) .book-cover { transform: rotate(2deg); }
.book-cover::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 1px;
  background: rgba(255, 255, 255, .42);
  content: "";
  box-shadow: 3px 0 0 rgba(9, 22, 41, .1);
}
.book-cover::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(8, 19, 34, .18), transparent 10%, transparent 90%, rgba(8, 19, 34, .08));
  content: "";
  pointer-events: none;
}
.book-cover img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
}
.book-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: auto;
  z-index: 2;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.book-copy {
  display: flex;
  flex-direction: column;
  min-height: 370px;
  padding: 28px 28px 25px;
}
.book-meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.book-meta span {
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.book-meta span:first-child { color: var(--gold); }
.book-copy h3 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.08;
}
.book-author {
  margin: 5px 0 18px !important;
  font-size: 16px !important;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.book-copy > p { margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.7; }
.book-best {
  margin: 23px 0 24px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}
.book-best span {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.book-copy > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}
.book-copy > a span { color: var(--gold); font-size: 17px; transition: transform .2s ease; }
.book-copy > a:hover span { transform: translate(3px, -3px); }
.books-note {
  max-width: 850px;
  margin: 31px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}
.books-note > span {
  margin-right: 9px;
  color: var(--gold);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- Sources ---------- */
.sources-section { padding: 115px 0; border-top: 1px solid var(--line); background: var(--paper-2); }
.sources-header { display: grid; grid-template-columns: 1fr 1fr; align-items: end; margin-bottom: 47px; }
.sources-header .kicker { grid-column: 1 / -1; }
.sources-header > p:last-child { max-width: 430px; justify-self: end; margin: 0; color: var(--ink-soft); font-size: 18px; line-height: 1.7; }
.source-list { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.source-link { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; min-height: 104px; padding: 20px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s ease; }
.source-link:hover { background: var(--surface); }
.source-link > span { color: var(--gold); font-size: 16px; font-weight: 900; }
.source-link > div { display: grid; }
.source-link strong { font-family: var(--serif); font-size: 19px; font-weight: 400; }
.source-link small { color: var(--ink-soft); font-size: 16px; }
.source-link > i { color: var(--gold); font-size: 20px; font-style: normal; transition: transform .2s ease; }
.source-link:hover > i { transform: translate(3px, -3px); }
.source-disclaimer { max-width: 740px; margin: 30px 0 0; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }

/* ---------- Footer ---------- */
.site-footer { padding: 55px 0; background: var(--navy); color: #e7edf3; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; }
.footer-brand .brand-logo-light { display: none; }
.footer-brand .brand-logo-dark { display: block; }
.footer-brand .brand-copy small { color: #7e8da2; }
.footer-inner > p { margin: 0; color: #8d9bad; font-family: var(--serif); font-size: 16px; font-style: italic; text-align: center; }
.footer-inner > p span { font-family: var(--sans); font-size: 16px; font-style: normal; letter-spacing: .1em; text-transform: uppercase; }
.back-top { justify-self: end; font-size: 16px; font-weight: 850; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.back-top span { margin-left: 10px; color: var(--gold); font-size: 17px; }

/* ---------- Search & toast ---------- */
.search-dialog {
  width: min(670px, calc(100% - 32px));
  max-height: min(650px, calc(100vh - 48px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .3);
}
.search-dialog::backdrop { background: rgba(3, 10, 20, .66); backdrop-filter: blur(5px); }
.search-input-wrap { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 11px; padding: 18px; border-bottom: 1px solid var(--line); }
.search-input-wrap svg { width: 20px; }
.search-input-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 19px; }
.search-input-wrap input::placeholder { color: var(--ink-soft); }
.search-results { max-height: 470px; overflow: auto; padding: 8px; }
.search-result {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px 12px;
  text-decoration: none;
}
.search-result:hover,
.search-result.selected { background: var(--paper); }
.search-result > span { color: var(--gold); font-size: 16px; font-weight: 900; }
.search-result div { display: grid; }
.search-result strong { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.search-result small { overflow: hidden; color: var(--ink-soft); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.search-result > i { color: var(--gold); font-style: normal; }
.empty-results { padding: 42px 20px; color: var(--ink-soft); font-family: var(--serif); font-style: italic; text-align: center; }
.search-help { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 16px; }
.search-help span { display: flex; align-items: center; gap: 4px; }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  padding: 14px 17px;
  transform: translateY(30px);
  border: 1px solid rgba(255, 255, 255, .12);
  background: var(--navy);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .25);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast span { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--gold); color: #0a1729; font-size: 17px; font-weight: 900; }
.toast p { margin: 0; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Motion ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease var(--delay, 0s), transform .7s ease var(--delay, 0s);
}
.js .reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (min-width: 1561px) {
  .header-inner {
    width: min(1600px, calc(100% - 48px));
    gap: 32px;
  }
  .desktop-nav {
    flex: 0 0 auto;
    gap: clamp(24px, 2vw, 40px);
    margin: 0 auto;
  }
}

@media (max-width: 1560px) {
  .desktop-nav { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: grid; }
}

html:not([lang="en"]) .desktop-nav { display: none; }
html:not([lang="en"]) .header-actions { margin-left: auto; }
html:not([lang="en"]) .menu-toggle { display: grid; }

@media (max-width: 1120px) {
  .hero { grid-template-columns: .92fr .78fr; gap: 40px; }
  .hero-visual { min-height: 510px; }
  .floating-note { min-width: 190px; }
  .note-readability { left: -3%; }
  .note-signal { right: -2%; }
  .principle-card { padding: 32px; }
  .principle-card a { right: 32px; left: 32px; }
  .chapter-lede { margin-left: 0; }
  .toolchain-layout { gap: 65px; }
  .inspector-workspace { grid-template-columns: 1fr; }
  .results-panel {
    min-height: 630px;
    border-top: 1px solid rgba(255, 255, 255, .13);
    border-left: 0;
  }
  .diagnostics-list { max-height: 430px; }
}

@media (max-width: 900px) {
  .section-shell,
  .header-inner { width: min(100% - 32px, 760px); }
  .search-trigger { min-width: 40px; width: 40px; padding: 0; justify-content: center; }
  .search-trigger span,
  .search-trigger kbd { display: none; }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 142px;
  }
  .hero-copy { max-width: 720px; }
  .hero-visual { min-height: 590px; }
  .hero-code-card { width: min(80%, 550px); }
  .note-readability { left: 3%; }
  .note-signal { right: 4%; }
  .inspector-heading { grid-template-columns: 1fr; gap: 28px; }
  .inspector-heading-copy { max-width: 600px; }
  .inspector-rules { grid-template-columns: repeat(2, 1fr); }
  .inspector-rules p:nth-child(3) { border-left: 0; }
  .inspector-rules p:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, .1); }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid p:nth-child(odd) { border-left: 1px solid var(--line); }
  .trust-grid p { border-bottom: 1px solid var(--line); }
  .trust-grid p:last-child { border-right: 1px solid var(--line); }
  .section-heading { grid-template-columns: 1fr; gap: 27px; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-card { min-height: 310px; }
  .principle-icon { margin-bottom: 42px; }
  .zen-quote { grid-template-columns: 60px 1fr; padding: 50px 40px; }
  .zen-quote cite { grid-column: 2; }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-toc { display: none; }
  .chapter-header { grid-template-columns: 150px 1fr; }
  .toolchain-layout { grid-template-columns: 1fr; }
  .toolchain-copy { max-width: 560px; }
  .config-note { margin-left: 0; }
  .checklist-layout { grid-template-columns: 1fr; }
  .review-card { min-height: auto; }
  .review-illustration { height: 300px; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .reading-path { grid-template-columns: 1fr; }
  .reading-path p {
    border-top: 1px solid rgba(255, 255, 255, .1);
    border-left: 0;
  }
  .reading-path p:first-child { border-top: 0; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 196px; }
  .section-shell,
  .header-inner { width: min(100% - 28px, 600px); }
  .header-inner { height: 180px; min-height: 180px; }
  .brand { gap: 11px; }
  .site-header .brand-mark { width: 184px; height: 244px; }
  .brand-copy strong { font-size: 22px; }
  .brand-copy small { font-size: 18px; }
  .language-picker { width: 102px; padding-inline: 7px; }
  .language-picker select { width: 70px; }
  .hero {
    padding-block: 138px 82px;
    gap: 30px;
  }
  .hero h1 { font-size: clamp(58px, 18vw, 86px); line-height: .87; }
  .hero-lede { font-size: 18px; }
  .hero-actions { display: grid; }
  .hero-meta { margin-top: 34px; }
  .hero-visual { min-height: 470px; margin-inline: -10px; }
  .hero-code-card { width: 92%; }
  .hero-code-card pre { min-height: 280px; padding: 25px 19px; }
  .hero-code-card pre code { font-size: 17px; }
  .floating-note { min-width: 176px; padding: 10px; }
  .note-readability { top: 1%; left: 0; }
  .note-signal { right: 0; bottom: 0; }
  .inspector-section { padding: 88px 0 76px; }
  .inspector-heading { margin-bottom: 38px; }
  .inspector-heading h2 { font-size: 49px; }
  .inspector-workspace { min-height: 0; }
  .inspector-panel-head { padding-inline: 13px; }
  .inspector-panel-head > span { font-size: 16px; }
  .code-input-shell { grid-template-columns: 52px minmax(0, 1fr); min-height: 440px; }
  .editor-lines { padding-top: 19px; padding-right: 10px; font-size: 19px; }
  .editor-code-wrap,
  .editor-highlight,
  #style-input { min-height: 440px; }
  .editor-highlight,
  #style-input { padding: 19px 15px 25px 27px; font-size: 19px; }
  #style-input { padding-left: 45px; }
  .editor-actions { grid-template-columns: 1fr auto; gap: 12px; padding: 12px; }
  .editor-actions > span { display: none; }
  .inspect-button { min-height: 48px; padding-inline: 14px; }
  .results-panel { min-height: 590px; }
  .score-summary { grid-template-columns: 126px 1fr; padding: 21px 14px; }
  .score-ring { width: 110px; height: 110px; }
  .score-ring::before { width: 86px; height: 86px; }
  .result-filters { flex-wrap: wrap; }
  .diagnostic-item { padding-inline: 13px; }
  .editor-source-line { padding-right: 105px; padding-left: 18px; }
  .editor-source-line.has-issue::after { right: 6px; padding-inline: 5px; font-size: 16px; }
  .inspector-rules { grid-template-columns: 1fr; }
  .inspector-rules p,
  .inspector-rules p:nth-child(3) { border-top: 1px solid rgba(255, 255, 255, .1); border-left: 0; }
  .inspector-rules p:first-child { border-top: 0; }
  .trust-grid { grid-template-columns: 1fr; padding-block: 6px; }
  .trust-grid p { border-right: 1px solid var(--line); }
  .principles,
  .checklist-section,
  .books-section { padding-block: 90px; }
  .section-heading { margin-bottom: 42px; }
  .section-heading h2,
  .chapter-intro h2,
  .sources-header h2 { font-size: 46px; }
  .principle-card { min-height: 340px; }
  .zen-quote { grid-template-columns: 1fr; gap: 10px; margin-top: 55px; padding: 42px 28px; }
  .quote-mark { font-size: 64px; }
  .zen-quote cite { grid-column: 1; margin-top: 16px; }
  .guide-section { padding: 90px 0; }
  .chapter-intro { margin-bottom: 85px; }
  .guide-chapter { padding-bottom: 88px; }
  .guide-chapter + .guide-chapter { padding-top: 78px; }
  .chapter-header { grid-template-columns: 1fr; gap: 19px; }
  .chapter-header h3 { font-size: 46px; }
  .chapter-lede { font-size: 17px; }
  .rule-row,
  .rule-row.simple { grid-template-columns: 45px 1fr; }
  .rule-row > :nth-child(3) { grid-column: 2; }
  .do-dont-grid,
  .pattern-grid,
  .type-principles,
  .design-split,
  .structure-grid,
  .reliability-grid { grid-template-columns: 1fr; }
  .pattern-card { min-height: 150px; }
  .type-principles > div { border-top: 1px solid var(--line); border-left: 0; }
  .type-principles > div:first-child { border-top: 0; }
  .annotation-row { grid-template-columns: 1fr; }
  .annotation-row span { border-top: 1px solid var(--line); border-left: 0; }
  .annotation-row span:first-child { border-top: 0; }
  .architecture-figure { padding: 25px 10px; }
  .architecture-canvas { height: 360px; transform: scale(.88); margin-inline: -30px; }
  .orbit-outer { width: 410px; height: 270px; }
  .orbit-inner { width: 245px; height: 180px; }
  .import-order > div { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .import-order b { display: none; }
  .testing-manifesto { grid-template-columns: 1fr; }
  .reliability-grid section { min-height: 270px; }
  .reliability-icon { margin-bottom: 30px; }
  .toolchain-section { padding: 90px 0; }
  .pipeline { grid-template-columns: repeat(3, 1fr); row-gap: 45px; margin: 55px 0 90px; }
  .pipeline::before { display: none; }
  .pipeline-step::after { position: absolute; top: 38px; left: 50%; width: 100%; height: 1px; background: rgba(255, 255, 255, .13); content: ""; }
  .pipeline-step:nth-child(3n)::after,
  .pipeline-step:last-child::after { display: none; }
  .config-shell pre { padding: 23px 20px; }
  .config-shell pre code { font-size: 17px; }
  .checklist-progress { grid-template-columns: 1fr auto; }
  .progress-track { grid-row: 2; grid-column: 1 / -1; }
  .checklist-items { grid-template-columns: 1fr; }
  .checklist-items label,
  .checklist-items label:nth-child(2n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .checklist-items label:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .checklist-items label:last-child { border-bottom: 0; }
  .book-grid { grid-template-columns: 1fr; }
  .book-visual { min-height: 340px; }
  .book-copy { min-height: 335px; }
  .sources-section { padding: 85px 0; }
  .sources-header { grid-template-columns: 1fr; gap: 20px; }
  .sources-header > p:last-child { justify-self: start; }
  .source-list { grid-template-columns: 1fr; }
  .source-link { min-height: 90px; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; gap: 35px; }
  .back-top { justify-self: center; }
  .toast { right: 14px; bottom: 14px; left: 14px; }
}

@media (max-width: 720px) {
  .brand-copy { display: none; }
}

@media (max-width: 460px) {
  html { scroll-padding-top: 184px; }
  .header-inner { height: 168px; min-height: 168px; }
  .site-header .brand-mark { width: 168px; height: 224px; }
  .header-actions { gap: 5px; }
  .language-picker { width: 50px; padding-inline: 4px; }
  .language-picker svg { display: none; }
  .language-picker select { width: 40px; font-size: 16px; }
  .search-trigger,
  .icon-button { min-width: 38px; width: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .reading-progress, .hero-visual, .inspector-section, .trust-strip, .guide-toc, .hero-actions, .toolchain-section, .checklist-section, .site-footer, .search-dialog, .toast { display: none !important; }
  :root { --paper: #fff; --surface: #fff; --ink: #000; --ink-soft: #333; }
  body { font-size: 11pt; }
  .hero { display: block; min-height: 0; padding: 30px 0; }
  .guide-section, .principles, .sources-section { padding: 30px 0; }
  .guide-chapter { break-inside: avoid; }
}
