/* ═══════════════════════════════════════════════════════════════════════════
   BSC News — style.css v10.0
   Redesign: modern "Google News" card layout — light, airy, rounded corners.
   Brand palette matches bscstrategy.org (navy + bright green). Meant to sit
   as a linked module inside that site, not as a standalone dark terminal.
   Themes: "warm-light" = the new default modern look. "ultra-dark" = a
   navy-based dark mode companion (same brand, not a harsh terminal anymore).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --sans: 'Roboto', 'Google Sans', Arial, sans-serif;
  --mono: 'Roboto Mono', 'Courier New', Courier, monospace;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-pill: 999px;
  --card-border: 1px solid rgba(66,133,244,.14); /* matches bscstrategy.org's card border */
}

/* ── LIGHT THEME (default) — white / navy / Google blue ───────────────────── */
[data-theme="warm-light"] {
  --bg0:   #f4f6f9;   /* page background */
  --bg1:   #ffffff;   /* header / card surface */
  --bg2:   #f1f3f6;   /* subtle fill (hover, chips) */
  --bg3:   #e8ebf0;   /* stronger fill */
  --bg4:   #dde1e8;
  --bd0:   rgba(15,30,60,0.06);
  --bd1:   rgba(15,30,60,0.11);
  --bd2:   rgba(15,30,60,0.18);
  --navy:  #3a5f9e;      /* solid brand blue — chips, buttons, boot splash */
  --navy2: #4a71ad;
  /* Header/footer surface: a weaker, translucent "glass" blue. Content
     scrolling underneath shows through with a frosted blur. */
  --glass:        rgba(96, 130, 186, .58);
  --glass-edge:   rgba(255,255,255,.28);
  --gold:  #4285f4;      /* primary brand accent — Google Blue (var name kept for compat) */
  --gold2: #1967d2;
  --txt:   #17233b;
  --txt2:  #566178;
  --txt3:  #8993a6;
  --pos:   #1a73e8;      /* "positive/up" — a second Google Blue tone, NOT green by design */
  --neg:   #ea4335;      /* Google Red */
  --neu:   #8993a6;
  --brk:   #ea4335;
  --accent:#fbbc05;      /* Google Yellow — highlights, stars, sponsor accents */
  --online:#4285f4;      /* status dots on the navy header/footer */
  --g-blue:#4285f4; --g-red:#ea4335; --g-yellow:#fbbc05; --g-green:#34a853; /* g-green: ONLY for the bscstrategy.org partner logo mark, never our own UI */
  --shadow: 0 8px 24px rgba(11,18,32,.08);         /* matches bscstrategy.org's own card shadow */
  --shadow-hover: 0 12px 30px rgba(11,18,32,.12);
  --img-bg: #e8ebf0;
  --hdr-bg: var(--navy);
}

/* ── DARK THEME — navy dark mode, same brand family ───────────────────────── */
[data-theme="ultra-dark"] {
  --bg0:   #0a1526;
  --bg1:   #101f38;
  --bg2:   #16294a;
  --bg3:   #1c3155;
  --bg4:   #223a61;
  --bd0:   rgba(255,255,255,0.06);
  --bd1:   rgba(255,255,255,0.11);
  --bd2:   rgba(255,255,255,0.18);
  --navy:  #26365e;      /* solid brand blue — chips, buttons, boot splash */
  --navy2: #304578;
  --glass:        rgba(38, 58, 100, .55);
  --glass-edge:   rgba(255,255,255,.12);
  --gold:  #669df6;      /* Google Blue, lightened for dark bg contrast */
  --gold2: #4285f4;
  --txt:   #eaf0fb;
  --txt2:  #a9b8d4;
  --txt3:  #6c7ea3;
  --pos:   #8ab4f8;      /* "positive/up" — a lighter Google Blue, NOT green by design */
  --neg:   #ff6f61;
  --neu:   #6c7ea3;
  --brk:   #ff6f61;
  --accent:#fdd663;
  --online:#669df6;
  --g-blue:#669df6; --g-red:#ff6f61; --g-yellow:#fdd663; --g-green:#5bb974; /* g-green: ONLY for the bscstrategy.org partner logo mark */
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --shadow-hover: 0 12px 30px rgba(0,0,0,.36);
  --img-bg: #16294a;
  --hdr-bg: var(--navy);
}

/* ── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg0);
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { display: block; max-width: 100%; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: var(--r-pill); }

/* ── HEADER — white bar (kept white on purpose: the live index/ticker
   figures below need to stay legible, and white matches bscstrategy.org's
   own header) ──────────────────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; height: 52px;
  background: var(--bg1);
  border-bottom: 1px solid var(--bd1);
  padding: 0 14px; gap: 8px;
  box-shadow: 0 2px 14px rgba(15,30,60,.06);
}

.hdr-logo {
  display: flex; align-items: baseline; gap: 0;
  cursor: pointer; flex-shrink: 0; user-select: none;
}
/* BSC in its real brand colors — same treatment as the bscstrategy.org logo:
   B blue, S red, C green. Never an icon, just the colored wordmark. Shared
   utility classes so every "BSC" on the site (header, boot splash, side
   panel) uses the exact same three colors. */
.bsc-b { color: #4285f4; }
.bsc-s { color: #ea4335; }
.bsc-c { color: #34a853; }
.hdr-logo-b, .hdr-logo-sc {
  font-family: var(--sans); font-weight: 700;
  font-size: 18px; letter-spacing: -.5px;
}
/* Full-strength brand colors — safe now that the header is white, no need
   for the desaturated variants a blue background used to require. */
.hdr-logo-b { color: #4285f4; }
.hdr-logo-sc .hdr-s { color: #ea4335; }
.hdr-logo-sc .hdr-c { color: #34a853; }
.hdr-logo-news {
  font-family: var(--sans); font-weight: 300;
  font-size: 16px; color: var(--txt);
  letter-spacing: 1px; margin-left: 4px;
}

.hdr-divider { width: 1px; height: 24px; background: var(--bd1); flex-shrink: 0; }

/* ── INDICES CAROUSEL ──────────────────────────────────────────────────── */
.indices-strip {
  flex: 1; min-width: 0; overflow: hidden;
  display: flex; align-items: center; height: 100%;
  mask-image: linear-gradient(90deg, transparent, black 12px, black calc(100% - 12px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12px, black calc(100% - 12px), transparent);
}
.indices-track {
  display: flex; align-items: center;
  flex-wrap: nowrap; white-space: nowrap;
  animation: idx-scroll 70s linear infinite;
  will-change: transform;
}
.indices-track:hover { animation-play-state: paused; }
@keyframes idx-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.idx-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 12px; height: 52px;
  cursor: pointer; flex-shrink: 0;
  transition: background .1s;
}
.idx-item:hover { background: rgba(15,30,60,.04); }
.idx-flag { display: block; width: 16px; height: 12px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.idx-sym {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  color: var(--txt3); letter-spacing: .3px;
  white-space: nowrap;
}
.idx-chg {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.idx-chg.up   { color: var(--pos); }
.idx-chg.down { color: var(--neg); }
.idx-chg.flat { color: var(--txt3); }

/* ── HEADER RIGHT ───────────────────────────────────────────────────────── */
.hdr-right {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.hdr-stat {
  display: flex; align-items: center; gap: 5px; padding: 5px 10px;
  background: rgba(15,30,60,.05); border-radius: var(--r-pill);
  flex-shrink: 0;
}
.hdr-stat-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bd2); flex-shrink: 0;
}
.hdr-stat-dot.online { background: var(--pos); box-shadow: 0 0 6px var(--pos); }
.hdr-stat-dot.error  { background: var(--neg); }
.hdr-stat-val {
  font-family: var(--mono); font-size: 11px;
  font-weight: 700; color: var(--txt);
}
.hdr-stat-lbl {
  font-family: var(--mono); font-size: 8px;
  letter-spacing: 1px; color: var(--txt3);
}

.hdr-btn {
  display: flex; align-items: center; justify-content: center;
  height: 32px; min-width: 32px; padding: 0 8px;
  background: rgba(15,30,60,.05); border: none; border-radius: var(--r-pill);
  color: var(--txt2); font-size: 14px; transition: all .12s;
  flex-shrink: 0;
}
.hdr-btn:hover { background: rgba(15,30,60,.09); color: var(--txt); }
.hdr-btn.active { background: var(--gold); color: #fff; }
.hdr-btn-icon.spin { animation: spin .6s linear infinite; }
.hdr-btn-pause.paused { background: var(--brk); color: #fff; }
.hdr-btn-screener {
  gap: 5px; width: auto; padding: 0 12px;
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
  font-family: var(--sans); color: #fff; background: var(--gold);
}
.hdr-btn-screener:hover { background: var(--gold2); }
.hdr-btn-mundo { background: rgba(15,30,60,.05); color: var(--txt2); }
.hdr-btn-label { display: inline; }
.hdr-btn-svg { width: 15px; height: 15px; flex-shrink: 0; display: block; }

.hdr-seg {
  display: flex; background: rgba(15,30,60,.05);
  border-radius: var(--r-pill); overflow: hidden;
}
.hdr-seg-btn {
  padding: 6px 10px; font-family: var(--sans);
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
  color: var(--txt3); transition: all .12s;
}
.hdr-seg-btn.active { background: var(--gold); color: #fff; border-radius: var(--r-pill); }
.hdr-seg-btn:hover  { color: var(--txt); }

/* ── NAV DROPDOWN (hamburger) ───────────────────────────────────────────── */
.nav-menu {
  position: absolute; top: 100%; right: 8px; z-index: 300;
  min-width: 250px; padding: 6px;
  background: var(--bg1); border: 1px solid var(--bd1);
  border-radius: var(--r-lg); box-shadow: var(--shadow-hover);
  display: none; flex-direction: column;
}
.nav-menu.open { display: flex; }
.nav-menu-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: var(--r-md);
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  color: var(--txt); text-decoration: none; transition: background .1s;
}
.nav-menu-item:hover { background: var(--bg2); text-decoration: none; }
.nav-menu-ico { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-menu-sep { height: 1px; background: var(--bd1); margin: 4px 8px; }
.nav-menu-sponsor { color: #0c2454; }
.nav-menu-lang {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(15,30,60,.05); border-radius: var(--r-pill);
}
.nav-menu-lang .hdr-seg-btn { flex: 1; padding: 8px 0; }

.hdr { position: sticky; } /* anchor for the absolute dropdown */

.menu-icon { display: flex; flex-direction: column; gap: 3px; }
.menu-icon span {
  display: block; width: 15px; height: 1.5px;
  background: var(--txt2); border-radius: 1px; transition: all .2s;
}
.hdr-btn-menu.active .menu-icon span:nth-child(1) { transform: rotate(45deg) translate(3px, 3px); }
.hdr-btn-menu.active .menu-icon span:nth-child(2) { opacity: 0; }
.hdr-btn-menu.active .menu-icon span:nth-child(3) { transform: rotate(-45deg) translate(3px, -3px); }

/* ── BREAKING TICKER BAR ───────────────────────────────────────────────── */
.breaking-bar {
  display: flex; align-items: center;
  height: 30px; overflow: hidden;
  background: var(--bg1);
  border-bottom: 1px solid var(--bd1);
  position: sticky; top: 52px; z-index: 190;
  flex-shrink: 0;
}
.brk-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px; height: 100%;
  background: var(--brk); flex-shrink: 0;
}
.brk-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
  animation: pulse-ring 1.2s ease-out infinite;
}
.brk-lbl {
  font-family: var(--sans); font-size: 9px; font-weight: 700;
  letter-spacing: 1.5px; color: #fff; white-space: nowrap;
}
.brk-sports-btn {
  display: flex; align-items: center; flex-shrink: 0;
  padding: 5px 12px; font-family: var(--sans); font-size: 10.5px; font-weight: 700;
  letter-spacing: .3px; color: #1e7e34; background: rgba(52,168,83,.14);
  border-radius: var(--r-pill); white-space: nowrap; transition: background .15s ease;
}
.brk-sports-btn:hover { background: rgba(52,168,83,.24); }
@media (max-width: 600px) { .brk-sports-btn { padding: 4px 9px; font-size: 9px; } }
.brk-carousel-wrap {
  flex: 1; overflow: hidden; height: 100%;
  display: flex; align-items: center;
  mask-image: linear-gradient(90deg, transparent, black 20px, black calc(100% - 20px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 20px, black calc(100% - 20px), transparent);
}
.brk-carousel {
  display: flex; align-items: center;
  white-space: nowrap; height: 100%;
  animation: scroll-x 140s linear infinite; /* fallback; JS sets the real duration from content width */
  will-change: transform;
}
.brk-carousel:hover { animation-play-state: paused; }
@keyframes scroll-x {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.brk-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 16px; cursor: pointer;
  border-right: 1px solid var(--bd0);
  height: 30px; transition: background .1s; flex-shrink: 0;
}
.brk-item:hover { background: var(--bg2); }
.brk-item-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.brk-item-dot.pos { background: var(--pos); }
.brk-item-dot.neg { background: var(--neg); }
.brk-item-src {
  font-family: var(--sans); font-size: 9px; font-weight: 700;
  color: var(--gold); text-transform: uppercase; letter-spacing: .2px;
  white-space: nowrap;
}
.brk-item-title {
  font-size: 11px; font-weight: 500; color: var(--txt);
  white-space: nowrap;
}
.brk-item-ago {
  font-family: var(--mono); font-size: 9px; color: var(--txt3);
  white-space: nowrap;
}
.brk-meta {
  display: flex; align-items: center; gap: 5px;
  padding: 0 10px; flex-shrink: 0;
  font-family: var(--mono); font-size: 9px; color: var(--txt3);
}
.brk-sep { color: var(--bd2); }

/* ── SIDE PANEL ─────────────────────────────────────────────────────────── */
.panel-overlay {
  position: fixed; inset: 0; z-index: 299;
  background: rgba(10,20,40,0); pointer-events: none;
  transition: background .25s;
}
.panel-overlay.show {
  background: rgba(10,20,40,.45); pointer-events: all;
}
.side-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 300;
  width: min(360px, 95vw);
  background: var(--bg1); box-shadow: -4px 0 24px rgba(15,30,60,.14);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.side-panel.open { transform: translateX(0); }

.sp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--bd1); flex-shrink: 0;
  background: var(--navy);
}
.sp-logo { display: flex; align-items: baseline; gap: 1px; }
.sp-logo-b  { font-weight: 700; font-size: 16px; color: var(--gold); }
.sp-logo-rest { font-weight: 300; font-size: 12px; color: rgba(255,255,255,.6); letter-spacing: 1.5px; }
.sp-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none;
  color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.sp-close:hover { background: var(--brk); }

.sp-nav {
  display: flex; border-bottom: 1px solid var(--bd1); flex-shrink: 0;
  background: var(--bg2); padding: 6px; gap: 4px;
}
.sp-nav-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px; padding: 8px 4px;
  font-family: var(--sans); font-size: 8px; font-weight: 700;
  letter-spacing: .4px; color: var(--txt3);
  border-radius: var(--r-sm); transition: all .12s;
}
.sp-nav-btn.active  { color: #fff; background: var(--gold); }
.sp-nav-btn:hover:not(.active) { color: var(--txt); background: var(--bg3); }
.sp-nav-icon { font-size: 14px; }

.sp-tab { display: none; flex: 1; overflow-y: auto; padding: 12px; }
.sp-tab.active { display: block; }

.sp-section { margin-bottom: 16px; }
.sp-label {
  font-family: var(--sans); font-size: 9px; font-weight: 700;
  letter-spacing: 1.2px; color: var(--txt3);
  text-transform: uppercase; margin-bottom: 6px;
}
.sp-hint {
  font-size: 11px; color: var(--txt2); line-height: 1.5;
  margin-bottom: 6px; padding: 8px 10px;
  background: var(--bg2); border-radius: var(--r-md);
}
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600;
  color: var(--txt2); background: var(--bg2);
  border: 1px solid transparent;
  cursor: pointer; transition: all .12s; user-select: none;
}
.chip:hover { background: var(--bg3); color: var(--txt); }
.chip.active { background: var(--navy); color: #fff; }
.chip-pos { color: var(--pos); }
.chip-pos.active { background: var(--pos); color: #fff; }
.chip-neg { color: var(--neg); }
.chip-neg.active { background: var(--neg); color: #fff; }

.sp-input {
  width: 100%; padding: 9px 12px;
  background: var(--bg2); border: 1px solid var(--bd1);
  border-radius: var(--r-md); color: var(--txt);
  font-size: 12px; outline: none;
  transition: border-color .12s;
  font-family: var(--sans);
}
.sp-input:focus { border-color: var(--gold); background: var(--bg1); }
.sp-input::placeholder { color: var(--txt3); }

.sp-actions { display: flex; gap: 8px; margin-top: 10px; }
.sp-btn {
  flex: 1; padding: 10px 14px; border-radius: var(--r-md);
  font-size: 12px; font-weight: 700; letter-spacing: .2px;
  transition: all .12s; font-family: var(--sans);
}
.sp-btn-reset { background: var(--bg2); color: var(--txt2); }
.sp-btn-reset:hover { background: var(--bg3); color: var(--neg); }
.sp-btn-apply { background: var(--gold); color: #fff; }
.sp-btn-apply:hover { background: var(--gold2); }

.sp-count { font-family: var(--mono); font-size: 10px; color: var(--txt3); }
.sp-ticker-add { display: flex; gap: 6px; margin-bottom: 8px; }
.sp-ticker-add .sp-input { flex: 1; }
.sp-ticker-add .sp-btn { flex: 0 0 auto; width: auto; }
.sp-ticker-list { display: flex; flex-wrap: wrap; gap: 5px; min-height: 16px; }

.ticker-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; background: var(--navy);
  border-radius: var(--r-pill);
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  color: #fff; cursor: pointer; transition: all .12s;
}
.ticker-tag:hover { background: var(--navy2); }
.ticker-tag-x { color: rgba(255,255,255,.6); font-size: 10px; }
.ticker-tag-x:hover { color: #fff; }

.sp-ticker-cloud { display: flex; flex-wrap: wrap; gap: 5px; }
.ticker-cloud-item {
  padding: 4px 9px; border-radius: var(--r-pill);
  background: var(--bg2); border: 1px solid var(--bd1);
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  color: var(--txt2); cursor: pointer; transition: all .12s;
}
.ticker-cloud-item:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

.sp-active-ticker {
  padding: 8px 10px; background: var(--bg2);
  border-radius: var(--r-md);
}
.sp-no-ticker { font-size: 11px; color: var(--txt3); }

.sp-col-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.sp-col-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--bg2);
  border-radius: var(--r-md);
  transition: box-shadow .12s;
}
.sp-col-row:hover { box-shadow: var(--shadow); }
.sp-col-drag { color: var(--txt3); font-size: 13px; cursor: grab; }
.sp-col-icon {
  font-family: var(--sans); font-size: 8px; font-weight: 800;
  color: #fff; background: var(--gold); padding: 3px 6px; border-radius: var(--r-sm);
}
.sp-col-name { font-size: 12px; font-weight: 600; flex: 1; }
.sp-switch { position: relative; width: 34px; height: 18px; }
.sp-switch input { opacity: 0; width: 0; height: 0; }
.sp-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--bd2); border-radius: var(--r-pill);
  transition: all .2s;
}
.sp-slider::before {
  content: ''; position: absolute;
  width: 12px; height: 12px;
  left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.sp-switch input:checked + .sp-slider { background: var(--gold); }
.sp-switch input:checked + .sp-slider::before { transform: translateX(16px); }

/* Theme grid — 2 themes only */
.sp-theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-theme-card {
  padding: 8px; border-radius: var(--r-md);
  background: var(--bg2); border: 2px solid transparent;
  cursor: pointer; transition: all .12s; text-align: center;
}
.sp-theme-card.active { border-color: var(--gold); }
.sp-theme-card span { font-size: 10px; color: var(--txt2); font-weight: 600; }
.sp-theme-preview { height: 34px; border-radius: var(--r-sm); margin-bottom: 7px; }
.preview-dark  { background: linear-gradient(135deg, #0a1526 0%, #16294a 60%, #669df6 100%); }
.preview-light { background: linear-gradient(135deg, #f4f6f9 0%, #ffffff 60%, #4285f4 100%); }

.sp-toggle-list { display: flex; flex-direction: column; gap: 6px; }
.sp-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px; background: var(--bg2); border-radius: var(--r-md);
  cursor: pointer; font-size: 12px;
}
.sp-about { border-top: 1px solid var(--bd1); padding-top: 12px; }
.sp-about-txt { font-size: 11px; color: var(--txt3); margin-bottom: 5px; font-family: var(--mono); }
.sp-about-links { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.sp-link { font-size: 12px; color: var(--gold); font-weight: 600; }
.sp-link:hover { text-decoration: underline; }

/* ── MAIN ───────────────────────────────────────────────────────────────── */
.main { padding: 0; }

/* ── BREAKING NEWS SECTION — "Top stories" style row of cards ────────────── */
.breaking-section {
  background: var(--bg0);
  padding: 16px 16px 14px;
  border-top: 3px solid var(--brk);
}
.bs-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}
.bs-header .bs-timer { margin-left: auto; }
.bs-title { display: flex; align-items: center; gap: 9px; }
.bs-pulse {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brk); flex-shrink: 0;
  animation: pulse-ring 1.4s ease-out infinite;
}
.bs-title-text {
  font-family: var(--sans); font-size: 15px; font-weight: 800;
  letter-spacing: -.2px; color: var(--brk); text-transform: uppercase;
}
.bs-count {
  font-family: var(--mono); font-size: 9px; color: var(--txt3);
  background: var(--bg2);
  padding: 2px 7px; border-radius: var(--r-pill);
}
.bs-timer {
  flex: 1; height: 3px; background: var(--bd1);
  border-radius: var(--r-pill); overflow: hidden; max-width: 120px;
}
.bs-timer-bar {
  height: 100%; background: var(--brk);
  width: 100%; border-radius: var(--r-pill);
  animation: timer-shrink 15s linear infinite;
}
@keyframes timer-shrink { 0% { width: 100%; } 100% { width: 0%; } }

/* Cards row: ABSOLUTE single row. Any overflow scrolls horizontally. */
.bs-cards {
  display: flex !important;
  flex-wrap: nowrap !important;          /* NEVER wraps */
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden !important;         /* NEVER grows vertically */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.bs-cards::-webkit-scrollbar { display: none; }

.bs-card {
  flex: 0 0 210px;                       /* fixed width, never grows/shrinks */
  width: 210px;
  min-height: 190px;
  max-height: 240px;
  background: var(--bg1);
  border-radius: var(--r-lg); padding: 0;
  border: var(--card-border);
  cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.bs-card.skel-card {
  cursor: default;
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.bs-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(66,133,244,.32);
  transform: translateY(-2px);
}

.bs-card-source {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--sans); font-size: 9px; font-weight: 700;
  color: var(--txt2); letter-spacing: .1px;
  flex-shrink: 0;
  padding: 9px 10px 6px;
}
.bs-card-source-logo {
  width: 13px; height: 13px; border-radius: 3px;
  object-fit: contain; background: var(--img-bg);
  flex-shrink: 0;
}

/* Image wrapper — FIXED HEIGHT. Every card shows a visual. */
.bs-card-img-wrap {
  width: 100%; height: 100px; flex-shrink: 0;
  overflow: hidden;
  background: var(--img-bg);
}
.bs-card-img {
  width: 100%; height: 100px; object-fit: cover; display: block;
}

.bs-card-title {
  font-size: 12px; font-weight: 600; line-height: 1.4;
  color: var(--txt); flex: 1; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  padding: 8px 10px 0;
}
.bs-card-footer {
  display: flex; align-items: center; gap: 6px; margin-top: auto;
  flex-shrink: 0; padding: 8px 10px 10px;
}
.bs-card-time { font-family: var(--mono); font-size: 9px; color: var(--txt3); }

/* ── SPONSOR BANNER ─────────────────────────────────────────────────────────
   Matches bscstrategy.org's actual identity (inspected live, not guessed):
   white surface, Roboto, navy #0c2454 text, and their real logo lettering
   colors — B blue / S red / C green, the same mapping their own SVG mark
   uses (confirmed via the site's own stop-color / span colors).
─────────────────────────────────────────────────────────────────────────── */
.sponsor-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 0 16px 14px; padding: 15px 20px 14px;
  background: var(--bg1);
  border-radius: var(--r-lg);
  color: #0c2454; text-decoration: none;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s;
  position: relative; overflow: hidden;
  cursor: pointer;
}
.sponsor-banner:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); text-decoration: none; }
.sponsor-banner::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(480px 120px at 88% -30%, rgba(66,133,244,.10), transparent 70%);
  pointer-events: none;
}
/* Google-colors hairline across the top — same signature bar as bscstrategy.org */
.sponsor-banner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg,
    var(--g-blue) 0 25%, var(--g-red) 25% 50%,
    var(--g-yellow) 50% 75%, var(--g-green) 75% 100%);
}
.sponsor-eyebrow {
  position: absolute; top: 8px; right: 12px;
  font-family: var(--sans); font-size: 8px; font-weight: 700;
  letter-spacing: 1.2px; color: var(--txt3);
}
.sponsor-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }
/* BSC's real identity: chevron logo + wordmark with B blue / S red / C green,
   thin "Strategy", navy #0c2454 headings — mirrors bscstrategy.org's header. */
.sponsor-mark {
  flex-shrink: 0; display: flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-weight: 900; font-size: 16px;
  letter-spacing: -.3px;
}
.sponsor-chevron { height: 30px; width: auto; display: block; flex-shrink: 0; }
.sponsor-mark .g-b { color: var(--g-blue); }
.sponsor-mark .g-s { color: var(--g-red); }
.sponsor-mark .g-c { color: var(--g-green); }
.sponsor-mark-rest { font-weight: 300; color: #0c2454; }
.sponsor-title { font-size: 14px; font-weight: 700; letter-spacing: -.2px; margin-bottom: 2px; color: #0c2454; }
.sponsor-sub { font-size: 11px; color: var(--txt2); line-height: 1.4; }
.sponsor-stats { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.sponsor-stat {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  color: #0c2454; background: var(--bg2);
  padding: 5px 10px; border-radius: var(--r-pill); white-space: nowrap;
}
/* CTA in WhatsApp green — the exact primary CTA used on bscstrategy.org */
.sponsor-cta {
  flex-shrink: 0; display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: #fff;
  background: #25D366; padding: 9px 16px; border-radius: 6px;
  white-space: nowrap; transition: background .12s;
  box-shadow: 0 2px 8px rgba(37,211,102,.28);
}
.sponsor-banner:hover .sponsor-cta { background: #1ebd5b; }
.sponsor-wa-icon { width: 16px; height: 16px; flex-shrink: 0; }
.sponsor-arrow { transition: transform .15s; }
.sponsor-banner:hover .sponsor-arrow { transform: translateX(3px); }

/* Native sponsored card — master-sponsor treatment: brand hairline on the
   left, soft blue wash, BSC lettermark row, mini-CTA. Same card shell as a
   real news item so it belongs in the feed instead of interrupting it. */
.news-item.is-sponsored {
  background: linear-gradient(135deg, var(--bg1) 0%, rgba(66,133,244,.06) 100%);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(66,133,244,.18);
  border-left: 3px solid var(--g-blue);
}
.news-item.is-sponsored:hover {
  box-shadow: var(--shadow-hover), inset 0 0 0 1px rgba(66,133,244,.30);
}
.sponsored-tag {
  display: inline-flex; align-items: center;
  font-family: var(--sans); font-size: 8px; font-weight: 700;
  letter-spacing: .6px; color: var(--gold2);
  background: rgba(66,133,244,.10); padding: 2px 7px; border-radius: var(--r-pill);
}
.sp-card-brand {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--sans); font-weight: 900; font-size: 11px; letter-spacing: -.2px;
}
.sp-card-chevron { height: 15px; width: auto; display: block; flex-shrink: 0; }
.sp-card-brand .g-b { color: var(--g-blue); }
.sp-card-brand .g-s { color: var(--g-red); }
.sp-card-brand .g-c { color: var(--g-green); }
.sp-card-brand em { font-style: normal; font-weight: 300; color: #0c2454; }
.news-item.is-sponsored .ni-title { color: #0c2454; }
/* Mini WhatsApp CTA — same green as the sponsor's own site */
.sp-card-cta {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 6px;
  background: #25D366; color: #fff;
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  transition: background .12s;
}
.news-item.is-sponsored:hover .sp-card-cta { background: #1ebd5b; }

@media (max-width: 700px) {
  .sponsor-stats { display: none; }
  .sponsor-sub { display: none; }
}

/* ── FEED BAR ───────────────────────────────────────────────────────────── */
.feed-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg0);
}
.feed-bar-left  { display: flex; align-items: center; gap: 8px; }
.feed-bar-dot   { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); }
.feed-bar-title {
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  letter-spacing: -.2px; color: var(--txt);
}
.feed-bar-count {
  font-family: var(--mono); font-size: 10px; color: var(--txt2);
  background: var(--bg2);
  padding: 2px 8px; border-radius: var(--r-pill);
}
.feed-bar-right { display: flex; align-items: center; gap: 5px; }
.feed-filter-tags { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.filter-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--r-pill);
  background: rgba(66,133,244,.10); color: var(--gold2);
  font-size: 10px; font-family: var(--sans); font-weight: 600;
}
.filter-tag strong { color: var(--gold2); }
.filter-tag-x { color: var(--txt3); cursor: pointer; }
.filter-tag-x:hover { color: var(--neg); }

/* ── 5-COLUMN GRID — card feed, gutters between columns and cards ────────── */
.cols-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding: 0 16px 20px;
}
.news-col {
  display: flex; flex-direction: column;
  min-width: 0;
}

.col-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px 10px;
  flex-shrink: 0;
}
.col-title {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  letter-spacing: -.2px; color: var(--txt);
}
/* Category tag: solid colored pill */
.col-icon {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; letter-spacing: .3px;
  padding: 3px 7px; color: #fff; background: var(--gold);
  font-family: var(--sans); border-radius: var(--r-pill);
}
.col-icon.cat-brazil   { background: var(--accent); color: #1a1a1a; }
.col-icon.cat-markets  { background: var(--gold); }
.col-icon.cat-world    { background: var(--pos); }
.col-icon.cat-military { background: var(--neg); }
.col-icon.cat-tech     { background: #7c5cf0; }
.col-badge {
  font-family: var(--mono); font-size: 9px;
  background: var(--bg2);
  padding: 2px 7px; border-radius: var(--r-pill); color: var(--txt3);
}
.col-refresh-btn {
  width: 24px; height: 24px;
  background: var(--bg1); border-radius: 50%; color: var(--txt3);
  font-size: 11px; display: flex; align-items: center; justify-content: center;
  transition: all .12s; box-shadow: var(--shadow);
}
.col-refresh-btn:hover { color: var(--gold); }
.col-body { flex: 1; overflow-y: auto; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.col-body::-webkit-scrollbar { width: 4px; }
.col-body::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: var(--r-pill); }

/* ── NEWS ITEM — Google-News-style card ───────────────────────────────────
   White rounded card, image on top, subtle shadow. Cards stack with a gap
   (set on .col-body) instead of hairline-divided rows.
─────────────────────────────────────────────────────────────────────────── */
.news-item {
  background: var(--bg1);
  border-radius: var(--r-lg);
  border: var(--card-border);
  padding: 10px 12px 12px;
  cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s;
  box-shadow: var(--shadow);
}
.news-item:hover { box-shadow: var(--shadow-hover); border-color: rgba(66,133,244,.32); transform: translateY(-1px); }
.news-item.is-new { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }

/* Row: small square thumbnail on the left, text content on the right */
.ni-row  { display: flex; align-items: flex-start; gap: 10px; }
.ni-body { flex: 1; min-width: 0; }

/* Source row: source name left, date right — same compact line */
.ni-src-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 5px; margin-bottom: 6px;
}
.ni-src { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1; }
.ni-logo {
  width: 14px; height: 14px; border-radius: 3px;
  object-fit: contain; flex-shrink: 0; background: var(--img-bg);
}
.ni-src-name {
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  color: var(--txt2); letter-spacing: .1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 110px;
}
/* Inline date/time — compact, right-aligned, does NOT add height */
.ni-datetime {
  font-family: var(--mono); font-size: 9px; color: var(--txt3);
  white-space: nowrap; flex-shrink: 0;
}

/* Image wrapper — FIXED HEIGHT. Every item shows a visual: real photo or
   a category-tinted placeholder (never collapses / never blank). */
.ni-img-wrap {
  width: 56px; height: 56px; overflow: hidden; border-radius: var(--r-md);
  background: var(--img-bg); flex-shrink: 0;
}
.ni-img { width: 56px; height: 56px; object-fit: cover; display: block; }

.ni-title {
  font-size: 13px; font-weight: 600; line-height: 1.42;
  color: var(--txt); margin-bottom: 8px; word-break: break-word;
}
.ni-footer { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }

/* Sentiment badges */
.senti-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: var(--r-pill);
  font-family: var(--sans); font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .2px;
}
.senti-badge.pos { background: rgba(26,115,232,.10); color: var(--pos); }
.senti-badge.neg { background: rgba(234,67,53,.10); color: var(--neg); }
.senti-badge.neu { display: none !important; }  /* neutral NEVER shown */

.ticker-badge-sm {
  display: inline-block; padding: 3px 8px; border-radius: var(--r-pill);
  background: rgba(66,133,244,.08);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  color: var(--gold2); cursor: pointer; transition: all .1s;
}
.ticker-badge-sm:hover { background: rgba(66,133,244,.18); }

.im-meta-tag {
  display: inline-block; padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--bg2);
  font-size: 10px; color: var(--txt2); font-family: var(--sans); font-weight: 600;
}
.ni-lang-badge {
  font-family: var(--sans); font-size: 8px; font-weight: 700;
  text-transform: uppercase; color: var(--txt3);
  padding: 1px 4px; border-radius: var(--r-sm); background: var(--bg2);
  margin-left: 4px;
}

/* ── IMAGE PLACEHOLDER ──────────────────────────────────────────────────────
   Shown when a source provides no image (or the image fails to load), so
   every headline still has a consistent visual block — never a blank gap.
─────────────────────────────────────────────────────────────────────────── */
.img-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; position: relative; overflow: hidden;
  background: var(--bg3);
}
/* Small thumbnail box: tag/source-name labels don't fit at 56px, so only
   the source's logo mark is shown, centered. */
.img-ph-tag,
.img-ph-src { display: none; }
.img-ph-logo {
  width: 26px; height: 26px; border-radius: 6px; object-fit: contain;
  background: #fff; padding: 3px; box-shadow: 0 1px 3px rgba(15,30,60,.14);
}
/* keep old icon class harmless if referenced elsewhere */
.img-ph-icon { display: none; }
.img-ph.cat-brazil   { background: linear-gradient(135deg, rgba(251,188,5,.18), var(--bg2) 78%); }
.img-ph.cat-brazil   .img-ph-tag { background: #c79300; }
.img-ph.cat-markets  { background: linear-gradient(135deg, rgba(66,133,244,.16), var(--bg2) 78%); }
.img-ph.cat-markets  .img-ph-tag { background: var(--gold2); }
.img-ph.cat-world    { background: linear-gradient(135deg, rgba(26,115,232,.14), var(--bg2) 78%); }
.img-ph.cat-world    .img-ph-tag { background: var(--pos); }
.img-ph.cat-military { background: linear-gradient(135deg, rgba(234,67,53,.14), var(--bg2) 78%); }
.img-ph.cat-military .img-ph-tag { background: var(--neg); }
.img-ph.cat-tech     { background: linear-gradient(135deg, rgba(124,92,240,.14), var(--bg2) 78%); }
.img-ph.cat-tech     .img-ph-tag { background: #7c5cf0; }

/* Dense mode */
[data-dense="true"] .news-item    { padding: 8px 10px; }
[data-dense="true"] .ni-title     { font-size: 12px; }
[data-dense="true"] .ni-img-wrap  { display: none !important; }
[data-dense="true"] .bs-card-img-wrap { display: none !important; }

/* ── FAQ (SEO/GEO static content) ───────────────────────────────────────── */
.faq-section {
  max-width: 860px; margin: 8px auto 26px; padding: 0 16px;
}
.faq-title {
  font-family: var(--sans); font-size: 16px; font-weight: 700;
  letter-spacing: -.2px; color: var(--txt); margin-bottom: 8px;
}
.faq-intro { font-size: 12px; line-height: 1.6; color: var(--txt2); margin-bottom: 14px; }
.faq-item {
  background: var(--bg1); border: var(--card-border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); margin-bottom: 8px; overflow: hidden;
}
.faq-item summary {
  padding: 12px 14px; cursor: pointer; list-style: none;
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--txt);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  transition: background .12s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 16px; font-weight: 400; color: var(--txt3);
  flex-shrink: 0; transition: transform .15s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { background: var(--bg2); }
.faq-item p {
  padding: 0 14px 13px; font-size: 12.5px; line-height: 1.65; color: var(--txt2);
}
.faq-item a { color: var(--gold2); font-weight: 600; }

/* ── EMPTY / SKELETON ───────────────────────────────────────────────────── */
.col-empty {
  padding: 40px 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--bg1); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.col-empty-icon { font-size: 28px; opacity: .3; }
.col-empty-txt  { font-size: 11px; color: var(--txt3); line-height: 1.5; }

.skeleton-item { padding: 12px; background: var(--bg1); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.skel {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm); height: 9px; margin-bottom: 5px;
}
.w90 { width: 90%; } .w75 { width: 75%; } .w50 { width: 50%; } .w30 { width: 30%; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── ITEM MODAL ─────────────────────────────────────────────────────────── */
.item-modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .18s;
  padding: 16px;
}
.item-modal.show { opacity: 1; pointer-events: all; }
.im-backdrop {
  position: absolute; inset: 0;
  background: rgba(10,20,40,.55);
}
.im-card {
  position: relative; z-index: 1;
  width: min(560px, 93vw); max-height: 85vh;
  background: var(--bg1);
  border-radius: var(--r-lg); display: flex; flex-direction: column;
  overflow: hidden;
  transform: scale(.97); transition: transform .15s;
  box-shadow: 0 20px 60px rgba(10,20,40,.35);
}
.item-modal.show .im-card { transform: scale(1); }
.im-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--bd1);
  flex-shrink: 0;
}
.im-source-wrap {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--txt2);
}
.im-source-logo {
  width: 16px; height: 16px; border-radius: 4px;
  object-fit: contain; background: var(--img-bg);
}
.im-close {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg2); color: var(--txt2); font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.im-close:hover { background: var(--neg); color: #fff; }
.im-body {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 11px;
}
.im-img-wrap {
  width: 100%; height: 200px; border-radius: var(--r-md);
  overflow: hidden; background: var(--img-bg);
}
.im-img-wrap img { width: 100%; height: 200px; object-fit: cover; }
.im-img-wrap .img-ph-icon { font-size: 20px; letter-spacing: 3px; }
.im-title { font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--txt); letter-spacing: -.2px; }
.im-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.im-meta-time { font-family: var(--mono); font-size: 10px; color: var(--txt3); }
.im-desc { font-size: 13px; line-height: 1.65; color: var(--txt2); }
.im-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.im-tag {
  padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--bg2);
  font-size: 10px; color: var(--txt2); font-weight: 600;
}
.im-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--bd1);
  flex-shrink: 0;
}
.im-read-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 11px 16px;
  background: var(--gold); border-radius: var(--r-md); color: #fff;
  font-weight: 700; font-size: 12px;
  transition: all .12s; letter-spacing: .1px;
}
.im-read-btn:hover { background: var(--gold2); text-decoration: none; }
.im-arrow { font-size: 14px; }
.im-share {
  padding: 11px 16px; background: var(--bg2);
  border-radius: var(--r-pill);
  color: var(--txt2); font-size: 13px; transition: all .12s;
}
.im-share:hover { background: var(--bg3); color: var(--gold); }

/* ── STATUS BAR / FOOTER — white surface, matches the header ────────────── */
.status-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 34px; padding: 0 16px;
  background: var(--bg1);
  border-top: 1px solid var(--bd1);
  position: sticky; bottom: 0; z-index: 200; gap: 10px;
  box-shadow: 0 -2px 14px rgba(15,30,60,.05);
}
.sb-left  { display: flex; align-items: center; gap: 6px; }
.sb-dot   { width: 7px; height: 7px; border-radius: 50%; background: var(--bd2); flex-shrink: 0; }
.sb-dot.online { background: var(--pos); box-shadow: 0 0 6px var(--pos); }
.sb-dot.error  { background: var(--neg); animation: blink-dot 1s infinite; }
@keyframes blink-dot { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.sb-txt {
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  letter-spacing: .5px; color: var(--txt2);
}
.sb-center {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; color: var(--txt3);
}
.sb-sep { color: var(--bd2); }
.sb-right { display: flex; align-items: center; gap: 10px; }
.sb-brand { font-family: var(--sans); font-size: 9px; color: var(--txt3); }
.sb-admin {
  font-family: var(--sans); font-size: 9px; letter-spacing: .5px;
  color: var(--txt2); font-weight: 700;
  padding: 3px 8px; border-radius: var(--r-pill); background: var(--bg2);
}
.sb-admin:hover { background: var(--gold); color: #fff; text-decoration: none; }

/* ── TOASTS ─────────────────────────────────────────────────────────────── */
.toasts {
  position: fixed; bottom: 44px; right: 14px; z-index: 999;
  display: flex; flex-direction: column-reverse; gap: 6px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--bg1);
  border-radius: var(--r-md);
  font-size: 12px; color: var(--txt); font-weight: 500;
  pointer-events: all;
  box-shadow: var(--shadow-hover);
  animation: toast-in .22s ease;
  transition: opacity .28s, transform .28s;
}
.toast.out { opacity: 0; transform: translateX(10px); }
.toast-icon { font-size: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* ── MISC ───────────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.7); }
  70%  { box-shadow: 0 0 0 4px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.no-anim * { animation: none !important; transition: none !important; }

/* ── DARK THEME — EXTRA OVERRIDES ─────────────────────────────────────── */
[data-theme="ultra-dark"] .hdr { box-shadow: 0 1px 0 rgba(255,255,255,.06); }
[data-theme="ultra-dark"] .im-backdrop { background: rgba(0,0,0,.7); }

/* ── RESPONSIVE / MOBILE ────────────────────────────────────────────────── */

/* Wide laptop: 5 columns get too narrow below ~1350px — drop to 3, page scrolls */
@media (max-width: 1350px) and (min-width: 901px) {
  .cols-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .cols-grid {
    display: flex; overflow-x: auto; gap: 12px; padding: 0 12px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  /* Fixed flex-basis: with basis:auto a column sizes to its intrinsic
     content width (a single long word/URL blew columns up to ~900px). */
  .news-col { flex: 0 0 84vw; min-width: 0; max-width: 84vw; scroll-snap-align: start; }
  .news-item { min-width: 0; }
  .sb-center  { display: none; }
  .sb-brand   { display: none; }
  .hdr-btn-label { display: none; }
  .hdr-btn-screener, .hdr-btn-mundo { min-width: 32px; padding: 0 8px; }
}

@media (max-width: 600px) {
  html { font-size: 13px; }
  .hdr { height: 46px; padding: 0 8px; gap: 5px; }
  .breaking-bar { top: 46px; } /* header shrinks to 46px here — the bar's sticky offset must match or a gap of bare background shows through */
  .hdr-logo-b, .hdr-logo-sc, .hdr-logo-news { font-size: 15px; }
  .hdr-logo-hub { font-size: 13px; }

  /* Header: keep logo, live indices, MARKETS/MUNDO icons, language and menu.
     Secondary chrome (item counter, pause, divider) is hidden — the strip of
     live index data is the hero here and needs the width. */
  .hdr-stat    { display: none; }
  .hdr-divider { display: none; }
  .hdr-btn-pause { display: none; }
  .hdr-btn-refresh, #btnRefresh { display: none; }
  .idx-item { padding: 0 9px; }
  .hdr-seg-btn { padding: 5px 7px; font-size: 9px; }
  .hdr-btn { height: 30px; min-width: 30px; }

  /* Breaking ticker: drop the count/clock block, keep headlines + election */
  .brk-meta { display: none; }

  .breaking-section { padding: 10px 12px 8px; }
  .bs-card { flex: 0 0 168px; width: 168px; min-height: 178px; }
  .bs-timer { display: none; }

  /* Feed bar wraps instead of overflowing when filters are active */
  .feed-bar { flex-wrap: wrap; gap: 6px; padding: 8px 12px; }

  /* Sponsor banner: single tight column, CTA becomes full-width */
  .sponsor-banner { margin: 0 12px 12px; padding: 12px 14px; gap: 10px; }
  .sponsor-main { min-width: 0; width: 100%; }
  .sponsor-cta { width: 100%; justify-content: center; }
  .sponsor-eyebrow { top: 6px; right: 10px; }

  /* Item modal: bottom-sheet style, full width */
  .item-modal { padding: 0; align-items: flex-end; }
  .im-card {
    width: 100%; max-width: none; max-height: 90vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }
  .im-img-wrap, .im-img-wrap img { height: 160px; }

  /* Toasts don't cover the whole bottom */
  .toasts { left: 10px; right: 10px; bottom: 42px; }
  .toast { font-size: 11px; padding: 8px 12px; }

  /* Side panel takes the full width */
  .side-panel { width: 100vw; }

  /* Status bar: keep ENGINE + ADMIN only (center/brand already hidden ≤900) */
  .status-bar { padding: 0 12px; }
}

@media (max-width: 400px) {
  .news-col { flex-basis: 92vw; max-width: 92vw; }
  .bs-card { flex: 0 0 156px; width: 156px; }
}

/* ============================================================
   WATERMARK LOGO — fixed, translucent, BOTTOM-left, every page.
   ============================================================ */
.brand-watermark {
  position: fixed; bottom: 14px; left: 14px; z-index: 210;
  width: 26px; height: 26px; opacity: .4; transition: opacity .15s ease;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}
.brand-watermark:hover { opacity: .7; }
.brand-watermark img { display: block; width: 100%; height: 100%; }
@media (max-width: 560px) { .brand-watermark { width: 20px; height: 20px; bottom: 10px; left: 10px; } }
