/* ============================================================================
   site.css — MemeBoard, portfolio visual identity D: "Terminal Degen".

   WHY A FOURTH IDENTITY
   ---------------------
   The portfolio has three: A "Editorial Data" (warm paper), B "Studio
   Instrument" (cool, dense), C "Warm Reference" (consumer, soft). All three
   are light-ground and assume a reader who is *reading*. A memecoin trader is
   scanning a live board, usually on a phone, usually at night, and in this
   vertical a bright corporate-white table reads as either a bank or a scam.
   Dark-first IS the trust signal here. So: a fourth identity, but a THIN one —
   tokens and table primitives only, reusing the portfolio's 8pt spacing scale,
   source-line convention and honesty blocks unchanged.

   THE CENTRAL TENSION, AND HOW IT IS RESOLVED
   -------------------------------------------
   Memecoin sites look untrustworthy because they let the chrome be as chaotic
   as the content. Here the split is strict: the CHROME is disciplined — near
   black, hairline rules, tabular numerals, dated source lines, no gradients on
   any data surface. The DEGEN energy is confined to named slots: coin art, one
   electric-lime accent, and badge microcopy. Serious frame, playful contents.

   THE CONTRAST RULE (inherited, load-bearing)
   -------------------------------------------
   Every colour exists twice. The bright token is for fills, tints and strokes.
   Anything carrying WHITE or dark TEXT on top uses the measured `-ink` partner.
   Gradients hide this bug — a gradient button passes at one end and fails at
   the other — so there are no text-bearing gradients in this file at all.
   Measured ratios are written next to each token; re-measure if you change one.

   DIRECTION IS NEVER COLOUR ALONE. Up/down always carries a ▲/▼ glyph and an
   explicit sign, so the board is readable with any colour vision.
   ========================================================================== */

:root {
  /* ---- ground + ink (dark, the default) ---- */
  --bg:          #0B0E14;
  --bg-raise:    #131826;   /* cards, table rows, ad frames */
  --bg-sunk:     #080A10;   /* sticky header, inset wells */
  --line:        #232A3B;
  --line-strong: #33405A;

  --text:      #E8ECF4;     /* 15.8:1 on --bg */
  --text-dim:  #8B94A8;     /*  6.1:1 on --bg — source lines, labels */
  --text-mute: #6E778A;
  --text-faint:#5D667A;

  /* ---- accent ---- */
  --accent:     #C6F432;    /* electric lime: fills, strokes, focus rings */
  --accent-ink: #141A02;    /* text ON --accent — 14.9:1 */
  --accent-text:#C6F432;    /* accent AS text on --bg — 13.4:1 */

  /* ---- direction ---- */
  --up:        #34D399;     /*  8.4:1 on --bg */
  --down:      #F87171;     /*  6.5:1 on --bg */
  --up-ink:    #04261A;     /* text ON a solid --up chip */
  --down-ink:  #3B0A0A;     /* text ON a solid --down chip */
  --up-tint:   rgba(52,211,153,.13);
  --down-tint: rgba(248,113,113,.13);

  /* ---- risk scale (also never colour-only: always paired with a number) ---- */
  --risk-good: #34D399;
  --risk-mid:  #FBBF24;
  --risk-bad:  #F87171;
  --risk-none: #6E778A;

  /* ---- promoted row (precomputed by hand, deliberately NOT color-mix) ----
     7% accent over --bg-raise, and 26% accent over --line.
     `color-mix(in srgb, var(--accent) 7%, var(--bg-raise))` was MEASURED
     computing to oklab(0.266 …) — a near-black fill — under the LIGHT theme,
     producing a dark strip on a white page with 1.17:1 title text. A
     theme-dependent colour function is exactly what the "every colour exists
     twice, and is measured" rule at the top of this file exists to prevent. */
  --promo-bg: #202727;
  --promo-border: #4D5E39;

  /* ---- type ---- */
  --font-ui:  "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ---- 8pt spacing scale ---- */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --measure: 72ch;
  --wrap: 1200px;
}

/* Light theme. The dark theme's up/down fail on white, so they are re-measured
   rather than reused — that is the entire reason this block exists. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F7F8FA; --bg-raise: #FFFFFF; --bg-sunk: #EEF1F5;
    --line: #E3E6EC; --line-strong: #CBD2DE;
    --text: #14181F; --text-dim: #5A6372; --text-mute: #79818F; --text-faint: #9AA2B0;
    --accent: #C6F432; --accent-ink: #141A02; --accent-text: #4D7C0F; /* 4.6:1 on white */
    --up: #047857;  /* 4.8:1 on white */
    --down: #B91C1C; /* 5.9:1 on white */
    --up-ink: #FFFFFF; --down-ink: #FFFFFF;
    --up-tint: rgba(4,120,87,.10); --down-tint: rgba(185,28,28,.10);
    --risk-good: #047857; --risk-mid: #B45309; --risk-bad: #B91C1C; --risk-none: #79818F;
    --promo-bg: #FBFEF1; --promo-border: #DCE9BC;
  }
}
:root[data-theme="light"] {
  --bg: #F7F8FA; --bg-raise: #FFFFFF; --bg-sunk: #EEF1F5;
  --line: #E3E6EC; --line-strong: #CBD2DE;
  --text: #14181F; --text-dim: #5A6372; --text-mute: #79818F; --text-faint: #9AA2B0;
  --accent: #C6F432; --accent-ink: #141A02; --accent-text: #4D7C0F;
  --up: #047857; --down: #B91C1C; --up-ink: #FFFFFF; --down-ink: #FFFFFF;
  --up-tint: rgba(4,120,87,.10); --down-tint: rgba(185,28,28,.10);
  --risk-good: #047857; --risk-mid: #B45309; --risk-bad: #B91C1C; --risk-none: #79818F;
  --promo-bg: #FBFEF1; --promo-border: #DCE9BC;
}

/* ---------------------------------------------------------------- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-ui); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Numbers are the product. Anything that can hold one gets tabular figures so
   digits never shimmy between refreshes. */
table, td, th, .num, .price, .pct, .stat-value, .mono, time, .tnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.mono { font-family: var(--font-mono); }

a { color: var(--accent-text); text-decoration-color: color-mix(in srgb, var(--accent-text) 40%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s3); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; margin-top: var(--s6); }
h3 { font-size: 17px; margin-top: var(--s5); }
p  { margin: 0 0 var(--s4); max-width: var(--measure); }
small { font-size: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s4); }
.prose { max-width: var(--measure); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* -------------------------------------------------------- source lines ---- */
/* Portfolio doctrine: every figure carries a dated source. Small, dim, always
   present — it is what separates this from a hype site. */
.src {
  display: block; font-size: 12px; color: var(--text-dim);
  margin-top: var(--s2); line-height: 1.4;
}
.src a { color: inherit; }
.stale { color: var(--risk-mid); font-style: italic; }

/* ------------------------------------------------------------- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg-sunk) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; gap: var(--s3); height: 52px; }
.brand { display: flex; align-items: center; gap: var(--s2); font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.brand .mark {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 800;
}
.site-nav { margin-left: auto; display: flex; gap: var(--s1); align-items: center; }
.site-nav a {
  color: var(--text-dim); text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 6px 9px; border-radius: var(--radius-sm);
}
.site-nav a:hover { color: var(--text); background: var(--bg-raise); }
.site-nav a[aria-current="page"] { color: var(--accent-text); background: var(--bg-raise); }
/* Currency selector. Hidden until currency.js confirms rates shipped, so a
   build with no FX data never renders an empty dropdown. */
.cur-select {
  background: var(--bg-raise); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 4px 6px; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.cur-select:hover { border-color: var(--line-strong); }

/* ------------------------------------------------------- live indicator ---- */
/* Reports the truth: green while refreshes are landing, amber with the real age
   once they stop. A tracker that permanently claims "LIVE" is worse than one
   that admits it went quiet. */
.live-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: var(--up); background: var(--up-tint);
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.live-pill .live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: live-blip 2s ease-in-out infinite;
}
.live-pill.stale { color: var(--risk-mid); background: rgba(251,191,36,.12); }
.live-pill.stale .live-dot { animation: none; }
@keyframes live-blip { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.theme-toggle {
  background: none; border: 1px solid var(--line); color: var(--text-dim);
  width: 30px; height: 30px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }

/* --------------------------------------------------------- ticker tape ---- */
/* Marquee. The run is duplicated in the markup, so translating -50% lands
   exactly on the copy and the loop is seamless. Paused on hover so a reader can
   actually read a figure they spotted — a ticker you cannot stop is hostile. */
.tape {
  border-bottom: 1px solid var(--line); background: var(--bg-sunk);
  overflow: hidden; font-size: 12px;
}
.tape-track {
  display: flex; width: max-content;
  animation: tape-scroll 48s linear infinite;
}
.tape:hover .tape-track, .tape:focus-within .tape-track { animation-play-state: paused; }
.tape-run { display: flex; gap: var(--s5); padding: 7px var(--s4); white-space: nowrap; }
@keyframes tape-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.tape-item { display: inline-flex; gap: 6px; align-items: baseline; color: var(--text-dim); }
.tape-item b { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------- hero signals ----- */
/* A horizontal rail rather than a grid: it keeps the height fixed, so adding a
   seventh chain widens the rail instead of pushing the board off the fold. */
.hero-signals {
  display: flex; gap: var(--s3); overflow-x: auto; scroll-snap-type: x proximity;
  margin: 0 0 var(--s4); padding-bottom: var(--s2);
  scrollbar-width: none;
}
.hero-signals::-webkit-scrollbar { display: none; }
.sig {
  flex: none; scroll-snap-align: start; position: relative; overflow: hidden;
  width: 190px; min-height: 104px; padding: var(--s3);
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 2px;
}
.sig-wide { width: 232px; }
.sig-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.sig-value { font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sig-sub { font-size: 11px; color: var(--text-dim); }
.sig-sub b { color: var(--text); }

.sig-ring { flex-direction: row; align-items: center; justify-content: space-between; }
.gfx-ring { width: 62px; height: 62px; flex: none; }
.gfx-ring-fill { animation: ring-draw 1.1s cubic-bezier(.22,.9,.3,1) both; }
@keyframes ring-draw {
  from { stroke-dasharray: 0 999; }
  to   { stroke-dasharray: var(--dash) var(--gap); }
}

.sig-gauge { align-items: center; }
.gfx-gauge { width: 118px; height: 68px; }
.gfx-needle { animation: needle-sweep 1.2s cubic-bezier(.3,1.2,.4,1) both; }
@keyframes needle-sweep { from { transform: rotate(-90deg); } to { transform: rotate(0deg); } }
.sig-gauge-read { font-size: 12px; color: var(--text-dim); text-align: center; margin-top: -6px; }
.sig-gauge-read b { font-size: 17px; color: var(--text); font-weight: 700; }

/* Area sparkline: the line draws itself in, then the end dot lands. */
.gfx-area { width: 100%; height: 40px; margin-top: auto; display: block; }
.gfx-line {
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation: line-draw 1.4s ease-out .1s forwards;
}
@keyframes line-draw { to { stroke-dashoffset: 0; } }
.gfx-dot { opacity: 0; animation: dot-in .3s ease-out 1.3s forwards; }
@keyframes dot-in { to { opacity: 1; } }

/* The fold budget again. Adding the hero pushed the first table row from 549px
   to 724px at 375x812 — only 2 rows of the actual product visible. The hero is
   worth space, but not that much, so on mobile it is compressed to roughly
   two-thirds height: shorter cards, a flatter sparkline, and a tighter gauge.
   Re-measure firstRowTop if you change anything here. */
@media (max-width: 720px) {
  /* Seven chain tabs wrap onto two lines at 375px and cost 70px of fold for
     nothing. A single scrollable row is 34px and behaves better under the thumb. */
  .segmented {
    display: flex; flex-wrap: nowrap !important; overflow-x: auto;
    max-width: 100%; scrollbar-width: none;
  }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented a { flex: none; }

  .hero-signals { gap: var(--s2); margin-bottom: var(--s3); padding-bottom: var(--s1); }
  .sig { width: 152px; min-height: 0; padding: var(--s2) var(--s3); gap: 0; }
  .sig-wide { width: 186px; }
  .sig-value { font-size: 17px; }
  .sig-sub { font-size: 10px; line-height: 1.35; }
  .gfx-area { height: 24px; }
  .gfx-gauge { width: 92px; height: 52px; }
  .gfx-ring { width: 52px; height: 52px; }
  .sig-gauge-read b { font-size: 15px; }
}

/* Motion here is ornament on top of numbers that are already legible, so it all
   goes away cleanly — including the marquee, which becomes a normal scroller. */
@media (prefers-reduced-motion: reduce) {
  .tape-track { animation: none; }
  .tape { overflow-x: auto; }
  .gfx-line { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
  .gfx-dot { opacity: 1; animation: none; }
  .gfx-needle, .gfx-ring-fill { animation: none; }
}

/* ------------------------------------------------------------- tables ---- */
.board { width: 100%; border-collapse: collapse; }
.board th {
  text-align: right; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-dim); padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--line); position: sticky; top: 52px; background: var(--bg);
  white-space: nowrap;
}
.board th:first-child, .board th.left { text-align: left; }
.board td { padding: var(--s3); border-bottom: 1px solid var(--line); text-align: right; font-size: 13px; }
.board td:first-child, .board td.left { text-align: left; }
.board tbody tr:hover { background: var(--bg-raise); }

.coin-cell { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.coin-cell img, .coin-cell .noimg {
  width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--bg-raise);
  object-fit: cover;
}
.coin-cell .noimg { display: grid; place-items: center; font-size: 11px; color: var(--text-dim); font-weight: 700; }
.coin-name { min-width: 0; }
.coin-name a { color: var(--text); text-decoration: none; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-name a:hover { color: var(--accent-text); }
.coin-sym { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); text-transform: uppercase; }
.rank { color: var(--text-dim); font-size: 12px; width: 28px; }

/* Direction. Colour is reinforcement; the glyph and sign carry the meaning. */
.pct { font-weight: 600; white-space: nowrap; }
.pct.up   { color: var(--up); }
.pct.down { color: var(--down); }
.pct.flat { color: var(--text-dim); }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
  border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.chip.up   { background: var(--up-tint);   color: var(--up); }
.chip.down { background: var(--down-tint); color: var(--down); }
.chip.neutral { background: var(--bg-raise); color: var(--text-dim); border: 1px solid var(--line); }
.chip.base     { background: rgba(0,82,255,.16); color: #7FA8FF; }
.chip.robinhood{ background: rgba(198,244,50,.14); color: var(--accent-text); }

/* Sub-cent prices: a subscript zero-count, never nine grey zeros. */
.price sub { font-size: .72em; }

/* -------------------------------------------------------- risk display ---- */
.risk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.risk-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.risk-good .risk-dot { background: var(--risk-good); }
.risk-mid  .risk-dot { background: var(--risk-mid); }
.risk-bad  .risk-dot { background: var(--risk-bad); }
.risk-none .risk-dot { background: var(--risk-none); }
.risk-none { color: var(--text-dim); }

.checklist { list-style: none; padding: 0; margin: var(--s4) 0; display: grid; gap: var(--s2); }
.checklist li {
  display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3);
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13px;
}
.checklist .mark { flex: none; font-weight: 700; width: 1.2em; }
.checklist .pass .mark { color: var(--up); }
.checklist .fail .mark { color: var(--down); }
.checklist .unknown .mark { color: var(--text-dim); }
.checklist .weight { margin-left: auto; color: var(--text-dim); font-size: 11px; }

/* --------------------------------------------------------------- cards ---- */
.card {
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--s4);
}
.grid { display: grid; gap: var(--s3); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); }
.stat-value { font-size: 18px; font-weight: 600; margin-top: 2px; }

/* ------------------------------------------------------------ spotlight ---- */
.spotlight {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg-raise); padding: var(--s5); position: relative; overflow: hidden;
}
/* Decorative glow only — it sits BEHIND content, never under text. */
.spotlight::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(198,244,50,.16), transparent 68%);
  pointer-events: none;
}
.spotlight .eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent-text); font-weight: 700;
}

/* ------------------------------------------------------------ sparkline ---- */
.spark { display: block; width: 72px; height: 22px; }
.spark-lg { width: 100%; height: 120px; }

/* ----------------------------------------------------------------- ads ---- */
/* Framed and labelled so an ad can never be mistaken for a table row. */
.ad-slot {
  margin: var(--s5) 0; padding: var(--s3); text-align: center;
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 100px;
}
.ad-slot::before {
  /* --text-dim so the disclosure clears 4.5:1. This label is currently unseen
     because AD_SLOTS are empty, but it goes live the moment AdSense is approved,
     and an under-contrast "Advertisement" is the wrong thing to discover then. */
  content: "Advertisement"; display: block; font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: var(--s2);
}
.house-ad {
  display: flex; align-items: center; gap: var(--s3); margin: var(--s5) 0;
  padding: var(--s3) var(--s4); background: var(--bg-raise);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); font-size: 13px; text-decoration: none; color: var(--text);
}
.house-ad:hover { border-color: var(--line-strong); }
/* ------------------------------------------------- house banner (animated) --
   Built from HTML + CSS rather than an animated GIF/SVG: it re-themes with the
   page, the mascot is a single 7KB WebP cached across all 470 pages, and the
   motion can be switched off properly by prefers-reduced-motion — which an
   animated GIF cannot honour.

   Motion is deliberately slow and looping, never flashing or attention-grabbing
   in the way ad policy frowns on. It reads as "alive", not "urgent". */
.house-banner {
  position: relative; display: flex; align-items: center; gap: var(--s4);
  margin: var(--s5) 0; padding: var(--s4) var(--s5);
  background: var(--bg-raise);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--text);
  transition: border-color .2s ease, transform .2s ease;
}
.house-banner:hover { border-color: var(--line-strong); }

/* Decorative glow. Sits behind everything and never under text. */
.house-banner::before {
  content: ""; position: absolute; right: -40px; top: 50%;
  width: 260px; height: 260px; transform: translateY(-50%);
  background: radial-gradient(circle, rgba(198,244,50,.16), transparent 68%);
  pointer-events: none; animation: hb-glow 6s ease-in-out infinite;
}
@keyframes hb-glow {
  0%, 100% { opacity: .55; transform: translateY(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateY(-50%) scale(1.12); }
}

/* The flex ITEM here is <picture>, not <img> — sizing only the img let the
   picture wrapper collapse the whole banner to 36px wide and blow out the
   page with 172px of horizontal overflow. Both need the flex/size rules. */
.house-banner picture { flex: none; display: block; line-height: 0; }
.house-banner .mascot {
  position: relative; flex: none; width: 72px; height: 72px;
  border-radius: 50%; object-fit: cover;
  background: var(--bg-sunk);
  animation: hb-float 3.6s ease-in-out infinite;
  will-change: transform;
}
@keyframes hb-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-6px) rotate(2deg); }
}
.house-banner:hover .mascot { animation-duration: 1.6s; }

.house-banner .hb-copy { position: relative; min-width: 0; }
/* These are spans (an <a> may not contain block elements), so they need an
   explicit display to stack. */
.house-banner .hb-title,
.house-banner .hb-line,
.house-banner .hb-domain { display: block; }
.house-banner .hb-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.house-banner .hb-line { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.house-banner .hb-domain {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  color: var(--accent-text); margin-top: 4px;
}
.house-banner .hb-cta {
  position: relative; margin-left: auto; flex: none;
  background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 700; padding: 9px 18px; border-radius: 999px;
  white-space: nowrap;
}
.house-banner:hover .hb-cta { filter: brightness(1.06); }
.house-banner-tag {
  /* Same rule as .hq-tag: the ad label is a disclosure and must clear 4.5:1. */
  position: absolute; top: 6px; right: 8px; z-index: 2;
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); line-height: 1.6;
}

@media (max-width: 560px) {
  .house-banner { gap: var(--s3); padding: var(--s3) var(--s4); flex-wrap: wrap; }
  .house-banner picture, .house-banner .mascot { width: 52px; height: 52px; }
  .house-banner .hb-title { font-size: 16px; }
  .house-banner .hb-line { display: none; } /* the domain + CTA carry it at 375px */
  .house-banner .hb-cta { padding: 7px 14px; font-size: 12px; }
}

/* The global prefers-reduced-motion rule already collapses these animations;
   this makes the intent explicit for the banner specifically. */
@media (prefers-reduced-motion: reduce) {
  .house-banner::before, .house-banner .mascot { animation: none; }
}

/* -------------------------------------------------- promoted board row -----
   Reads as part of the board, but never pretends to be an organic result:
   accent tint + left rail + a "Promoted" tag mark it out, and it is an <a>
   rather than a <tr> so it is not semantically ranked data. Geometry mirrors a
   real table row so it sits in the rhythm of the board instead of interrupting it.
   The "Promoted" tag uses --text-dim (>=4.5:1) — the whole point of the label is
   that it can be read. */
.promo-row {
  display: flex; align-items: center; gap: var(--s3);
  margin: -1px 0 var(--s3); padding: 10px var(--s3);
  background: var(--promo-bg);
  border: 1px solid var(--promo-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text);
  font-size: 13px;
  transition: background .18s ease, border-color .18s ease;
}
.promo-row:hover {
  border-color: var(--accent);
  filter: brightness(1.06);
}
.promo-rank {
  flex: none; width: 22px; text-align: center;
  font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums;
}
.promo-row picture { flex: none; display: block; line-height: 0; }
.promo-mascot {
  width: 34px; height: 34px; border-radius: 50%; background: var(--bg-sunk);
  object-fit: cover; display: block;
}
.promo-name { min-width: 0; display: flex; flex-direction: column; }
.promo-title { font-weight: 600; color: var(--text); }
.promo-tag {
  display: inline-block; margin-left: 4px; padding: 0 5px;
  font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); border: 1px solid var(--line); border-radius: 3px;
  font-family: var(--font-ui); vertical-align: 1px;
}
.promo-figs {
  margin-left: auto; text-align: right; white-space: nowrap;
  display: flex; flex-direction: column; line-height: 1.35;
}
.promo-figs .price { font-weight: 600; }
.promo-safety { flex: none; min-width: 44px; text-align: right; }

@media (max-width: 560px) {
  .promo-row { gap: var(--s2); padding: 9px var(--s2); }
  .promo-rank { width: 16px; font-size: 11px; }
  .promo-mascot { width: 30px; height: 30px; }
  .promo-safety { display: none; } /* mirrors the board, which also drops columns here */
}

.house-ad .tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-dim); flex: none;
}

/* -------------------------------------------------------------- tabs ------ */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin: var(--s4) 0; overflow-x: auto; }
.tabs a {
  padding: var(--s2) var(--s3); font-size: 13px; font-weight: 600; text-decoration: none;
  color: var(--text-dim); border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs a:hover { color: var(--text); }

.segmented { display: inline-flex; background: var(--bg-raise); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.segmented a {
  padding: 5px 12px; font-size: 13px; font-weight: 600; border-radius: 999px;
  text-decoration: none; color: var(--text-dim);
}
.segmented a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

/* ------------------------------------------------------------ screener ---- */
.filter-rail { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: var(--s2); scrollbar-width: none; }
.filter-rail::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-raise); color: var(--text-dim); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.filter-chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.search-input {
  width: 100%; padding: 10px var(--s3); font-size: 15px; font-family: inherit;
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text);
}
.search-input::placeholder { color: var(--text-faint); }

/* --------------------------------------------------------- honesty box ---- */
.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--risk-mid);
  background: var(--bg-raise); border-radius: var(--radius);
  padding: var(--s4); margin: var(--s5) 0; font-size: 13px;
}
.notice strong { color: var(--text); }
.notice p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- footer ---- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: var(--s8);
  padding: var(--s6) 0; font-size: 13px; color: var(--text-dim);
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--text); }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s5); }
.footer-cols h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin: 0 0 var(--s2); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

/* ------------------------------------------------------ live behaviour ---- */
/* A changed number pulses once, then settles. Because figures are tabular and
   fixed-width, nothing reflows while it happens. */
@keyframes flash-up   { from { background: var(--up-tint); }   to { background: transparent; } }
@keyframes flash-down { from { background: var(--down-tint); } to { background: transparent; } }
.flash-up   { animation: flash-up   .6s ease-out; }
.flash-down { animation: flash-down .6s ease-out; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-raise), var(--line), var(--bg-raise));
  background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 4px; color: transparent;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --------------------------------------------------------------- mobile ---- */
/* Measured at 375px. The table IS the hero — no marketing paragraph is allowed
   above it, and a row must never trigger horizontal scroll. */
@media (max-width: 720px) {
  h1 { font-size: 23px; }
  h2 { font-size: 19px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0,1fr)); }

  /* THE FOLD BUDGET, measured at 375x812.
     Measured before this block existed: the first table row began at 882px —
     the entire fold was intro copy, a full-height spotlight and a 2x2 stat
     grid, and not one row of the actual board was visible. On a board site
     that is the whole product pushed below the fold. Everything below buys
     that space back. Re-measure if you add anything above the first table. */

  /* The tagline repeats what the h1 and the ticker tape already say. */
  .hide-mobile { display: none !important; }

  /* Spotlight: keep the coin, the price and the score; drop the explanation to
     a link, since the full rule has its own page. */
  .spotlight { padding: var(--s3) var(--s4); margin-bottom: var(--s3) !important; }
  .spotlight .stat-value { font-size: 16px; }
  .spotlight h2 { font-size: 19px !important; }
  .spotlight img { width: 38px !important; height: 38px !important; }

  /* Stat cards become one swipeable row instead of a 2x2 block. */
  .signal-strip {
    display: flex !important; gap: var(--s2); overflow-x: auto;
    scrollbar-width: none; padding-bottom: var(--s1);
  }
  .signal-strip::-webkit-scrollbar { display: none; }
  .signal-strip .card { flex: none; min-width: 148px; padding: var(--s3); }
  .signal-strip .stat-value { font-size: 16px; }

  /* Columns that do not survive 375px are hidden here and shown in the
     per-coin page instead — not squeezed until they are unreadable. */
  .board .col-opt { display: none; }
  .board th, .board td { padding: 8px var(--s2); font-size: 13px; }
  .board .rank { display: none; }
  .coin-cell img, .coin-cell .noimg { width: 26px; height: 26px; }
  .spotlight { padding: var(--s4); }
  .site-nav { display: none; }
  .site-nav.mobile-open { display: flex; }
}

@media (max-width: 400px) {
  .wrap { padding: 0 var(--s3); }
  .board th, .board td { padding: 9px 6px; }
}
