/* KRNX pool front end — Antimetal / Kronex design system.
   Tokens from DESIGN-antimetal.md; component recipes as applied on
   explorer-testnet.kronex.network. */

@font-face { font-family: "Test Signifier"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/test-signifier-regular.woff2") format("woff2"); }
@font-face { font-family: "Test Signifier"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/test-signifier-regular-italic.woff2") format("woff2"); }
@font-face { font-family: "Test Signifier"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/test-signifier-light.woff2") format("woff2"); }

:root {
  --parchment: #d7d7d0;
  --cream: #f7f6f3;
  --bone: #fdfcfa;
  --bistre: #1a1614;
  --graphite: #66635f;
  --flint: #a8a7a1;
  --slate: #53504c;
  --ash: #2a2724;
  --quill: #e3e3de;
  --chartreuse: #e2e67d;
  --pill-label: #f4f4e7;
  --glass: #cfcfc8bd;
  --hair: rgba(26, 22, 20, 0.1);
  --ok-bg: rgb(240, 244, 214);
  --ok-fg: rgb(96, 104, 40);
  --serif: "Test Signifier", Georgia, "Times New Roman", serif;
  --sans: "Geist", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --page: 1200px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; background: var(--cream); color: var(--bistre); font-family: var(--sans); font-size: 14px; line-height: 21px; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
a { color: var(--bistre); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--graphite); }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; letter-spacing: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; }
h1 { font-size: 36px; line-height: 40px; letter-spacing: -0.012em; }
h2 { font-size: 28px; line-height: 34px; letter-spacing: -0.012em; }
h3 { font-size: 20px; line-height: 26px; letter-spacing: 0; }
p { margin: 0; }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }
.mono { font-family: var(--mono); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.sec { color: var(--graphite); }
.ter { color: var(--slate); }
.mut { color: var(--flint); }
.eb { font-family: var(--mono); font-size: 10px; line-height: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--graphite); font-variant-numeric: tabular-nums; }
.eb.mut { color: var(--flint); }
.ebm { font-family: var(--mono); font-size: 11px; line-height: 16px; letter-spacing: 0.66px; text-transform: uppercase; color: var(--graphite); }
.strong { font-size: 16px; line-height: 20px; font-weight: 500; }
.ago { font-size: 14px; line-height: 20px; color: var(--graphite); }

/* Layout */
.page { width: min(var(--page), calc(100% - 48px)); margin: 0 auto; padding: 32px 0 0; display: flex; flex-direction: column; gap: 32px; }
.grow { flex-grow: 1; min-height: 56px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.split-4-8 { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px; align-items: start; }
.split-7-5 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }
.split-5-7 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-28 { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; align-items: center; gap: 8px; }
.between { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.between-c { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.between-b { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }

/* Header capsule */
.topbar { padding: 20px 0 0; }
.capsule { width: min(var(--page), calc(100% - 48px)); margin: 0 auto; min-height: 54px; border: 1px solid var(--hair); border-radius: 82px; background: var(--glass); box-shadow: rgba(0, 0, 0, 0.08) 0 0 10px 0 inset; -webkit-backdrop-filter: blur(12px) saturate(1.75) brightness(1.1); backdrop-filter: blur(12px) saturate(1.75) brightness(1.1); padding: 10px 10px 10px 28px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.capsule .logo img { height: 36px; width: auto; display: block; }
/* Nav hover pill (kronex-web docs/08-navpill-hover.md): one 6% Bistre pill
   slides under whichever item the pointer or focus is on, and rests on the
   current page when the pointer leaves. Positioned by initNavpill in app.js. */
.navpill { position: relative; display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.navpill__indicator { position: absolute; top: 0; left: 0; z-index: 0; width: 0; height: 0; border-radius: 9999px; background: rgb(26 22 20 / 6%); pointer-events: none; opacity: 0; transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), width 360ms cubic-bezier(0.22, 1, 0.36, 1), height 360ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease; }
.navpill__item { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border: 0; border-radius: 9999px; background: none; font: 500 14px/1 var(--sans); letter-spacing: -0.01em; color: var(--slate); white-space: nowrap; transition: color 200ms ease; }
.navpill__item:hover, .navpill__item:focus-visible, .navpill__item[aria-current="page"] { color: var(--bistre); }
@media (prefers-reduced-motion: reduce) { .navpill__indicator, .navpill__item { transition-duration: 0.01ms; } }
.capsule .spacer { flex-grow: 1; }
.capsule form { margin: 0; }
.search { width: 300px; max-width: 100%; height: 34px; border-radius: 17px; }

/* Plates and cards */
.plate { background: var(--bone); border: 1px dashed var(--hair); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.plate .v { font-family: var(--serif); font-size: 24px; line-height: 30px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.plate .sub { font-size: 13px; line-height: 18px; color: var(--graphite); }
.card { background: var(--bone); border: 1px dashed var(--hair); }
.card.pad { padding: 24px; }
.hero { background: var(--parchment); border: 1px dashed var(--hair); padding: 56px 40px; display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.hero h1 { font-size: 48px; line-height: 54px; letter-spacing: -0.021em; }
.hero .lede { font-family: var(--serif); font-size: 22px; line-height: 30px; color: var(--slate); max-width: 54ch; }
/* The world model (kronex-web src/scripts/worldmodel.js) sits behind the copy
   as on kronex.network: a sphere pushed right, its outer dots drifting over
   the end of the text. The SVG constellation underneath is the fallback when
   WebGL or the script is not there. Desktop only. */
.hero { position: relative; overflow: hidden; min-height: 420px; }
.hero > .stack-16 { position: relative; z-index: 1; }
.wm { position: absolute; z-index: 0; top: 50%; right: -4%; width: min(640px, 56%); aspect-ratio: 1; transform: translateY(-48%); margin: 0; }
.wm-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.wm.is-live .wm-fallback { display: none; }
.wm-canvas { position: absolute; inset: 0; opacity: 0; transition: opacity .6s cubic-bezier(.22,1,.36,1); cursor: grab; }
.wm.is-live .wm-canvas { opacity: 1; }
.wm-canvas:active { cursor: grabbing; }
.wm-canvas canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.wm-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 2; display: none; }
.wm-leader-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wm-leader { stroke: rgba(245,158,58,0.85); stroke-width: 1; stroke-dasharray: 4 4; fill: none; }
.wm-pill { position: absolute; display: inline-flex; align-items: center; gap: calc(12px * var(--wm-pill-size, 1)); padding: calc(9px * var(--wm-pill-size, 1)) calc(18px * var(--wm-pill-size, 1)); border-radius: 9999px; background: rgba(253,252,250,0.6); -webkit-backdrop-filter: blur(14px) saturate(1.05); backdrop-filter: blur(14px) saturate(1.05); border: 1px solid var(--hair); color: var(--bistre); font-family: var(--mono); font-size: calc(12px * var(--wm-pill-size, 1)); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; transform-origin: left center; opacity: 0; transform: scaleY(.4); min-height: calc(32px * var(--wm-pill-size, 1)); min-width: calc(16px * var(--wm-pill-size, 1)); }
.wm-pill::before { content: ""; width: calc(13px * var(--wm-pill-size, 1)); height: calc(13px * var(--wm-pill-size, 1)); border-radius: 50%; background: var(--wm-pill-dot, #f59e3a); flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { .wm-canvas { transition: none; } }
/* Per-block luck: shares spent against the node's difficulty. At or under
   100 % the block came in cheaper than expected. */
.luck.good { color: var(--ok-fg); }
.addr-full { overflow-wrap: anywhere; }
.band { background: var(--parchment); border: 1px dashed var(--hair); padding: 32px 40px; }
.band .big { font-family: var(--serif); font-size: 54px; line-height: 59px; letter-spacing: -0.037em; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 4px; background: var(--quill); font-family: var(--mono); font-size: 10px; line-height: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--bistre); white-space: nowrap; }
.badge.outline { background: transparent; border: 1px solid var(--hair); }
.badge.ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Tables */
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th { text-align: left; font-family: var(--mono); font-size: 10px; line-height: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--graphite); font-weight: 400; padding: 10px 6px; border-bottom: 1px dashed var(--hair); white-space: nowrap; }
td { padding: 16px 6px; border-bottom: 1px dashed var(--hair); font-size: 14px; line-height: 20px; vertical-align: top; white-space: nowrap; font-weight: 400; }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
th.r, td.r { text-align: right; }
tbody tr { transition: background-color 0.15s var(--ease); }
tbody tr:hover { background: var(--bone); }
td.empty { text-align: center; color: var(--graphite); padding: 40px 16px; white-space: normal; }
.table-wrap { overflow-x: auto; }

/* Buttons */
.pill { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 12.5px 24.5px; border-radius: 9999px; background: var(--bistre); color: var(--pill-label); font-size: 14px; line-height: 15px; font-weight: 500; transition: background-color 0.15s var(--ease); }
.pill:hover { background: var(--ash); color: var(--pill-label); }
.pill:disabled { background: var(--flint); cursor: default; }
/* The wallet's ghost button (kronex-webwallet src/styles/components.css):
   a dashed pill with a tick at each corner. The ticks are four gradients in
   currentColor, 7px by 1.5px, pinned a pixel outside the border, so they
   follow the text colour and cost no markup. */
.ghost { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; min-height: 50px; padding: 0 24px; border: 1px dashed var(--hair); border-radius: 9999px; background: transparent; color: var(--bistre); font-size: 16px; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; transition: color 150ms var(--ease), background 150ms var(--ease), border-color 150ms var(--ease); }
.ghost:hover { color: var(--bistre); background: var(--quill); }
.ghost.sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.ghost::before,
.ghost::after {
  position: absolute; right: -1px; left: -1px; height: 7px; content: ""; pointer-events: none;
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 7px 1.5px, 1.5px 7px, 7px 1.5px, 1.5px 7px;
}
.ghost::before { top: -1px; background-position: 0 0, 0 0, 100% 0, 100% 0; }
.ghost::after { bottom: -1px; background-position: 0 100%, 0 100%, 100% 100%, 100% 100%; }
.pg { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--hair); font-size: 14px; font-weight: 500; color: var(--bistre); }
.pg.mut, .pg:disabled { color: var(--flint); cursor: default; }
.link-arrow { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }

/* Tabs */
.tabs { display: flex; gap: 28px; }
.tab { padding: 8px 0; margin-bottom: -1px; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--graphite); border-bottom: 1px solid transparent; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tab.on { color: var(--bistre); border-bottom-color: var(--bistre); }
.tab .count { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; padding: 2px 6px; border-radius: 4px; background: var(--quill); color: var(--graphite); }
.tabbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px dashed var(--hair); }
.range { display: flex; }
.range button { font-size: 13px; font-weight: 500; padding: 4px 0; margin-left: 16px; color: var(--flint); border-bottom: 1px solid transparent; }
.range button.on { color: var(--bistre); border-bottom-color: var(--bistre); }

/* Inputs */
.input { height: 40px; background: var(--bone); border: 1px solid var(--hair); display: flex; align-items: center; padding: 0 12px; font-size: 14px; color: var(--bistre); gap: 10px; }
.input input { flex-grow: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0; height: 100%; }
.input input::placeholder { color: var(--flint); }
.input:focus-within { border-color: var(--bistre); }
.field { min-height: 40px; background: var(--bone); border: 1px dashed var(--hair); display: flex; align-items: center; padding: 0 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0; white-space: nowrap; gap: 12px; }
.field.wrap { white-space: normal; overflow-wrap: anywhere; padding: 10px 12px; }
.field input { border: 0; outline: 0; background: transparent; padding: 0; font: inherit; flex-grow: 1; min-width: 0; height: 38px; }
.field.text { font-family: var(--sans); font-size: 14px; letter-spacing: -0.01em; }
/* Quick links back to the addresses looked up in this browser. */
.recent { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.recent > .eb { margin-right: 2px; }
.recent .chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 6px 0 10px; border: 1px dashed var(--hair); border-radius: 9999px; background: transparent; transition: border-color 150ms var(--ease), background 150ms var(--ease); }
.recent .chip:hover { border-color: var(--bistre); background: var(--quill); }
.recent .chip > a { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.recent .chip .x { display: inline-flex; padding: 4px; border: 0; background: transparent; color: var(--flint); cursor: pointer; border-radius: 9999px; }
.recent .chip .x:hover { color: var(--bistre); }
#drawer-recent:empty { display: none; }

.copy { display: inline-flex; color: var(--flint); cursor: pointer; flex-shrink: 0; }
.copy:hover { color: var(--bistre); }
.copy.done { color: var(--ok-fg); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--graphite); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--bistre); }
.kv { display: grid; grid-template-columns: 80px 1fr; gap: 8px 12px; font-size: 14px; align-items: center; }
.kv .mono { font-size: 13px; }
.terms { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 14px; }
.code { font-family: var(--mono); background: var(--bone); border: 1px dashed var(--hair); padding: 14px 16px; font-size: 13px; line-height: 20px; white-space: pre; overflow-x: auto; letter-spacing: 0; }
.faq-list { display: flex; flex-direction: column; }
/* FAQ: one row per question, opening in place. The marker is the only
   moving part, as on kronex.network's own disclosure rows. */
.faq { border-top: 1px dashed var(--hair); }
.faq:last-of-type { border-bottom: 1px dashed var(--hair); }
.faq > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 12px 0; cursor: pointer; list-style: none; font-family: var(--serif); font-size: 20px; line-height: 27px; color: var(--bistre); }
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary .mark { font-family: var(--mono); font-size: 14px; color: var(--graphite); flex: none; transition: transform 150ms var(--ease); }
.faq[open] > summary .mark { transform: rotate(45deg); }
.faq > summary:hover { color: var(--ash); }
.faq .a { display: block; padding: 0 56px 20px 0; font-size: 15px; line-height: 23px; color: var(--slate); max-width: 90ch; }
.notice { padding: 12px 16px; border: 1px dashed var(--hair); background: var(--bone); font-size: 14px; color: var(--graphite); }
.notice.err { color: var(--bistre); background: var(--quill); }
.avatar { flex-shrink: 0; display: block; }

/* Charts */
.chart { position: relative; min-height: 240px; }
.chart .empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
/* Highcharts puts an HTML tooltip in its own container outside the chart. */
.hc-tip { font-family: var(--sans); font-size: 13px; font-weight: 500; line-height: 16px; color: var(--pill-label); white-space: nowrap; }
.hc-tip .eb { color: var(--flint); display: block; margin-bottom: 2px; }

/* Footer */
footer { width: min(var(--page), calc(100% - 48px)); margin: 0 auto; border-top: 1px dashed var(--hair); padding: 40px 0 32px; display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
footer .brand { display: flex; flex-direction: column; gap: 12px; max-width: 440px; }
footer .brand img { height: 20px; width: auto; display: block; align-self: flex-start; }
footer .cols { display: flex; gap: 48px; font-size: 14px; }
footer .col { display: flex; flex-direction: column; gap: 8px; }

/* Burger and drawer: desktop hides them */
.burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; margin-left: -12px; color: var(--bistre); }
.burger .l1, .burger .l2, .burger .l3 { transition: transform 0.2s var(--ease), opacity 0.2s var(--ease); transform-origin: 12px 12px; }
.burger.open .l1 { transform: translateY(5px) rotate(45deg); }
.burger.open .l2 { opacity: 0; }
.burger.open .l3 { transform: translateY(-5px) rotate(-45deg); }
.drawer { display: none; }
.no-scroll { overflow: hidden; }

/* Responsive */
@media (max-width: 1100px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-4-8, .split-7-5, .split-5-7, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 40px; line-height: 46px; }
  .capsule { border-radius: 28px; }
  .capsule nav { margin-left: 0; }
}

/* Below lg the capsule goes: a flat sticky header, a hairline under it once the
   page has scrolled, the burger drawer for everything the capsule held. */
@media (max-width: 900px) {
  .topbar { position: sticky; top: 0; z-index: 20; padding: 0; background: var(--cream); }
  .capsule { width: 100%; min-height: 56px; border: 0; border-bottom: 1px dashed transparent; border-radius: 0; background: var(--cream); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 6px 16px; gap: 12px; flex-wrap: nowrap; transition: border-color 0.15s var(--ease); }
  .capsule.stuck { border-bottom-color: var(--hair); }
  .capsule .logo img { height: 20px; }
  .capsule nav, .capsule #lookup, .capsule #algo-badge { display: none; }
  .capsule .spacer { display: none; }
  .burger { display: inline-flex; }
  .drawer { display: flex; flex-direction: column; gap: 16px; position: fixed; top: 56px; left: 0; right: 0; bottom: 0; z-index: 19; background: var(--cream); padding: 16px; overflow-y: auto; border-top: 1px dashed var(--hair); }
  .drawer[hidden] { display: none; }
  .drawer nav { display: flex; flex-direction: column; }
  .drawer nav a { display: flex; align-items: center; min-height: 48px; padding: 0 4px; font-size: 16px; font-weight: 500; color: var(--graphite); border-bottom: 1px dashed var(--hair); }
  .drawer nav a.on { color: var(--bistre); }
  .drawer-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; font-size: 14px; }
  .page { width: calc(100% - 32px); padding-top: 20px; gap: 24px; }
  .between, .between-c, .between-b { flex-direction: column; align-items: flex-start; gap: 12px; }
  .between-b.keep, .tabbar { flex-direction: row; align-items: center; }
  .tabbar { flex-wrap: wrap; gap: 8px 16px; }
  .tabbar > .eb { display: none; }
  .tabs { overflow-x: auto; gap: 20px; max-width: 100%; }
  .hero { padding: 28px 20px; gap: 16px; }
  .hero { min-height: 0; }
  .hero .wm { display: none; }
  .hero h1 { font-size: 32px; line-height: 38px; letter-spacing: -0.012em; }
  .hero .lede { font-size: 18px; line-height: 26px; }
  .hero form { flex-direction: column; align-items: stretch; }
  .hero form .input { width: 100% !important; }
  .hero form .pill, .hero form .ghost { justify-content: center; }
  .grid-5, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .plate { padding: 16px; gap: 8px; }
  .plate .v { font-size: 20px; line-height: 26px; }
  .band { padding: 24px 20px; }
  .band .big { font-size: 40px; line-height: 44px; }
  .card.pad { padding: 20px 16px; }
  .field { white-space: normal; overflow-wrap: anywhere; min-height: 40px; padding: 8px 12px; }
  .kv { grid-template-columns: 72px 1fr; }
  .kv .mono, .field { font-size: 12px; }
  h1 { font-size: 30px; line-height: 36px; }
  h2 { font-size: 24px; line-height: 30px; }
  .addr-title { font-size: 15px !important; line-height: 22px !important; }
  footer { flex-direction: column; padding: 32px 0 24px; gap: 24px; }
  footer .cols { gap: 32px; }
  .range button { margin-left: 12px; }
  .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .form-grid .pill { justify-content: center; }
  .kv-form { grid-template-columns: minmax(0, 1fr) !important; gap: 6px 0 !important; }
  .kv-form .eb { margin-top: 6px; }

  /* Tables become card lists: one card per row, the column name as an eyebrow. */
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap thead, .table-wrap colgroup { display: none; }
  .table-wrap tr { border: 1px dashed var(--hair); background: var(--bone); padding: 4px 12px; margin-bottom: 12px; }
  .table-wrap tr:hover { background: var(--bone); }
  .table-wrap td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--hair); white-space: normal; text-align: right; min-width: 0; }
  .table-wrap td:last-child { border-bottom: 0; }
  .table-wrap td::before { content: attr(data-label); font-family: var(--mono); font-size: 10px; line-height: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--flint); text-align: left; flex-shrink: 0; }
  .table-wrap td > * { min-width: 0; }
  .table-wrap td .stack { align-items: flex-end; }
  .table-wrap td.empty { justify-content: center; padding: 24px 0; }
  .table-wrap td.empty::before { content: none; }
}
@media (max-width: 420px) {
  .grid-5, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
