/* ===================================================================
   CRYPTO NEWS · stylesheet
   sait-gipr.onrender.com
   =================================================================== */

:root {
  --bg: #050608;
  --bg-1: #0a0c10;
  --bg-2: #11141a;
  --line: #1a1f28;
  --line-2: #242a35;
  --fg: #eef1f5;
  --fg-dim: #b4bcc8;
  --fg-mute: #7a8494;
  --accent: #3aa6ff;
  --accent-2: #f5b939;
  --up: #4ade80;
  --down: #f87171;
  --glow-blue: 0 0 18px rgba(58,166,255,.55), 0 0 42px rgba(58,166,255,.25);
  --glow-amber: 0 0 18px rgba(245,185,57,.55), 0 0 42px rgba(245,185,57,.20);
  --radius: 4px;
}
[data-theme="light"] {
  --bg: #f5f3ed;
  --bg-1: #ffffff;
  --bg-2: #faf8f2;
  --line: #d6d1c2;
  --line-2: #b4ad9e;
  --fg: #14171c;
  --fg-dim: #2e3540;
  --fg-mute: #5e6776;
  --accent: #1f6fc4;
  --accent-2: #b8801a;
  --glow-blue: 0 0 0 rgba(0,0,0,0);
  --glow-amber: 0 0 0 rgba(0,0,0,0);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
a:focus-visible, button:focus-visible, .btn:focus-visible,
.nav-dropdown-toggle:focus-visible, .drawer-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 9999;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 150ms;
}
.skip-link:focus { top: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
[data-theme="dark"] body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(58,166,255,.06), transparent 60%),
    radial-gradient(900px 500px at 0% 30%, rgba(245,185,57,.04), transparent 60%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--bg); }

/* ====== Status bar ====== */
.statusbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  text-transform: uppercase;
}
.statusbar .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 8px var(--up);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.85); }
}
.statusbar .sep { color: var(--line-2); }
.statusbar .live { color: var(--up); font-weight: 700; }
.statusbar .right { margin-left: auto; display: flex; gap: 14px; }
.statusbar a:hover { color: var(--fg); }

/* ====== Ticker ====== */
.ticker {
  display: flex;
  align-items: center;
  height: 38px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  position: relative;
}
.ticker-track {
  flex: 1;
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}
.ticker-rail {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: scroll 90s linear infinite;
  padding-left: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item { display: inline-flex; gap: 8px; align-items: baseline; }
.ticker-sym { color: var(--fg); font-weight: 700; }
.ticker-px  { color: var(--fg); }
.ticker-chg { font-weight: 600; }
.up { color: var(--up); }
.down { color: var(--down); }
.ticker-unavailable { opacity: 0.5; }
.prices-unavailable { color: var(--fg-dim); font-size: 13px; padding: 12px 0; text-align: center; margin: 0; }

/* Per-article live price badge (injected by app.js enhanceCoinBadges). Sits in .article-meta,
   pushed to the right; hidden until prices load. Live market data is kept separate from the AI
   summary on purpose — see nomika.txt §4. */
.coin-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(128, 128, 128, 0.25);
  background: rgba(128, 128, 128, 0.08);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
.coin-badge--empty { display: none; }
.coin-badge__sym { font-weight: 700; color: var(--fg); }
.coin-badge__px { color: var(--fg); }
.coin-badge__chg { font-weight: 600; }
.coin-badge.up .coin-badge__chg { color: var(--up); }
.coin-badge.down .coin-badge__chg { color: var(--down); }

/* ====== Header ====== */
header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: center;
}
.brand img {
  width: 56px; height: 56px;
  object-fit: contain;
}
[data-theme="dark"] .brand img {
  filter: drop-shadow(0 0 8px rgba(58,166,255,.35));
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text .super {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--fg-mute);
  text-transform: uppercase;
}
.brand-text .brand-title {
  margin: 4px 0 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-text .brand-title em { font-style: normal; color: var(--accent); }
.brand-text .brand-title .crypto-word { color: var(--accent-2); }
.beta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  padding: 3px 6px;
  border: 1px solid var(--accent-2);
  color: var(--accent-2);
  border-radius: 2px;
}

.nav {
  display: flex;
  gap: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}
.nav a { position: relative; padding: 6px 0; }
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--accent); }
}
.nav a.active { color: var(--fg); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent);
}

/* ====== Nav dropdowns ====== */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-dropdown-toggle {
  background: transparent;
  border: 0;
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 0;
  position: relative;
}
.nav-dropdown-toggle::after { content: " ▾"; font-size: 9px; vertical-align: middle; }
.nav-dropdown-toggle:hover { color: var(--accent); }
.nav-dropdown-toggle.active { color: var(--fg); }
.nav-dropdown-toggle.active::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent);
}
.nav-dropdown-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 8px);
  left: -10px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  min-width: 150px;
  z-index: 200;
  padding: 4px 0;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a { padding: 9px 14px; white-space: nowrap; }
[data-theme="light"] .nav-dropdown-toggle { color: var(--fg-dim); }

.controls { justify-self: end; display: flex; gap: 6px; align-items: center; }
.header-social {
  display: flex;
  align-items: center;
  padding-right: 10px;
  margin-right: 4px;
  border-right: 1px solid var(--line-2);
}
@media (max-width: 980px) { .header-social { display: none; } }
.ctl {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--fg);
  width: 36px; height: 36px;
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.ctl:hover { border-color: var(--accent); color: var(--accent); }
.ctl.lang { width: auto; padding: 0 10px; font-weight: 700; text-decoration: none; }

/* ====== Language visibility (URL-driven, server-rendered) ======
   <html lang="en"> hides every .text-el; <html lang="el"> hides every .text-en. The
   templates no longer carry inline style="display:none;" on .text-el — the CSS below
   is the only thing controlling cross-language visibility. */
html[lang="en"] .text-el { display: none !important; }
html[lang="el"] .text-en { display: none !important; }

/* ====== Touch-target sizing (mobile) ======
   Apple HIG and Material both call for ~44px minimum hit area on touch. */
@media (max-width: 980px) {
  .ctl, .ctl.lang, .nav-toggle {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ====== Hamburger nav-toggle (mobile only) ====== */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--fg);
  width: 36px;
  height: 36px;
  border-radius: 2px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all .15s;
  justify-self: start;
  padding: 0;
}
.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

/* ====== Layout ====== */
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
}
.shell.single { grid-template-columns: 1fr; max-width: 880px; }
.shell.wide { grid-template-columns: 1fr; max-width: 1280px; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand toggle";
    row-gap: 0;
  }
  .nav-toggle { display: inline-flex; grid-area: toggle; }
  .brand { grid-area: brand; }
  .controls { display: none; }
  .nav { display: none; }
  aside .card { display: none; }
}

/* ====== Mobile slide-in drawer ====== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 84%;
  max-width: 320px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform .28s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
}
.drawer.open { transform: translateX(0); }
body.drawer-open { overflow: hidden; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}
.drawer-brand { display: flex; align-items: center; gap: 10px; }
.drawer-close {
  background: transparent;
  border: 0;
  color: var(--fg);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.drawer-close:hover { color: var(--accent); }

.drawer-nav { display: flex; flex-direction: column; padding: 2px 0; }
.drawer-link,
.drawer-group-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 20px;
  background: transparent;
  border: 0;
  color: var(--fg);
  font-family: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}
.drawer-link svg,
.drawer-group-toggle svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--fg-dim); }
.drawer-link:hover,
.drawer-group-toggle:hover { color: var(--accent); }
.drawer-link:hover svg,
.drawer-group-toggle:hover svg { color: var(--accent); }
.drawer-caret { margin-left: auto; font-size: 12px; color: var(--fg-dim); transition: transform .2s ease; }
.drawer-group.open .drawer-caret { transform: rotate(180deg); }
.drawer-submenu { display: none; flex-direction: column; padding: 2px 0 6px; }
.drawer-group.open .drawer-submenu { display: flex; }
.drawer-sublink {
  padding: 10px 20px 10px 54px;
  color: var(--fg-dim);
  font-size: 15px;
}
.drawer-sublink:hover { color: var(--accent); }

.drawer-divider { height: 1px; background: var(--line); margin: 2px 18px; }
.drawer-section { padding: 12px 20px; }
.drawer-section-title {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 10px;
}
.drawer-theme,
.drawer-lang { display: flex; gap: 8px; }
.drawer-theme-btn,
.drawer-lang-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 8px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.drawer-theme-btn svg { width: 17px; height: 17px; }
.drawer-theme-btn.active,
.drawer-lang-btn.active {
  border-color: var(--accent);
  background: var(--bg-1);
  color: var(--accent);
}
.drawer-theme-btn:hover,
.drawer-lang-btn:hover { border-color: var(--accent); }
.drawer-social { display: flex; gap: 16px; align-items: center; }
.drawer-social .social-link { color: var(--fg-dim); display: inline-flex; }
.drawer-social .social-link:hover { color: var(--accent); }

@media (min-width: 981px) {
  .drawer,
  .drawer-overlay { display: none !important; }
}

/* ====== Hero ====== */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  margin-bottom: 28px;
  padding: 22px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.hero-video {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--line-2);
}
.hero-video iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.hero-meta { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--accent);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--down);
  color: var(--down);
  font-size: 9px;
  border-radius: 2px;
}
.live-pill::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--down);
  animation: pulse 1.4s ease-in-out infinite;
}
.hero h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  line-height: 1.15;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.hero p { color: var(--fg-dim); margin: 0; font-size: 14px; }
.hero-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 6px; }
.social-links { display: flex; gap: 8px; align-items: center; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--fg-dim);
  transition: color .15s, border-color .15s;
}
.social-link:hover { color: var(--accent); border-color: var(--accent); }
.social-link svg { display: block; }

.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  border-radius: 2px;
  transition: all .15s;
  display: inline-block;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #051018;
  font-weight: 700;
}
[data-theme="dark"] .btn.primary { box-shadow: var(--glow-blue); }
.btn.primary:hover { color: #051018; opacity: .9; }

/* ====== Section header ====== */
.home-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.section-head {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.section-head h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19.8px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.section-head .count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg);
  letter-spacing: 0.08em;
  margin-left: auto;
}

/* Search box (next to "Today's Brief") */
.search-box {
  position: relative;
  margin-left: auto;
  flex: 0 1 320px;
  min-width: 0;
}
.search-input {
  width: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  color: var(--fg);
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 8px 32px 8px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: var(--fg-mute); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(58,166,255,.18);
}
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--fg-mute);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
}
.search-clear:hover { color: var(--fg); background: var(--bg-2); }
[data-theme="light"] .search-input { background: var(--bg-1); color: var(--fg); }
[data-theme="light"] .search-input::placeholder { color: var(--fg-mute); }

@media (max-width: 600px) {
  .section-head { flex-wrap: wrap; }
  .search-box { flex: 1 1 100%; margin-left: 0; }
}

/* ====== Articles ====== */
.feed { display: flex; flex-direction: column; }
#article-list { transition: opacity 200ms; }
.article {
  padding: 22px 22px 30px;
  border-bottom: 1px solid var(--line);
  transition: background .15s, outline-color .15s;
  outline: 2px solid transparent;
  outline-offset: -2px;
}
@media (hover: hover) and (pointer: fine) {
  .article:hover { background: var(--bg-1); outline-color: rgba(245,185,57,.35); }
}
@media (hover: none) {
  .article:active { background: var(--bg-1); outline-color: rgba(245,185,57,.35); }
  .deal-card:active { border-color: var(--accent-2); transform: translateY(-2px); }
  .yt-card:active { border-color: var(--accent-2); transform: translateY(-2px); }
}

.article-thumb {
  float: left;
  width: 240px;
  height: 180px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-1);
  margin: 0 20px 12px 0;
  flex-shrink: 0;
}
.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-body { min-width: 0; }
.article-body h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 21.6px;
  font-weight: 600;
  letter-spacing: -0.01em;
  word-spacing: 0.06em;
  line-height: 1.25;
  margin: 0 0 8px;
  text-wrap: pretty;
}
.article-body h2 a:hover { color: var(--accent); }
.article-body .summary {
  color: var(--fg);
  font-size: 15.3px;
  word-spacing: 0.06em;
  line-height: 1.6;
  margin: 0;
}
[data-theme="light"] .article-body .summary { color: var(--fg-dim); }
.summary-wrap {
  overflow: clip;
  max-height: 110px;
  transition: max-height 0.3s ease;
}
.summary-wrap.expanded { max-height: 2000px; }
.read-all-btn {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-family: inherit;
  font-size: 15.3px;
  cursor: pointer;
  padding: 4px 0 0;
  display: block;
}
.read-all-btn:hover { opacity: 0.7; }
.read-all-btn.hidden { display: none; }
@media (min-width: 981px) {
  .summary-wrap { max-height: none; }
  .read-all-btn { display: none !important; }
}
[data-theme="light"] .statusbar { color: var(--fg-dim); }
[data-theme="light"] .ticker-px { color: var(--fg-dim); }
[data-theme="light"] .nav { color: var(--fg-dim); }
[data-theme="light"] .section-head .count { color: var(--fg-dim); }
[data-theme="light"] .article-meta { color: var(--fg-dim); }
[data-theme="light"] .share-btn { color: var(--fg-dim); }
[data-theme="light"] .time { color: var(--fg-dim); }
[data-theme="light"] .tag-row .tag { color: var(--fg-dim); }
.article-meta {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  font-family: inherit;
  font-size: 15.3px;
  color: var(--fg);
  align-items: center;
  flex-wrap: wrap;
  clear: both;
}
.article-meta a:hover { color: var(--accent); }
.meta-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.share-btn {
  background: transparent; border: 0; color: var(--fg);
  font-family: inherit; font-size: inherit; cursor: pointer;
  padding: 0;
}
.share-btn:hover { color: var(--accent); }

.time {
  font-family: inherit;
  font-size: inherit;
  color: var(--fg);
  white-space: nowrap;
  margin-left: auto;
}

@media (max-width: 980px) {
  .summary-wrap { max-height: 0; }
  .read-all-btn { display: inline-block; }
  .article-thumb, .article-body h2 { cursor: pointer; }
  .article-meta {
    display: inline-flex;
    clear: none;
    margin-top: 0;
    margin-left: 12px;
  }
  .article-meta .meta-action,
  .article-meta .coin-badge { display: none; }
  .summary-wrap.expanded ~ .read-all-btn { display: block; }
  .summary-wrap.expanded ~ .article-meta {
    display: flex;
    clear: both;
    margin-top: 12px;
    margin-left: 0;
  }
  .summary-wrap.expanded ~ .article-meta .meta-action { display: inline-flex; }
  .summary-wrap.expanded ~ .article-meta .coin-badge:not(.coin-badge--empty) { display: inline-flex; }
}

@media (max-width: 720px) {
  .article-thumb { float: none; width: 100%; height: 200px; margin: 0 0 12px 0; }
  .hero { grid-template-columns: 1fr; }
  .hero-actions { display: flex; flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .ticker-track {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  }
}

/* ====== Ad slot ====== */
.ad-slot {
  margin: 22px 0;
  text-align: center;
  overflow: hidden;
}
html.ads-off .ad-slot { display: none; }
.ad-slot ins.adsbygoogle {
  display: block;
}

/* ====== Sidebar ====== */
aside { display: flex; flex-direction: column; gap: 22px; }
@media (min-width: 981px) {
  aside { position: sticky; top: 88px; align-self: start; }
}
aside > .ad-slot:first-child { margin-top: -10px; }
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h4::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  display: inline-block;
}

.market-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.market-row:last-child { border-bottom: 0; }
.market-row .ico {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; color: #fff;
  overflow: hidden;
}
.market-row .ico img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.market-row .name { color: var(--fg); font-weight: 600; }
.market-row .name small { color: var(--accent-2); font-weight: 400; margin-left: 6px; font-size: 11px; }
.market-row .px-col { text-align: right; }
.market-row .px { color: var(--fg); font-weight: 700; }
.market-row .chg { display: block; font-size: 12px; margin-top: 2px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-row .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 5px 8px;
  border: 1px solid var(--line-2);
  color: var(--fg);
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
}
.tag-row .tag:hover { color: var(--accent); border-color: var(--accent); }

.fear-greed { text-align: center; padding: 8px 0 4px; }
.fear-greed .gauge { width: 160px; height: 80px; margin: 0 auto; position: relative; overflow: hidden; }
.fear-greed .gauge svg { width: 100%; height: 100%; }
.fear-greed .val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 8px;
}
.fear-greed .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  text-transform: uppercase;
}

.newsletter-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--fg);
  padding: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  border-radius: 2px;
  margin-bottom: 8px;
  outline: none;
}
.newsletter-input:focus { border-color: var(--accent); }

/* ====== Show more ====== */
.show-more { margin: 28px 0; text-align: center; }
.show-more .btn { padding: 14px 28px; min-width: 260px; }
.show-more .btn:disabled { opacity: 0.6; cursor: wait; }
.feed-error { margin: 12px 0 0; font-size: 13px; color: var(--fg-dim); }

/* ====== Footer ====== */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 24px;
  margin-top: 40px;
  background: var(--bg-1);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  font-size: 13px;
}
.footer-inner h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin: 0 0 12px;
  font-weight: 600;
}
.footer-inner ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
  color: var(--fg-dim);
}
.footer-inner ul a:hover { color: var(--accent); }
.footer-meta { color: var(--fg-mute); font-size: 12px; }
.footer-social { display: flex; gap: 10px; margin-bottom: 14px; }
.footer-lang-btn {
  background: transparent; border: 0; padding: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-mute); cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.footer-lang-btn:hover { color: var(--accent); }
.footer-top-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--fg-mute); text-transform: uppercase;
}
.footer-top-link:hover { color: var(--accent); }
.footer-disclaimer {
  max-width: 1280px;
  margin: 24px auto 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-mute);
}
.footer-disclaimer a {
  color: var(--fg-dim);
  text-decoration: underline;
}
.footer-disclaimer a:hover { color: var(--accent); }
.footer-bot {
  max-width: 1280px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.06em;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > div:first-child { grid-column: 1 / -1; }
  .footer-bot { flex-direction: column; gap: 8px; }
}

/* ====== Cookie banner ====== */
.cookie {
  position: fixed;
  bottom: 18px; left: 18px; right: 18px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-1);
  border: 1px solid var(--accent);
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  z-index: 50;
  border-radius: var(--radius);
  font-size: 13px;
}
[data-theme="dark"] .cookie { box-shadow: var(--glow-blue); }
.cookie p { margin: 0; color: var(--fg-dim); flex: 1; }
.cookie a { color: var(--accent); }
.cookie .actions { display: flex; gap: 8px; }
.cookie.hidden { display: none; }
.cookie:not(.hidden) { animation: cookieFadeIn 300ms ease both; }
@keyframes cookieFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-rail { animation: none; }
  .statusbar .dot, .live-pill::before { animation: none; }
  .cookie:not(.hidden) { animation: none; }
}
@media (max-width: 600px) {
  .cookie { flex-direction: column; align-items: stretch; }
}

/* ====== Page-specific ====== */
.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.page-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-lede {
  font-size: 18px;
  color: var(--fg-dim);
  line-height: 1.55;
  margin: 0 0 32px;
  text-wrap: pretty;
  max-width: 60ch;
}
.prose h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
}
.prose p { margin: 0 0 16px; line-height: 1.7; max-width: 68ch; }
.prose ul { padding-left: 20px; line-height: 1.8; max-width: 68ch; }
.prose ul li { margin-bottom: 6px; }
.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }
.prose blockquote {
  border-left: 2px solid var(--accent-2);
  padding: 8px 0 8px 18px;
  margin: 18px 0;
  max-width: 68ch;
  color: var(--fg-dim);
  font-style: italic;
}
.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--bg-2);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--line);
}

/* ====== Deals affiliate disclosure ====== */
.affiliate-disclosure {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--fg-dim);
}

/* ====== Deals grid ====== */
.deal-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}
@media (max-width: 720px) {
  .deal-list { grid-template-columns: 1fr; }
}
.deal-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
}
@media (hover: hover) and (pointer: fine) {
  .deal-card:hover { border-color: var(--accent-2); transform: translateY(-2px); }
}
.deal-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-2);
  display: block;
}
.deal-card-body {
  padding: 1.2rem 1.4rem 1.4rem;
}
.deal-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 0.5rem;
}
.deal-card-desc {
  color: var(--fg-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.deal-card-cta {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

/* ====== Deals hub buttons ====== */
.deals-hub-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.deals-hub-btn {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 22px;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  transition: border-color .15s, transform .15s, color .15s;
  cursor: pointer;
}
.deals-hub-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ====== About stats ====== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 24px 0 36px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--bg-1);
}
.stat .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.stat .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
  text-transform: uppercase;
  margin-top: 6px;
}

/* ===================================================================
   Pipeline integration extras — classes the new design ships without
   but the server-rendered EJS templates and public/app.js need at
   runtime.
   =================================================================== */

/* Empty-state shown when the article queue is dry (first scrape job
   hasn't completed yet, or DB just wiped). */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--fg-dim);
}
.empty-state h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  margin: 0 0 8px;
  color: var(--fg);
}
.empty-state p { margin: 0; font-size: 14px; }

/* Brief glow when the user lands at /#<slug> and we scroll to that card.
   Removed by app.js after 3 s. */
.article--highlight {
  background: rgba(58,166,255,0.08);
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
[data-theme="dark"] .article--highlight {
  box-shadow: var(--glow-blue);
}

/* "Copy link" → green flash after the share button copies to clipboard. */
.share-btn--copied { color: var(--up) !important; }

.share-popover {
  position: fixed;
  z-index: 500;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  display: none;
  flex-direction: column;
  min-width: 190px;
}
.share-popover--open { display: flex; }
.share-popover__item {
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 0;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 8px 11px;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  width: 100%;
}
.share-popover__item:hover { background: var(--bg-2); color: var(--accent); }
.share-popover__item.share-btn--copied { color: var(--up) !important; }

/* Ad-blocker revenue notice. Hidden initially via inline style="display:none";
   app.js flips display:flex when it detects a blocker. Centered modal over a
   blurred backdrop; X button dismisses for 10 min (persisted in localStorage). */
.revenue-notice {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 6, 8, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.revenue-notice-card {
  position: relative;
  max-width: 480px;
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--down);
  border-radius: var(--radius);
  padding: 32px 28px 26px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.revenue-notice-card strong { color: var(--down); }
.revenue-notice-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  color: var(--fg-dim);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.revenue-notice-close:hover,
.revenue-notice-close:focus-visible { color: var(--fg); outline: none; }

/* "This article is no longer available" — shown when /#<slug> matches a row
   that has aged out via the 3-day cleanup. First click anywhere dismisses. */
.missing-article-popup {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(5,6,8,0.85);
  align-items: center;
  justify-content: center;
}
.missing-article-popup-card {
  background: var(--bg-1);
  border: 1px solid var(--accent);
  padding: 22px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  max-width: 420px;
  text-align: center;
}
[data-theme="dark"] .missing-article-popup-card { box-shadow: var(--glow-blue); }

/* Mobile-only scroll-to-top button. Injected from app.js (no EJS markup). */
.scroll-to-top {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  color: var(--fg);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s, color 0.15s, border-color 0.15s;
}
.scroll-to-top.visible { opacity: 1; }
@media (max-width: 720px) {
  .scroll-to-top.visible { display: inline-flex; }
}

/* ====== YouTube page ====== */
.yt-intro {
  color: var(--fg-dim);
  margin: 0 0 32px;
  max-width: 640px;
  line-height: 1.65;
}
.yt-featured {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  margin: 32px 0 40px;
  align-items: start;
}
.yt-featured-player {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.yt-featured-player:hover { box-shadow: 0 0 0 2px var(--accent-2); }
.yt-featured-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.yt-featured-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}
.yt-featured-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: break-word;
}
.yt-featured-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--fg-mute);
}
.yt-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-dim);
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: 'JetBrains Mono', monospace;
}
.yt-past { margin-bottom: 36px; }
.yt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.yt-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
@media (hover: hover) and (pointer: fine) {
  .yt-card:hover { border-color: var(--accent-2); transform: translateY(-2px); }
}
.yt-card-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #000;
}
.yt-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}
@media (hover: hover) and (pointer: fine) {
  .yt-card:hover .yt-card-thumb img { opacity: 0.8; }
}
.yt-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
  text-shadow: 0 0 12px rgba(0,0,0,0.7);
}
@media (hover: hover) and (pointer: fine) {
  .yt-card:hover .yt-play-btn { opacity: 1; }
}
.yt-card-info { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.yt-card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}
.yt-card-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-mute);
}
.yt-channel-btn { text-align: center; margin: 36px 0; }
.yt-empty { color: var(--fg-mute); font-style: italic; }

@media (max-width: 1024px) {
  .yt-featured { grid-template-columns: 1fr; }
  .yt-featured-meta { padding-top: 0; }
  .yt-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .yt-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .yt-grid { grid-template-columns: 1fr; }
}
.scroll-to-top:hover { color: var(--accent); border-color: var(--accent); }
