:root {
  --bg: #09090b;
  --rail: #070708;
  --panel: #121214;
  --panel-2: #18181b;
  --line: rgba(242, 240, 235, 0.08);
  --line-strong: rgba(242, 240, 235, 0.16);
  --ink: #f2f0eb;
  --muted: #9a968e;
  --faint: #6f6c66;
  --orange: #ff7a3c;
  --orange-dim: #6a3a24;
  --green: #3ddc97;
  --amber: #e6c15a;
  --red: #ff5d4a;
  --blue: #8eb6ff;
  --teal: #7ec8c3;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pixel: "Silkscreen", "IBM Plex Mono", monospace;
  --rail-w: 228px;
  --radius: 18px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(242, 240, 235, 0.055) 1px, transparent 1px);
  background-size: 18px 18px;
}

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--orange); color: #1a0d06; }

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: #111;
  padding: 0.4rem 0.7rem;
  z-index: 40;
}

.skip:focus { top: 0.6rem; }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 30;
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  padding: 1.15rem 1rem 1rem;
  background: var(--rail);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  color: var(--ink);
  flex: none;
}

.brand-mark svg { width: 100%; height: 100%; display: block; }

.sweep {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 1px;
  height: 46%;
  background: linear-gradient(var(--orange), transparent);
  transform-origin: bottom center;
  animation: sweep 9s linear infinite;
}

.brand strong {
  display: block;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.brand em {
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
}

.rail nav { display: grid; gap: 0.15rem; }

.rail nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.rail nav a span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--faint);
}

.rail nav a:hover,
.rail nav a[aria-current="page"] {
  background: var(--panel);
  color: var(--ink);
}

.rail nav a[aria-current="page"] span { color: var(--orange); }

.rail nav a { position: relative; }

.rail nav a::before,
.rail nav a::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.rail nav a::before {
  top: -3px;
  left: -3px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  transform: translate(3px, 3px);
}

.rail nav a::after {
  right: -3px;
  bottom: -3px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  transform: translate(-3px, -3px);
}

.rail nav a:hover::before,
.rail nav a:hover::after,
.rail nav a[aria-current="page"]::before,
.rail nav a[aria-current="page"]::after {
  opacity: 0.8;
  transform: none;
}

.rail-note {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.shell {
  margin-left: var(--rail-w);
  padding: 1.1rem 1.4rem 4rem;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 2.4rem;
  margin-bottom: 1.15rem;
}

.crumb { margin: 0; color: var(--muted); font-size: 0.86rem; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.crumb span { color: var(--faint); margin: 0 0.3rem; }

.topbar time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.menu-btn {
  display: none;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.board-head { max-width: 46rem; margin-bottom: 1.1rem; }

h1, h2, h3 { font-weight: 500; letter-spacing: -0.03em; line-height: 1.08; }

.board-head h1,
.doc h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.deck { margin: 0; color: var(--muted); max-width: 42rem; }

.tiles {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr 0.95fr;
  gap: 0.75rem;
}

.tile {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 28%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem 1rem;
  box-shadow: var(--shadow);
  min-width: 0;
  animation: rise 0.55s ease both;
}

.tile:nth-child(2) { animation-delay: 0.05s; }
.tile:nth-child(3) { animation-delay: 0.1s; }
.tile:nth-child(4) { animation-delay: 0.15s; }
.tile:nth-child(5) { animation-delay: 0.2s; }

.tile:hover { border-color: rgba(255, 122, 60, 0.45); }

.idx {
  margin: 0 0 0.55rem;
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--orange);
}

.stat {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.stat small {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0;
}

.fine {
  margin: 0.7rem 0 0;
  color: var(--faint);
  font-size: 0.75rem;
}

.fine a { color: var(--muted); }

.row-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }

.row-list a, .due-list a {
  text-decoration: none;
  display: block;
}

.row-list a span { display: block; }

.row-list li, .due-list li {
  display: grid;
  gap: 0.1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--orange);
}

.muted { color: var(--muted); }
.faint { color: var(--faint); }

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.toggles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }

.toggles li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--faint);
  font-size: 0.92rem;
}

.knob {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #2a2a2e;
  position: relative;
  flex: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}

.knob::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3a3a3e;
  top: 4px;
  left: 4px;
}

.toggles .is-on { color: var(--orange); }
.toggles .is-on .knob { background: var(--orange-dim); }
.toggles .is-on .knob::after {
  left: 22px;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(255, 122, 60, 0.7);
}

.due-list { list-style: none; margin: 0; padding: 0; }
.due-list li {
  grid-template-columns: 6.4rem 1fr auto;
  align-items: baseline;
  gap: 0.7rem;
}
.due-list .when { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.due-list .past .when { color: var(--red); }

.bars {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.45rem;
  align-items: end;
  height: 132px;
  margin-top: 0.4rem;
}

.bar {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  height: 100%;
}

.bar i {
  display: block;
  width: 100%;
  max-width: 28px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--orange), #8a4324);
  transform: scaleY(0);
  transform-origin: bottom;
  animation: grow 0.7s ease both;
  min-height: 2px;
}

.bar b {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--faint);
}

.section-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 1.5rem 0 0.6rem;
}

.section-label h2 { margin: 0; font-size: 1.25rem; }
.section-label a { color: var(--orange); font-size: 0.85rem; }

.tape { border-top: 1px solid var(--line-strong); }

.tape a, .journal-row {
  display: grid;
  grid-template-columns: 6.2rem 7.4rem 1fr auto;
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.85rem 0.2rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.tape a:hover .title,
.journal-row:hover .title { color: var(--orange); }

.title { font-size: 1.02rem; }

.filters, .tools { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.tools select, .tools button { width: auto; }

.chip, .tools button, .tools select, .finder input {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  cursor: pointer;
}

.chip.is-on, .tools button.is-on {
  background: var(--ink);
  color: #161412;
  border-color: var(--ink);
}

.finder {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: min(100%, 16rem);
  background: #101012;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
}

.finder input {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  outline: none;
}

.finder .tick {
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
}
.finder .tick.a { top: 5px; left: 5px; border-top: 1px solid rgba(242,240,235,.55); border-left: 1px solid rgba(242,240,235,.55); }
.finder .tick.b { right: 5px; bottom: 5px; border-right: 1px solid rgba(242,240,235,.55); border-bottom: 1px solid rgba(242,240,235,.55); }

.tools { margin: 0.8rem 0; }

.table-wrap { overflow-x: auto; }

table.kev {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.kev th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0.45rem 0.5rem 0.55rem 0;
  border-bottom: 1px solid var(--line-strong);
}

.kev td {
  padding: 0.72rem 0.7rem 0.72rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.kev tr:hover td { background: rgba(255, 122, 60, 0.04); }

.kev a { color: var(--orange); text-decoration: none; }
.kev a:hover { text-decoration: underline; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.14rem 0.5rem 0.16rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  background: color-mix(in srgb, var(--c, var(--muted)) 16%, transparent);
  color: var(--c, var(--muted));
  white-space: nowrap;
}

.pill i {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: currentColor;
}

.pill.pulse i { animation: blink 1.8s ease infinite; }

.pills { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.empty { color: var(--muted); }

.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  margin-top: 1.3rem;
  align-items: start;
}

.doc-side {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.doc-side p { margin: 0; }
.doc-side dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.doc-side dd { margin: 0.15rem 0 0; font-size: 0.92rem; }

.doc-copy { max-width: 42rem; }
.doc-copy h2 { margin: 1.6rem 0 0.4rem; font-size: 1.35rem; }
.doc-copy p, .doc-copy li { color: #d9d5cc; }
.doc-copy a { color: var(--orange); }
.doc-copy ul { padding-left: 1.1rem; }

.sources { list-style: none; padding: 0; }
.sources li { margin: 0.35rem 0; }

.kicker {
  margin: 0 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}

.lanes { display: grid; gap: 1.2rem; margin-top: 1.2rem; }

.lane {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
}

.lane h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.lane p { margin: 0; color: var(--muted); }

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.6rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}

.contact h2 { margin: 0 0 0.4rem; }
form { display: grid; gap: 0.55rem; }
label { display: grid; gap: 0.25rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
input, select, textarea {
  width: 100%;
  background: #0e0e10;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
}
textarea { min-height: 7rem; resize: vertical; }

.send {
  justify-self: start;
  background: var(--ink);
  color: #161412;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}
.send:hover { background: var(--orange); }

.form-note { min-height: 1.2rem; color: var(--muted); font-size: 0.9rem; text-transform: none; letter-spacing: 0; font-family: var(--sans); }
.form-note a { color: var(--orange); }

.foot {
  margin-top: 2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.scrim {
  display: none;
}

/* Board head: cross with guide lines */
.board-head.with-figure {
  position: relative;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 46rem) 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 11rem;
}

.cross-figure {
  justify-self: end;
  width: min(260px, 100%);
  height: 170px;
  color: var(--ink);
  overflow: visible;
}

.cross-figure .guide {
  stroke: rgba(242, 240, 235, 0.12);
  stroke-width: 1;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw 1.6s ease forwards;
}

.cross-figure .arm {
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: butt;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw 0.7s ease forwards;
}

.cross-figure .arm:nth-of-type(2) { animation-delay: 0.08s; }
.cross-figure .arm:nth-of-type(3) { animation-delay: 0.16s; }
.cross-figure .arm:nth-of-type(4) { animation-delay: 0.24s; }

.cross-figure .hub {
  fill: var(--orange);
  animation: blink 2.4s ease infinite 1s;
}

.cross-figure .orbit {
  fill: none;
  stroke: rgba(255, 122, 60, 0.55);
  stroke-width: 1;
  stroke-dasharray: 2 6;
  transform-box: fill-box;
  transform-origin: center;
  animation: sweep 40s linear infinite;
}

/* Dot ring: one dot per row */
.ring-tile { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: center; }
.ring { width: 220px; height: 220px; }
.ring svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ring-tick { fill: rgba(242, 240, 235, 0.22); }
.ring-dot {
  fill: #2a2a2e;
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.4s ease both;
  cursor: pointer;
  transition: r 0.15s ease;
}
.ring-dot.past { fill: var(--red); }
.ring-dot.open { fill: var(--green); }
.ring-dot.ransom { stroke: var(--ink); stroke-width: 1.6; }
.ring a:hover .ring-dot,
.ring a:focus .ring-dot { r: 7.5; }
.ring-hand {
  stroke: var(--orange);
  stroke-width: 1;
  opacity: 0.8;
  transform-box: view-box;
  transform-origin: 110px 110px;
  animation: sweep 12s linear infinite;
}

.legend { list-style: none; margin: 0.7rem 0 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.82rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 0.5rem; }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.legend i.ringed { background: var(--red); box-shadow: 0 0 0 1.5px var(--ink); }

/* Dot columns by week */
.dot-weeks {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.35rem;
  margin-top: 0.7rem;
}
.dot-col { display: grid; justify-items: center; gap: 0.3rem; }
.dot-col em { font-style: normal; font-family: var(--mono); font-size: 0.66rem; color: var(--muted); }
.dot-col b { font-weight: 400; font-family: var(--mono); font-size: 0.6rem; color: var(--faint); white-space: nowrap; }
.dot-stack {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
}
.dot-stack > * {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(242, 240, 235, 0.07);
}
.dot-stack .on {
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255, 122, 60, 0.45);
  animation: pop 0.35s ease both;
}
.dot-stack .on.triage { background: var(--amber); box-shadow: 0 0 8px rgba(230, 193, 90, 0.4); }
.dot-stack .on:hover { transform: scale(1.4); }

/* Surface strips */
.surfaces { display: grid; gap: 0.55rem; margin-top: 0.4rem; }
.surface-line {
  display: grid;
  grid-template-columns: 12.5rem 1fr 2rem;
  gap: 0.7rem;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.surface-line b { font-family: var(--mono); font-weight: 400; color: var(--muted); text-align: right; }
.dot-strip { display: flex; flex-wrap: wrap; gap: 4px; }
.dot-strip a {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: #3a3a3f;
  animation: pop 0.35s ease both;
}
.dot-strip a.hot { background: var(--orange); }
.dot-strip a:hover { outline: 1px solid var(--ink); outline-offset: 1px; }

/* KEV layout with inspector */
.kev-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1rem;
  align-items: start;
}

.kev tbody tr { animation: rise 0.35s ease both; cursor: pointer; }
.kev td.mono, .kev td:nth-child(2) { white-space: nowrap; }
.kev tbody tr:focus-visible { outline-offset: -2px; }
.kev tbody tr.is-picked td { background: rgba(255, 122, 60, 0.09); }
.kev tbody tr.is-picked td:first-child { box-shadow: inset 2px 0 0 var(--orange); }
.kev tbody tr.is-mine td:nth-child(3) { color: var(--orange); }
.kev tbody tr.is-mine td:nth-child(3)::before { content: "● "; font-size: 0.7em; }

.inspector,
.inspector.bracketed {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 14rem;
  box-shadow: var(--shadow);
}

.bracketed { position: relative; }
.bracketed::before,
.bracketed::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
}
.bracketed::before { top: -5px; left: -5px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.bracketed::after { right: -5px; bottom: -5px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.inspector.is-live { animation: lockon 0.35s ease; }

.inspect-empty { margin: 0; color: var(--muted); font-size: 0.92rem; }
.inspect-head h2 { margin: 0 0 0.2rem; font-family: var(--mono); font-size: 1.25rem; letter-spacing: -0.02em; }
.inspect-head .muted { margin: 0; font-size: 0.88rem; }
.inspect-cls { margin: 0.7rem 0; font-size: 1rem; }
.inspector .pills { margin-bottom: 0.9rem; }
.inspector .idx { margin-top: 1rem; }

.track { margin: 0.4rem 0 0.2rem; }
.track-line {
  position: relative;
  height: 4px;
  margin: 1rem 0 0.8rem;
  background: repeating-linear-gradient(90deg, rgba(242,240,235,.18) 0 2px, transparent 2px 6px);
  border-radius: 2px;
}
.track-window, .track-over {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 2px;
  transform-origin: 0 50%;
  animation: stretch 0.6s ease both;
}
.track-window { background: var(--green); }
.track-over { background: var(--red); animation-delay: 0.3s; }
.track-mark { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.track-mark b {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--ink);
}
.track-mark.today b { border-color: var(--orange); box-shadow: 0 0 10px rgba(255, 122, 60, 0.8); }
.track-mark.due b { border-color: var(--muted); }
.track-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
}
.track-key span { display: inline-flex; align-items: center; gap: 0.35rem; }
.track-key b { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink); }
.track-key .due b { border-color: var(--muted); }
.track-key .today b { border-color: var(--orange); }

.facts { display: grid; gap: 0.5rem; margin: 0.6rem 0 0; }
.facts div { display: grid; grid-template-columns: 5rem 1fr; gap: 0.5rem; }
.facts dt { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding-top: 0.15rem; }
.facts dd { margin: 0; font-size: 0.9rem; }

.checks { margin: 0; padding: 0; list-style: none; counter-reset: c; display: grid; gap: 0.5rem; }
.checks li {
  counter-increment: c;
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  font-size: 0.88rem;
  color: #d9d5cc;
}
.checks li::before {
  content: counter(c, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--orange);
  padding-top: 0.15rem;
}

.inspect-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 0; }
.inspect-links a {
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
}
.inspect-links a:hover { border-color: var(--orange); color: var(--orange); }

.inventory {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1rem;
  margin: 0.2rem 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}
.inventory h2 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.inventory p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.inventory textarea { min-height: 5.2rem; font-family: var(--mono); font-size: 0.82rem; text-transform: none; }
.inventory .form-note { margin-top: 0.4rem; font-size: 0.82rem; }

/* Workflow canvas */
.flow {
  position: relative;
  margin-top: 1rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background-color: #0c0c0e;
  background-image: radial-gradient(rgba(242, 240, 235, 0.09) 1px, transparent 1px);
  background-size: 14px 14px;
  overflow: hidden;
}
.flow-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2.2rem;
  align-items: center;
}
.flow-col { display: grid; gap: 1.2rem; }
.flow svg[data-wires] { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.wire { fill: none; stroke: rgba(242, 240, 235, 0.16); stroke-width: 1.2; }
.wire-pulse {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.6;
  stroke-dasharray: 26 600;
  stroke-dashoffset: 626;
  animation: travel 3.2s linear infinite;
  filter: drop-shadow(0 0 4px rgba(255, 122, 60, 0.9));
}
.wire-end { fill: var(--orange); }
.node {
  display: block;
  text-decoration: none;
  background: rgba(24, 24, 27, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 0.75rem 0.8rem;
  backdrop-filter: blur(4px);
  transition: border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.node:hover { border-color: var(--orange); transform: translateY(-2px); }
.flow[data-focus] .node { opacity: 0.55; }
.flow[data-focus] .node:hover { opacity: 1; }
.node .step { font-family: var(--pixel); font-size: 10px; letter-spacing: 0.12em; color: var(--orange); }
.node strong { display: block; margin: 0.3rem 0 0.25rem; font-weight: 500; font-size: 0.98rem; }
.node span { display: block; font-size: 0.8rem; color: var(--muted); }
.node .tag {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: rgba(242, 240, 235, 0.06);
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
}
.node.branch { border-style: dashed; }

/* Article table of contents */
.toc { display: grid; gap: 0.1rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.toc .idx { margin-bottom: 0.3rem; }
.toc a {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  padding: 0.28rem 0;
  font-size: 0.82rem;
  color: var(--faint);
  text-decoration: none;
  border-left: 1px solid transparent;
  transition: color 0.2s ease;
}
.toc a span { font-family: var(--mono); font-size: 0.64rem; padding-top: 0.15rem; }
.toc a:hover, .toc a.is-on { color: var(--ink); }
.toc a.is-on span { color: var(--orange); }

.callout {
  margin: 1.2rem 0;
  padding: 0.9rem 1rem;
  border-left: 2px solid var(--orange);
  background: rgba(255, 122, 60, 0.06);
  border-radius: 0 12px 12px 0;
}
.callout p { margin: 0; }
.callout .idx { margin-bottom: 0.35rem; }

.doc-copy table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.9rem; }
.doc-copy th { text-align: left; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 400; padding: 0.4rem 0.6rem 0.4rem 0; border-bottom: 1px solid var(--line-strong); }
.doc-copy td { padding: 0.55rem 0.6rem 0.55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; color: #d9d5cc; }
.doc-copy code { font-family: var(--mono); font-size: 0.85em; background: rgba(242,240,235,.07); padding: 0.05rem 0.3rem; border-radius: 4px; }

.checklist { list-style: none; padding: 0; display: grid; gap: 0.45rem; }
.checklist li { display: grid; grid-template-columns: 1.4rem 1fr; }
.checklist li::before { content: "□"; color: var(--orange); font-family: var(--mono); }

.journal-row .sum { grid-column: 3 / 4; color: var(--faint); font-size: 0.86rem; margin-top: -0.35rem; }

/* Desk kit */
.kit-section { margin-top: 1.6rem; }
.kit-section > h2 { margin: 0 0 0.6rem; font-size: 1.3rem; }
.kit-list { border-top: 1px solid var(--line-strong); }
.kit-list a, .kit-list div {
  display: grid;
  grid-template-columns: 15rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.75rem 0.2rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.kit-list a:hover strong { color: var(--orange); }
.kit-list strong { font-weight: 500; }
.kit-list span { color: var(--muted); font-size: 0.9rem; }
.kit-list em { font-style: normal; font-family: var(--mono); font-size: 0.66rem; color: var(--faint); }
.glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.6rem; margin: 0; }
.glossary div { padding: 0.7rem 0; border-top: 1px solid var(--line); }
.glossary dt { font-family: var(--mono); font-size: 0.78rem; color: var(--orange); }
.glossary dd { margin: 0.2rem 0 0; color: #d9d5cc; font-size: 0.9rem; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop {
  from { opacity: 0; transform: scale(0.2); }
  to { opacity: 1; transform: none; }
}
@keyframes stretch { from { transform: scaleX(0); } }
@keyframes travel { to { stroke-dashoffset: 0; } }
@keyframes lockon {
  from { opacity: 0.4; transform: scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes grow { to { transform: scaleY(1); } }
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 1240px) {
  .kev-layout { grid-template-columns: 1fr; }
  .inspector.bracketed { position: relative; scroll-margin-top: 1rem; }
  .flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1040px) {
  .tiles, .split, .doc-layout, .lane, .contact, .inventory, .glossary { grid-template-columns: 1fr; }
  .board-head.with-figure { grid-template-columns: 1fr; }
  .cross-figure { display: none; }
  .ring-tile { grid-template-columns: 1fr; justify-items: center; }
  .kit-list a, .kit-list div { grid-template-columns: 1fr; gap: 0.2rem; }
  .surface-line { grid-template-columns: 1fr auto; }
  .surface-line .dot-strip { grid-column: 1 / -1; grid-row: 2; }
  .journal-row .sum { grid-column: 1 / -1; }
  .doc-side { position: static; }
  .due-list li, .tape a, .journal-row { grid-template-columns: 1fr 1fr; }
  .tape a .title, .journal-row .title { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  .menu-btn { display: inline-flex; }
  .rail {
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }
  .rail.is-open { transform: none; }
  .scrim.is-on {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 15;
  }
  .shell { margin-left: 0; padding: 0.9rem 0.9rem 3rem; }
  .kev thead { display: none; }
  .kev tr { display: grid; gap: 0.15rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .kev td { border: 0; padding: 0; }
  .flow-grid { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .cross-figure .guide, .cross-figure .arm { stroke-dashoffset: 0; }
  .wire-pulse { display: none; }
}
