/* Default: Dark */
/* ========== THEMES (variables only) ========== */
/* Default: Dark (already your current palette) */
:root{
  --bg:#0b0f18;
  --card:#0f1625;
  --ink:#e5e7eb;
  --muted:#94a3b8;
  --red:#ef4444;
  --line:#1f2a44;
}

/* Light Theme — white bg + black text */
:root.light{
  --bg:#ffffff;
  --card:#f9fafb;
  --ink:#000000;   /* true black text */
  --muted:#374151; /* darker gray for subtitles on white */
  --red:#dc2626;
  --line:#d1d5db;  /* light gray borders */
}

/* Gray Theme — mid neutral */
:root.gray{
  --bg:#1f2937;
  --card:#374151;
  --ink:#f3f4f6;
  --muted:#9ca3af;
  --red:#ef4444;
  --line:#4b5563;
}

/* Make the body honor theme bg in Light/Gray (override fancy gradient only in Light/Gray) */
:root.light body,
:root.gray body{
  background: var(--bg) !important;
  color: var(--ink);
}

/* Optional: soften card & ticker backgrounds for Light/Gray without changing your classes */
:root.light .news-card,
:root.light .card{
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
:root.gray .news-card,
:root.gray .card{
  background: var(--card);
  border-color: var(--line);
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
}

/* Light theme text overrides */
:root.light .news-card .ttl {
  color: var(--ink);   /* pure black */
}
:root.light .news-card .src,
:root.light .news-card .meta,
:root.light .news-note {
  color: var(--muted); /* darker gray */
}

/* Also make ticker text black in light theme */
:root.light .news-ticker {
  color: var(--ink);
}

:root.light .news-ticker{
  background:#ffffff;
  border-color: var(--line);
}
:root.gray .news-ticker{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
}

:root.gray .news-card .ttl {
  color: var(--ink); /* light ink */
}
:root.gray .news-card .src,
:root.gray .news-card .meta,
:root.gray .news-note {
  color: var(--muted);
}
keyframes
/* Theme button sizing */
.btn.small{ padding:6px 12px; font-size:13px; border-radius:8px; }

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:radial-gradient(1200px 600px at 10% -20%,rgba(239,68,68,.12),transparent 60%),radial-gradient(1000px 500px at 110% 10%,rgba(148,163,184,.12),transparent 60%),var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,Segoe UI,Arial,sans-serif;overflow-x:hidden}
a{color:inherit;text-decoration:none}
.container{max-width:1200px;margin:0 auto;padding:20px}

.btn.small {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}


.topbar{position:sticky;top:0;z-index:50;background:rgba(11,15,24,.6);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.topbar-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 14px}
.brand{display:flex;align-items:center;gap:12px}
.brand .logo-wrap{width:54px;height:54px;border-radius:12px;overflow:hidden;box-shadow:0 8px 20px rgba(0,0,0,.35), inset 0 0 0 1px #22324a}
.brand .logo{width:100%;height:100%;object-fit:cover;display:block}
.brand .name{font-weight:800;letter-spacing:.4px}
.brand .tag{font-size:12px;color:var(--muted)}

.nav{display:flex;gap:10px;flex-wrap:wrap}
.nav a{padding:8px 10px;border-radius:10px;border:1px solid transparent}
.nav a:hover{background:#0f1625;border-color:#22324a}

.hero{padding:64px 16px 36px; position:relative}
.hero .inner{max-width:1000px;margin:0 auto;display:grid;grid-template-columns:1.1fr .9fr;gap:18px;align-items:center}
@media (max-width:860px){ .hero .inner{grid-template-columns:1fr} }

.h-title{font-size:38px;line-height:1.15;margin:0}
.h-sub{color:var(--muted);margin:10px 0 16px;max-width:680px}

.custom-marker .pin{
  display:inline-block;
  width:12px;height:12px;border-radius:50%;
  background:#e11d48; /* red */
  border:2px solid #fff;
  box-shadow:0 0 0 2px rgba(0,0,0,.15), 0 6px 14px rgba(0,0,0,.25);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, Segoe UI, Arial, sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
}

.news-title {
  font-size: 24px;
  font-weight: 700;
}

#latest-news.section { padding-top: 40px; }


.news-card .ttl {
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  margin-bottom: 6px;
}

/* Category bar container */
.pill-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-top: 16px;
}

/* Individual category pills */
.pill {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}

.pill:hover {
  color: var(--red);
}

.pill[aria-pressed="true"] {
  border-color: var(--red);
  color: var(--red);
  font-weight: 600;
}

.pill:focus-visible {
  outline: none;
  border-color: #2d3d61;
}


.news-card .src {
  font-size: 12px;
  color: var(--muted);
}
.news-card .meta {
  font-size: 11px;
  color: var(--muted);
}

.news-ticker {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 9999px;
  background: rgba(255,255,255,0.04);
  font-size: 13px;
  padding: 8px 14px;
}
.news-ticker span {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);

  background: linear-gradient(180deg, var(--card), var(--surface, #10192b));
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;

  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Pill buttons */
.pill {
  appearance: none;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0));
  color: #cdd6e3;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}

.pill:hover {
  background: #0f1625;
  border-color: #2d3d61;
}

.pill[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0));
  border-color: #2d3d61;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  transform: translateY(-1px);
}

.pill:focus-visible {
  outline: 2px solid #2d3d61;
  outline-offset: 2px;
  border-radius: 999px;
}


/* Hover effect: subtle lift */
.btn:hover {
  transform: translateY(-2px);
  border-color: #2d3d61;
  background: linear-gradient(180deg, #1a2336, #0f1625);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

/* Red (primary action) */
.btn.red {
  background: linear-gradient(135deg, var(--red), #b91c1c);
  border-color: #991b1b;
  color: #fff;
  font-weight: 600;
}
.btn.red:hover {
  background: linear-gradient(135deg, #f05252, #dc2626);
  box-shadow: 0 6px 18px rgba(239,68,68,0.35);
}

/* Disabled */
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}


.btn {
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
}
.btn:hover {
  background: #1a2336;
  border-color: #2d3d61;
}

.news-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  border-left: 4px solid var(--red);
  padding-left: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), #10192b);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.btn:hover {
  transform: translateY(-2px);
  border-color: #2d3d61;
  background: linear-gradient(180deg, #1a2336, #0f1625);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.btn.red {
  background: linear-gradient(135deg, var(--red), #b91c1c);
  border-color: #991b1b;
  color: #fff;
  font-weight: 600;
}


.card, .news-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover, .news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.btn-row{display:flex;gap:12px;flex-wrap:wrap}
.btn{
  --ring:0 0 0 0 rgba(239,68,68,.0);
  display:inline-flex;align-items:center;gap:10px;
  padding:12px 16px;border-radius:12px;
  background:linear-gradient(135deg,#181f2f,#0e1422); 
  border:1px solid #22324a;color:var(--ink);
  box-shadow:var(--ring), 0 10px 30px rgba(0,0,0,.35);
  transform:translateZ(0);
  transition:transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
/* --- News block --- */
.news-ticker{
  display:block;
  overflow:hidden;
  white-space:nowrap;
  border:1px solid var(--line);
  border-radius:9999px;
  padding:8px 12px;
  background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,0));
  font-size:12px;
  color:var(--ink);
  box-shadow:0 4px 18px rgba(0,0,0,.25);
}

.news-pager{
  margin-top:10px;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
}
.news-pager .btn[disabled]{ opacity:.5; cursor:not-allowed; }

.news-ticker span{
  display:inline-block;
  padding-left:100%;
  animation:marquee 25s linear infinite;
}
@keyframes marquee{
  0% { transform:translateX(0); }
  100% { transform:translateX(-100%); }
}

.news-grid{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:12px;
}
.news-card{
  background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,0));
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  min-height:120px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.news-card .src{ font-size:11px; color:var(--muted); letter-spacing:.2px; }
.news-card .ttl{ font-weight:700; line-height:1.25; }
.news-card .meta{ font-size:11px; color:var(--muted); }
.news-note{ margin-top:8px; font-size:12px; color:var(--muted); }


.btn:hover{
  transform:translateY(-2px);
  border-color:#2d3d61;
  --ring:0 0 0 8px rgba(239,68,68,.08);
  background:linear-gradient(135deg,#1b2538,#0f1625);
}
.btn.red{
  background:linear-gradient(135deg,#ef4444,#b91c1c);
  border-color:#991b1b;color:#0b0f18;font-weight:700;
}
.btn.red:hover{
  --ring:0 0 0 10px rgba(239,68,68,.18);
  background:linear-gradient(135deg,#f05252,#dc2626);
}

.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;margin-top:24px}
.card{background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,0));border:1px solid var(--line);border-radius:14px;padding:14px;min-height:160px;position:relative;overflow:hidden}
.card h3{margin:0 0 6px;font-size:16px}
.card p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.card .chip{position:absolute;top:12px;right:-20px;transform:rotate(18deg);background:#0f1625;border:1px solid #22324a;color:#cbd5e1;padding:4px 14px;border-radius:999px;font-size:11px}

.section{padding:24px 16px}
.section .inner{max-width:1000px;margin:0 auto}

.footer{border-top:1px solid var(--line);padding:16px;color:var(--muted)}
.footer .inner{max-width:1000px;margin:0 auto;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}

/* ================================
   LIGHT MODE: HERO & GLOBAL TEXT
   ================================ */

/* Hero text flips to black + darker subtitle */
:root.light .h-title { color: var(--ink); }      /* pure black */
:root.light .h-sub   { color: var(--muted); }    /* dark gray */
:root.light .h-eyebrow {
  color: var(--muted);
  background: #ffffff;
  border-color: var(--line);
}

/* Section headings and general text */
:root.light h1, 
:root.light h2, 
:root.light h3 { color: var(--ink); }
:root.light p, 
:root.light li, 
:root.light .tag { color: var(--muted); }

/* Navbar / topbar on light: clean white with subtle border */
:root.light .topbar {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
:root.light .nav a.active, 
:root.light .nav a:hover {
  background: #f3f4f6;              /* light hover chip */
  border-color: var(--line);
}

/* Hero background bubbles are too dark on white—soften or hide */
:root.light .bubble { opacity: .06; }

/* Cards and news elements already got light bg in previous patch,
   but ensure text reads correctly inside news cards */
:root.light .news-card .ttl { color: var(--ink); }
:root.light .news-card .src, 
:root.light .news-card .meta, 
:root.light .news-note { color: var(--muted); }
:root.light .news-ticker { color: var(--ink); }

/* Buttons on Light: keep contrast strong */
:root.light .btn {
  background: linear-gradient(180deg, #ffffff, #f3f4f6);
  border-color: var(--line);
  color: var(--ink);
}
:root.light .btn:hover {
  background: linear-gradient(180deg, #ffffff, #eceff3);
  border-color: #c9ced6;
}
:root.light .btn.red {
  color: #ffffff;               /* keep white label on red */
}

/* Footer text on Light */
:root.light .footer { color: var(--muted); }


/* floating bubbles */
.bubble{position:absolute; border-radius:50%; pointer-events:none; opacity:.12; background:radial-gradient(circle at 30% 30%, rgba(239,68,68,.6), rgba(239,68,68,0))}
.b1{width:200px;height:200px; right:6%; top:-40px; animation:float 12s ease-in-out infinite}
.b2{width:300px;height:300px; left:-80px; top:20px; animation:float 16s ease-in-out infinite reverse}
@keyframes float{0%,100%{transform:translateY(0)} 50%{transform:translateY(14px)}}
