/* ── Variables ── */
:root {
  --bg: #0a0f1c;
  --panel: #111a2f;
  --panel2: #0c1529;
  --muted: #9db0da;
  --txt: #e8efff;
  --accent: #61dafb;
  --accent2: #4fc3f7;
  --line: #1e2d4a;
  --line2: #263252;
  --red: #ff5f6d;
  --orange: #ff9a3c;
  --yellow: #ffd166;
  --cyan: #61dafb;
  --purple: #c084fc;
  --green: #4ade80;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, Arial, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.5;
  /* subtle dot-grid background */
  background-image: radial-gradient(circle, #1a2744 1px, transparent 1px);
  background-size: 28px 28px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; }

/* ── Top scanner bar ── */
.topbar {
  height: 3px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}
.topbar-line {
  display: block;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan 3s linear infinite;
}
@keyframes scan {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(430%); }
}

/* ── Layout ── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  padding: 20px 0;
}

/* ── Hero ── */
.hero {
  padding: 28px 0;
  border-bottom: 1px solid var(--line2);
  background: linear-gradient(180deg, #0d1830 0%, var(--bg) 100%);
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--txt);
}
h1.brand { margin: 0; }
.brand-icon { display: flex; align-items: center; }
.tagline {
  color: var(--muted);
  margin-top: 8px;
  font-size: 14px;
  max-width: 520px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* Status pill */
.hero-status { flex-shrink: 0; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0c1830;
  border: 1px solid var(--line2);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--muted);
}
.status-pill.live { border-color: var(--green); color: var(--green); }
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.status-pill.live .pulse {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: ping 1.5s ease-in-out infinite;
}
@keyframes ping {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
  50%       { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  text-decoration: none;
}
.btn:hover { opacity: .85; transform: translateY(-1px); text-decoration: none; }
.btn-coffee { background: #ffdd00; color: #000; }
.btn-rss    { background: #f26522; color: #fff; }
.btn-x      { background: #000; color: #fff; border: 1px solid #333; }
.btn-articles { background: #2563eb; color: #fff; }
.btn-tools  { background: #e94560; color: #fff; }
.btn-onion { background: #7e22ce; color: #fff; }
.btn-full   { display: flex; justify-content: center; width: 100%; }

/* ── Cards ── */
.card {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 18px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-head h2 { font-size: 15px; font-weight: 700; margin: 0; }
.card-meta    { font-size: 12px; color: var(--muted); }
h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }

/* ── KPIs ── */
.kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.kpi {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: border-color .2s, transform .2s;
}
.kpi:hover { border-color: var(--line2); transform: translateY(-2px); }
.kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-red    { background: rgba(255,95,109,.15); color: var(--red); }
.kpi-orange { background: rgba(255,154,60,.15); color: var(--orange); }
.kpi-yellow { background: rgba(255,209,102,.15); color: var(--yellow); }
.kpi-cyan   { background: rgba(97,218,251,.15); color: var(--cyan); }
.kpi-purple { background: rgba(192,132,252,.15); color: var(--purple); }
.kpi-value  { font-size: 22px; font-weight: 700; line-height: 1.1; }
.kpi-label  { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.3; }

/* ── Featured story ── */
.featured {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 200px;
  transition: border-color .2s;
}
.featured:hover { border-color: var(--accent2); }
.featured-img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
}
.featured-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.featured-badge {
  display: inline-block;
  background: rgba(97,218,251,.15);
  color: var(--accent);
  border: 1px solid rgba(97,218,251,.3);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.featured-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--txt);
}
.featured-title a { color: inherit; }
.featured-title a:hover { color: var(--accent); text-decoration: none; }
.featured-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

/* ── News feed ── */
.feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.item {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.item:hover {
  border-color: var(--line2);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.item-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  loading: lazy;
}
.item-body { padding: 10px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.item-title { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--txt); }
.item-title a { color: inherit; }
.item-title a:hover { color: var(--accent); text-decoration: none; }
.item-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.item-source { font-size: 11px; color: var(--muted); }
.item-time   { font-size: 11px; color: var(--muted); }
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-crit   { background: rgba(255,95,109,.2); color: var(--red); }
.badge-gov    { background: rgba(255,209,102,.2); color: var(--yellow); }
.badge-vendor { background: rgba(192,132,252,.2); color: var(--purple); }

/* ── Sidebar: Watchlist ── */
.watchlist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  transition: background .15s;
  cursor: default;
}
.watchlist li:hover { background: var(--panel2); }
.w-num   { font-size: 11px; font-weight: 700; color: var(--accent); min-width: 20px; font-family: monospace; }
.w-label { font-size: 13px; color: var(--txt); }

/* ── Sidebar: Sources ── */
.sources li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  transition: background .15s;
}
.sources li:hover { background: var(--panel2); }
.src-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.src-dot.active { background: var(--green); }
.src-dot.gov    { background: var(--yellow); }
.src-dot.vendor { background: var(--purple); }
.src-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.src-legend .src-dot { display: inline-block; margin-right: 3px; }
.src-updated { font-size: 11px; margin-top: 8px; }

/* ── Footer ── */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--line2);
  margin-top: 20px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand { font-weight: 700; font-size: 14px; color: var(--txt); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--accent); text-decoration: none; }
.footer-copy { font-size: 12px; color: var(--line2); }

/* ── Muted helper ── */
.muted { color: var(--muted); }

/* ── Fade-in animation for feed ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.item { animation: fadeUp .3s ease both; }

/* ── Responsive ── */
@media (max-width: 1060px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .grid     { grid-template-columns: 1fr; }
  .feed     { grid-template-columns: 1fr; }
  .kpis     { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; }
  .featured-img { min-height: 160px; max-height: 220px; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-status { align-self: flex-start; }
}
@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ── Email subscribe form ── */
.sub-row {
  display: flex;
  gap: 6px;
}
.sub-input {
  flex: 1;
  background: var(--panel2);
  border: 1px solid var(--line2);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--txt);
  outline: none;
  min-width: 0;
  transition: border-color .15s;
}
.sub-input::placeholder { color: var(--muted); }
.sub-input:focus { border-color: var(--accent); }
.sub-btn {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  white-space: nowrap;
  padding: 7px 14px;
  border: none;
}
.sub-btn:hover { opacity: .85; transform: translateY(-1px); }
.sub-msg {
  font-size: 12px;
  margin-top: 7px;
  min-height: 16px;
}
.sub-ok  { color: var(--green); }
.sub-err { color: var(--red); }

/* ── Bitcoin support card ── */
.btc-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 10px;
}
.btc-qr {
  border-radius: 8px;
  border: 1px solid var(--line2);
  display: block;
}
.btc-addr-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel2);
  border: 1px solid var(--line2);
  border-radius: 7px;
  padding: 6px 8px;
}
.btc-addr {
  flex: 1;
  font-family: monospace;
  font-size: 12px;
  color: var(--txt);
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btc-copy {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--line2);
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
  padding: 3px 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.btc-copy:hover { color: #f7931a; border-color: #f7931a; }
