/* not-this-but-that — visual language ported from the graphgeometry
   explainer. Cream background, serif body, sans for UI/labels/code, white
   panel cards on hairlines, restrained warm accent. */

:root {
  --bg: #faf8f3;
  --panel: #ffffff;
  --ink: #1a1a1a;
  --muted: #555;
  --faint: #888;
  --hairline: #e6e1d4;
  --pill-bg: #f0eee6;
  --accent: #c46a1f;            /* warm orange */
  --accent-soft: rgba(196, 106, 31, 0.10);
  --neo: #4a6fa5;
  --neo-soft: rgba(74, 111, 165, 0.10);
  --support: #2c8a4a;           /* green: clean / kept */
  --oppose:  #b73c2a;           /* red: construction / ablated */
  --hot:     #c69116;           /* mustard: firing now */
  --gold-soft: rgba(198, 145, 22, 0.18);
  --red-soft:  rgba(183, 60, 42, 0.12);
  --green-soft: rgba(44, 138, 74, 0.12);
  --serif: "Iowan Old Style", "Charter", "Georgia", "Cambria", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-size: 18px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; }

/* ──────────────── header ──────────────── */
header.site {
  max-width: 1100px; margin: 0 auto; padding: 28px 36px 18px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--hairline); }
header.site .brand { font-family: var(--sans); font-weight: 600; color: var(--ink); font-size: 14px; }
header.site .brand .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 6px; vertical-align: middle; }
header.site .credit { justify-self: end; font-family: var(--sans); font-size: 12px; color: var(--faint); }

.mode-switch { justify-self: center; display: inline-flex; gap: 0;
  background: var(--panel); border: 1px solid var(--hairline); border-radius: 24px; padding: 3px; }
.mode-switch a { font-family: var(--sans); font-size: 13px; color: var(--muted);
  text-decoration: none; padding: 6px 16px; border-radius: 20px; }
.mode-switch a:hover { color: var(--ink); }
.mode-switch a.active { background: var(--ink); color: white; font-weight: 500; }

/* ──────────────── article header (story page) ──────────────── */
.article-head { max-width: 760px; margin: 0 auto; padding: 56px 36px 30px; }
.kicker { font-family: var(--sans); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 18px; font-weight: 500; }
h1 { font-size: 44px; letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 24px;
  font-weight: 600; font-family: var(--serif); }
p.dek { font-size: 22px; color: var(--muted); line-height: 1.5; margin: 0 0 18px;
  font-family: var(--serif); }
p.dek em { font-style: italic; color: var(--ink); }
.status-line { font-family: var(--sans); font-size: 12.5px; margin-top: 8px; }
.status-pill { display: inline-block; padding: 4px 11px; border-radius: 12px;
  background: var(--pill-bg); color: var(--muted); }
.status-pill[data-status="up"]   { background: var(--green-soft); color: var(--support); }
.status-pill[data-status="down"] { background: var(--red-soft); color: var(--oppose); }
.status-pill[data-status="load"] { background: var(--gold-soft); color: var(--hot); }

/* ──────────────── sections ──────────────── */
.panel { max-width: 1100px; margin: 0 auto; padding: 32px 36px 50px;
  border-top: 1px solid var(--hairline); background: var(--bg); }
.panel.narrow { max-width: 760px; }
.panel h2 { font-size: 28px; letter-spacing: -0.01em; margin: 8px 0 18px;
  font-weight: 600; line-height: 1.2; font-family: var(--serif); }
.panel h3 { font-family: var(--sans); font-size: 13px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 22px 0 10px; }
.panel p { margin: 0 0 16px; }
.panel p em { font-style: italic; }
.panel p strong { font-weight: 600; }
.panel code, code { font-family: var(--mono); font-size: 14px; background: var(--pill-bg);
  padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.panel a { color: var(--accent); text-decoration: underline;
  text-decoration-color: rgba(196, 106, 31, 0.35); text-underline-offset: 2px; }

p.aside { background: var(--panel); border-left: 3px solid var(--accent);
  padding: 18px 22px; margin: 22px 0; font-family: var(--serif); font-size: 17px;
  color: var(--muted); line-height: 1.55; }
p.aside strong { color: var(--ink); }

/* numbered steps */
ol.numbered { list-style: none; counter-reset: step; padding: 0; margin: 22px 0; }
ol.numbered > li { counter-increment: step; padding: 12px 0 12px 56px;
  position: relative; border-bottom: 1px solid var(--hairline); font-size: 17px; }
ol.numbered > li:last-child { border-bottom: none; }
ol.numbered > li::before { content: counter(step); position: absolute; left: 0; top: 12px;
  width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: white;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; }

/* ──────────────── headline stats ──────────────── */
.headline-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin: 22px 0 18px; }
.headline-stat { background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 18px 18px 16px; position: relative; }
.headline-stat::before { content: ""; position: absolute; top: 0; left: 18px; right: 18px;
  height: 3px; background: var(--accent); border-radius: 2px; }
.headline-stat .kicker { margin-bottom: 8px; }
.headline-stat .name { font-family: var(--sans); font-size: 14px; font-weight: 600;
  margin-bottom: 14px; color: var(--ink); }
.headline-stat .big { font-family: var(--serif); font-size: 30px; font-weight: 600;
  line-height: 1; margin: 6px 0; }
.headline-stat .big .arrow { display: inline-block; color: var(--faint); margin: 0 8px;
  font-size: 22px; }
.headline-stat .big .after { color: var(--accent); }
.headline-stat .foot { font-family: var(--sans); font-size: 12px; color: var(--muted);
  margin-top: 10px; line-height: 1.5; }

/* ──────────────── layer table ──────────────── */
.layer-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-family: var(--sans); font-size: 14px; }
.layer-table th, .layer-table td { padding: 10px 14px; text-align: right;
  border-bottom: 1px solid var(--hairline); }
.layer-table th { color: var(--faint); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.05em; text-align: right; }
.layer-table th.label, .layer-table td.label { text-align: left; }
.layer-table td.label { color: var(--ink); font-weight: 500; }
.layer-table tr.highlight td { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.layer-table tr.highlight td.label { color: var(--accent); }
.layer-table .num { font-family: var(--mono); }

/* ──────────────── coalition list ──────────────── */
.coalition-list { margin: 14px 0; font-family: var(--sans); font-size: 14px; }
.coalition-list .feat { display: grid; grid-template-columns: 70px 1fr 100px; gap: 12px;
  padding: 8px 12px; border-radius: 4px; align-items: baseline; border-bottom: 1px solid var(--hairline); }
.coalition-list .feat:last-child { border-bottom: none; }
.coalition-list .feat.indispensable { background: var(--gold-soft); border-left: 3px solid var(--hot);
  margin-left: -3px; padding-left: 9px; }
.coalition-list .feat .idx { font-family: var(--mono); color: var(--ink); font-weight: 600; }
.coalition-list .feat .lbl { color: var(--muted); font-style: italic; }
.coalition-list .feat .cost { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }
.coalition-list .feat.indispensable .cost { color: var(--hot); font-weight: 600; }

/* ──────────────── examples (story) ──────────────── */
.example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px; margin: 18px 0; }
.example-card { background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 14px 16px; cursor: pointer; transition: border-color .15s; }
.example-card:hover { border-color: var(--accent); }
.example-card.active { border-color: var(--accent); background: var(--accent-soft); }
.example-card .ck { font-family: var(--sans); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--faint); font-weight: 600; }
.example-card .pp { font-family: var(--sans); font-size: 14px; margin-top: 5px; color: var(--ink); }
.example-card .mt { font-family: var(--sans); font-size: 11px; color: var(--faint); margin-top: 6px; }

.intervention-row { display: flex; gap: 8px; margin: 12px 0 16px; flex-wrap: wrap; align-items: center;
  font-family: var(--sans); font-size: 13px; }
.intervention-row .lbl { color: var(--muted); }
.btn-chip { font-family: var(--sans); font-size: 13px; background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 16px; padding: 5px 13px; cursor: pointer;
  color: var(--muted); transition: all .12s; }
.btn-chip:hover { color: var(--ink); border-color: var(--muted); }
.btn-chip.on { background: var(--accent); border-color: var(--accent); color: white; font-weight: 500; }
.btn-chip.danger { color: var(--oppose); }
.btn-chip.danger:hover { border-color: var(--oppose); }

/* side-by-side playback (story) */
.playback { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.playback .col { background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 14px 16px; min-height: 200px; }
.playback .col .ck { font-family: var(--sans); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--faint); font-weight: 600; }
.playback .col .name { font-family: var(--sans); font-size: 14px; font-weight: 600;
  margin: 5px 0 10px; }
.playback .col .name.baseline { color: var(--muted); }
.playback .col .name.ablated { color: var(--accent); }
.playback .col .text { font-family: var(--mono); font-size: 13px; line-height: 1.55;
  white-space: pre-wrap; min-height: 130px; color: var(--ink); }
.playback .col .text .construction { background: var(--red-soft); color: var(--oppose);
  padding: 1px 3px; border-radius: 2px; font-weight: 500; }
.playback .col .verdict { font-family: var(--sans); font-size: 12px; margin-top: 12px; }
.playback .col .verdict.hit { color: var(--oppose); }
.playback .col .verdict.clean { color: var(--support); }

.run-row { display: flex; gap: 14px; align-items: center; margin: 8px 0 4px;
  font-family: var(--sans); font-size: 13px; color: var(--muted); }
button.go { background: var(--accent); color: white; border: 0; padding: 8px 18px;
  font-family: var(--sans); font-weight: 500; font-size: 14px; border-radius: 4px; cursor: pointer; }
button.go:hover { background: #a35614; }
button.go:disabled { opacity: 0.4; cursor: wait; }
.run-row input[type="range"], .run-row input[type="number"] {
  background: var(--panel); color: var(--ink); border: 1px solid var(--hairline);
  border-radius: 3px; padding: 3px 6px; font: inherit; }

/* ──────────────── feature cloud (shared by story + playground) ──────────────── */
.map-stage { position: relative; height: 520px; background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 6px; overflow: hidden; margin: 16px 0; }
.map-stage canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.map-hud { position: absolute; top: 12px; left: 16px; background: rgba(255,255,255,0.92);
  border: 1px solid var(--hairline); padding: 5px 11px; border-radius: 4px;
  font-family: var(--sans); font-size: 11.5px; color: var(--muted); pointer-events: none; }
.map-hud strong { color: var(--ink); }
.map-note { position: absolute; top: 50px; left: 16px; max-width: 360px;
  background: rgba(255,255,255,0.94); border: 1px solid var(--hairline);
  padding: 6px 10px; border-radius: 4px; font-family: var(--sans);
  font-size: 11.5px; line-height: 1.35; color: var(--muted);
  pointer-events: none; opacity: 0.92; }
.map-legend { position: absolute; bottom: 12px; left: 16px; background: rgba(255,255,255,0.92);
  border: 1px solid var(--hairline); padding: 8px 12px; border-radius: 4px;
  font-family: var(--sans); font-size: 11.5px; color: var(--muted); line-height: 1.65; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle; }
#tip { position: absolute; padding: 8px 11px; background: rgba(255,255,255,0.97);
  border: 1px solid var(--hairline); border-radius: 5px; font-family: var(--sans);
  font-size: 12px; width: min(360px, calc(100% - 24px)); color: var(--ink); box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  pointer-events: none; display: none; z-index: 100; line-height: 1.45; overflow-wrap: anywhere; }
#tip .idx { color: var(--accent); font-weight: 600; }
#tip .lbl { display: block; margin-top: 2px; }
#tip .meta { color: var(--faint); font-size: 11px; margin-top: 4px; }
#tip .tip-actions { display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 5px; }
#tip .tip-actions span { white-space: nowrap; }

/* ──────────────── Neo4j callout panel ──────────────── */
.neo-panel { background: linear-gradient(180deg, rgba(74,111,165,0.06), rgba(74,111,165,0.02));
  border: 1px solid rgba(74,111,165,0.25); border-radius: 8px; padding: 22px 26px; margin: 20px 0; }
.neo-panel h3 { color: var(--neo); margin: 0 0 12px; font-family: var(--sans);
  font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; }
.neo-panel h3::before { content: ""; }
.neo-panel ul { padding-left: 18px; color: var(--muted); margin: 8px 0; }
.neo-panel ul li { margin: 6px 0; }
.neo-panel ul li code { color: var(--neo); }
.neo-panel .split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 6px; }
.neo-panel .split h4 { font-family: var(--sans); font-size: 13px; margin: 0 0 8px;
  color: var(--ink); font-weight: 600; }

.neo-tag { display: inline-flex; align-items: center; gap: 4px;
  background: var(--neo-soft); color: var(--neo); border: 1px solid rgba(74,111,165,0.25);
  padding: 1px 7px; border-radius: 10px; font-family: var(--sans); font-size: 11px;
  font-weight: 500; vertical-align: middle; }
.neo-tag::before { content: ""; }

/* ──────────────── three-demos cards (story mode) ──────────────── */
.demo-card { border: 1px solid var(--hairline); border-radius: 10px;
  padding: 22px 26px; margin: 22px 0; background: #fff; }
.demo-card-head { display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }
.demo-card-num { font-family: var(--sans); font-size: 11px; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
  background: var(--accent-soft); padding: 2px 8px; border-radius: 4px;
  flex-shrink: 0; }
.demo-card-head h3 { margin: 0; font-family: var(--serif, Georgia, serif);
  font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em;
  text-transform: none; }
.demo-card p { margin: 0 0 12px; }
.demo-card-foot { margin-top: 14px !important; padding-top: 14px;
  border-top: 1px dashed var(--hairline); font-size: 14px; color: var(--muted); }
.demo-card-foot a { color: var(--accent); text-decoration: none;
  border-bottom: 1px solid var(--accent); padding-bottom: 1px;
  font-family: var(--sans); font-weight: 500; font-size: 13px; margin-left: 6px; }
.demo-card-foot a:hover { color: var(--accent); border-bottom-width: 2px; }
.cypher-block { background: rgba(74,111,165,0.06);
  border-left: 3px solid var(--neo); border-radius: 0 4px 4px 0;
  padding: 10px 14px; margin: 12px 0; font-family: var(--mono); font-size: 12.5px;
  color: var(--ink); line-height: 1.5; overflow-x: auto;
  white-space: pre-wrap; word-break: keep-all; }

/* ──────────────── footer ──────────────── */
footer { max-width: 760px; margin: 36px auto 80px; padding: 28px 36px 0;
  font-family: var(--sans); font-size: 13px; color: var(--faint);
  border-top: 1px solid var(--hairline); }
footer code { font-family: var(--mono); font-size: 11.5px; }
footer a { color: var(--muted); text-decoration: underline;
  text-decoration-color: var(--hairline); }

/* ──────────────── PLAYGROUND ──────────────── */
.pg-shell {
  --accent: #a85d39;
  --accent-soft: rgba(168, 93, 57, 0.12);
  --neo: #526f9f;
  --neo-soft: rgba(82, 111, 159, 0.12);
  --support: #587f89;
  --hot: #d68524;
  --gold-soft: rgba(214, 133, 36, 0.18);
  max-width: none;
  margin: 0;
  padding: 18px 22px 28px;
  font-family: var(--sans);
}

.pg-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.pg-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 96px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  position: sticky;
  top: 12px;
}

.pg-right { min-width: 0; }
.pg-right:fullscreen,
.pg-right.is-fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 14px;
  background: var(--bg);
  overflow: hidden;
}

.pg-compose,
.pg-mixer,
.pg-audit {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(26, 26, 26, 0.025);
}

.pg-compose { padding: 13px 14px 14px; }

.pg-step-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}
.pg-step-head.compact { margin-bottom: 8px; }
.pg-step-head h3 {
  margin: 1px 0 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.2;
  color: var(--ink);
}
.step-kicker {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}
.pg-step-head p {
  margin: 0;
  max-width: 220px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.pg-prompt-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.pg-prompt-row textarea {
  width: 100%;
  min-width: 0;
  min-height: 96px;
  resize: vertical;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 10px 11px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.42;
}
.pg-prompt-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.generate-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.generate-actions .go { flex: 1; }

.preset-card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 10px 11px;
  cursor: pointer;
  transition: background-color .12s, border-color .12s, box-shadow .12s;
}
.preset-card:hover { border-color: rgba(168,93,57,0.55); }
.preset-card.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(168,93,57,0.08);
}
.action-card {
  text-align: left;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.preset-card .eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 3px;
}
.preset-card .title {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.preset-card .desc {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.38;
}
.preset-card .meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  margin-top: 6px;
}
.prompt-aware-card {
  display: block;
  width: 100%;
  border-color: rgba(168, 93, 57, 0.42);
}
.prompt-aware-card .title { font-size: 13.5px; }

.btn-chip {
  font-family: var(--sans);
  font-size: 12px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 5px 12px;
  cursor: pointer;
  color: var(--muted);
  transition: all .12s;
}
.btn-chip:hover { color: var(--ink); border-color: var(--muted); }
.btn-chip.on { background: var(--accent); border-color: var(--accent); color: white; font-weight: 500; }
.btn-chip.danger { color: var(--oppose); }
.btn-chip.danger:hover { border-color: var(--oppose); }

button.go {
  background: var(--accent);
  color: white;
  border: 0;
  padding: 8px 15px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
}
button.go:hover { background: #87472b; }
button.go:disabled { opacity: 0.42; cursor: wait; }

.pg-output {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}
.pg-output .col {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 10px 11px;
  min-height: 112px;
  max-height: 190px;
  display: flex;
  flex-direction: column;
}
.pg-output .col h5 {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  margin: 0 0 6px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.pg-output .col h5 .verdict { font-size: 10px; }
.pg-output .col h5 .verdict.hit { color: var(--oppose); text-transform: none; letter-spacing: 0; }
.pg-output .col h5 .verdict.clean { color: var(--support); text-transform: none; letter-spacing: 0; }
.pg-output .col .text {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-y: auto;
  flex: 1;
  color: var(--ink);
}
.pg-output .construction {
  background: var(--red-soft);
  color: var(--oppose);
  padding: 1px 3px;
  border-radius: 2px;
  font-weight: 500;
}

kbd {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--pill-bg);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--hairline);
}

.pg-mixer {
  padding: 10px 12px 11px;
  font-family: var(--sans);
}
.pg-mixer > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  user-select: none;
}
.pg-mixer > summary:hover { color: var(--accent); }
.pg-mixer[open] > summary {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 2px;
}
.pg-mixer-body { padding: 0; }
.pg-advanced-section {
  padding: 12px 0 14px;
  border-top: 1px solid var(--hairline);
}
.pg-advanced-section:first-child { border-top: 0; }
.pg-advanced-section:last-child { padding-bottom: 0; }
.pg-advanced-section h4 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}
.pg-mixer-intro {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.45;
}
.pg-search-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  align-items: center;
}
.pg-search-row input {
  grid-column: 1 / -1;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 8px 9px;
  font-family: var(--sans);
  font-size: 14px;
  min-width: 0;
}
.pg-search-row input:focus { outline: none; border-color: var(--accent); }
.pg-search-row .btn-chip { border-radius: 5px; padding: 6px 8px; }
.pg-search-info {
  grid-column: 1 / -1;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.4;
  padding-top: 2px;
}
.pg-search-info strong { color: var(--ink); }

.pg-sliders {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.pg-slider {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 4px 9px;
  align-items: center;
}
.pg-slider label {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 600;
}
.pg-slider input[type="range"] { width: 100%; accent-color: var(--accent); }
.pg-slider .slider-val {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  text-align: right;
  font-weight: 700;
}
.pg-mixer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--faint);
}
.pg-mixer .opts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 9px;
  align-items: center;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}
.pg-mixer .opts select,
.pg-mixer .opts input[type="number"] {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 4px 6px;
  font: inherit;
  font-size: 12px;
  min-width: 0;
}
.pg-mixer .opts input[type="range"] { width: 100%; }
.active-list {
  min-height: 36px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}

.pg-audit {
  background: linear-gradient(180deg, rgba(74,111,165,0.04), rgba(74,111,165,0.01));
  border-color: rgba(74,111,165,0.25);
  border-radius: 8px;
  padding: 12px 13px;
  margin: 0;
}
.pg-audit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pg-audit h4 {
  margin: 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 700;
}
.pg-audit-summary {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink);
  margin-top: 10px;
}
.pg-audit .src-group {
  margin: 10px 0;
  padding: 9px 10px;
  background: rgba(255,255,255,0.58);
  border-radius: 4px;
  border-left: 3px solid var(--accent);
}
.pg-audit .src-group .src-head {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.pg-audit .src-group .src-head .src-kind {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 3px;
}
.pg-audit .src-group .src-head .src-count { font-size: 10px; color: var(--faint); }
.pg-audit .src-group .feats { display: flex; flex-wrap: wrap; gap: 4px; }
.pg-audit .src-group .feat-pill {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--pill-bg);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink);
  border: 1px solid transparent;
  cursor: help;
}
.pg-audit .src-group .feat-pill.multi { background: var(--gold-soft); border-color: var(--hot); }
.pg-audit-cypher {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  background: var(--bg);
  padding: 9px 10px;
  border-radius: 3px;
  margin-top: 8px;
  white-space: pre-wrap;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--hairline);
}

.pg-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  height: calc(100vh - 106px);
  min-height: 620px;
}
.pg-right:fullscreen .pg-main,
.pg-right.is-fullscreen .pg-main {
  grid-template-columns: minmax(0, 1fr) 320px;
  height: calc(100vh - 28px);
}
.pg-canvas-wrap {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  height: 100%;
  min-height: 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.68);
}
.pg-right:fullscreen .pg-canvas-wrap,
.pg-right.is-fullscreen .pg-canvas-wrap {
  height: calc(100vh - 28px);
}
.pg-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.pg-canvas-wrap .zoom-row {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 2px;
  display: flex;
  gap: 1px;
  z-index: 5;
}
.pg-canvas-wrap .zoom-row button {
  background: var(--panel);
  border: 0;
  cursor: pointer;
  width: 28px;
  height: 28px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--muted);
  border-radius: 3px;
}
.pg-canvas-wrap .zoom-row button:hover { background: var(--pill-bg); color: var(--ink); }
.relation-view-toggle {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 3px;
  display: flex;
  gap: 3px;
  z-index: 5;
  box-shadow: 0 8px 20px rgba(26,26,26,0.04);
}
.relation-view-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 15px;
  padding: 5px 12px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.relation-view-toggle button:hover { color: var(--accent); }
.relation-view-toggle button.on { background: #2f2723; color: white; }

.map-hud {
  top: 12px;
  left: 14px;
  font-size: 12px;
  z-index: 4;
}
.map-note {
  top: 51px;
  left: 14px;
  max-width: 390px;
  font-size: 12px;
  line-height: 1.42;
  z-index: 4;
}
.map-legend {
  bottom: 14px;
  left: 14px;
  font-size: 12px;
  z-index: 4;
}
.map-gestures {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--hairline);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
  max-width: 340px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
}
.map-gestures strong { color: var(--ink); font-weight: 700; }
.map-gestures span { white-space: nowrap; }
.map-gestures .gesture-primary {
  color: var(--oppose);
  font-weight: 800;
}

.pg-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
}
.pg-right:fullscreen .pg-side,
.pg-right.is-fullscreen .pg-side {
  height: calc(100vh - 28px);
}
.pg-right:fullscreen .pg-side .box,
.pg-right.is-fullscreen .pg-side .box {
  min-height: 0;
  max-height: none;
  flex: 1 1 0;
}
.pg-right:fullscreen .pg-side .silence-box,
.pg-right.is-fullscreen .pg-side .silence-box {
  flex: 0 0 auto;
}
.pg-side .box {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 12px 13px;
  font-size: 13px;
  max-height: 384px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.pg-side .box.silence-box {
  min-height: 0;
  max-height: none;
  flex: 0 0 auto;
}
.pg-side .box:not(.silence-box) {
  min-height: 0;
  flex: 1 1 0;
}
.silence-choice-list {
  gap: 8px;
}
.silence-box .side-help {
  margin-bottom: 10px;
}
.silence-box .prompt-aware-card {
  background: rgba(168, 93, 57, 0.035);
}
.preset-card .eyebrow.muted {
  color: var(--faint);
}
.silence-info {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--hairline);
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
}
.silence-info strong {
  color: var(--ink);
  font-weight: 700;
}
.pg-side .box h4 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  margin: 0 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.pg-side .box h4 .count,
.pg-advanced-section h4 .count {
  background: var(--pill-bg);
  color: var(--ink);
  padding: 1px 7px;
  border-radius: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
}
.side-help,
.empty-note {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.48;
  margin: 0 0 9px;
}
.empty-note.ablated-overflow {
  margin: 8px 0 0;
  padding: 7px 8px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 4px;
}
.pg-side .box .scroll { overflow-y: auto; flex: 1; min-height: 0; }
.pg-side .row-actions { display: flex; gap: 5px; margin-top: 8px; }
.pg-side .row-actions button {
  font-family: var(--sans);
  font-size: 11px;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  cursor: pointer;
  color: var(--muted);
}
.pg-side .row-actions button:hover { border-color: var(--accent); color: var(--accent); }
.pg-side .row-actions button.danger:hover { border-color: var(--oppose); color: var(--oppose); }

.side-preset-list {
  display: grid;
  gap: 7px;
}
.side-preset {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.side-preset .title,
.side-preset .desc {
  display: block;
}
.pg-stress-section .stress-preset {
  background: rgba(74,111,165,0.035);
  border-style: dashed;
}
.pg-stress-section .stress-preset.on {
  border-color: var(--neo);
  background: var(--neo-soft);
}
.pg-stress-section .stress-preset .title {
  color: var(--muted);
}

.comm-nav {
  font-family: var(--sans);
  font-size: 13px;
}
.comm-nav .comm-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 8px;
  padding: 6px 6px;
  border-radius: 4px;
  align-items: center;
  cursor: pointer;
  transition: background-color .12s, color .12s;
}
.comm-nav .comm-item:hover { background: var(--pill-bg); }
.comm-nav .comm-item .swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.08);
}
.comm-nav .comm-item .nm {
  color: var(--ink);
  font-size: 12.5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comm-nav .comm-item .sz {
  color: var(--faint);
  font-size: 11px;
  font-family: var(--mono);
}

.feat-row {
  display: grid;
  grid-template-columns: 48px 1fr 24px;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 4px;
  align-items: baseline;
  font-size: 12px;
}
.feat-row:hover { background: var(--pill-bg); cursor: pointer; }
.feat-row .idx { font-family: var(--mono); color: var(--ink); font-weight: 700; }
.feat-row .lbl {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feat-row .x { font-family: var(--mono); color: var(--faint); cursor: pointer; text-align: right; padding: 0 4px; }
.feat-row .x:hover { color: var(--oppose); }
.feat-row .act { font-family: var(--mono); color: var(--hot); font-weight: 700; text-align: right; }
.feat-row.ablated { background: var(--red-soft); }
.feat-row.ablated .idx { color: var(--oppose); }

.rel-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: -1px;
}
.rel-dot.prompt { background: var(--neo); }
.rel-dot.silenced { background: var(--oppose); }
.rel-dot.behavior { background: var(--hot); }
.rel-dot.linked { background: var(--support); }

/* Floating status */
#status { position: fixed; bottom: 16px; right: 18px; background: var(--panel);
  border: 1px solid var(--hairline); padding: 6px 12px; border-radius: 4px;
  font-family: var(--sans); font-size: 12px; color: var(--muted); max-width: 340px;
  box-shadow: 0 10px 26px rgba(26, 26, 26, 0.08); z-index: 20; }
#status.pill-up { border-color: var(--support); color: var(--support); }
#status.pill-down { border-color: var(--oppose); color: var(--oppose); }

@media (max-width: 1180px) {
  .pg-workbench { grid-template-columns: 1fr; }
  .pg-left {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  .pg-main { grid-template-columns: 1fr; }
  .pg-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pg-side .box { max-height: 320px; }
  .pg-canvas-wrap { height: 680px; }
}
@media (max-width: 760px) {
  header.site { grid-template-columns: 1fr; padding: 16px 20px; gap: 10px; text-align: center; }
  .mode-switch { justify-self: center; }
  header.site .credit { justify-self: center; }
  .article-head { padding: 28px 20px 22px; }
  .panel { padding: 22px 20px 30px; }
  h1 { font-size: 32px; }
  p.dek { font-size: 19px; }
  .playback, .pg-output, .pg-side { grid-template-columns: 1fr; }
  .pg-shell { padding: 18px 14px 28px; }
  .pg-prompt-row, .pg-search-row { grid-template-columns: 1fr; }
  .pg-step-head { display: block; }
  .pg-step-head p { margin-top: 6px; }
  .generate-actions { width: 100%; }
  .generate-actions .go, .generate-actions .btn-chip { flex: 1; }
  .pg-canvas-wrap { min-height: 0; height: 520px; }
  .relation-view-toggle { left: 12px; transform: none; }
  .map-legend, .map-gestures, .map-note { display: none; }
  #status { left: 14px; right: 14px; bottom: 12px; max-width: none; text-align: center; }
}

/* ──────────────── story page, 2026-10 copy pass ──────────────── */
.tldr { background: var(--panel); border: 1px solid var(--hairline); border-radius: 8px;
  padding: 18px 24px 8px; font-family: var(--sans); font-size: 15px; line-height: 1.55; }
.tldr h3 { margin-top: 0; }
.tldr ul { margin: 8px 0 12px; padding-left: 18px; }
.tldr li { margin-bottom: 8px; }
blockquote.specimen { font-family: var(--serif); font-size: 21px; color: var(--ink);
  border-left: 3px solid var(--accent); padding: 4px 22px; margin: 18px 0; font-style: italic; }
blockquote.specimen.oppose { font-size: 17px; border-left-color: var(--oppose); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.layer-table.text-table td.label { font-weight: 400; }
.layer-table.text-table td { vertical-align: top; }
.panel p.caption { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin-top: -6px; }
.why-list { list-style: none; padding: 0; margin: 0; }
.why-list li { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.why-list li:last-child { border-bottom: none; }
@media (max-width: 760px) {
  .tldr { padding: 14px 16px 4px; }
  blockquote.specimen { font-size: 18px; padding: 4px 14px; }
  .layer-table th, .layer-table td { padding: 8px 8px; }
  .coalition-list .feat { grid-template-columns: 56px 1fr; }
  .coalition-list .feat .cost { grid-column: 2; text-align: left; }
}
blockquote.specimen.pair { font-size: 16px; line-height: 1.6; font-style: normal; }
blockquote.specimen.pair .lab { display: inline-block; min-width: 96px; font-family: var(--sans);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
/* bar chart (story page ladder) */
.bars { margin: 18px 0 6px; font-family: var(--sans); font-size: 14px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 56px; gap: 12px; align-items: center; margin: 8px 0; }
.bar-lbl { color: var(--muted); }
.bar-track { background: var(--hairline); border-radius: 4px; height: 14px; overflow: hidden; }
.bar { display: block; height: 100%; background: var(--accent); opacity: 0.55; border-radius: 4px; }
.bar-row.hot .bar { opacity: 1; }
.bar-row.hot .bar-lbl, .bar-row.hot .bar-val { color: var(--ink); font-weight: 600; }
.bar-row.muted .bar-lbl, .bar-row.muted .bar-val { color: var(--faint); }
.bar-val { text-align: right; font-family: var(--mono); }
.headline-stats.two { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 760px) { .bar-row { grid-template-columns: 88px 1fr 48px; gap: 8px; } }

/* ──────────────── story page, v10 pass: companion note, figures, lists ──────────────── */
.article-head p.companion { font-family: var(--sans); font-size: 15px; line-height: 1.55;
  color: var(--muted); margin: 0; }
.article-head a { color: var(--accent); text-decoration: underline;
  text-decoration-color: rgba(196, 106, 31, 0.35); text-underline-offset: 2px; }
.panel figure { margin: 26px 0 24px; }
.panel figure img { display: block; width: 100%; height: auto; border-radius: 6px; }
.panel figure.gif img { max-width: 560px; margin: 0 auto; }
.panel figcaption { font-family: var(--sans); font-size: 12.5px; line-height: 1.5;
  color: var(--muted); margin-top: 10px; }
.panel ul.plain-list { padding-left: 20px; margin: 0 0 18px; }
.panel ul.plain-list li { margin-bottom: 10px; }
.panel ul.quote-list { list-style: none; padding: 0; margin: 6px 0 20px; font-size: 17px; }
.panel ul.quote-list li { padding: 6px 0 6px 16px; margin: 10px 0;
  border-left: 3px solid var(--hairline); }
