/* Layout: a lab-notebook "differential" sheet. Ethereum is the reference trace;
   every other chain is read against it. Wide content column with a narrow
   marginal rail for labels that carry real values (opcodes, addresses, paths). */
@font-face { font-family: "Archivo"; src: url("fonts/archivo-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/sourceserif4-var.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/sourceserif4-var-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrainsmono-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  /* color */
  --paper: #eceff3;        /* cool vellum */
  --paper-2: #e2e6ec;      /* recessed panels */
  --sheet: #f7f8fa;        /* raised sheet (cards, matrix) */
  --ink: #0f1522;
  --ink-2: #3c4657;
  --muted: #677285;
  --rule: #c5ccd7;
  --rule-2: #d8dde5;
  --ref: #2236c9;          /* Ethereum reference / interactive */
  --ref-soft: #dfe3fb;
  --diff: #d93a1f;         /* differs from Ethereum */
  --diff-soft: #fbe1da;
  --fail: #b07800;         /* execution failure */
  --fail-soft: #f6ead0;
  --rej: #6a7488;          /* rpc rejected */
  --rej-soft: #dde1e8;
  --same: #c9d0db;
  --code-bg: #121826;
  --code-ink: #dde3ee;
  --code-dim: #7d889c;
  --code-kw: #9fb0ff;
  --code-ty: #7fd1c7;
  --code-str: #f0c27a;
  --code-num: #ff9b85;
  --code-cm: #6f7a8f;
  --unsafe: #d93a1f;
  --safe: #1f7a52;
  --shadow: 0 1px 0 rgba(15, 21, 34, 0.06), 0 8px 24px -12px rgba(15, 21, 34, 0.18);
  /* gas heatmap ramp: cool = cheaper than Ethereum, warm = pricier, --h0 = same */
  --h0: #dce1e9; --hw1: #f0a640; --hw2: #b3160f; --hc1: #6cc0c6; --hc2: #0b5470;

  /* type */
  --f-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --s-0: 0.8125rem;
  --s-1: 0.9375rem;
  --s-2: 1.0625rem;
  --s-3: 1.375rem;
  --s-4: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  --s-5: clamp(2.3rem, 1.4rem + 4.4vw, 5.6rem);

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b0f17; --paper-2: #111725; --sheet: #141b2a;
    --ink: #e7ebf2; --ink-2: #b9c2d1; --muted: #8b95a8; --rule: #2a3346; --rule-2: #1f2737;
    --ref: #93a2ff; --ref-soft: #1d2550;
    --diff: #ff6d4f; --diff-soft: #3a1a16;
    --fail: #e2b13c; --fail-soft: #33270e;
    --rej: #8d97ab; --rej-soft: #232b3b;
    --same: #2a3346;
    --code-bg: #070a11; --code-ink: #dde3ee;
    --unsafe: #ff6d4f; --safe: #49c58e;
    --shadow: 0 1px 0 rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
    --h0: #222b3b; --hw1: #b5701f; --hw2: #ff6a4a; --hc1: #24707c; --hc2: #6ad9e6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b0f17; --paper-2: #111725; --sheet: #141b2a;
  --ink: #e7ebf2; --ink-2: #b9c2d1; --muted: #8b95a8; --rule: #2a3346; --rule-2: #1f2737;
  --ref: #93a2ff; --ref-soft: #1d2550;
  --diff: #ff6d4f; --diff-soft: #3a1a16;
  --fail: #e2b13c; --fail-soft: #33270e;
  --rej: #8d97ab; --rej-soft: #232b3b;
  --same: #2a3346;
  --code-bg: #070a11; --code-ink: #dde3ee;
  --unsafe: #ff6d4f; --safe: #49c58e;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
  --h0: #222b3b; --hw1: #b5701f; --hw2: #ff6a4a; --hc1: #24707c; --hc2: #6ad9e6;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--s-2)/1.6 var(--f-body);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--ref); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ref); outline-offset: 2px; border-radius: 2px; }
code, pre, .mono { font-family: var(--f-mono); font-size: 0.86em; }
h1, h2, h3, h4 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.05; }
p { margin: 0; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--sheet); padding: 8px 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- label voice: condensed caps --- */
.label, .eyebrow {
  font-family: var(--f-display); font-stretch: 75%; font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--s-0); color: var(--muted);
}

/* --- top bar --- */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.bar .wrap { display: flex; align-items: center; gap: 20px; height: 52px; }
.brand { font-family: var(--f-mono); font-size: 0.82rem; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand b { color: var(--diff); font-weight: 600; }
.nav { display: flex; gap: clamp(10px, 1.1vw, 18px); margin-left: auto; overflow-x: auto; flex: 0 0 auto; scrollbar-width: none; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { font-family: var(--f-display); font-stretch: 80%; font-weight: 600; font-size: 0.85rem; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--ref); }
.theme-btn {
  flex: none; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
}
.theme-btn svg { width: 16px; height: 16px; }
@media (max-width: 860px) { .nav { display: none; } .theme-btn { margin-left: auto; } }

/* --- section frame with marginal rail --- */
.sec { padding-block: clamp(48px, 6.5vw, 92px); border-top: 1px solid var(--rule); }
.sec-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px 40px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head .rail { padding-top: 0.6em; }
.sec-head .rail .mono { display: block; color: var(--ink-2); font-size: 0.78rem; margin-top: 4px; }
.sec-head h2 { font-size: var(--s-4); font-weight: 800; font-stretch: 108%; letter-spacing: -0.01em; }
.sec-head .lede { margin-top: 14px; max-width: 64ch; color: var(--ink-2); font-size: var(--s-2); }
@media (max-width: 860px) { .sec-head { grid-template-columns: minmax(0, 1fr); } .sec-head .rail { padding-top: 0; } }

/* --- hero --- */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero .kicker { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 26px; }
.hero h1 {
  font-size: clamp(2.05rem, 0.7rem + 5.6vw, 4.6rem); font-weight: 850; font-stretch: 100%; letter-spacing: -0.03em; line-height: 0.98;
}
@media (min-width: 981px) { .hero h1 { font-size: clamp(2.6rem, 0.1rem + 4vw, 4.4rem); } }
.hero h1 .ln { display: block; white-space: nowrap; }
.hero h1 .ln-a { color: var(--muted); }
.hero h1 .ln-a s { text-decoration: none; }
.hero h1 .ln-b { color: var(--ink); }
.hero h1 .k { color: var(--diff); }
.hero h1 .sig { font-family: var(--f-mono); font-weight: 500; font-size: 0.32em; vertical-align: 0.65em; margin-right: 0.35em; letter-spacing: 0; }
.hero h1 .ln-a .sig { color: var(--ref); }
.hero h1 .ln-b .sig { color: var(--diff); }
.hero .dek { margin-top: 28px; max-width: 54ch; font-size: clamp(1.06rem, 1rem + 0.35vw, 1.25rem); color: var(--ink-2); }
.stats { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.1fr) minmax(0, 1.3fr); border-top: 2px solid var(--ink); }
.stat { padding: 14px 16px 4px 0; display: grid; gap: 2px; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--rule); }
.stat .v { font-family: var(--f-display); font-weight: 800; font-stretch: 100%; font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat .v.date { font-size: clamp(1.15rem, 0.8rem + 0.9vw, 1.6rem); padding-top: 0.5em; font-stretch: 85%; white-space: nowrap; }
.stat .v.hot { color: var(--diff); }
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
.cta-row { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 3px;
  font-family: var(--f-display); font-stretch: 90%; font-weight: 700; font-size: 0.95rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); color: var(--paper); background: var(--ink);
}
.btn.ghost { background: transparent; color: var(--ink); }
.btn:hover { background: var(--ref); border-color: var(--ref); color: #fff; }

/* hero matrix preview */
.scope {
  background: var(--sheet); border: 1px solid var(--rule); box-shadow: var(--shadow); border-radius: 4px; padding: 16px 16px 12px;
}
.scope-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 10px; }
.scope canvas { display: block; width: 100%; height: auto; cursor: pointer; }
.scope-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }

/* legend chips */
.chip { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-display); font-stretch: 85%; font-weight: 600; font-size: 0.8rem; color: var(--ink-2); }
.sw { width: 12px; height: 12px; border-radius: 2px; flex: none; display: inline-block; background: var(--same); }
.sw.same { background: var(--same); }
.sw.differs { background: var(--diff); }
.sw.execution-failure { background: var(--fail); }
.sw.rpc-rejected { background: repeating-linear-gradient(135deg, var(--rej) 0 2px, transparent 2px 4px); outline: 1px solid var(--rej); outline-offset: -1px; }
.sw.unavailable { background: transparent; outline: 1px dashed var(--rej); outline-offset: -1px; }
.sw.endpoint-artifact, .sw.state-only { background: var(--rej-soft); outline: 1px solid var(--rule); outline-offset: -1px; }
.sw.reference { background: var(--ref); }

/* --- probe mechanism --- */
.probe-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 980px) { .probe-grid { grid-template-columns: minmax(0, 1fr); } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps button {
  width: 100%; text-align: left; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 14px 14px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; font: inherit;
}
.steps button::before {
  content: counter(step); font-family: var(--f-mono); font-size: 0.8rem; font-weight: 600; color: var(--muted);
  width: 28px; height: 28px; border: 1px solid var(--rule); border-radius: 50%; display: grid; place-items: center;
}
.steps button[aria-selected="true"] { background: var(--sheet); border-color: var(--rule); box-shadow: var(--shadow); }
.steps button[aria-selected="true"]::before { background: var(--ref); color: #fff; border-color: var(--ref); }
.steps .t { font-family: var(--f-display); font-weight: 750; font-stretch: 100%; font-size: 1.05rem; display: block; }
.steps .d { color: var(--ink-2); font-size: 0.97rem; display: block; margin-top: 4px; }
.machine { background: var(--code-bg); color: var(--code-ink); border-radius: 6px; padding: clamp(16px, 2.5vw, 28px); font-family: var(--f-mono); font-size: 0.82rem; position: relative; overflow: hidden; min-width: 0; }
.machine .mhead { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--code-dim); font-size: 0.74rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.machine .lane { display: grid; gap: 14px; }
.panel { border: 1px solid #2a3245; border-radius: 4px; padding: 12px 14px; transition: border-color .3s, background-color .3s, opacity .3s; min-width: 0; }
.panel .ph { color: var(--code-dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.panel.on { border-color: #8c9bff; background: rgba(140, 155, 255, 0.07); }
.panel.dim { opacity: 0.38; }
.panel pre { margin: 0; white-space: pre-wrap; word-break: break-all; font-size: 0.82rem; line-height: 1.55; }
.ops { display: flex; flex-wrap: wrap; gap: 6px; }
.op { border: 1px solid #2f3850; border-radius: 3px; padding: 5px 7px; display: grid; gap: 1px; line-height: 1.2; min-width: 0; transition: background-color .25s, border-color .25s; }
.op b { color: #fff; font-weight: 600; font-size: 0.8rem; }
.op i { font-style: normal; color: var(--code-dim); font-size: 0.68rem; }
.op.hot { background: #2236c9; border-color: #8c9bff; }
.op.hot i { color: #c9d1ff; }
.k-key { color: var(--code-kw); }
.k-str { color: var(--code-str); }
.k-num { color: var(--code-num); }
.k-dim { color: var(--code-dim); }
.k-ok { color: #6fdca6; }
.wire { height: 18px; display: grid; place-items: center; color: var(--code-dim); }
.chainstate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.blocks { display: flex; gap: 4px; }
.blocks span { width: 26px; height: 18px; border: 1px solid #39425a; border-radius: 2px; }
.blocks span:last-child { border-style: dashed; }
.probe-note { margin-top: 18px; color: var(--ink-2); max-width: 60ch; }

/* --- findings --- */
.findings { display: grid; gap: clamp(28px, 4vw, 44px); }
.finding {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-width: 0;
}
@media (max-width: 1040px) { .finding { grid-template-columns: minmax(0, 1fr); } }
.f-main { padding: clamp(20px, 3vw, 36px); display: grid; gap: 22px; align-content: start; min-width: 0; }
.f-side { padding: clamp(20px, 3vw, 36px); border-left: 1px solid var(--rule); display: grid; gap: 18px; align-content: start; min-width: 0; background: var(--paper-2); border-radius: 0 4px 4px 0; }
@media (max-width: 1040px) { .f-side { border-left: 0; border-top: 1px solid var(--rule); border-radius: 0 0 4px 4px; } }
.f-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.f-num { font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); }
.finding h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); font-weight: 800; font-stretch: 104%; letter-spacing: -0.01em; }
.assume { border-left: 3px solid var(--rule); padding: 2px 0 2px 14px; }
.assume p { font-style: italic; font-size: 1.08rem; color: var(--ink-2); margin-top: 4px; }
.chains { display: flex; flex-wrap: wrap; gap: 6px; }
.cpill {
  font-family: var(--f-display); font-stretch: 88%; font-weight: 700; font-size: 0.85rem; padding: 4px 9px; border-radius: 3px;
  background: var(--diff-soft); color: var(--diff); border: 1px solid color-mix(in srgb, var(--diff) 35%, transparent);
  cursor: pointer; text-decoration: none;
}
.cpill.ref { background: var(--ref-soft); color: var(--ref); border-color: color-mix(in srgb, var(--ref) 35%, transparent); }
.why p { margin-top: 6px; max-width: 62ch; }
.out { background: var(--code-bg); color: var(--code-ink); border-radius: 4px; padding: 14px 16px; overflow-x: auto; font-family: var(--f-mono); font-size: 0.8rem; line-height: 1.6; }
.out .row { display: grid; gap: 2px; }
.out .val { white-space: pre-wrap; overflow-wrap: anywhere; }
.out .who { color: var(--code-dim); }
.out .who.eth { color: #9fb0ff; }
.out .who.tgt { color: #ff9b85; }
.out .val { color: #fff; }
.out .row + .row { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #2a3245; }
.ev { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--f-mono); font-size: 0.76rem; }
.ev a { color: var(--ink-2); }
.code { border-radius: 4px; overflow: hidden; border: 1px solid #1c2334; min-width: 0; }
.code .ch { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; font-family: var(--f-display); font-stretch: 85%; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.code.unsafe .ch { background: color-mix(in srgb, var(--unsafe) 18%, var(--code-bg)); color: #ffb3a4; }
.code.safe .ch { background: color-mix(in srgb, var(--safe) 26%, var(--code-bg)); color: #9de6c2; }
.code pre { margin: 0; background: var(--code-bg); color: var(--code-ink); padding: 12px 14px; overflow-x: auto; font-size: 0.78rem; line-height: 1.6; }
.code .ch .mono { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: .7; }
.tok-kw { color: var(--code-kw); }
.tok-ty { color: var(--code-ty); }
.tok-str { color: var(--code-str); }
.tok-num { color: var(--code-num); }
.tok-cm { color: var(--code-cm); font-style: italic; }
.tok-fn { color: #e8d6ff; }

/* --- matrix --- */
.mx-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: end; margin-bottom: 14px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field select, .field input {
  font: 500 0.92rem var(--f-display); font-stretch: 92%; color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule); border-radius: 3px; padding: 8px 10px; min-width: 0; max-width: 100%;
}
.toggle { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-display); font-stretch: 90%; font-weight: 600; font-size: 0.9rem; cursor: pointer; padding-bottom: 8px; }
.toggle input { accent-color: var(--diff); width: 16px; height: 16px; }
.segs { display: inline-flex; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.segs button { font: 600 0.85rem var(--f-display); font-stretch: 88%; padding: 8px 12px; border: 0; background: var(--sheet); color: var(--ink-2); cursor: pointer; }
.segs button + button { border-left: 1px solid var(--rule); }
.segs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.mx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .mx-layout { grid-template-columns: minmax(0, 1fr); } }
.mx-frame { background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--shadow); min-width: 0; }
.mx-scroll { overflow: auto; max-height: min(78vh, 900px); overscroll-behavior-x: contain; }
table.mx { border-collapse: separate; border-spacing: 0; font-family: var(--f-display); font-size: 0.8rem; }
.mx th, .mx td { padding: 0; }
.mx thead th { position: sticky; top: 0; z-index: 3; background: var(--sheet); vertical-align: bottom; border-bottom: 1px solid var(--rule); }
.mx thead th.corner { left: 0; z-index: 4; text-align: left; padding: 8px 10px; min-width: 150px; }
.mx .colh { height: 128px; width: 25px; padding: 8px 0 !important; text-align: center; }
.mx .colh span {
  writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block;
  white-space: nowrap; font-weight: 650; font-stretch: 78%; color: var(--ink-2); font-size: 0.76rem; cursor: pointer; line-height: 1;
}
.mx .colh span:hover { color: var(--ref); }
.mx .colh.eth span { color: var(--ref); font-weight: 800; }
.mx .colh.sel span { color: var(--diff); }
.mx tbody th {
  position: sticky; left: 0; z-index: 2; background: var(--sheet); text-align: left; font-weight: 500; font-stretch: 85%;
  padding: 0 10px; white-space: nowrap; border-right: 1px solid var(--rule); font-family: var(--f-mono); font-size: 0.74rem; color: var(--ink-2);
  max-width: 160px; overflow: hidden; text-overflow: ellipsis;
}
.mx tr.cat th { font-family: var(--f-display); font-weight: 750; font-stretch: 85%; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding-top: 12px; padding-bottom: 4px; background: var(--sheet); }
.mx tr.cat td { background: var(--sheet); }
.mx td.c { width: 25px; height: 24px; text-align: center; border-right: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2); }
.mx td.c button { all: unset; display: block; width: 25px; height: 24px; cursor: pointer; position: relative; }
.mx td.c button::after { content: ""; position: absolute; inset: 6px 7px; border-radius: 2px; background: var(--same); }
.mx td.c.differs button::after { background: var(--diff); inset: 4px 5px; }
.mx td.c.execution-failure button::after { background: var(--fail); inset: 4px 5px; }
.mx td.c.rpc-rejected button::after { background: repeating-linear-gradient(135deg, var(--rej) 0 2px, transparent 2px 4px); outline: 1px solid var(--rej); }
.mx td.c.unavailable button::after { background: transparent; outline: 1px dashed var(--rej); inset: 7px 8px; }
.mx td.c.endpoint-artifact button::after, .mx td.c.state-only button::after { background: var(--rej-soft); outline: 1px solid var(--rule); }
.mx td.c.reference button::after { background: var(--ref); opacity: 0.85; }
.mx.hl td.c.same button::after, .mx.hl td.c.reference button::after { opacity: 0.35; }
.mx td.c button:hover::after, .mx td.c button:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 1px; }
.mx td.c button:focus-visible { outline: none; }
.mx td.c.picked button::after { outline: 2px solid var(--ref); outline-offset: 2px; }
.mx td.c.col-eth { background: color-mix(in srgb, var(--ref) 6%, transparent); }
.mx tr:hover th { color: var(--ink); }
.mx-legend { display: grid; gap: 10px; margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.mx-legend .lg { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 0.92rem; color: var(--ink-2); }
.mx-legend .lg .sw { margin-top: 5px; }
.mx-legend .lg b { font-family: var(--f-mono); font-weight: 600; font-size: 0.82rem; color: var(--ink); display: block; }
.mx-count { font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.inspector { position: sticky; top: 70px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--shadow); padding: 18px; display: grid; gap: 14px; min-width: 0; }
@media (max-width: 1100px) { .inspector { position: static; } }
.inspector h4 { font-size: 1.15rem; font-weight: 800; font-stretch: 100%; }
.inspector .sub { font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); word-break: break-all; }
.kv { display: grid; gap: 10px; }
.kv > div { display: grid; gap: 3px; min-width: 0; }
.kv .v { font-family: var(--f-mono); font-size: 0.8rem; background: var(--paper-2); border: 1px solid var(--rule-2); border-radius: 3px; padding: 7px 9px; word-break: break-all; color: var(--ink); max-height: 140px; overflow: auto; }
.kv .v.tgt { border-left: 3px solid var(--diff); }
.kv .v.eth { border-left: 3px solid var(--ref); }
.cls { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 0.8rem; font-weight: 600; }
.inspector .empty { color: var(--muted); font-size: 0.95rem; }
.inspector a.path { font-family: var(--f-mono); font-size: 0.76rem; word-break: break-all; }

/* --- per-chain --- */
.chain-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.chain-pick button {
  font: 650 0.86rem var(--f-display); font-stretch: 88%; padding: 6px 10px; border-radius: 3px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--sheet); color: var(--ink-2); display: inline-flex; gap: 7px; align-items: baseline;
}
.chain-pick button .n { font-family: var(--f-mono); font-size: 0.72rem; color: var(--diff); font-weight: 600; }
.chain-pick button .n.z { color: var(--muted); }
.chain-pick button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chain-pick button[aria-pressed="true"] .n { color: var(--paper); }
.cv { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .cv { grid-template-columns: minmax(0, 1fr); } }
.cv-meta { display: grid; gap: 14px; border-top: 2px solid var(--ink); padding-top: 14px; }
.cv-meta h3 { font-size: 2rem; font-weight: 850; font-stretch: 105%; }
.cv-meta dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 0.9rem; }
.cv-meta dt { font-family: var(--f-display); font-stretch: 80%; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.74rem; color: var(--muted); padding-top: 3px; }
.cv-meta dd { margin: 0; font-family: var(--f-mono); font-size: 0.8rem; word-break: break-all; min-width: 0; }
.tally { display: flex; gap: 0; height: 10px; border-radius: 2px; overflow: hidden; background: var(--same); }
.tally span { display: block; height: 100%; }
.cv-list { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.cv-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.cv-row.head { font-family: var(--f-display); font-stretch: 80%; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--muted); padding: 8px 0; }
.cv-row .p { display: grid; gap: 4px; min-width: 0; }
.cv-row .p b { font-family: var(--f-mono); font-weight: 600; font-size: 0.82rem; word-break: break-all; }
.cv-row .val { font-family: var(--f-mono); font-size: 0.78rem; word-break: break-all; min-width: 0; }
.cv-row .val.t { color: var(--diff); }
.cv-row .val.e { color: var(--ref); }
@media (max-width: 640px) {
  .cv-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .cv-row.head { display: none; }
  .cv-row .val::before { content: attr(data-l) " "; font-family: var(--f-display); font-stretch: 80%; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; color: var(--muted); }
}
.cv-empty { padding: 18px 0; color: var(--ink-2); }

/* --- catalog --- */
.cat-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin-bottom: 16px; }
.cat-tools .field.grow { flex: 1 1 280px; }
.cat-tools input[type="search"] { width: 100%; font-size: 1rem; padding: 10px 12px; }
.cat-count { font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); padding-bottom: 10px; }
.cat-list { display: grid; border-top: 2px solid var(--ink); }
.cat-item { border-bottom: 1px solid var(--rule); }
.cat-item summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 52px 150px minmax(0, 1fr) 130px; gap: 14px; padding: 12px 4px; align-items: baseline;
}
.cat-item summary::-webkit-details-marker { display: none; }
.cat-item summary:hover { background: var(--paper-2); }
.cat-item .no { font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); }
.cat-item .ch { font-family: var(--f-display); font-stretch: 88%; font-weight: 700; font-size: 0.95rem; }
.cat-item .ti { font-size: 0.98rem; min-width: 0; overflow-wrap: anywhere; }
.badge { justify-self: start; font-family: var(--f-mono); font-size: 0.7rem; font-weight: 600; padding: 2px 6px; border-radius: 2px; border: 1px solid var(--rule); color: var(--ink-2); white-space: nowrap; }
.badge.probe-verified { color: var(--safe); border-color: color-mix(in srgb, var(--safe) 40%, transparent); }
.badge.source-verified { color: var(--ref); border-color: color-mix(in srgb, var(--ref) 40%, transparent); }
.badge.doc-only { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 40%, transparent); }
.cat-body { padding: 4px 4px 18px calc(52px + 14px); display: grid; gap: 10px; max-width: 110ch; }
.cat-body p { font-size: 0.97rem; color: var(--ink-2); overflow-wrap: anywhere; }
.cat-body .ev { margin-top: 4px; }
@media (max-width: 760px) {
  .cat-item summary { grid-template-columns: 40px minmax(0, 1fr); }
  .cat-item .ti { grid-column: 1 / -1; }
  .cat-item .badge { grid-column: 2; }
  .cat-body { padding-left: 4px; }
}
.more { margin-top: 16px; }

/* --- checklist --- */
.check-grid { display: block; border-top: 2px solid var(--ink); }
.check-col { padding: 18px 22px 22px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.check-col h3 { font-size: 1.05rem; font-weight: 800; font-stretch: 95%; margin-bottom: 12px; }
.check-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-col li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: 0.97rem; }
.check-col li input { margin: 4px 0 0; accent-color: var(--ref); width: 15px; height: 15px; }
.check-col li label { cursor: pointer; }
.check-col li code { background: var(--paper-2); padding: 1px 4px; border-radius: 2px; }
.check-progress { font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); margin-top: 14px; }

/* --- method --- */
.method-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 900px) { .method-grid { grid-template-columns: minmax(0, 1fr); } }
.rounds { display: grid; gap: 14px; }
.round { display: grid; grid-template-columns: 90px minmax(0, 1fr) 54px; gap: 14px; align-items: center; }
.round .rl { font-family: var(--f-display); font-stretch: 85%; font-weight: 700; font-size: 0.9rem; }
.round .track { height: 22px; display: flex; gap: 2px; }
.round .track i { flex: 1 1 0; border-radius: 1px; background: var(--same); }
.round .track i.err { background: var(--diff); }
.round .track i.unv { background: var(--fail); }
.round .track i.ok { background: var(--safe); }
.round .rv { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.round .rv.bad { color: var(--diff); }
.limits { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.limits li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 0.97rem; }
.limits li b { font-family: var(--f-display); font-stretch: 90%; font-weight: 750; }
@media (max-width: 520px) { .limits li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.ai-line { margin-top: 28px; padding: 16px 18px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; font-size: 1.02rem; }
.credits { display: grid; gap: 8px; margin-top: 10px; }
.credits a { font-family: var(--f-mono); font-size: 0.85rem; }

footer.foot { border-top: 2px solid var(--ink); padding-block: 28px 48px; font-size: 0.92rem; color: var(--ink-2); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.author-slot { font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); }

.muted { color: var(--muted); }
.diffc { color: var(--diff); }
.refc { color: var(--ref); }
.nowrap { white-space: nowrap; }
.loading { color: var(--muted); font-family: var(--f-mono); font-size: 0.85rem; padding: 24px 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.sw.state-only { background: transparent; outline: 1px solid var(--rej); }
.mx td.c.state-only button::after { background: transparent; outline: 1px solid var(--rej); inset: 8px 9px; border-radius: 50%; }
@media (max-width: 640px) {
  .mx thead th.corner { min-width: 0; padding: 6px 8px; }
  .mx thead th.corner .label { font-size: 0.66rem; }
  .mx tbody th { max-width: 116px; font-size: 0.68rem; padding: 0 6px; }
  .mx .colh { height: 116px; }
  .mx-scroll { max-height: 70vh; }
}
.chain-pick button, .cpill, .chip, .nav a, .btn, .toggle, .segs button { word-spacing: 0.1em; }
@media (max-width: 980px) {
  .steps button[aria-selected="false"] .d { display: none; }
  .steps button { padding: 10px 12px; }
}
@media (max-width: 640px) {
  .chain-pick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: thin; }
  .chain-pick button { flex: none; }
}
.finding.stale { grid-template-columns: minmax(0, 1fr); border-style: dashed; box-shadow: none; background: transparent; }
.check-grid ul { list-style: none; margin: 0; padding: 18px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 36px; }
.check-grid li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: 0.97rem; }
.check-grid li input { margin: 4px 0 0; accent-color: var(--ref); width: 15px; height: 15px; }
.check-grid li label { cursor: pointer; }
.check-grid li code { background: var(--paper-2); padding: 1px 4px; border-radius: 2px; overflow-wrap: anywhere; }
@media (max-width: 760px) { .check-grid ul { grid-template-columns: minmax(0, 1fr); } }
.rtable-wrap { overflow-x: auto; }
.rtable { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.rtable th, .rtable td { text-align: left; padding: 8px 10px 8px 0; vertical-align: middle; }
.rtable thead th { font-family: var(--f-display); font-stretch: 80%; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--muted); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.rtable tbody th { font-family: var(--f-display); font-weight: 800; font-size: 1.1rem; }
.rtable .n { text-align: right; font-family: var(--f-display); font-weight: 750; font-variant-numeric: tabular-nums; }
.rtable .n.bad { color: var(--diff); } .rtable .n.unv { color: var(--fail); }
.rtable .track { display: flex; gap: 2px; height: 16px; min-width: 140px; }
.rtable .track i { flex: 1 1 0; border-radius: 1px; background: var(--same); }
.rtable .track i.err { background: var(--diff); } .rtable .track i.unv { background: var(--fail); } .rtable .track i.ok { background: var(--safe); }
.rtable tr.res td { font-size: .84rem; color: var(--ink-2); padding-top: 0; padding-bottom: 12px; border-bottom: 1px solid var(--rule-2); min-width: 260px; }
.endpoints { margin-top: 20px; }
.endpoints summary { cursor: pointer; }
.endpoints ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-family: var(--f-mono); font-size: .78rem; color: var(--ink-2); overflow-wrap: anywhere; }
.rtable td.mono { white-space: nowrap; font-size: .8rem; }
@media (max-width: 640px) {
  .rtable .hide-sm { display: none; }
  .rtable thead th { font-size: .64rem; letter-spacing: .04em; }
  .rtable tr.res td { min-width: 0; }
}

/* --- EVMish wordmark: solid EVM, "ish" set loose in serif italic over a ≈ wave --- */
.wm { display: inline-flex; align-items: baseline; gap: 0.04em; line-height: 1; white-space: nowrap; }
.wm-evm { font-family: var(--f-display); font-weight: 900; font-stretch: 112%; letter-spacing: -0.03em; color: var(--ink); }
.wm-ish {
  font-family: var(--f-body); font-style: italic; font-weight: 600; color: var(--diff); display: inline-block;
  transform: translateY(0.04em) rotate(-4deg); transform-origin: 0 100%;
  text-decoration: underline wavy; text-decoration-thickness: 0.07em; text-underline-offset: 0.16em; text-decoration-skip-ink: none;
}
.bar .brand { font-size: 1.32rem; text-decoration: none; }
.brand:hover .wm-ish { transform: translateY(0.02em) rotate(-8deg); }
.wm-ish { transition: transform .25s ease; }
.gh { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-display); font-stretch: 85%; font-weight: 650; font-size: 0.85rem; color: var(--ink-2); text-decoration: none; flex: none; }
.gh svg { width: 16px; height: 16px; }
.gh:hover { color: var(--ink); }
@media (max-width: 860px) { .gh { margin-left: auto; } .gh span { display: none; } .theme-btn { margin-left: 0; } }
footer.foot .wrap { align-items: flex-start; }
.foot-brand { display: grid; gap: 8px; max-width: 36ch; }
.foot-brand .brand { font-size: 1.7rem; text-decoration: none; }
.foot-meta { display: grid; gap: 6px; max-width: 64ch; font-size: .9rem; }

/* --- BLS: chains that fail closed --- */
.closed p { margin-top: 8px; font-size: 0.95rem; color: var(--ink-2); max-width: 62ch; }
.cpill.quiet { background: var(--paper-2); color: var(--ink-2); border-color: var(--rule); }

/* --- second sweep: ranked list --- */
.sweep { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.sx { display: grid; grid-template-columns: 150px minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px 32px; padding: 30px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.sx > * { min-width: 0; }
.sw-n { display: grid; gap: 6px; align-content: start; }
.sw-n .mono { font-family: var(--f-display); font-weight: 850; font-stretch: 100%; font-size: 2.6rem; line-height: .9; letter-spacing: -0.03em; color: var(--rule); font-variant-numeric: tabular-nums; }
.sx.feat .sw-n .mono { color: var(--ink); }
.sw-body { display: grid; gap: 16px; align-content: start; }
.sw-body h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.7rem); font-weight: 800; font-stretch: 102%; letter-spacing: -0.01em; text-wrap: balance; }
.sx.see .sw-body h3 { font-size: 1.2rem; }
.sx.see { grid-template-columns: 150px minmax(0, 1fr); padding: 22px 0; }
.sw-side { display: grid; gap: 14px; align-content: start; }
.sw-side p { margin-top: 4px; font-size: 0.97rem; max-width: 60ch; }
.sw-scope { color: var(--ink-2); }
.sw-rec { font-size: 0.86rem !important; color: var(--muted); }
.sw-also { font-size: 0.92rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bars { display: grid; gap: 8px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 14px 16px; box-shadow: var(--shadow); }
.bar { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.bar .bn { font-family: var(--f-display); font-stretch: 85%; font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .bt { height: 16px; background: var(--paper-2); border-radius: 2px; overflow: hidden; }
.bar .bt i { display: block; height: 100%; border-radius: 2px; }
.bar.t .bt i { background: var(--diff); }
.bar.e .bt i { background: var(--ref); }
.bar.e .bn { color: var(--ref); }
.bar .bv { font-family: var(--f-mono); font-size: 0.92rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; min-width: 9ch; }
.bars .ratio { font-family: var(--f-display); font-weight: 850; font-size: 1.5rem; letter-spacing: -0.01em; margin-top: 2px; }
.bars .ratio .muted { font-family: var(--f-body); font-weight: 400; font-size: 0.88rem; letter-spacing: 0; }
.bars .ratio.up { color: var(--diff); }
.bars .ratio.down { color: var(--hc2); }
.bars:has(.ratio.down) .bar.t .bt i { background: var(--hc2); }
table.cmp { border-collapse: collapse; font-family: var(--f-mono); font-size: 0.8rem; width: 100%; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; }
.cmp th, .cmp td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--rule-2); overflow-wrap: anywhere; }
.cmp thead th { font-family: var(--f-display); font-stretch: 85%; font-weight: 700; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cmp tbody th { font-weight: 500; color: var(--ink-2); }
.cmp tr.d td:first-of-type { color: var(--diff); font-weight: 700; }
.cmp tr.d td:last-of-type { color: var(--ref); }
@media (max-width: 1040px) {
  .sx, .sx.see { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 24px 0; }
  .sw-n { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 12px; }
  .sw-n .mono { font-size: 1.6rem; }
}
@media (max-width: 520px) { .bar { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 8px; } .bar .bv { min-width: 0; font-size: 0.82rem; } }

/* --- gas heatmap --- */
.gas-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); margin-bottom: 22px; }
.gas-stats .gs { padding: 14px 16px 14px 0; display: grid; gap: 4px; align-content: start; }
.gas-stats .gs + .gs { padding-left: 16px; border-left: 1px solid var(--rule); }
.gas-stats .v { font-family: var(--f-display); font-weight: 850; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.gas-stats .v.hot { color: var(--diff); }
.gas-stats .v.cool { color: var(--hc2); }
.gas-stats .l { font-size: 0.92rem; color: var(--ink-2); line-height: 1.35; }
@media (max-width: 760px) { .gas-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gas-stats .gs:nth-child(3) { padding-left: 0; border-left: 0; } .gas-stats .gs:nth-child(n+3) { border-top: 1px solid var(--rule); } }
.gas-tools { display: grid; gap: 12px; margin-bottom: 14px; }
.gas-fam { display: flex; flex-wrap: wrap; gap: 6px; }
.gas-fam button { font: 650 0.84rem var(--f-display); font-stretch: 88%; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 3px; background: var(--sheet); color: var(--ink-2); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: baseline; }
.gas-fam button .n { font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); }
.gas-fam button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gas-fam button[aria-pressed="true"] .n { color: inherit; opacity: .7; }
@media (max-width: 640px) { .gas-fam { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); scrollbar-width: thin; } }
.gas-tools-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; }
.gas-tools-row .toggle { padding-bottom: 0; }
.gas-scale { display: grid; grid-template-columns: auto minmax(160px, 240px) auto; gap: 2px 10px; align-items: center; font-family: var(--f-display); font-stretch: 85%; font-weight: 700; font-size: 0.8rem; color: var(--ink-2); }
.gas-scale .ramp { height: 12px; border-radius: 2px; background: linear-gradient(90deg, var(--hc2), var(--hc1) 25%, var(--h0) 50%, var(--hw1) 75%, var(--hw2)); }
.gas-scale .ticks { grid-column: 2; display: flex; justify-content: space-between; font-family: var(--f-mono); font-weight: 400; font-size: 0.68rem; color: var(--muted); }
.gas-scale .ticks i { font-style: normal; width: 0; display: flex; justify-content: center; white-space: nowrap; }
.gas-frame { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--shadow); min-width: 0; }
.gas-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
table.heat { border-collapse: separate; border-spacing: 0; font-family: var(--f-display); }
.heat th, .heat td { padding: 0; }
.heat thead th { background: var(--sheet); }
.heat thead th.corner { position: sticky; left: 0; z-index: 3; min-width: 150px; text-align: left; vertical-align: bottom; padding: 10px 12px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.heat thead th.corner .label { display: block; }
.heat thead th.corner .label + .label { text-align: right; margin-top: -1.2em; }
.heat tr.fam th:not(.corner) { text-align: left; border-left: 1px solid var(--rule); padding: 8px 0 4px 6px; vertical-align: bottom; }
.heat tr.fam th span { display: block; width: 0; min-width: 100%; overflow: hidden; text-overflow: clip; white-space: nowrap; font-weight: 750; font-stretch: 80%; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.heat tr.items th { height: 132px; vertical-align: bottom; padding: 4px 0 6px; border-bottom: 1px solid var(--rule); }
.heat tr.items th.fs { border-left: 1px solid var(--rule); }
.heat tr.items th span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; white-space: nowrap; font-family: var(--f-mono); font-size: 0.66rem; color: var(--ink-2); line-height: 1; width: 17px; text-align: left; }
.heat tbody th { position: sticky; left: 0; z-index: 2; background: var(--sheet); min-width: 150px; max-width: 150px; padding: 0 10px 0 12px; border-right: 1px solid var(--rule); text-align: left; font-weight: 650; font-stretch: 85%; font-size: 0.84rem; white-space: nowrap; }
.heat tbody th .rh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.heat tbody th .cn { overflow: hidden; text-overflow: ellipsis; }
.heat tbody th .n { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 600; color: var(--diff); }
.heat tbody th .n.z { color: var(--muted); font-weight: 400; }
.heat tbody th .n.ref { color: var(--ref); font-weight: 400; }
.heat tr.eth th .cn { color: var(--ref); font-weight: 800; }
.heat tr.eth td { border-bottom: 1px solid var(--rule); }
.heat td { width: 17px; height: 24px; vertical-align: middle; }
.heat td.fs { border-left: 1px solid var(--rule); }
.heat td button { all: unset; display: block; box-sizing: border-box; width: 15px; height: 20px; margin: 2px 1px; border-radius: 2px; cursor: pointer; }
.heat td.same button { background: var(--h0); }
.heat td.baseline button { background: color-mix(in srgb, var(--ref) 22%, var(--h0)); }
.heat td.control button { background: repeating-linear-gradient(135deg, var(--rej) 0 1.5px, transparent 1.5px 4.5px); opacity: .55; }
.heat td.failed button { background: var(--fail-soft); box-shadow: inset 0 0 0 1.5px var(--fail); }
.heat td.none button { box-shadow: inset 0 0 0 1px var(--rule); background: transparent; }
.heat td.zero button { box-shadow: inset 0 0 0 2px var(--sheet), inset 0 0 0 3px var(--hc2); }
.heat td button:hover, .heat td button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; position: relative; z-index: 1; }
.heat td.picked button { outline: 2px solid var(--ink); outline-offset: 1px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--ink) 18%, transparent); position: relative; z-index: 1; }
.heat tbody tr:hover th .cn { color: var(--ref); }
.gas-tip { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; background: var(--code-bg); color: var(--code-ink); border-radius: 4px; padding: 8px 10px; font-family: var(--f-mono); font-size: 0.76rem; line-height: 1.5; box-shadow: var(--shadow); white-space: nowrap; }
.gas-tip b { color: #fff; font-family: var(--f-display); font-size: 0.86rem; }
.gas-tip span { color: var(--code-dim); }
.gas-tip em { font-style: normal; font-family: var(--f-display); font-weight: 850; font-size: 1.05rem; }
.gas-tip em.pricier { color: #ff9b85; } .gas-tip em.cheaper { color: #7fe0ea; }
.gas-insp { margin-top: 16px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--shadow); padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px 28px; align-items: start; }
.gas-insp:empty { display: none; }
.gas-insp h4 { font-size: 1.15rem; font-weight: 800; margin-top: 4px; overflow-wrap: anywhere; }
.gi-nums { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.gi-nums div { display: grid; gap: 2px; }
.gi-nums b { font-family: var(--f-display); font-weight: 850; font-size: 1.7rem; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.gi-nums b.pricier { color: var(--diff); } .gi-nums b.cheaper { color: var(--hc2); } .gi-nums b.eth { color: var(--ref); } .gi-nums b.none, .gi-nums b.control, .gi-nums b.failed { color: var(--muted); }
.gi-txt { display: grid; gap: 8px; font-size: 0.94rem; color: var(--ink-2); min-width: 0; }
.gi-txt .cls { display: flex; gap: 8px; align-items: center; font-family: var(--f-display); font-weight: 700; color: var(--ink); flex-wrap: wrap; }
.gi-txt .cls .mono { font-weight: 400; font-size: 0.8rem; color: var(--muted); }
.gi-txt dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: 0.85rem; }
.gi-txt dt { font-family: var(--f-display); font-stretch: 85%; font-weight: 700; color: var(--muted); }
.gi-txt dd { margin: 0; font-family: var(--f-mono); font-size: 0.8rem; overflow-wrap: anywhere; }
.gi-txt .ev { word-break: break-all; }
@media (max-width: 1040px) { .gas-insp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .gi-txt { grid-column: 1 / -1; } }
@media (max-width: 560px) { .gas-insp { grid-template-columns: minmax(0, 1fr); padding: 16px; } }
.hsw { display: inline-block; width: 14px; height: 14px; border-radius: 2px; flex: none; }
.hsw.same { background: var(--h0); }
.hsw.baseline { background: color-mix(in srgb, var(--ref) 22%, var(--h0)); }
.hsw.control { background: repeating-linear-gradient(135deg, var(--rej) 0 1.5px, transparent 1.5px 4.5px); opacity: .7; outline: 1px solid var(--rule); }
.hsw.failed { background: var(--fail-soft); box-shadow: inset 0 0 0 1.5px var(--fail); }
.hsw.none { box-shadow: inset 0 0 0 1px var(--rule); }
.gas-legend { display: grid; gap: 10px; margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.gas-legend .lg { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 0.9rem; color: var(--ink-2); }
.gas-legend .lg .hsw { margin-top: 4px; }
.gas-legend .lg b { font-family: var(--f-display); font-weight: 750; font-size: 0.86rem; color: var(--ink); display: block; }
@media (max-width: 640px) {
  .heat thead th.corner, .heat tbody th { min-width: 112px; max-width: 112px; padding-left: 8px; padding-right: 6px; font-size: 0.78rem; }
  .heat td { width: 16px; }
  .heat td button { width: 14px; height: 20px; }
  .heat tr.items th span { width: 16px; }
  .gas-scale { grid-template-columns: auto minmax(120px, 1fr) auto; width: 100%; }
}
@media (max-width: 1240px) { .gh span { display: none; } }
@media (max-width: 1150px) { .nav a[href="#probe"], .nav a[href="#checklist"] { display: none; } }
.gas-note { margin-top: 10px; font-size: 0.92rem; color: var(--ink-2); max-width: 80ch; }
