/* WeeklyTrader.io — dark terminal aesthetic, mobile-first */
:root {
  --c-bg: #0d1117;
  --c-surface: #161b22;
  --c-surface-2: #1c232c;
  --c-border: #21262d;
  --c-border-2: #2d343d;
  --c-nav: #0a1628;
  --c-text: #e6edf3;
  --c-text-dim: #8b949e;
  --c-up: #00c896;
  --c-up-bg: rgba(0,200,150,0.12);
  --c-down: #ff4757;
  --c-down-bg: rgba(255,71,87,0.12);
  --c-blue: #4f8eff;
  --c-blue-bg: rgba(79,142,255,0.12);
  --c-gold: #f0b429;

  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

  --shadow-1: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-2: 0 6px 18px rgba(0,0,0,0.35);
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--c-text); margin: 0 0 var(--s-4); line-height: 1.25; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 var(--s-4); color: var(--c-text); }
small, .muted { color: var(--c-text-dim); }
code { font-family: ui-monospace, SF Mono, Menlo, Consolas, monospace; font-size: 0.95em; }

.num, .num * { font-variant-numeric: tabular-nums; font-weight: 700; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--s-4); }

/* Ticker tape */
.ticker-tape {
  background: #05101f;
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
  position: relative;
  height: 36px;
}
.ticker-tape-track {
  display: inline-flex;
  gap: var(--s-5);
  white-space: nowrap;
  will-change: transform;
  align-items: center;
  height: 36px;
  padding: 0 var(--s-4);
  font-size: 0.88rem;
  font-weight: 500;
  animation: ticker-scroll 120s linear infinite;
}
.ticker-tape:hover .ticker-tape-track { animation-play-state: paused; }
.ticker-tape-item { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--c-text); }
.ticker-tape-item .up { color: var(--c-up); }
.ticker-tape-item .down { color: var(--c-down); }
.ticker-tape-item .symbol { font-weight: 700; letter-spacing: 0.02em; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-nav);
  border-bottom: 1px solid var(--c-border);
  backdrop-filter: saturate(140%) blur(6px);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: var(--s-4);
  align-items: center;
  padding-top: var(--s-3);
  padding-bottom: var(--s-3);
}
.logo { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--c-text); text-decoration: none; font-weight: 700; }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: inline-flex; width: 28px; height: 28px;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c-up), var(--c-blue));
  color: #0a1628; border-radius: 6px; font-size: 14px;
}
.logo-text { font-size: 1.05rem; letter-spacing: -0.01em; }
.logo-dot { color: var(--c-up); }

.main-nav { display: flex; gap: var(--s-5); justify-content: center; }
.main-nav a {
  color: var(--c-text-dim);
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--s-2) 0;
  border-bottom: 2px solid transparent;
  transition: color 120ms, border-color 120ms;
}
.main-nav a:hover { color: var(--c-text); text-decoration: none; border-bottom-color: var(--c-blue); }
.main-nav a.nav-cta { color: var(--c-up); }

.search {
  position: relative;
  min-width: 220px;
}
.search .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--c-text-dim); font-size: 0.85rem;
}
.search input {
  width: 100%; padding: 8px 10px 8px 32px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-text); font: inherit; font-size: 0.9rem;
  outline: none;
}
.search input:focus { border-color: var(--c-blue); }

.nav-toggle {
  display: none;
  background: transparent; color: var(--c-text);
  border: 1px solid var(--c-border); padding: 8px 10px;
  border-radius: var(--radius-sm); cursor: pointer;
}

@media (max-width: 900px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .main-nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-3) 0;
    border-top: 1px solid var(--c-border);
    margin-top: var(--s-3);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .search { min-width: 0; }
}

/* Main */
.site-main { padding: var(--s-5) 0 var(--s-7); }
section { margin-bottom: var(--s-7); }

.page-intro { text-align: left; margin-bottom: var(--s-5); }
.page-intro h1 { margin-bottom: var(--s-2); font-size: clamp(1.5rem, 3vw, 2.25rem); }
.page-intro .subheadline { color: var(--c-text-dim); font-size: 1.0625rem; margin-bottom: var(--s-3); max-width: 720px; }

.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); font-size: 0.875rem; color: var(--c-text-dim); margin-bottom: var(--s-4); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
  background: var(--c-surface); border: 1px solid var(--c-border);
  color: var(--c-text);
}
.badge-open { color: var(--c-up); border-color: rgba(0,200,150,0.4); background: var(--c-up-bg); }
.badge-closed { color: var(--c-down); border-color: rgba(255,71,87,0.4); background: var(--c-down-bg); }
.badge-open .dot, .badge-closed .dot {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}
.badge-open .dot { animation: pulse 1.8s infinite; }
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.4; }
}

/* Dashboard grid */
.mover-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 780px) { .mover-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .mover-grid { grid-template-columns: repeat(3, 1fr); } }

.mover-col {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
}
.mover-col-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-4);
}
.mover-col-head h2 { margin: 0; font-size: 1.125rem; }
.mover-col-head a { font-size: 0.85rem; color: var(--c-blue); font-weight: 500; }

.card-stack { display: flex; flex-direction: column; gap: var(--s-3); }

/* Stock card */
.stock-card {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-2) var(--s-4);
  align-items: center;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  text-decoration: none; color: var(--c-text);
}
.stock-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--c-border-2);
  text-decoration: none;
}
.stock-card .sym-row { display: flex; align-items: center; gap: var(--s-2); }
.stock-card .symbol { font-weight: 700; letter-spacing: 0.01em; font-size: 1.05rem; }
.stock-card .company { color: var(--c-text-dim); font-size: 0.85rem; grid-column: 1 / -1; margin-top: -2px; }
.stock-card .price-row {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-1);
}
.stock-card .price { font-weight: 700; font-size: 1.15rem; }
.stock-card .meta {
  grid-column: 1 / -1; display: flex; gap: var(--s-3); justify-content: space-between;
  font-size: 0.78rem; color: var(--c-text-dim); border-top: 1px dashed var(--c-border);
  padding-top: var(--s-2); margin-top: var(--s-1);
  align-items: center;
}
.stock-card .sector {
  padding: 2px 8px; border-radius: 999px;
  background: var(--c-blue-bg); color: var(--c-blue); font-weight: 500;
  font-size: 0.72rem;
}

.pct {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-weight: 700; font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.pct-up { background: var(--c-up-bg); color: var(--c-up); }
.pct-down { background: var(--c-down-bg); color: var(--c-down); }
.pct-flat { background: var(--c-border); color: var(--c-text-dim); }

.up { color: var(--c-up); }
.down { color: var(--c-down); }
.flat { color: var(--c-text-dim); }

/* Market stats pills */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-2);
  padding: var(--s-3);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
}
@media (min-width: 640px) { .stats-bar { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .stats-bar { grid-template-columns: repeat(6, 1fr); } }
.stat-pill {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--s-3);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.stat-pill .label { font-size: 0.72rem; color: var(--c-text-dim); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat-pill .value { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.stat-pill .pct { align-self: flex-start; margin-top: 2px; }

/* Featured movers row */
.featured-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  margin-top: var(--s-4);
}
@media (min-width: 800px) { .featured-row { grid-template-columns: repeat(3, 1fr); } }
.featured-card {
  background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-surface-2) 100%);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
}
.featured-card .head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-3);
}
.featured-card h3 { margin: 0; font-size: 1rem; }
.featured-card .sub { color: var(--c-text-dim); font-size: 0.85rem; margin-bottom: var(--s-3); }
.featured-card .price-big { font-weight: 700; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.sparkline { height: 60px; width: 100%; margin-top: var(--s-3); }

/* Tables (mover pages) */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--c-border); background: var(--c-surface); }
table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 0.92rem;
}
table.data th, table.data td {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
table.data th {
  background: var(--c-surface-2);
  color: var(--c-text-dim);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  user-select: none;
  position: sticky; top: 0;
}
table.data th.sortable::after { content: ' \f0dc'; font-family: 'Font Awesome 6 Free'; font-weight: 900; opacity: 0.4; }
table.data th.sort-asc::after { content: ' \f0de'; opacity: 1; color: var(--c-blue); }
table.data th.sort-desc::after { content: ' \f0dd'; opacity: 1; color: var(--c-blue); }
table.data tbody tr:hover { background: var(--c-surface-2); }
table.data td .symbol { font-weight: 700; color: var(--c-text); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.filters {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  margin-bottom: var(--s-4);
  align-items: center;
}
.filters label { font-size: 0.85rem; color: var(--c-text-dim); display: inline-flex; gap: var(--s-2); align-items: center; }
.filters select, .filters input {
  background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text);
  padding: 6px 10px; border-radius: var(--radius-sm); font: inherit; font-size: 0.9rem;
  min-width: 120px;
}

/* Vol ratio bar */
.vol-ratio { display: inline-flex; align-items: center; gap: var(--s-2); }
.vol-ratio .bar { width: 60px; height: 6px; background: var(--c-border); border-radius: 3px; overflow: hidden; }
.vol-ratio .bar > span { display: block; height: 100%; background: var(--c-gold); }

/* FAQ */
.faq { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: var(--s-5); }
.faq h2 { margin-bottom: var(--s-4); }
.faq details {
  border-top: 1px solid var(--c-border);
  padding: var(--s-3) 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--c-border); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--s-3);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--c-text-dim); font-weight: 700; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: '\2013'; }
.faq .answer { color: var(--c-text-dim); padding-top: var(--s-3); }

.paa-grid {
  display: grid; grid-template-columns: 1fr; gap: var(--s-3);
}
@media (min-width: 720px) { .paa-grid { grid-template-columns: 1fr 1fr; } }
.paa-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
}
.paa-card h3 { font-size: 1rem; margin-bottom: var(--s-2); }
.paa-card p { color: var(--c-text-dim); margin: 0; font-size: 0.92rem; }

/* Newsletter section */
.newsletter-section {
  background: linear-gradient(135deg, rgba(0,200,150,0.08), rgba(79,142,255,0.08));
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  text-align: center;
}
.newsletter-section h2 { margin-bottom: var(--s-2); }
.newsletter-section p { color: var(--c-text-dim); max-width: 640px; margin-left: auto; margin-right: auto; }
.newsletter-form {
  display: flex; gap: var(--s-2); max-width: 520px; margin: var(--s-4) auto 0;
  flex-wrap: wrap;
}
.newsletter-form input[type="email"] {
  flex: 1 1 260px;
  padding: 12px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-text); font: inherit; font-size: 1rem;
  outline: none;
  min-width: 0;
}
.newsletter-form input[type="email"]:focus { border-color: var(--c-up); }
.newsletter-form button { flex: 0 0 auto; }
.newsletter-note { font-size: 0.82rem; color: var(--c-text-dim); margin-top: var(--s-3); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: 12px 18px; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: 1px solid transparent; text-decoration: none;
  transition: transform 120ms, background 120ms, border-color 120ms;
  min-height: 44px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--c-up); color: #062116; }
.btn-primary:hover { background: #00e0a8; color: #052418; }
.btn-blue { background: var(--c-blue); color: #0a1628; }
.btn-ghost { background: transparent; color: var(--c-text); border-color: var(--c-border); }
.btn-ghost:hover { border-color: var(--c-blue); color: var(--c-blue); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 0.85rem; min-height: 36px; }

/* Ad placeholders */
.ad {
  margin: var(--s-5) 0;
  display: flex; align-items: center; justify-content: center;
  min-height: 90px;
  background: repeating-linear-gradient(45deg, #141a23 0 10px, #10151c 10px 20px);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text-dim); font-size: 0.85rem;
}
.ad-leaderboard { min-height: 90px; }
.ad-rect { min-height: 250px; max-width: 300px; margin-left: auto; margin-right: auto; }

/* Ticker page */
.ticker-hero {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-5);
}
.ticker-hero h1 { margin-bottom: var(--s-2); font-size: clamp(1.25rem, 3vw, 2rem); }
.ticker-hero .price-big { font-weight: 700; font-size: clamp(1.75rem, 4vw, 2.5rem); font-variant-numeric: tabular-nums; }
.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); margin-top: var(--s-4); }
@media (min-width: 640px) { .kv-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .kv-grid { grid-template-columns: repeat(5, 1fr); } }
.kv {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--s-3);
}
.kv .label { font-size: 0.72rem; color: var(--c-text-dim); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.kv .value { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1rem; margin-top: 2px; }

/* News cards */
.news-filter { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.news-filter a {
  padding: 6px 12px; border-radius: 999px;
  background: var(--c-surface); color: var(--c-text-dim);
  border: 1px solid var(--c-border); font-size: 0.85rem; font-weight: 500;
}
.news-filter a.active { background: var(--c-blue-bg); color: var(--c-blue); border-color: rgba(79,142,255,0.35); }

.news-grid {
  display: grid; grid-template-columns: 1fr; gap: var(--s-4);
}
@media (min-width: 700px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.news-card .img { background: var(--c-surface-2); aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; color: var(--c-text-dim); }
.news-card .img img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.news-card .title { font-weight: 600; font-size: 1rem; color: var(--c-text); }
.news-card .summary { color: var(--c-text-dim); font-size: 0.88rem; flex: 1; }
.news-card .meta { font-size: 0.78rem; color: var(--c-text-dim); display: flex; gap: var(--s-2); }

/* Footer */
.site-footer {
  background: var(--c-nav);
  border-top: 1px solid var(--c-border);
  margin-top: var(--s-8);
  padding: var(--s-7) 0 var(--s-5);
  color: var(--c-text-dim);
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-5); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-col h4 { color: var(--c-text); font-size: 0.95rem; margin-bottom: var(--s-3); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.footer-col a { color: var(--c-text-dim); }
.footer-col a:hover { color: var(--c-text); }
.footer-tagline { color: var(--c-text-dim); max-width: 360px; }
.social { display: flex; gap: var(--s-3); margin-top: var(--s-3); }
.social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-surface-2); color: var(--c-text);
  display: inline-flex; align-items: center; justify-content: center;
}
.footer-bottom {
  border-top: 1px solid var(--c-border);
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  font-size: 0.82rem;
}
.footer-bottom p { margin: 0; }

/* Cookie consent */
.cookie-consent {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  z-index: 999;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-2);
}
.cookie-consent[hidden] { display: none; }
.cookie-consent p { margin: 0; font-size: 0.9rem; color: var(--c-text-dim); flex: 1 1 260px; }
.cookie-actions { display: flex; gap: var(--s-2); }

/* Mobile CTA */
.mobile-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: var(--s-3) var(--s-4);
  background: var(--c-nav);
  border-top: 1px solid var(--c-border);
  z-index: 90;
  display: none;
}
@media (max-width: 640px) { .mobile-cta.show { display: block; } }

/* Forms generic */
.form-row { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-3); }
.form-row label { font-size: 0.85rem; color: var(--c-text-dim); font-weight: 500; }
.form-row input, .form-row textarea, .form-row select {
  background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text);
  padding: 10px 12px; border-radius: var(--radius-sm); font: inherit;
}
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--c-blue); }
.form-msg { padding: var(--s-3); border-radius: var(--radius-sm); margin-bottom: var(--s-3); font-size: 0.9rem; }
.form-msg-ok { background: var(--c-up-bg); color: var(--c-up); border: 1px solid rgba(0,200,150,0.35); }
.form-msg-err { background: var(--c-down-bg); color: var(--c-down); border: 1px solid rgba(255,71,87,0.35); }

.content-prose { max-width: 780px; }
.content-prose h2 { margin-top: var(--s-6); }
.content-prose ul, .content-prose ol { padding-left: var(--s-5); margin-bottom: var(--s-4); }

/* Admin */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
@media (max-width: 800px) { .admin-layout { grid-template-columns: 1fr; } }
.admin-sidebar {
  background: var(--c-nav);
  border-right: 1px solid var(--c-border);
  padding: var(--s-4);
}
.admin-sidebar h2 { font-size: 1rem; margin-bottom: var(--s-4); }
.admin-sidebar ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar li a {
  display: block; padding: 8px 10px; border-radius: 6px;
  color: var(--c-text-dim); font-weight: 500; font-size: 0.9rem;
}
.admin-sidebar li a.active, .admin-sidebar li a:hover { background: var(--c-surface); color: var(--c-text); text-decoration: none; }
.admin-main { padding: var(--s-5); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-4); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s-3); margin-bottom: var(--s-5); }
.stat-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--s-4); }
.stat-card .label { color: var(--c-text-dim); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-card .value { font-weight: 700; font-size: 1.8rem; font-variant-numeric: tabular-nums; margin-top: var(--s-2); }

.login-box {
  max-width: 380px; margin: 10vh auto;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: var(--s-5);
}

/* Accessibility + motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-tape-track { animation: none !important; }
}

/* Utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.row { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.section-title h2 { margin: 0; }
.hidden { display: none !important; }

/* Page fade-in */
.site-main > * { animation: fadein 220ms ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
