@layer reset, tokens, base, layout, components, utilities;

/* Lazarus Pool UI. Warm dark surfaces, brass accent, serif display type over Plex Sans body
   and Plex Mono figures. Everything pool.js renders (tables, tickers, pills, cards) keeps its
   class names; the layout around them is what changed. */

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { margin: 0; }
  h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; }
  img, svg, canvas { display: block; max-width: 100%; }
  table { border-collapse: collapse; border-spacing: 0; }
  button, input { font: inherit; color: inherit; }
  button { cursor: pointer; }
  a { color: inherit; }
  [hidden] { display: none !important; }
}

@layer tokens {
  :root {
    --bg: oklch(13.5% 0.011 78);
    --bg-raised: oklch(17% 0.013 78);
    --bg-inset: oklch(11.5% 0.011 78);
    --bg-card: oklch(16% 0.013 78);
    --ink: oklch(94% 0.014 86);
    --muted: oklch(71% 0.02 80);
    --faint: oklch(54% 0.018 80);
    --line: oklch(26% 0.015 78);
    --line-strong: oklch(38% 0.02 78);
    --brass: oklch(80% 0.11 84);
    --brass-dim: oklch(63% 0.08 84);
    --brass-ink: oklch(20% 0.04 75);
    --solo: oklch(68% 0.11 52);
    --good: oklch(76% 0.13 155);
    --bad: oklch(68% 0.145 28);
    --warn: oklch(80% 0.12 85);
    --cjk: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    --sans: "IBM Plex Sans", var(--cjk), "Helvetica Neue", Helvetica, Arial, sans-serif;
    --serif: "Newsreader", "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", "Iowan Old Style", Palatino, "Times New Roman", serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    /* Chi Rho (labarum): the Lazarus mark, geometry identical to static/chi-rho.svg and the
       mempool theme's copy. Kept as a mask so it takes --brass wherever it is used. Its viewBox
       is cropped to the mark, so any box masking it wants width = 0.636 * height. */
    --chi-rho: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2020.36%2032%22%3E%3Cpath%20d=%22M15.96%204.16C15.96%202.91%2015.56%202.02%2014.61%201.56C14.14%201.33%2013.51%201.21%2012.71%201.21H9.61L9.69%200H13.65C14.77%200%2015.67%200.18%2016.36%200.55C17.04%200.91%2017.54%201.4%2017.86%202.01C18.17%202.63%2018.33%203.32%2018.33%204.07C18.33%204.84%2018.17%205.55%2017.84%206.2C17.52%206.84%2017.01%207.36%2016.32%207.75C15.63%208.13%2015.3%208.33%2014.01%208.33H9.69L9.61%207.12H13.4C14.39%207.12%2015.19%206.66%2015.63%205.78C15.85%205.35%2015.96%204.81%2015.96%204.16ZM11.57%200%2011.57%2010.83V30.94L13.18%2031.55V32H7.2V31.55L8.8%2030.94V10.83V1.06L7.2%200.45V0ZM9.8%2020.31%203.89%2027.07%206.01%2027.79V28.32H0V27.79L2.08%2027.07L9.02%2019.39L9.97%2018.7L15.18%2012.61L13.05%2011.89V11.36H19.07V11.89L16.99%2012.61L10.77%2019.61ZM14.05%2027.07%209.04%2020.79%208.6%2020.39%202.34%2012.63%200.3%2011.89V11.36H8.93V11.89L6.61%2012.61L10.91%2018.05L11.38%2018.5L18.32%2027.04L20.36%2027.79V28.32H11.73V27.79Z%22/%3E%3C/svg%3E");
    --space: 1.15rem;
    --measure: 76rem;
    --r-lg: 18px;
    --r: 12px;
    --r-sm: 8px;
    --radius: 6px;
    --topbar: 3.6rem;
    --mast: var(--topbar);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --shadow-card: 0 1px 0 oklch(100% 0 0 / 3%) inset, 0 12px 40px -24px oklch(0% 0 0 / 70%);
    color-scheme: dark;
  }
  @media (min-width: 880px) {
    :root { --space: 1.6rem; }
  }
}

@layer base {
  html {
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--mast) + 0.5rem);
  }
  body {
    min-height: 100dvh;
    font-family: var(--sans);
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.02rem);
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }
  ::selection {
    background: color-mix(in oklch, var(--brass) 55%, black);
    color: var(--ink);
  }
  :focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
  }
  a {
    color: var(--brass);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    text-decoration-color: color-mix(in oklch, var(--brass) 45%, transparent);
  }
  a:hover { text-decoration-color: var(--brass); }
  h1, h2, h3 { text-wrap: balance; }
  p, .note { text-wrap: pretty; }
  code, .mono {
    font-family: var(--mono);
    font-size: 0.86em;
    font-feature-settings: "tnum" 1;
  }
  code {
    padding: 0.05em 0.3em;
    border-radius: 4px;
    background: color-mix(in oklch, var(--brass) 8%, var(--bg-inset));
    color: color-mix(in oklch, var(--ink) 90%, var(--brass));
  }
  pre code { padding: 0; background: none; }
}

@layer layout {
  .wrap {
    width: min(100% - (var(--space) * 2), var(--measure));
    margin-inline: auto;
  }

  /* ---- Sticky chrome: nav + DATUM bonus banner freeze together at the top. */
  .site-mast {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid transparent;
    background: color-mix(in oklch, var(--bg) 72%, transparent);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    transition: border-color 200ms var(--ease), background 200ms var(--ease);
  }
  .site-mast[data-scrolled] {
    border-bottom-color: var(--line);
    background: color-mix(in oklch, var(--bg) 86%, transparent);
  }
  .site-header {
    border-bottom: 1px solid transparent;
  }
  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    min-height: var(--topbar);
  }
  .wordmark {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
  }
  /* Chi Rho ahead of the wordmark. Masked rather than inlined so it takes --brass and scales
     with font-size, which is what shrinks it for .wordmark.small in the footer. */
  .wordmark::before {
    content: "";
    display: inline-block;
    width: 0.65em;
    height: 1.02em;
    margin-right: 0.34em;
    vertical-align: -0.15em;
    background: var(--brass);
    -webkit-mask: var(--chi-rho) center / contain no-repeat;
    mask: var(--chi-rho) center / contain no-repeat;
  }
  .wordmark em {
    font-style: italic;
    font-weight: 400;
    color: var(--brass);
  }
  .nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 1.5rem), transparent);
    mask: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 1.5rem), transparent);
    padding-inline: 0.5rem;
    font-size: 0.82rem;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    flex: 0 0 auto;
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color 140ms var(--ease), background 140ms var(--ease);
  }
  .nav a:hover { color: var(--ink); background: color-mix(in oklch, var(--ink) 6%, transparent); }
  .nav a[aria-current="true"] {
    color: var(--brass);
    background: color-mix(in oklch, var(--brass) 12%, transparent);
  }
  .nav .nav-out {
    display: inline-flex;
    gap: 0.15rem;
    margin-left: auto;
    padding-left: 0.6rem;
    border-left: 1px solid var(--line);
  }
  .nav .nav-out a { color: var(--faint); }
  .nav .nav-out a:hover { color: var(--ink); }
  .ext::after {
    content: "\2197";
    margin-left: 0.2em;
    font-size: 0.8em;
    color: var(--brass-dim);
  }
  .topbar-side {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }
  .lang-switch {
    display: flex;
    flex: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
  }
  .lang-btn {
    appearance: none;
    background: transparent;
    border: 0;
    margin: 0;
    padding: 0.18rem 0.58rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--muted);
  }
  .lang-btn:hover { color: var(--ink); background: color-mix(in oklch, var(--ink) 6%, transparent); }
  .lang-btn[aria-pressed="true"] {
    background: var(--bg-raised);
    color: var(--ink);
  }
  html.lang-zh {
    --serif: "PingFang SC", "Hiragino Sans GB", "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  }
  html.lang-zh .eyebrow,
  html.lang-zh .promo-tag,
  html.lang-zh .kicker,
  html.lang-zh .kicker.table-label,
  html.lang-zh .category,
  html.lang-zh .fee-kicker {
    letter-spacing: 0.04em;
    text-transform: none;
  }
  html.lang-zh .hero h1, html.lang-zh .hero #hero-title { letter-spacing: 0; }
  @media (max-width: 860px) {
    .topbar { grid-template-columns: auto auto; grid-template-areas: "brand side" "nav nav"; row-gap: 0.15rem; padding-bottom: 0.4rem; }
    .wordmark { grid-area: brand; }
    .topbar-side { grid-area: side; justify-self: end; }
    .nav { grid-area: nav; margin-inline: calc(var(--space) * -1); padding-inline: var(--space); width: calc(100% + var(--space) * 2); }
    .nav .nav-out { margin-left: 0.4rem; }
  }
  @media (max-width: 460px) {
    .topbar-side .btn.small { display: none; }
  }

  /* ---- DATUM bonus banner: full-bleed strip under the nav, hidden when the rebate is off. */
  .promo {
    margin: 0;
    border-top: 1px solid color-mix(in oklch, var(--brass) 35%, var(--line));
    background: color-mix(in oklch, var(--brass) 12%, transparent);
  }
  .promo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 1rem;
    padding-block: 0.55rem 0.6rem;
    border-left: 3px solid var(--brass);
  }
  .promo-tag {
    flex: none;
    padding: 0.12rem 0.5rem 0.16rem;
    border: 1px solid var(--brass-dim);
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brass);
    white-space: nowrap;
  }
  .promo-copy {
    flex: 1 1 24rem;
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: color-mix(in oklch, var(--ink) 86%, var(--muted));
  }
  .promo-copy strong { color: var(--ink); font-weight: 600; }
  .promo-live {
    margin-left: 0.35rem;
    padding: 0.02rem 0.45rem;
    border: 1px solid var(--brass-dim);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--brass);
    white-space: nowrap;
  }
  .promo .btn { flex: none; }
  .promo-dismiss {
    flex: none;
    width: 1.75rem;
    height: 1.75rem;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg-inset);
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1;
    transition: color 140ms var(--ease), border-color 140ms var(--ease), background 140ms var(--ease);
  }
  .promo-dismiss:hover,
  .promo-dismiss:focus-visible {
    color: var(--brass);
    border-color: var(--brass);
  }

  /* The bonus, wherever it rides alongside a fee rate. */
  .fee-bonus {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--brass) !important;
    white-space: nowrap;
  }
  .fee-lede-rate .fee-bonus { margin-top: -0.1rem; }
  .fee-rate .fee-bonus { display: block; text-align: right; }
  .tab-fee.bonus { border-color: var(--brass-dim); color: var(--brass); }
  .chip.reco { border-color: color-mix(in oklch, var(--brass) 45%, var(--line)); }
  .chip.reco b { color: var(--brass); }
  .rebate-callout { border-left-color: var(--brass); background: color-mix(in oklch, var(--brass) 9%, var(--bg-inset)); }
  .rebate-callout b { color: var(--brass); font-variant-numeric: tabular-nums; }
  .how-step.reco {
    border-color: color-mix(in oklch, var(--brass) 45%, var(--line));
    background: color-mix(in oklch, var(--brass) 6%, var(--bg-card));
  }
  .how-step.reco .how-n { color: var(--brass); }

  /* ---- Hero. */
  .hero {
    position: relative;
    padding-block: clamp(2.6rem, 3rem + 3vw, 6rem) clamp(2rem, 2rem + 2vw, 4rem);
    overflow: hidden;
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto;
    height: 70%;
    background:
      radial-gradient(60% 55% at 22% 20%, color-mix(in oklch, var(--brass) 20%, transparent), transparent 70%),
      radial-gradient(40% 45% at 85% 10%, color-mix(in oklch, var(--brass) 9%, transparent), transparent 70%);
    pointer-events: none;
  }
  .hero::after {
    /* The labarum, very large and very faint, off the right edge. */
    content: "";
    position: absolute;
    right: -3rem;
    top: 1rem;
    width: 22rem;
    height: 34rem;
    background: var(--brass);
    opacity: 0.035;
    -webkit-mask: var(--chi-rho) center / contain no-repeat;
    mask: var(--chi-rho) center / contain no-repeat;
    pointer-events: none;
  }
  @media (max-width: 720px) { .hero::after { width: 14rem; height: 22rem; right: -4rem; opacity: 0.035; } }
  .hero-grid {
    position: relative;
    display: grid;
    gap: clamp(1.8rem, 1.5rem + 1.5vw, 3rem);
  }
  .hero-copy { display: grid; gap: 1.15rem; max-width: 52rem; }
  .eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass);
  }
  .eyebrow i { font-family: var(--serif); font-weight: 400; font-style: italic; text-transform: none; letter-spacing: 0; font-size: 1.1em; color: var(--muted); }
  .hero h1, .hero #hero-title {
    font-family: var(--serif);
    font-size: clamp(2.3rem, 1.4rem + 3.1vw, 4rem);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.03em;
    color: var(--ink);
  }
  .hero h1 em, .hero #hero-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--brass);
  }
  .hero-lede {
    max-width: 40rem;
    font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.2rem);
    line-height: 1.55;
    color: var(--muted);
  }
  .hero-lede span { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
  /* Opening copy on the keyword URLs (/bip110, /tides …), injected server-side. */
  .seo-intro {
    padding: clamp(2rem, 1.4rem + 2vw, 3.4rem) 0 0;
  }
  .seo-intro .wrap { display: grid; gap: 1rem; max-width: 52rem; }
  .seo-intro h1 {
    font-family: var(--serif);
    font-size: clamp(1.9rem, 1.3rem + 2.1vw, 2.9rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--ink);
  }
  .seo-intro p {
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.12rem);
    line-height: 1.6;
    color: var(--muted);
  }
  .seo-intro p b { color: var(--ink); font-weight: 600; }
  .seo-intro p a { color: var(--brass); }
  .seo-intro code {
    font-family: var(--mono);
    font-size: 0.92em;
    color: var(--ink);
  }
  html.lang-zh .seo-intro h1 { letter-spacing: 0; }
  /* Comparison and reference tables inside that copy. Six columns will not fit a phone, so the
     wrapper scrolls sideways rather than letting the table decide the page width. */
  .seo-table {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg-raised);
  }
  .seo-table table { min-width: 42rem; font-size: 0.78rem; border-radius: inherit; }
  .seo-table caption {
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--faint);
    border-bottom: 1px solid var(--line);
  }
  .seo-table th, .seo-table td {
    padding: 0.55rem 0.75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .seo-table thead th { color: var(--faint); font-weight: 500; }
  .seo-table tbody th { color: var(--ink); font-weight: 600; white-space: nowrap; }
  .seo-table tbody tr:last-child th, .seo-table tbody tr:last-child td { border-bottom: 0; }
  .seo-table tbody tr:first-child th[scope="row"] { color: var(--brass); }

  .hero-firsts {
    max-width: 40rem;
    padding-left: 0.85rem;
    border-left: 2px solid var(--brass-dim);
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--muted);
  }
  .hero-firsts b { color: var(--ink); font-weight: 600; }
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
    margin-top: 0.25rem;
  }
  .hero-more { margin-left: 0.4rem; color: var(--muted); font-size: 0.9rem; text-decoration: none; }
  .hero-more:hover { color: var(--brass); }
  .hero-more span { color: var(--brass-dim); }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.6rem;
  }
  @media (max-width: 1000px) { .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 560px) { .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

  /* ---- Section rhythm. */
  .section {
    padding-block: clamp(3rem, 2.5rem + 2.5vw, 5.5rem);
    border-top: 1px solid var(--line);
    scroll-margin-top: calc(var(--mast) + 0.5rem);
  }
  .section > .wrap { display: grid; gap: 1rem; }
  /* Grid items default to min-width:auto; a wide table or canvas inside would otherwise
     stretch the whole column past the viewport on narrow screens. */
  .section > .wrap > * { min-width: 0; }
  .section > .wrap > .section-head { margin-bottom: 0.5rem; }
  .hero { scroll-margin-top: var(--mast); }
  .section-head {
    display: grid;
    gap: 0.55rem;
    max-width: 52rem;
  }
  .section-head h2 {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.7rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.028em;
    color: var(--ink);
  }
  .section-lede {
    font-size: clamp(0.98rem, 0.92rem + 0.25vw, 1.1rem);
    line-height: 1.55;
    color: var(--muted);
  }
  .section-lede strong { color: var(--ink); font-weight: 600; }
  .section-head h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.015em;
  }
  .kicker, .sub-head p, .fold-head p { color: var(--muted); font-size: 0.88rem; }
  /* Sub-heads inside cards stay a single flex row: title left, summary right. */
  .sub-head, .fold-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    max-width: none;
  }
  .sub-head { margin-bottom: 0.9rem; }
  .fold-head { margin: 1rem 0 0.4rem; }
  .anchor { display: block; height: 0; scroll-margin-top: calc(var(--mast) + 1rem); }
  #gw-pick { scroll-margin-top: calc(var(--mast) + 1rem); }

  /* ---- Footer: same four-column link tree as the Lazarus Mempool footer. */
  .site-footer {
    margin-top: 1rem;
    border-top: 1px solid var(--line);
    background: var(--bg-inset);
  }
  .footer-grid {
    display: grid;
    grid-template-columns: minmax(13rem, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 1.6rem 1.8rem;
    padding-block: 3rem 3.2rem;
  }
  @media (max-width: 960px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }
  }
  @media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
  }
  .footer-brand { display: grid; gap: 0.55rem; align-content: start; max-width: 28rem; }
  .footer-brand .note { font-size: 0.86rem; }
  .wordmark.small { font-size: 1.35rem; }
  .serif { font-family: var(--serif); color: var(--ink); }
  .footer-col { display: grid; gap: 0.42rem; align-content: start; font-size: 0.86rem; }
  .footer-col a { color: var(--muted); text-decoration: none; }
  .footer-col a:hover { color: var(--brass); text-decoration: underline; }
  .footer-col .note { font-size: 0.76rem; line-height: 1.4; }
  .category {
    margin-bottom: 0.3rem;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .footer-endpoint { font-size: 0.78rem; color: var(--ink); }
  .footer-endpoint .mono { font-size: 0.74rem; word-break: break-all; }

  section { container-type: inline-size; }
}

@layer components {
  /* ---- Surfaces. */
  .card, .panel {
    padding: 1.15rem 1.25rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
  }
  .panel.compact { padding: 0.9rem 1rem; }
  @container (max-width: 34rem) {
    .card, .panel { padding: 0.95rem 1rem 1.05rem; border-radius: var(--r); }
  }

  .chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.22rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-raised);
    color: var(--muted);
    white-space: nowrap;
  }
  a.chip { text-decoration: none; color: var(--muted); }
  a.chip:hover { border-color: var(--brass); color: var(--ink); }
  .chip b { color: var(--ink); font-weight: 500; }
  .chip[data-live]::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--good) 20%, transparent);
    align-self: center;
  }
  .chip.stale[data-live]::before { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in oklch, var(--bad) 20%, transparent); }
  /* Top-bar variant: one mono figure with the live dot. */
  .chip.nav-live {
    font-family: var(--mono);
    font-size: 0.74rem;
    padding: 0.32rem 0.75rem;
  }
  @media (max-width: 860px) { .chip.nav-live { display: none; } }
  /* Hero variant: the chips become a strip of small stat cards, label over figure. */
  .hero-stats .chip {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.3rem;
    padding: 0.8rem 0.95rem 0.85rem;
    border-radius: var(--r);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    white-space: normal;
    min-width: 0;
  }
  .hero-stats .chip > span {
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
    padding-right: 1rem;
  }
  .hero-stats .chip b {
    font-family: var(--mono);
    font-size: clamp(0.98rem, 0.9rem + 0.35vw, 1.15rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }
  .hero-stats .chip[data-live]::before {
    position: absolute;
    top: 0.95rem;
    right: 0.9rem;
    width: 0.42rem;
    height: 0.42rem;
  }
  .hero-stats a.chip:hover { border-color: var(--brass-dim); }

  /* ---- Tickers: a grid of stat cards. pool.js renders <div><dt/><dd>value<small/></dd></div>. */
  .ticker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
  @container (min-width: 36rem) { .ticker { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  /* The pool overview has nine cells; the yield figure leads and takes two columns so the
     grid closes on every breakpoint that matters. */
  @container (min-width: 60rem) {
    .stats-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .stats-grid > :first-child { grid-column: span 2; }
  }
  @container (min-width: 36rem) and (max-width: 59.99rem) {
    .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @container (max-width: 35.99rem) {
    .stats-grid > :first-child { grid-column: span 2; }
  }
  .ticker > * {
    position: relative;
    padding: 0.85rem 1rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    min-width: 0;
  }
  .stats-grid > :first-child {
    background:
      radial-gradient(120% 100% at 0% 0%, color-mix(in oklch, var(--brass) 14%, transparent), transparent 60%),
      var(--bg-card);
    border-color: color-mix(in oklch, var(--brass) 35%, var(--line));
  }
  .stats-grid > :first-child dd { color: var(--brass); }
  .ticker dt {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .ticker dd {
    margin-top: 0.35rem;
    font-family: var(--mono);
    font-size: clamp(1.15rem, 1rem + 0.55vw, 1.45rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    overflow-wrap: anywhere;
  }
  .ticker small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0.25rem;
    font-family: var(--sans);
    font-size: 0.74rem;
    letter-spacing: 0;
    line-height: 1.4;
    color: var(--muted);
    font-weight: 400;
  }
  .ticker.slim dd { font-size: 1.1rem; }
  .ticker.slim { margin-bottom: 0.25rem; }
  .miner-card .ticker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  @container (min-width: 40rem) { .miner-card .ticker { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .miner-card .ticker > * { background: var(--bg-inset); box-shadow: none; }
  @container (min-width: 52rem) { .miner-card .ticker.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  /* The payouts strip grows a fifth cell while a make-good is pending for the address. */
  @container (min-width: 52rem) { .miner-card .ticker.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

  /* ---- Charts. */
  .path-hr {
    display: grid;
    gap: 0.9rem;
    margin: 0.85rem 0 1rem;
    padding: 0.9rem 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
  }
  .path-hr-pies {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: start;
    gap: 1.25rem;
  }
  @container (min-width: 40rem) {
    .path-hr.has-gw .path-hr-pies {
      grid-template-columns: 1fr 1fr;
    }
    .path-hr.has-gw .path-hr-keys {
      grid-template-columns: 1fr 1fr;
    }
  }
  .path-hr-chart-wrap {
    display: grid;
    grid-template-rows: 1.25rem 168px;
    justify-items: center;
    gap: 0.45rem;
    width: 100%;
  }
  .path-hr-chart {
    position: relative;
    width: 168px;
    height: 168px;
  }
  .path-hr-chart canvas {
    width: 168px;
    height: 168px;
    max-width: none;
  }
  .path-hr-center {
    position: absolute;
    inset: 22%;
    display: grid;
    place-content: center;
    text-align: center;
    pointer-events: none;
  }
  .path-hr-center b {
    font-family: var(--mono);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--brass);
    line-height: 1.15;
  }
  .path-hr-center small {
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .path-hr-keys {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.5rem;
    min-width: 0;
  }
  .path-hr-copy {
    min-width: 0;
  }
  .path-hr-title {
    margin: 0;
    height: 1.25rem;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
    text-align: center;
    line-height: 1.25rem;
    overflow: hidden;
  }
  .path-hr-legend {
    list-style: none;
    padding: 0;
    margin: 0.15rem 0 0.4rem;
    display: grid;
    gap: 0.4rem;
  }
  .path-hr-legend li {
    display: grid;
    grid-template-columns: 0.7rem minmax(0, 1fr) auto;
    gap: 0.4rem 0.65rem;
    align-items: center;
  }
  .path-hr-swatch {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 2px;
  }
  .path-hr-legend small {
    display: block;
    color: var(--faint);
    font-size: 0.74rem;
  }
  .path-hr-legend b {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.92rem;
    white-space: nowrap;
  }
  .path-hr-note {
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--muted);
  }

  .chart-wrap {
    position: relative;
    margin-top: 0.15rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    background:
      linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 30px,
      linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 12.5% 100%,
      var(--bg-inset);
  }
  .chart-wrap canvas { width: 100%; height: 150px; }
  .chart-wrap.pool-chart canvas { height: 180px; }
  @container (max-width: 34rem) { .chart-wrap canvas, .chart-wrap.pool-chart canvas { height: 130px; } }
  .chart-caption {
    position: absolute;
    top: 0.65rem;
    left: 0.9rem;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
  }
  /* Key for the block-found ticks the canvas draws along the top of the plot. */
  .chart-legend { margin-left: 0.6em; color: var(--good); white-space: nowrap; }
  .chart-legend::before { content: "\25BE\00a0"; }
  @container (max-width: 34rem) {
    .chart-legend-noun { display: none; }
  }
  /* Tooltip for those ticks. Follows the pointer horizontally; sits above the plot. */
  .chart-tip {
    position: absolute;
    top: 1.9rem;
    z-index: 2;
    display: grid;
    gap: 0.05rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--bg-raised);
    box-shadow: 0 6px 18px rgb(0 0 0 / 45%);
    font-family: var(--mono);
    font-size: 0.68rem;
    line-height: 1.35;
    white-space: nowrap;
    pointer-events: none;
  }
  .chart-tip b { color: var(--good); font-weight: 600; }

  /* ---- Prose bits. */
  .faint { color: var(--faint); }
  .linkish {
    padding: 0;
    border: 0;
    background: none;
    color: var(--brass);
    font-size: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    text-decoration-color: color-mix(in oklch, var(--brass) 45%, transparent);
  }
  .linkish:hover { text-decoration-color: var(--brass); }
  .offline-note {
    padding: 0.7rem 0.9rem;
    border: 1px solid color-mix(in oklch, var(--bad) 35%, var(--line));
    border-left: 3px solid var(--bad);
    border-radius: var(--r-sm);
    background: color-mix(in oklch, var(--bad) 8%, var(--bg-inset));
  }
  .copy { color: color-mix(in oklch, var(--ink) 88%, var(--muted)); }
  .copy + .copy { margin-top: 0.65rem; }
  .note { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
  .note + .note, .copy + .note, .scroll + .note { margin-top: 0.7rem; }
  .callout {
    margin-top: 0.9rem;
    padding: 0.7rem 0.95rem;
    border: 1px solid color-mix(in oklch, var(--brass) 25%, var(--line));
    border-left: 3px solid var(--brass);
    border-radius: var(--r-sm);
    background: color-mix(in oklch, var(--brass) 6%, var(--bg-inset));
    color: color-mix(in oklch, var(--ink) 86%, var(--muted));
  }
  .callout strong { color: var(--ink); }
  .payout-blurb { margin-bottom: 0.35rem; }

  /* ---- Buttons and inputs. */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    padding: 0.72rem 1.25rem;
    border: 1px solid var(--brass);
    border-radius: 999px;
    background: var(--brass);
    color: var(--brass-ink);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: filter 140ms var(--ease), background 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease), transform 140ms var(--ease);
  }
  .btn:hover { filter: brightness(1.07); }
  .btn:active { transform: translateY(1px); }
  .btn.ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
  }
  .btn.ghost:hover { border-color: var(--brass); color: var(--brass); filter: none; }
  .btn.small { padding: 0.42rem 0.9rem; font-size: 0.78rem; }
  .field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.25rem;
  }
  .field-row input {
    flex: 1 1 18rem;
    min-width: 0;
    padding: 0.72rem 1rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--bg-inset);
    font-family: var(--mono);
    font-size: 0.86rem;
    transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
  }
  .field-row input::placeholder { color: var(--faint); font-family: var(--sans); }
  .field-row input:focus { border-color: var(--brass); outline: none; box-shadow: 0 0 0 3px color-mix(in oklch, var(--brass) 18%, transparent); }
  .field-row .btn { padding-inline: 1.35rem; }

  /* ---- Tabs: segmented control for the mining paths. */
  .tabs { display: grid; gap: 0.7rem; }
  .tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .tab {
    flex: 1 1 14rem;
    display: grid;
    gap: 0.12rem;
    padding: 0.7rem 0.95rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg-inset);
    text-align: left;
    transition: border-color 140ms var(--ease), background 140ms var(--ease), color 140ms var(--ease);
  }
  .tab .tab-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted);
  }
  .tab .tab-sub {
    font-size: 0.76rem;
    color: var(--faint);
  }
  .tab:hover { border-color: var(--line-strong); }
  .tab:hover .tab-title { color: var(--ink); }
  .tab[aria-selected="true"] {
    border-color: var(--brass);
    background: color-mix(in oklch, var(--brass) 10%, var(--bg-card));
  }
  .tab[aria-selected="true"] .tab-title { color: var(--brass); }
  .tab[aria-selected="true"] .tab-sub { color: var(--muted); }
  .tab-fee {
    margin-left: 0.35rem;
    padding: 0.02rem 0.45rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted);
    vertical-align: 0.1em;
  }
  .tab-fee.reco { border-color: var(--brass-dim); color: var(--brass); }

  .facts {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 0.5rem 1rem;
    margin-top: 0.65rem;
    font-size: 0.9rem;
  }
  .facts.tight { margin-top: 0.1rem; gap: 0.5rem 0.9rem; grid-template-columns: 5rem 1fr; }
  .copy + .facts { margin-top: 1rem; }
  .facts dt { color: var(--faint); }
  .facts dd { min-width: 0; overflow-wrap: anywhere; }
  .facts dd.copyable { align-items: flex-start; }
  .facts + .callout, .facts + .note { margin-top: 1rem; }

  .steps {
    margin: 1rem 0 0;
    padding-left: 1.3rem;
    color: color-mix(in oklch, var(--ink) 88%, var(--muted));
    font-size: 0.92rem;
  }
  .steps li + li { margin-top: 0.55rem; }
  .steps li::marker { color: var(--brass-dim); font-family: var(--mono); }
  .cfg {
    margin: 0.4rem 0 0;
    padding: 1rem 1.15rem;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg-inset);
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--ink);
  }
  h3.kicker { font-weight: 500; }

  .fold {
    margin-top: 1rem;
    border-top: 1px solid var(--line);
    padding-top: 0.7rem;
  }
  .fold summary {
    cursor: pointer;
    color: var(--brass);
    font-size: 0.84rem;
    font-weight: 500;
    list-style: none;
  }
  .fold summary::-webkit-details-marker { display: none; }
  .fold summary::before { content: "+"; margin-right: 0.4rem; color: var(--faint); }
  .fold[open] summary::before { content: "–"; }
  .fold .steps { margin-top: 0.65rem; }
  .fold .scroll { margin-top: 0.7rem; }

  /* ---- Window meter and metrics. */
  .meter-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 1.1rem 0 0.8rem;
  }
  .window-meter {
    position: relative;
    flex: 1 1 auto;
    height: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background:
      repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), var(--line) calc(12.5% - 1px) 12.5%),
      var(--bg-inset);
  }
  .window-meter-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brass-dim), var(--brass));
    transition: width 0.6s var(--ease);
  }
  .meter-value {
    flex: 0 0 auto;
    font-family: var(--mono);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    color: var(--brass);
  }

  .mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }
  .mini-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  @container (max-width: 40rem) {
    .mini-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @container (max-width: 32rem) {
    .mini-grid { grid-template-columns: 1fr; }
    .mini-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  .metric {
    padding: 0.7rem 0.85rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg-inset);
    min-width: 0;
  }
  .metric small {
    display: block;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .metric b {
    display: block;
    margin-top: 0.25rem;
    font-family: var(--mono);
    font-size: 1.08rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  /* ---- Tables. */
  .scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
  }
  .scroll.tall {
    max-height: 28rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  table {
    width: 100%;
    font-family: var(--mono);
    font-size: 0.79rem;
    font-variant-numeric: tabular-nums;
  }
  th, td {
    padding: 0.5rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  th {
    position: sticky;
    top: 0;
    z-index: 1;
    font-family: var(--sans);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
    background: var(--bg-card);
  }
  th.num, td.num { text-align: right; }
  td.wrapcell { white-space: normal; min-width: 12rem; }
  td.empty { color: var(--faint); text-align: center; padding-block: 1.3rem; font-family: var(--sans); }
  tbody tr:last-child td { border-bottom: 0; }
  tbody tr:hover td {
    background: color-mix(in oklch, var(--brass) 7%, transparent);
  }
  td a { font-family: var(--mono); }
  .table-label { margin: 0.5rem 0 0.4rem; }
  .table-label:first-child { margin-top: 0; }
  .table-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.5rem 0 0.4rem;
  }
  .table-head:first-of-type { margin-top: 0; }
  .table-head .table-label { margin: 0; }
  .table-count { font-family: var(--mono); font-size: 0.74rem; color: var(--faint); }
  .kicker.table-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
  /* Gateway rows carry prose-ish cells (client build, state); let those wrap so the table
     fits the page instead of scrolling sideways. */
  #gwtable td:nth-child(3) { white-space: normal; min-width: 12rem; }
  #gwtable td:nth-child(1) { white-space: normal; min-width: 11rem; max-width: 16rem; overflow-wrap: anywhere; }
  #gwtable td { vertical-align: top; line-height: 1.4; }
  #gwtable td .faint { font-size: 0.72rem; }

  .ok { color: var(--good); }
  .bad { color: var(--bad); }
  .status-pill {
    padding: 0.18rem 0.65rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: color-mix(in oklch, currentColor 10%, transparent);
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .status-pill.warn { color: var(--warn); }
  .miner-card { display: grid; gap: 1.1rem; margin-bottom: 0.9rem; }
  .miner-card .table-label { margin-bottom: 0.4rem; }
  .miner-card .note + .scroll { margin-top: 0.5rem; }

  /* ---- Miner card tabs: Overview / Workers / Payouts. Segmented, underlined like the nav. */
  .mtabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    border-bottom: 1px solid var(--line);
  }
  .mtab {
    appearance: none;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 0.55rem 0.9rem 0.6rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    transition: color 140ms var(--ease), border-color 140ms var(--ease);
  }
  .mtab b {
    margin-left: 0.35rem;
    padding: 0.02rem 0.45rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--faint);
    vertical-align: 0.1em;
  }
  .mtab:hover { color: var(--ink); }
  .mtab[aria-selected="true"] { color: var(--brass); border-bottom-color: var(--brass); }
  .mtab[aria-selected="true"] b { border-color: var(--brass-dim); color: var(--brass); }
  .mtab-more {
    margin-left: auto;
    padding: 0.55rem 0.4rem 0.6rem;
    font-size: 0.82rem;
    color: var(--faint);
  }
  .mtab-more:hover { color: var(--brass); }
  .mpanel { display: grid; gap: 1rem; }
  .miner-card > *, .mpanel > * { min-width: 0; }
  .mpanel[hidden] { display: none; }

  /* Maturity progress: confirmations toward spendable. */
  .mature {
    display: inline-grid;
    gap: 0.25rem;
    min-width: 6.5rem;
    justify-items: end;
  }
  .mature-bar {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: var(--line-strong);
    position: relative;
    overflow: hidden;
  }
  .mature-bar::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--p, 0%);
    background: var(--brass);
    border-radius: 2px;
  }
  table.pending td { vertical-align: middle; }

  /* ---- /miner/<addr>: the address is the headline. */
  .miner-page main { padding-top: calc(var(--topbar) + 1.5rem); }
  .miner-head .addr-title {
    font-family: var(--mono);
    font-size: clamp(0.95rem, 2.2vw, 1.35rem);
    font-weight: 500;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }
  .miner-head .addr-title .copyable { font-size: inherit; }
  .miner-head .hero-stats { margin-top: 0.25rem; }
  .miner-page .nav a[aria-current="true"] { color: var(--brass); }

  /* Small labelled states inside tables: coinbase kind, block status, our own gateway. */
  .pill {
    display: inline-block;
    padding: 0.08rem 0.5rem;
    border: 1px solid color-mix(in oklch, currentColor 55%, transparent);
    border-radius: 999px;
    background: color-mix(in oklch, currentColor 9%, transparent);
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.5;
    color: var(--muted);
    white-space: nowrap;
  }
  .pill.ok { color: var(--good); }
  .pill.warn { color: var(--warn); }
  .pill.bad { color: var(--bad); }
  .pill.brass { color: var(--brass); }

  .pubkey { font-size: 0.74em; line-height: 1.35; }

  .coinbase-table td.faint, .coinbase-table tr.faint td { color: var(--faint); }
  .coinbase-table tr.pool-row td {
    border-top: 1px solid var(--line-strong);
    color: color-mix(in oklch, var(--ink) 80%, var(--brass));
  }

  tr.block-row { cursor: pointer; }
  tr.block-row td { vertical-align: top; }
  tr.block-row:focus-visible td { outline: 2px solid var(--brass); outline-offset: -2px; }
  .disclose {
    display: inline-block;
    width: 0.5rem;
    margin-right: 0.45rem;
    color: var(--faint);
    transition: transform 140ms var(--ease);
  }
  .disclose::before { content: "\25B8"; }
  tr.block-row[aria-expanded="true"] .disclose { transform: rotate(90deg); }
  tr.block-detail > td { padding: 0 0 0.35rem 1.4rem; background: var(--bg-inset) !important; }
  tr.block-detail:hover > td { background: var(--bg-inset) !important; }
  table.inner { font-size: 0.74rem; }
  table.inner th { position: static; background: transparent; }
  table.inner tbody tr:hover td { background: transparent; }
  table.inner td, table.inner th { padding: 0.32rem 0.6rem; }
  table.inner tbody tr:last-child td { border-bottom: 0; }

  /* ---- Copy affordances. */
  .copyable {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    max-width: 100%;
  }
  .copyable > .mono,
  .copyable > a {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .copy-btn {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg-inset);
    color: var(--muted);
    transition: color 140ms var(--ease), border-color 140ms var(--ease), background 140ms var(--ease);
  }
  .copy-btn::before {
    content: "";
    display: block;
    width: 0.86rem;
    height: 0.86rem;
    margin: auto;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='5' y='5' width='8' height='9' rx='1' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M3 11V3.5A1.5 1.5 0 0 1 4.5 2H11' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='5' y='5' width='8' height='9' rx='1' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M3 11V3.5A1.5 1.5 0 0 1 4.5 2H11' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .copy-btn:hover {
    color: var(--brass);
    border-color: var(--brass);
  }
  .copy-btn[data-copied] {
    color: var(--good);
    border-color: var(--good);
  }
  .copy-btn[data-copied]::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .addr-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    font-family: var(--mono);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
  }
  .addr-line .copyable { font-size: inherit; }

  .links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1.4rem;
    margin-top: 0.7rem;
    color: var(--muted);
    font-size: 0.86rem;
  }

  /* ---- Hero fee card: rates first, then why, then which gateway. */
  .fee-lede {
    display: grid;
    gap: 1rem;
    padding: 1.25rem 1.35rem 1.3rem;
    border: 1px solid color-mix(in oklch, var(--brass) 22%, var(--line));
    border-radius: var(--r-lg);
    background:
      radial-gradient(90% 80% at 0% 0%, color-mix(in oklch, var(--brass) 10%, transparent), transparent 55%),
      var(--bg-card);
    box-shadow: var(--shadow-card);
  }
  @media (min-width: 900px) {
    .fee-lede {
      grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
      grid-template-areas: "head rates" "cta rates";
      align-items: center;
      column-gap: 2rem;
    }
    .fee-lede-head { grid-area: head; }
    .fee-lede-rates { grid-area: rates; }
    .fee-lede-cta { grid-area: cta; }
  }
  .fee-lede-head {
    display: grid;
    gap: 0.4rem;
    max-width: 42rem;
  }
  .fee-lede-head h2 {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass);
  }
  .fee-lede-head p {
    font-family: var(--serif);
    font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
    font-weight: 400;
    line-height: 1.4;
    color: var(--ink);
  }
  .fee-lede-rates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
  @container (max-width: 34rem) {
    .fee-lede-rates { grid-template-columns: 1fr; }
  }
  .fee-lede-rate {
    display: grid;
    gap: 0.15rem;
    padding: 0.95rem 1.05rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg-inset);
    text-decoration: none;
    color: inherit;
    transition: border-color 140ms var(--ease), transform 140ms var(--ease);
  }
  .fee-lede-rate:hover { border-color: var(--line-strong); transform: translateY(-1px); }
  .fee-lede-rate.reco {
    border-color: color-mix(in oklch, var(--brass) 55%, var(--line));
    background: color-mix(in oklch, var(--brass) 8%, var(--bg-inset));
  }
  .fee-lede-rate.reco:hover { border-color: var(--brass); }
  .fee-lede-rate small {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .fee-lede-rate.reco small { color: var(--brass); }
  .fee-lede-rate b {
    font-family: var(--mono);
    font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    line-height: 1.05;
  }
  .fee-lede-rate.reco b { color: var(--brass); }
  .fee-lede-rate span {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
  }
  .fee-lede-cta {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
  }
  .fee-lede-cta strong { color: var(--ink); font-weight: 600; }
  .fee-lede-setup { white-space: nowrap; }
  .fee-lede-setup::after { content: " \2193"; color: var(--brass-dim); }

  /* ---- Which gateway. */
  .gw-pick { display: grid; gap: 0.5rem; }
  .gw-pick .kicker { margin: 0; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
  .gw-pick > .note { max-width: 46rem; }
  .gw-rank {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
  }
  @container (min-width: 52rem) { .gw-rank { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .gw-rank li {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr);
    gap: 0.15rem 0.75rem;
    align-items: start;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg-inset);
  }
  .gw-rank li.reco {
    border-color: color-mix(in oklch, var(--brass) 55%, var(--line));
    background: color-mix(in oklch, var(--brass) 8%, var(--bg-inset));
  }
  .gw-rank .n {
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--brass-dim);
    padding-top: 0.15rem;
  }
  .gw-rank li.reco .n { color: var(--brass); }
  .gw-rank .tag {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 0.15rem;
  }
  .gw-rank strong {
    display: block;
    font-weight: 600;
    font-size: 1rem;
  }
  .gw-rank small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
  }

  /* ---- Three plain-language promises under the chart. */
  .pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
  }
  @container (max-width: 44rem) {
    .pillars { grid-template-columns: 1fr; }
  }
  .pillars li {
    position: relative;
    padding: 1.05rem 1.15rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    overflow: hidden;
  }
  .pillars li::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, var(--brass), transparent);
  }
  .pillars b { display: block; margin-bottom: 0.3rem; font-family: var(--serif); font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }

  /* ---- "If a block is found right now": reward -> miners / pool. */
  .payout-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 2fr);
    align-items: stretch;
    gap: 0.8rem;
  }
  @container (max-width: 44rem) {
    .payout-hero { grid-template-columns: 1fr; }
    .payout-hero .payout-arrow { display: none; }
  }
  .payout-big {
    display: grid;
    align-content: center;
    gap: 0.25rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid color-mix(in oklch, var(--brass) 35%, var(--line));
    border-radius: var(--r);
    background:
      radial-gradient(120% 90% at 0% 0%, color-mix(in oklch, var(--brass) 16%, transparent), transparent 60%),
      var(--bg-inset);
  }
  .payout-big small, .payout-split .metric small {
    display: block;
    font-size: 0.66rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .payout-big b {
    font-family: var(--mono);
    font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    color: var(--brass);
    line-height: 1.1;
    overflow-wrap: anywhere;
  }
  .payout-big .faint, .payout-split .faint { font-size: 0.78rem; line-height: 1.4; }
  .payout-arrow {
    display: grid;
    place-items: center;
    width: 2rem;
    color: var(--brass-dim);
  }
  .payout-arrow::before { content: "\2192"; font-size: 1.5rem; }
  .payout-split {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 0.6rem;
  }
  @container (max-width: 30rem) {
    .payout-split { grid-template-columns: 1fr; }
  }
  .payout-split .metric { display: grid; align-content: center; gap: 0.2rem; padding: 0.95rem 1.05rem; }
  .payout-split .metric b { margin-top: 0; font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem); }
  .payout-split .split-miners { border-left: 3px solid var(--good); }
  .payout-split .split-miners b { color: var(--ink); }
  .payout-split .split-pool { border-left: 3px solid var(--brass-dim); }

  /* ---- Coinbase ledger: the hero's split, step by step, with the live numbers. */
  .cb-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
  }
  @container (max-width: 44rem) {
    .cb-flow { grid-template-columns: 1fr; }
  }
  .cb-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.85rem 0.95rem 0.9rem;
    border: 1px solid var(--line);
    border-left: 3px solid color-mix(in oklch, var(--brass) 40%, var(--line));
    border-radius: var(--r-sm);
    background: var(--bg-inset);
  }
  .cb-step.is-miners { border-left-color: var(--good); }
  .cb-step.is-datum { border-left-color: var(--brass); }
  .cb-step.is-pool { border-left-color: var(--brass-dim); }
  .cb-n {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0.08em;
    color: var(--brass);
  }
  .cb-body { display: grid; gap: 0.3rem; min-width: 0; }
  .cb-head {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .cb-copy {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: color-mix(in oklch, var(--ink) 88%, var(--muted));
  }
  .cb-copy b { color: var(--ink); font-variant-numeric: tabular-nums; }
  .cb-step.is-datum .cb-copy b { color: var(--brass); }
  .cb-copy a { color: var(--brass); text-decoration: underline; text-underline-offset: 2px; }

  /* ---- Coinbase ring: the same split as the table below it. */
  .donut-row {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    align-items: center;
    gap: 1.75rem;
    margin: 0.35rem 0 1.2rem;
  }
  @container (max-width: 38rem) {
    .donut-row { grid-template-columns: 1fr; justify-items: center; gap: 1rem; }
  }
  .donut-figure { position: relative; width: 100%; max-width: 15rem; margin: 0; }
  .donut { display: block; width: 100%; height: auto; }
  .donut-arc { transition: opacity 120ms var(--ease); }
  .donut-figure:hover .donut-arc { opacity: 0.55; }
  .donut-figure .donut-arc:hover { opacity: 1; }
  .donut-hole {
    position: absolute;
    inset: 22%;
    display: grid;
    place-content: center;
    text-align: center;
    pointer-events: none;
  }
  .donut-hole b {
    display: block;
    font-family: var(--mono);
    font-size: clamp(1.2rem, 0.9rem + 0.9vw, 1.6rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--brass);
    line-height: 1.05;
  }
  .donut-hole small {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .donut-side { display: grid; gap: 0.7rem; min-width: 0; width: 100%; }
  /* Multi-column rather than grid so the ranking reads down one column and on to the next,
     the same order as the table under it. */
  .donut-legend {
    columns: 2;
    column-gap: 1.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  @container (max-width: 30rem) {
    .donut-legend { columns: 1; }
  }
  .donut-item {
    display: grid;
    grid-template-columns: 0.55rem minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.22rem 0;
    font-size: 0.79rem;
    border-bottom: 1px solid color-mix(in oklch, var(--line) 70%, transparent);
    break-inside: avoid;
  }
  .donut-swatch {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 2px;
    transform: translateY(0.06rem);
  }
  .donut-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .donut-label a { font-size: 0.76rem; }
  .donut-name { color: var(--ink); }
  .donut-name::before { content: "\00b7\00a0"; color: var(--faint); }
  .donut-pct {
    font-family: var(--mono);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
  }
  .donut-desc { margin: 0; font-size: 0.76rem; line-height: 1.5; color: var(--faint); }

  /* ---- Fee schedule cards ahead of the connect tabs. */
  .fee-schema {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
  @container (min-width: 52rem) {
    .fee-schema:has(#fee-card-solo:not([hidden])) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @container (max-width: 36rem) {
    .fee-schema { grid-template-columns: 1fr; }
  }
  .fee-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "kicker rate" "title rate" "copy copy" "cta cta";
    gap: 0.1rem 1rem;
    padding: 1rem 1.15rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: border-color 140ms var(--ease), background 140ms var(--ease), transform 140ms var(--ease);
  }
  .fee-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
  .fee-card.reco:hover { border-color: var(--brass); }
  .fee-cta {
    grid-area: cta;
    margin-top: 0.55rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--brass);
  }
  .fee-cta::after { content: " \2193"; color: var(--brass-dim); }
  .fee-card.reco {
    border-color: color-mix(in oklch, var(--brass) 55%, var(--line));
    background: color-mix(in oklch, var(--brass) 7%, var(--bg-card));
  }
  .fee-kicker {
    grid-area: kicker;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .fee-card.reco .fee-kicker { color: var(--brass); }
  .fee-title { grid-area: title; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
  .fee-rate {
    grid-area: rate;
    align-self: center;
    font-family: var(--mono);
    font-size: 1.9rem;
    font-weight: 500;
    letter-spacing: -0.04em;
    color: var(--muted);
  }
  .fee-card.reco .fee-rate { color: var(--brass); }
  .fee-copy { grid-area: copy; margin-top: 0.35rem; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }

  /* ---- Other DATUM/TIDES pools: the overflow upstreams, recommended outright. */
  .pool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    list-style: none;
    padding: 0;
  }
  @container (min-width: 48rem) { .pool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @container (min-width: 80rem) { .pool-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
  @container (max-width: 34rem) { .pool-grid { grid-template-columns: 1fr; } }
  .overflow-fee-table { margin: 0 0 1rem; }
  .overflow-fee-table table { min-width: 28rem; }
  .pool-card {
    display: grid;
    gap: 0.55rem;
    align-content: start;
    padding: 1.1rem 1.15rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    min-width: 0;
    transition: border-color 140ms var(--ease), transform 140ms var(--ease);
  }
  .pool-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
  .pool-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
  }
  .pool-head h3 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.015em;
  }
  .pool-head h3 a { color: var(--ink); text-decoration: none; }
  .pool-head h3 a:hover { color: var(--brass); }
  .pool-fee {
    font-size: 0.82rem;
    color: var(--muted);
  }
  .pool-fee b {
    font-family: var(--mono);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--brass);
    letter-spacing: -0.02em;
  }
  .pool-copy { font-size: 0.88rem; line-height: 1.5; color: var(--muted); }
  .pool-facts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.3rem 0.7rem;
    margin-top: 0.3rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
  }
  .pool-facts dt {
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
    padding-top: 0.2rem;
  }
  .pool-facts dd { min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
  .pool-facts .mono { font-size: 0.78rem; }
  .pool-state { flex: 0 0 auto; }
  #pools-share b { color: var(--brass); font-family: var(--mono); font-weight: 500; }
  #pools-note { max-width: 56rem; }

  /* ---- Hardware: BT-Miners BTCB2 catalog with live Lazarus earnings. */
  /* Hashrate in, XBT and dollars per day out, from the same live figure the status panel shows. */
  .calc {
    display: grid;
    gap: 0.9rem 1.6rem;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    margin: 0 0 1.2rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg-raised);
  }
  .calc-field { display: grid; gap: 0.4rem; }
  .calc-field label {
    font-size: 0.78rem;
    color: var(--faint);
  }
  .calc-input { display: flex; gap: 0.5rem; }
  .calc-input input, .calc-input select {
    padding: 0.5rem 0.6rem;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    background: var(--bg-inset);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
  }
  .calc-input input { width: 8rem; }
  .calc-input input:focus-visible, .calc-input select:focus-visible {
    outline: 2px solid var(--brass-dim);
    outline-offset: 1px;
  }
  .calc-out { display: grid; gap: 0.3rem; }
  .calc-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--faint);
  }
  .calc-row b {
    font-family: var(--mono);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    color: var(--brass);
  }
  .calc-row.faint b { font-size: 0.9rem; color: var(--muted); }
  .calc-usd { font-family: var(--mono); color: var(--muted); }
  .calc-note, #calc-note { grid-column: 1 / -1; margin: 0; }
  @container (min-width: 34rem) {
    .calc { grid-template-columns: auto minmax(0, 1fr); }
  }

  .hw-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem 1.2rem;
    flex-wrap: wrap;
    margin: 0 0 0.9rem;
  }
  .hw-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  @container (min-width: 64rem) { .hw-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  @container (max-width: 34rem) { .hw-grid { grid-template-columns: 1fr; } }
  .hw-card {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0.75rem;
    height: 100%;
    padding: 1rem 1.05rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: border-color 140ms var(--ease), transform 140ms var(--ease);
  }
  .hw-card:hover { border-color: var(--brass-dim); transform: translateY(-1px); }
  .hw-card:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
  .hw-card.oos { opacity: 0.78; }
  .hw-img {
    width: 100%;
    height: 7.5rem;
    object-fit: contain;
    background: var(--bg-inset);
    border-radius: var(--r-sm);
  }
  .hw-img-empty { display: block; }
  .hw-body { display: grid; gap: 0.45rem; align-content: start; min-width: 0; }
  .hw-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem;
    flex-wrap: wrap;
  }
  .hw-head h3 {
    font-family: var(--serif);
    font-size: 1.12rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: var(--ink);
  }
  .hw-card:hover h3 { color: var(--brass); }
  .hw-spec { font-size: 0.82rem; color: var(--muted); }
  .hw-facts {
    display: grid;
    gap: 0.45rem 0.6rem;
    margin: 0.35rem 0 0;
    padding-top: 0.65rem;
    border-top: 1px solid var(--line);
  }
  .hw-facts > div { min-width: 0; }
  .hw-facts dt {
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .hw-facts dd {
    font-family: var(--mono);
    font-size: 1.02rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ink);
  }
  .hw-facts > div:first-child dd { color: var(--brass); }
  #hardware-empty { max-width: 52rem; }
  #hardware-disclaimer { max-width: 52rem; margin-top: 0.2rem; }

  /* ---- How it works: three numbered steps. */
  .how-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    list-style: none;
    padding: 0;
  }
  @container (max-width: 44rem) {
    .how-grid { grid-template-columns: 1fr; }
  }
  .how-step {
    display: grid;
    gap: 0.5rem;
    align-content: start;
    padding: 1.2rem 1.25rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
  }
  .how-n {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--brass);
  }
  .how-n::after {
    content: "";
    display: inline-block;
    width: 2.2rem;
    height: 1px;
    margin-left: 0.6rem;
    vertical-align: middle;
    background: color-mix(in oklch, var(--brass) 45%, transparent);
  }
  .how-step h3 {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--ink);
  }
  .how-step .copy { font-size: 0.9rem; line-height: 1.55; }
  #how .note { max-width: 52rem; }

  /* ---- Scroll reveal: sections rise a little as they enter. */
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}

@layer utilities {
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  .skip {
    position: absolute;
    left: 0.5rem;
    top: -3rem;
    z-index: 40;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--brass);
    border-radius: var(--r-sm);
    background: var(--bg-raised);
    font-size: 0.8rem;
    text-decoration: none;
    transition: top 140ms var(--ease);
  }
  .skip:focus { top: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .site-mast { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .reveal { opacity: 1; transform: none; }
}
