:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #5d6862;
  --paper: #f4f6f1;
  --line: #cbd3cc;
  --accent: #1b6e53;
  --accent-soft: #dcebe3;
  --signal: #d4623d;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 33, 28, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 28, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  min-height: 100vh;
}

a { color: inherit; }

.site-header,
main,
footer {
  width: min(1100px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font: 800 19px/1 ui-monospace, "Cascadia Mono", monospace;
  text-decoration: none;
}

nav { display: flex; gap: 26px; }
nav a, footer a { color: var(--muted); font-size: 14px; text-decoration: none; }
nav a:hover, nav a.active, footer a:hover, footer a.active { color: var(--accent); }

.intro { padding: 96px 0 68px; max-width: 860px; }
.eyebrow { margin: 0 0 16px; color: var(--accent); font: 700 12px/1.2 ui-monospace, "Cascadia Mono", monospace; text-transform: uppercase; }
h1 { margin: 0; max-width: 880px; font-size: clamp(42px, 7vw, 78px); line-height: 1.02; font-weight: 760; }
.lead { max-width: 710px; margin: 28px 0 0; color: var(--muted); font-size: 19px; line-height: 1.65; }

.signal-map {
  display: grid;
  grid-template-columns: 1fr minmax(90px, .55fr) 1fr minmax(90px, .55fr) 1fr;
  align-items: center;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .58);
}

.node { min-height: 128px; padding: 18px; display: grid; align-content: space-between; border-left: 3px solid var(--accent); background: #fff; }
.node span, .node small, .date { color: var(--muted); font: 600 11px/1.35 ui-monospace, "Cascadia Mono", monospace; }
.node strong { font-size: 22px; }
.path { position: relative; color: var(--signal); text-align: center; }
.path i { display: block; border-top: 2px dashed currentColor; }
.path em { display: inline-block; margin-top: 10px; font: normal 700 11px/1 ui-monospace, "Cascadia Mono", monospace; }

.notes { padding: 92px 0 70px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--ink); }
.section-heading h2 { margin: 0 0 16px; font-size: 28px; }
.section-heading span { color: var(--muted); font-size: 13px; }
.notes article { display: grid; grid-template-columns: 150px 1fr 1.1fr; gap: 34px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.notes article h3 { margin: 0; font-size: 20px; }
.notes article p:last-child { margin: 0; color: var(--muted); line-height: 1.65; }

.article-page { padding: 84px 0 120px; }
.article-page.narrow { max-width: 820px; }
.article-page h1 { font-size: clamp(40px, 6vw, 66px); }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 64px; background: var(--line); border: 1px solid var(--line); }
.method-grid section { min-height: 250px; padding: 26px; background: rgba(255, 255, 255, .78); }
.method-grid span { color: var(--signal); font: 700 12px/1 ui-monospace, monospace; }
.method-grid h2, .prose h2 { margin: 46px 0 12px; font-size: 22px; }
.method-grid p, .prose p { color: var(--muted); line-height: 1.7; }
.prose { margin-top: 58px; padding-top: 1px; border-top: 1px solid var(--line); }
.not-found { display: grid; align-content: center; min-height: calc(100vh - 156px); }
.not-found h1 { font-size: clamp(40px, 6vw, 66px); }
.not-found > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.back-link { width: fit-content; margin-top: 24px; color: var(--accent); font-weight: 700; }

footer { min-height: 80px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(100% - 28px, 1100px); }
  .site-header { align-items: flex-start; flex-direction: column; justify-content: center; gap: 14px; padding: 16px 0; }
  nav { width: 100%; gap: 18px; overflow-x: auto; padding-bottom: 2px; }
  .intro { padding: 64px 0 46px; }
  h1 { font-size: 44px; }
  .signal-map { grid-template-columns: 1fr; }
  .path { min-height: 54px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
  .path i { transform: rotate(90deg); width: 48px; justify-self: center; }
  .path em { margin: 0; }
  .notes { padding-top: 64px; }
  .notes article { grid-template-columns: 1fr; gap: 10px; }
  .method-grid { grid-template-columns: 1fr; }
}
