/* Isometric-paper palette: warm paper, ink type, hairline rules, one terracotta accent. */
:root {
  --paper: #f7f4ec; --paper-raised: #fffdf7; --paper-sunk: #efeade;
  --ink: #1f1b16; --ink-soft: #5c554a; --ink-faint: #8b8375;
  --rule: #ded6c4; --rule-strong: #c9bda5;
  --accent: #c2622d; --accent-soft: #f0dccb; --slate: #3e5c6b; --moss: #5e7a52; --clay: #a8452f;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px 8px; }
.top h1 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; }
.top p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }
button { font: inherit; font-size: 13px; color: var(--ink); background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
button:hover { border-color: var(--ink-faint); }
button:disabled { opacity: 0.45; cursor: default; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 20px 12px; }
.steps button { border-radius: 999px; }
.steps button[aria-current="step"] { background: var(--accent-soft); border-color: var(--accent); }
.layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 20px; padding: 0 20px 20px; }
.figure { margin: 0; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 12px; padding: 12px; }
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.side { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 12px; padding: 18px; }
.step-count { margin: 0; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.side h2 { margin: 4px 0 8px; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.lede { margin: 0 0 8px; font-weight: 600; }
.body { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.controls label { display: block; font-size: 13px; margin: 10px 0 4px; }
.controls input[type=range] { width: 100%; accent-color: var(--accent); }
.readout { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 14px; }
.readout dt { color: var(--ink-faint); }
.readout dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.nav { display: flex; justify-content: space-between; margin-top: 16px; }
/* Diagram marks */
.axis { stroke: var(--ink); stroke-width: 1.5; }
.grid { stroke: var(--rule); stroke-width: 1; }
.tick { fill: var(--ink-faint); font-size: 12px; }
.label { fill: var(--ink-soft); font-size: 13px; }
.guide { stroke: var(--ink-faint); stroke-width: 1; stroke-dasharray: 4 4; }
.point { fill: var(--accent); stroke: var(--paper-raised); stroke-width: 2; }
.tag { fill: var(--ink); font-size: 13px; font-weight: 600; }
dialog { max-width: 560px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper-raised); color: var(--ink); }
dialog h2, dialog h3 { font-family: var(--serif); }
.ledger { padding-left: 18px; font-size: 14px; line-height: 1.5; }
.ledger b { text-transform: capitalize; }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } }
/* Buttons that act on the diagram */
.actions { margin-top: 6px; }
.action-group { margin-top: 10px; }
.action-title { margin: 0 0 4px; font-size: 12px; color: var(--ink-faint); }
.action-row { display: flex; flex-wrap: wrap; gap: 6px; }
.action-row.stack { flex-direction: column; align-items: stretch; }
.action-row.stack button { text-align: left; }
.action-row button { font-size: 12.5px; padding: 5px 10px; }
.action-row button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.readout dd.note { grid-column: 1 / -1; font-weight: 400; font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
/* Text in diagrams */
.txt { fill: var(--ink); font-size: 13px; }
.small { fill: var(--ink-soft); font-size: 11.5px; }
.small-strong { fill: var(--ink); font-size: 11.5px; font-weight: 600; }
.small-warn { fill: var(--clay); font-size: 11.5px; font-weight: 600; }
.head { fill: var(--ink-faint); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.col-head { fill: var(--ink); font-size: 13px; font-weight: 600; }
.node-big { fill: var(--ink); font-family: var(--serif); font-size: 17px; }
.big-num { fill: var(--ink); font-family: var(--serif); font-size: 28px; font-weight: 600; }
.vlabel { fill: var(--ink); font-size: 13px; font-weight: 600; }
/* Cards, columns, nodes */
.col { fill: var(--paper-sunk); stroke: var(--rule); }
.col-tray { fill: none; stroke: var(--rule-strong); stroke-dasharray: 5 4; }
.card-box { fill: var(--paper-raised); stroke: var(--rule-strong); stroke-width: 1; }
.card-box.mixed { stroke-dasharray: 4 3; stroke: var(--slate); }
.card-text { fill: var(--ink); font-size: 11.5px; pointer-events: none; }
.card.is-selected .card-box { stroke: var(--accent); stroke-width: 2.5; fill: #fff7ef; }
.card.dragging { opacity: 0.85; cursor: grabbing; }
.wrong-dot { fill: var(--clay); }
.wrong-mark { fill: #fff; font-size: 10px; font-weight: 700; pointer-events: none; }
.node { fill: var(--paper-sunk); stroke: var(--rule-strong); }
.node-active { fill: #fff7ef; stroke: var(--accent); stroke-width: 2.5; }
.arrow { stroke: var(--ink-soft); stroke-width: 2; }
.arrow-head { fill: var(--ink-soft); }
.rule { stroke: var(--rule); stroke-width: 1; }
.axis-thin { stroke: var(--ink-faint); stroke-width: 1; }
/* Meters and bars */
.meter-track { fill: var(--paper-sunk); stroke: var(--rule); }
.meter-me { fill: var(--accent); }
.meter-notme { fill: var(--slate); opacity: 0.7; }
.meter-target { stroke: var(--ink); stroke-width: 2; }
.bar-hot { fill: var(--clay); }
.bar-cool { fill: var(--moss); }
.bar-hot-soft { fill: var(--clay); opacity: 0.35; }
.bar-cool-soft { fill: var(--moss); opacity: 0.35; }
.bar-active { fill: var(--accent); }
.bar-good { fill: var(--moss); }
.bar-bad { fill: var(--clay); }
.bar-ind { fill: var(--slate); opacity: 0.7; }
/* Compass */
.ring { fill: none; stroke: var(--rule); stroke-width: 1; }
.vbar { stroke: var(--moss); stroke-width: 16; stroke-linecap: butt; opacity: 0.85; }
.vbar-low { stroke: var(--clay); }
.shape { fill: var(--accent-soft); fill-opacity: 0.35; stroke: var(--accent); stroke-width: 2.5; }
.shape-ghost { fill: none; stroke: var(--ink-faint); stroke-width: 1.5; stroke-dasharray: 5 4; }
.hub { fill: var(--ink); }
