/* AUREA News — dashboard UI layer (~/workspace/aurea-brand/ui-dashboard-spec.md).
   Loaded LAST on every News page (after styles.css / portal.css / ads.css)
   by the page templates in build-articles-*.py, build-category-pages.py
   and build-coin-pages.py, and by apply-dashboard-ui.py for pages that
   are patched rather than rebuilt (index, older articles). It restyles
   the existing portal chrome to the spec's design language — glass
   surfaces, violet glow, dense rows, pill navigation — without touching
   markup, so the daily regeneration flow keeps it automatically.

   News-specific calls (per the spec's intent, adapted to a news site):
   - The article body column keeps its readable measure and type
     (.article-body is deliberately NOT restyled); only the hero image
     and in-article tables get the glass/panel treatment.
   - There is no fixed left sidebar: the sticky glass topbar + pill
     category nav carry the spec's navigation grammar, and the right
     rail is the spec's sticky action panel (glass cards, 320px). */

/* --- ambient ground ------------------------------------------------------ */
body {
  background-image:
    radial-gradient(720px 420px at 50% -120px, rgba(255, 190, 0, 0.10), rgba(255, 190, 0, 0) 70%),
    radial-gradient(640px 520px at 108% 22%, rgba(138, 43, 226, 0.12), rgba(138, 43, 226, 0) 70%),
    radial-gradient(560px 480px at -8% 88%, rgba(138, 43, 226, 0.07), rgba(138, 43, 226, 0) 70%);
  background-attachment: fixed;
}

/* --- glass topbar + pill cross-site nav ---------------------------------- */
.topbar {
  background: rgba(10, 15, 30, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 12px 28px rgba(0, 0, 0, 0.28);
}
.topbar .topnav a { border-radius: 999px; }
.topbar .topnav a:hover { background: rgba(255, 255, 255, 0.05); }
.topbar .topnav a.active {
  color: var(--gold);
  background: rgba(255, 215, 0, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.22);
}

/* --- ticker strip ---------------------------------------------------------- */
.ticker-strip {
  background: rgba(15, 20, 35, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ts-price, .ticker-price, .coin-live, .coin-live .lp,
.market-table td, .article-table td { font-variant-numeric: tabular-nums; }

/* --- glass cards ------------------------------------------------------------- */
.news-card, .news-row, .rail-card, .market-box, .live-card,
.kpi, .card, .empty-note {
  background: rgba(18, 22, 38, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 36px rgba(0, 0, 0, 0.38);
  border-radius: 16px;
}
.news-featured {
  background: rgba(18, 22, 38, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 36px rgba(0, 0, 0, 0.38);
  border-radius: 20px;
}
.breaking-card {
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 36px rgba(0, 0, 0, 0.38);
  border-radius: 16px;
}
.sponsored-strip {
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 16px;
}
.newsletter-inner {
  background: rgba(18, 22, 38, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 36px rgba(0, 0, 0, 0.38),
    0 0 32px rgba(138, 43, 226, 0.12);
  border-radius: 20px;
}
.newsletter-row input {
  background: #0e1222;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
}
.aff-banner img {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
}

/* Card density (spec §5/§6: 16px gaps, 16px dense padding) */
.news-grid { gap: 16px; }
.news-card-body { padding: 16px 18px 18px; }
.news-row { padding: 12px; gap: 14px; }
.related-list { gap: 12px; }
.portal-grid { gap: 26px; }
.rail { gap: 16px; }
.rail-card { padding: 16px 18px 10px; }

/* Hover lift — pointer-fine devices only, killed by reduced motion below */
@media (hover: hover) {
  .news-card, .news-featured, .news-row {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  }
  .news-card:hover, .news-featured:hover, .news-row:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 22px 44px rgba(0, 0, 0, 0.42),
      0 0 28px rgba(138, 43, 226, 0.16);
  }
  .news-card.is-sponsored:hover { border-color: var(--gold); }
}

/* --- dense rows: rail lists + market rows (spec §6) ------------------------- */
.side-item {
  padding: 9px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.side-item:hover { background: rgba(255, 215, 0, 0.04); }
.eco-link {
  padding: 10px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.eco-link:hover { background: rgba(255, 215, 0, 0.04); color: var(--text); }
.market-row {
  padding: 10px 8px;
  margin: 0 -8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

/* --- chips & primary actions (spec §7: gold-tinted glass chips,
       solid-gold primary buttons, no gradient fills) ----------------------- */
.news-cat {
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.35);
}
.coin-chip {
  background: rgba(18, 22, 38, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.coin-chip:hover {
  border-color: rgba(255, 215, 0, 0.5);
  color: var(--gold);
  background: rgba(255, 215, 0, 0.08);
}
.market-trade {
  background: var(--gold);
  color: #141828;
  border-radius: 8px;
}
.market-trade:hover { filter: brightness(1.07); }

/* --- article surfaces (body text itself is untouched) ----------------------- */
.article-hero {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
}
.article-table th { background: #0f1423; }
.article-table th, .article-table td { border-color: rgba(255, 255, 255, 0.07); }

/* --- section heads, footer, bottom nav -------------------------------------- */
.sec-head { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.footer-portal { border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 18px; }
.bottom-nav {
  background: rgba(10, 15, 30, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 30px rgba(0, 0, 0, 0.45);
}
.bottom-nav-dock {
  border-left: none;
  border-right: none;
  border-bottom: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 -8px 24px rgba(0, 0, 0, 0.45);
}

/* --- focus & motion (spec §8) ------------------------------------------------- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, .market-row:focus-visible {
  outline: 2px solid rgba(255, 215, 0, 0.55);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .news-card, .news-featured, .news-row { transition: none; }
  .news-card:hover, .news-featured:hover, .news-row:hover { transform: none; }
  .news-featured:hover .news-thumb img, .news-card:hover .news-thumb img { transform: none; }
}

/* ---------- NEON FRAME STANDARD v1 (2026-11-29): gradient gold->purple frame + outer glow ----------
   Appended last; wins over the readability pass. Fill = the site's own card
   colour, so surfaces never change — only the frame goes neon. See
   ~/workspace/aurea-design/shell-spec.md section 10. */
.card {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.55), rgba(138,43,226,.55) 52%, rgba(255,215,0,.30)) border-box;
  box-shadow: 0 0 16px rgba(138,43,226,.16), 0 0 8px rgba(255,215,0,.08), 0 10px 28px rgba(0,0,0,.36), inset 0 0 24px rgba(138,43,226,.05);
}
@media (hover: hover) {
  .card:hover {
    background:
      linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
      linear-gradient(135deg, rgba(255,215,0,.9), rgba(138,43,226,.85) 52%, rgba(255,215,0,.55)) border-box;
    box-shadow: 0 0 22px rgba(255,215,0,.22), 0 0 34px rgba(138,43,226,.28), 0 14px 34px rgba(0,0,0,.44), inset 0 0 24px rgba(138,43,226,.07);
  }
}

/* --- COIN LOGOS v1 (2026-11-29) -------------------------------------------
   Real coin logos next to every symbol (ticker strip, coin chips, market
   rows, article market tables) and cover thumbnails on rail side-items.
   Logo files are self-hosted real brand logos: assets/coins/<sym>.png
   (spothq/cryptocurrency-icons; AUR = the official AUREA emblem). Applied
   to built pages by apply-logos.py; builders emit them via
   build_shared.coin_logo(). */
.coin-logo { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; }
.ticker-strip .ts-item { align-items: center; }
.ticker-strip .coin-logo { vertical-align: 0; }
.coin-chip { display: inline-flex; align-items: center; gap: 6px; }
.coin-chip .coin-logo { width: 15px; height: 15px; vertical-align: 0; }
.market-coin { display: inline-flex; align-items: center; gap: 8px; }
.market-coin .coin-logo { width: 22px; height: 22px; vertical-align: 0; }
.article-table .td-coin { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.article-table .coin-logo { width: 20px; height: 20px; vertical-align: 0; }
.breaking-card .coin-logo { margin-right: 2px; }
.side-item { display: flex; gap: 11px; align-items: flex-start; }
.side-item-thumb { flex: 0 0 86px; display: block; overflow: hidden; border-radius: 9px; background: var(--card-2); }
.side-item-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.side-item-body { flex: 1 1 auto; min-width: 0; display: block; }
.page-heading .coin-logo { width: 30px; height: 30px; vertical-align: -5px; margin-right: 8px; }

/* --- FRESH v1 (2026-11-29) -------------------------------------------------
   Red NEW badge (articles published < 24h ago) + relative timestamps
   ("3 hours ago" / 「3時間前」), computed client-side by fresh.js from
   each card's <time datetime> — see apply-fresh.py. Red is an accent
   only; card frames keep the gold / purple neon standard, and the
   relative time uses the standard muted text color for readability. */
.new-badge {
  display: inline-flex; align-items: center;
  margin-left: 8px; padding: 1px 7px;
  font-size: 10px; font-weight: 800; letter-spacing: .08em; line-height: 1.5;
  color: #ff6b64; background: rgba(255, 59, 48, .13);
  border: 1px solid rgba(255, 59, 48, .55); border-radius: 999px;
  vertical-align: 2px; white-space: nowrap;
}
.rel-time { color: var(--muted); white-space: nowrap; }
.rel-time::before { content: "·"; margin: 0 6px; }
.article-meta .rel-time { color: var(--muted); }
