/* ============================================================
   BTCNodes — Terminal / Instrument-Panel Theme
   File: app/static/theme-terminal.css
   Sitewide terminal theme layer.

   Role: ACTIVE sitewide theme. Loaded LAST on every page, after:
     styles.css → pages.css → [page css] → footer.css → site-polish.css

   Rollback: remove this one <link> per page. The Observatory theme
   (all existing CSS files) is untouched and remains the backup.

   How it works (three layers):
     A. Token remap — styles.css :root vars redirected to terminal
        palette. Covers all 147 var(--gold/--line/...) usages in
        pages.css / explorer-consumer.css / nodes-kiss.css / home-v2.css.
     B. Component restyle — nav, cards, panels, pills, buttons,
        inputs, tables, footer, type scale.
     C. Hardcoded-hex sweep — site-polish.css / pages.css /
        nodes-kiss.css / node-detail.css paint the old identity with
        literal #ffd95a-family golds and gradient chips that vars
        can't reach; those exact selectors are overridden here.

   !important policy: only where the Observatory rule itself uses
   !important (site-polish.css) or where a hardcoded hex must lose.
   Layout/positioning is never forced.
   ============================================================ */

/* ------------------------------------------------------------
   A. TOKENS — complete remap of styles.css :root (verified names)
   ------------------------------------------------------------ */
:root {
  /* terminal palette */
  --tt-bg:        #0b0e14;
  --tt-bg-raise:  #0e121b;
  --tt-panel:     #11151f;
  --tt-panel-2:   #161b28;
  --tt-line:      #232a3a;
  --tt-line-soft: #1a2030;
  --tt-text:      #d6dae3;
  --tt-dim:       #7d8598;
  --tt-soft:      #a7aebc;
  --tt-amber:     #f5a623;
  --tt-amber-hi:  #ffb63e;
  --tt-amber-dim: #8a6420;
  --tt-green:     #4cc38a;
  --tt-red:       #e5534b;
  --tt-blue:      #75a8ff;

  --tt-mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --tt-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --tt-radius:    8px;
  --tt-radius-sm: 5px;

  /* remap: every custom property defined in styles.css :root */
  --bg:     var(--tt-bg);
  --panel:  var(--tt-panel);
  --panel2: var(--tt-panel-2);
  --panel3: #1b2130;
  --text:   var(--tt-text);
  --muted:  var(--tt-dim);
  --soft:   var(--tt-soft);
  --line:   var(--tt-line);
  --line2:  var(--tt-line-soft);
  --gold:   var(--tt-amber);
  --gold2:  var(--tt-amber);
  --green:  var(--tt-green);
  --red:    var(--tt-red);
  --blue:   var(--tt-blue);
  --shadow: none;
  /* explorer-consumer.css uses var(--accent, #ffe49a); --accent is
     defined NOWHERE in base css, so the gold fallback always fired.
     Defining it here kills those 3 leaks at the source. */
  --accent: var(--tt-amber);
  /* --sync intentionally untouched (functional progress var) */
}

/* ------------------------------------------------------------
   B1. BASE — kill the Observatory atmosphere
   ------------------------------------------------------------ */
html { background: var(--tt-bg); }

body {
  /* replaces the radial-glow + diagonal gradient backdrop */
  background: var(--tt-bg) !important;
  color: var(--tt-text);
  font-family: var(--tt-sans);
  -webkit-font-smoothing: antialiased;
}

/* styles.css body::before = 40px grid overlay; .noise = grain */
body::before { display: none !important; }
.noise { display: none !important; }

:focus-visible { outline: 2px solid var(--tt-amber) !important; outline-offset: 2px; }
::selection { background: var(--tt-amber-dim); color: var(--tt-text); }

/* generic gold link colorizer in styles.css:1082 uses literal
   #f8c85a/#ffe39a — mirror its exact selector, later cascade wins */
a:not(.nav-link):not(.big-link):not(.button):not(.btn):not(.ghost):not(.mini):not(.hash-chip):not(.link-button):not(.address-tx-row):not(.fee-tile) {
  color: var(--tt-amber);
  text-decoration-color: rgba(245, 166, 35, 0.4);
}
a:not(.nav-link):not(.big-link):not(.button):not(.btn):not(.ghost):not(.mini):not(.hash-chip):not(.link-button):not(.address-tx-row):not(.fee-tile):visited {
  color: var(--tt-amber);
}
a:not(.nav-link):not(.big-link):not(.button):not(.btn):not(.ghost):not(.mini):not(.hash-chip):not(.link-button):not(.address-tx-row):not(.fee-tile):hover,
a:not(.nav-link):not(.big-link):not(.button):not(.btn):not(.ghost):not(.mini):not(.hash-chip):not(.link-button):not(.address-tx-row):not(.fee-tile):focus-visible {
  color: var(--tt-amber-hi);
  text-decoration-color: var(--tt-amber-hi);
}

/* ------------------------------------------------------------
   B2. TYPE SYSTEM
   Observatory identity = 80px/-0.085em display h1. Terminal is
   denser: readable headline, mono for anything that is data.
   ------------------------------------------------------------ */
h1 {
  font-size: clamp(30px, 4.5vw, 46px) !important;  /* beats site-polish clamp */
  line-height: 1.12 !important;
  letter-spacing: -0.015em !important;
  font-weight: 600;
  color: var(--tt-text);
}
h2 { letter-spacing: -0.015em; font-weight: 600; color: var(--tt-text); }
h3 { font-weight: 600; color: var(--tt-text); }

.eyebrow {
  font-family: var(--tt-mono) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  color: var(--tt-dim) !important;
}

.lead, .section-note { color: var(--tt-dim); }

/* live/numeric surfaces render mono with tabular figures */
.card strong, .pill, td, th, code, kbd, samp, pre,
.hash-chip, .metric strong, .atlas-stat strong,
.node-map-stat, .country-live-stats strong, .version-live-stats strong,
.home-v2-terminal, .home-v2-preview-row span, .home-v2-preview-row em,
.tt-num {
  font-family: var(--tt-mono) !important;
  font-variant-numeric: tabular-nums;
}

.text-link { color: var(--tt-amber) !important; font-family: var(--tt-mono); font-size: 13px; }
.text-link:hover { color: var(--tt-amber-hi) !important; }

h1 .soft, .home-v2-title .soft { color: var(--tt-amber) !important; }

/* ------------------------------------------------------------
   B3. HEADER / NAV — consistent every page
   site-polish paints .coin as a 44px glossy gradient chip and
   .brand-title/.brand-subtitle in pale gold, all !important.
   ------------------------------------------------------------ */
.nav, .top-nav {
  border-bottom: 1px solid var(--tt-line);
  background: rgba(11, 14, 20, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* site-polish.css:862 styles the coin at (0,3,1) specificity with
   !important (52px glossy gradient chip). Selector mirrored + .coin
   appended so every variant loses to the terminal flat square. */
.nav .brand.brand-link > .coin,
.top-nav .brand.brand-link > .coin,
.page-shell .top-nav .brand.brand-link > .coin,
.coin {
  flex-basis: 28px !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: var(--tt-radius-sm) !important;
  background: var(--tt-amber) !important;
  color: var(--tt-bg) !important;
  font-family: var(--tt-mono) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.brand-title {
  color: var(--tt-text) !important;
  font-family: var(--tt-mono) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
}

.brand-subtitle {
  color: var(--tt-dim) !important;
  font-family: var(--tt-mono) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

/* pages.css .brand-link/.brand-main hardcode #ffd95a */
.brand-link, .brand-main { color: var(--tt-text) !important; }

.nav-link, .nav-actions .nav-link, .nav-links .nav-link, .nav-actions a.nav-link {
  color: var(--tt-dim) !important;
  font-weight: 500 !important;
  font-size: 13.5px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: var(--tt-radius-sm) !important;
}
.nav-link:hover, .nav-actions .nav-link:hover, .nav-links .nav-link:hover {
  color: var(--tt-text) !important;
  background: var(--tt-panel-2) !important;   /* replaces gold-wash hover */
  border-color: var(--tt-line) !important;
}
.nav-link.active, .nav-link[aria-current="page"],
.nav-actions .nav-link.active, .nav-actions .nav-link[aria-current="page"] {
  color: var(--tt-amber) !important;
  background: rgba(245, 166, 35, 0.08) !important;
  border-color: var(--tt-amber-dim) !important;
}

/* ------------------------------------------------------------
   B4. PILLS / STATUS
   ------------------------------------------------------------ */
.pill {
  border-radius: var(--tt-radius-sm) !important;
  background: var(--tt-panel-2) !important;
  border: 1px solid var(--tt-line) !important;
  color: var(--tt-dim) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 6px 10px !important;
  box-shadow: none !important;
}
.pill.ok  { color: var(--tt-green) !important; border-color: rgba(76, 195, 138, 0.35) !important; background: rgba(76, 195, 138, 0.06) !important; }
.pill.bad { color: var(--tt-red) !important;   border-color: rgba(229, 83, 75, 0.4)  !important; background: rgba(229, 83, 75, 0.06)  !important; }

/* ------------------------------------------------------------
   B5. PANELS / CARDS — flat, hairline, compact
   styles.css gives .panel/.card a white-veil gradient + 18–24px
   radius + drop shadow. Terminal: solid panel, 8px, no shadow.
   ------------------------------------------------------------ */
.panel, .card, .search-card, .hero-card,
.seo-info-card, .seo-related-panel, .seo-depth-panel,
.guide-card, .feature-card, .node-detail-card,
.node-map-live-panel, .node-map-preview-panel, .node-map-network-panel,
.node-map-guide-panel, .node-map-faq-panel, .node-map-limits-panel,
.country-live-panel, .version-live-panel, .result-panel, .pulse-card {
  background: var(--tt-panel) !important;
  background-image: none !important;
  border: 1px solid var(--tt-line) !important;
  border-radius: var(--tt-radius) !important;
  box-shadow: none !important;
}

.card { border-radius: var(--tt-radius) !important; padding: 14px; }

.card span {
  font-family: var(--tt-mono);
  font-size: 10.5px;
  font-weight: 600 !important;
  letter-spacing: 0.1em;
  color: var(--tt-dim) !important;
}
.card strong { color: var(--tt-amber); font-weight: 600 !important; letter-spacing: -0.02em !important; }
.card small { color: var(--tt-dim); }

.card.primary {
  border-color: var(--tt-amber-dim) !important;
  background: linear-gradient(180deg, rgba(245, 166, 35, 0.06), transparent 55%) var(--tt-panel) !important;
}

a.card:hover, .card:hover, .home-v2-preview-row:hover, .guide-card:hover {
  border-color: var(--tt-amber-dim) !important;
  background-color: var(--tt-panel-2) !important;
  box-shadow: none !important;
  transform: none !important;
}

.card.skeleton strong { color: var(--tt-dim) !important; }

/* ------------------------------------------------------------
   B6. BUTTONS / ACTIONS
   nodes-kiss.css paints action chips with a literal
   linear-gradient(#ffe59a,#ffbf4d) — swept here.
   ------------------------------------------------------------ */
.big-link, button, .btn, .ghost {
  border-radius: var(--tt-radius-sm) !important;
  box-shadow: none !important;
  font-weight: 600;
}

/* styles.css:279 global `button` = gold gradient + near-black text.
   Terminal default for EVERY button; more specific rules below
   (primary-action, search submit, ghost) still win within this file. */
button {
  background: var(--tt-panel-2) !important;
  background-image: none !important;
  color: var(--tt-text) !important;
  border: 1px solid var(--tt-line) !important;
}
button:hover:not(:disabled) { border-color: var(--tt-amber-dim) !important; }
button:disabled { opacity: 0.55; }

/* nodes page load-more: hardcoded gold pill (nodes-kiss.css:455) */
.node-load-more {
  background: var(--tt-panel-2) !important;
  background-image: none !important;
  color: var(--tt-text) !important;
  border: 1px solid var(--tt-line) !important;
}

.big-link {
  background: var(--tt-panel-2) !important;
  background-image: none !important;
  border: 1px solid var(--tt-line) !important;
  color: var(--tt-text) !important;
}
.big-link:hover { border-color: var(--tt-amber-dim) !important; color: var(--tt-text) !important; }

.big-link.primary-action, .primary-action {
  background: var(--tt-amber) !important;
  background-image: none !important;
  border-color: var(--tt-amber) !important;
  color: var(--tt-bg) !important;
}
.big-link.primary-action:hover, .primary-action:hover { background: var(--tt-amber-hi) !important; }

.ghost, .ghost.mini {
  background: transparent !important;
  border: 1px solid var(--tt-line) !important;
  color: var(--tt-dim) !important;
  font-family: var(--tt-mono);
  font-size: 12px;
}
.ghost:hover, .ghost.mini:hover { color: var(--tt-amber) !important; border-color: var(--tt-amber-dim) !important; }

/* nodes page: builder bar + selection controls (hardcoded golds) */
.node-builder-bar strong { color: var(--tt-amber) !important; }
.node-builder-actions button[data-copy-selected-nodes],
.node-builder-actions button {
  background: var(--tt-panel-2) !important;
  background-image: none !important;
  border: 1px solid var(--tt-line) !important;
  color: var(--tt-text) !important;
}
.node-builder-actions button:hover { border-color: var(--tt-amber-dim) !important; }
.node-select-control input { accent-color: var(--tt-amber) !important; }
.node-select-control input:checked + span {
  border-color: var(--tt-amber-dim) !important;
  background: rgba(245, 166, 35, 0.1) !important;
  color: var(--tt-amber) !important;
}

/* sort controls (countries / versions pages) */
.country-sort.active, .version-sort.active {
  color: var(--tt-amber) !important;
  border-color: var(--tt-amber-dim) !important;
  background: rgba(245, 166, 35, 0.08) !important;
}

/* ------------------------------------------------------------
   B7. INPUTS / SEARCH
   ------------------------------------------------------------ */
input, select, textarea {
  background: var(--tt-bg-raise) !important;
  color: var(--tt-text) !important;
  border: 1px solid var(--tt-line) !important;
  border-radius: var(--tt-radius-sm) !important;
  font-family: var(--tt-mono) !important;
  box-shadow: none !important;
}
input::placeholder { color: var(--tt-dim) !important; }
input:focus, select:focus, textarea:focus { border-color: var(--tt-amber-dim) !important; outline: none; }

.search-row button, form button[type="submit"] {
  background: var(--tt-panel-2) !important;
  color: var(--tt-amber) !important;
  border: 1px solid var(--tt-line) !important;
  font-family: var(--tt-mono) !important;
  font-size: 13px !important;
  letter-spacing: 0.04em;
}
.search-row button:hover, form button[type="submit"]:hover { background: var(--tt-line) !important; }

/* ------------------------------------------------------------
   B8. TABLES — explorer, nodes, countries, versions, node-map
   ------------------------------------------------------------ */
table { border-collapse: collapse; }
thead th, .country-table th, .version-table th, .node-map-preview-table th {
  font-family: var(--tt-mono) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tt-dim) !important;
  background: transparent !important;
  border-bottom: 1px solid var(--tt-line) !important;
}
tbody td { border-bottom: 1px solid var(--tt-line-soft) !important; background: transparent; }
tbody tr:hover td { background: var(--tt-panel-2) !important; }
td strong { color: var(--tt-amber); }

.table-wrap, .country-table-wrap, .version-table-wrap, .node-map-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ------------------------------------------------------------
   B9. TICKER STRIP (optional, theme-terminal.js)
   ------------------------------------------------------------ */
.tt-ticker {
  border-bottom: 1px solid var(--tt-line);
  background: var(--tt-panel);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tt-ticker-row { display: flex; white-space: nowrap; font: 500 12.5px var(--tt-mono); }
.tt-tick {
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 18px;
  border-right: 1px solid var(--tt-line);
  color: var(--tt-dim);
}
.tt-tick .v { color: var(--tt-amber); font-weight: 600; }
.tt-tick .v.ok { color: var(--tt-green); }

/* ------------------------------------------------------------
   B10. FOOTER — consistent every page (footer.css + site-polish)
   ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--tt-line) !important;
  background: var(--tt-bg-raise) !important;
  box-shadow: none !important;
}
.site-footer h2 {
  font-family: var(--tt-mono) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--tt-dim) !important;
}
.site-footer-logo { color: var(--tt-text) !important; font-family: var(--tt-mono) !important; font-weight: 600 !important; }
.site-footer-note, .site-footer-small { color: var(--tt-dim) !important; }
.site-footer-links a { color: var(--tt-dim) !important; }
.site-footer-links a:hover { color: var(--tt-amber) !important; }
.site-footer-bottom { border-top: 1px solid var(--tt-line-soft) !important; }
.site-footer-bottom-links a { color: var(--tt-dim) !important; }
.site-footer-bottom-links a:hover { color: var(--tt-amber) !important; }
.geoip-credit, .geoip-credit a { color: var(--tt-dim) !important; font-size: 11.5px !important; }

/* ------------------------------------------------------------
   B11. PAGE-SPECIFIC HARMONIZATION
   ------------------------------------------------------------ */
/* guide / SEO long-form pages */
blockquote {
  border-left: 2px solid var(--tt-amber-dim) !important;
  background: var(--tt-panel) !important;
  color: var(--tt-dim);
}
hr { border: 0; border-top: 1px solid var(--tt-line) !important; }
pre {
  background: var(--tt-bg-raise) !important;
  border: 1px solid var(--tt-line) !important;
  border-radius: var(--tt-radius-sm) !important;
  color: var(--tt-text) !important;
}
code { color: var(--tt-amber); background: var(--tt-panel-2); border-radius: 3px; padding: 1px 5px; }
pre code { background: transparent; color: var(--tt-text); padding: 0; }

/* node-detail: presence dots / pulse keep semantic colors via vars */
.presence-dot { box-shadow: none !important; }
.pulse-ring { border-color: var(--tt-amber-dim) !important; }

/* home-v2 (if kept staged): align its own css to terminal */
.home-v2-search { border-radius: var(--tt-radius) !important; }
.home-v2-search::before { display: none !important; }
.home-v2-terminal {
  background: var(--tt-bg-raise) !important;
  border: 1px solid var(--tt-line) !important;
  border-radius: var(--tt-radius-sm) !important;
}
.home-v2-terminal-row strong { color: var(--tt-amber) !important; font-weight: 600 !important; }
.home-v2-preview-row {
  border-radius: var(--tt-radius-sm) !important;
  background: var(--tt-panel-2) !important;
  border: 1px solid var(--tt-line-soft) !important;
}
.home-v2-preview-row span { color: var(--tt-amber) !important; font-weight: 600 !important; }
.home-v2-preview-badge {
  color: var(--tt-amber) !important;
  border-color: var(--tt-amber-dim) !important;
  background: rgba(245, 166, 35, 0.07) !important;
  border-radius: var(--tt-radius-sm) !important;
  font-family: var(--tt-mono);
}
.home-v2-mini-map {
  border-radius: var(--tt-radius) !important;
  border: 1px solid var(--tt-line) !important;
  background:
    radial-gradient(circle, var(--tt-line) 1px, transparent 1.5px) 0 0 / 22px 22px,
    var(--tt-panel) !important;
}
.home-v2-honesty-list div {
  border-radius: var(--tt-radius-sm) !important;
  background: var(--tt-panel-2) !important;
  border: 1px solid var(--tt-line-soft) !important;
}

/* toasts */
.toast {
  background: var(--tt-panel-2) !important;
  border: 1px solid var(--tt-line) !important;
  color: var(--tt-text) !important;
  border-radius: var(--tt-radius-sm) !important;
  box-shadow: none !important;
}

/* ------------------------------------------------------------
   B12. RESPONSIVE GUARDS + MOTION
   pages.css owns the breakpoints; these only prevent the theme
   itself from introducing overflow, and honor reduced motion.
   ------------------------------------------------------------ */
@media (max-width: 680px) {
  h1 { font-size: clamp(26px, 8vw, 34px) !important; }
  .nav, .top-nav { overflow-x: auto; }
  .tt-tick { padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* === HOME V1 TERMINAL DASHBOARD START === */
body.terminal-home-v1 {
  --home-bg: #12161c;
  --home-panel: #181d25;
  --home-panel2: #1e242e;
  --home-line: #2a3140;
  --home-line2: #343d4f;
  --home-ink: #d7dde6;
  --home-muted: #8b96a6;
  --home-amber: #f5b83d;
  --home-amber-dim: #c99327;
  --home-green: #5fd08a;
  --home-red: #e0685f;
  --home-mono: var(--tt-mono);
  --home-sans: var(--tt-sans);
  margin: 0;
  background: var(--home-bg);
  color: var(--home-ink);
  font-family: var(--home-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.terminal-home-v1 * { box-sizing: border-box; }

body.terminal-home-v1 a {
  color: var(--home-amber);
  text-decoration: none;
}

body.terminal-home-v1 a:hover { text-decoration: underline; }

body.terminal-home-v1 .mono,
body.terminal-home-v1 table,
body.terminal-home-v1 .terminal-ticker,
body.terminal-home-v1 .terminal-nav,
body.terminal-home-v1 .terminal-search input,
body.terminal-home-v1 .terminal-search button,
body.terminal-home-v1 .terminal-stat,
body.terminal-home-v1 .terminal-node-row,
body.terminal-home-v1 .terminal-fee,
body.terminal-home-v1 .terminal-mempool-line,
body.terminal-home-v1 .terminal-change-item,
body.terminal-home-v1 .terminal-fact-item,
body.terminal-home-v1 .terminal-mini-label,
body.terminal-home-v1 .terminal-block-tiles {
  font-family: var(--home-mono);
  font-variant-numeric: tabular-nums;
}

body.terminal-home-v1 .brand-btc { color: var(--home-amber); }
body.terminal-home-v1 .brand-nodes { color: var(--home-ink); }

.terminal-ticker {
  background: #0d1116;
  border-bottom: 1px solid var(--home-line);
  overflow: hidden;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--home-muted);
  padding: 6px 0;
}

.terminal-ticker-inner {
  display: inline-block;
  animation: terminal-tick 42s linear infinite;
  padding-left: 100%;
}

@keyframes terminal-tick { to { transform: translateX(-100%); } }

@media (prefers-reduced-motion: reduce) {
  .terminal-ticker-inner { animation: none; padding-left: 16px; }
}

.terminal-ticker b { color: var(--home-amber); font-weight: 600; }
.terminal-ticker .sep { color: var(--home-line2); margin: 0 14px; }

.terminal-header {
  border-bottom: 1px solid var(--home-line);
  background: var(--home-bg);
}

.terminal-header-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.terminal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--home-ink);
}

.terminal-brand:hover { text-decoration: none; }

.terminal-coin {
  width: 22px;
  height: 22px;
  background: var(--home-amber);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #12161c;
  font-family: var(--home-mono);
  font-weight: 850;
  font-size: 14px;
}

.terminal-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 600;
}

.terminal-nav a { color: var(--home-muted); }
.terminal-nav a.active,
.terminal-nav a.ok { color: var(--home-amber); }
.terminal-nav a.bad { color: var(--home-red); }
.terminal-nav a:hover { color: var(--home-ink); text-decoration: none; }

.terminal-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 54px 20px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  align-items: stretch;
}

.terminal-eyebrow {
  font-family: var(--home-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-amber);
  margin-bottom: 14px;
  font-weight: 750;
}

.terminal-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 850;
  letter-spacing: -0.015em;
  line-height: 0.96;
  max-width: 650px;
  color: var(--home-ink);
}

.terminal-hero p {
  color: var(--home-muted);
  margin: 16px 0 24px;
  max-width: 640px;
  font-size: 16px;
}

.terminal-hero-actions,
.terminal-command-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.terminal-hero-actions a,
.terminal-command-actions button,
.terminal-mini-label button {
  border: 1px solid var(--home-line2);
  background: var(--home-panel);
  color: var(--home-ink);
  border-radius: 5px;
  padding: 9px 12px;
  font-family: var(--home-mono);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.terminal-hero-actions a.primary {
  background: var(--home-amber);
  color: #12161c;
  border-color: var(--home-amber);
}

.terminal-hero-actions a:hover,
.terminal-command-actions button:hover,
.terminal-mini-label button:hover {
  text-decoration: none;
  border-color: var(--home-amber);
}

.terminal-command-panel,
.terminal-panel,
.terminal-stat,
.terminal-feature,
.terminal-intelligence-panel {
  background: var(--home-panel);
  border: 1px solid var(--home-line);
  border-radius: 6px;
}

.terminal-command-panel {
  align-self: center;
  overflow: hidden;
}

.terminal-search {
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 16px;
  border: 1px solid var(--home-line2);
  background: #11161e;
  border-radius: 6px;
  overflow: hidden;
}

.terminal-search input {
  background: transparent;
  border: 0;
  color: var(--home-ink);
  font-size: 14px;
  padding: 13px 14px;
  min-width: 0;
}

.terminal-search input::placeholder { color: #5c6675; }
.terminal-search input:focus { outline: none; }

.terminal-search button {
  background: var(--home-amber);
  color: #12161c;
  border: 0;
  font-weight: 850;
  font-size: 13px;
  padding: 0 18px;
  cursor: pointer;
}

.terminal-search button:hover { background: var(--home-amber-dim); }

.terminal-command-actions {
  padding: 0 16px 14px;
}

.terminal-source-note {
  color: var(--home-muted);
  font-size: 12.5px;
  border-top: 1px solid var(--home-line);
  padding: 13px 16px 15px;
}

.terminal-stats,
.terminal-two-col,
.terminal-grid,
.terminal-chain-stage,
.terminal-feature-grid,
.terminal-intelligence-panel {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.terminal-stats {
  padding: 0 20px 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.terminal-stat {
  padding: 16px 18px;
  color: inherit;
}

.terminal-stat:hover {
  text-decoration: none;
  border-color: var(--home-line2);
}

.terminal-stat .lbl {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--home-muted);
}

.terminal-stat .val {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: var(--home-ink);
  margin-top: 6px;
}

.terminal-stat .val.amber { color: var(--home-amber); }

.terminal-stat .sub {
  display: block;
  font-size: 12px;
  color: var(--home-muted);
  margin-top: 4px;
}

.terminal-intelligence-panel {
  margin-bottom: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.5fr);
  gap: 18px;
}

.terminal-intelligence-copy h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.terminal-intelligence-copy p {
  margin: 10px 0 16px;
  color: var(--home-ink);
  max-width: 720px;
  font-size: 16px;
}

.terminal-intel-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.terminal-intel-card {
  background: var(--home-panel2);
  border: 1px solid var(--home-line2);
  border-radius: 6px;
  padding: 12px;
}

.terminal-intel-card span {
  display: block;
  color: var(--home-muted);
  font-family: var(--home-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.terminal-intel-card strong {
  display: block;
  color: var(--home-amber);
  font-family: var(--home-mono);
  font-size: 15px;
  margin-top: 4px;
}

.terminal-intel-card small {
  display: block;
  color: var(--home-muted);
  font-size: 11px;
  margin-top: 4px;
}

.terminal-health-box {
  background: linear-gradient(180deg, rgba(245,184,61,.08), rgba(255,255,255,.02));
  border: 1px solid var(--home-line2);
  border-radius: 8px;
  padding: 18px;
}

.terminal-health-box > strong {
  display: block;
  color: var(--home-green);
  font-size: 52px;
  line-height: 0.9;
  font-family: var(--home-mono);
}

.terminal-health-box > span {
  display: block;
  color: var(--home-muted);
  font-family: var(--home-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 7px;
  margin-bottom: 16px;
  text-align: right;
}

.terminal-health-bars {
  display: grid;
  gap: 8px;
}

.terminal-health-bars div {
  display: grid;
  grid-template-columns: 70px 1fr 34px;
  gap: 8px;
  align-items: center;
  color: var(--home-muted);
  font-family: var(--home-mono);
  font-size: 11px;
}

.terminal-health-bars i {
  height: 5px;
  background: #303849;
  border-radius: 999px;
  overflow: hidden;
}

.terminal-health-bars b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--home-amber), var(--home-green));
  border-radius: 999px;
}

.terminal-two-col {
  padding: 0 20px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.terminal-grid {
  padding: 0 20px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 14px;
  align-items: start;
}

.terminal-side-stack { display: grid; gap: 14px; }

.terminal-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--home-line);
}

.terminal-panel-head h2 {
  margin: 0;
  font-size: 13px;
  font-family: var(--home-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--home-ink);
  font-weight: 750;
}

.terminal-panel-head span,
.terminal-panel-head a {
  font-family: var(--home-mono);
  font-size: 11px;
  color: var(--home-green);
  font-weight: 600;
}

.terminal-panel-head .live::before,
.terminal-panel-head span.live::before {
  content: "●";
  margin-right: 6px;
  animation: terminal-blink 2s steps(1) infinite;
}

@keyframes terminal-blink { 50% { opacity: 0.25; } }

.terminal-change-list,
.terminal-fact-list {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.terminal-change-item,
.terminal-fact-item {
  border: 1px solid var(--home-line2);
  background: var(--home-panel2);
  border-radius: 6px;
  padding: 10px 12px;
}

.terminal-change-item.ok,
.terminal-fact-item:first-child {
  border-color: rgba(95, 208, 138, 0.35);
}

.terminal-change-item strong,
.terminal-fact-item strong {
  display: block;
  color: var(--home-ink);
  font-size: 13px;
  margin-bottom: 3px;
}

.terminal-change-item span,
.terminal-fact-item span {
  display: block;
  color: var(--home-muted);
  font-size: 11.5px;
}

.terminal-table-wrap { overflow-x: auto; }

.terminal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.terminal-table th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--home-muted);
  text-align: left;
  font-weight: 500;
  padding: 10px 18px;
  border-bottom: 1px solid var(--home-line);
}

.terminal-table td {
  padding: 10px 18px;
  border-bottom: 1px solid var(--home-line);
  color: var(--home-ink);
}

.terminal-table tr:last-child td { border-bottom: 0; }
.terminal-table tr { cursor: pointer; }
.terminal-table tr:hover td { background: rgba(245, 184, 61, 0.045); }
.terminal-table td.h { color: var(--home-amber); }
.terminal-table .dim,
.terminal-table td.dim { color: var(--home-muted); }

.tip-label {
  display: inline-block;
  color: #12161c;
  background: var(--home-amber);
  border-radius: 3px;
  padding: 1px 4px;
  margin-right: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.terminal-fees {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 18px;
}

.terminal-fee {
  background: var(--home-panel2);
  border: 1px solid var(--home-line2);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}

.terminal-fee span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--home-muted);
}

.terminal-fee strong {
  display: block;
  font-size: 20px;
  font-weight: 750;
  color: var(--home-amber);
  margin-top: 4px;
}

.terminal-fee small {
  display: block;
  font-size: 11px;
  color: var(--home-muted);
}

.terminal-mempool-line {
  padding: 0 18px 16px;
  font-size: 12.5px;
  color: var(--home-muted);
}

.terminal-mempool-line b { color: var(--home-ink); font-weight: 750; }

.terminal-node-list { padding: 8px 0; }

.terminal-node-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--home-line);
}

.terminal-node-row:last-child { border-bottom: 0; }
.terminal-node-row span { color: var(--home-muted); }
.terminal-node-row strong {
  color: var(--home-ink);
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.terminal-chain-stage { padding: 0 20px 14px; }

.terminal-stage-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 16px;
}

.terminal-mini-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--home-muted);
  font-size: 12px;
  margin-bottom: 9px;
}

.terminal-mini-label strong { color: var(--home-ink); }
.terminal-mini-label button {
  padding: 5px 8px;
  font-size: 10.5px;
}

.terminal-mempool-blocks {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  background: var(--home-panel2);
  border: 1px solid var(--home-line2);
  border-radius: 7px;
  padding: 12px;
  min-height: 124px;
}

.terminal-mempool-blocks span {
  display: block;
  height: 14px;
  border-radius: 3px;
  background: #303849;
  border: 1px solid #3b465b;
}

.terminal-mempool-blocks span.warm {
  background: rgba(245, 184, 61, 0.7);
  border-color: rgba(245, 184, 61, 0.9);
}

.terminal-mempool-blocks span.hot {
  background: linear-gradient(90deg, var(--home-amber), var(--home-green));
  border-color: rgba(95, 208, 138, 0.8);
}

.terminal-block-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.terminal-block-tiles a {
  background: var(--home-panel2);
  border: 1px solid var(--home-line2);
  border-radius: 7px;
  padding: 11px;
  color: var(--home-ink);
}

.terminal-block-tiles a:hover {
  text-decoration: none;
  border-color: var(--home-amber);
}

.terminal-block-tiles a.tip {
  border-color: rgba(245, 184, 61, 0.55);
}

.terminal-block-tiles span {
  display: block;
  color: var(--home-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.terminal-block-tiles strong {
  display: block;
  color: var(--home-amber);
  margin-top: 3px;
}

.terminal-block-tiles small {
  display: block;
  color: var(--home-muted);
  margin-top: 4px;
  font-size: 11px;
}

.terminal-feature-grid {
  padding: 0 20px 58px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.terminal-feature {
  padding: 16px 18px;
  min-height: 130px;
  color: inherit;
}

.terminal-feature:hover {
  text-decoration: none;
  border-color: var(--home-line2);
}

.terminal-feature span {
  display: block;
  font-family: var(--home-mono);
  color: var(--home-amber);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.terminal-feature strong {
  display: block;
  color: var(--home-ink);
  font-weight: 750;
  margin-bottom: 6px;
}

.terminal-feature small {
  display: block;
  color: var(--home-muted);
  font-size: 12px;
}

.terminal-footer {
  border-top: 1px solid var(--home-line);
  color: var(--home-muted);
  font-size: 13px;
}

.terminal-footer > div {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.terminal-footer .mono { font-size: 12px; }

@media (max-width: 940px) {
  .terminal-hero,
  .terminal-intelligence-panel,
  .terminal-two-col,
  .terminal-grid,
  .terminal-stage-grid {
    grid-template-columns: 1fr;
  }

  .terminal-stats,
  .terminal-feature-grid,
  .terminal-intel-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .terminal-header-wrap { gap: 14px; }
  .terminal-nav { gap: 12px; font-size: 13px; }
  .terminal-hero { padding-top: 36px; }
  .terminal-hero h1 { font-size: 38px; }
  .terminal-search { grid-template-columns: 1fr; }
  .terminal-search button { min-height: 44px; }

  .terminal-stats,
  .terminal-feature-grid,
  .terminal-intel-cards {
    grid-template-columns: 1fr;
  }

  .terminal-fees,
  .terminal-block-tiles {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .terminal-fee { padding: 10px 6px; }
  .terminal-fee strong { font-size: 17px; }
}
/* === HOME V1 TERMINAL DASHBOARD END === */


/* === HOME V1 CIRCLED CLEANUP OVERRIDES === */
body.terminal-home-v1 .terminal-hero-actions a {
  background: var(--home-panel);
  color: var(--home-amber);
  border-color: var(--home-line2);
  padding: 8px 11px;
}

body.terminal-home-v1 .terminal-hero-actions a.primary {
  background: var(--home-panel);
  color: var(--home-amber);
  border-color: rgba(245, 184, 61, 0.55);
}

body.terminal-home-v1 .terminal-hero-actions a:hover {
  background: var(--home-panel2);
  border-color: var(--home-amber);
}

body.terminal-home-v1 .terminal-mempool-blocks {
  display: block;
  min-height: 0;
  padding: 14px;
}

body.terminal-home-v1 .terminal-mempool-blocks .terminal-pressure-track {
  height: 16px;
  background: #303849;
  border: 1px solid #3b465b;
  border-radius: 999px;
  overflow: hidden;
}

body.terminal-home-v1 .terminal-mempool-blocks .terminal-pressure-track b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--home-green), var(--home-amber));
  border-radius: 999px;
}

body.terminal-home-v1 .terminal-mempool-blocks .terminal-pressure-scale {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

body.terminal-home-v1 .terminal-mempool-blocks .terminal-pressure-scale span {
  display: inline;
  height: auto;
  border: 0;
  background: transparent;
  color: var(--home-muted);
  font-family: var(--home-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.terminal-home-v1 .terminal-pressure-caption {
  color: var(--home-muted);
  font-family: var(--home-mono);
  font-size: 11.5px;
  margin-top: 9px;
}

body.terminal-home-v1 .terminal-node-row strong {
  max-width: 58%;
}
/* === END HOME V1 CIRCLED CLEANUP OVERRIDES === */

/* === HOME V1 USEFUL DATA PASS === */
body.terminal-home-v1 .terminal-fees.useful-fees {
  grid-template-columns: repeat(4, 1fr);
}

body.terminal-home-v1 .terminal-block-marquee {
  overflow: hidden;
  position: relative;
}

body.terminal-home-v1 .terminal-block-strip {
  display: flex;
  gap: 9px;
  width: max-content;
  animation: terminal-block-scroll 36s linear infinite;
}

body.terminal-home-v1 .terminal-block-marquee:hover .terminal-block-strip {
  animation-play-state: paused;
}

@keyframes terminal-block-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  body.terminal-home-v1 .terminal-block-strip {
    animation: none;
    flex-wrap: wrap;
  }
}

body.terminal-home-v1 .terminal-block-strip a {
  min-width: 155px;
}

body.terminal-home-v1 .terminal-feature-grid {
  grid-template-columns: repeat(5, 1fr);
}

body.terminal-home-v1 .terminal-footer {
  background: #0d1116;
}

body.terminal-home-v1 .terminal-footer-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 20px 24px;
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(140px, 0.75fr));
  gap: 22px;
}

body.terminal-home-v1 .terminal-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--home-ink);
  font-weight: 850;
  margin-bottom: 10px;
}

body.terminal-home-v1 .terminal-footer-brand:hover {
  text-decoration: none;
}

body.terminal-home-v1 .terminal-footer p {
  color: var(--home-muted);
  max-width: 420px;
  margin: 0;
}

body.terminal-home-v1 .terminal-footer h2 {
  margin: 0 0 9px;
  color: var(--home-amber);
  font-family: var(--home-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.terminal-home-v1 .terminal-footer section a:not(.terminal-footer-brand) {
  display: block;
  color: var(--home-muted);
  font-family: var(--home-mono);
  font-size: 12.5px;
  padding: 3px 0;
}

body.terminal-home-v1 .terminal-footer section a:not(.terminal-footer-brand):hover {
  color: var(--home-ink);
  text-decoration: none;
}

body.terminal-home-v1 .terminal-footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px 22px;
  border-top: 1px solid var(--home-line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--home-muted);
}

@media (max-width: 980px) {
  body.terminal-home-v1 .terminal-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  body.terminal-home-v1 .terminal-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  body.terminal-home-v1 .terminal-fees.useful-fees,
  body.terminal-home-v1 .terminal-feature-grid,
  body.terminal-home-v1 .terminal-footer-grid {
    grid-template-columns: 1fr;
  }

  body.terminal-home-v1 .terminal-block-strip {
    animation-duration: 48s;
  }
}
/* === END HOME V1 USEFUL DATA PASS === */

/* === HOME V1 PRESERVE HERO + USEFUL DATA === */
body.terminal-home-v1 .terminal-stats-five {
  grid-template-columns: repeat(5, 1fr);
}

body.terminal-home-v1 .terminal-fees.useful-fees {
  grid-template-columns: repeat(4, 1fr);
}

body.terminal-home-v1 .terminal-block-marquee {
  overflow: hidden;
  position: relative;
}

body.terminal-home-v1 .terminal-block-strip {
  display: flex;
  gap: 9px;
  width: max-content;
  animation: terminal-block-scroll 36s linear infinite;
}

body.terminal-home-v1 .terminal-block-marquee:hover .terminal-block-strip {
  animation-play-state: paused;
}

@keyframes terminal-block-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

body.terminal-home-v1 .terminal-block-strip a {
  min-width: 155px;
}

body.terminal-home-v1 .terminal-feature-grid {
  grid-template-columns: repeat(5, 1fr);
}

body.terminal-home-v1 .terminal-footer {
  background: #0d1116;
}

body.terminal-home-v1 .terminal-footer-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 20px 24px;
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(140px, 0.75fr));
  gap: 22px;
}

body.terminal-home-v1 .terminal-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--home-ink);
  font-weight: 850;
  margin-bottom: 10px;
}

body.terminal-home-v1 .terminal-footer-brand:hover {
  text-decoration: none;
}

body.terminal-home-v1 .terminal-footer p {
  color: var(--home-muted);
  max-width: 420px;
  margin: 0;
}

body.terminal-home-v1 .terminal-footer h2 {
  margin: 0 0 9px;
  color: var(--home-amber);
  font-family: var(--home-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.terminal-home-v1 .terminal-footer section a:not(.terminal-footer-brand) {
  display: block;
  color: var(--home-muted);
  font-family: var(--home-mono);
  font-size: 12.5px;
  padding: 3px 0;
}

body.terminal-home-v1 .terminal-footer section a:not(.terminal-footer-brand):hover {
  color: var(--home-ink);
  text-decoration: none;
}

body.terminal-home-v1 .terminal-footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px 22px;
  border-top: 1px solid var(--home-line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--home-muted);
}

@media (prefers-reduced-motion: reduce) {
  body.terminal-home-v1 .terminal-block-strip {
    animation: none;
    flex-wrap: wrap;
  }
}

@media (max-width: 980px) {
  body.terminal-home-v1 .terminal-stats-five,
  body.terminal-home-v1 .terminal-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  body.terminal-home-v1 .terminal-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  body.terminal-home-v1 .terminal-stats-five,
  body.terminal-home-v1 .terminal-fees.useful-fees,
  body.terminal-home-v1 .terminal-feature-grid,
  body.terminal-home-v1 .terminal-footer-grid {
    grid-template-columns: 1fr;
  }

  body.terminal-home-v1 .terminal-block-strip {
    animation-duration: 48s;
  }
}
/* === END HOME V1 PRESERVE HERO + USEFUL DATA === */

/* === HOME V1 BLOCKS + FEES LAYOUT FIX === */
body.terminal-home-v1 .terminal-grid {
  align-items: start !important;
}

body.terminal-home-v1 .terminal-grid > .terminal-panel {
  align-self: start !important;
}

body.terminal-home-v1 .terminal-table-wrap {
  max-height: 430px;
  overflow-y: auto;
  overflow-x: auto;
}

body.terminal-home-v1 .terminal-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--home-panel);
}

body.terminal-home-v1 .terminal-table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.terminal-home-v1 .terminal-table-wrap::-webkit-scrollbar-track {
  background: #11161e;
}

body.terminal-home-v1 .terminal-table-wrap::-webkit-scrollbar-thumb {
  background: var(--home-line2);
  border-radius: 999px;
}

body.terminal-home-v1 .terminal-side-stack .terminal-fees.useful-fees {
  grid-template-columns: repeat(2, 1fr);
}

body.terminal-home-v1 .terminal-side-stack .terminal-fee strong {
  font-size: 22px;
}

body.terminal-home-v1 .terminal-mempool-line {
  line-height: 1.55;
}
/* === END HOME V1 BLOCKS + FEES LAYOUT FIX === */

/* === HOME V1 STATUS PILL POSITION ONLY === */
body.terminal-home-v1 .terminal-header-wrap {
  display: flex;
  align-items: center;
}

body.terminal-home-v1 .terminal-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

body.terminal-home-v1 .terminal-nav #connectionPill {
  margin-left: auto;
  white-space: nowrap;
  border: 1px solid rgba(95, 208, 138, 0.45);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(95, 208, 138, 0.075);
}

body.terminal-home-v1 .terminal-nav #connectionPill.bad {
  border-color: rgba(224, 104, 95, 0.55);
  background: rgba(224, 104, 95, 0.075);
}

@media (max-width: 760px) {
  body.terminal-home-v1 .terminal-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  body.terminal-home-v1 .terminal-nav #connectionPill {
    margin-left: 0;
  }
}
/* === END HOME V1 STATUS PILL POSITION ONLY === */

/* === HOME V1 WEEK BLOCK OFFSET LAZY LOAD === */
body.terminal-home-v1 .terminal-table-wrap {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
  overscroll-behavior: contain;
}

body.terminal-home-v1 .terminal-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--home-panel);
}

body.terminal-home-v1 .terminal-table-foot {
  border-top: 1px solid var(--home-line);
  color: var(--home-muted);
  font-family: var(--home-mono);
  font-size: 12px;
  padding: 10px 18px 12px;
  background: rgba(13, 17, 22, 0.28);
}

body.terminal-home-v1 .terminal-table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.terminal-home-v1 .terminal-table-wrap::-webkit-scrollbar-track {
  background: #11161e;
}

body.terminal-home-v1 .terminal-table-wrap::-webkit-scrollbar-thumb {
  background: var(--home-line2);
  border-radius: 999px;
}
/* === END HOME V1 WEEK BLOCK OFFSET LAZY LOAD === */

/* === HOME V1 DAILY BRIEF + THREE FEE TIERS === */
body.terminal-home-v1 .terminal-stat .why {
  display: block;
  margin-top: 7px;
  color: var(--home-muted);
  font-size: 11px;
  line-height: 1.35;
  opacity: 0.9;
}

body.terminal-home-v1 .terminal-side-stack .terminal-fees.fee-tiers-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.terminal-home-v1 .terminal-side-stack .terminal-fees.fee-tiers-three .terminal-fee {
  min-height: 104px;
  justify-content: center;
}

body.terminal-home-v1 .terminal-side-stack .terminal-fees.fee-tiers-three .terminal-fee span {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

body.terminal-home-v1 .terminal-side-stack .terminal-fees.fee-tiers-three .terminal-fee strong {
  font-size: clamp(24px, 3vw, 34px);
}

@media (max-width: 920px) {
  body.terminal-home-v1 .terminal-side-stack .terminal-fees.fee-tiers-three {
    grid-template-columns: 1fr;
  }
}
/* === END HOME V1 DAILY BRIEF + THREE FEE TIERS === */

/* === LIGHT SITEWIDE V1 STYLE HOOK === */
body.terminal-site {
  background: #080c12;
  color: #dbe7f3;
}

body.terminal-site a {
  color: #f5b83d;
}

body.terminal-site header,
body.terminal-site .site-header,
body.terminal-site .topbar,
body.terminal-site nav {
  background-color: rgba(13, 17, 22, 0.94);
  border-color: rgba(255, 255, 255, 0.10);
}

body.terminal-site main,
body.terminal-site .shell,
body.terminal-site .container {
  color: #dbe7f3;
}

body.terminal-site .card,
body.terminal-site article,
body.terminal-site section.panel,
body.terminal-site .panel {
  border-color: rgba(255, 255, 255, 0.11);
}

body.terminal-site table {
  color: #dbe7f3;
}

body.terminal-site code,
body.terminal-site pre {
  background: rgba(13, 17, 22, 0.72);
  color: #dbe7f3;
}
/* === END LIGHT SITEWIDE V1 STYLE HOOK === */

/* === SITEWIDE HOMEPAGE SHELL PASS === */
body.terminal-site {
  --home-bg: #12161c;
  --home-panel: #181d25;
  --home-panel2: #1e242e;
  --home-line: #2a3140;
  --home-line2: #343d4f;
  --home-ink: #d7dde6;
  --home-muted: #8b96a6;
  --home-amber: #f5b83d;
  --home-amber-dim: #c99327;
  --home-green: #5fd08a;
  --home-red: #e0685f;
  --home-mono: var(--tt-mono);
  --home-sans: var(--tt-sans);
  background: var(--home-bg) !important;
  color: var(--home-ink) !important;
}

body.terminal-site .sitewide-terminal-header {
  background: var(--home-bg) !important;
}

body.terminal-site .sitewide-terminal-ticker {
  background: #0d1116 !important;
  border-bottom: 1px solid var(--home-line) !important;
}

body.terminal-site .terminal-brand,
body.terminal-site .terminal-brand:hover {
  color: var(--home-ink) !important;
  text-decoration: none !important;
}

body.terminal-site .terminal-nav a {
  color: var(--home-muted) !important;
  font-family: var(--home-mono) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

body.terminal-site .terminal-nav a.active,
body.terminal-site .terminal-nav a[aria-current="page"],
body.terminal-site .terminal-nav a.ok {
  color: var(--home-amber) !important;
}

body.terminal-site .terminal-nav a:hover {
  color: var(--home-ink) !important;
}

body.terminal-site .terminal-page-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 20px 30px;
}

body.terminal-site .terminal-page-hero .explorer-hero-clean,
body.terminal-site .terminal-page-hero .nodes-hero-copy,
body.terminal-site .terminal-page-hero .hero-copy,
body.terminal-site .terminal-page-hero > section,
body.terminal-site .terminal-page-hero > div {
  max-width: 760px;
}

body.terminal-site .terminal-page-hero h1 {
  margin: 0;
  color: var(--home-ink) !important;
  font-size: clamp(34px, 5vw, 54px) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.015em !important;
  font-weight: 850 !important;
}

body.terminal-site .terminal-page-hero .lead,
body.terminal-site .terminal-page-hero p {
  color: var(--home-muted) !important;
  font-size: 16px;
  max-width: 720px;
}

body.terminal-site main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 56px;
}

body.terminal-site .panel,
body.terminal-site .card,
body.terminal-site .search-card,
body.terminal-site .node-detail-card,
body.terminal-site .seo-info-card,
body.terminal-site .guide-card {
  background: var(--home-panel) !important;
  border: 1px solid var(--home-line) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

body.terminal-site .panel-head {
  border-bottom-color: var(--home-line) !important;
}

body.terminal-site .eyebrow,
body.terminal-site .terminal-eyebrow {
  color: var(--home-amber) !important;
  font-family: var(--home-mono) !important;
  letter-spacing: 0.14em !important;
}

body.terminal-site table,
body.terminal-site td,
body.terminal-site th {
  font-family: var(--home-mono) !important;
  font-variant-numeric: tabular-nums;
}

body.terminal-site thead th {
  color: var(--home-muted) !important;
  border-bottom: 1px solid var(--home-line) !important;
}

body.terminal-site tbody td {
  border-bottom: 1px solid rgba(42, 49, 64, 0.72) !important;
}

body.terminal-site .terminal-footer {
  margin-top: 28px;
}

body.terminal-site .terminal-footer a {
  color: var(--home-muted) !important;
}

body.terminal-site .terminal-footer a:hover {
  color: var(--home-amber) !important;
}

@media (max-width: 760px) {
  body.terminal-site .terminal-header-wrap {
    align-items: flex-start;
  }

  body.terminal-site .terminal-nav {
    width: 100%;
    gap: 12px;
  }

  body.terminal-site .terminal-page-hero {
    padding-top: 34px;
  }
}
/* === END SITEWIDE HOMEPAGE SHELL PASS === */

/* === SITEWIDE HOME THEME REPAIR === */
body.terminal-site {
  --home-bg: #12161c;
  --home-panel: #181d25;
  --home-panel2: #1e242e;
  --home-line: #2a3140;
  --home-line2: #343d4f;
  --home-ink: #d7dde6;
  --home-muted: #8b96a6;
  --home-amber: #f5b83d;
  --home-amber-dim: #c99327;
  --home-green: #5fd08a;
  --home-red: #e0685f;
  --home-mono: var(--tt-mono);
  --home-sans: var(--tt-sans);
  margin: 0 !important;
  background: var(--home-bg) !important;
  color: var(--home-ink) !important;
  font-family: var(--home-sans) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  -webkit-font-smoothing: antialiased;
}

body.terminal-site *,
body.terminal-site *::before,
body.terminal-site *::after {
  box-sizing: border-box;
}

body.terminal-site a {
  text-decoration: none;
}

body.terminal-site .terminal-ticker,
body.terminal-site .sitewide-terminal-ticker {
  background: #0d1116 !important;
  border-bottom: 1px solid var(--home-line) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  font-family: var(--home-mono) !important;
  font-size: 12.5px !important;
  color: var(--home-muted) !important;
  padding: 6px 0 !important;
}

body.terminal-site .terminal-ticker-inner {
  display: inline-block !important;
  animation: terminal-tick 42s linear infinite;
  padding-left: 100%;
}

body.terminal-site .terminal-ticker b {
  color: var(--home-amber) !important;
  font-weight: 600 !important;
}

body.terminal-site .terminal-ticker .sep {
  color: var(--home-line2) !important;
  margin: 0 14px !important;
}

body.terminal-site .terminal-header,
body.terminal-site .sitewide-terminal-header {
  border-bottom: 1px solid var(--home-line) !important;
  background: var(--home-bg) !important;
  box-shadow: none !important;
  min-height: 0 !important;
  padding: 0 !important;
}

body.terminal-site .terminal-header-wrap {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 14px 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 26px !important;
  flex-wrap: wrap !important;
}

body.terminal-site .terminal-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-weight: 850 !important;
  font-size: 17px !important;
  letter-spacing: 0.02em !important;
  color: var(--home-ink) !important;
}

body.terminal-site .terminal-brand:hover {
  text-decoration: none !important;
}

body.terminal-site .terminal-coin {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  background: var(--home-amber) !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #12161c !important;
  font-family: var(--home-mono) !important;
  font-weight: 850 !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

body.terminal-site .brand-btc {
  color: var(--home-amber) !important;
}

body.terminal-site .brand-nodes {
  color: var(--home-ink) !important;
}

body.terminal-site .terminal-nav {
  display: flex !important;
  gap: 18px !important;
  font-size: 14px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  font-weight: 600 !important;
  font-family: var(--home-mono) !important;
}

body.terminal-site .terminal-nav a {
  color: var(--home-muted) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  font-family: var(--home-mono) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

body.terminal-site .terminal-nav a.active,
body.terminal-site .terminal-nav a[aria-current="page"],
body.terminal-site .terminal-nav a.ok,
body.terminal-site .terminal-nav a.online {
  color: var(--home-amber) !important;
}

body.terminal-site .terminal-nav a.bad {
  color: var(--home-red) !important;
}

body.terminal-site .terminal-nav a:hover {
  color: var(--home-ink) !important;
  text-decoration: none !important;
}

body.terminal-site main,
body.terminal-site .page-shell,
body.terminal-site main.page-shell {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 0 20px 56px !important;
}

body.terminal-site .terminal-page-hero {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 48px 20px 30px !important;
}

body.terminal-site main .terminal-page-hero {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.terminal-site .terminal-page-hero .explorer-hero-clean,
body.terminal-site .terminal-page-hero .nodes-hero-copy,
body.terminal-site .terminal-page-hero .hero-copy,
body.terminal-site .terminal-page-hero > section,
body.terminal-site .terminal-page-hero > div {
  max-width: 760px !important;
}

body.terminal-site .terminal-page-hero h1,
body.terminal-site .page-hero h1,
body.terminal-site h1 {
  color: var(--home-ink) !important;
  font-family: var(--home-sans) !important;
  font-size: clamp(34px, 5vw, 54px) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.015em !important;
  font-weight: 850 !important;
}

body.terminal-site .terminal-page-hero .lead,
body.terminal-site .terminal-page-hero p,
body.terminal-site .page-hero p,
body.terminal-site .lead,
body.terminal-site .section-note {
  color: var(--home-muted) !important;
}

body.terminal-site .eyebrow,
body.terminal-site .terminal-eyebrow {
  color: var(--home-amber) !important;
  font-family: var(--home-mono) !important;
  font-size: 12px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-weight: 750 !important;
}

body.terminal-site .panel,
body.terminal-site .card,
body.terminal-site .search-card,
body.terminal-site .content-card,
body.terminal-site .metric-card,
body.terminal-site .node-detail-card,
body.terminal-site .seo-info-card,
body.terminal-site .seo-related-panel,
body.terminal-site .guide-card,
body.terminal-site .fee-blocks-card,
body.terminal-site .fee-mosaic-card {
  background: var(--home-panel) !important;
  border: 1px solid var(--home-line) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

body.terminal-site .metric-card strong,
body.terminal-site .card strong,
body.terminal-site .atlas-stat strong {
  color: var(--home-amber) !important;
}

body.terminal-site input,
body.terminal-site select,
body.terminal-site textarea {
  background: #11161e !important;
  color: var(--home-ink) !important;
  border: 1px solid var(--home-line2) !important;
  border-radius: 6px !important;
  font-family: var(--home-mono) !important;
}

body.terminal-site button,
body.terminal-site .big-link,
body.terminal-site .ghost {
  border: 1px solid var(--home-line2) !important;
  background: var(--home-panel) !important;
  color: var(--home-ink) !important;
  border-radius: 5px !important;
  font-family: var(--home-mono) !important;
  box-shadow: none !important;
}

body.terminal-site button:hover,
body.terminal-site .big-link:hover,
body.terminal-site .ghost:hover {
  border-color: var(--home-amber) !important;
  color: var(--home-amber) !important;
}

body.terminal-site table,
body.terminal-site td,
body.terminal-site th,
body.terminal-site code,
body.terminal-site pre,
body.terminal-site .mono {
  font-family: var(--home-mono) !important;
  font-variant-numeric: tabular-nums;
}

body.terminal-site thead th {
  color: var(--home-muted) !important;
  background: transparent !important;
  border-bottom: 1px solid var(--home-line) !important;
}

body.terminal-site tbody td {
  border-bottom: 1px solid rgba(42, 49, 64, 0.72) !important;
}

body.terminal-site .terminal-footer {
  background: #0d1116 !important;
  border-top: 1px solid var(--home-line) !important;
  margin-top: 28px !important;
}

body.terminal-site .terminal-footer-grid {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 30px 20px 24px !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(140px, 0.75fr)) !important;
  gap: 22px !important;
}

body.terminal-site .terminal-footer-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--home-ink) !important;
  font-weight: 850 !important;
  margin-bottom: 10px !important;
}

body.terminal-site .terminal-footer-brand:hover {
  text-decoration: none !important;
}

body.terminal-site .terminal-footer p {
  color: var(--home-muted) !important;
  max-width: 420px !important;
  margin: 0 !important;
}

body.terminal-site .terminal-footer h2 {
  margin: 0 0 9px !important;
  color: var(--home-amber) !important;
  font-family: var(--home-mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

body.terminal-site .terminal-footer section a:not(.terminal-footer-brand) {
  display: block !important;
  color: var(--home-muted) !important;
  font-family: var(--home-mono) !important;
  font-size: 12.5px !important;
  padding: 3px 0 !important;
}

body.terminal-site .terminal-footer section a:not(.terminal-footer-brand):hover {
  color: var(--home-ink) !important;
  text-decoration: none !important;
}

body.terminal-site .terminal-footer-bottom {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 14px 20px 22px !important;
  border-top: 1px solid var(--home-line) !important;
  display: flex !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
  color: var(--home-muted) !important;
  font-family: var(--home-mono) !important;
}

body.terminal-site .chart-toolbar {
  display: none !important;
}

@media (max-width: 980px) {
  body.terminal-site .terminal-footer-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 620px) {
  body.terminal-site .terminal-footer-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  body.terminal-site .terminal-header-wrap {
    align-items: flex-start !important;
  }

  body.terminal-site .terminal-nav {
    width: 100% !important;
    gap: 12px !important;
  }

  body.terminal-site .terminal-page-hero {
    padding-top: 34px !important;
  }
}
/* === END SITEWIDE HOME THEME REPAIR === */

/* === HOME V1 CONTRACT SITEWIDE FINAL === */
body.terminal-home-v1.terminal-site {
  --home-bg: #12161c;
  --home-panel: #181d25;
  --home-panel2: #1e242e;
  --home-line: #2a3140;
  --home-line2: #343d4f;
  --home-ink: #d7dde6;
  --home-muted: #8b96a6;
  --home-amber: #f5b83d;
  --home-amber-dim: #c99327;
  --home-green: #5fd08a;
  --home-red: #e0685f;
  --home-mono: var(--tt-mono);
  --home-sans: var(--tt-sans);
  margin: 0 !important;
  background: var(--home-bg) !important;
  color: var(--home-ink) !important;
  font-family: var(--home-sans) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  -webkit-font-smoothing: antialiased;
}

/* Same header/ticker/nav dimensions as home-v1. */
body.terminal-home-v1.terminal-site .terminal-ticker {
  background: #0d1116 !important;
  border-bottom: 1px solid var(--home-line) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  font-family: var(--home-mono) !important;
  font-size: 12.5px !important;
  color: var(--home-muted) !important;
  padding: 6px 0 !important;
}

body.terminal-home-v1.terminal-site .terminal-ticker-inner {
  display: inline-block !important;
  animation: terminal-tick 42s linear infinite;
  padding-left: 100%;
}

body.terminal-home-v1.terminal-site .terminal-header {
  border-bottom: 1px solid var(--home-line) !important;
  background: var(--home-bg) !important;
  box-shadow: none !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.terminal-home-v1.terminal-site .terminal-header-wrap {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 14px 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 26px !important;
  flex-wrap: wrap !important;
}

body.terminal-home-v1.terminal-site .terminal-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-family: var(--home-sans) !important;
  font-weight: 850 !important;
  font-size: 17px !important;
  letter-spacing: 0.02em !important;
  color: var(--home-ink) !important;
}

body.terminal-home-v1.terminal-site .terminal-coin {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  background: var(--home-amber) !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #12161c !important;
  font-family: var(--home-mono) !important;
  font-weight: 850 !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

body.terminal-home-v1.terminal-site .terminal-nav {
  display: flex !important;
  gap: 18px !important;
  font-size: 14px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  font-weight: 600 !important;
  font-family: var(--home-mono) !important;
}

body.terminal-home-v1.terminal-site .terminal-nav a {
  color: var(--home-muted) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  font-family: var(--home-mono) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

body.terminal-home-v1.terminal-site .terminal-nav a.active,
body.terminal-home-v1.terminal-site .terminal-nav a[aria-current="page"],
body.terminal-home-v1.terminal-site .terminal-nav a.ok {
  color: var(--home-amber) !important;
}

body.terminal-home-v1.terminal-site .terminal-nav a.bad {
  color: var(--home-red) !important;
}

body.terminal-home-v1.terminal-site .terminal-nav a:hover {
  color: var(--home-ink) !important;
  text-decoration: none !important;
}

/* Kill old display-font feel and force home-v1 type scale. */
body.terminal-home-v1.terminal-site h1 {
  color: var(--home-ink) !important;
  font-family: var(--home-sans) !important;
  font-size: clamp(34px, 5vw, 54px) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.015em !important;
  font-weight: 850 !important;
}

body.terminal-home-v1.terminal-site h2,
body.terminal-home-v1.terminal-site h3 {
  color: var(--home-ink) !important;
  font-family: var(--home-sans) !important;
}

body.terminal-home-v1.terminal-site p,
body.terminal-home-v1.terminal-site .lead,
body.terminal-home-v1.terminal-site .section-note,
body.terminal-home-v1.terminal-site small {
  color: var(--home-muted) !important;
}

body.terminal-home-v1.terminal-site .eyebrow,
body.terminal-home-v1.terminal-site .terminal-eyebrow {
  color: var(--home-amber) !important;
  font-family: var(--home-mono) !important;
  font-size: 12px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-weight: 750 !important;
}

/* Preserve page content width without using old hero/nav look. */
body.terminal-home-v1.terminal-site main,
body.terminal-home-v1.terminal-site main.page-shell,
body.terminal-home-v1.terminal-site .page-shell {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 0 20px 56px !important;
}

body.terminal-home-v1.terminal-site .terminal-page-hero {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 48px 20px 30px !important;
}

body.terminal-home-v1.terminal-site main .terminal-page-hero {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Same flat panel language as home-v1. */
body.terminal-home-v1.terminal-site .panel,
body.terminal-home-v1.terminal-site .card,
body.terminal-home-v1.terminal-site .search-card,
body.terminal-home-v1.terminal-site .content-card,
body.terminal-home-v1.terminal-site .metric-card,
body.terminal-home-v1.terminal-site .node-detail-card,
body.terminal-home-v1.terminal-site .seo-info-card,
body.terminal-home-v1.terminal-site .seo-related-panel,
body.terminal-home-v1.terminal-site .guide-card,
body.terminal-home-v1.terminal-site .fee-blocks-card,
body.terminal-home-v1.terminal-site .fee-mosaic-card {
  background: var(--home-panel) !important;
  border: 1px solid var(--home-line) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

/* Same footer as home-v1, not old footer.css. */
body.terminal-home-v1.terminal-site .terminal-footer {
  background: #0d1116 !important;
  border-top: 1px solid var(--home-line) !important;
  margin-top: 28px !important;
}

body.terminal-home-v1.terminal-site .terminal-footer-grid {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 30px 20px 24px !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(140px, 0.75fr)) !important;
  gap: 22px !important;
}

body.terminal-home-v1.terminal-site .terminal-footer-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--home-ink) !important;
  font-weight: 850 !important;
  margin-bottom: 10px !important;
}

body.terminal-home-v1.terminal-site .terminal-footer p {
  color: var(--home-muted) !important;
  max-width: 420px !important;
  margin: 0 !important;
}

body.terminal-home-v1.terminal-site .terminal-footer h2 {
  margin: 0 0 9px !important;
  color: var(--home-amber) !important;
  font-family: var(--home-mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

body.terminal-home-v1.terminal-site .terminal-footer section a:not(.terminal-footer-brand) {
  display: block !important;
  color: var(--home-muted) !important;
  font-family: var(--home-mono) !important;
  font-size: 12.5px !important;
  padding: 3px 0 !important;
}

body.terminal-home-v1.terminal-site .terminal-footer section a:not(.terminal-footer-brand):hover {
  color: var(--home-ink) !important;
  text-decoration: none !important;
}

body.terminal-home-v1.terminal-site .terminal-footer-bottom {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 14px 20px 22px !important;
  border-top: 1px solid var(--home-line) !important;
  display: flex !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
  color: var(--home-muted) !important;
  font-family: var(--home-mono) !important;
}

@media (max-width: 980px) {
  body.terminal-home-v1.terminal-site .terminal-footer-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 620px) {
  body.terminal-home-v1.terminal-site .terminal-footer-grid {
    grid-template-columns: 1fr !important;
  }
}
/* === END HOME V1 CONTRACT SITEWIDE FINAL === */

/* === TERMINAL PREVIEW FONT CONTRACT FINAL === */
/* Matches uploaded terminal preview: lighter brand/nav, 15px body, 26-40px h1, 700 weight. */
body.terminal-home-v1,
body.terminal-home-v1.terminal-site {
  --home-bg: #12161c;
  --home-panel: #181d25;
  --home-panel2: #1e242e;
  --home-line: #2a3140;
  --home-line2: #343d4f;
  --home-ink: #d7dde6;
  --home-muted: #8b96a6;
  --home-amber: #f5b83d;
  --home-amber-dim: #c99327;
  --home-green: #5fd08a;
  --home-red: #e0685f;
  --home-mono: var(--tt-mono);
  --home-sans: var(--tt-sans);
  background: var(--home-bg) !important;
  color: var(--home-ink) !important;
  font-family: var(--home-sans) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  -webkit-font-smoothing: antialiased;
}

/* Header/ticker exact preview scale */
body.terminal-home-v1 .terminal-ticker {
  background: #0d1116 !important;
  border-bottom: 1px solid var(--home-line) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  font-family: var(--home-mono) !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  color: var(--home-muted) !important;
  padding: 6px 0 !important;
}

body.terminal-home-v1 .terminal-ticker b {
  color: var(--home-amber) !important;
  font-weight: 600 !important;
}

body.terminal-home-v1 .terminal-header {
  border-bottom: 1px solid var(--home-line) !important;
  background: var(--home-bg) !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

body.terminal-home-v1 .terminal-header-wrap {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 14px 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 26px !important;
  flex-wrap: wrap !important;
}

body.terminal-home-v1 .terminal-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--home-ink) !important;
  font-family: var(--home-sans) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  line-height: 1 !important;
}

body.terminal-home-v1 .terminal-brand:hover {
  text-decoration: none !important;
}

body.terminal-home-v1 .terminal-coin {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  border-radius: 4px !important;
  background: var(--home-amber) !important;
  color: #12161c !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: var(--home-mono) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

body.terminal-home-v1 .terminal-wordmark,
body.terminal-home-v1 .brand-btc,
body.terminal-home-v1 .brand-nodes {
  font-family: var(--home-sans) !important;
  font-weight: 600 !important;
}

body.terminal-home-v1 .brand-btc {
  color: var(--home-amber) !important;
}

body.terminal-home-v1 .brand-nodes {
  color: var(--home-ink) !important;
}

body.terminal-home-v1 .terminal-nav {
  display: flex !important;
  gap: 18px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  font-family: var(--home-sans) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

body.terminal-home-v1 .terminal-nav a {
  color: var(--home-muted) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  font-family: var(--home-sans) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 1.5 !important;
  text-decoration: none !important;
}

body.terminal-home-v1 .terminal-nav a.active,
body.terminal-home-v1 .terminal-nav a[aria-current="page"],
body.terminal-home-v1 .terminal-nav a.ok {
  color: var(--home-amber) !important;
}

body.terminal-home-v1 .terminal-nav a.bad {
  color: var(--home-red) !important;
}

body.terminal-home-v1 .terminal-nav a:hover {
  color: var(--home-ink) !important;
  text-decoration: none !important;
}

/* Uploaded preview headline scale: clamp(26px,4.5vw,40px), 700, -0.01em */
body.terminal-home-v1 h1,
body.terminal-home-v1 .terminal-hero h1,
body.terminal-home-v1 .terminal-page-hero h1,
body.terminal-home-v1 .page-hero h1,
body.terminal-home-v1 .hero-copy h1,
body.terminal-home-v1 .nodes-hero-copy h1,
body.terminal-home-v1 .hashrate-hero h1 {
  color: var(--home-ink) !important;
  font-family: var(--home-sans) !important;
  font-size: clamp(26px, 4.5vw, 40px) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.08 !important;
  max-width: 640px !important;
}

body.terminal-home-v1 h2,
body.terminal-home-v1 h3 {
  color: var(--home-ink) !important;
  font-family: var(--home-sans) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}

body.terminal-home-v1 p,
body.terminal-home-v1 .lead,
body.terminal-home-v1 .section-note,
body.terminal-home-v1 small {
  color: var(--home-muted) !important;
  font-family: var(--home-sans) !important;
  font-weight: 400 !important;
}

body.terminal-home-v1 .terminal-hero p,
body.terminal-home-v1 .terminal-page-hero p,
body.terminal-home-v1 .page-hero p,
body.terminal-home-v1 .hero-copy p,
body.terminal-home-v1 .nodes-hero-copy p,
body.terminal-home-v1 .hashrate-hero p {
  color: var(--home-muted) !important;
  margin: 14px 0 26px !important;
  max-width: 560px !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
}

body.terminal-home-v1 .eyebrow,
body.terminal-home-v1 .terminal-eyebrow {
  font-family: var(--home-mono) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--home-amber) !important;
  margin-bottom: 14px !important;
}

/* Panel/table typography from preview */
body.terminal-home-v1 .panel-head h2,
body.terminal-home-v1 .phead h2,
body.terminal-home-v1 .terminal-panel-head h2 {
  font-size: 13px !important;
  font-family: var(--home-mono) !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--home-ink) !important;
  font-weight: 600 !important;
}

body.terminal-home-v1 table,
body.terminal-home-v1 th,
body.terminal-home-v1 td,
body.terminal-home-v1 code,
body.terminal-home-v1 pre,
body.terminal-home-v1 .mono,
body.terminal-home-v1 .stat .lbl,
body.terminal-home-v1 .stat .val,
body.terminal-home-v1 .stat .sub,
body.terminal-home-v1 .card strong,
body.terminal-home-v1 .metric-card strong {
  font-family: var(--home-mono) !important;
  font-variant-numeric: tabular-nums;
}

body.terminal-home-v1 th {
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--home-muted) !important;
  font-weight: 500 !important;
}

body.terminal-home-v1 .card span,
body.terminal-home-v1 .metric-card span,
body.terminal-home-v1 .terminal-stat .lbl,
body.terminal-home-v1 .atlas-stat span {
  font-family: var(--home-mono) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--home-muted) !important;
}

body.terminal-home-v1 .card strong,
body.terminal-home-v1 .metric-card strong,
body.terminal-home-v1 .terminal-stat .val,
body.terminal-home-v1 .atlas-stat strong {
  font-family: var(--home-mono) !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  color: var(--home-ink) !important;
  letter-spacing: 0 !important;
}

body.terminal-home-v1 .terminal-stat .val.amber,
body.terminal-home-v1 .card.primary strong,
body.terminal-home-v1 .metric-card.primary strong {
  color: var(--home-amber) !important;
}

/* Buttons/search match preview */
body.terminal-home-v1 input,
body.terminal-home-v1 select,
body.terminal-home-v1 textarea {
  font-family: var(--home-mono) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

body.terminal-home-v1 button,
body.terminal-home-v1 .big-link,
body.terminal-home-v1 .ghost,
body.terminal-home-v1 .terminal-hero-actions a,
body.terminal-home-v1 .terminal-command-actions button {
  font-family: var(--home-mono) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

/* Footer typography exactly lighter like preview */
body.terminal-home-v1 .terminal-footer {
  font-size: 13px !important;
  color: var(--home-muted) !important;
}

body.terminal-home-v1 .terminal-footer-brand {
  font-family: var(--home-sans) !important;
  font-weight: 600 !important;
  font-size: 17px !important;
}

body.terminal-home-v1 .terminal-footer p {
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

body.terminal-home-v1 .terminal-footer h2 {
  font-family: var(--home-mono) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
}

body.terminal-home-v1 .terminal-footer section a:not(.terminal-footer-brand) {
  font-family: var(--home-mono) !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
}

body.terminal-home-v1 .terminal-footer-bottom {
  font-family: var(--home-sans) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}
/* === END TERMINAL PREVIEW FONT CONTRACT FINAL === */

/* === GLOBAL PAGE BACKGROUND FROM TICKER === */
/* Use the original ticker dark shade across the whole site. */
html,
body.terminal-home-v1,
body.terminal-home-v1.terminal-site,
body.terminal-site {
  --home-bg: #0d1116 !important;
  background: #0d1116 !important;
}

body.terminal-home-v1 .terminal-ticker,
body.terminal-home-v1.terminal-site .terminal-ticker,
body.terminal-home-v1 .terminal-header,
body.terminal-home-v1.terminal-site .terminal-header,
body.terminal-home-v1 .terminal-footer,
body.terminal-home-v1.terminal-site .terminal-footer {
  background: #0d1116 !important;
}

body.terminal-home-v1 main,
body.terminal-home-v1.terminal-site main,
body.terminal-home-v1 .terminal-page-hero,
body.terminal-home-v1.terminal-site .terminal-page-hero,
body.terminal-home-v1 .terminal-hero,
body.terminal-home-v1.terminal-site .terminal-hero {
  background: transparent !important;
}
/* === END GLOBAL PAGE BACKGROUND FROM TICKER === */

/* ------------------------------------------------------------
   D. TYPE DISCIPLINE — weight + numeral normalization
   Plex ships 400/500/600 here. Anything heavier was being
   synthesized by the browser (smeared strokes, inconsistent
   across OSes). The @font-face `font-weight: 600 900` ranges in
   theme-fonts.css already serve the real SemiBold for every
   700/800/900/950 request, so legacy declarations degrade
   gracefully — but new code should use 400/500/600 only.
   ------------------------------------------------------------ */

/* Headings: SemiBold, calm tracking. The old -0.05/-0.09em
   headline crush reads broken at Plex's proportions. */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* All data surfaces get lining, equal-width figures so live
   numbers don't jitter as they update. */
.mono,
table,
.terminal-ticker,
.terminal-stat-value,
.metric-card strong,
.intelligence-fact strong,
.health-score-value,
.hashrate-table,
.chart-tooltip {
  font-variant-numeric: tabular-nums;
}

/* Buttons and pills: Medium is the ceiling for UI chrome. */
button,
.pill,
.chip,
.metric-switcher button {
  font-weight: 500;
}

/* Homepage latest blocks: vertical scroll + older-block loader */
body.terminal-home-v1 .terminal-table-wrap {
  max-height: 430px;
  overflow: auto;
  border-bottom: 1px solid var(--home-line);
}

body.terminal-home-v1 .terminal-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--home-panel);
}

body.terminal-home-v1 .terminal-table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 18px;
}

body.terminal-home-v1 .terminal-load-more {
  border: 1px solid var(--home-line2);
  background: var(--home-panel2);
  color: var(--home-ink);
  border-radius: 5px;
  padding: 6px 9px;
  font-family: var(--home-mono);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

body.terminal-home-v1 .terminal-load-more:hover:not(:disabled) {
  border-color: var(--home-amber);
}

body.terminal-home-v1 .terminal-load-more:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Non-home compact hero cleanup.
   Home has body[data-page="home"]; these rules intentionally skip it. */
body.terminal-site:not([data-page="home"]) .terminal-page-hero,
body.terminal-site:not([data-page="home"]) .hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 18px !important;
  min-height: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.terminal-site:not([data-page="home"]) .terminal-page-hero > .explorer-hero-clean,
body.terminal-site:not([data-page="home"]) .hero > .explorer-hero-clean,
body.terminal-site:not([data-page="home"]) .hero-inner,
body.terminal-site:not([data-page="home"]) .hero-content {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: end;
}

body.terminal-site:not([data-page="home"]) .terminal-page-hero .hero-copy,
body.terminal-site:not([data-page="home"]) .hero .hero-copy {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 720px;
}

body.terminal-site:not([data-page="home"]) .terminal-page-hero .eyebrow,
body.terminal-site:not([data-page="home"]) .hero .eyebrow {
  margin: 0 0 8px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  color: var(--tt-amber) !important;
}

body.terminal-site:not([data-page="home"]) .terminal-page-hero h1,
body.terminal-site:not([data-page="home"]) .hero h1 {
  margin: 0 !important;
  max-width: 760px !important;
  font-size: clamp(28px, 3.4vw, 42px) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.018em !important;
}

body.terminal-site:not([data-page="home"]) .terminal-page-hero .lead,
body.terminal-site:not([data-page="home"]) .hero .lead,
body.terminal-site:not([data-page="home"]) .terminal-page-hero p,
body.terminal-site:not([data-page="home"]) .hero p {
  margin: 10px 0 0 !important;
  max-width: 760px !important;
  color: var(--tt-dim) !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
}

body.terminal-site:not([data-page="home"]) .terminal-page-hero .search-card,
body.terminal-site:not([data-page="home"]) .hero .search-card,
body.terminal-site:not([data-page="home"]) .terminal-page-hero .hero-search-card,
body.terminal-site:not([data-page="home"]) .hero .hero-search-card {
  margin: 0 !important;
  padding: 14px !important;
  max-width: none !important;
  align-self: stretch;
  background: var(--tt-panel) !important;
  border: 1px solid var(--tt-line) !important;
  border-radius: var(--tt-radius) !important;
  box-shadow: none !important;
}

body.terminal-site:not([data-page="home"]) .terminal-page-hero .search-row,
body.terminal-site:not([data-page="home"]) .hero .search-row {
  gap: 8px !important;
}

body.terminal-site:not([data-page="home"]) .terminal-page-hero .quick-actions,
body.terminal-site:not([data-page="home"]) .hero .quick-actions {
  margin-top: 10px !important;
}

body.search-result-mode .terminal-page-hero,
body.search-result-mode .hero {
  padding-top: 16px !important;
  padding-bottom: 12px !important;
}

@media (max-width: 760px) {
  body.terminal-site:not([data-page="home"]) .terminal-page-hero,
  body.terminal-site:not([data-page="home"]) .hero {
    padding: 22px 16px 14px !important;
  }

  body.terminal-site:not([data-page="home"]) .terminal-page-hero > .explorer-hero-clean,
  body.terminal-site:not([data-page="home"]) .hero > .explorer-hero-clean,
  body.terminal-site:not([data-page="home"]) .hero-inner,
  body.terminal-site:not([data-page="home"]) .hero-content {
    grid-template-columns: 1fr !important;
  }

  body.terminal-site:not([data-page="home"]) .terminal-page-hero h1,
  body.terminal-site:not([data-page="home"]) .hero h1 {
    font-size: clamp(26px, 8vw, 34px) !important;
  }
}

/* Fix standalone non-home heroes such as /bitcoin-hashrate. */
body.terminal-site:not([data-page="home"]) .terminal-page-hero,
body.terminal-site:not([data-page="home"]) .terminal-page-hero *,
body.terminal-site:not([data-page="home"]) .hero,
body.terminal-site:not([data-page="home"]) .hero * {
  text-align: left !important;
}

body.terminal-site:not([data-page="home"]) .terminal-page-hero {
  justify-items: start !important;
  align-items: start !important;
}

body.terminal-site:not([data-page="home"]) .terminal-page-hero:not(:has(.explorer-hero-clean)) {
  display: block !important;
}

body.terminal-site:not([data-page="home"]) .terminal-page-hero:not(:has(.explorer-hero-clean)) h1,
body.terminal-site:not([data-page="home"]) .terminal-page-hero:not(:has(.explorer-hero-clean)) p {
  margin-left: 0 !important;
  margin-right: auto !important;
}
