/*
 * TensorCash theme for TSCScan (rHuhu's explorer).
 *
 * Load AFTER the explorer's own sheets and after tokens.css:
 *   app.css -> institutional.css -> tokens.css -> tscscan-theme.css
 *
 * Every selector below is one that exists in the explorer's markup or JS-rendered
 * rows as captured on 2026-10-02 (captures/*.html, captures/static/app.js). Where
 * the explorer's sheet uses a selector of some specificity, the override repeats
 * that selector so source order decides, and !important appears only where the
 * explorer's own rule already carries it (.detail-hash).
 *
 * Brand rules cited as BRAND.md are from
 * ~/tensorcash-maxiglobio-site/public/brand/tensorcash-brand.md.
 */

/* =========================================================================
   0. Remap the explorer's own custom properties onto brand tokens.
      app.css and institutional.css read these in ~670 places, so this alone
      recolours most borders, muted text, links and badges.
   ========================================================================= */
:root {
  --bg: var(--tc-bg);
  --surface: var(--tc-surface);
  --surface-2: var(--tc-bg-quiet);
  --surface-3: var(--tc-border);
  --border: var(--tc-border);
  --border-strong: var(--tc-border-strong);
  --text: var(--tc-text-strong);
  --muted: var(--tc-text-muted);
  --muted-2: var(--tc-text-muted);   /* their --muted-2 is used for text; Warm grey fails 4.5:1 */
  --green: var(--tc-link);           /* their brand accent (maroon) -> Deep sage (AA-adjusted) */
  --green-soft: var(--tc-accent-soft);
  --link: var(--tc-link);
  --success: var(--tc-ok);
  --success-soft: var(--tc-ok-soft);
  --blue: var(--tc-text);            /* neutral data accent -> Ink soft */
  --yellow: var(--tc-pending);       /* "pending/reward" amber -> warm neutral */
  --red: var(--tc-oxide);
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: none;
  --radius-xs: var(--tc-radius-chip);
  --radius-sm: var(--tc-radius-chip);
  --radius-md: var(--tc-radius-card);
  --mono: var(--tc-font-mono);
  --sans: var(--tc-font-sans);
}

/* =========================================================================
   1. Base
   ========================================================================= */
html { background: var(--tc-bg); }
body {
  background: var(--tc-bg);              /* drops app.css radial maroon wash */
  color: var(--tc-text);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-ui);
  font-weight: var(--tc-weight-medium);  /* BRAND.md: Medium 500 is the default */
  letter-spacing: 0;                     /* BRAND.md: no letter-spacing on body text */
}
::selection { background: var(--tc-selection); color: var(--tc-text-strong); }
:focus-visible { outline: 2px solid var(--tc-focus); outline-offset: 3px; }
h1, h2, h3 { font-weight: var(--tc-weight-medium); }  /* BRAND.md: never Bold/Black headlines */
em, i { font-style: normal; }                          /* BRAND.md: no italics */

/* Container: max 1280px; 80px side margins from 900px, 20px below, 16px on mobile. */
.shell { width: min(var(--tc-container), calc(100% - 2 * var(--tc-gutter))); }
@media (max-width: 899px) { .shell { width: calc(100% - 2 * var(--tc-gutter-mid)); } }
@media (max-width: 799px) { .shell { width: calc(100% - 2 * var(--tc-gutter-mobile)); } }

.mono { font-family: var(--tc-font-mono); }

/* =========================================================================
   2. Header: ribbon, lockup, nav, search, language, mobile menu
   ========================================================================= */
.site-header {
  border-bottom: 1px solid var(--tc-border);
  background: color-mix(in srgb, var(--tc-bg) 92%, var(--tc-surface));  /* as tensorcash site */
  box-shadow: none;
  backdrop-filter: blur(8px);
}

/* Ribbon -> a quiet Bone strip set in the Label style. */
.terminal-ribbon {
  height: 30px;
  border-bottom: 1px solid var(--tc-border);
  background: var(--tc-bg-quiet);
}
.terminal-ribbon-inner {
  color: var(--tc-text-muted);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
  text-transform: uppercase;
}
.terminal-ribbon-inner > span:first-child { color: var(--tc-text); }
.terminal-ribbon-inner i { border-radius: 1px; background: var(--tc-accent); }
.terminal-ribbon-inner b { color: var(--tc-border-strong); }
.ribbon-identity > span { text-transform: uppercase; }
.ribbon-block {
  min-height: 29px;
  border-left: 1px solid var(--tc-border);
  color: var(--tc-text-muted);
  background: transparent;
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
}
.ribbon-block strong { color: var(--tc-text-strong); font-family: var(--tc-font-sans); font-size: 12px; font-weight: var(--tc-weight-bold); }
.ribbon-block > span:last-child { color: var(--tc-link); }
.ribbon-block:hover, .ribbon-block:focus-visible { color: var(--tc-text-strong); background: var(--tc-surface); }
.ribbon-block:focus-visible { outline: 2px solid var(--tc-focus); }
.ribbon-block .network-pill { border-right-color: var(--tc-border); color: var(--tc-text); }
.ribbon-block .network-pill strong { font-family: var(--tc-font-sans); font-size: var(--tc-size-label-min); font-weight: var(--tc-weight-medium); letter-spacing: var(--tc-track-label); }
.ribbon-block .network-pill span,
.network-pill span { background: var(--tc-stone); box-shadow: none; }
.ribbon-block .network-pill.ready span,
.network-pill.ready span { background: var(--tc-ok); box-shadow: 0 0 0 3px var(--tc-ok-soft); }
.ribbon-block .network-pill.offline span,
.network-pill.offline span { background: var(--tc-oxide); box-shadow: 0 0 0 3px var(--tc-oxide-soft); }
.network-pill, .network-pill.ready { color: var(--tc-text); font-family: var(--tc-font-sans); }
.ribbon-network select {
  border: 1px solid var(--tc-border-strong);
  border-radius: var(--tc-radius-chip);
  color: var(--tc-text-strong);
  background: var(--tc-surface);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
}
.ribbon-network select:focus-visible { outline: 2px solid var(--tc-focus); }
.ribbon-network .explorer-select-trigger { border-color: var(--tc-border-strong); border-radius: var(--tc-radius-chip); color: var(--tc-text); }

.header-inner { height: var(--tc-header); gap: 20px; }

/* Lockup (template change T1, applied in base.html): the kit's horizontal lockup is a
   real <img class="brand-lockup">, mark left of name, approved colourway, untouched file.
   Light and dark files are both emitted; the scheme decides which one shows. */
.brand { gap: 12px; border-radius: 0; }
.brand-lockup { display: block; flex: 0 0 auto; width: auto; height: 28px; filter: none; }   /* 28px tall, as tensorcash.org header */
.brand-lockup.is-dark { display: none; }
.brand-copy { flex-direction: row; align-items: center; gap: 12px; line-height: 1; }
.brand-copy small {
  margin: 0;
  padding-left: 12px;
  border-left: 1px solid var(--tc-border-strong);
  color: var(--tc-text-muted);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
  text-transform: uppercase;
}

.main-nav { gap: 0; margin-left: 8px; }
.main-nav a {
  margin: 0;
  padding: 0 12px;
  border-right: 0;
  border-radius: 0;
  color: var(--tc-text);
  background: transparent;
  font-size: var(--tc-size-ui);
  font-weight: var(--tc-weight-medium);
  letter-spacing: 0;
  transition: color var(--tc-dur-micro) var(--tc-ease);
}
.main-nav a:hover { color: var(--tc-text-strong); background: transparent; }
.main-nav a.active { color: var(--tc-text-strong); background: transparent; }
.main-nav a.active::after { right: 12px; bottom: 0; left: 12px; height: 2px; border-radius: 0; background: var(--tc-accent); animation: none; }

.header-search { min-width: 200px; max-width: 360px; margin-left: auto; }
.chain-search {
  height: 40px;
  border: 1px solid var(--tc-border-strong);       /* BRAND.md: Line for inputs */
  border-radius: var(--tc-radius-chip);
  background: var(--tc-surface);
  box-shadow: none;
  overflow: hidden;
}
.chain-search:focus-within { border-color: var(--tc-accent); box-shadow: 0 0 0 3px var(--tc-accent-soft); }
.chain-search input { color: var(--tc-text-strong); font-family: var(--tc-font-sans); font-size: 14px; }
.chain-search input::placeholder { color: var(--tc-text-muted); }
.chain-search button {
  padding: 0 14px;
  border-left: 1px solid var(--tc-button-bg);
  color: var(--tc-button-text);
  background: var(--tc-button-bg);                 /* BRAND.md: Charcoal buttons */
  font-size: 14px;
  font-weight: var(--tc-weight-medium);
}
.chain-search button:hover { background: var(--tc-button-bg); box-shadow: none; opacity: .86; }  /* site .button:hover */
.search-feedback {
  border: 1px solid color-mix(in srgb, var(--tc-oxide) 35%, transparent);
  border-radius: var(--tc-radius-chip);
  color: var(--tc-oxide);
  background: var(--tc-oxide-soft);
  box-shadow: var(--tc-shadow-float);
  font-size: 13px;
}

.language-trigger {
  height: 40px;
  border: 1px solid var(--tc-border-strong);
  border-radius: var(--tc-radius-chip);
  color: var(--tc-text);
  background: var(--tc-surface);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-label);
  letter-spacing: var(--tc-track-label);
}
.language-trigger:hover, .language-switcher.is-open .language-trigger { border-color: var(--tc-text-muted); color: var(--tc-text-strong); background: var(--tc-surface); }
.language-trigger .language-chevron { color: var(--tc-text-muted); }
.language-trigger:focus-visible, .language-option:focus-visible { outline: 2px solid var(--tc-focus); }
.language-menu { border: 1px solid var(--tc-border); border-radius: var(--tc-radius-card); background: var(--tc-surface); color: var(--tc-text); box-shadow: var(--tc-shadow-float); }

.mobile-menu {
  height: 40px;
  border: 1px solid var(--tc-border-strong);
  border-radius: var(--tc-radius-chip);
  color: var(--tc-text-strong);
  background: var(--tc-surface);
  box-shadow: none;
  font-size: 14px;
}

.sync-banner { border-bottom: 1px solid var(--tc-border); background: var(--tc-bg-quiet); box-shadow: none; }
.sync-banner strong { color: var(--tc-text-strong); }
.sync-banner p, .sync-heights { color: var(--tc-text-muted); }
.sync-icon { border-radius: var(--tc-radius-chip); color: var(--tc-text-strong); background: var(--tc-border); }

/* =========================================================================
   3. Page headings, eyebrows, panels, links
   ========================================================================= */
.site-main { padding-top: 40px; padding-bottom: var(--tc-section); }

.page-heading {
  min-height: 0;
  margin-bottom: 24px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--tc-border);       /* BRAND.md: 1px Rule divider */
  border-left: 0;                                  /* drops the maroon side bar */
}
.page-heading h1 {
  color: var(--tc-text-strong);
  font-size: var(--tc-size-title);                 /* Title 36px */
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-title);
  line-height: var(--tc-leading-title);
}
.page-heading p { color: var(--tc-text-muted); font-size: 15px; line-height: 1.5; }

/* Kicker / label style (BRAND.md Label: 12px, +8%, uppercase; site .kicker uses Mute). */
.eyebrow,
.mempool-map-heading .eyebrow {
  color: var(--tc-text-muted);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
  text-shadow: none;
  text-transform: uppercase;
}

.height-chip { border-left: 1px solid var(--tc-border); }
.height-chip span { color: var(--tc-text-muted); font-family: var(--tc-font-sans); font-size: var(--tc-size-label-min); letter-spacing: var(--tc-track-label); text-transform: uppercase; }
.height-chip strong { color: var(--tc-text-strong); font-size: 24px; font-weight: var(--tc-weight-bold); letter-spacing: 0; }

.panel,
.panel:hover {
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-card);            /* 12px cards and panels */
  background: var(--tc-surface);
  box-shadow: none;
  overflow: hidden;
}
.panel-head {
  min-height: 64px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--tc-border);
  border-radius: 0;
  background: transparent;
}
.panel-head h2 {
  color: var(--tc-text-strong);
  font-size: var(--tc-size-panel-title);
  font-weight: var(--tc-weight-medium);
  letter-spacing: 0;
}
.panel-head h3, .mempool-feed-head h3 { color: var(--tc-text-strong); font-weight: var(--tc-weight-medium); }
body[data-page="transfers"] .pending-panel .panel-head { border-bottom: 1px solid var(--tc-border); background: transparent; }
body[data-page="transfers"] .pending-panel .panel-head h2 { color: var(--tc-text-strong); font-size: var(--tc-size-panel-title); }
body[data-page="transfers"] .pending-panel .panel-head .eyebrow { color: var(--tc-text-muted); }
body[data-page="blocks"] .block-miner-panel,
body[data-page="pool"] .pool-share-panel,
body[data-page="holders"] .distribution-panel,
body[data-page="transfers"] .pending-panel { border-top: 1px solid var(--tc-border); }
.miner-summary-strip { border: 1px solid var(--tc-border); border-radius: var(--tc-radius-chip); background: var(--tc-bg-quiet); overflow: hidden; }
.miner-summary-strip > div { border-right-color: var(--tc-border); }
.mempool-source { color: var(--tc-text-muted); font-family: var(--tc-font-sans); font-size: var(--tc-size-label-min); letter-spacing: var(--tc-track-label); }
.mempool-source i { background: var(--tc-ok); box-shadow: 0 0 0 3px var(--tc-ok-soft); }

.text-link, .back-link {
  padding: 0 0 3px;
  border-bottom: 1px solid var(--tc-border-strong);
  border-radius: 0;
  color: var(--tc-link);
  background: transparent;
  font-family: var(--tc-font-sans);
  font-size: 14px;
  font-weight: var(--tc-weight-medium);
  letter-spacing: 0;
}
.text-link:hover, .back-link:hover { border-color: var(--tc-link); color: var(--tc-link-hover); background: transparent; }
.back-link { display: inline-block; margin-bottom: 16px; }
.table-meta { color: var(--tc-text-muted); font-family: var(--tc-font-sans); font-size: 13px; }

/* Segmented controls (chart ranges, tx filters, difficulty view). */
.range-tabs, .filter-tabs, .difficulty-view {
  border: 1px solid var(--tc-border-strong);
  border-radius: var(--tc-radius-chip);
  background: var(--tc-bg-quiet);
  box-shadow: none;
  overflow: hidden;
}
.range-tabs button, .filter-tabs button, .difficulty-view button { color: var(--tc-text-muted); background: transparent; font-size: 13px; font-weight: var(--tc-weight-medium); }
.range-tabs button.active, .filter-tabs button.active, .difficulty-view button.active {
  color: var(--tc-button-text);
  background: var(--tc-button-bg);
  box-shadow: none;
}

/* =========================================================================
   4. Stat cards: home summary grid, metric stack, proof summary, facts
   ========================================================================= */
.summary-grid, .proof-summary-grid { gap: 12px; border: 0; background: transparent; }
.mining-overview, .dual-grid, .io-grid { gap: 16px; }
.summary-grid, .dual-grid { margin-top: 16px; }
.summary-card, .summary-card:hover {
  min-height: 104px;
  padding: 18px 20px;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-card);
  background: var(--tc-surface);
  box-shadow: none;
  transform: none;
}
.summary-card:last-child { border-right: 1px solid var(--tc-border); }
.summary-card:hover, .summary-card-link:hover { border-color: var(--tc-border-strong); background: var(--tc-surface-hover); }
.summary-card > span {
  color: var(--tc-text-muted);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
  text-transform: uppercase;
}
.summary-card strong, .summary-card > a {
  margin-top: 10px;
  color: var(--tc-text-strong);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-stat);
  font-weight: var(--tc-weight-bold);                 /* BRAND.md: Bold = numbers */
  letter-spacing: 0;
}
.summary-card .hash-link { color: var(--tc-link); font-family: var(--tc-font-mono); font-size: 16px; font-weight: var(--tc-weight-medium); }
.summary-card small { color: var(--tc-text-muted); font-size: 13px; }
.summary-card small b { color: var(--tc-link); }
.proof-summary-grid .summary-card, .pool-summary-grid .summary-card { border-top: 1px solid var(--tc-border); }

/* Metric stack: the one Charcoal block per view (BRAND.md proportion: Charcoal 8%). */
.metric-stack, .metric-stack:hover {
  border: 1px solid var(--tc-inverse-bg);
  color: var(--tc-inverse-text);
  background: var(--tc-inverse-bg);
}
.stack-metric { border-bottom-color: var(--tc-inverse-rule); }
.stack-metric > span {
  color: var(--tc-inverse-muted);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
  text-transform: uppercase;
}
.stack-metric > span small, .stack-metric > .rate-reference { color: var(--tc-inverse-muted); text-transform: none; letter-spacing: 0; }
.stack-metric strong { color: var(--tc-inverse-text); font-family: var(--tc-font-sans); font-size: 24px; font-weight: var(--tc-weight-bold); }
.stack-metric.primary strong { font-size: 32px; letter-spacing: var(--tc-track-tight); }
.stack-metric em { color: #9DB898; }                  /* Sage on charcoal (approved colourway tone) */
.stack-metric em.negative { color: #D99A8B; }         /* DERIVED: Oxide lifted for Charcoal */
@media (max-width: 840px) { .stack-metric { border-right-color: var(--tc-inverse-rule); } }

.chart-legend, .chart-empty { color: var(--tc-text-muted); }
.chart-empty { font-size: 13px; }

.detail-grid {
  gap: 1px;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-card);
  background: var(--tc-border);
  box-shadow: none;
}
.fact-card { padding: 16px 18px; background: var(--tc-surface); }
.fact-card:hover { background: var(--tc-surface-hover); }
.fact-card span {
  color: var(--tc-text-muted);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
  text-transform: uppercase;
}
.fact-card strong {
  color: var(--tc-text-strong);
  font-family: var(--tc-font-sans);
  font-size: 16px;
  font-weight: var(--tc-weight-medium);
}
/* Hashes inside fact cards: mono, single line, ellipsis (full value is in title=""). */
.fact-card strong.mono {
  display: block;
  overflow: hidden;
  font-family: var(--tc-font-mono);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.address-summary { gap: 12px; }
.address-summary .fact-card {
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-card);
  box-shadow: none;
}
.address-scope-note { border: 1px solid var(--tc-border); border-radius: var(--tc-radius-card); color: var(--tc-text); background: var(--tc-bg-quiet); }
.address-scope-note > span { border-radius: 50%; color: var(--tc-button-text); background: var(--tc-text-muted); }
.address-scope-note strong { color: var(--tc-text-strong); font-weight: var(--tc-weight-semibold); }

/* Address balance panel (institutional.css hard-codes #fff / #f4f6f3 here). */
.address-summary { border: 0; background: transparent; }
.address-balance-panel { box-shadow: none; }
.address-balance-head { background: transparent; }
.address-balance-summary { border: 1px solid var(--tc-border); border-radius: var(--tc-radius-chip); background: var(--tc-bg-quiet); }
.address-balance-summary span { color: var(--tc-text-muted); font-size: var(--tc-size-label-min); font-weight: var(--tc-weight-medium); letter-spacing: var(--tc-track-label); }
.address-balance-summary strong { color: var(--tc-text-strong); font-family: var(--tc-font-sans); font-weight: var(--tc-weight-bold); }
.address-chart-meta { border-bottom: 1px solid var(--tc-border); color: var(--tc-text-muted); background: var(--tc-bg-quiet); }
.address-chart-meta span { border: 1px solid var(--tc-border); border-radius: var(--tc-radius-chip); background: var(--tc-surface); }
.address-chart-meta b { color: var(--tc-text-strong); font-family: var(--tc-font-sans); font-weight: var(--tc-weight-medium); }
.address-balance-chart-wrap { background: var(--tc-surface); }
.address-chart-loading { background: transparent; }
.address-chart-loading i { border-color: var(--tc-border); border-top-color: var(--tc-accent); }
.registry-detail-nav button[aria-pressed="true"] { color: var(--tc-text-strong); }

/* Proof panel on block pages. */
.proof-detail-panel { border-top: 1px solid var(--tc-border); }
.proof-detail-hero p { color: var(--tc-text-muted); font-size: 14px; }
.near-pin-meter { border-left-color: var(--tc-border); }
.near-pin-meter > span { color: var(--tc-text-muted); font-size: var(--tc-size-label-min); font-weight: var(--tc-weight-medium); letter-spacing: var(--tc-track-label); }
.near-pin-meter > strong { font-family: var(--tc-font-sans); font-weight: var(--tc-weight-bold); }
.near-pin-meter > div { border-radius: var(--tc-radius-chip); background: var(--tc-bg-quiet); }
.near-pin-meter > div i { border-radius: inherit; background: var(--tc-accent); }   /* no gradient: BRAND.md gradients are for hero moments */
.proof-price-value { font-family: var(--tc-font-sans); font-size: var(--tc-size-title); font-weight: var(--tc-weight-bold); letter-spacing: var(--tc-track-title); }
.proof-component-grid { border-top: 1px solid var(--tc-border); background: var(--tc-border); }
.proof-component-grid article { border-right: 1px solid var(--tc-border); background: var(--tc-surface); }
.proof-component-grid span { color: var(--tc-text-muted); font-size: var(--tc-size-label-min); font-weight: var(--tc-weight-medium); letter-spacing: var(--tc-track-label); }
.proof-component-grid strong { font-family: var(--tc-font-sans); font-weight: var(--tc-weight-bold); }
.proof-component-grid small { color: var(--tc-text-muted); font-size: 12px; }

/* =========================================================================
   5. Tables (blocks, transactions, block txs, address history)
   ========================================================================= */
.table-wrap { overflow-x: auto; scrollbar-color: var(--tc-border-strong) transparent; }
th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--tc-border);
  color: var(--tc-text-muted);
  background: var(--tc-bg-quiet);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
  text-transform: uppercase;
}
td {
  height: 44px;                 /* dense rows: see the whole table at once (upstream density) */
  padding: 8px 12px;
  border-bottom: 1px solid var(--tc-border);
  color: var(--tc-text);
  font-size: var(--tc-size-data-sm);
  font-variant-numeric: tabular-nums;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: transparent; }       /* no zebra: rules do the work */
tbody tr:hover td { background: var(--tc-surface-hover); }
tbody tr:hover td:first-child { box-shadow: inset 2px 0 var(--tc-accent); }
.block-height .hash-link { color: var(--tc-text-strong); font-family: var(--tc-font-sans); font-weight: var(--tc-weight-bold); }

/* Hash / txid / address treatment. JS already shortens labels with an ellipsis
   (short(): 10 head + 8 tail); CSS adds a hard cap so nothing ever overflows. */
.hash-link, .address-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--tc-link);
  font-family: var(--tc-font-mono);
  font-size: 13px;
  font-weight: var(--tc-weight-regular);
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}
td .hash-link, td .address-link { max-width: 26ch; font-size: var(--tc-size-data-sm); }
.hash-link:hover, .address-link:hover { color: var(--tc-link-hover); text-decoration: underline; text-decoration-color: var(--tc-accent); }
.address-link.alias-link {
  padding: 2px 8px;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-chip);
  color: var(--tc-text-strong);
  background: var(--tc-bg-quiet);
  box-shadow: none;
  font-family: var(--tc-font-sans);
  font-size: 13px;
  font-weight: var(--tc-weight-medium);
}
.address-link.alias-link::before { background: var(--tc-accent); }
.address-link.alias-link:hover { border-color: var(--tc-accent); color: var(--tc-text-strong); }

/* Full hashes on detail pages (block hash, txid, address): mono, wraps anywhere. */
.detail-hash {
  color: var(--tc-text-muted) !important;   /* explorer rule is !important */
  font-family: var(--tc-font-mono);
  font-size: 14px !important;
  line-height: 1.5;
}
.copy-address { border-radius: var(--tc-radius-chip); color: var(--tc-text-muted); }
.copy-address:hover { color: var(--tc-link); background: var(--tc-bg-quiet); }
.copy-address:focus-visible { outline: 2px solid var(--tc-focus); }
.copy-address.is-copied { color: var(--tc-ok); }
.copy-address.is-copy-error { color: var(--tc-oxide); }

/* Amounts. */
.amount-cell { font-family: var(--tc-font-sans); font-size: var(--tc-size-data); font-weight: var(--tc-weight-medium); font-variant-numeric: tabular-nums; }
.amount-cell.net-amount { font-weight: var(--tc-weight-bold); }
.positive { color: var(--tc-ok); }
.negative { color: var(--tc-oxide); }
.io-value, .pending-stats strong, .holder-value { color: var(--tc-text-strong); font-family: var(--tc-font-sans); font-weight: var(--tc-weight-bold); font-variant-numeric: tabular-nums; }
.blocks-table td:nth-child(n+5):nth-child(-n+9) { font-variant-numeric: tabular-nums; }

/* Address history route cells. */
.flow-address { border-left: 2px solid var(--tc-border-strong); }
.flow-address.self { border-left-color: var(--tc-accent); }
.flow-address small { color: var(--tc-text-muted); font-family: var(--tc-font-sans); font-size: 12px; }
.flow-more { color: var(--tc-link); font-size: 12px; }
.route-arrow { color: var(--tc-text-faint); }
.route-side > small { color: var(--tc-text-muted); font-size: var(--tc-size-label-min); letter-spacing: var(--tc-track-label); text-transform: uppercase; }
.address-transaction > .hash-link { font-size: 13px; font-weight: var(--tc-weight-medium); }
.address-transaction-meta { color: var(--tc-text-muted); font-size: 12px; }
.address-transaction-meta .hash-link { color: var(--tc-text-muted); font-size: 12px; }

/* Inputs / outputs and mempool feed. */
.io-row { min-height: 64px; padding: 12px 18px; border-bottom: 1px solid var(--tc-border); }
.io-row:last-child { border-bottom: 0; }
.io-index { color: var(--tc-text-muted); font-family: var(--tc-font-sans); font-size: 12px; }
.io-main small { color: var(--tc-text-muted); font-size: 12px; }
.pending-item { border-bottom: 1px solid var(--tc-border); }
.pending-item:hover, .pending-item.is-linked { background: var(--tc-surface-hover); }
.pending-main small, .pending-stats span { color: var(--tc-text-muted); font-size: var(--tc-size-label-min); letter-spacing: var(--tc-track-label); }
.mempool-kpis span, .miner-summary-strip span { color: var(--tc-text-muted); font-family: var(--tc-font-sans); font-size: var(--tc-size-label-min); letter-spacing: var(--tc-track-label); text-transform: uppercase; }
.mempool-kpis strong, .miner-summary-strip strong { color: var(--tc-text-strong); font-family: var(--tc-font-sans); font-weight: var(--tc-weight-bold); }
.mempool-map-index, #mempool-feed-summary { color: var(--tc-text-muted); font-family: var(--tc-font-sans); font-size: var(--tc-size-label-min); letter-spacing: var(--tc-track-label); }

/* =========================================================================
   6. Pills: confirmations / status, tx type, proof version, price multiplier
      Chips: 6px radius (BRAND.md). Label style. Status colours only for status.
   ========================================================================= */
.status-badge {
  padding: 7px 10px;
  border: 1px solid var(--tc-border-strong);
  border-radius: var(--tc-radius-chip);
  color: var(--tc-text);
  background: var(--tc-surface);
  box-shadow: none;
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
  text-transform: uppercase;
  white-space: nowrap;
}
.status-badge.confirmed { border-color: color-mix(in srgb, var(--tc-ok) 30%, transparent); color: var(--tc-ok); background: var(--tc-ok-soft); }
.status-badge.pending { border-color: var(--tc-border-strong); color: var(--tc-pending); background: var(--tc-pending-soft); }
.status-badge.live-ledger { border-color: color-mix(in srgb, var(--tc-ok) 30%, transparent); color: var(--tc-ok); background: var(--tc-ok-soft); }

.type-label, .status-label {
  min-height: 22px;
  padding: 0 8px;
  border-radius: var(--tc-radius-chip);
  color: var(--tc-text);
  background: var(--tc-bg-quiet);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
}
.type-label.reward { color: var(--tc-link); background: var(--tc-accent-soft); }  /* Sage mist highlight */
.status-label { color: var(--tc-ok); background: var(--tc-ok-soft); }
.status-label.pending { color: var(--tc-pending); background: var(--tc-pending-soft); }

.proof-badge {
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-chip);
  color: var(--tc-text);
  background: var(--tc-bg-quiet);
  font-size: var(--tc-size-label-min);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
}
.proof-badge i { box-shadow: none; }
.proof-badge.v4 { border-color: color-mix(in srgb, var(--tc-accent) 45%, transparent); color: var(--tc-link); background: var(--tc-accent-soft); }
.proof-badge.unknown { color: var(--tc-text-muted); background: transparent; }

.multiplier-badge {
  min-height: 24px;
  border-radius: var(--tc-radius-chip);
  color: var(--tc-text);
  background: var(--tc-bg-quiet);
  font-family: var(--tc-font-sans);
  font-size: 13px;
  font-weight: var(--tc-weight-bold);
}
.multiplier-badge.baseline { color: var(--tc-ok); background: var(--tc-ok-soft); }
.multiplier-badge.priced { color: var(--tc-text); background: var(--tc-bg-quiet); }
.multiplier-badge.elevated { color: var(--tc-text-strong); background: var(--tc-border); }
.multiplier-badge.high { color: var(--tc-oxide); background: var(--tc-oxide-soft); }
.multiplier-badge.unknown { color: var(--tc-text-muted); background: transparent; }



/* =========================================================================
   7. Pagination
   ========================================================================= */
.pagination {
  min-height: 60px;
  padding: 12px 16px;
  border-top: 1px solid var(--tc-border);
  background: transparent;
}
.pagination button {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--tc-border-strong);
  border-radius: var(--tc-radius-chip);
  color: var(--tc-text);
  background: var(--tc-surface);
  box-shadow: none;
  font-size: 14px;
  font-weight: var(--tc-weight-medium);
}
.pagination button:hover:not(:disabled) { border-color: var(--tc-text-strong); color: var(--tc-text-strong); background: var(--tc-surface); }
.pagination button.active { border-color: var(--tc-button-bg); color: var(--tc-button-text); background: var(--tc-button-bg); box-shadow: none; }
.pagination button:disabled { opacity: .4; }
.pagination span { color: var(--tc-text-muted); }

/* =========================================================================
   8. Empty, loading and error states
   ========================================================================= */
.loading-cell, .empty-cell { color: var(--tc-text-muted); font-size: 14px; }
td.empty-cell, td.loading-cell { height: 96px; background: transparent; }
.io-list > .empty-cell, .pending-list > .empty-cell { padding: 40px 18px; }

.skeleton-fact i, .skeleton-fact b, .skeleton-io i, .skeleton-io b, .skeleton-io small, .skeleton-io strong,
.table-skeleton-row i, .market-value-skeleton, .address-meta-skeleton {
  border-radius: 4px;
  background: linear-gradient(90deg, var(--tc-bg-quiet) 25%, var(--tc-surface) 45%, var(--tc-bg-quiet) 65%);
  background-size: 240% 100%;
}
.proof-detail-panel.is-loading #block-proof-version,
.proof-detail-panel.is-loading #block-proof-multiplier,
.proof-detail-panel.is-loading #block-proof-explanation,
.proof-detail-panel.is-loading #block-proof-near-pin {
  border-radius: 4px;
  background: linear-gradient(90deg, var(--tc-bg-quiet) 25%, var(--tc-surface) 45%, var(--tc-bg-quiet) 65%);
  background-size: 240% 100%;
}

.empty-page { min-height: 440px; }
.empty-code {
  color: var(--tc-text-muted);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-size-label);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-label);
}
.empty-page h1 {
  color: var(--tc-text-strong);
  font-size: var(--tc-size-title);
  font-weight: var(--tc-weight-medium);
  letter-spacing: var(--tc-track-title);
}
.empty-page p { color: var(--tc-text-muted); font-size: 15px; }
.empty-page a {
  min-height: 42px;
  padding: 10px 20px;                                  /* site .button */
  border: 1.5px solid var(--tc-button-bg);
  border-radius: var(--tc-radius-chip);
  color: var(--tc-button-text);
  background: var(--tc-button-bg);
  box-shadow: none;
  font-size: var(--tc-size-ui);
  font-weight: var(--tc-weight-medium);
}
.empty-page a:hover { border-color: var(--tc-button-bg); color: var(--tc-button-text); background: var(--tc-button-bg); opacity: .86; }

.address-chart-loading strong, .chart-empty strong { color: var(--tc-text-strong); font-weight: var(--tc-weight-medium); }
.chart-empty.is-error strong { color: var(--tc-oxide); }

/* =========================================================================
   9. Footer
   ========================================================================= */
.site-footer { border-top: 1px solid var(--tc-border); background: var(--tc-bg-quiet); color: var(--tc-text); }
.footer-brand > a { color: var(--tc-text-strong); }
.footer-brand .brand-lockup { height: 24px; }
.footer-brand a small { margin-top: 8px; color: var(--tc-text-muted); font-size: var(--tc-size-label-min); font-weight: var(--tc-weight-medium); letter-spacing: var(--tc-track-label); }
.footer-brand p { color: var(--tc-text-muted); font-size: 14px; line-height: 1.5; }
.footer-nav > strong { color: var(--tc-text-muted); font-family: var(--tc-font-sans); font-size: var(--tc-size-label-min); font-weight: var(--tc-weight-medium); letter-spacing: var(--tc-track-label); text-transform: uppercase; }
.footer-nav a { color: var(--tc-text); font-size: 14px; }
.footer-nav a:hover { color: var(--tc-text-strong); }
.footer-meta { border-top: 1px solid var(--tc-border); color: var(--tc-text-muted); font-family: var(--tc-font-sans); font-size: 12px; }

/* Template change T5 adds this paragraph (legal wording TODO). */
.footer-disclaimer {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--tc-border-strong);
  border-radius: var(--tc-radius-chip);
  color: var(--tc-text);
  background: var(--tc-surface);
  font-size: 13px;
  line-height: 1.5;
}

/* =========================================================================
   10. Dark-scheme swaps that a token cannot express (images)
   ========================================================================= */
:root[data-theme="dark"] .brand-lockup.is-light { display: none; }
:root[data-theme="dark"] .brand-lockup.is-dark { display: block; }

/* =========================================================================
   11. Market widgets are switched off in TensorCash-hosted deployments.
       If the template still emits the section, hide it; the grids below it have
       their own top margins, so nothing collapses.
   ========================================================================= */
body[data-market-enabled="false"] .market-overview,
body[data-market-enabled="false"] .analytics-price-lockup,
body[data-market-enabled="false"] .analytics-hero-metrics,
body[data-market-enabled="false"] .analytics-market-summary,
body[data-market-enabled="false"] .price-series { display: none; }

/* =========================================================================
   11b. Fixes found on the live v1.0.0 run (2026-10-03).
       Footer status chip: app.css paints it white-on-dark; unreadable on Bone.
       Analytics (not in the 10-02 captures): flat Charcoal hero instead of the
       maroon/navy gradient, Charcoal active range tab, neutral eyebrows.
   ========================================================================= */
.footer-status { border-color: var(--tc-border-strong); color: var(--tc-text-muted); background: var(--tc-surface); }
.range-tabs button.active, .filter-tabs button.active, .difficulty-view button.active {
  color: var(--tc-button-text); background: var(--tc-button-bg); box-shadow: none;
}
body[data-page="analytics"] .analytics-hero,
body[data-page="analytics"] .analytics-hero[data-market-direction="up"] {
  border-color: var(--tc-charcoal); background: var(--tc-inverse-bg);
}
body[data-page="analytics"] .analytics-hero::before,
body[data-page="analytics"] .analytics-hero::after,
body[data-page="analytics"] .analytics-hero-canvas { display: none; }
body[data-page="analytics"] .analytics-section-title > span,
body[data-page="analytics"] .analytics-card-head > div > span { color: var(--tc-text-muted); }

/* =========================================================================
   11c. Charts and analytics leftovers (r2, 2026-10-03).
       Canvas colours come from --tc-chart-* (tokens.css) via chart-colors.js;
       these rules keep the HTML legends, tooltips and keys in the same order.
   ========================================================================= */
.legend-row .swatch-0, .swatch-0 { --swatch: var(--tc-chart-1); }
.legend-row .swatch-0 { background: var(--tc-chart-1); }
.legend-row .swatch-1, .swatch-1 { --swatch: var(--tc-chart-2); }
.legend-row .swatch-1 { background: var(--tc-chart-2); }
.legend-row .swatch-2, .swatch-2 { --swatch: var(--tc-chart-3); }
.legend-row .swatch-2 { background: var(--tc-chart-3); }
.legend-row .swatch-3, .swatch-3 { --swatch: var(--tc-chart-4); }
.legend-row .swatch-3 { background: var(--tc-chart-4); }
.legend-row .swatch-4, .swatch-4 { --swatch: var(--tc-chart-5); }
.legend-row .swatch-4 { background: var(--tc-chart-5); }
.legend-row .swatch-5, .swatch-5 { --swatch: var(--tc-chart-6); }
.legend-row .swatch-5 { background: var(--tc-chart-6); }
.legend-row .swatch-6, .swatch-6 { --swatch: var(--tc-chart-7); }
.legend-row .swatch-6 { background: var(--tc-chart-7); }
.legend-row .swatch-7, .swatch-7 { --swatch: var(--tc-chart-8); }
.legend-row .swatch-7 { background: var(--tc-chart-8); }
.legend-row .swatch-8, .swatch-8 { --swatch: var(--tc-chart-9); }
.legend-row .swatch-8 { background: var(--tc-chart-9); }
.legend-row .swatch-9, .swatch-9 { --swatch: var(--tc-chart-10); }
.legend-row .swatch-9 { background: var(--tc-chart-10); }
.legend-row .swatch-10, .swatch-10 { --swatch: var(--tc-chart-11); }
.legend-row .swatch-10 { background: var(--tc-chart-11); }
.legend-row .swatch-11, .swatch-11 { --swatch: var(--tc-chart-12); }
.legend-row .swatch-11 { background: var(--tc-chart-12); }
.mining-history-tooltip-rates i.tone-1 { background: var(--tc-chart-line-1); }
.mining-history-key.tone-1 { --key-color: var(--tc-chart-line-1); }
.mining-history-tooltip-rates i.tone-2 { background: var(--tc-chart-line-2); }
.mining-history-key.tone-2 { --key-color: var(--tc-chart-line-2); }
.mining-history-tooltip-rates i.tone-3 { background: var(--tc-chart-line-3); }
.mining-history-key.tone-3 { --key-color: var(--tc-chart-line-3); }
.mining-history-tooltip-rates i.tone-4 { background: var(--tc-chart-line-4); }
.mining-history-key.tone-4 { --key-color: var(--tc-chart-line-4); }
.mining-history-tooltip-rates i.tone-5 { background: var(--tc-chart-line-5); }
.mining-history-key.tone-5 { --key-color: var(--tc-chart-line-5); }
.mining-history-tooltip-rates i.tone-other { background: var(--tc-chart-muted-series); }
.analytics-chart-legend i { border-top-color: var(--tc-chart-secondary); }
.analytics-chart-legend .price-series i { border-top-color: var(--tc-chart-primary); box-shadow: none; }
.analytics-live-price-point { --live-price-color: var(--tc-chart-primary); --live-price-glow: transparent; }

/* Analytics active range tab: Charcoal like every other active segmented control. */
.analytics-range-tabs button.active,
.analytics-toggle button.active { color: var(--tc-button-text); background: var(--tc-button-bg); box-shadow: none; }

/* Red eyebrows and badges → neutral labels; numbers in Charcoal. */
.analytics-signal-strip span b { color: var(--tc-text-muted); background: var(--tc-bg-quiet); }
.analytics-signal-strip article::after { background: linear-gradient(90deg, var(--tc-accent), transparent); }
.analytics-section-title > span, .analytics-card-head > div > span,
.mining-history-meta small, .mining-history-inspector > div:first-child span,
.analytics-methodology strong, .mining-history-toolbar > b { color: var(--tc-text-muted); }
.analytics-card-stat strong { color: var(--tc-text-strong); }
.analytics-subchart-head span { color: var(--tc-text-muted); }
.analytics-subchart-head strong { color: var(--tc-text-strong); }
.analytics-alert-icon { color: var(--tc-text-muted); background: var(--tc-bg-quiet); }
.analytics-alert-control:focus-within { border-color: var(--tc-border-strong); box-shadow: 0 0 0 3px var(--tc-accent-soft); }
.large-transfer-row:hover .large-transfer-rank { color: var(--tc-button-text); background: var(--tc-button-bg); }
.large-transfer-track { background: var(--tc-bg-quiet); }
.large-transfer-track i { background: var(--tc-chart-primary); box-shadow: none; }

/* "Supply & reward": the dark maroon/navy slab becomes a Shell card; the issued
   ring is Deep sage on a Rule track. One Charcoal block per view (the hero). */
.analytics-supply-card { color: var(--tc-text); border-color: var(--tc-border); background: var(--tc-surface); box-shadow: none; }
.analytics-supply-card::before { display: none; }
.analytics-supply-card .supply-orbit-wrap { border-right-color: var(--tc-border); }
.analytics-supply-card .analytics-card-head { border-bottom-color: var(--tc-border); }
.analytics-supply-card .analytics-card-head > div > span { color: var(--tc-text-muted); }
.analytics-supply-card .analytics-card-head h2 { color: var(--tc-text-strong); }
.analytics-supply-card .analytics-card-head p { color: var(--tc-text-muted); }
.supply-orbit { background: conic-gradient(var(--tc-chart-primary) var(--supply-angle), var(--tc-border) var(--supply-angle)); box-shadow: none; }
.supply-orbit::before { border-color: var(--tc-border); background: var(--tc-surface); box-shadow: none; }
.supply-orbit::after { background: var(--tc-chart-primary); box-shadow: none; }
.supply-orbit strong { color: var(--tc-text-strong); }
.supply-orbit span, .supply-values span, .reward-step span,
.supply-countdown small, .analytics-supply-card .epoch-progress { color: var(--tc-text-muted); }
.supply-values > div, .reward-step { border-color: var(--tc-border); }
.supply-values strong, .reward-step strong { color: var(--tc-text-strong); }
.reward-step > i { background: var(--tc-border-strong); }
.reward-step > i::after { border-color: var(--tc-text-faint); }
.reward-step > i b { background: var(--tc-chart-primary); }
.supply-countdown span { color: var(--tc-text-strong); }
.analytics-supply-card .epoch-progress > div { background: var(--tc-bg-quiet); }
.analytics-supply-card .epoch-progress i { background: var(--tc-chart-primary); box-shadow: none; }

/* Footer attribution and licence (r2). */
.footer-attribution { margin: 12px 0 0; color: var(--tc-text-muted); font-size: 13px; line-height: 1.5; }
.footer-attribution a { color: var(--tc-link); text-decoration: underline; text-underline-offset: 2px; }
.footer-attribution a:hover { color: var(--tc-link-hover); }
.license-page { max-width: 820px; margin: 0 auto; padding: 32px 0 56px; color: var(--tc-text); }
.license-page h1 { color: var(--tc-text-strong); font-size: var(--tc-size-title); font-weight: var(--tc-weight-medium); letter-spacing: var(--tc-track-title); }
.license-page h2 { margin-top: 32px; color: var(--tc-text-strong); font-size: var(--tc-size-panel-title); font-weight: var(--tc-weight-medium); }
.license-page p { font-size: 15px; line-height: 1.6; }
.license-page a { color: var(--tc-link); }
.license-page pre { overflow-x: auto; padding: 20px; border: 1px solid var(--tc-border); border-radius: var(--tc-radius-card); color: var(--tc-text-strong); background: var(--tc-surface); font-family: var(--tc-font-mono); font-size: 13px; line-height: 1.55; white-space: pre-wrap; }

/* =========================================================================
   12. Responsive. Explorer breakpoints are 1050 / 840 / 620 / 560 / 360;
       brand breakpoint is 800. Both are respected.
   ========================================================================= */
@media (max-width: 1180px) {
  .main-nav a { padding-inline: 9px; font-size: 14px; }
  .main-nav a.active::after { right: 9px; left: 9px; }
  .brand-copy small { display: none; }
}
@media (max-width: 1050px) {
  .summary-card:nth-child(even) { border-right: 1px solid var(--tc-border); }
  .summary-card:nth-child(n+3) { border-top: 1px solid var(--tc-border); }
}
@media (max-width: 840px) {
  .header-inner { height: auto; min-height: var(--tc-header); padding-block: 10px; }
  .header-search { order: 5; flex: 1 0 100%; min-width: 0; max-width: none; margin-left: 0; }
  .main-nav {
    border: 1px solid var(--tc-border);
    border-radius: 0 0 var(--tc-radius-card) var(--tc-radius-card);
    background: var(--tc-surface);
    box-shadow: var(--tc-shadow-float);
  }
  .main-nav a { min-height: 48px; padding: 0 16px; border-bottom: 1px solid var(--tc-border); color: var(--tc-text); }
  .main-nav a.active { color: var(--tc-text-strong); }
  .main-nav a.active::after { top: 0; right: auto; bottom: 0; left: 0; width: 2px; height: auto; }
  .mobile-menu { margin-left: auto; }
  .language-switcher { margin-left: 0; }
}
@media (max-width: 799px) {
  .site-main { padding-top: 24px; }
  .page-heading { gap: 12px; padding-bottom: 16px; }
  .panel-head { padding: 14px 16px; }
  .panel-head h2 { font-size: var(--tc-size-panel-title); }
  th, td { padding-inline: 12px; }
  td { font-size: 13px; }
}
@media (max-width: 620px) {
  .page-heading { padding-left: 0; }
  .page-heading h1 { font-size: var(--tc-size-title); }
  .page-heading p { font-size: 14px; }
  .height-chip { border-top: 1px solid var(--tc-border); border-left: 0; }
  .summary-card { min-height: 88px; padding: 14px 16px; }
  .summary-card strong, .summary-card > a { font-size: var(--tc-size-stat); }
  .fact-card { padding: 12px; }
  .fact-card strong { font-size: 14px; }
  .fact-card strong.mono { font-size: 12px; }
  .detail-hash { font-size: 12px !important; }
  .status-badge { align-self: flex-start; }
}
@media (max-width: 560px) {
  .detail-grid, .address-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pagination { justify-content: center; flex-wrap: wrap; }
}
@media (max-width: 400px) {
  /* 360px phones: lockup 24px tall, ribbon trimmed to network + height. */
  .brand .brand-lockup { height: 24px; }
  .terminal-ribbon-inner { font-size: 10px; letter-spacing: .04em; }
  .ribbon-identity { display: none; }
  .terminal-ribbon-right { width: 100%; justify-content: space-between; }
  .language-trigger { min-width: 40px; padding-inline: 8px; }
  .language-trigger #language-trigger-label, .language-trigger .language-chevron { display: none; }
  .detail-grid, .address-summary { grid-template-columns: 1fr; }
  td .hash-link, td .address-link { max-width: 18ch; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card:nth-child(n) { border: 1px solid var(--tc-border); }
  .stack-metric.primary strong { font-size: 26px; }
  .stack-metric strong { font-size: 20px; }
}

/* =========================================================================
   13. Motion: BRAND.md "never bounce or overshoot"; respect reduced motion.
   ========================================================================= */
.site-main.page-entering > * { animation-timing-function: var(--tc-ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================================
   14. TensorCash r3 additions: VDF ticks, tokens/s, holder-only ICU decrypt.
   Every element below starts hidden and is shown only once its value is
   sourced (absence never renders as zero).
   ========================================================================= */
.tc-ticks-card[hidden], .tc-token-rate[hidden], .tc-pot-panel[hidden],
.tc-icu-decrypt[hidden], .tc-icu-output[hidden], .tc-icu-clear[hidden] { display: none !important; }

@media (min-width: 1051px) {
  .summary-grid:has(> .tc-ticks-card:not([hidden])) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.tc-ticks-card strong { font-variant-numeric: tabular-nums; }

.tc-token-rate { display: block; margin-top: 4px; font-size: 12px; color: var(--tc-inverse-muted); cursor: help; }
.tc-token-rate b { color: var(--tc-inverse-text); font-weight: var(--tc-weight-bold); font-variant-numeric: tabular-nums; }
.tc-token-rate-info { opacity: .7; }

.tc-pot-panel { margin-bottom: 18px; }
.tc-pot-panel { overflow: hidden; }
.tc-pot-panel .tc-pot-grid { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--tc-rule); border-radius: 0; box-shadow: none; gap: 0; }
.tc-pot-panel .tc-pot-grid .fact-card { border: 0; border-right: 1px solid var(--tc-rule); border-radius: 0; box-shadow: none; }
.tc-pot-panel .tc-pot-grid .fact-card:last-child { border-right: 0; }
.tc-pot-panel .fact-card strong small { font-weight: var(--tc-weight-medium); color: var(--tc-text-muted); margin-left: 6px; font-size: 12px; }
.tc-pot-source { margin: 0; padding: 10px 20px 14px; border-top: 1px solid var(--tc-rule); font-size: 12px; color: var(--tc-text-muted); }

td.tc-tick-cell, th.tc-tick-head { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.tc-icu-decrypt { margin: 0; padding: 18px 22px 22px; border-top: 1px solid var(--tc-rule); }
.tc-icu-head h3 { margin: 0 0 6px; font-size: 16px; font-weight: var(--tc-weight-medium); color: var(--tc-text-strong); }
.tc-icu-head p { margin: 0 0 12px; color: var(--tc-text-muted); max-width: 72ch; line-height: 1.5; }
.tc-icu-form label { display: block; font-size: 12px; color: var(--tc-text-muted); margin-bottom: 6px; }
.tc-icu-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tc-icu-row input { flex: 1 1 320px; min-width: 0; padding: 9px 12px; border: 1px solid var(--tc-line); border-radius: var(--tc-radius-chip); background: var(--tc-surface); color: var(--tc-text); font-family: var(--tc-font-mono); font-size: 13px; }
.tc-icu-row input:focus { outline: 2px solid var(--tc-focus); outline-offset: 1px; }
.tc-icu-row button { padding: 9px 16px; border-radius: var(--tc-radius-chip); border: 1px solid var(--tc-button-bg); background: var(--tc-button-bg); color: var(--tc-button-text); font: inherit; font-weight: var(--tc-weight-medium); cursor: pointer; }
.tc-icu-row button.tc-icu-clear { background: transparent; color: var(--tc-text); border-color: var(--tc-line); }
.tc-icu-row button:disabled { opacity: .6; cursor: progress; }
.tc-icu-status { min-height: 1.4em; margin: 8px 0 0; font-size: 13px; color: var(--tc-text-muted); }
.tc-icu-status.is-error { color: var(--tc-oxide); }
.tc-icu-output { margin-top: 14px; }
.tc-icu-text { white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; padding: 16px; border: 1px solid var(--tc-rule); border-radius: var(--tc-radius-card); background: var(--tc-bg-quiet); font-family: var(--tc-font-mono); font-size: 12.5px; line-height: 1.55; color: var(--tc-text); }
.status-badge.tc-icu-warn { background: var(--tc-oxide-soft); color: var(--tc-oxide); }
/* Home "Recent blocks" gains a Ticks column: tighten its cells so Age stays visible. */
.data-panel table:has(#recent-blocks) th, .data-panel table:has(#recent-blocks) td { padding-left: 10px; padding-right: 10px; }
.data-panel table:has(#recent-blocks) th:first-child, .data-panel table:has(#recent-blocks) td:first-child { padding-left: 20px; }
.data-panel table:has(#recent-blocks) td .address-link, .data-panel table:has(#recent-blocks) td .hash-link { max-width: 15ch; }
/* Block history: the inserted Ticks column shifts upstream's right-aligned numeric range
   (columns 5-9) by one; keep Confirmations right-aligned. Upstream sets min-width 1420px. */
.blocks-table:has(.tc-tick-head) th:nth-child(10), .blocks-table:has(.tc-tick-head) td:nth-child(10) { text-align: right; }

/* =========================================================================
   15. TensorCash r4: block model / PoW hash, asset legs, registration record,
   ICU document structure. Hidden until sourced.
   ========================================================================= */
.tc-identity-panel[hidden], .tc-asset-legs-panel[hidden], .tc-registration-panel[hidden], .tc-icu-structure[hidden] { display: none !important; }
.tc-identity-panel { margin-bottom: 18px; overflow: hidden; }
.tc-identity-panel .tc-identity-grid { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--tc-rule); border-radius: 0; box-shadow: none; gap: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.tc-identity-panel .fact-card { border: 0; border-right: 1px solid var(--tc-rule); border-radius: 0; box-shadow: none; }
.tc-identity-panel .fact-card:last-child { border-right: 0; }
.tc-identity-panel .fact-card strong .tc-pow-hash { font-family: var(--tc-font-mono); background: none; padding: 0; font-size: 13px; word-break: break-all; font-weight: var(--tc-weight-medium); text-transform: none; letter-spacing: 0; }
.tc-model-commit { margin-left: 6px; font-size: 12px; color: var(--tc-text-muted); font-weight: var(--tc-weight-medium); }
@media (max-width: 840px) { .tc-identity-panel .tc-identity-grid { grid-template-columns: 1fr; } .tc-identity-panel .fact-card { border-right: 0; border-bottom: 1px solid var(--tc-rule); } }

td.tc-model-cell, th.tc-model-head { white-space: nowrap; }
/* Blocks history with Model (after Proof) and Ticks (before Size): upstream right-aligns
   columns 5-9 by position; restore its intent for the shifted columns. */
.blocks-table:has(.tc-model-head) th:nth-child(5), .blocks-table:has(.tc-model-head) td:nth-child(5) { text-align: left; }
.blocks-table:has(.tc-model-head) th:nth-child(10), .blocks-table:has(.tc-model-head) td:nth-child(10),
.blocks-table:has(.tc-model-head) th:nth-child(11), .blocks-table:has(.tc-model-head) td:nth-child(11) { text-align: right; }

.tc-chip { display: inline-block; padding: 2px 8px; border: 1px solid var(--tc-border); border-radius: var(--tc-radius-chip); background: var(--tc-bg-quiet); color: var(--tc-text); font-size: 12px; font-weight: var(--tc-weight-medium); line-height: 1.5; white-space: nowrap; }
.tc-chip.is-ok { background: var(--tc-ok-soft); color: var(--tc-ok); border-color: transparent; }
.tc-chip.is-warn { background: var(--tc-oxide-soft); color: var(--tc-oxide); border-color: transparent; }
.tc-chip.is-asset { background: var(--tc-sage-mist); color: var(--tc-text-strong); border-color: transparent; font-variant-numeric: tabular-nums; }
a.tc-chip.is-asset { text-decoration: none; }

.tc-asset-legs-panel { margin-bottom: 18px; }
.tc-asset-legs-totals { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 18px; }
.tc-asset-leg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tc-asset-leg small { font-size: 11px; }

.tc-registration-panel { margin-bottom: 18px; }
.tc-registration-panel th { width: 30%; text-align: left; font-weight: var(--tc-weight-medium); color: var(--tc-text-muted); vertical-align: top; }
.tc-registration-panel td small, .tc-icu-meta td small { display: block; margin-top: 2px; color: var(--tc-text-muted); font-size: 12px; }
.tc-registration-panel td .tc-chip { margin: 0 4px 4px 0; }
.tc-registration-source { margin: 0; padding: 10px 20px 14px; border-top: 1px solid var(--tc-rule); font-size: 12px; color: var(--tc-text-muted); }

.tc-icu-structure { padding: 4px 22px 18px; border-top: 1px solid var(--tc-rule); }
.tc-icu-meta th { width: 26%; text-align: left; font-weight: var(--tc-weight-medium); color: var(--tc-text-muted); }
.tc-icu-meta td .mono, .tc-icu-structure .mono { word-break: break-all; }
.tc-icu-section { margin-top: 18px; }
.tc-icu-section h3 { margin: 0 0 10px; font-size: 16px; font-weight: var(--tc-weight-medium); color: var(--tc-text-strong); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tc-icu-section h3 .muted { font-size: 12px; }
.tc-icu-section h4 { margin: 14px 0 6px; font-size: 13px; font-weight: var(--tc-weight-medium); color: var(--tc-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.tc-icu-fold { border: 1px solid var(--tc-rule); border-radius: var(--tc-radius-card); background: var(--tc-surface); margin: 6px 0; }
.tc-icu-fold > summary { cursor: pointer; padding: 9px 12px; font-weight: var(--tc-weight-medium); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tc-icu-fold > :not(summary) { margin: 0 12px 12px; }
.tc-icu-json, .tc-icu-plain { white-space: pre-wrap; word-break: break-word; max-height: 50vh; overflow: auto; padding: 12px; border-radius: var(--tc-radius-chip); background: var(--tc-bg-quiet); font-family: var(--tc-font-mono); font-size: 12px; line-height: 1.5; color: var(--tc-text); }
.tc-icu-invalid { color: var(--tc-oxide); }
.tc-icu-export { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.tc-icu-export button { padding: 7px 12px; border: 1px solid var(--tc-line); border-radius: var(--tc-radius-chip); background: transparent; color: var(--tc-text); font: inherit; font-size: 13px; cursor: pointer; }
.tc-icu-export-status { font-size: 12px; color: var(--tc-text-muted); }

/* ---- r5: known pool / solo-miner labels (known-addresses.js) ---------------------- */
.tc-miner-kind {
  display: inline-block;
  flex: none;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--tc-font-sans);
  font-size: 10px;
  font-weight: var(--tc-weight-semibold);
  letter-spacing: var(--tc-track-label);
  line-height: 1.4;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}
.tc-miner-kind.is-pool { background: var(--tc-accent-soft); color: var(--tc-text-strong); border-color: var(--tc-accent); }
.tc-miner-kind.is-solo { background: var(--tc-bg); color: var(--tc-text); border-color: var(--tc-border-strong); }
.address-link.alias-link .tc-miner-kind { margin-left: 0; }
.detail-heading h1 .tc-miner-kind { margin-left: 12px; padding: 3px 8px; font-size: 12px; vertical-align: .35em; }
.mining-history-key b .tc-miner-kind { margin-left: 5px; font-size: 9px; padding: 0 4px; }

.tc-block-miner[hidden] { display: none; }
.tc-block-miner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13px; color: var(--tc-text-muted); }
.tc-block-miner > span:first-child { font-size: var(--tc-size-label-min); letter-spacing: var(--tc-track-label); text-transform: uppercase; }
.tc-block-miner .address-link { max-width: 100%; }

.tc-kind-filter { display: inline-flex; gap: 0; margin-left: auto; margin-right: 12px; border: 1px solid var(--tc-border-strong); border-radius: var(--tc-radius-chip); overflow: hidden; }
.tc-kind-filter button { padding: 5px 10px; border: 0; border-right: 1px solid var(--tc-border-strong); background: var(--tc-surface); color: var(--tc-text); font: inherit; font-size: 12px; font-weight: var(--tc-weight-medium); cursor: pointer; }
.tc-kind-filter button:last-child { border-right: 0; }
.tc-kind-filter button[aria-pressed="true"] { background: var(--tc-button-bg); color: var(--tc-button-text); }
.tc-kind-filter button:focus-visible { outline: 2px solid var(--tc-focus); outline-offset: -2px; }
#pool-addresses[data-tc-kind="pool"] > tr:not(:has(.tc-miner-kind.is-pool)),
#pool-addresses[data-tc-kind="solo"] > tr:not(:has(.tc-miner-kind.is-solo)) { display: none; }
.address-link.alias-link:has(.tc-miner-kind)::before { flex: none; }
/* A labelled miner is short: never truncate it (narrow home "Recent blocks" column
   caps links at 15ch). The latest-block card has no room for the badge. */
td .address-link.alias-link:has(.tc-miner-kind) { max-width: none; overflow: visible; white-space: nowrap; }
.latest-block-miner .tc-miner-kind { display: none; }
/* Latest-block card: wrap the "age · Mined by <name>" line instead of eliding the name. */
.latest-block-card .latest-block-miner { white-space: normal; overflow: visible; text-overflow: clip; }
.latest-block-card .latest-block-miner .address-link.alias-link { padding: 0; border: 0; background: none; font-size: 13px; }
.latest-block-card .latest-block-miner .address-link.alias-link::before { display: none; }
/* Blocks-page miner cards are narrow: let the badge drop under the name rather than clip. */
.miner-card .address-link.alias-link:has(.tc-miner-kind) { max-width: 100%; flex-wrap: wrap; row-gap: 4px; white-space: normal; }
@media (max-width: 800px) {
  .panel-head:has(> .tc-kind-filter) { flex-wrap: wrap; }
  .tc-kind-filter { order: 3; flex: 1 0 100%; margin: 10px 0 0; }
  .tc-kind-filter button { flex: 1; }
  .detail-heading h1 .tc-miner-kind { font-size: 11px; margin-left: 8px; }
}

/* Dense tables: smaller miner chips inside table cells. */
td .address-link.alias-link { padding: 2px 6px; font-size: 12px; }
td .address-link.alias-link .tc-miner-kind { font-size: 9px; padding: 0 4px; }

/* Blocks page (owner, 2026-10-08): no proof-pricing cards on top and no Proof
   (V3/V4) column in Block history; Model and Ticks stay. Hidden, not removed, so
   upstream app.js still finds its elements. */
.proof-summary-grid { display: none; }
.blocks-table th.tc-proof-col, .blocks-table td:has(> .proof-badge) { display: none; }
