:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-soft: #eef0f6;
  --surface-strong: #e2e4ed;
  --ink: #0b0c12;
  --ink-soft: #4e5060;
  --ink-faint: #737586;
  --line: #dfe1e9;
  --line-strong: #c8cad6;
  --brand: #393dff;
  --brand-hover: #262ad9;
  --brand-soft: #e9eaff;
  --green: var(--brand);
  --green-soft: var(--brand-soft);
  --orange: #ee5d35;
  --orange-soft: #ffebe5;
  --yellow: #e5ad19;
  --blue: #087ea4;
  --red: #c93f4f;
  --header-h: 72px;
  --sidebar-w: 280px;
  --toc-w: 210px;
  --content-w: 1120px;
  --shadow: 0 18px 48px rgba(18, 20, 36, 0.1);
  --sans: "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", serif;
  --mono: "IBM Plex Mono", "Cascadia Code", monospace;
}

body.dark {
  color-scheme: dark;
  --bg: #090a10;
  --surface: #13141c;
  --surface-soft: #1a1b26;
  --surface-strong: #242635;
  --ink: #f7f7fb;
  --ink-soft: #b9bbc8;
  --ink-faint: #858797;
  --line: #282a38;
  --line-strong: #3a3d50;
  --brand: #6265ff;
  --brand-hover: #7b7eff;
  --brand-soft: #20214b;
  --green: var(--brand);
  --green-soft: var(--brand-soft);
  --orange: #ff7a52;
  --orange-soft: #44251f;
  --yellow: #f2c34c;
  --blue: #55b8db;
  --red: #ff7887;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.75;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  transition: background 180ms ease, color 180ms ease;
}

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

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  height: 3px;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--brand);
  transition: width 80ms linear;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(280px, 620px) 1fr;
  align-items: center;
  min-height: var(--header-h);
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.brand:active {
  transform: scale(0.98);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark img {
  grid-area: 1 / 1;
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.brand-icon-dark {
  display: none;
}

body.dark .brand-icon-light {
  display: none;
}

body.dark .brand-icon-dark {
  display: block;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

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

.brand-copy small {
  margin-top: 3px;
  color: var(--ink-faint);
  font: 500 9px/1 var(--mono);
}

.search-shell {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
  width: min(100%, 560px);
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.search-shell:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 14%, transparent);
}

.search-shell > svg {
  color: var(--ink-faint);
}

.search-shell input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.search-shell kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink-faint);
  font: 500 10px/1.4 var(--mono);
}

.search-results {
  position: absolute;
  inset: calc(100% + 8px) 0 auto;
  z-index: 130;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-results a,
.search-empty {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.search-results a:last-child {
  border-bottom: 0;
}

.search-results a:hover {
  background: var(--surface-soft);
}

.search-results strong {
  display: block;
  font-size: 13px;
}

.search-results span,
.search-empty {
  color: var(--ink-faint);
  font-size: 11px;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.mode-option {
  min-width: 54px;
  padding: 5px 10px;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 12px;
}

.mode-option.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 20, 16, 0.12);
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.mobile-menu {
  display: none;
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  min-height: 100vh;
  padding-top: var(--header-h);
}

.sidebar {
  position: fixed;
  inset: var(--header-h) auto 0 0;
  z-index: 70;
  width: var(--sidebar-w);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
}

.sidebar-inner {
  padding: 28px 24px 64px;
}

.sidebar-intro {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
}

.sidebar-intro span,
.nav-group-links span {
  color: var(--ink-faint);
  font: 500 10px/1 var(--mono);
}

.sidebar-intro strong {
  font-size: 13px;
  font-weight: 600;
}

.sidebar-intro.active,
.sidebar-intro:hover {
  border-left-color: var(--green);
  background: var(--surface-soft);
  color: var(--ink);
}

.nav-group {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 4px 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.nav-group-title svg {
  width: 15px;
  height: 15px;
  transition: transform 160ms ease;
}

.nav-group:not(.open) .nav-group-title svg {
  transform: rotate(-90deg);
}

.nav-group:not(.open) .nav-group-links {
  display: none;
}

.nav-group-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group-links a {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 12px;
}

.nav-group-links a:hover,
.nav-group-links a.active {
  border-left-color: var(--green);
  background: var(--surface-soft);
  color: var(--ink);
}

.sidebar-scrim {
  display: none;
}

#main-content {
  grid-column: 2;
  min-width: 0;
}

.chapter {
  width: min(calc(100% - 72px), var(--content-w));
  margin: 0 auto;
  padding: 88px 0 104px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.chapter:last-child {
  border-bottom: 0;
}

#model-map.chapter {
  width: min(calc(100% - 48px), 1440px);
}

.chapter-header {
  max-width: 790px;
  margin-bottom: 44px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font: 600 11px/1.4 var(--mono);
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1,
h2 {
  font-family: var(--serif);
}

h1 {
  max-width: 850px;
  margin-bottom: 30px;
  font-size: clamp(42px, 5vw, 76px);
  line-height: 1.18;
  font-weight: 900;
}

h1 em {
  color: var(--orange);
  font-style: normal;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 3vw, 48px);
  line-height: 1.28;
  font-weight: 900;
}

h3 {
  margin: 48px 0 22px;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 800;
}

.chapter-header > p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.85;
}

/* Feature and engineering chapters share visual briefing and reference layouts. */
.advanced-chapter {
  padding-top: 76px;
  padding-bottom: 88px;
}

.split-visual-chapter {
  display: grid;
  grid-template-columns: minmax(260px, 0.56fr) minmax(0, 1.44fr);
  gap: clamp(28px, 4vw, 54px);
  align-items: center;
}

.split-visual-chapter .chapter-header {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 30px 28px 34px;
  border-top: 4px solid var(--brand);
  background: var(--surface);
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--brand) 10%, var(--line));
}

.split-visual-chapter .chapter-header::after {
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 28px;
  background: var(--orange);
  content: "";
}

.split-visual-chapter .chapter-header h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 3vw, 43px);
}

#main-content .split-visual-chapter .chapter-header > p:last-child {
  font-size: 17px;
  line-height: 1.78;
}

.split-visual-chapter .lesson-visual {
  min-width: 0;
  margin: 0;
  box-shadow: 12px 12px 0 color-mix(in srgb, var(--brand) 9%, var(--line));
}

.split-visual-chapter .lesson-visual figcaption {
  grid-template-columns: minmax(132px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  padding: 16px 18px;
}

.structured-header-chapter .chapter-header {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 52px);
  max-width: none;
  margin-bottom: 38px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-strong);
}

.structured-header-chapter .chapter-header .eyebrow {
  grid-column: 1;
  grid-row: 1 / 3;
  padding-top: 10px;
}

.structured-header-chapter .chapter-header h2,
.structured-header-chapter .chapter-header > p:last-child {
  grid-column: 2;
}

.structured-header-chapter .chapter-header h2 {
  margin-bottom: 14px;
}

#main-content .structured-header-chapter .chapter-header > p:last-child {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.78;
}

.agents-practice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.agents-practice-grid .lesson-visual {
  min-width: 0;
  margin: 0;
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--brand) 9%, var(--line));
}

.agents-practice-grid .lesson-visual figcaption {
  grid-template-columns: 1fr;
  gap: 8px;
  min-height: 118px;
}

.hero-chapter {
  display: flex;
  min-height: calc(100vh - var(--header-h) - 120px);
  flex-direction: column;
  justify-content: center;
  padding-top: 56px;
  padding-bottom: 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
  align-items: center;
  gap: 52px;
}

.hero-lead {
  max-width: 720px;
  margin-bottom: 34px;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.9;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 42px;
}

.hero-meta div {
  display: flex;
  flex-direction: column;
}

.hero-meta span {
  margin-bottom: 3px;
  color: var(--ink-faint);
  font: 500 10px/1.4 var(--mono);
}

.hero-meta strong {
  font-size: 13px;
}

.hero-loop {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.loop-track {
  position: absolute;
  inset: 18%;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  animation: rotate 24s linear infinite;
}

.loop-core {
  position: absolute;
  inset: 35%;
  z-index: 2;
  display: grid;
  place-content: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  text-align: center;
  transform: rotate(-4deg);
}

.loop-core span {
  font: 600 10px/1 var(--mono);
}

.loop-core strong {
  margin-top: 6px;
  font-size: 22px;
}

.loop-node {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 82px;
  height: 82px;
  place-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.loop-node span {
  font-size: 12px;
  font-weight: 700;
}

.loop-node svg {
  margin-inline: auto;
  color: var(--green);
}

.node-a { inset: 0 auto auto 50%; transform: translateX(-50%); }
.node-b { inset: 50% 0 auto auto; transform: translateY(-50%); }
.node-c { inset: auto auto 0 50%; transform: translateX(-50%); }
.node-d { inset: 50% auto auto 0; transform: translateY(-50%); }

@keyframes rotate {
  to { transform: rotate(360deg); }
}

.opening-thesis {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: start;
  gap: 22px;
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.chapter-number {
  color: var(--orange);
  font: 600 42px/1 var(--mono);
}

.opening-thesis p {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.75;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 20px 0 54px;
  border-top: 1px solid var(--line-strong);
}

.timeline-item {
  position: relative;
  min-height: 240px;
  padding: 28px 22px 22px;
  border-right: 1px solid var(--line);
}

.timeline-item:first-child {
  border-left: 1px solid var(--line);
}

.timeline-item::before {
  position: absolute;
  top: -5px;
  left: 20px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--bg);
  background: var(--ink-faint);
  content: "";
}

.timeline-item.active {
  background: var(--green-soft);
}

.timeline-item.active::before {
  background: var(--green);
}

.timeline time {
  display: block;
  margin-bottom: 28px;
  color: var(--ink-faint);
  font: 600 10px/1 var(--mono);
}

.timeline strong {
  display: block;
  margin-bottom: 10px;
  font-size: 17px;
}

.timeline p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.definition-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  padding: 30px 0;
  border-block: 1px solid var(--line);
}

.definition-band blockquote {
  margin-bottom: 0;
  padding-left: 22px;
  border-left: 4px solid var(--orange);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.75;
}

.definition-band p:last-child {
  margin-bottom: 0;
}

.contrast-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 38px;
}

.why-vibe {
  margin-top: 34px;
  padding: 24px 26px;
  border-left: 4px solid var(--yellow);
  background: color-mix(in srgb, var(--yellow) 14%, var(--surface));
}

.why-vibe span,
.why-vibe strong {
  display: block;
}

.why-vibe span {
  margin-bottom: 8px;
  color: var(--ink-faint);
  font: 600 10px/1.4 var(--mono);
}

.why-vibe strong {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
}

.why-vibe p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.contrast-strip div {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.contrast-strip div:last-child {
  border-color: var(--green);
  background: var(--green-soft);
}

.contrast-strip span,
.source-list span,
.feature-row > span,
.mcp-catalog section > span,
.roadmap section > span,
.gate-pipeline span,
.sync-source > span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-faint);
  font: 600 10px/1.4 var(--mono);
}

.contrast-strip strong {
  display: block;
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th:last-child,
td:last-child {
  border-right: 0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-soft);
  color: var(--ink-soft);
  font: 600 10px/1.4 var(--mono);
}

tbody tr:hover {
  background: color-mix(in srgb, var(--green-soft) 48%, transparent);
}

.vendor-group th {
  padding-block: 10px;
  border-right: 0;
  background: color-mix(in srgb, var(--green-soft) 54%, var(--surface-soft));
  color: var(--green);
  letter-spacing: 0;
}

.vendor-group:not(:first-child) th {
  border-top: 1px solid var(--line-strong);
}

.vendor-group:hover {
  background: transparent;
}

.vendor-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.vendor-timeline-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-bottom: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: help;
  font: inherit;
  text-align: left;
}

.vendor-timeline-trigger:hover {
  border-bottom-color: var(--brand);
  color: var(--brand);
}

.vendor-timeline-trigger:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

#model-map time {
  color: var(--ink-soft);
  font: 600 11px/1 var(--mono);
}

.tippy-box[data-theme~="vendor-timeline"] {
  width: min(370px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--line-strong));
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 20px 46px rgba(18, 20, 36, 0.2);
  color: var(--ink);
}

.tippy-box[data-theme~="vendor-timeline"] > .tippy-content {
  padding: 0;
}

.tippy-box[data-theme~="vendor-timeline"][data-placement^="top"] > .tippy-arrow::before {
  border-top-color: color-mix(in srgb, var(--brand) 38%, var(--line-strong));
}

.tippy-box[data-theme~="vendor-timeline"][data-placement^="bottom"] > .tippy-arrow::before {
  border-bottom-color: color-mix(in srgb, var(--brand) 38%, var(--line-strong));
}

.vendor-timeline-card {
  padding: 16px 18px 18px;
}

.vendor-timeline-tooltip-eyebrow {
  display: block;
  margin: -16px -18px 14px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--brand);
  font: 600 9px/1.3 var(--mono);
  letter-spacing: 0.08em;
}

.vendor-timeline-tooltip-title {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.vendor-timeline-origin {
  display: block;
  margin-bottom: 16px;
  color: var(--ink-faint);
  font: 500 10px/1.4 var(--mono);
}

.vendor-timeline-tooltip-list {
  margin: 0;
  padding: 0 0 0 20px;
  list-style: none;
}

.vendor-timeline-tooltip-list li {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  min-height: 34px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.vendor-timeline-tooltip-list li::before {
  position: absolute;
  top: 5px;
  left: -20px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
  content: "";
}

.vendor-timeline-tooltip-list li:not(:last-child)::after {
  position: absolute;
  top: 15px;
  bottom: -3px;
  left: -16px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.vendor-timeline-tooltip-list time {
  color: var(--brand);
  font: 600 10px/1.7 var(--mono);
}

.vendor-dot.openai { background: #111; }
.vendor-dot.anthropic { background: #ce7b4d; }
.vendor-dot.google { background: #4285f4; }
.vendor-dot.deepseek { background: #4d6bfe; }
.vendor-dot.qwen { background: #7b42dc; }
.vendor-dot.glm { background: #00a6a6; }
.vendor-dot.kimi { background: #1d1d1f; }
.vendor-dot.minimax { background: #f05a28; }
.vendor-dot.github { background: #24292f; }
.vendor-dot.doubao { background: #3869f3; }
.vendor-dot.xiaomi { background: #ff6900; }
.vendor-dot.cursor { background: #12a37f; }

.vendor-logo-mark {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
}

.vendor-logo-mark img {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
}

.gemini-logo-mark {
  overflow: hidden;
  border-radius: 6px;
  background: var(--ink);
}

.gemini-logo-mark img {
  width: 80px;
  height: 80px;
  max-width: none;
  transform: translate(-28px, -4px);
}

.agent-showcase {
  margin-top: 54px;
  padding-top: 34px;
  border-top: 1px solid var(--line-strong);
}

.agent-showcase-header {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 24px;
}

.agent-showcase-header .eyebrow {
  margin-bottom: 10px;
}

.agent-showcase-header h3 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.25;
}

.agent-showcase-header > p {
  max-width: 520px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.agent-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.agent-showcase-card {
  position: relative;
  display: flex;
  min-height: 218px;
  flex-direction: column;
  padding: 20px;
  isolation: isolate;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transform: perspective(900px) rotateX(var(--agent-rotate-x, 0deg)) rotateY(var(--agent-rotate-y, 0deg)) translateY(var(--agent-lift, 0px));
  transform-style: preserve-3d;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 360ms cubic-bezier(0.2, 0.75, 0.25, 1);
  --agent-pointer-x: 50%;
  --agent-pointer-y: 50%;
  --agent-rotate-x: 0deg;
  --agent-rotate-y: 0deg;
  --agent-parallax-x: 0px;
  --agent-parallax-y: 0px;
  will-change: transform;
}

.agent-showcase-card::before {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--agent-accent, var(--brand));
  content: "";
}

.agent-showcase-card::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at var(--agent-pointer-x) var(--agent-pointer-y), color-mix(in srgb, var(--agent-accent, var(--brand)) 15%, transparent), transparent 56%);
  content: "";
  opacity: 0;
  transition: opacity 220ms ease;
}

.agent-showcase-card:hover,
.agent-showcase-card:focus-visible {
  border-color: var(--agent-accent, var(--brand));
  box-shadow: 6px 6px 0 color-mix(in srgb, var(--agent-accent, var(--brand)) 16%, var(--line));
  --agent-lift: -3px;
}

.agent-showcase-card.is-tilting {
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.agent-showcase-card.is-tilting::after,
.agent-showcase-card:hover::after,
.agent-showcase-card:focus-visible::after {
  opacity: 1;
}

.agent-showcase-card:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.agent-card-top {
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translate3d(var(--agent-parallax-x), var(--agent-parallax-y), 18px);
  color: var(--ink-faint);
  font: 600 9px/1.3 var(--mono);
  letter-spacing: 0.08em;
  transition: transform 180ms ease-out;
}

.agent-card-top .agent-logo-mark {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
}

.agent-card-top .agent-logo-mark img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.agent-showcase-card.marvis .agent-logo-mark img,
.agent-showcase-card.lingma .agent-logo-mark img {
  border-radius: 8px;
}

.agent-card-top svg {
  width: 15px;
  height: 15px;
  margin-left: auto;
  color: var(--agent-accent, var(--brand));
}

.agent-showcase-card strong {
  display: block;
  margin: 25px 0 9px;
  transform: translate3d(calc(var(--agent-parallax-x) * 0.7), calc(var(--agent-parallax-y) * 0.7), 12px);
  font-size: 18px;
  line-height: 1.35;
  transition: transform 180ms ease-out;
}

.agent-showcase-card p {
  margin: 0;
  transform: translate3d(calc(var(--agent-parallax-x) * 0.45), calc(var(--agent-parallax-y) * 0.45), 6px);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.72;
  transition: transform 180ms ease-out;
}

.agent-card-foot {
  display: block;
  margin-top: auto;
  padding-top: 18px;
  transform: translate3d(calc(var(--agent-parallax-x) * 0.35), calc(var(--agent-parallax-y) * 0.35), 4px);
  color: var(--agent-accent, var(--brand));
  font: 600 10px/1.4 var(--mono);
  transition: transform 180ms ease-out;
}

.agent-showcase-card.workbuddy { --agent-accent: #20a875; }
.agent-showcase-card.marvis { --agent-accent: #6675ff; }
.agent-showcase-card.codebuddy { --agent-accent: #3478f6; }
.agent-showcase-card.trae { --agent-accent: #1c9b7a; }
.agent-showcase-card.lingma { --agent-accent: #7b42dc; }
.agent-showcase-card.qoder { --agent-accent: #3578e5; }

.decision-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 32px;
  border: 1px solid var(--line);
  background: var(--line);
}

.decision-row > div {
  padding: 22px;
  background: var(--surface);
}

.decision-row span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  margin-bottom: 16px;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font: 600 10px/1 var(--mono);
}

.decision-row strong,
.principle-grid strong {
  display: block;
  margin-bottom: 8px;
}

.decision-row p,
.principle-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.note {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 4px solid var(--blue);
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
}

.note svg {
  margin-top: 3px;
  color: var(--blue);
}

.note p {
  margin: 0;
  font-size: 13px;
}

.note.warning {
  border-left-color: var(--orange);
  background: var(--orange-soft);
}

.note.warning svg {
  color: var(--orange);
}

.note.success {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.note.success svg {
  color: var(--green);
}

.two-col {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: start;
  gap: 42px;
}

.two-col h3 {
  margin-top: 0;
}

.two-col.compact {
  grid-template-columns: 1fr 0.8fr;
}

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

.check-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 14px;
}

.check-list svg {
  margin-top: 4px;
  color: var(--green);
}

.editor-mock {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #171a1d;
  color: #d9e0e8;
  box-shadow: var(--shadow);
}

.editor-tabs,
.editor-status {
  display: flex;
  align-items: center;
  border-color: #343b43;
  color: #89929d;
  font: 500 10px/1 var(--mono);
}

.editor-tabs {
  border-bottom: 1px solid #343b43;
}

.editor-tabs span {
  padding: 12px 16px;
}

.editor-tabs .active {
  border-right: 1px solid #343b43;
  border-bottom: 2px solid #54c7aa;
  background: #20252a;
  color: #e8edf2;
}

.editor-mock pre {
  min-height: 270px;
  margin: 0;
  padding: 24px;
  overflow: auto;
  font: 500 12px/1.9 var(--mono);
}

.editor-mock b {
  color: #d7a5ff;
}

.editor-mock mark {
  background: transparent;
  color: #6fdbbf;
}

.editor-status {
  justify-content: flex-end;
  gap: 16px;
  padding: 8px 12px;
  border-top: 1px solid #343b43;
}

.editor-status span:first-child {
  margin-right: auto;
  color: #6fdbbf;
}

.agent-loop {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.agent-loop > div {
  position: relative;
  min-height: 240px;
  padding: 24px 20px;
  background: var(--surface);
}

.agent-loop > div:nth-child(2),
.agent-loop > div:nth-child(4) {
  background: var(--surface-soft);
}

.agent-loop span {
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--ink-faint);
  font: 600 10px/1 var(--mono);
}

.agent-loop svg {
  width: 28px;
  height: 28px;
  margin-bottom: 46px;
  color: var(--green);
}

.agent-loop strong {
  display: block;
  margin-bottom: 10px;
}

.agent-loop p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.code-block {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #181b1e;
  color: #e8ecf0;
}

.code-block.mini {
  align-self: stretch;
}

.code-title {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid #343a40;
  color: #9da7af;
  font: 500 10px/1 var(--mono);
}

.code-title button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: #b7c0c8;
  cursor: pointer;
  font-size: 10px;
}

.code-title button:hover {
  color: #fff;
}

.code-title svg {
  width: 14px;
  height: 14px;
}

.code-block pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  white-space: pre-wrap;
  font: 500 12px/1.9 var(--mono);
}

.code-block.mini pre {
  min-height: 132px;
}

.duet-board {
  padding: 26px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.duet-lane {
  display: grid;
  grid-template-columns: 1.25fr 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.lane-title span,
.lane-title strong {
  display: block;
}

.lane-title span {
  color: var(--green);
  font: 600 10px/1 var(--mono);
}

.lane-title strong {
  margin-top: 6px;
  font-size: 13px;
}

.lane-step {
  padding: 14px 10px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.codex-lane .lane-step {
  background: var(--green-soft);
}

.duet-handoff {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0;
  padding: 11px 16px;
  border-block: 1px dashed var(--line-strong);
  color: var(--ink-soft);
  font: 500 11px/1.4 var(--mono);
}

.scenario-matrix,
.risk-table {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 1px;
  margin-top: 28px;
  border: 1px solid var(--line);
  background: var(--line);
}

.matrix-head,
.matrix-label,
.matrix-cell,
.risk-head,
.risk-table > div {
  padding: 12px 16px;
  background: var(--surface);
  font-size: 12px;
}

.matrix-head,
.risk-head {
  background: var(--ink);
  color: var(--bg);
  font: 600 10px/1.4 var(--mono);
}

.matrix-cell {
  text-align: center;
}

.matrix-cell.best {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
}

.feature-list {
  border-top: 1px solid var(--line-strong);
}

.feature-row {
  display: grid;
  grid-template-columns: 34px 42px 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 112px;
  padding: 18px 6px;
  border-bottom: 1px solid var(--line);
}

.feature-row > span {
  margin: 0;
}

.feature-row > svg {
  width: 26px;
  height: 26px;
  color: var(--green);
}

.feature-row strong {
  display: block;
  margin-bottom: 4px;
}

.feature-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.feature-row code {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font: 500 10px/1.4 var(--mono);
  white-space: nowrap;
}

.source-line {
  margin-top: 22px;
  color: var(--ink-faint);
  font-size: 11px;
}

.lesson-visual {
  position: relative;
  margin: 34px 0 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: 10px 10px 0 color-mix(in srgb, var(--brand) 9%, var(--line));
}

.lesson-visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
}

.lesson-visual figcaption {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
}

.lesson-visual figcaption span {
  color: var(--brand);
  font: 650 11px/1.5 var(--mono);
}

.lesson-visual figcaption strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
}

body.presenting .lesson-visual {
  margin-top: 24px;
}

body.presenting .lesson-visual img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 360px);
  margin-inline: auto;
}

.source-line a {
  color: var(--green);
}

.mcp-architecture {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 10px;
}

.mcp-client,
.mcp-server,
.mcp-system {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}

.mcp-server {
  border-color: var(--green);
  background: var(--green-soft);
}

.mcp-client span,
.mcp-server span,
.mcp-system span {
  margin-bottom: 14px;
  color: var(--ink-faint);
  font: 600 9px/1 var(--mono);
}

.mcp-client small,
.mcp-server small,
.mcp-system small {
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 10px;
}

.mcp-wire {
  display: flex;
  min-width: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-faint);
}

.mcp-wire code {
  max-width: 80px;
  font: 500 8px/1.4 var(--mono);
  text-align: center;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.principle-grid > div {
  padding: 22px;
  border-top: 3px solid var(--green);
  background: var(--surface);
}

.principle-grid svg {
  width: 24px;
  height: 24px;
  margin-bottom: 24px;
  color: var(--green);
}

.mcp-catalog {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.mcp-catalog section {
  position: relative;
  min-height: 260px;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.catalog-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 34px;
  place-items: center;
  background: var(--surface-soft);
}

.catalog-icon.figma { color: #a259ff; }
.catalog-icon.yapi { color: var(--blue); }
.catalog-icon.context { color: var(--green); }
.catalog-icon.firecrawl { color: var(--orange); }

.mcp-catalog h3 {
  margin: 6px 0 10px;
  font-size: 20px;
}

.mcp-catalog p {
  color: var(--ink-soft);
  font-size: 13px;
}

.mcp-catalog section > strong {
  position: absolute;
  right: 26px;
  bottom: 22px;
  left: 26px;
  color: var(--green);
  font-size: 12px;
}

.evidence-figure {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  align-items: stretch;
  margin: 40px 0 0;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.evidence-figure img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: contain;
  background: #fff;
}

.evidence-figure figcaption {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  border-left: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

.evidence-figure figcaption span {
  margin-bottom: 12px;
  color: var(--orange);
  font: 600 10px/1.4 var(--mono);
}

.evidence-figure.portrait img {
  max-height: 560px;
}

.skill-anatomy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.file-tree,
.skill-rules {
  padding: 32px;
  background: var(--surface);
}

.file-tree > div {
  display: grid;
  grid-template-columns: 22px auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.file-tree > div:first-child {
  grid-template-columns: 22px 1fr;
}

.file-tree > div:last-child {
  border-bottom: 0;
}

.file-tree .indent {
  padding-left: 24px;
}

.file-tree svg {
  color: var(--green);
}

.file-tree strong {
  font: 600 12px/1 var(--mono);
}

.file-tree span {
  color: var(--ink-faint);
  font-size: 11px;
  text-align: right;
}

.skill-rules h3 {
  margin-top: 0;
}

.skill-rules ol {
  margin: 0;
  padding-left: 20px;
}

.skill-rules li {
  margin-bottom: 16px;
  padding-left: 8px;
}

.skill-rules li::marker {
  color: var(--orange);
  font-family: var(--mono);
}

.skill-rules span {
  font-weight: 800;
}

.skill-rules p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.sync-diagram {
  display: grid;
  grid-template-columns: 1.2fr auto 1fr;
  align-items: center;
  gap: 26px;
  padding: 30px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.sync-source {
  padding: 24px;
  border: 1px solid var(--green);
  background: var(--green-soft);
}

.sync-source strong,
.sync-source code {
  display: block;
}

.sync-source code {
  margin-top: 12px;
  font: 500 11px/1.4 var(--mono);
}

.sync-action {
  text-align: center;
}

.sync-action svg {
  display: block;
  margin: 0 auto 8px;
  color: var(--orange);
}

.sync-action strong {
  font: 600 10px/1.4 var(--mono);
}

.sync-targets {
  display: grid;
  gap: 8px;
}

.sync-targets div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.sync-targets strong {
  font-size: 12px;
}

.sync-targets span {
  color: var(--ink-faint);
  font: 500 9px/1.4 var(--mono);
}

.memory-origin {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.memory-origin > div {
  min-height: 196px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.memory-origin > div:nth-of-type(3),
.memory-origin > div:nth-of-type(4) {
  background: var(--green-soft);
}

.memory-origin span {
  display: block;
  margin-bottom: 32px;
  color: var(--orange);
  font: 600 10px/1 var(--mono);
}

.memory-origin strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.memory-origin p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.memory-content {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 330px;
  margin-top: 34px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.memory-index {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.memory-index button {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font: 500 10px/1.4 var(--mono);
  text-align: left;
}

.memory-index button:last-child {
  border-bottom: 0;
}

.memory-index button:hover,
.memory-index button.active {
  background: var(--surface);
  color: var(--green);
}

.memory-panel {
  padding: 36px 40px;
}

.memory-panel h3 {
  margin: 0 0 20px;
}

.memory-panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 13px;
}

.memory-panel li {
  margin-bottom: 10px;
}

.memory-panel li:last-child {
  margin-bottom: 0;
}

.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.before-after > div {
  min-height: 148px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.before-after > div:last-child {
  border-color: var(--green);
  background: var(--green-soft);
}

.before-after span {
  font-weight: 800;
}

.before-after p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.engineering-project-map {
  margin-bottom: 34px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.engineering-role-flow {
  margin: 0 0 38px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.engineering-role-flow-heading {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.engineering-role-flow-heading > span {
  padding-top: 4px;
  color: var(--orange);
  font: 600 10px/1.4 var(--mono);
}

#main-content .engineering-role-flow h3 {
  margin: 0;
  font-size: 20px;
}

#main-content .engineering-role-flow-heading p,
#main-content .engineering-role-feedback {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.engineering-role-flow-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr) 20px) minmax(0, 1fr);
  align-items: stretch;
}

.engineering-role-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  min-height: 156px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  background: var(--surface);
}

.engineering-role-step > span {
  color: var(--ink-faint);
  font: 600 10px/1 var(--mono);
}

.engineering-role-step > svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.engineering-role-step strong {
  grid-column: 1 / -1;
  margin-top: 16px;
  font-size: 15px;
}

#main-content .engineering-role-step p {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.engineering-role-step small {
  grid-column: 1 / -1;
  align-self: end;
  margin-top: 10px;
  color: var(--ink-faint);
  font: 500 10px/1.4 var(--mono);
}

.engineering-role-step.design {
  border-top-color: var(--orange);
}

.engineering-role-step.design > svg {
  color: var(--orange);
}

.engineering-role-step.frontend {
  border-top-color: var(--green);
}

.engineering-role-step.frontend > svg {
  color: var(--green);
}

.engineering-role-step.backend {
  border-top-color: var(--yellow);
}

.engineering-role-step.backend > svg {
  color: var(--yellow);
}

.engineering-role-step.testing {
  border-top-color: var(--red);
}

.engineering-role-step.testing > svg {
  color: var(--red);
}

.engineering-role-arrow {
  width: 15px;
  height: 100%;
  align-self: center;
  justify-self: center;
  color: var(--line-strong);
}

.engineering-role-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
}

.engineering-role-feedback svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--brand);
}

.engineering-map-heading {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 18px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  color: var(--bg);
}

.engineering-map-heading span,
.engineering-project-lanes section > span,
.engineering-ai-intro span,
.engineering-ai-flow section > span {
  font: 600 10px/1.4 var(--mono);
}

.engineering-map-heading span {
  color: color-mix(in srgb, var(--bg) 66%, transparent);
}

.engineering-map-heading strong {
  font-size: 14px;
}

.engineering-project-lanes {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) 24px minmax(290px, 1.35fr) 24px minmax(180px, 0.85fr);
  align-items: stretch;
}

.engineering-project-lanes > section {
  min-width: 0;
  min-height: 258px;
  padding: 22px;
}

.engineering-assets-lane {
  border-inline: 1px solid var(--line);
  background: var(--surface-soft);
}

.engineering-project-lanes section > svg {
  width: 25px;
  height: 25px;
  margin-bottom: 28px;
  color: var(--brand);
}

.engineering-project-lanes section > span {
  display: block;
  color: var(--ink-faint);
}

#main-content .engineering-project-lanes h3 {
  margin: 4px 0 14px;
  font-family: var(--sans);
  font-size: 18px;
}

#main-content .engineering-project-lanes section > p {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.engineering-lane-arrow {
  width: 16px;
  height: 100%;
  align-self: center;
  justify-self: center;
  color: var(--line-strong);
}

.engineering-chip-row,
.engineering-runtime-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.engineering-chip-row b,
.engineering-runtime-list b {
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 600;
}

.engineering-runtime-list {
  display: grid;
}

.engineering-runtime-list b {
  border-left: 3px solid var(--brand);
  background: var(--surface);
}

.engineering-asset-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.engineering-asset-list > div {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 2px 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.engineering-asset-list svg {
  grid-row: 1 / 3;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--orange);
}

.engineering-asset-list strong {
  font-size: 11px;
  line-height: 1.4;
}

#main-content .engineering-asset-list small {
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.45;
}

.engineering-ai-intro {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  align-items: end;
  gap: 36px;
  margin: 0 0 20px;
}

.engineering-ai-intro span {
  color: var(--orange);
}

#main-content .engineering-ai-intro h3 {
  margin: 6px 0 0;
  font-size: 24px;
}

#main-content .engineering-ai-intro > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.72;
}

.engineering-ai-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(220px, 1.08fr) 28px minmax(0, 1fr);
  align-items: stretch;
}

.engineering-ai-flow > section {
  display: flex;
  min-height: 152px;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.engineering-ai-flow > svg {
  width: 17px;
  height: 100%;
  align-self: center;
  justify-self: center;
  color: var(--brand);
}

.engineering-ai-flow section > span {
  margin-bottom: 12px;
  color: var(--ink-faint);
}

.engineering-ai-flow section > strong {
  font-size: 15px;
}

#main-content .engineering-ai-flow section > p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.engineering-ai-flow .engineering-ai-core {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.engineering-ai-core > svg {
  width: 24px;
  height: 24px;
  margin-bottom: 18px;
  color: var(--brand);
}

.engineering-note {
  margin-top: 22px;
}

.sdlc-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sdlc-flow > div {
  min-height: 220px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.sdlc-flow > div:nth-child(even) {
  background: var(--surface-soft);
}

.sdlc-flow span {
  display: block;
  color: var(--orange);
  font: 600 10px/1 var(--mono);
}

.sdlc-flow svg {
  width: 26px;
  height: 26px;
  margin: 30px 0 24px;
  color: var(--green);
}

.sdlc-flow strong {
  display: block;
  margin-bottom: 8px;
}

.sdlc-flow p,
.sdlc-flow small {
  display: block;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.sdlc-flow small {
  margin-top: 16px;
  color: var(--green);
}

.sdlc-system-map {
  position: relative;
  margin: 0 0 52px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.sdlc-system-map img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.sdlc-system-map figcaption {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  padding: 22px 26px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
}

.sdlc-system-map figcaption span {
  color: var(--green);
  font: 600 12px/1.5 var(--mono);
}

.sdlc-system-map figcaption strong {
  font-size: 16px;
  line-height: 1.75;
}

.image-expand {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #d7d8ce;
  background: rgba(255, 255, 255, 0.94);
  color: #181914;
  box-shadow: 0 8px 24px rgba(24, 25, 20, 0.12);
}

.image-expand:hover {
  background: #ffffff;
  color: var(--green);
}

.previewable-image {
  cursor: zoom-in;
}

.previewable-image:hover {
  filter: brightness(0.97);
}

body.preview-open {
  overflow: hidden;
}

.image-preview {
  position: fixed;
  inset: 0;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.image-preview.active {
  opacity: 1;
  visibility: visible;
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.9);
  backdrop-filter: blur(8px);
}

.image-preview-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.image-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  color: #ffffff;
  pointer-events: auto;
}

.image-preview-header > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.image-preview-count {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.62);
  font: 500 11px/1.4 var(--mono);
}

.image-preview-title {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview-header button,
.image-preview-toolbar button,
.image-preview-nav {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.image-preview-header button:hover,
.image-preview-toolbar button:hover,
.image-preview-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.image-preview-header button:focus-visible,
.image-preview-toolbar button:focus-visible,
.image-preview-nav:focus-visible {
  outline-color: #ffffff;
}

.image-preview-stage {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  pointer-events: auto;
  touch-action: none;
}

.image-preview-stage img {
  display: block;
  max-width: calc(100vw - 180px);
  max-height: calc(100vh - 176px);
  object-fit: contain;
  user-select: none;
  will-change: transform;
  cursor: zoom-in;
  transition: transform 180ms ease;
}

.image-preview-stage img.without-transition {
  transition: none;
}

.image-preview-stage img.can-drag {
  cursor: grab;
}

.image-preview-stage img.dragging {
  cursor: grabbing;
}

.image-preview-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.34);
  transform: translateY(-50%);
}

.image-preview-nav.previous {
  left: 22px;
}

.image-preview-nav.next {
  right: 22px;
}

.image-preview-toolbar {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 2px;
  margin: 12px 18px 22px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 21, 27, 0.92);
  color: #ffffff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
}

.image-preview-scale {
  width: 58px;
  color: rgba(255, 255, 255, 0.76);
  font: 500 11px/1 var(--mono);
  text-align: center;
}

.image-preview-divider {
  width: 1px;
  height: 22px;
  margin: 0 5px;
  background: rgba(255, 255, 255, 0.16);
}

.artifact-chain {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 30px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  background: var(--ink);
  color: var(--bg);
}

.artifact-chain span {
  font: 500 10px/1.4 var(--mono);
  text-align: center;
}

.document-output {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.document-output > div {
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.document-output span,
.document-output strong {
  display: block;
}

.document-output span {
  margin-bottom: 28px;
  color: var(--orange);
  font: 600 10px/1 var(--mono);
}

.document-output strong {
  font-size: 15px;
  line-height: 1.7;
}

.role-shift-table {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.role-shift-table table {
  min-width: 1040px;
  font-size: 15px;
}

.role-shift-table th:nth-child(1) { width: 13%; }
.role-shift-table th:nth-child(2) { width: 24%; }
.role-shift-table th:nth-child(3) { width: 36%; }
.role-shift-table th:nth-child(4) { width: 27%; }

.role-shift-table td {
  line-height: 1.8;
}

.role-shift-table td:last-child strong {
  color: var(--green);
}

.role-chip {
  display: inline-block;
  min-width: 72px;
  padding: 6px 10px;
  border-left: 3px solid currentColor;
  background: var(--surface-soft);
  font-weight: 800;
  white-space: nowrap;
}

.role-chip.product { color: var(--blue); }
.role-chip.sales { color: var(--brand); }
.role-chip.sales-example-trigger {
  appearance: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.role-chip.sales-example-trigger:hover {
  background: var(--brand-soft);
}

.role-chip.sales-example-trigger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.role-chip.design { color: #9b58d1; }
.role-chip.dev { color: var(--green); }
.role-chip.qa { color: var(--orange); }
.role-chip.lead { color: #8b6b05; }
.role-chip.ops { color: var(--red); }

.role-takeaway {
  margin-top: 28px;
}

.role-shift-mantra {
  display: grid;
  gap: 4px;
  margin-top: 28px;
  padding: 22px 24px;
  border-left: 4px solid var(--brand);
  background: var(--surface-soft);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.5;
}

.role-shift-mantra p {
  margin: 0;
}

.gate-pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}

.gate-pipeline > div {
  min-height: 180px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.gate-pipeline > div:last-of-type {
  border-color: var(--green);
  background: var(--green-soft);
}

.gate-pipeline strong {
  display: block;
  margin: 28px 0 8px;
}

.gate-pipeline p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.risk-table {
  grid-template-columns: 1.2fr 0.7fr 1.5fr;
}

.risk {
  display: inline-block;
  min-width: 38px;
  padding: 3px 8px;
  text-align: center;
  font: 600 10px/1.4 var(--mono);
}

.risk.low { background: var(--green-soft); color: var(--green); }
.risk.medium { background: #f4e8bd; color: #7d5c00; }
.risk.high { background: #f0d0d0; color: var(--red); }

.roadmap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-strong);
}

.roadmap section {
  position: relative;
  min-height: 300px;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
}

.roadmap section:first-child {
  border-left: 1px solid var(--line);
}

.roadmap section::before {
  position: absolute;
  top: -5px;
  left: 22px;
  width: 9px;
  height: 9px;
  background: var(--orange);
  content: "";
}

.roadmap h3 {
  margin: 46px 0 12px;
  font-size: 17px;
}

.roadmap p {
  color: var(--ink-soft);
  font-size: 12px;
}

.roadmap section > strong {
  position: absolute;
  right: 22px;
  bottom: 24px;
  left: 22px;
  color: var(--green);
  font-size: 11px;
}

.roadmap-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.62fr);
  gap: 18px;
  margin-top: 26px;
}

.roadmap-evidence-grid .lesson-visual {
  min-width: 0;
  margin: 0;
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--brand) 9%, var(--line));
}

.roadmap-evidence-grid .lesson-visual img {
  width: 100%;
  height: 330px;
  object-fit: contain;
}

.roadmap-evidence-grid .lesson-visual figcaption {
  grid-template-columns: 1fr;
  gap: 8px;
  min-height: 116px;
}

.solo-project-chapter {
  --solo-product: var(--blue);
  --solo-design: var(--yellow);
  --solo-frontend: var(--brand);
  --solo-backend: var(--orange);
  --solo-testing: var(--red);
  --solo-ops: var(--green);
}

.solo-project-contract {
  display: grid;
  grid-template-columns: minmax(230px, 0.85fr) minmax(0, 1.15fr);
  gap: 30px;
  align-items: start;
  margin: 34px 0 42px;
  padding: 22px 26px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--brand);
  background: var(--surface);
}

.solo-project-contract > div > span,
.agent-role-card > span,
.solo-tech-card header span {
  display: block;
  color: var(--ink-faint);
  font: 600 10px/1.2 var(--mono);
}

#main-content .solo-project-contract h3 {
  margin: 8px 0 0;
  font-size: 21px;
}

.solo-project-contract p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.solo-project-contract code,
.agent-role-card code,
.solo-tech-card > code,
.solo-phase code,
.solo-contract-strip code {
  padding: 2px 5px;
  background: var(--surface-soft);
  color: var(--ink);
  font: 500 10px/1.5 var(--mono);
}

.agent-role-roster {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 52px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.agent-role-card {
  min-height: 190px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.agent-role-card > svg {
  display: block;
  width: 25px;
  height: 25px;
  margin: 17px 0 12px;
}

.agent-role-card strong {
  display: block;
  font-size: 15px;
}

.agent-role-card p {
  min-height: 44px;
  margin: 5px 0 9px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.agent-role-card small {
  display: block;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.55;
}

.agent-role-card.product > svg { color: var(--solo-product); }
.agent-role-card.design > svg { color: var(--solo-design); }
.agent-role-card.frontend > svg { color: var(--solo-frontend); }
.agent-role-card.backend > svg { color: var(--solo-backend); }
.agent-role-card.testing > svg { color: var(--solo-testing); }
.agent-role-card.ops > svg { color: var(--solo-ops); }

.solo-project-flow {
  position: relative;
  display: grid;
  gap: 1px;
  margin-top: 22px;
  border: 1px solid var(--line-strong);
  background: var(--line);
}

.solo-phase {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 230px;
  gap: 24px;
  align-items: center;
  min-height: 120px;
  padding: 18px 22px;
  background: var(--surface);
}

.solo-phase-index {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-faint);
}

.solo-phase-index span {
  font: 600 18px/1 var(--mono);
}

.solo-phase-index svg {
  width: 17px;
  height: 17px;
}

.solo-phase strong {
  display: block;
  font-size: 16px;
}

.solo-phase p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.solo-phase aside {
  display: grid;
  justify-items: start;
  gap: 5px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.solo-phase aside b {
  color: var(--ink-faint);
  font: 600 10px/1.4 var(--mono);
}

.solo-phase.kickoff .solo-phase-index { color: var(--brand); }
.solo-phase.discovery .solo-phase-index { color: var(--solo-design); }
.solo-phase.architecture .solo-phase-index { color: var(--solo-backend); }
.solo-phase.build .solo-phase-index { color: var(--solo-frontend); }
.solo-phase.delivery .solo-phase-index { color: var(--solo-testing); }

.solo-project-feedback {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0 48px;
  color: var(--ink-soft);
  font-size: 12px;
}

.solo-project-feedback svg { color: var(--green); }

.solo-tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.solo-tech-card {
  position: relative;
  min-height: 388px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.solo-tech-card.frontend { border-top: 4px solid var(--brand); }
.solo-tech-card.backend { border-top: 4px solid var(--orange); }

.solo-tech-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.solo-tech-card header svg {
  width: 19px;
  height: 19px;
  color: var(--ink-faint);
}

.solo-tech-card h4 {
  margin: 24px 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

.solo-tech-card > p {
  min-height: 65px;
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.75;
}

.solo-tech-points {
  display: grid;
  gap: 8px;
}

.solo-tech-points > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.65;
}

.solo-tech-points b {
  color: var(--ink-faint);
  font: 600 10px/1.65 var(--mono);
}

.solo-tech-points span { color: var(--ink-soft); }

.solo-tech-card > code {
  position: absolute;
  right: 22px;
  bottom: 18px;
}

.solo-contract-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.solo-contract-strip > svg:first-child { color: var(--brand); }
.solo-contract-strip > svg:last-child { color: var(--ink-faint); }

.solo-contract-strip strong,
.solo-contract-strip span {
  display: block;
}

.solo-contract-strip strong {
  margin-bottom: 5px;
  font-size: 11px;
}

.solo-contract-strip span {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.solo-project-note { margin-top: 28px; }

.discussion-chapter {
  min-height: 90vh;
}

.discussion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.discussion-question {
  position: relative;
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 28px 30px 26px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.discussion-question::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
  content: "";
  transition: background 160ms ease;
}

.discussion-question:hover::before,
.discussion-question.featured::before {
  background: var(--brand);
}

.discussion-question.featured {
  background: var(--brand-soft);
}

.discussion-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--brand);
}

.discussion-meta span {
  font: 600 11px/1.4 var(--mono);
}

.discussion-meta svg {
  width: 20px;
  height: 20px;
}

.discussion-question h3 {
  max-width: 540px;
  margin: 30px 0 14px;
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.45;
}

.discussion-question p {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.discussion-question small {
  margin-top: auto;
  color: var(--ink-faint);
  font: 500 10px/1.6 var(--mono);
}

.source-list {
  border-top: 1px solid var(--line-strong);
}

.source-list a {
  display: grid;
  grid-template-columns: 120px 1fr 20px;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.source-list a:hover {
  color: var(--green);
}

.source-list span {
  margin: 0;
}

.source-list strong {
  font-size: 13px;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
  color: var(--ink-faint);
  font: 500 9px/1.5 var(--mono);
}

.page-toc {
  position: fixed;
  inset: calc(var(--header-h) + 44px) 24px auto auto;
  z-index: 40;
  width: calc(var(--toc-w) - 42px);
  max-height: calc(100vh - var(--header-h) - 90px);
  overflow-y: auto;
}

.page-toc > strong {
  display: block;
  margin-bottom: 14px;
  color: var(--ink-faint);
  font: 600 9px/1 var(--mono);
}

.page-toc nav {
  display: flex;
  flex-direction: column;
}

.page-toc nav a {
  padding: 6px 0 6px 12px;
  border-left: 1px solid var(--line-strong);
  color: var(--ink-faint);
  text-decoration: none;
  font-size: 11px;
  line-height: 1.5;
}

.page-toc nav a:hover,
.page-toc nav a.active {
  border-left-color: var(--green);
  color: var(--ink);
}

.toc-progress {
  margin-top: 24px;
}

.toc-progress > span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-faint);
  font: 500 9px/1 var(--mono);
}

.toc-progress > div {
  height: 2px;
  background: var(--line);
}

.toc-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--green);
  transition: width 180ms ease;
}

.presentation-controls {
  position: fixed;
  right: 24px;
  bottom: 20px;
  z-index: 160;
  display: none;
  align-items: center;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.presentation-controls button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.presentation-controls button:last-child {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.presentation-controls button:first-child {
  border-left: 1px solid var(--line);
}

.presentation-controls button:hover {
  background: var(--surface-soft);
}

.presentation-controls span {
  min-width: 78px;
  text-align: center;
  font: 600 10px/1 var(--mono);
}

.presenter-notes {
  display: none;
}

body.presenter-window {
  min-height: 100vh;
  padding: 28px;
  background: var(--bg);
}

body.presenter-window::before {
  opacity: 0.12;
}

body.presenter-window > .reading-progress,
body.presenter-window > .topbar,
body.presenter-window > .shell,
body.presenter-window > .presentation-controls {
  display: none;
}

body.presenter-window .presenter-notes {
  display: block;
  width: min(100%, 680px);
  margin: 0 auto;
}

.presenter-notes-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  font: 600 10px/1.4 var(--mono);
}

.presenter-notes-header .eyebrow {
  margin: 0;
  color: var(--brand);
  font: inherit;
}

.presenter-notes-current {
  padding: clamp(34px, 8vh, 82px) 0 42px;
}

.presenter-notes-section,
.presenter-note-copy-wrap > span,
.presenter-next > span {
  display: block;
  color: var(--brand);
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.04em;
}

.presenter-notes-current h1 {
  max-width: 620px;
  margin: 18px 0 10px;
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.16;
}

.presenter-note-counter {
  margin: 0 0 44px;
  color: var(--ink-faint);
  font: 600 14px/1 var(--mono);
}

.presenter-note-copy-wrap {
  padding: 24px 26px;
  border-left: 4px solid var(--brand);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.presenter-note-copy-wrap p {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.7;
  white-space: pre-wrap;
}

.presenter-next {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.presenter-next strong {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

body.presenting {
  overflow-y: auto;
}

body.presenting .topbar {
  grid-template-columns: 1fr auto;
  min-height: 52px;
  padding: 0 24px;
}

body.presenting .brand-copy small,
body.presenting .search-shell,
body.presenting .mode-switch,
body.presenting .sidebar,
body.presenting .page-toc,
body.presenting .reading-progress {
  display: none;
}

body.presenting .top-actions {
  grid-column: 2;
}

body.presenting .shell {
  display: block;
  padding-top: 52px;
}

body.presenting #main-content {
  width: 100%;
}

body.presenting .chapter {
  display: none;
  width: min(calc(100% - 96px), 1360px);
  min-height: calc(100vh - 52px);
  padding: clamp(42px, 5vh, 72px) 0 96px;
  border-bottom: 0;
}

body.presenting .chapter.present-active {
  display: block;
  animation: chapter-in 260ms ease both;
}

body.presenting .split-visual-chapter.present-active {
  display: grid;
  grid-template-columns: minmax(320px, 0.56fr) minmax(0, 1.44fr);
  align-content: center;
  gap: clamp(36px, 5vw, 72px);
}

body.presenting .split-visual-chapter .chapter-header {
  margin-bottom: 0;
}

body.presenting .structured-header-chapter .chapter-header {
  max-width: none;
}

body.presenting .agents-practice-chapter .chapter-header {
  margin-bottom: 28px;
}

body.presenting .agents-practice-grid .lesson-visual img {
  width: 100%;
  max-height: none;
}

body.presenting .engineering-overview-chapter {
  padding-top: 26px;
  padding-bottom: 70px;
}

body.presenting .engineering-overview-chapter .chapter-header {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  column-gap: 34px;
  max-width: none;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

body.presenting .engineering-overview-chapter .chapter-header .eyebrow {
  grid-column: 1;
  grid-row: 1 / 3;
  padding-top: 8px;
}

body.presenting .engineering-overview-chapter .chapter-header h2,
body.presenting .engineering-overview-chapter .chapter-header > p:last-child {
  grid-column: 2;
}

body.presenting .engineering-overview-chapter .chapter-header h2 {
  margin-bottom: 8px;
  font-size: 38px;
}

body.presenting #main-content .engineering-overview-chapter .chapter-header > p:last-child {
  font-size: 16px;
  line-height: 1.65;
}

body.presenting .engineering-project-map {
  margin-bottom: 22px;
}

body.presenting .engineering-role-flow {
  margin-bottom: 24px;
  padding: 16px;
}

body.presenting .engineering-role-flow-heading {
  grid-template-columns: 128px minmax(0, 1fr);
  margin-bottom: 14px;
}

body.presenting .engineering-role-flow h3 {
  font-size: 18px;
}

body.presenting .engineering-role-step {
  min-height: 128px;
  padding: 12px;
}

body.presenting .engineering-role-step strong {
  margin-top: 10px;
}

body.presenting .engineering-role-step p,
body.presenting .engineering-role-step small {
  font-size: 10px;
}

body.presenting .engineering-role-feedback {
  display: none;
}

body.presenting .solo-project-chapter .chapter-header {
  margin-bottom: 16px;
}

body.presenting .solo-project-contract {
  margin: 14px 0 16px;
  padding: 12px 16px;
}

body.presenting .solo-project-contract p,
body.presenting .solo-project-chapter > h3,
body.presenting .solo-project-feedback,
body.presenting .solo-project-note {
  display: none;
}

body.presenting .agent-role-roster {
  margin-bottom: 16px;
}

body.presenting .agent-role-card {
  min-height: 120px;
  padding: 12px;
}

body.presenting .agent-role-card > svg {
  width: 18px;
  height: 18px;
  margin: 9px 0 6px;
}

body.presenting .agent-role-card p {
  display: none;
}

body.presenting .agent-role-card small,
body.presenting .agent-role-card > span {
  font-size: 8px;
}

body.presenting .solo-project-flow {
  margin-top: 0;
}

body.presenting .solo-phase {
  grid-template-columns: 52px minmax(0, 1fr) 160px;
  min-height: 66px;
  gap: 12px;
  padding: 8px 12px;
}

body.presenting .solo-phase-index span { font-size: 13px; }
body.presenting .solo-phase-index svg { display: none; }
body.presenting .solo-phase strong { font-size: 12px; }
body.presenting .solo-phase p { font-size: 9px; }
body.presenting .solo-phase aside { gap: 2px; padding-left: 10px; }
body.presenting .solo-phase aside b,
body.presenting .solo-phase code { font-size: 8px; }

body.presenting .solo-phase.architecture aside code:nth-of-type(n + 3) {
  display: none;
}

body.presenting .solo-tech-grid {
  gap: 10px;
  margin-top: 16px;
}

body.presenting .solo-tech-card {
  min-height: 236px;
  padding: 14px;
}

body.presenting .solo-tech-card h4 {
  margin: 12px 0 5px;
  font-size: 14px;
}

body.presenting .solo-tech-card > p {
  min-height: 0;
  margin-bottom: 8px;
  font-size: 9px;
}

body.presenting .solo-tech-points { gap: 3px; }
body.presenting .solo-tech-points > div { padding-top: 4px; font-size: 8px; }
body.presenting .solo-tech-points b { font-size: 8px; }
body.presenting .solo-tech-card > code { display: none; }
body.presenting .solo-contract-strip { display: none; }

body.presenting .engineering-map-heading {
  padding-block: 10px;
}

body.presenting .engineering-project-lanes > section {
  min-height: 210px;
  padding: 18px;
}

body.presenting .engineering-project-lanes section > svg {
  margin-bottom: 18px;
}

body.presenting .engineering-ai-intro {
  margin-bottom: 14px;
}

body.presenting .engineering-ai-flow > section {
  min-height: 128px;
  padding: 16px 18px;
}

body.presenting .engineering-note {
  display: none;
}

body.presenting .chapter-header {
  max-width: 1040px;
  margin-bottom: 36px;
}

body.presenting .chapter-header > p:last-child {
  max-width: 980px;
}

body.presenting .discussion-chapter {
  padding-top: 24px;
  padding-bottom: 64px;
}

body.presenting .discussion-chapter .chapter-header {
  margin-bottom: 24px;
}

body.presenting .discussion-question {
  min-height: 220px;
  padding: 20px 28px 18px;
}

body.presenting .discussion-question h3 {
  margin: 20px 0 10px;
  font-size: 21px;
}

body.presenting .discussion-question p {
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.65;
}

body.presenting .presentation-controls {
  display: flex;
}

@keyframes chapter-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Readability pass: this site is used on a projector, not only read at a desk. */
.search-shell input {
  font-size: 14px;
}

.sidebar-intro strong {
  font-size: 14px;
}

.nav-group-title {
  font-size: 15px;
}

.nav-group-links a {
  font-size: 14px;
  line-height: 1.55;
}

.page-toc nav a {
  font-size: 13px;
}

#main-content p,
#main-content li {
  font-size: 16px;
  line-height: 1.82;
}

#main-content .chapter-header > p:last-child {
  font-size: 20px;
  line-height: 1.85;
}

#main-content .hero-lead {
  font-size: 20px;
}

#main-content .opening-thesis p {
  font-size: 20px;
}

#main-content .eyebrow {
  font: 600 12px/1.5 var(--mono);
}

#main-content h3 {
  font-size: 24px;
}

#main-content table {
  font-size: 15px;
}

#main-content th {
  font-size: 12px;
}

#main-content td {
  font-size: 15px;
  line-height: 1.75;
}

#main-content small {
  font-size: 14px;
}

#main-content .file-tree span,
#main-content .sync-targets span {
  font-size: 13px;
}

#main-content .source-line {
  font-size: 14px;
}

#main-content .code-block pre,
#main-content .editor-mock pre {
  font-size: 14px;
}

#main-content .feature-row code,
#main-content .memory-index button {
  font-size: 12px;
}

/* SingPath brand refresh */
::selection {
  background: var(--brand);
  color: #fff;
}

.topbar {
  border-bottom-color: color-mix(in srgb, var(--brand) 22%, var(--line));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--brand) 8%, transparent);
}

.brand {
  gap: 10px;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.brand-copy small {
  color: var(--brand);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.search-shell,
.icon-button,
.mode-switch,
.mode-option,
.search-results {
  border-radius: 6px;
}

.search-shell {
  min-height: 42px;
  border-color: color-mix(in srgb, var(--brand) 14%, var(--line));
  background: color-mix(in srgb, var(--surface) 96%, var(--brand-soft));
}

.search-shell:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.mode-switch {
  border-color: transparent;
  background: var(--surface-soft);
}

.mode-option {
  border-radius: 4px;
}

.mode-option.active {
  background: var(--brand);
  color: #fff;
  box-shadow: none;
}

.icon-button:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.sidebar {
  border-right-color: color-mix(in srgb, var(--brand) 16%, var(--line));
  background: color-mix(in srgb, var(--bg) 95%, var(--brand-soft));
}

.sidebar-inner {
  padding-inline: 20px;
}

.sidebar-intro,
.nav-group-links a {
  border-left: 0;
  border-radius: 5px;
}

.sidebar-intro {
  padding: 12px;
}

.sidebar-intro.active,
.sidebar-intro:hover,
.nav-group-links a:hover,
.nav-group-links a.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.sidebar-intro.active,
.nav-group-links a.active {
  box-shadow: inset 3px 0 0 var(--brand);
}

.sidebar-intro.active span,
.nav-group-links a.active span {
  color: var(--brand);
}

.nav-group {
  margin-top: 18px;
  padding-top: 16px;
}

.nav-group-title {
  padding-inline: 8px;
}

.nav-group-links a {
  padding-block: 8px;
}

.chapter {
  width: min(calc(100% - 56px), var(--content-w));
  padding-block: 96px 112px;
}

.chapter-header {
  position: relative;
  max-width: 820px;
  padding-left: 28px;
}

.chapter-header::before {
  position: absolute;
  inset: 6px auto 4px 0;
  width: 4px;
  border-radius: 2px;
  background: var(--brand);
  content: "";
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brand);
  font-weight: 600;
}

.eyebrow::before {
  width: 18px;
  height: 2px;
  background: currentColor;
  content: "";
}

h1,
h2 {
  color: var(--ink);
}

h1 {
  font-size: clamp(48px, 4.5vw, 68px);
  line-height: 1.13;
}

h1 em {
  color: var(--brand);
}

h2 {
  max-width: 780px;
  font-size: clamp(34px, 3vw, 50px);
  line-height: 1.22;
}

h3 {
  color: var(--ink);
}

.hero-chapter {
  min-height: calc(100vh - var(--header-h) - 48px);
  padding-block: 46px 42px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
}

.hero-lead {
  max-width: 650px;
  margin-bottom: 28px;
  color: var(--ink-soft);
}

.hero-meta {
  gap: 18px 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hero-meta span {
  color: var(--brand);
}

.hero-loop {
  width: min(100%, 300px);
  border: 1px solid color-mix(in srgb, var(--brand) 74%, #000);
  border-radius: 6px;
  background: #393dff;
  box-shadow: 18px 18px 0 color-mix(in srgb, var(--brand) 12%, var(--line));
}

.loop-track {
  border-color: rgba(255, 255, 255, 0.42);
}

.loop-core {
  inset: 34%;
  border: 0;
  border-radius: 5px;
  background: #0b0c12;
  color: #fff;
  transform: none;
}

.loop-core img {
  width: 48px;
  height: 48px;
  margin-inline: auto;
  object-fit: contain;
}

.loop-core span {
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.72);
  font: 500 8px/1 var(--mono);
  letter-spacing: 0.08em;
}

.loop-node {
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: #0b0c12;
  box-shadow: 0 14px 34px rgba(11, 12, 18, 0.2);
}

.loop-node svg {
  color: #393dff;
}

.node-a { inset: 12px auto auto 50%; }
.node-b { inset: 50% 12px auto auto; }
.node-c { inset: auto auto 12px 50%; }
.node-d { inset: 50% auto auto 12px; }

.opening-thesis {
  gap: 24px;
  margin-top: 42px;
  padding: 26px 30px;
  border-top: 0;
  border-radius: 6px;
  background: #393dff;
  color: #fff;
}

.chapter-number {
  color: rgba(255, 255, 255, 0.62);
}

.opening-thesis p {
  color: #fff;
}

.timeline {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.timeline-item {
  border-right-color: var(--line);
}

.timeline-item:first-child {
  border-left: 0;
}

.timeline-item.active {
  background: var(--brand);
  color: #fff;
}

.timeline-item.active time,
.timeline-item.active p {
  color: rgba(255, 255, 255, 0.72);
}

.timeline-item.active::before {
  border-color: var(--brand);
  background: #fff;
}

.definition-band,
.why-vibe,
.note,
.table-wrap,
.editor-mock,
.code-block,
.memory-content,
.sdlc-system-map,
.role-shift-table {
  border-radius: 6px;
}

.definition-band {
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.definition-band blockquote {
  border-left-color: var(--brand);
}

.decision-row > div,
.principle-grid > div,
.mcp-catalog section,
.roadmap section,
.discussion-question { background: var(--surface); }

.discussion-question.featured { background: var(--brand-soft); }

.table-wrap,
.role-shift-table {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.table-wrap table,
.role-shift-table table {
  border: 0;
}

.note {
  border-left-color: var(--brand);
}

.page-toc nav a:hover,
.page-toc nav a.active {
  border-left-color: var(--brand);
  color: var(--brand);
}

.toc-progress i {
  background: var(--brand);
}

.page-footer {
  border-top-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

body.dark .topbar {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

body.dark .hero-loop {
  border-color: #7477ff;
  box-shadow: 18px 18px 0 rgba(98, 101, 255, 0.14);
}

body.dark .loop-node {
  background: #fff;
  color: #0b0c12;
}

body.dark .opening-thesis {
  background: #393dff;
}

@media (max-width: 1320px) {
  :root {
    --sidebar-w: 264px;
  }

  .topbar {
    grid-template-columns: var(--sidebar-w) minmax(260px, 1fr) auto;
  }

  .shell {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }

  .page-toc {
    display: none;
  }

  .chapter {
    width: min(calc(100% - 56px), 960px);
  }

  #model-map.chapter {
    width: min(calc(100% - 48px), 1180px);
  }
}

@media (max-width: 1080px) {
  :root {
    --sidebar-w: 264px;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 14px;
  }

  .mobile-menu {
    display: inline-grid;
  }

  .brand {
    grid-column: 2;
  }

  .search-shell {
    display: none;
  }

  .top-actions {
    grid-column: 3;
  }

  .shell {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }

  .sidebar-scrim {
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: 60;
    background: rgba(0, 0, 0, 0.32);
  }

  body.menu-open .sidebar-scrim {
    display: block;
  }

  #main-content {
    width: 100%;
  }

  .page-toc {
    display: none;
  }

  .chapter {
    width: min(calc(100% - 64px), 920px);
  }

  #model-map.chapter {
    width: calc(100% - 40px);
  }

  .split-visual-chapter {
    grid-template-columns: minmax(240px, 0.52fr) minmax(0, 1.48fr);
    gap: 30px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 58px;
  }

  body {
    font-size: 17px;
  }

  body.presenter-window {
    padding: 18px;
  }

  .presenter-notes-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .presenter-notes-current {
    padding-top: 42px;
  }

  .presenter-note-copy-wrap {
    padding: 20px;
  }

  .presenter-next {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .topbar {
    min-height: var(--header-h);
    padding: 0 12px;
  }

  .brand-copy small,
  .mode-switch,
  .top-actions .icon-button {
    display: none;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .sidebar {
    width: min(86vw, 320px);
  }

  .chapter,
  body.presenting .chapter {
    width: min(calc(100% - 32px), 920px);
    padding: 64px 0 76px;
  }

  #model-map.chapter {
    width: calc(100% - 32px);
  }

  .split-visual-chapter,
  body.presenting .split-visual-chapter.present-active {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 26px;
  }

  .split-visual-chapter .chapter-header {
    padding: 24px 22px 26px;
  }

  .split-visual-chapter .chapter-header::after {
    margin-top: 22px;
  }

  .structured-header-chapter .chapter-header {
    display: block;
    margin-bottom: 30px;
    padding-bottom: 26px;
  }

  .structured-header-chapter .chapter-header .eyebrow {
    padding-top: 0;
  }

  .hero-chapter {
    min-height: 0;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .hero-grid,
  .definition-band,
  .two-col,
  .two-col.compact,
  .skill-anatomy,
  .evidence-figure,
  .memory-content {
    grid-template-columns: 1fr;
  }

  .hero-loop {
    width: 132px;
    box-shadow: 8px 8px 0 color-mix(in srgb, var(--brand) 12%, var(--line));
  }

  .hero-grid {
    gap: 12px;
  }

  .hero-copy h1 {
    margin-bottom: 12px;
    font-size: 41px;
    line-height: 1.12;
  }

  .hero-lead {
    margin-bottom: 14px;
    font-size: 16px;
    line-height: 1.72;
  }

  .hero-meta {
    gap: 8px 20px;
    padding-top: 12px;
  }

  .loop-node {
    width: 36px;
    height: 36px;
    gap: 2px;
  }

  .loop-node span {
    font-size: 7px;
  }

  .loop-node svg {
    width: 11px;
    height: 11px;
  }

  .loop-core img {
    width: 24px;
    height: 24px;
  }

  .loop-core span {
    display: none;
  }

  .node-a { inset: 6px auto auto 50%; }
  .node-b { inset: 50% 6px auto auto; }
  .node-c { inset: auto auto 6px 50%; }
  .node-d { inset: 50% auto auto 6px; }

  .opening-thesis {
    grid-template-columns: 34px 1fr;
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
  }

  .chapter-number {
    font-size: 24px;
  }

  .opening-thesis p {
    font-size: 15px;
    line-height: 1.65;
  }

  .timeline,
  .decision-row,
  .agent-loop,
  .principle-grid,
  .mcp-catalog,
  .roadmap,
  .roadmap-evidence-grid,
  .agent-role-roster,
  .solo-tech-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    border-top: 0;
  }

  .timeline-item,
  .timeline-item:first-child,
  .roadmap section,
  .roadmap section:first-child {
    min-height: auto;
    border: 1px solid var(--line);
    border-bottom: 0;
  }

  .timeline-item:last-child,
  .roadmap section:last-child {
    border-bottom: 1px solid var(--line);
  }

  .agent-role-roster {
    border-right: 1px solid var(--line-strong);
  }

  .agent-role-card {
    min-height: 0;
    padding: 16px;
  }

  .agent-role-card p { min-height: 0; }

  .solo-project-contract {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 22px 0 30px;
    padding: 18px;
  }

  .solo-phase {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-height: 0;
    padding: 16px;
  }

  .solo-phase aside {
    grid-column: 2;
    grid-template-columns: auto 1fr;
    gap: 5px 8px;
    padding: 8px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .solo-phase aside b { grid-column: 1 / -1; }

  .solo-project-feedback {
    align-items: flex-start;
    margin-bottom: 30px;
  }

  .solo-tech-card { min-height: 350px; }

  .solo-contract-strip {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .solo-contract-strip > svg:last-child { display: none; }

  .solo-contract-strip > div:last-child {
    grid-column: 2;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .timeline-item::before,
  .roadmap section::before {
    display: none;
  }

  .contrast-strip,
  .before-after {
    grid-template-columns: 1fr;
  }

  .contrast-strip > svg,
  .before-after > svg {
    margin-inline: auto;
    transform: rotate(90deg);
  }

  .engineering-map-heading,
  .engineering-ai-intro,
  .engineering-role-flow-heading {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }

  .engineering-project-lanes,
  .engineering-ai-flow,
  .engineering-role-flow-track {
    grid-template-columns: 1fr;
  }

  .engineering-project-lanes > section {
    min-height: auto;
  }

  .engineering-assets-lane {
    border-block: 1px solid var(--line);
    border-inline: 0;
  }

  .engineering-lane-arrow,
  .engineering-ai-flow > svg,
  .engineering-role-arrow {
    width: 18px;
    height: 48px;
    margin-inline: auto;
    transform: rotate(90deg);
  }

  .engineering-role-flow {
    padding: 18px;
  }

  .engineering-role-step {
    min-height: 0;
  }

  .engineering-ai-intro h3 {
    font-size: 22px;
  }

  .engineering-ai-flow > section {
    min-height: 136px;
  }

  .editor-mock pre {
    font-size: 12px;
  }

  .duet-lane {
    grid-template-columns: 1fr;
  }

  .duet-lane > svg {
    margin-inline: auto;
    transform: rotate(90deg);
  }

  .scenario-matrix,
  .risk-table {
    grid-template-columns: 1.2fr 0.8fr 1fr;
    overflow-x: auto;
  }

  .feature-row {
    grid-template-columns: 28px 32px 1fr;
  }

  .feature-row code {
    grid-column: 3;
    justify-self: start;
  }

  .mcp-architecture {
    grid-template-columns: 1fr;
  }

  .mcp-wire {
    min-height: 54px;
  }

  .mcp-wire svg {
    transform: rotate(90deg);
  }

  .evidence-figure figcaption {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .lesson-visual {
    overflow-x: auto;
  }

  .lesson-visual img,
  body.presenting .lesson-visual img {
    width: 920px;
    max-width: none;
    max-height: none;
  }

  .split-visual-chapter .lesson-visual,
  .agents-practice-grid .lesson-visual,
  .roadmap-evidence-grid .lesson-visual {
    overflow: hidden;
  }

  .split-visual-chapter .lesson-visual img,
  body.presenting .split-visual-chapter .lesson-visual img,
  .agents-practice-grid .lesson-visual img,
  body.presenting .agents-practice-grid .lesson-visual img,
  .roadmap-evidence-grid .lesson-visual img,
  body.presenting .roadmap-evidence-grid .lesson-visual img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .lesson-visual figcaption {
    position: sticky;
    left: 0;
    grid-template-columns: 1fr;
    width: calc(100vw - 34px);
    gap: 6px;
  }

  .split-visual-chapter .lesson-visual figcaption,
  .agents-practice-grid .lesson-visual figcaption,
  .roadmap-evidence-grid .lesson-visual figcaption {
    position: static;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .agents-practice-grid {
    grid-template-columns: 1fr;
  }

  .sync-diagram {
    grid-template-columns: 1fr;
  }

  .sync-action svg {
    transform: rotate(90deg);
  }

  .memory-origin,
  .gate-pipeline {
    grid-template-columns: 1fr;
  }

  .memory-origin > svg,
  .gate-pipeline > svg {
    margin-inline: auto;
    transform: rotate(90deg);
  }

  .memory-origin > div {
    min-height: auto;
  }

  .memory-origin span {
    margin-bottom: 18px;
  }

  .memory-index {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .memory-index button {
    border-right: 1px solid var(--line);
  }

  .memory-panel {
    padding: 28px 22px;
  }

  .sdlc-flow {
    grid-template-columns: 1fr;
  }

  .sdlc-system-map {
    margin-bottom: 36px;
    overflow-x: auto;
  }

  .sdlc-system-map img {
    width: 980px;
    max-width: none;
  }

  .sdlc-system-map figcaption {
    position: sticky;
    left: 0;
    grid-template-columns: 1fr;
    width: calc(100vw - 34px);
  }

  .sdlc-system-map > .image-expand {
    position: sticky;
    left: calc(100vw - 66px);
    float: left;
    margin-bottom: -44px;
  }

  .image-preview-header {
    padding: 12px 14px;
  }

  .image-preview-title {
    font-size: 12px;
  }

  .image-preview-stage img {
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 154px);
  }

  .image-preview-nav {
    top: auto;
    bottom: 8px;
    width: 42px;
    height: 42px;
    transform: none;
  }

  .image-preview-nav.previous {
    left: 14px;
  }

  .image-preview-nav.next {
    right: 14px;
  }

  .image-preview-toolbar {
    margin: 8px 12px 14px;
  }

  .image-preview-toolbar button {
    width: 38px;
    height: 38px;
  }

  .image-preview-scale {
    width: 48px;
  }

  .document-output {
    grid-template-columns: repeat(2, 1fr);
  }

  .artifact-chain {
    flex-direction: column;
  }

  .artifact-chain svg {
    transform: rotate(90deg);
  }

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

  .discussion-question {
    min-height: auto;
    padding: 24px 22px;
  }

  .discussion-question h3 {
    margin-top: 22px;
  }

  .source-list a {
    grid-template-columns: 90px 1fr 18px;
  }

  .presentation-controls {
    right: 10px;
    bottom: 10px;
  }
}

@media (max-width: 760px) {
  .agent-showcase {
    margin-top: 40px;
    padding-top: 26px;
  }

  .agent-showcase-header {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
  }

  .agent-showcase-header h3 {
    font-size: 26px;
  }

  .agent-showcase-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .agent-showcase-card {
    min-height: 194px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .agent-showcase-card,
  .agent-card-top,
  .agent-showcase-card strong,
  .agent-showcase-card p,
  .agent-card-foot {
    transform: none !important;
    transition: none !important;
  }
}
