:root {
  --bg: #f7f7f4;
  --ink: #111;
  --muted: #666;
  --line: #d7d7d2;
  --panel: #fff;
  --dark: #111;
  --dark-2: #1c1c1c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; gap: 2rem; align-items: center; padding: 1rem max(1rem, calc((100vw - 1240px)/2)); background: rgba(247,247,244,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.brand { font-size: 1.55rem; font-weight: 900; text-decoration: none; letter-spacing: -.04em; white-space: nowrap; }
.dot { opacity: .35; }
nav { display: flex; flex-wrap: wrap; gap: .85rem 1.2rem; font-size: .82rem; }
nav a { text-decoration: none; color: #333; }
main, footer { max-width: 1240px; margin: auto; }
.hero { padding: 7rem 1.25rem 4rem; }
.eyebrow, .section-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
h1 { font-size: clamp(3.2rem, 8vw, 7rem); line-height: .92; letter-spacing: -.06em; max-width: 1000px; margin: 1.2rem 0; }
h2 { font-size: clamp(2rem, 4vw, 4rem); line-height: 1; letter-spacing: -.045em; margin: .7rem 0 1.2rem; }
h3 { margin: .35rem 0 .65rem; }
.lead { font-size: clamp(1.35rem, 2vw, 2rem); max-width: 850px; }
.hero > p:not(.lead) { max-width: 850px; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .7rem 1rem; border: 1px solid currentColor; text-decoration: none; background: transparent; cursor: pointer; font: inherit; }
.button.primary { background: #111; color: #fff; border-color: #111; }
.status-strip { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: center; border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 3.5rem; }
.status-key { font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.status-note { color: var(--muted); }
.badge { display: inline-block; padding: .22rem .5rem; border: 1px solid; font-size: .72rem; font-weight: 800; letter-spacing: .05em; }
.badge.warn { background: #fff4ce; }
.badge.info { background: #e8f0ff; }
.badge.neutral { background: #f0f0ed; color: #555; }
.panel { margin: 1.2rem; padding: clamp(2rem, 5vw, 5rem); background: var(--panel); border: 1px solid var(--line); }
.panel > p { max-width: 900px; }
.inverse { background: var(--dark); color: #fff; border-color: var(--dark); }
.inverse .section-kicker, .inverse .muted { color: #aaa; }
.inverse .button { color: #fff; }
.effect-card, .decision-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin-top: 2rem; }
.effect-card > div, .decision-grid > div { padding: 1rem; min-width: 0; border-right: 1px solid var(--line); }
.effect-card > div:last-child, .decision-grid > div:last-child { border-right: 0; }
.effect-card span, .decision-grid span { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .4rem; }
.flowline { display: flex; align-items: center; gap: .65rem; overflow-x: auto; padding: 2rem 0 .25rem; white-space: nowrap; }
.flowline div { border: 1px solid var(--line); padding: .65rem .8rem; }
.challenge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: 2rem; }
.challenge-card { display: flex; min-height: 170px; flex-direction: column; justify-content: space-between; border: 1px solid #444; padding: 1rem; background: var(--dark-2); }
.challenge-card p { color: #bdbdbd; font-size: .9rem; }
.challenge-card button { width: 100%; }
.result { margin-top: 1.5rem; padding: 1.2rem; border: 1px solid #444; background: #171717; }
.result-head { display: flex; gap: 1rem; justify-content: space-between; align-items: start; }
.result-head h3 { word-break: break-all; }
.decision-grid { border-color: #444; }
.decision-grid > div { border-color: #444; }
.decision-grid code { word-break: break-all; font-size: .72rem; }
.surface-results { display: grid; grid-template-columns: repeat(5, 1fr); gap: .65rem; margin-top: .8rem; }
.surface-result { padding: .8rem; border: 1px solid #444; }
.surface-result span { display: block; color: #aaa; font-size: .72rem; text-transform: uppercase; }
.surface-result strong { display: block; font-size: 1.2rem; margin: .25rem 0; }
.folder-tree pre { overflow-x: auto; padding: 1rem; background: #f0f0ed; border: 1px solid var(--line); }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .75rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
.architecture { display: grid; max-width: 760px; margin: 2rem auto; }
.arch-box { padding: 1.2rem; border: 2px solid #111; text-align: center; }
.arch-box span { display: block; color: var(--muted); margin-top: .3rem; }
.arch-arrow { text-align: center; font-size: 1.6rem; padding: .35rem; }
.note { color: var(--muted); border-left: 3px solid #111; padding-left: 1rem; }
.five-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; margin: 2rem 0; }
.five-grid article, .hardware-grid article, .context-grid article { border: 1px solid var(--line); padding: 1rem; }
.five-grid article span { font-size: .7rem; color: var(--muted); letter-spacing: .08em; }
.hardware-grid, .context-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 2rem; }
.context-grid { grid-template-columns: repeat(4, 1fr); }
footer { padding: 3rem 1.25rem 5rem; color: #555; font-size: .85rem; }
footer p { max-width: 900px; }
@media (max-width: 950px) {
  .topbar { align-items: flex-start; }
  nav { display: none; }
  .effect-card, .decision-grid { grid-template-columns: repeat(2, 1fr); }
  .effect-card > div:nth-child(2), .decision-grid > div:nth-child(2) { border-right: 0; }
  .effect-card > div:nth-child(-n+2), .decision-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .challenge-grid { grid-template-columns: repeat(2, 1fr); }
  .five-grid { grid-template-columns: repeat(2, 1fr); }
  .surface-results { grid-template-columns: repeat(2, 1fr); }
  .hardware-grid, .context-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .hero { padding-top: 4rem; }
  .panel { margin: .55rem; padding: 1.25rem; }
  .effect-card, .decision-grid, .challenge-grid, .five-grid, .surface-results, .hardware-grid, .context-grid { grid-template-columns: 1fr; }
  .effect-card > div, .decision-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .effect-card > div:last-child, .decision-grid > div:last-child { border-bottom: 0; }
  .result-head { flex-direction: column; }
}
