/* Giwater Scan: two looks over one markup.
   The HTML is the same in both modes; <html data-mode="basic|pro"> (cookie `mode`, swapped outside the page cache) picks
   the look, and everything that differs lives in this file: tokens in :root[data-mode] blocks, layout rules scoped under
   [data-mode="basic"] / [data-mode="pro"]. No template branches on the mode.
     Basic (default): Swiss. Inter Tight + JetBrains Mono, black on white, one red signal colour, a 12-column grid with labels
       in columns 1-3 and content in 4-12, 4 px rules, oversized numerals, no boxed cards. Light only.
     Pro: calm dark. Geist + Geist Mono, three grey layers (ground, layer, raised), a soft periwinkle accent, issue-style
       split (story left, rail right), no glow, no motion. Dark only.
   prefers-color-scheme does not pick the mode (the reader does, with the header toggle).
   CSP is `style-src 'self'` and `font-src` falls back to `default-src 'self'`: every style lives here and the fonts are
   served from /static (Latin subsets, SIL Open Font License 1.1).
   Shared markup hooks (reuse them on new pages):
     .split > .lede, .story, .rail      page split; DOM order lede, story, rail (Pro: rail is the right column)
     section.sec > h2.sec-h + content   a labelled section (Basic: label in columns 1-3; Pro: eyebrow above)
     dl.props > div > dt + dd           properties (Basic: facts in columns; Pro: label/value rows)
     dl.kpis > div.kpi > dt + dd (+ dd.d)   numbers (Basic: oversized numerals; Pro: quiet tiles or rail rows)
     dl.kv > dt + dd                    key/value table (technical details)
     ol.steps > li (.done, [aria-current="step"]) > .n + text   progress
     .panel > .panel-h + body + .panel-f   a list or table block
     .chip.{ok,fail,warn,bot,spam,sys,tag,acc}, .note.{info,ok,warn,fail,bot,spam,degraded}, table.t, .tabs, .pager
   Sections: fonts · tokens · base · layout (wrap, header, footer, split, sec) · page head and hero · search · buttons and
   the mode toggle · chips and status · addresses · panels · numbers (kpis, props, kv) · tables · activity list · blocks
   strip · tabs and pager · notes · sentence and technical details · glossary · steps · states · island hooks · motion ·
   block and tx pages (task 3). */

/* ---------------------------------------------------------------- fonts (variable, Latin) */
@font-face { font-family: "Inter Tight"; src: url("inter-tight.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---------------------------------------------------------------- tokens */
/* Every colour pair used for text is measured (WCAG ratios in the design report). --line is a decorative hairline;
   --ctl is the border of a control (3:1 or more against its ground). */
:root {
  --tap: 34px;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-md: .875rem; --fs-lg: 1rem; --fs-xl: 1.25rem;
}
@media (pointer: coarse) { :root { --tap: 44px; } }

:root, :root[data-mode="basic"] {
  color-scheme: light;
  --font-sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-body: 1rem;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F2F2F2; --surface-3: #E2E2E2;
  --line: #BDBDBD; --rule: #0B0B0B; --rule-w: 4px; --ctl: #0B0B0B;
  --ink: #0B0B0B; --ink-2: #333333; --ink-3: #5E5E5E;
  --accent: #D2261C; --accent-ink: #FFFFFF; --acc-soft: transparent; --focus: #D2261C; --ring: 3px;
  --link: #0B0B0B;
  --logo-ink: #111827; --logo-acc: #FF5C00;
  --ok: #0B0B0B; --ok-soft: transparent; --fail: #D2261C; --fail-soft: transparent;
  --warn: #0B0B0B; --warn-soft: transparent; --bot: #333333; --bot-soft: transparent;
  --spam: #D2261C; --spam-soft: transparent; --sys: #0B0B0B; --sys-soft: transparent; --tag: #0B0B0B; --tag-soft: transparent;
  --r: 0; --r-lg: 0; --max: 88rem; --gap: 3.5rem;
}
:root[data-mode="pro"] {
  color-scheme: dark;
  --font-sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-body: .875rem;
  --bg: #0F1012; --surface: #16171A; --surface-2: #1D1E22; --surface-3: #25272C;
  --line: #2A2C31; --rule: #2A2C31; --rule-w: 1px; --ctl: #6B6F79;
  --ink: #E7E8EB; --ink-2: #C4C6CC; --ink-3: #9B9EA6;
  --accent: #9DB0F5; --accent-ink: #0F1012; --acc-soft: #292C39; --focus: #9DB0F5; --ring: 2px;
  --link: #E7E8EB;
  --logo-ink: #E5E7EB;
  --ok: #86CFA6; --ok-soft: #26312E; --fail: #EBA394; --fail-soft: #342B2B;
  --warn: #E2C07D; --warn-soft: #332F28; --bot: #E4B48E; --bot-soft: #332D2A;
  --spam: #E7A3C6; --spam-soft: #332B32; --sys: #B8B0F2; --sys-soft: #2D2C38; --tag: #86CCCB; --tag-soft: #263033;
  --r: 8px; --r-lg: 12px; --max: 80rem; --gap: 1.25rem;
}

/* ---------------------------------------------------------------- base (shared) */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
@media (min-width: 900px) { html { scroll-padding-top: 120px; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.5; }
[data-mode="pro"] body { -webkit-font-smoothing: antialiased; line-height: 1.55; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: var(--accent); }
[data-mode="basic"] a { text-decoration-thickness: 1.5px; }
[data-mode="pro"] a { text-decoration: none; border-bottom: 1px solid var(--line); }
[data-mode="pro"] a:hover { border-bottom-color: currentColor; }
:focus-visible { outline: var(--ring) solid var(--focus); outline-offset: 2px; }
[data-mode="pro"] :focus-visible { border-radius: 4px; }
main:focus, h1[tabindex="-1"]:focus { outline: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 1.6rem; font-weight: 500; letter-spacing: -.015em; }
h2 { font-size: var(--fs-lg); font-weight: 600; }
h3 { font-size: var(--fs-md); font-weight: 600; }
[data-mode="basic"] h1 { font-weight: 800; letter-spacing: -.04em; line-height: .95; font-size: clamp(2.25rem, 6vw, 4.5rem); }
[data-mode="basic"] h2 { font-weight: 700; }
p { margin: 0; }
code, .mono, kbd, q { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
code, .mono { font-size: .9em; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
small { font-size: var(--fs-xs); color: var(--ink-3); }
.muted { color: var(--ink-3); }
.sm { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; font-weight: 600; }
.skip:focus { top: 8px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.hstack { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* the label voice: Basic mono capitals, Pro a quiet eyebrow */
.sec-h, .eyebrow, .kpi dt, dl.props dt, thead th, .act-head, .act-who .lbl, .tab-sep { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); }
[data-mode="basic"] :is(.sec-h, .eyebrow, .kpi dt, dl.props dt, thead th, .act-head, .act-who .lbl, .tab-sep) { font-family: var(--font-mono); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; }
[data-mode="basic"] .sec-h { color: var(--ink); }

/* ---------------------------------------------------------------- layout: wrap, header, footer */
.wrap, main { width: 100%; max-width: var(--max); margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }
main { padding-block: 2rem 6rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-content: start; }
[data-mode="basic"] main { padding-block: 3rem 6rem; }

.top { background: var(--bg); border-bottom: var(--rule-w) solid var(--rule); }
/* sticky from 900 px; on phones the header (up to three rows) scrolls away with the page */
@media (min-width: 900px) { .top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; } }
.top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); color: var(--ink); font-weight: 600; white-space: nowrap; text-decoration: none; }
[data-mode="pro"] .brand { border: 0; }
/* the GIWATER symbol (GiwaSwap brand kit): ink paths fill currentColor, the accent path is the brand orange; the
   light-ground ink in Basic, the dark-ground ink in Pro */
.brand .logo { flex: none; width: 30px; height: 30px; color: var(--logo-ink); }
[data-mode="basic"] .brand .logo { width: 36px; height: 36px; }
.brand .logo .acc { fill: var(--logo-acc); }
.net { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
nav.main { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
nav.main a { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: 8px; white-space: nowrap; text-decoration: none; font-weight: 500; }
nav.main a[aria-current="page"] { text-decoration: underline; }
/* div.top-tools holds the header search (not on home) and the display-mode toggle: the pair ends at the right edge
   with a 12 px gap; on phones it is display: contents so the search can take its own row */
.top-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; min-width: 0; }
.top .search { flex: 1 1 18rem; max-width: 30rem; }

/* Basic header: the 12-column grid of the poster. Brand 1-3 (net under it), nav 4-6, search and toggle 7-12 (ending at the right edge). */
[data-mode="basic"] .brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; line-height: 1; }
[data-mode="basic"] .brand span { max-width: 6ch; white-space: normal; }
[data-mode="basic"] .net { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
[data-mode="basic"] nav.main { gap: 1.25rem; }
[data-mode="basic"] nav.main a { padding-inline: 0; color: var(--ink); }
[data-mode="basic"] nav.main a:hover { color: var(--accent); text-decoration: underline; }
@media (min-width: 900px) {
  [data-mode="basic"] .top-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; row-gap: 0; padding-block: 1.1rem; }
  [data-mode="basic"] .brand { grid-column: 1 / 4; grid-row: 1; }
  [data-mode="basic"] .net { grid-column: 1 / 4; grid-row: 2; }
  [data-mode="basic"] nav.main { grid-column: 4 / 7; grid-row: 1 / 3; }
  [data-mode="basic"] .top-tools { grid-column: 7 / 13; grid-row: 1 / 3; justify-content: flex-end; margin: 0; }
  [data-mode="basic"] .top .search { flex: 1 1 auto; max-width: none; }
}
/* Pro header: one quiet row; search, then the toggle at the far right */
[data-mode="pro"] .top-row { padding-block: .7rem; gap: 8px 1.25rem; }
[data-mode="pro"] .brand { font-size: .9rem; }
[data-mode="pro"] .net { font-family: var(--font-mono); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
[data-mode="pro"] nav.main a { padding-inline: .65rem; border: 0; border-radius: 6px; color: var(--ink-3); }
[data-mode="pro"] nav.main a:hover { color: var(--ink); background: var(--surface-2); }
[data-mode="pro"] nav.main a[aria-current="page"] { color: var(--ink); background: var(--surface-2); text-decoration: none; }
[data-mode="pro"] .top-tools { flex: 0 1 auto; }
[data-mode="pro"] .top .search { flex: 0 1 22rem; width: 22rem; }
@media (max-width: 899px) {
  .top-row { gap: 8px 14px; }
  nav.main { order: 0; }
  /* phones: the toggle stays on the first row at the right, search takes its own last row */
  [data-mode] .top-tools { display: contents; }
  form.mode { margin-left: auto; }
  .top .search { order: 2; flex-basis: 100%; max-width: none; }
  [data-mode="pro"] .top .search { flex-basis: 100%; }
  [data-mode="pro"] nav.main a { padding-inline: .45rem; }
}

footer.foot { padding-block: 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); color: var(--ink-3); font-size: var(--fs-xs); border-top: var(--rule-w) solid var(--rule); }
footer.foot .wrap { display: grid; gap: 6px; }
footer.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
footer.foot nav a { display: inline-flex; align-items: center; min-height: 24px; }
[data-mode="basic"] footer.foot { font-family: var(--font-mono); }
@media (min-width: 900px) {
  [data-mode="basic"] footer.foot .wrap { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; }
  [data-mode="basic"] footer.foot p { grid-column: 4 / 11; }
  [data-mode="basic"] footer.foot nav { grid-column: 11 / 13; justify-content: end; }
}

/* ---------------------------------------------------------------- split, lede, story, rail, sec */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; min-width: 0; }
.lede, .story, .rail { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-content: start; }
.sec { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; align-content: start; }
.sec-b { min-width: 0; display: grid; gap: .75rem; }
/* Pro: the story on the left, the rail on the right (below the story under 960 px) */
@media (min-width: 960px) {
  [data-mode="pro"] .split:has(> .rail) { grid-template-columns: minmax(0, 1fr) 20rem; grid-template-areas: "lede rail" "story rail"; }
  [data-mode="pro"] .split > .lede { grid-area: lede; }
  [data-mode="pro"] .split > .story { grid-area: story; }
  /* not sticky: a rail taller than the window could not be scrolled */
  [data-mode="pro"] .split > .rail { grid-area: rail; }
}
[data-mode="pro"] .rail { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem 1.25rem 1.5rem; gap: 1.5rem; }
[data-mode="pro"] .rail > .sec + .sec { border-top: 1px solid var(--line); padding-top: 1.25rem; }
/* Basic: every labelled section is a row of the 12-column grid, a 1 px rule on top */
[data-mode="basic"] .sec { border-top: 1px solid var(--rule); padding-top: .8rem; }
@media (min-width: 760px) {
  [data-mode="basic"] .sec { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; }
  [data-mode="basic"] .sec > .sec-h { grid-column: 1 / 4; }
  [data-mode="basic"] .sec > :not(.sec-h) { grid-column: 4 / 13; }
}

/* ---------------------------------------------------------------- page head and hero */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; min-width: 0; }
.page-head .sub { color: var(--ink-2); flex-basis: 100%; padding-right: max(0px, calc(100% - 72ch)); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-head .title-row { flex-basis: 100%; }
[data-mode="pro"] .page-head .sub { color: var(--ink-3); }
@media (min-width: 760px) {
  [data-mode="basic"] .page-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; row-gap: 1.2rem; align-items: start; }
  [data-mode="basic"] .page-head > h1, [data-mode="basic"] .page-head > .title-row { grid-column: 1 / -1; }
  [data-mode="basic"] .page-head > .actions { grid-column: 1 / 4; margin: 0; flex-direction: column; align-items: flex-start; }
  [data-mode="basic"] .page-head > .sub { grid-column: 4 / 13; }
}
[data-mode="basic"] .page-head .sub { font-size: 1.125rem; line-height: 1.45; }

.hero { gap: 1rem; }
.hero p { color: var(--ink-2); max-width: 62ch; }
.head-line a { color: inherit; }
[data-mode="basic"] .hero { gap: 1.4rem; }
[data-mode="basic"] .hero h1 { font-size: clamp(3rem, 10vw, 9rem); letter-spacing: -.05em; line-height: .86; }
[data-mode="basic"] .hero > p:not(.head-line) { font-size: clamp(1.125rem, 1.8vw, 1.5rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.3; color: var(--ink); }
[data-mode="basic"] .head-line { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
@media (min-width: 760px) {
  [data-mode="basic"] .hero { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; }
  [data-mode="basic"] .hero > * { grid-column: 4 / 13; }
  [data-mode="basic"] .hero > h1 { grid-column: 1 / -1; }
}
[data-mode="pro"] .hero { padding-block: .5rem; }
[data-mode="pro"] .hero h1 { font-size: 1.75rem; }
[data-mode="pro"] .hero p { color: var(--ink-3); }

.crumbs { font-size: var(--fs-sm); color: var(--ink-3); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs .crumb-hash { min-width: 0; max-width: min(46ch, 60vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.eyebrow .chip { text-transform: none; letter-spacing: 0; }

/* ---------------------------------------------------------------- search (GET form) */
.search { position: relative; min-width: 0; }
.search form { display: flex; gap: 0; }
.search .field-wrap { position: relative; flex: 1; min-width: 0; }
.search input { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--ctl); border-radius: var(--r) 0 0 var(--r); padding: 8px 12px 8px 36px; min-height: max(42px, var(--tap)); }
.search input::placeholder { color: var(--ink-3); opacity: 1; }
.search input:focus-visible { outline-offset: 0; }
.search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; display: flex; }
.search .btn { min-height: max(42px, var(--tap)); border-radius: 0 var(--r) var(--r) 0; }
/* header search is as tall as the mode toggle next to it (Basic toggle: tap + its 2 px border; Pro: tap) */
.top .search input, .top .search .btn { min-height: 0; height: var(--tap); padding-block: 0; }
[data-mode="basic"] .top .search input, [data-mode="basic"] .top .search .btn { height: calc(var(--tap) + 4px); }
.search.big input { min-height: 56px; font-size: 1.0625rem; padding-left: 44px; }
.search.big .ico { left: 16px; }
.search.big .btn { min-height: 56px; padding-inline: 1.5rem; }
[data-mode="basic"] .search input { font-family: var(--font-mono); font-size: .875rem; border-right: 0; }
[data-mode="basic"] .search .btn { background: var(--ink); border-color: var(--ink); color: var(--bg); }
[data-mode="basic"] .search .btn:hover { background: var(--accent); border-color: var(--accent); }
[data-mode="pro"] .search form { gap: 6px; }
[data-mode="pro"] .search input { border-width: 1px; border-radius: var(--r); background: var(--surface); }
[data-mode="pro"] .search .btn { border-radius: var(--r); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--ctl); border-radius: var(--r); list-style: none; margin: 0; padding: 4px; z-index: 40; max-height: 360px; overflow: auto; }
.suggest li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: var(--tap); cursor: pointer; }
.suggest li[aria-selected="true"] { background: var(--surface-2); }

/* ---------------------------------------------------------------- buttons and the mode toggle */
.btn { font: inherit; font-size: var(--fs-sm); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 6px 14px; border-radius: var(--r); border: 1px solid var(--ctl); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent); filter: brightness(1.08); color: var(--accent-ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
[data-mode="basic"] .btn { border-width: 2px; font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; }
[data-mode="basic"] .btn:hover { background: var(--ink); color: var(--bg); }
[data-mode="basic"] .btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
[data-mode="basic"] .btn.primary:hover { background: var(--accent); border-color: var(--accent); filter: none; }
[data-mode="pro"] .btn { background: var(--surface-2); border-color: var(--line); }
[data-mode="pro"] .btn:hover { background: var(--surface-3); border-color: var(--ctl); }
[data-mode="pro"] .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
[data-mode="pro"] .btn.primary:hover { background: #B4C3F8; }
[data-mode="pro"] a.btn { border-bottom: 1px solid var(--line); }

/* the toggle: two submit buttons; the pressed one is filled and carries a marker (never colour alone) */
form.mode { display: inline-flex; flex: none; }
form.mode button { font: inherit; font-size: var(--fs-xs); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); min-width: 44px; padding: 4px 12px; cursor: pointer; border: 0; background: transparent; color: var(--ink-3); }
form.mode button[aria-pressed="true"]::before { content: ""; width: 7px; height: 7px; flex: none; background: currentColor; }
form.mode button:focus-visible { position: relative; z-index: 1; }
[data-mode="basic"] form.mode { border: 2px solid var(--ink); }
[data-mode="basic"] form.mode button { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
[data-mode="basic"] form.mode button + button { border-left: 2px solid var(--ink); }
[data-mode="basic"] form.mode button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
[data-mode="basic"] form.mode button[aria-pressed="true"]::before { background: var(--accent); }
[data-mode="basic"] form.mode button[aria-pressed="false"]:hover { color: var(--accent); }
[data-mode="pro"] form.mode { background: var(--surface); border: 1px solid var(--ctl); border-radius: 8px; padding: 2px; gap: 2px; }
[data-mode="pro"] form.mode button { border-radius: 6px; min-height: calc(var(--tap) - 6px); }
[data-mode="pro"] form.mode button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); }
[data-mode="pro"] form.mode button[aria-pressed="true"]::before { border-radius: 50%; background: var(--accent); }
[data-mode="pro"] form.mode button[aria-pressed="false"]:hover { color: var(--ink); }

/* ---------------------------------------------------------------- chips and status (always a word, never colour alone) */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .71875rem; font-weight: 500; line-height: 1; padding: 4px 7px; border-radius: 4px; white-space: nowrap; vertical-align: middle; background: var(--surface-2); color: var(--ink-2); text-decoration: none; }
.chip svg { flex: none; }
.chip .mono { font-size: 1em; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.fail { background: var(--fail-soft); color: var(--fail); }
.chip.warn, .chip.partial, .chip.degraded { background: var(--warn-soft); color: var(--warn); }
.chip.bot { background: var(--bot-soft); color: var(--bot); }
.chip.spam { background: var(--spam-soft); color: var(--spam); }
.chip.sys { background: var(--sys-soft); color: var(--sys); }
.chip.tag { background: var(--tag-soft); color: var(--tag); }
.chip.acc, .chip.kind { background: var(--acc-soft); color: var(--accent); }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
[data-mode="basic"] .chip { background: transparent; border: 1.5px solid currentColor; border-radius: 0; font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; font-size: .6875rem; padding: 3px 6px; color: var(--ink); }
[data-mode="basic"] .chip.fail, [data-mode="basic"] .chip.spam { color: var(--fail); }
[data-mode="basic"] .chip.acc, [data-mode="basic"] .chip.kind { color: var(--accent); }
[data-mode="basic"] .chip.bot { border-style: dashed; color: var(--ink-2); }
[data-mode="pro"] .chip { border-radius: 999px; padding: 4px 8px; }
[data-mode="pro"] a.chip { border-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.status.ok { color: var(--ok); }
.status.fail { color: var(--fail); }
.status.warn, .status.degraded, .status.partial { color: var(--warn); }

/* ---------------------------------------------------------------- addresses, identicons, copy */
.addr { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; vertical-align: middle; }
.addr .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the addr macro (pinned markup): <a href="/address/0x..." title="..."><code>name or 0x5aAe…eAed</code></a> */
a[href^="/address/"] > code { display: inline-block; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.addr > a[href^="/address/"] { display: inline-flex; min-width: 0; }
.addr > a[href^="/address/"] > code { max-width: 16ch; }
.idc { flex: none; display: inline-block; vertical-align: middle; }
[data-mode="pro"] .idc { border-radius: 4px; }
.tok-ico { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9px; font-weight: 700; color: #FFFFFF; background: #4A4A4A; flex: none; letter-spacing: -.02em; font-family: var(--font-sans); }
.tok-ico.eth { background: #4B5A8A; }
.tok-ico.xl { width: 56px; height: 56px; font-size: 22px; border-radius: var(--r-lg); }
[data-mode="basic"] .tok-ico { border-radius: 0; background: var(--ink); }
[data-mode="basic"] .tok-ico.eth { background: var(--ink); }
/* address header: identicon, name and full address; dl.props (counts, delegate, token) */
.addr-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 1.25rem; align-items: start; }
.addr-head > dl.props { grid-column: 1 / -1; }
.addr-id { display: grid; gap: .6rem; min-width: 0; }
.addr-id h1 { overflow-wrap: anywhere; }
.addr-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink-2); }
@media (min-width: 760px) {
  [data-mode="basic"] .addr-head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; row-gap: 2rem; }
  [data-mode="basic"] .addr-head > :is(.idc, .tok-ico) { grid-column: 1 / 4; width: min(100%, 8.5rem); height: auto; aspect-ratio: 1; }
  [data-mode="basic"] .addr-head > .tok-ico { font-size: 3.5rem; }
  [data-mode="basic"] .addr-head > :not(.idc, .tok-ico) { grid-column: 4 / 13; }
}
[data-mode="basic"] .addr-head > dl.props { border-top: 1px solid var(--rule); padding-top: .8rem; }
@media (min-width: 960px) {
  [data-mode="pro"] .addr-head { grid-template-columns: auto minmax(0, 1fr) 20rem; }
  [data-mode="pro"] .addr-head > dl.props { grid-column: 3; grid-row: 1; }
}
[data-mode="pro"] .addr-head > dl.props { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .6rem 1.25rem; }
[data-mode="pro"] .addr-head > .idc { border-radius: var(--r-lg); }
.full { font-family: var(--font-mono); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.copy { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; padding: 4px; min-width: 24px; min-height: 24px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; font: inherit; }
.copy:hover { color: var(--accent); background: var(--surface-2); }
.copy[data-copied]::after { content: "Copied"; font-size: var(--fs-xs); margin-left: 4px; color: var(--ink); }

/* ---------------------------------------------------------------- panels (a list or a table with its head and foot) */
.panel { min-width: 0; }
.panel-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.panel-h .right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-b { padding-block: 12px; }
.panel-f { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-size: var(--fs-sm); padding-block: 12px; }
/* Basic: no box. A 4 px rule on top; with a head, the head is the label in columns 1-3 and the body runs in 4-12 */
[data-mode="basic"] .panel { border-top: var(--rule-w) solid var(--rule); padding-top: .8rem; }
[data-mode="basic"] .panel-h h2 { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; }
[data-mode="basic"] .panel-f { border-top: 1px solid var(--rule); margin-top: -1px; }
@media (min-width: 1100px) {
  [data-mode="basic"] .panel:has(> .panel-h) { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; align-items: start; }
  [data-mode="basic"] .panel:has(> .panel-h) > * { grid-column: 4 / 13; }
  [data-mode="basic"] .panel:has(> .panel-h) > .panel-h { grid-column: 1 / 4; grid-row: 1 / span 3; flex-direction: column; align-items: flex-start; position: sticky; top: 7.5rem; }
  [data-mode="basic"] .panel:has(> .panel-h) > .panel-h .right { margin: 0; flex-direction: column; align-items: flex-start; }
}
/* Pro: a card on the layer grey */
[data-mode="pro"] .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
[data-mode="pro"] .panel-h { padding: .85rem 1.25rem; border-bottom: 1px solid var(--line); }
[data-mode="pro"] .panel-h h2 { font-size: var(--fs-md); font-weight: 600; }
[data-mode="pro"] .panel-b { padding: 1rem 1.25rem; }
[data-mode="pro"] .panel-f { padding: .75rem 1.25rem; border-top: 1px solid var(--line); }
/* the last list or table keeps the card's rounded corners (row tints and hover stay inside) */
[data-mode="pro"] .panel > :is(.act-list, .tbl-wrap, .live-addr):last-child { border-radius: 0 0 calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px); }
[data-mode="pro"] .panel > :is(.act-list, .live-addr):last-child { overflow: hidden; }

/* ---------------------------------------------------------------- numbers: kpis, props, kv */
dl { margin: 0; }
dd { margin: 0; }
.kpis { display: grid; gap: 1.5rem; margin: 0; }
.kpi { display: grid; gap: .3rem; align-content: start; min-width: 0; container-type: inline-size; }
.kpi dd { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.kpi dd.d { font-size: var(--fs-sm); color: var(--ink-2); font-variant-numeric: normal; }
/* Basic: oversized numerals, three to a row; the size follows the column (container units) */
[data-mode="basic"] .kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: 1.5rem; row-gap: 2rem; }
[data-mode="basic"] .kpis.kpis-3, [data-mode="basic"] .sec > .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-mode="basic"] .kpi dd:not(.d) { font-size: clamp(2rem, 17cqi, 5.5rem); font-weight: 800; letter-spacing: -.04em; line-height: .95; }
[data-mode="basic"] .kpi dd .status { font-size: inherit; gap: .15em; }
[data-mode="basic"] .kpi dd .status svg { width: .6em; height: .6em; }
@media (max-width: 759px) { [data-mode="basic"] .kpis.kpis-3, [data-mode="basic"] .sec > .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Pro: tiles in the story, rows in the rail */
[data-mode="pro"] .kpis { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .75rem; }
[data-mode="pro"] .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .9rem 1rem; }
[data-mode="pro"] .kpi dd:not(.d) { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 500; color: var(--ink); }
[data-mode="pro"] .kpi dd.d { font-size: var(--fs-xs); color: var(--ink-3); }
[data-mode="pro"] .rail .kpis { grid-template-columns: minmax(0, 1fr); gap: 0; }
[data-mode="pro"] .rail .kpi { background: none; border: 0; border-radius: 0; padding: .6rem 0; }
[data-mode="pro"] .rail .kpi + .kpi { border-top: 1px solid var(--line); }

/* dl.props: <div><dt>Label</dt><dd>value</dd></div> per property */
dl.props { display: grid; min-width: 0; }
dl.props > div { min-width: 0; }
dl.props dd { min-width: 0; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
[data-mode="basic"] dl.props { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 1.6rem 1.5rem; }
[data-mode="basic"] dl.props dd { margin-top: .3rem; font-size: 1.125rem; }
[data-mode="basic"] dl.props dd .num { font-size: clamp(1.75rem, 3.2vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
[data-mode="pro"] dl.props { gap: 0; }
[data-mode="pro"] dl.props > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .75rem; padding-block: .5rem; align-items: baseline; }
[data-mode="pro"] dl.props dd .num { font-family: var(--font-mono); }

/* dl.kv: key/value rows (technical details; a bare <dl> in main gets the same) */
dl.kv, main dl:not([class]) { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); }
dl.kv > dt, dl.kv > dd, main dl:not([class]) > dt, main dl:not([class]) > dd { padding-block: .6rem; border-bottom: 1px solid var(--line); margin: 0; }
dl.kv > dt, main dl:not([class]) > dt { color: var(--ink-3); font-size: var(--fs-sm); padding-right: 1rem; }
dl.kv > dd, main dl:not([class]) > dd { min-width: 0; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
dl.kv > dt:last-of-type, dl.kv > dd:last-of-type { border-bottom: 0; }
[data-mode="basic"] dl.kv > dt { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; padding-top: .8rem; }
@media (max-width: 640px) {
  dl.kv, main dl:not([class]) { grid-template-columns: minmax(0, 1fr); }
  dl.kv > dt, main dl:not([class]) > dt { border-bottom: 0; padding-bottom: 0; }
  dl.kv > dd, main dl:not([class]) > dd { padding-top: 2px; }
}

/* ---------------------------------------------------------------- tables (.t; a bare <table> in main scrolls inside itself) */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
caption { text-align: left; font-weight: 600; padding: 0 0 8px; }
th { text-align: left; font-weight: 500; }
thead th { padding: 8px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td, tbody th { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td { white-space: nowrap; }
td.wrap-text { white-space: normal; overflow-wrap: anywhere; min-width: 200px; }
tbody th[scope="row"] { font-weight: 500; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover > * { background: var(--surface-2); }
.t .r, td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
:is(thead, tbody) > tr > :first-child { padding-left: 0; }
[data-mode="pro"] :is(thead, tbody) > tr > :first-child { padding-left: 1.25rem; }
[data-mode="pro"] :is(thead, tbody) > tr > :last-child { padding-right: 1.25rem; }
[data-mode="basic"] tbody tr:hover > * { background: var(--surface-2); }
[data-mode="basic"] td { font-variant-numeric: tabular-nums; }
/* a row whose first cell starts with a link (tx, block): the whole row opens it, other links stay on top */
tbody tr:has(> :first-child > a:first-child) { position: relative; cursor: pointer; }
tbody tr > :first-child > a:first-child::after { content: ""; position: absolute; inset: 0; }
tbody tr:has(> :first-child > a:first-child) :is(a, button, .gl):not(tr > :first-child > a:first-child) { position: relative; z-index: 1; }
tbody tr:has(> :first-child > a:first-child:focus-visible) > * { box-shadow: inset 0 var(--ring) 0 var(--focus), inset 0 calc(-1 * var(--ring)) 0 var(--focus); }
tbody tr > :first-child > a:first-child:focus-visible { outline: none; }
.t tr.bot-row td, tr[data-bot="true"] > * { background: var(--bot-soft); }
.t tr.failed td:first-child, tr.failed > :first-child { box-shadow: inset 3px 0 0 var(--fail); }
@media (max-width: 900px) { main table:not([class]) { display: block; overflow-x: auto; } }
@media (max-width: 640px) { .t .hide-sm { display: none; } }

/* ---------------------------------------------------------------- activity list (templates/action.html row and head; the
   wasm live and more islands build the same markup) */
.act-head, .act-row { display: grid; grid-template-columns: 36px minmax(0, 2.6fr) minmax(0, 1.4fr) minmax(0, 1.1fr) 5.5rem 6.75rem; gap: 4px 16px; align-items: center; }
.act-head { padding-block: 8px; border-bottom: 1px solid var(--rule); }
.act-list { list-style: none; margin: 0; padding: 0; }
.act-row { padding-block: 14px; border-bottom: 1px solid var(--line); position: relative; cursor: pointer; }
.act-row:last-child { border-bottom: 0; }
.act-row:hover { background: var(--surface-2); }
/* the whole row opens the tx: the sentence link stretches over it, other links and buttons stay on top */
.act-s > a:first-child::after { content: ""; position: absolute; inset: 0; }
.act-row :is(a, button, .gl):not(.act-s > a:first-child) { position: relative; z-index: 1; }
.act-s > a:first-child:focus-visible { outline: none; }
.act-row:has(.act-s > a:first-child:focus-visible) { outline: var(--ring) solid var(--focus); outline-offset: -2px; }
.act-row.bot-row { background: var(--bot-soft); }
.act-row.failed { box-shadow: inset 3px 0 0 var(--fail); }
.act-main { min-width: 0; display: grid; gap: 3px; }
.act-s { line-height: 1.4; overflow-wrap: anywhere; }
.act-s a { color: var(--ink); text-decoration: none; }
.act-s a:hover { color: var(--accent); }
[data-mode="pro"] .act-s a { border: 0; }
.act-s b { font-weight: 600; }
.act-s .nm { font-weight: 500; }
.act-s .mono { white-space: nowrap; }
.act-s .chip { vertical-align: 1px; margin-left: 2px; }
.act-meta { font-size: var(--fs-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.act-meta a { color: var(--ink-3); }
.act-meta a:hover { color: var(--accent); }
.act-who { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: baseline; font-size: var(--fs-sm); min-width: 0; }
.act-who .addr { min-width: 0; }
.act-who .to-c { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.act-who .to-c .chip { flex: none; }
.act-amt { display: grid; gap: 3px; font-size: var(--fs-sm); min-width: 0; }
/* an amount: the number keeps its width, the symbol moves down or cuts with an ellipsis */
.amt-l { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 6px; min-width: 0; max-width: 100%; white-space: nowrap; }
.amt-l .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; max-width: calc(100% - 22px); white-space: normal; overflow-wrap: anywhere; }
.amt-l .sym { max-width: 100%; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.amt-l .tok-ico, .act-amt .tok-ico { width: 16px; height: 16px; font-size: 9px; flex: none; }
.amt-l .chip .tok-ico { margin-right: 2px; }
.amt-l.in .mono { color: var(--ok); }
.act-time { font-size: var(--fs-sm); color: var(--ink-3); }
.act-st { justify-self: start; }
/* action icon: 36 px in lists, 48 px (.lg) on the tx page; a failed tx shows an X in the fail tone */
.act-ic { width: 36px; height: 36px; display: inline-grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-2); }
.act-ic svg { width: 18px; height: 18px; }
.act-ic.lg { width: 48px; height: 48px; }
.act-ic.lg svg { width: 24px; height: 24px; }
[data-mode="pro"] .act-ic { border-radius: 50%; }
[data-mode="pro"] .act-ic.t-acc { background: var(--acc-soft); color: var(--accent); }
[data-mode="pro"] .act-ic.t-ok { background: var(--ok-soft); color: var(--ok); }
[data-mode="pro"] .act-ic.t-tag { background: var(--tag-soft); color: var(--tag); }
[data-mode="pro"] .act-ic.t-warn { background: var(--warn-soft); color: var(--warn); }
[data-mode="pro"] .act-ic.t-sys { background: var(--sys-soft); color: var(--sys); }
[data-mode="pro"] .act-ic.t-fail { background: var(--fail-soft); color: var(--fail); }
[data-mode="basic"] .act-ic { background: transparent; border: 2px solid var(--ink); color: var(--ink); }
[data-mode="basic"] .act-ic.t-fail { border-color: var(--fail); color: var(--fail); }
[data-mode="basic"] .act-row.failed { box-shadow: inset 4px 0 0 var(--fail); }
[data-mode="basic"] .act-row.bot-row { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface-2) 6px 7px); }
[data-mode="basic"] .act-s { font-size: 1.0625rem; }
[data-mode="basic"] .act-row.failed .act-s a { color: var(--ink); }
[data-mode="pro"] .act-row { padding-inline: 1.25rem; }
[data-mode="pro"] .act-head { padding-inline: 1.25rem; border-bottom-color: var(--line); }
@media (max-width: 900px) {
  .act-head { display: none; }
  .act-row { grid-template-columns: 36px minmax(0, 1fr) fit-content(45%); grid-template-areas: "ic main main" "ic who amt" "ic time st"; gap: 6px 12px; align-items: start; }
  .act-row > .act-ic { grid-area: ic; }
  .act-main { grid-area: main; } .act-who { grid-area: who; } .act-amt { grid-area: amt; justify-items: end; }
  .act-time { grid-area: time; font-size: var(--fs-xs); align-self: center; } .act-st { grid-area: st; justify-self: end; }
}
/* phones: From / To and Amount each take a full line; an empty Amount takes none */
@media (max-width: 640px) {
  .act-row { grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "ic main main" "ic who who" "ic amt amt" "ic time st"; }
  .act-amt { justify-items: start; }
  .act-amt:has(> .muted:only-child) { display: none; }
  [data-mode="pro"] .act-row { padding-inline: 1rem; }
}
.live-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 10px; }
[data-mode="pro"] .live-bar { padding-inline: 1.25rem; }
.live-bar:not(:has(> :not(:empty):not([hidden]))) { display: none; }

/* ---------------------------------------------------------------- blocks strip (home rail; the live island inserts .blk) */
.blk-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 1.5rem; }
.blk { display: grid; gap: 1px; padding-block: .6rem; border-top: 1px solid var(--line); font-size: var(--fs-sm); min-width: 0; position: relative; cursor: pointer; }
.blk > a:first-child { justify-self: start; font-weight: 600; text-decoration: none; }
.blk > a:first-child::after { content: ""; position: absolute; inset: 0; }
.blk:hover > a:first-child { color: var(--accent); }
[data-mode="basic"] .blk > a:first-child { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
[data-mode="pro"] .blk-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
[data-mode="pro"] .blk > a:first-child { border: 0; }
@media (max-width: 959px) { [data-mode="pro"] .blk-strip { grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); } }
@media (max-width: 759px) { .blk-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- tabs and pager */
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line); }
.tabs a, .tabs [role="tab"] { font: inherit; font-size: var(--fs-sm); font-weight: 500; display: inline-flex; align-items: center; min-height: var(--tap); padding: 8px 10px; white-space: nowrap; color: var(--ink-3); text-decoration: none; background: none; border: 0; cursor: pointer; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"], .tabs [aria-selected="true"] { color: var(--ink); }
.tabs :focus-visible { outline-offset: -3px; }
.tab-sep { align-self: center; margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; }
[data-mode="basic"] .tabs { border-bottom: 1px solid var(--rule); gap: 1.25rem; }
[data-mode="basic"] .tabs a { padding-inline: 0; font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); box-shadow: inset 0 -4px 0 transparent; }
[data-mode="basic"] .tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -4px 0 var(--accent); font-weight: 700; }
[data-mode="pro"] .tabs { padding: .5rem 1rem; gap: 4px; }
[data-mode="pro"] .tabs a { border-radius: 6px; padding-inline: .65rem; min-height: calc(var(--tap) - 4px); }
[data-mode="pro"] .tabs a:hover { background: var(--surface-2); }
[data-mode="pro"] .tabs a[aria-current="page"] { background: var(--surface-3); color: var(--ink); }
.pager { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- notes: info, ok, warn (degraded, partial), fail, bot, spam */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; font-size: var(--fs-sm); color: var(--ink); min-width: 0; }
.note .ic { flex: none; margin-top: 2px; display: flex; color: var(--ink-3); }
.note .body { display: grid; gap: 6px; min-width: 0; }
.note.ok .ic { color: var(--ok); } .note.fail .ic { color: var(--fail); } .note.bot .ic { color: var(--bot); } .note.spam .ic { color: var(--spam); }
.note:is(.warn, .degraded, .partial) .ic { color: var(--warn); }
.note.info .ic { color: var(--accent); }
[data-mode="basic"] .note { border-left: 4px solid var(--ink); padding: 4px 0 4px 14px; font-size: var(--fs-md); }
[data-mode="basic"] .note:is(.fail, .spam, .degraded, .warn) { border-left-color: var(--accent); }
[data-mode="pro"] .note { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
[data-mode="pro"] .note.ok { background: var(--ok-soft); } [data-mode="pro"] .note.fail { background: var(--fail-soft); }
[data-mode="pro"] .note:is(.warn, .degraded, .partial) { background: var(--warn-soft); }
[data-mode="pro"] .note.bot { background: var(--bot-soft); } [data-mode="pro"] .note.spam { background: var(--spam-soft); }

/* ---------------------------------------------------------------- the action sentence and the collapsed technical details */
.action { line-height: 1.45; overflow-wrap: anywhere; text-wrap: pretty; }
.action .amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.action a[href^="/address/"] > code { max-width: 18ch; }
/* <details class="tech"><summary><span class="tech-t">Technical details</span> hint</summary><div class="tech-b">...</div></details> */
details.tech { min-width: 0; }
details.tech > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: max(44px, var(--tap)); cursor: pointer; list-style: none; color: var(--ink-3); }
details.tech > summary::-webkit-details-marker { display: none; }
details.tech > summary::before { content: ""; width: 7px; height: 7px; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); margin-right: 2px; }
details.tech[open] > summary::before { transform: rotate(45deg); }
details.tech > summary .tech-t { color: var(--ink); font-weight: 600; }
details.tech > summary:hover .tech-t { color: var(--accent); }
.tech-b { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 1rem; }
.tech-s { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.tech-b .log { display: grid; gap: 8px; padding-block: 12px; border-top: 1px solid var(--line); min-width: 0; }
.tech-b ol { margin: 0; padding-left: 1.25rem; }
details.raw > summary { cursor: pointer; color: var(--ink-2); font-size: var(--fs-sm); min-height: 24px; }
details.raw[open] > summary { margin-bottom: 6px; }
pre, pre.code { margin: 0; padding: 14px 16px; background: var(--surface-2); overflow: auto; font-family: var(--font-mono); font-size: .78rem; line-height: 1.6; max-height: 420px; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-mode="pro"] pre { border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
/* Basic: a 4 px rule over the summary, 1 px under it, the hint in mono capitals at the right */
[data-mode="basic"] details.tech > summary { border-top: var(--rule-w) solid var(--rule); border-bottom: 1px solid var(--rule); padding-block: .9rem; justify-content: space-between; }
[data-mode="basic"] details.tech > summary::before { order: 3; margin: 0 0 0 .5rem; }
[data-mode="basic"] details.tech > summary .tech-t { font-size: 1.0625rem; font-weight: 700; margin-right: auto; }
[data-mode="basic"] details.tech > summary > :not(.tech-t) { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
@media (min-width: 900px) { [data-mode="basic"] dl.kv { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: 1.5rem; } }
/* Pro: a quiet disclosure on a card */
[data-mode="pro"] details.tech { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
[data-mode="pro"] details.tech > summary { padding: .5rem 1.25rem; border-radius: var(--r-lg); }
[data-mode="pro"] details.tech[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
[data-mode="pro"] details.tech > .tech-b { padding: 1rem 1.25rem; }

/* ---------------------------------------------------------------- glossary terms (CSS shows the tooltip on hover and
   keyboard focus; the gl island adds tap, Escape and the flip) */
.gl { position: relative; display: inline; }
.gl-t { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-transform: inherit; letter-spacing: inherit; border-bottom: 1px dotted currentColor; cursor: help; }
.gl-t:hover { color: var(--accent); }
.gl-pop { display: none; position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 35; width: max-content; max-width: min(300px, calc(100vw - 32px)); padding: 10px 12px; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 400; line-height: 1.45; text-transform: none; letter-spacing: 0; white-space: normal; text-align: left; background: var(--ink); color: var(--bg); }
[data-mode="pro"] .gl-pop { background: var(--surface-3); color: var(--ink); border: 1px solid var(--ctl); border-radius: var(--r); }
.gl.below .gl-pop { bottom: auto; top: calc(100% + 8px); }
.gl:hover .gl-pop, .gl-t:focus-visible + .gl-pop, .gl.open .gl-pop { display: block; }
.gl.dismissed .gl-pop { display: none; }

/* ---------------------------------------------------------------- steps: <ol class="steps"><li class="done"><span class="n">01</span>Included on GIWA</li>...</ol>
   The current step carries aria-current="step"; done and current also differ in weight and marker, not only colour. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .75rem 1.5rem; counter-reset: step; }
.steps > li { display: grid; gap: .2rem; align-content: start; color: var(--ink-3); counter-increment: step; }
.steps > li .n { font-family: var(--font-mono); font-size: var(--fs-xs); }
.steps > li.done, .steps > li[aria-current="step"] { color: var(--ink); }
.steps > li[aria-current="step"] { font-weight: 700; }
[data-mode="basic"] .steps { border-top: var(--rule-w) solid var(--rule); padding-top: .8rem; }
[data-mode="basic"] .steps > li { font-weight: 700; font-size: 1.15rem; }
[data-mode="basic"] .steps > li[aria-current="step"] { color: var(--accent); }
[data-mode="pro"] .steps { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: var(--fs-sm); }
[data-mode="pro"] .steps > li { display: flex; align-items: center; gap: .4rem; }
[data-mode="pro"] .steps > li + li::before { content: ""; width: 2rem; height: 1px; background: var(--line); margin-right: .2rem; }
[data-mode="pro"] .steps > li[aria-current="step"] { color: var(--ok); font-weight: 500; }

/* ---------------------------------------------------------------- states: empty, error page, skeleton */
.empty { padding: 2.5rem 0; display: grid; gap: 8px; justify-items: start; color: var(--ink-2); }
.empty h2, .empty h3 { color: var(--ink); font-size: var(--fs-lg); }
[data-mode="pro"] .empty { padding: 2.5rem 1.25rem; justify-items: center; text-align: center; }
.big-state { display: grid; gap: 1rem; justify-items: start; padding-block: 1rem 2rem; }
.big-state p { color: var(--ink-2); max-width: 60ch; }
.big-state .code-n { font-family: var(--font-mono); color: var(--ink-3); line-height: 1; }
.big-state .search { width: min(32rem, 100%); }
.big-state .hstack { gap: 10px; }
[data-mode="basic"] .big-state { border-top: var(--rule-w) solid var(--rule); padding-top: 1rem; }
[data-mode="basic"] .big-state .code-n { font-family: var(--font-sans); font-size: clamp(6rem, 22vw, 16rem); font-weight: 800; letter-spacing: -.06em; line-height: .8; color: var(--accent); }
[data-mode="basic"] .big-state h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 760px) {
  [data-mode="basic"] .big-state { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; }
  [data-mode="basic"] .big-state > * { grid-column: 4 / 13; }
  [data-mode="basic"] .big-state > .code-n { grid-column: 1 / -1; }
}
[data-mode="pro"] .big-state { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 3rem 1.5rem; justify-items: center; text-align: center; }
[data-mode="pro"] .big-state .code-n { font-size: 2.5rem; }
[data-mode="pro"] .big-state .hstack { justify-content: center; }
.sk { background: var(--surface-2); height: 12px; }

/* ---------------------------------------------------------------- island hooks (static/islands.js; wasm/src/dom.rs) */
/* live state: Live / Paused / indexer behind / unavailable; empty (no JS) takes no space. The marker shape changes too. */
[data-live-state] { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-2); }
[data-live-state]:empty { display: none; }
[data-live-state]::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--ink-3); }
[data-live-state][data-state="live"]::before { background: var(--ok); }
[data-live-state][data-state="paused"]::before, [data-live-state][data-state="behind"]::before { background: transparent; box-shadow: inset 0 0 0 2px var(--warn); }
[data-live-state][data-state="behind"], [data-live-state][data-state="down"] { color: var(--warn); }
[data-live-state][data-state="down"]::before { background: transparent; box-shadow: inset 0 0 0 2px var(--fail); }
[data-mode="pro"] [data-live-state]::before { border-radius: 50%; }
[data-mode="basic"] [data-live-state] { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
[data-mode="basic"] [data-live-state][data-state="live"]::before { background: var(--accent); }
[data-live-pause], button[data-copy]:not(.copy) { font: inherit; font-size: var(--fs-xs); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; min-height: max(28px, calc(var(--tap) - 6px)); padding: 4px 10px; border-radius: var(--r); border: 1px solid var(--ctl); background: var(--surface); color: var(--ink); cursor: pointer; }
[data-live-pause][aria-pressed="true"] { background: var(--ink); color: var(--bg); }
[data-live-pill], .pill-new { font: inherit; font-size: var(--fs-xs); font-weight: 600; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 5px 12px; min-height: max(28px, calc(var(--tap) - 6px)); cursor: pointer; }
[data-mode="basic"] :is([data-live-pill], .pill-new) { border-radius: 0; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
[data-bots-toggle] { white-space: nowrap; }
.act-list[aria-busy="true"], tbody[aria-busy="true"] { cursor: progress; }

/* more island (/blocks, /txs): one line under the list. States: loading, error (+ Try again), end, cap (500 rows). */
.more { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; min-height: 52px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm); text-align: center; }
.more:focus-visible { outline-offset: -3px; }
.more[data-state="error"] { color: var(--fail); }
.more[data-state="error"]::before { content: "!"; display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; font-weight: 700; font-size: 12px; border: 2px solid currentColor; }
.more:is([data-state="end"], [data-state="cap"]) { color: var(--ink-3); }
[data-mode="basic"] .more { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; justify-content: flex-start; }
[data-mode="basic"] .more[data-state="loading"]::before { content: ""; width: 10px; height: 10px; flex: none; background: var(--accent); animation: more-blink 1s steps(2, jump-none) infinite; }
[data-mode="basic"] .more:is([data-state="end"], [data-state="cap"]) { border-top: var(--rule-w) solid var(--rule); color: var(--ink); }
[data-mode="basic"] .more:is([data-state="end"], [data-state="cap"])::before { content: ""; width: 10px; height: 10px; flex: none; background: var(--ink); }
[data-mode="basic"] .more[data-state="error"] { border-top: 2px solid var(--fail); }
@keyframes more-blink { to { opacity: .15; } }
[data-mode="pro"] .more[data-state="loading"]::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; border: 2px solid var(--accent); }
[data-mode="pro"] .more[data-state="error"] { background: var(--fail-soft); }
[data-mode="pro"] .more[data-state="error"]::before { border-radius: 50%; }
[data-mode="pro"] .more:is([data-state="end"], [data-state="cap"])::before { content: ""; width: 1.5rem; height: 1px; background: var(--line); }

/* ---------------------------------------------------------------- motion: Basic may move (entry, new rows); Pro never does */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes row-in { from { background-color: color-mix(in srgb, var(--surface-2) 70%, transparent); } }
@media (prefers-reduced-motion: no-preference) {
  [data-mode="basic"] main > * { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
  [data-mode="basic"] main > :nth-child(2) { animation-delay: .06s; }
  [data-mode="basic"] main > :nth-child(3) { animation-delay: .12s; }
  [data-mode="basic"] main > :nth-child(n + 4) { animation-delay: .18s; }
  [data-mode="basic"] :is(.act-row, .blk).live-new, [data-mode="basic"] tr.live-new > * { animation: row-in 2.4s ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
[data-mode="pro"] *, [data-mode="pro"] *::before, [data-mode="pro"] *::after { animation: none !important; transition: none !important; }

/* ---------------------------------------------------------------- block and tx pages (task 3)
   Markup (templates/block.html and tx.html; the same in both modes):
     .bar > nav.crumbs + nav.nbr                          crumbs, and the previous/next block links
     .split.sheet(.bp | .txp) > .lede, .story, .rail     the page. Basic: one column of grid rows, in DOM order.
                                                          Pro: one card, the rail (properties) right of the story.
     .bp-head > h1 (Block <span.num>) + p.bp-fin + p.sub
     .tx-head > .act-ic.lg + p.eyebrow + h1#sum-h + p.tx-meta
     section.sec > h2 (h2#balances is pinned without .sec-h; it gets the same voice here) + content
     ol.steps > li[data-state=done|current|todo] > strong + span (+ span.now)         finality of the block
     dl.kpis.kinds, ol.rank / ul.rank                     what happened in the block
     table.series > tr[aria-current] > td a, td, td > progress + span                  the neighbour strip
     ul.mv-list > li.mv > .chip + .mv-amt + .mv-who        token movements (a word and a sign)
     table.bal-t > tr.up|dn, ul.bal-tok > li.up|dn > .who + .chg    balance changes (a sign; colour only adds)
     ol.said > li[value][data-known]                       the logs as sentences
     details.tech > summary + .tech-b > table (no class) and .tech-s sections            technical details */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-width: 0; }
.nbr { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.crumbs .copy { margin-left: -2px; }
.sheet .sec { row-gap: 1.25rem; }
.sheet .sec > h2:not(.sec-h) { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); }
[data-mode="basic"] .sheet .sec > h2:not(.sec-h) { font-family: var(--font-mono); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.sec-h .aside { color: var(--ink-3); font-weight: 400; }
[data-mode="basic"] .sec-h .aside { display: block; margin-top: .3rem; }
@media (min-width: 760px) { [data-mode="basic"] .sheet .sec > h2 { grid-column: 1 / 4; } }
.sheet h3 { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
[data-mode="basic"] .sheet h3 { font-size: 1rem; font-weight: 700; color: var(--ink); }
.sheet .rank, .sheet .mv-list, .sheet .bal-tok { list-style: none; margin: 0; padding: 0; }

/* the head of each page */
.bp-head, .tx-head { gap: .75rem; }
.bp-head .sub { color: var(--ink-2); }
.bp-fin { display: flex; gap: 8px; }
.tx-head { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 1rem; }
.tx-head > .act-ic { grid-column: 1; grid-row: 1; }
.tx-head > .eyebrow { grid-column: 2; grid-row: 1; }
.tx-head > h1, .tx-head > .tx-meta { grid-column: 1 / -1; }
.tx-head .action a[href^="/address/"] > code { max-width: 14ch; }
.tx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px .6rem; font-size: var(--fs-sm); color: var(--ink-2); }
.tx-meta > * + * { padding-left: .6rem; border-left: 1px solid var(--line); }
/* Basic: the block number is the poster (label "Block" in column 1, the number in 4-12); the action sentence runs
   large in 4-12 with type, status, time and block stacked in 1-3 */
[data-mode="basic"] .bp-head h1 { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: .6rem; align-items: start; font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; line-height: 1.2; }
[data-mode="basic"] .bp-head h1 .num { font-family: var(--font-sans); font-size: clamp(3.4rem, 9.5vw, 8.6rem); font-weight: 800; letter-spacing: -.04em; line-height: .88; text-transform: none; overflow-wrap: anywhere; }
[data-mode="basic"] .bp-head .sub { font-size: 1.125rem; line-height: 1.45; color: var(--ink); }
[data-mode="basic"] .tx-head > h1 { font-size: clamp(1.75rem, 4.2vw, 3.4rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.04; }
[data-mode="basic"] .tx-head .action .amount { font-weight: 800; }
[data-mode="basic"] .tx-meta { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
@media (min-width: 760px) {
  [data-mode="basic"] .bp-head, [data-mode="basic"] .tx-head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; row-gap: 1.2rem; align-items: start; }
  [data-mode="basic"] .bp-head h1 { grid-column: 1 / -1; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; padding-top: .8rem; border-top: var(--rule-w) solid var(--rule); }
  [data-mode="basic"] .bp-head h1 .num { grid-column: 4 / 13; }
  [data-mode="basic"] .bp-head .bp-fin { grid-column: 1 / 4; }
  [data-mode="basic"] .bp-head .sub { grid-column: 4 / 13; }
  [data-mode="basic"] .tx-head { grid-template-rows: auto auto auto 1fr; padding-top: .8rem; border-top: var(--rule-w) solid var(--rule); }
  [data-mode="basic"] .tx-head > .act-ic { grid-column: 1 / 4; grid-row: 1; }
  [data-mode="basic"] .tx-head > .eyebrow { grid-column: 1 / 4; grid-row: 2; }
  [data-mode="basic"] .tx-head > .tx-meta { grid-column: 1 / 4; grid-row: 3; display: grid; justify-items: start; gap: .4rem; }
  [data-mode="basic"] .tx-meta > * + * { padding-left: 0; border-left: 0; }
  [data-mode="basic"] .tx-head > h1 { grid-column: 4 / 13; grid-row: 1 / 5; }
}
/* Pro: a quiet title; the chip sits next to it */
[data-mode="pro"] .bp-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
[data-mode="pro"] .bp-head .sub { flex-basis: 100%; color: var(--ink-3); }
[data-mode="pro"] .tx-head { grid-template-columns: 48px minmax(0, 1fr); row-gap: .35rem; }
[data-mode="pro"] .tx-head > .act-ic { grid-row: 1 / 3; align-self: start; }
[data-mode="pro"] .tx-head > h1 { grid-column: 2; grid-row: 2; font-size: 1.4rem; line-height: 1.35; }
[data-mode="pro"] .tx-head > .tx-meta { grid-column: 2; color: var(--ink-3); }
@media (max-width: 640px) { [data-mode="pro"] .tx-head > :is(h1, .tx-meta) { grid-column: 1 / -1; } [data-mode="pro"] .tx-head > .act-ic { grid-row: 1; } }

/* Pro: the split is one card on the layer grey; the rail is the raised column at its right (under it on phones) */
[data-mode="pro"] .sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); gap: 0; }
[data-mode="pro"] .sheet > .lede { padding: 1.5rem 1rem 0; }
[data-mode="pro"] .sheet > .story { padding: 1.75rem 1rem 2rem; gap: 2.25rem; }
[data-mode="pro"] .sheet > .rail { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 1.5rem 1rem; }
[data-mode="pro"] .sheet :is(thead, tbody) > tr > :first-child { padding-left: 0; }
[data-mode="pro"] .sheet :is(thead, tbody) > tr > :last-child { padding-right: 0; }
@media (min-width: 960px) {
  [data-mode="pro"] .sheet > .lede { padding: 2.25rem 2.5rem 0; }
  [data-mode="pro"] .sheet > .story { padding: 2rem 2.5rem 2.5rem; }
  [data-mode="pro"] .sheet > .rail { align-self: stretch; border-top: 0; border-left: 1px solid var(--line); border-radius: 0 var(--r-lg) var(--r-lg) 0; padding: 2rem 1.5rem; }
}

/* block finality: numbered in Basic, a checked timeline in Pro; the current step also says "(now)" */
.bp .steps > li > span { font-size: var(--fs-sm); font-weight: 400; color: var(--ink-3); }
.bp .steps > li > .now { font-family: var(--font-mono); font-size: var(--fs-xs); color: inherit; }
[data-mode="basic"] .bp .steps > li { grid-template-columns: auto minmax(0, 1fr); column-gap: .6rem; }
[data-mode="basic"] .bp .steps > li > :not(.now) { grid-column: 1 / -1; }
[data-mode="basic"] .bp .steps > li > .now { grid-column: 2; grid-row: 1; justify-self: start; text-transform: uppercase; letter-spacing: .06em; }
.bp .steps > li:is([data-state="done"], [data-state="current"]) { color: var(--ink); }
.bp .steps > li[data-state="current"] > span:not(.now) { color: var(--ink-2); }
[data-mode="basic"] .bp .sec:has(> .steps) { border-top: var(--rule-w) solid var(--rule); }
[data-mode="basic"] .bp .sec > .steps { border-top: 0; padding-top: 0; }
[data-mode="basic"] .bp .steps > li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 400; }
[data-mode="basic"] .bp .steps > li[data-state="current"] { color: var(--accent); }
[data-mode="pro"] .bp .steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; }
[data-mode="pro"] .bp .steps > li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); column-gap: .5rem; align-items: baseline; position: relative; }
[data-mode="pro"] .bp .steps > li > * { grid-column: 2; }
[data-mode="pro"] .bp .steps > li::before { content: ""; grid-column: 1; grid-row: 1; justify-self: center; width: .6rem; height: .6rem; border: 1.5px solid var(--ink-3); border-radius: 50%; background: none; margin: 0; }
[data-mode="pro"] .bp .steps > li:is([data-state="done"], [data-state="current"])::before { width: .6rem; height: .32rem; border: 0; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); border-radius: 0; transform: translateY(-.2rem) rotate(-45deg); }
[data-mode="pro"] .bp .steps > li:not(:last-child)::after { content: ""; position: absolute; left: calc(.625rem - .5px); top: 1.35rem; bottom: -.75rem; width: 1px; background: var(--line); }
[data-mode="pro"] .bp .steps > li[data-state="current"] > strong { color: var(--ok); font-weight: 600; }
[data-mode="pro"] .bp .steps > li > strong { font-weight: 500; }

/* what happened: six counts (Basic numerals, Pro tiles), the most called and the largest transfers as rows */
[data-mode="basic"] .kinds, [data-mode="pro"] .kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 480px) { [data-mode="pro"] .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rank > li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding-block: .55rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.rank > li:last-child { border-bottom: 0; }
ol.rank > li > span:last-child { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--ink-2); }
[data-mode="basic"] .rank > li { border-bottom-color: var(--line); }
[data-mode="basic"] .rank { border-top: 1px solid var(--rule); }

/* the neighbour strip: one bar per block (height = transactions, against the busiest of the strip). Each bar is the
   block's link (the visually hidden link's ::after covers the bar); the numbers stay in the table cells for screen
   readers. Hover or focus shows span.tip (aria-hidden, the title stays as a fallback) above the bar: anchored at the
   bar's left in the first half of the strip and at its right in the second (tr.end), so it never runs off either end. */
table.series { display: block; }
.series tbody { display: flex; align-items: stretch; gap: 2px; height: 8rem; }
.series tbody tr { display: flex; flex: 1 1 0; min-width: 0; position: relative; }
.series tbody td { display: block; padding: 0; border: 0; white-space: normal; }
.series tbody td:not(:last-child) { flex: none; width: 1px; height: 1px; margin-right: -1px; overflow: hidden; }
.series tbody td:last-child { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.series td > progress + span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.series progress { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 100%; margin: 0; border: 0; background: transparent; writing-mode: vertical-lr; direction: rtl; color: var(--ink-3); }
.series progress::-webkit-progress-bar { background: transparent; }
.series progress::-webkit-progress-value { background: var(--ink-3); }
.series progress::-moz-progress-bar { background: var(--ink-3); }
.series tr[aria-current] progress { color: var(--accent); }
.series tr[aria-current] progress::-webkit-progress-value { background: var(--accent); }
.series tr[aria-current] progress::-moz-progress-bar { background: var(--accent); }
.series tr:hover progress::-webkit-progress-value { background: var(--ink); }
.series tr:hover progress::-moz-progress-bar { background: var(--ink); }
.series tbody tr:has(a:focus-visible) { outline: var(--ring) solid var(--focus); outline-offset: 2px; z-index: 1; }
.series td a::after { content: ""; position: absolute; inset: 0; }
.series .tip { display: none; position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 35; width: max-content; padding: 6px 9px; font-size: var(--fs-xs); line-height: 1.35; white-space: nowrap; text-align: left; background: var(--ink); color: var(--bg); pointer-events: none; }
.series .tip b { display: block; font-weight: 600; }
.series tr.end .tip { left: auto; right: 0; }
.series tbody tr:is(:hover, :focus-within) .tip { display: block; }
.series tbody tr:focus-within progress::-webkit-progress-value { background: var(--ink); }
.series tbody tr:focus-within progress::-moz-progress-bar { background: var(--ink); }
[data-mode="basic"] .series .tip { font-family: var(--font-mono); }
[data-mode="pro"] .series .tip { background: var(--surface-3); color: var(--ink); border: 1px solid var(--ctl); border-radius: var(--r); }
/* the current block also carries a mark under its bar (not colour alone) */
.series tr[aria-current] td:last-child::after { content: ""; height: 4px; margin-top: 3px; background: var(--accent); }
.series-k { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 1rem; font-size: var(--fs-xs); color: var(--ink-3); }
.series-k .this { color: var(--accent); font-weight: 600; }
[data-mode="basic"] .series tbody { border-bottom: 2px solid var(--ink); }
[data-mode="basic"] .series-k { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
[data-mode="pro"] .series tbody { height: 4.5rem; gap: 3px; }
[data-mode="pro"] .series progress::-webkit-progress-value { background: var(--ctl); border-radius: 2px; }
[data-mode="pro"] .series progress::-moz-progress-bar { background: var(--ctl); border-radius: 2px; }
[data-mode="pro"] .series tr[aria-current] progress::-webkit-progress-value { background: var(--accent); }
[data-mode="pro"] .series tr[aria-current] progress::-moz-progress-bar { background: var(--accent); }
[data-mode="pro"] .series tr:hover progress::-webkit-progress-value { background: var(--ink); }
[data-mode="pro"] .series tr:hover progress::-moz-progress-bar { background: var(--ink); }
[data-mode="pro"] .series tr:focus-within progress::-webkit-progress-value { background: var(--ink); }
[data-mode="pro"] .series tr:focus-within progress::-moz-progress-bar { background: var(--ink); }

/* a small gauge (gas used of the limit) */
progress.gauge { -webkit-appearance: none; appearance: none; width: 4.5rem; height: 4px; border: 0; background: var(--line); color: var(--ink); }
progress.gauge::-webkit-progress-bar { background: var(--line); }
progress.gauge::-webkit-progress-value { background: var(--ink); }
progress.gauge::-moz-progress-bar { background: var(--ink); }
[data-mode="basic"] progress.gauge { width: 100%; height: 6px; background: var(--surface-3); }
[data-mode="basic"] progress.gauge::-webkit-progress-bar { background: var(--surface-3); }
[data-mode="pro"] progress.gauge, [data-mode="pro"] progress.gauge::-webkit-progress-bar, [data-mode="pro"] progress.gauge::-webkit-progress-value { border-radius: 2px; }

/* the rail: wide values take the full row in Basic */
.sheet dl.props dd .mono { font-size: var(--fs-sm); }
.sheet dl.props .chip { white-space: normal; line-height: 1.25; }
.sheet .p-hash dd { font-size: var(--fs-sm); }
[data-mode="basic"] .sheet dl.props > :is(.p-status, .p-hash) { grid-column: 1 / -1; }
[data-mode="basic"] .sheet dl.props dd .mono { font-size: 1rem; }
[data-mode="pro"] .sheet .rail dl.props > div { grid-template-columns: 6.5rem minmax(0, 1fr); }

/* token movements: the word (chip), the signed amount, the other side */
.mv { display: grid; grid-template-columns: 5.5rem auto minmax(0, 1fr); gap: 4px 14px; align-items: baseline; padding-block: .65rem; border-bottom: 1px solid var(--line); }
.mv:last-child { border-bottom: 0; }
.mv > .chip { justify-self: start; }
.mv-amt { min-width: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mv-who { min-width: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.mv-who a[href^="/address/"] > code { max-width: 16ch; }
[data-mode="basic"] .mv-list { border-top: 1px solid var(--rule); }
[data-mode="basic"] .mv-amt { font-size: 1.375rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
[data-mode="pro"] .mv-amt { font-family: var(--font-mono); font-weight: 500; }
[data-mode="pro"] .mv-in .mv-amt { color: var(--ok); }
@media (max-width: 640px) {
  .mv { grid-template-columns: auto minmax(0, 1fr); }
  .mv-who { grid-column: 2; }
}

/* balance changes: ETH as a table (before, after, change), tokens as rows (net change) */
.bal-t caption { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); }
.bal-t td { text-align: right; font-variant-numeric: tabular-nums; }
.bal-t tbody th[scope="row"] { white-space: normal; font-weight: 400; }
.bal-t td:last-child, .bal-tok .chg { font-weight: 600; }
.bal-tok > li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-block: .55rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.bal-tok > li:last-child { border-bottom: 0; }
.bal-tok .chg { font-variant-numeric: tabular-nums; text-align: right; }
[data-mode="basic"] .bal-t caption { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
[data-mode="basic"] :is(.bal-t td:last-child, .bal-tok .chg) { font-size: 1.125rem; font-weight: 800; letter-spacing: -.01em; }
[data-mode="basic"] .bal-tok { border-top: 1px solid var(--rule); }
[data-mode="pro"] :is(.bal-t td, .bal-tok .chg) { font-family: var(--font-mono); }
[data-mode="pro"] :is(.bal-t tr.up td:last-child, .bal-tok li.up .chg) { color: var(--ok); }

/* the logs as sentences, numbered by log index */
ol.said { margin: 0; padding-left: 3rem; list-style: decimal-leading-zero; }
.said > li { padding-block: .6rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; line-height: 1.5; }
.said > li:last-child { border-bottom: 0; }
.said > li::marker { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-3); }
.said > li[data-known="no"] { color: var(--ink-2); }
.said details.raw { margin-top: .4rem; }
.said details.raw ol { margin: 0 0 6px; padding-left: 1.25rem; font-size: var(--fs-xs); }
[data-mode="basic"] ol.said { border-top: 1px solid var(--rule); }
[data-mode="basic"] .said > li { font-size: 1.0625rem; }
[data-mode="basic"] .said > li::marker { color: var(--ink); }

/* technical details: the block's summary is plain text (pinned); key/value tables wrap long hashes */
details.tech > summary:not(:has(.tech-t)) { color: var(--ink); font-weight: 600; }
details.tech > summary:not(:has(.tech-t)):hover { color: var(--accent); }
[data-mode="basic"] details.tech > summary:not(:has(.tech-t)) { font-size: 1.0625rem; font-weight: 700; }
.tech-b caption, .tech-s > h2 { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); }
.tech-s { border-top: 1px solid var(--line); padding-top: 1rem; }
.tech-b table:not(.t) tbody th[scope="row"] { width: 14rem; font-size: var(--fs-sm); font-weight: 400; color: var(--ink-3); white-space: normal; vertical-align: top; }
.tech-b table:not(.t) td { white-space: normal; overflow-wrap: anywhere; }
.tech-b table:not(.t) td ul { margin: 0; padding-left: 1.1rem; }
.tech-b > p, .tech-s > p { overflow-wrap: anywhere; }
[data-mode="basic"] :is(.tech-b caption, .tech-s > h2, .tech-b table:not(.t) tbody th[scope="row"]) { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
[data-mode="basic"] .tech-s { border-top-color: var(--rule); }
[data-mode="pro"] .tech-b :is(thead, tbody) > tr > :first-child { padding-left: 0; }
[data-mode="pro"] .tech-b :is(thead, tbody) > tr > :last-child { padding-right: 0; }
@media (max-width: 640px) {
  .tech-b table:not(.t), .tech-b table:not(.t) :is(tbody, tr, th, td) { display: block; width: auto; }
  .tech-b table:not(.t) tbody th[scope="row"] { border-bottom: 0; padding-bottom: 0; }
  .tech-b table:not(.t) td { padding-top: 2px; padding-left: 0; }
}

table.t td time[datetime] { display: inline-block; min-width: 10ch; white-space: nowrap; font-variant-numeric: tabular-nums; }
