/* ------------------------------------------------------------------
   WIREPROBE — visual system
   Ink + bone + acid. Editorial serif against instrument-panel mono.
------------------------------------------------------------------- */

:root {
  color-scheme: dark;
  --bg: #080a09;
  --bg-raised: #0c0f0d;
  --bg-deep: #060807;
  --bg-rgb: 8, 10, 9;
  --ink: #edeee3;
  --ink-dim: #c2c6b8;
  --muted: #8e9489;
  --faint: #7c8378;
  --ink-rgb: 237, 238, 227;
  --tint-rgb: 255, 255, 255;
  --line: rgba(var(--ink-rgb), 0.1);
  --line-2: rgba(var(--ink-rgb), 0.19);
  --acid: #d6ff3f;
  --acid-rgb: 214, 255, 63;
  --acid-soft: rgba(var(--acid-rgb), 0.1);
  --acid-bright: #e6ff78;
  --on-acid: #0a0c08;
  --mint: #9fe8b4;
  --amber: #ffc45c;
  --amber-rgb: 255, 196, 92;
  --coral: #ff7a5c;
  --coral-rgb: 255, 122, 92;
  --sky: #9db8ff;
  --sky-rgb: 157, 184, 255;
  --sunken: rgba(0, 0, 0, 0.12);
  --grid-line: rgba(var(--ink-rgb), 0.032);
  --glow-acid: rgba(var(--acid-rgb), 0.07);
  --glow-amber: rgba(var(--amber-rgb), 0.05);
  --glow-sky: rgba(var(--sky-rgb), 0.035);
  --noise-opacity: 0.035;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --page-x: clamp(20px, 4.5vw, 64px);
  --radius: 0px;
}

/* Light mode keeps the same editorial system: warm paper, deep ink,
   and a darker olive "acid" so accents stay legible on a light ground. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5f3ea;
    --bg-raised: #fbf9f2;
    --bg-deep: #ece8da;
    --bg-rgb: 245, 243, 234;
    --ink: #12150f;
    --ink-dim: #2b3128;
    --muted: #555d4f;
    --faint: #62695c;
    --ink-rgb: 18, 21, 15;
    --tint-rgb: 18, 21, 15;
    --line: rgba(var(--ink-rgb), 0.12);
    --line-2: rgba(var(--ink-rgb), 0.22);
    --acid: #4f6b00;
    --acid-rgb: 79, 107, 0;
    --acid-soft: rgba(var(--acid-rgb), 0.1);
    --acid-bright: #3f5700;
    --on-acid: #fbf9f2;
    --mint: #1d6b3f;
    --amber: #8a5a00;
    --amber-rgb: 138, 90, 0;
    --coral: #b2341f;
    --coral-rgb: 178, 52, 31;
    --sky: #2a4fa8;
    --sky-rgb: 42, 79, 168;
    --sunken: rgba(var(--ink-rgb), 0.045);
    --grid-line: rgba(var(--ink-rgb), 0.045);
    --glow-acid: rgba(var(--acid-rgb), 0.11);
    --glow-amber: rgba(var(--amber-rgb), 0.07);
    --glow-sky: rgba(var(--sky-rgb), 0.05);
    --noise-opacity: 0.022;
  }
}

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

html {
  font-size: 112.5%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 760px at 88% -8%, var(--glow-acid), transparent 58%),
    radial-gradient(900px 680px at 4% 2%, var(--glow-amber), transparent 55%),
    radial-gradient(1200px 900px at 50% 110%, var(--glow-sky), transparent 60%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * {
  position: relative;
  z-index: 1;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(1200px 800px at 60% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(1200px 800px at 60% 0%, #000 0%, transparent 75%);
}

::selection {
  background: var(--acid);
  color: var(--on-acid);
}

a {
  color: inherit;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

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

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(var(--ink-rgb), 0.16);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--ink-rgb), 0.28);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--acid);
  color: var(--on-acid);
  padding: 10px 14px;
  font: 600 0.625rem var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 0 var(--page-x);
  border-bottom: 1px solid var(--line);
  background: rgba(var(--bg-rgb), 0.82);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  color: var(--acid);
  background: rgba(var(--acid-rgb), 0.035);
  flex: none;
}

.brand-type {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}

.brand-name {
  font: 600 0.75rem/1 var(--mono);
  letter-spacing: 0.22em;
}

.brand-sub {
  font: 0.5rem/1 var(--mono);
  letter-spacing: 0.2em;
  color: var(--faint);
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  justify-content: center;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 3px rgba(var(--acid-rgb), 0.08);
  flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}
.live-dot.is-error {
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(var(--coral-rgb), 0.08);
  animation: none;
}
.live-dot.is-idle {
  background: var(--faint);
  box-shadow: none;
  animation: none;
}

.status-text {
  font: 600 0.59375rem/1 var(--mono);
  letter-spacing: 0.18em;
  color: var(--acid);
  white-space: nowrap;
}
.status-text.is-error {
  color: var(--coral);
}
.status-text.is-idle {
  color: var(--muted);
}

.status-rule {
  width: 26px;
  height: 1px;
  background: var(--line-2);
  flex: none;
}

.status-detail {
  font: 0.59375rem/1 var(--mono);
  letter-spacing: 0.05em;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.collect-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  overflow: hidden;
}
.collect-track span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--acid);
  box-shadow: 0 0 8px rgba(var(--acid-rgb), 0.55);
  transition: width 0.4s var(--ease);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  font: 600 0.59375rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.btn:hover {
  border-color: var(--ink);
  background: rgba(var(--tint-rgb), 0.035);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--on-acid);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
}
.btn-primary:hover {
  background: var(--acid-bright);
  border-color: var(--acid-bright);
}
.btn-primary:focus-visible {
  clip-path: none;
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn-quiet {
  color: var(--muted);
}

.btn-line {
  color: var(--ink-dim);
}

.btn-lg {
  height: 46px;
  padding: 0 22px;
  font-size: 0.65625rem;
}

.btn-glyph {
  font-size: 0.875rem;
  line-height: 1;
  transform: translateY(-1px);
}

.micro-action {
  background: none;
  border: 0;
  padding: 2px 0;
  color: var(--faint);
  font: 0.5625rem var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.micro-action:hover {
  color: var(--acid);
  border-color: var(--acid);
}

.mini-btn {
  background: none;
  border: 1px solid var(--line-2);
  padding: 6px 9px;
  color: var(--muted);
  font: 0.5625rem var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.mini-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------------------------------------------------------------- hero */

main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--page-x);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: clamp(36px, 5vw, 88px);
  align-items: end;
  padding: clamp(52px, 8vw, 96px) 0 clamp(38px, 5vw, 58px);
}

.overline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font: 0.59375rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  flex-wrap: wrap;
}

.tag {
  color: var(--on-acid);
  background: var(--acid);
  padding: 4px 6px 3px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.overline-session {
  margin-left: auto;
  color: var(--faint);
  font-size: 0.53125rem;
  letter-spacing: 0.12em;
}

h1 {
  margin: 26px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.7rem, 7.4vw, 7rem);
  line-height: 0.87;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

h1 em {
  font-style: italic;
  color: var(--acid);
  padding-right: 0.06em;
}

.lede {
  max-width: 56ch;
  margin: 30px 0 0;
  color: var(--ink-dim);
  font-size: 0.9375rem;
  line-height: 1.72;
}

.lede-cn {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.78125rem;
  letter-spacing: 0.02em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
  color: var(--faint);
  font: 0.59375rem/1.6 var(--mono);
  letter-spacing: 0.03em;
}

.pulse-mark {
  width: 5px;
  height: 5px;
  background: var(--acid);
  flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.plate {
  position: relative;
  padding: 20px 22px 18px;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(145deg, rgba(var(--acid-rgb), 0.055), transparent 46%),
    linear-gradient(180deg, rgba(var(--tint-rgb), 0.025), transparent),
    var(--bg-raised);
  clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 17px, 100% 100%, 0 100%);
  overflow: hidden;
}

.plate::before,
.plate::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  pointer-events: none;
}
.plate::before {
  left: -1px;
  bottom: -1px;
  border-left: 1px solid var(--acid);
  border-bottom: 1px solid var(--acid);
  opacity: 0.55;
}
.plate::after {
  right: 15px;
  top: 15px;
  border-top: 1px solid rgba(var(--ink-rgb), 0.25);
  border-right: 1px solid rgba(var(--ink-rgb), 0.25);
  transform: rotate(0deg);
}

.plate-head,
.plate-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: 0.53125rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.plate-algo {
  color: var(--faint);
  letter-spacing: 0.08em;
}

.signature {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px 5px;
  margin: 24px 0 20px;
  font: 500 clamp(0.75rem, 1.2vw, 0.9375rem) / 1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--acid);
  font-variant-numeric: tabular-nums;
}

.sig-group {
  display: block;
  padding: 7px 7px 6px;
  background: rgba(var(--acid-rgb), 0.05);
  border-left: 1px solid rgba(var(--acid-rgb), 0.22);
  min-width: 0;
  overflow: hidden;
}

.signature-idle {
  grid-column: 1 / -1;
  font: 0.625rem var(--mono);
  letter-spacing: 0.1em;
  color: var(--faint);
  padding: 10px 0;
}

.ellipsis {
  display: inline-block;
  animation: ellipsis 1.4s steps(4, end) infinite;
  width: 1.2em;
  overflow: hidden;
  vertical-align: bottom;
}

.plate-foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--faint);
}

.plate-count {
  color: var(--muted);
  margin-left: auto;
}

.plate-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--acid-rgb), 0.75), transparent);
  animation: scan 5.5s var(--ease) infinite;
  opacity: 0.45;
  pointer-events: none;
}

.hero-readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: rgba(var(--tint-rgb), 0.012);
}

.hero-readout > div {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.hero-readout > div:last-child {
  border-right: 0;
}

.readout-label {
  display: block;
  font: 0.5rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}

.readout-value {
  display: block;
  font: 500 0.65625rem/1.4 var(--mono);
  color: var(--ink-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  position: relative;
  padding: 22px 24px 19px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.stat:first-child {
  padding-left: 0;
}
.stat:last-child {
  border-right: 0;
  padding-right: 0;
}

.stat-index {
  position: absolute;
  top: 15px;
  right: 18px;
  font: italic 0.6875rem/1 var(--serif);
  color: var(--faint);
}
.stat:last-child .stat-index {
  right: 0;
}

.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.1vw, 2.9rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-label {
  display: block;
  margin-top: 10px;
  font: 0.5625rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.stat-foot {
  display: block;
  margin-top: 5px;
  font: 0.5625rem/1.4 var(--mono);
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------- shell + rail */

.shell {
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  padding: clamp(38px, 5vw, 62px) 0 40px;
  align-items: start;
}

.rail {
  min-width: 0;
  /* Stretch the grid item to the full row height so the inner
     `.rail-sticky` has room to travel while the content scrolls. */
  align-self: stretch;
}

.rail-sticky {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 128px);
}

.rail-title {
  margin: 0 0 18px;
  font: 0.53125rem/1 var(--mono);
  letter-spacing: 0.24em;
  color: var(--faint);
}

.rail-nav {
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
}

.rail-group {
  margin-bottom: 22px;
}

.rail-group-label {
  display: block;
  margin-bottom: 7px;
  font: 0.5rem/1 var(--mono);
  letter-spacing: 0.2em;
  color: var(--faint);
}

.rail-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0 5px 10px;
  margin-left: -11px;
  border-left: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font: 0.625rem/1.45 var(--mono);
  letter-spacing: 0.01em;
  transition: color 0.2s, border-color 0.2s;
}

.rail-link .n {
  min-width: 15px;
  color: var(--faint);
  font-size: 0.53125rem;
  font-variant-numeric: tabular-nums;
}

.rail-link:hover {
  color: var(--ink);
}

.rail-link.active {
  color: var(--acid);
  border-left-color: var(--acid);
}
.rail-link.active .n {
  color: var(--acid);
}

.rail-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 7px;
  font: 0.53125rem/1.4 var(--mono);
  color: var(--faint);
}
.rail-foot p {
  margin: 4px 0 0;
}

.rail-key {
  display: flex;
  align-items: center;
  gap: 6px;
}

.key-dot {
  width: 5px;
  height: 5px;
  display: inline-block;
  flex: none;
}
.key-acid {
  background: var(--acid);
}
.key-coral {
  background: var(--coral);
}

/* ---------------------------------------------------------------- cards */

.content {
  min-width: 0;
}

.card {
  position: relative;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(var(--tint-rgb), 0.022), rgba(var(--tint-rgb), 0.004)),
    var(--bg);
  scroll-margin-top: 100px;
  animation: card-in 0.45s var(--ease) both;
}

.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 11px;
  height: 11px;
  border-top: 1px solid var(--acid);
  border-left: 1px solid var(--acid);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.card.is-loaded::before {
  opacity: 0.65;
}
.card.is-error::before {
  border-color: var(--coral);
  opacity: 0.8;
}

.card-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.card-index {
  padding-top: 5px;
  font: italic 0.75rem/1 var(--serif);
  letter-spacing: 0.04em;
  color: var(--acid);
}

.card-titles h2 {
  margin: 0;
  font: 400 clamp(1.45rem, 2.2vw, 1.82rem) / 1.1 var(--serif);
  letter-spacing: -0.015em;
  color: var(--ink);
}

.card-titles p {
  max-width: 74ch;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1.55;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.card-body {
  padding: 22px 24px 26px;
  min-width: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font: 0.5625rem/1 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip-ok {
  color: var(--acid);
  border-color: rgba(var(--acid-rgb), 0.32);
  background: rgba(var(--acid-rgb), 0.055);
}
.chip-warn {
  color: var(--amber);
  border-color: rgba(var(--amber-rgb), 0.3);
  background: rgba(var(--amber-rgb), 0.055);
}
.chip-bad {
  color: var(--coral);
  border-color: rgba(var(--coral-rgb), 0.34);
  background: rgba(var(--coral-rgb), 0.06);
}
.chip-pending {
  color: var(--faint);
  border-color: var(--line);
}

.chip-live::before {
  content: "";
  width: 4px;
  height: 4px;
  background: currentColor;
  animation: pulse 1.8s infinite;
}

/* ---------------------------------------------------------------- key/value */

.kv-block {
  margin: 0 0 16px;
  min-width: 0;
}
.kv-block:last-child {
  margin-bottom: 0;
}

.kv-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 2px;
  font: 0.53125rem/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.kv-group::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.kv-group .group-count {
  color: var(--faint);
  letter-spacing: 0.04em;
}

.kv-block.depth-2 .kv-group,
.kv-block.depth-3 .kv-group {
  color: var(--muted);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
}

.kv {
  display: grid;
  grid-template-columns: minmax(140px, 0.52fr) minmax(0, 1.48fr);
  column-gap: 24px;
  margin: 0;
}

.kv dt {
  padding: 8px 0;
  border-bottom: 1px dotted rgba(var(--ink-rgb), 0.09);
  color: var(--faint);
  font: 0.5625rem/1.7 var(--mono);
  letter-spacing: 0.075em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.kv dd {
  min-width: 0;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px dotted rgba(var(--ink-rgb), 0.09);
  color: var(--ink-dim);
  font: 0.6875rem/1.65 var(--mono);
  overflow-wrap: anywhere;
}
.kv dd.is-empty {
  color: var(--faint);
}

.value-bool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 0.5625rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.value-bool::before {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
}
.bool-yes {
  color: var(--acid);
}
.bool-no {
  color: var(--faint);
}

.value-hash {
  color: var(--acid);
  letter-spacing: 0.05em;
}

.value-num {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.value-void {
  color: var(--faint);
}

.value-string.is-long {
  display: inline;
}

.value-url {
  color: var(--sky);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip-item {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid var(--line);
  background: rgba(var(--tint-rgb), 0.012);
  color: var(--ink-dim);
  font: 0.53125rem/1.5 var(--mono);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.chip-cloud {
  max-height: 158px;
  overflow-y: auto;
  padding-right: 4px;
}

.empty-note {
  color: var(--faint);
  font: 0.59375rem/1.6 var(--mono);
  letter-spacing: 0.03em;
  padding: 6px 0;
}

/* ---------------------------------------------------------------- tables */

.table-wrap {
  max-height: 440px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--sunken);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font: 0.625rem/1.55 var(--mono);
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg-raised);
  color: var(--faint);
  font: 0.5rem/1.3 var(--mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.06);
  color: var(--ink-dim);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover td {
  background: rgba(var(--tint-rgb), 0.018);
}
.data-table td.num,
.data-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- server block */

.request-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  font: 0.6875rem/1.7 var(--mono);
  margin-bottom: 18px;
}
.request-method {
  color: var(--acid);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.request-path {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.request-http {
  color: var(--faint);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
.summary-cell {
  padding: 11px 13px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.summary-cell:last-child {
  border-right: 0;
}
.summary-cell .k {
  display: block;
  color: var(--faint);
  font: 0.5rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.summary-cell .v {
  display: block;
  color: var(--ink);
  font: 0.625rem/1.4 var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 12px;
}

.toolbar-label {
  font: 0.53125rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.field {
  flex: 1;
  min-width: 170px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line-2);
}
.field svg {
  color: var(--faint);
  flex: none;
}
.field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: 0.625rem var(--mono);
  padding: 3px 0;
}
.field input::placeholder {
  color: var(--faint);
}

.header-table td:first-child {
  width: 34px;
  color: var(--faint);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.header-name {
  color: var(--ink);
  white-space: nowrap;
}
.header-name.h-sec {
  color: var(--sky);
}
.header-name.h-cookie {
  color: var(--amber);
}
.header-name.h-fetch {
  color: var(--mint);
}
.header-name.h-cdn {
  color: var(--coral);
}
.header-name.h-accept {
  color: var(--muted);
}
.header-dupe {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 4px;
  border: 1px solid rgba(var(--amber-rgb), 0.4);
  color: var(--amber);
  font-size: 0.4375rem;
  letter-spacing: 0.06em;
  vertical-align: middle;
}
.header-value {
  color: var(--ink-dim);
  overflow-wrap: anywhere;
}
.header-row.is-filtered {
  display: none;
}
.header-count {
  margin-left: auto;
  font: 0.53125rem var(--mono);
  color: var(--faint);
}

/* ---------------------------------------------------------------- callouts */

.callout {
  display: flex;
  gap: 10px;
  padding: 11px 13px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: rgba(var(--tint-rgb), 0.014);
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1.6;
}
.callout:last-child {
  margin-bottom: 0;
}
.callout strong {
  color: var(--ink);
  font-weight: 600;
}
.callout-icon {
  flex: none;
  color: var(--sky);
  font: 0.625rem/1.6 var(--mono);
}
.callout-warn {
  border-color: rgba(var(--amber-rgb), 0.24);
  background: rgba(var(--amber-rgb), 0.045);
}
.callout-warn .callout-icon {
  color: var(--amber);
}
.callout-bad {
  border-color: rgba(var(--coral-rgb), 0.28);
  background: rgba(var(--coral-rgb), 0.055);
}
.callout-bad .callout-icon {
  color: var(--coral);
}
.callout-ok {
  border-color: rgba(var(--acid-rgb), 0.24);
  background: rgba(var(--acid-rgb), 0.04);
}
.callout-ok .callout-icon {
  color: var(--acid);
}

/* ---------------------------------------------------------------- details panels */

details.panel {
  border: 1px solid var(--line);
  margin: 0 0 10px;
  background: rgba(var(--tint-rgb), 0.008);
}
details.panel:last-child {
  margin-bottom: 0;
}

details.panel > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  font: 0.53125rem/1.4 var(--mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-dim);
  user-select: none;
}
details.panel > summary::-webkit-details-marker {
  display: none;
}
details.panel > summary::before {
  content: "+";
  color: var(--acid);
  width: 10px;
  font-size: 0.6875rem;
}
details.panel[open] > summary::before {
  content: "−";
}
details.panel > summary:hover {
  color: var(--ink);
}
details.panel > summary .summary-right {
  margin-left: auto;
  color: var(--faint);
  letter-spacing: 0.04em;
  text-transform: none;
}
.panel-body {
  padding: 4px 13px 14px;
  border-top: 1px solid var(--line);
}

pre.code-block,
pre.raw-block {
  margin: 0;
  padding: 12px 13px;
  max-height: 360px;
  overflow: auto;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  color: var(--muted);
  font: 0.59375rem/1.65 var(--mono);
  white-space: pre;
  tab-size: 2;
}

pre.raw-block {
  color: var(--ink-dim);
  font-size: 0.59375rem;
}

/* ---------------------------------------------------------------- consistency */

.consistency-top {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
}

.gauge {
  --pct: 0;
  position: relative;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: conic-gradient(var(--acid) calc(var(--pct) * 1%), rgba(var(--ink-rgb), 0.075) 0);
  display: grid;
  place-items: center;
  transition: background 0.8s var(--ease);
}
.gauge::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--bg-raised);
}
.gauge-inner {
  position: relative;
  text-align: center;
}
.gauge-value {
  display: block;
  font: 400 2.2rem/1 var(--serif);
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.gauge-value small {
  font: 0.6875rem var(--mono);
  color: var(--muted);
  letter-spacing: 0;
}
.gauge-label {
  display: block;
  margin-top: 5px;
  font: 0.46875rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.consistency-summary h3 {
  margin: 0 0 8px;
  font: 400 1.45rem/1.2 var(--serif);
  letter-spacing: -0.01em;
}
.consistency-summary p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.71875rem;
  line-height: 1.6;
  max-width: 62ch;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.check {
  display: grid;
  grid-template-columns: 20px 158px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.07);
  align-items: start;
}

.check-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  font: 0.5625rem/1 var(--mono);
  color: var(--muted);
}
.check-match .check-icon {
  color: var(--acid);
  border-color: rgba(var(--acid-rgb), 0.4);
}
.check-mismatch .check-icon {
  color: var(--coral);
  border-color: rgba(var(--coral-rgb), 0.45);
}
.check-warn .check-icon {
  color: var(--amber);
  border-color: rgba(var(--amber-rgb), 0.4);
}

.check-label {
  padding-top: 2px;
  font: 0.5625rem/1.5 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.check-detail {
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1.55;
  min-width: 0;
}

.check-compare {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 7px;
  font: 0.53125rem/1.5 var(--mono);
  color: var(--faint);
}
.check-compare b {
  color: var(--faint);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.check-compare code {
  color: var(--ink-dim);
  background: rgba(var(--tint-rgb), 0.025);
  padding: 1px 4px;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- figures */

.figure-split {
  display: grid;
  grid-template-columns: minmax(250px, 0.88fr) minmax(0, 1.12fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 22px;
}

.screen-stage {
  position: relative;
  min-height: 200px;
  display: grid;
  place-items: center;
  padding: 26px 18px;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(0deg, rgba(var(--ink-rgb), 0.022) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(var(--ink-rgb), 0.022) 0 1px, transparent 1px 8px),
    var(--bg-deep);
}

.screen-frame {
  position: relative;
  border: 1px solid rgba(var(--ink-rgb), 0.45);
  display: grid;
  place-items: center;
  background: rgba(var(--tint-rgb), 0.015);
}

.avail-frame {
  position: relative;
  border: 1px dashed rgba(var(--ink-rgb), 0.28);
  display: grid;
  place-items: center;
}

.viewport-frame {
  position: relative;
  border: 1px solid rgba(var(--acid-rgb), 0.7);
  background: rgba(var(--acid-rgb), 0.12);
  display: grid;
  place-items: center;
}

.frame-tag {
  position: absolute;
  left: 4px;
  top: 3px;
  font: 0.4375rem/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--ink);
  background: rgba(var(--bg-rgb), 0.72);
  padding: 2px 3px;
  white-space: nowrap;
  z-index: 1;
}
.avail-frame .frame-tag {
  color: var(--muted);
}
.viewport-frame .frame-tag {
  color: var(--acid);
}

.figure-legend {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.legend-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px dotted rgba(var(--ink-rgb), 0.1);
  font: 0.59375rem/1.5 var(--mono);
}
.legend-row:last-child {
  border-bottom: 0;
}
.legend-row .k {
  color: var(--faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.5rem;
}
.legend-row .v {
  color: var(--ink-dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.legend-row .v.acid {
  color: var(--acid);
}
.legend-row .v.warn {
  color: var(--amber);
}

.canvas-figure {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 20px;
}
.canvas-preview {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
  border: 1px solid var(--line-2);
  background: #f2efe6;
}
.canvas-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.canvas-hash {
  font: 600 0.75rem/1.5 var(--mono);
  letter-spacing: 0.08em;
  color: var(--acid);
  overflow-wrap: anywhere;
}
.canvas-notes {
  color: var(--faint);
  font: 0.5625rem/1.6 var(--mono);
}

.renderer-callout {
  border-left: 2px solid var(--acid);
  padding: 3px 0 3px 15px;
  margin: 0 0 20px;
}
.renderer-callout .lab {
  display: block;
  font: 0.5rem/1 var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}
.renderer-callout .val {
  display: block;
  font: 0.75rem/1.6 var(--mono);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.renderer-callout .sub {
  display: block;
  margin-top: 3px;
  font: 0.59375rem/1.5 var(--mono);
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- timing */

.timing-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 14px 0 22px;
}

.timing-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 62px;
  gap: 12px;
  align-items: center;
  font: 0.53125rem/1.4 var(--mono);
}
.timing-row .t-label {
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.timing-track {
  height: 4px;
  background: rgba(var(--ink-rgb), 0.065);
  position: relative;
  overflow: hidden;
}
.timing-fill {
  height: 100%;
  width: 0;
  background: var(--acid);
  transition: width 0.8s var(--ease);
}
.timing-row.tone-warm .timing-fill {
  background: var(--amber);
}
.timing-row.tone-hot .timing-fill {
  background: var(--coral);
}
.timing-row.tone-cool .timing-fill {
  background: var(--sky);
}
.timing-row .t-value {
  text-align: right;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- permissions + features */

.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 5px;
}
.pill-grid-wide {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.pill {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  background: rgba(var(--tint-rgb), 0.01);
  font: 0.5625rem/1.3 var(--mono);
  color: var(--muted);
  min-width: 0;
}
.pill .pill-name {
  color: var(--ink-dim);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.pill .pill-state {
  flex: none;
  color: var(--faint);
  font-size: 0.46875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pill-granted {
  border-color: rgba(var(--acid-rgb), 0.27);
}
.pill-granted .pill-state {
  color: var(--acid);
}
.pill-denied {
  border-color: rgba(var(--coral-rgb), 0.26);
}
.pill-denied .pill-state {
  color: var(--coral);
}
.pill-prompt .pill-state {
  color: var(--amber);
}
.pill-on .pill-state {
  color: var(--acid);
}
.pill-off {
  opacity: 0.55;
}
.pill-off .pill-state {
  color: var(--faint);
}

.pill-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 8px;
  font: 0.5rem/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.pill-section-title:first-child {
  margin-top: 0;
}
.pill-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------------------------------------------------------------- misc visual blocks */

.hash-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px dotted rgba(var(--ink-rgb), 0.09);
  font: 0.5625rem/1.5 var(--mono);
}
.hash-row .k {
  min-width: 120px;
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hash-row .v {
  color: var(--acid);
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  border: 1px solid var(--line);
  margin-bottom: 20px;
}
.metric {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.metric:last-child {
  border-right: 0;
}
.metric .k {
  display: block;
  font: 0.46875rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}
.metric .v {
  display: block;
  font: 500 0.8125rem/1.3 var(--mono);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-state {
  border: 1px solid rgba(var(--coral-rgb), 0.25);
  background: rgba(var(--coral-rgb), 0.045);
  padding: 14px;
}
.error-state h3 {
  margin: 0 0 6px;
  font: 0.625rem/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coral);
}
.error-state p {
  margin: 0;
  color: var(--muted);
  font: 0.625rem/1.6 var(--mono);
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- raw */

.raw-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.raw-toolbar .spacer {
  flex: 1;
}

.raw-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------------------------------------------------------------- epilogue + footer */

.epilogue {
  margin: 38px 0 0;
  padding: 34px 0 0;
  border-top: 1px solid var(--line);
  max-width: 72ch;
}
.epilogue-mark {
  margin: 0 0 14px;
  color: var(--acid);
  font-size: 0.8125rem;
}
.epilogue > p {
  margin: 0 0 14px;
  font: 400 1.0625rem/1.62 var(--serif);
  color: var(--ink-dim);
}
.epilogue-note {
  margin-top: 22px !important;
  padding-left: 14px;
  border-left: 1px solid var(--line-2);
  color: var(--faint) !important;
  font: 0.65625rem/1.7 var(--sans) !important;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 24px var(--page-x);
  color: var(--faint);
  font: 0.5rem/1.5 var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.footer-mid {
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: none;
}

/* ---------------------------------------------------------------- skeleton + status */

.skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}
.skeleton {
  display: block;
  height: 9px;
  background: linear-gradient(90deg, rgba(var(--tint-rgb), 0.035), rgba(var(--tint-rgb), 0.075), rgba(var(--tint-rgb), 0.035));
  background-size: 220% 100%;
  animation: shimmer 1.6s linear infinite;
}
.w-40 {
  width: 40%;
}
.w-55 {
  width: 55%;
}
.w-70 {
  width: 70%;
}
.w-80 {
  width: 80%;
}
.w-85 {
  width: 85%;
}
.w-90 {
  width: 90%;
}
.w-95 {
  width: 95%;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  transform: translate(-50%, 14px);
  padding: 11px 16px;
  border: 1px solid var(--acid);
  background: var(--acid);
  color: var(--on-acid);
  font: 600 0.5625rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s, transform 0.24s;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.is-error {
  background: var(--coral);
  border-color: var(--coral);
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 40px;
  background: var(--bg);
  text-align: center;
}
.noscript h1 {
  font-size: 2.4rem;
  margin: 0;
}
.noscript p {
  color: var(--muted);
}
.noscript pre {
  padding: 12px;
  border: 1px solid var(--line);
  color: var(--acid);
}

/* ---------------------------------------------------------------- motion */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.85s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 85ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes scan {
  0% {
    top: 8%;
    opacity: 0;
  }
  12% {
    opacity: 0.5;
  }
  55% {
    top: 92%;
    opacity: 0.2;
  }
  70%,
  100% {
    top: 92%;
    opacity: 0;
  }
}

@keyframes ellipsis {
  from {
    width: 0;
  }
  to {
    width: 1.2em;
  }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1240px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 40px;
  }
  .card-head {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }
}

@media (max-width: 1080px) {
  .topbar {
    min-height: 62px;
  }
  .shell {
    display: block;
    padding-top: 0;
  }
  .rail {
    position: sticky;
    top: 62px;
    z-index: 30;
    margin: 0 calc(-1 * var(--page-x));
    padding: 9px var(--page-x);
    border-bottom: 1px solid var(--line);
    background: rgba(var(--bg-rgb), 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .rail-sticky {
    position: static;
    display: block;
    max-height: none;
  }
  .rail-title,
  .rail-foot,
  .rail-group-label {
    display: none;
  }
  .rail-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 0;
  }
  .rail-nav::-webkit-scrollbar {
    display: none;
  }
  .rail-group {
    display: flex;
    gap: 6px;
    margin: 0;
    flex: none;
  }
  .rail-link {
    margin: 0;
    padding: 7px 10px;
    border: 1px solid var(--line);
    white-space: nowrap;
    font-size: 0.5625rem;
  }
  .rail-link .n {
    display: none;
  }
  .rail-link.active {
    border-color: rgba(var(--acid-rgb), 0.4);
    background: var(--acid-soft);
  }
  .content {
    padding-top: 20px;
  }
  .card {
    scroll-margin-top: 128px;
  }
  .hero {
    padding-top: 54px;
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 14px;
  }
  .status-detail,
  .status-rule {
    display: none;
  }
  .topbar-center {
    justify-content: flex-start;
  }
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 40px;
    padding-bottom: 44px;
  }
  .hero-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero-readout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-note {
    max-width: 56ch;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat:nth-child(2) {
    border-right: 0;
    padding-right: 0;
  }
  .stat:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid var(--line);
  }
  .stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .stat:nth-child(2) .stat-index,
  .stat:nth-child(4) .stat-index {
    right: 0;
  }
  .stat:nth-child(3) .stat-index {
    right: 18px;
  }
  .figure-split {
    grid-template-columns: 1fr;
  }
  .canvas-figure {
    grid-template-columns: 1fr;
  }
  .consistency-top {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 20px;
  }
  .gauge {
    width: 106px;
    height: 106px;
  }
  .gauge-value {
    font-size: 1.85rem;
  }
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .summary-cell:nth-child(2) {
    border-right: 0;
  }
  .summary-cell:nth-child(3),
  .summary-cell:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .summary-cell:nth-child(4) {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 10px;
  }
  .brand-sub {
    display: none;
  }
  .status-text {
    font-size: 0.5rem;
    letter-spacing: 0.12em;
  }
  .topbar-actions .btn {
    height: 32px;
    padding: 0 10px;
  }
  .btn-label {
    font-size: 0.53125rem;
  }
  .hero {
    padding-top: 40px;
  }
  h1 {
    font-size: clamp(3.1rem, 13.4vw, 4.6rem);
  }
  .overline {
    gap: 8px;
  }
  .overline-session {
    display: none;
  }
  .lede {
    font-size: 0.875rem;
  }
  .hero-actions .btn-lg {
    height: 42px;
    padding: 0 15px;
    font-size: 0.59375rem;
  }
  .card-head {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 17px 17px 15px;
  }
  .card-index {
    display: none;
  }
  .card-titles p {
    font-size: 0.65625rem;
  }
  .card-body {
    padding: 17px 17px 20px;
  }
  .card-meta {
    padding-top: 2px;
  }
  .kv {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
  .kv dt {
    padding-bottom: 1px;
    border-bottom: 0;
  }
  .kv dd {
    padding-top: 0;
    padding-bottom: 10px;
  }
  .check {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 6px 10px;
  }
  .check-detail {
    grid-column: 2;
  }
  .summary-strip {
    grid-template-columns: 1fr;
  }
  .summary-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .summary-cell:last-child {
    border-bottom: 0;
  }
  .timing-row {
    grid-template-columns: 78px minmax(0, 1fr) 54px;
    gap: 8px;
  }
  .raw-toolbar .spacer {
    display: none;
  }
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .footer-mid {
    color: var(--faint);
  }
}

@media (max-width: 520px) {
  .brand {
    gap: 8px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
  }
  .brand-name {
    font-size: 0.65625rem;
    letter-spacing: 0.18em;
  }
  .btn-quiet {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stat {
    padding: 17px 0 !important;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .stat:first-child {
    border-top: 0;
  }
  .stat-num {
    font-size: 2.3rem;
  }
  .stat-index {
    top: 20px;
    right: 0 !important;
  }
  .hero-readout {
    grid-template-columns: 1fr;
  }
  .hero-readout > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .hero-readout > div:last-child {
    border-bottom: 0;
  }
  .signature {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    font-size: 0.78125rem;
  }
  .consistency-top {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .gauge {
    display: none;
  }
  .figure-split {
    gap: 18px;
  }
  .screen-stage {
    padding: 20px 10px;
  }
  .timing-row {
    grid-template-columns: 70px minmax(0, 1fr) 48px;
    font-size: 0.5rem;
  }
  .pill-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pill-grid-wide {
    grid-template-columns: 1fr;
  }
  .card-titles p {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------- added detail */

.waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 52px;
  margin: 14px 0 18px;
  padding: 0 2px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.wave-bar {
  flex: 1;
  min-height: 2px;
  background: linear-gradient(180deg, rgba(var(--acid-rgb), 0.9), rgba(var(--acid-rgb), 0.28));
  opacity: 0.75;
}

.font-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 168px;
  overflow-y: auto;
  margin: 6px 0 16px;
  padding-right: 4px;
}
.font-chip {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid var(--line);
  background: rgba(var(--tint-rgb), 0.012);
  color: var(--ink-dim);
  font: 0.5625rem/1.4 var(--mono);
  letter-spacing: 0.01em;
}

details.raw-panel > summary {
  position: sticky;
  top: 0;
  background: var(--bg-raised);
  z-index: 2;
}
details.raw-panel .panel-body {
  padding-top: 12px;
}
details.raw-panel pre.raw-block {
  max-height: 420px;
}

.raw-toolbar {
  min-height: 26px;
}
.raw-toolbar .spacer {
  flex: 1;
}


details.nested-block {
  border-bottom: 1px dotted rgba(var(--ink-rgb), 0.1);
}
details.nested-block > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font: 0.53125rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  user-select: none;
}
details.nested-block > summary::-webkit-details-marker {
  display: none;
}
details.nested-block > summary::before {
  content: "+";
  color: var(--acid);
  width: 9px;
}
details.nested-block[open] > summary::before {
  content: "−";
}
details.nested-block > summary .group-count {
  margin-left: auto;
  color: var(--faint);
  letter-spacing: 0.02em;
  text-transform: none;
}
details.nested-block > summary:hover {
  color: var(--ink);
}
.nested-body {
  margin: 0 0 6px 9px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


.tag.is-static {
  background: var(--amber);
}

.static-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.static-note p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.71875rem;
}
.static-note pre.code-block {
  margin: 0;
}
