/* Circle-and-line graph marks. Ink, paper, night. No metallic, no glow. */

:root {
  --paper: #f8f9fa;
  --ink: #0f172a;
  --mute: #64748b;
  --line: #cbd5e1;
  --cite: #0284c7;
  --ignition: #ea580c;
  --night: #0c0d0e;
  --night-ink: #f8fafc;
  --night-mute: #8492a6;
  --night-line: #282d34;
  --font-d: "Chakra Petch", sans-serif;
  --font-b: Inter, system-ui, sans-serif;
  --font-m: "JetBrains Mono", ui-monospace, monospace;
  --stage: 1440px;
  --stage-machine: 1600px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-b);
  background: #d0d0d0;
  color: var(--ink);
  line-height: 1.4;
}
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  padding: 10px 16px;
  background: #111; color: #eee;
  font-family: var(--font-m); font-size: 12px;
  border-bottom: 1px solid #333;
}
.bar a { color: #ddd; }
.bar strong { margin-right: 6px; }
@media (max-width: 820px) {
  .bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px 12px;
    padding: 8px 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .bar::-webkit-scrollbar { display: none; }
  .bar a, .bar strong, .bar-theme { flex: 0 0 auto; white-space: nowrap; }
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 80px; }
h1 {
  font-family: var(--font-d);
  font-size: 28px; font-weight: 700; margin: 0 0 8px;
}
.lede { color: #333; max-width: 46em; margin: 0 0 28px; }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--paper);
  border: 1px solid #222;
  padding: 16px 16px 8px;
}
.card h2 {
  font-family: var(--font-d);
  font-size: 16px;
  margin: 0 0 4px;
}
.card p { margin: 0 0 12px; font-size: 13px; color: var(--mute); }
.card svg { width: 100%; height: auto; display: block; }
.sheet {
  background: var(--paper);
  border: 1px solid #222;
  margin: 0 0 20px;
  padding: 24px;
}
.sheet.night {
  background: var(--night);
  color: var(--night-ink);
}
.sheet.night p, .sheet.night .kicker { color: var(--night-mute); }
.sheet.flush { padding: 0; overflow: hidden; }
.kicker {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 8px;
}
.sheet h1 { font-size: 24px; }
.row {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: end;
  margin: 20px 0;
}
.sz { text-align: center; }
.sz span {
  display: block;
  font-family: var(--font-m); font-size: 10px; color: var(--mute); margin-top: 6px;
}
.sz svg { display: block; margin: 0 auto; }
.diagram svg { width: 100%; height: auto; display: block; }
.note { font-size: 14px; max-width: 40em; }
.use {
  font-family: var(--font-m); font-size: 12px; margin: 16px 0 0;
}

/* In-situ landing band */
.insitu {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px 40px;
  align-items: center;
  padding: 40px 36px;
  min-height: 280px;
}
.insitu h2 {
  font-family: var(--font-d);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.15;
}
.insitu p { margin: 0; max-width: 32em; font-size: 15px; color: var(--mute); }
.sheet.night .insitu p { color: var(--night-mute); }
.insitu .copy { position: relative; z-index: 1; }
.crop {
  position: relative;
  overflow: hidden;
  min-height: 300px;
}
.crop .copy {
  position: relative;
  z-index: 1;
  max-width: 28em;
  padding: 48px 40px;
}
.crop .ornament {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: 62%;
  pointer-events: none;
}
.crop .ornament svg { width: 100%; height: auto; display: block; }

/* Interactive nodes */
[data-node] { cursor: pointer; }
[data-node]:focus { outline: none; }
[data-node] circle {
  transition: stroke 180ms cubic-bezier(0.33, 0, 0.2, 1),
    fill 180ms cubic-bezier(0.33, 0, 0.2, 1);
}
[data-edge] {
  transition: stroke 180ms cubic-bezier(0.33, 0, 0.2, 1);
}
[data-node]:hover circle:not(.core):not(.band-inner):not(.band-outer),
[data-node]:focus-visible circle:not(.core):not(.band-inner):not(.band-outer) { stroke: var(--cite); }
[data-node].is-on circle:not(.core):not(.band-inner):not(.band-outer) { stroke: var(--cite); }
[data-node]:hover .core,
[data-node]:focus-visible .core,
[data-node].is-on .core { fill: var(--cite); }
[data-node]:hover .band-outer,
[data-node].is-on .band-outer { fill: var(--cite); }
[data-edge] { stroke-linecap: butt; }
[data-edge].is-on { stroke: var(--cite); }

/* Hide connectors inside nodes: paint the disk, then stroke. */
.sheet svg circle:not(.core):not(.band-outer):not(.band-inner) {
  fill: var(--paper);
}
.sheet.night svg circle:not(.core):not(.band-outer):not(.band-inner) {
  fill: var(--night);
}
.card svg circle:not([fill]) {
  fill: var(--paper);
}
.card .band-outer { fill: var(--ink); }
.card .band-inner { fill: var(--paper); }
.band-outer { fill: var(--ink); stroke: none; }
.band-inner { fill: var(--paper); stroke: none; }
.sheet.night .band-outer { fill: var(--night-ink); }
.sheet.night .band-inner { fill: var(--night); }

.legend {
  display: flex; flex-wrap: wrap; gap: 18px 28px;
  align-items: center;
  font-family: var(--font-m); font-size: 12px; color: var(--mute);
  margin: 0 0 24px;
}
.legend span { display: flex; align-items: center; gap: 8px; }
.legend svg { display: block; }

/* Node construction catalog */
.const {
  font-family: var(--font-m);
  font-size: 12px;
  line-height: 1.55;
  color: var(--mute);
  max-width: 52em;
  margin: 0 0 16px;
}
.opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.opt {
  border: 1px solid #cbd5e1;
  padding: 12px 12px 10px;
  background: #fff;
}
.sheet.night .opt {
  background: #141518;
  border-color: #2a3038;
}
.sheet.night .opt h3 { color: #e2e8f0; }
.opt.other { border-style: dashed; }
.opt h3 {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0 0 2px;
}
.opt .meta {
  font-family: var(--font-m);
  font-size: 10px;
  color: var(--mute);
  margin: 0 0 8px;
  min-height: 2.6em;
}
.opt .why {
  font-size: 13px;
  margin: 8px 0 0;
  color: #334155;
}
.sheet.night .opt .why { color: var(--night-mute); }
.opt .mark {
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.opt .mark svg { width: 160px; height: 160px; display: block; }
.opt .sizes {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}
.sheet.night .opt .sizes { border-top-color: #2a3038; }
.lineup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 4px;
  align-items: end;
  justify-content: space-between;
}
.lineup .sz { flex: 1; min-width: 72px; }
@media (max-width: 900px) { .opts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .opts { grid-template-columns: 1fr; } }

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .insitu { grid-template-columns: 1fr; padding: 28px 20px; }
  .crop .ornament { width: 90%; right: -20%; opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  [data-node] circle,
  [data-edge] { transition: none; }
}
