/* AIPulse — dark tech, clean and crisp. System fonts only, zero third-party requests. */
:root {
  --bg: #0a0e14;
  --bg2: #0d1219;
  --surface: #111826;
  --surface2: #151d2e;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #e6ebf2;
  --muted: #94a3b8;
  --faint: #64748b;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.12);
  --accent2: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent); color: #04222a; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1220px; margin: 0 auto; padding: 0 20px;
  height: 58px; display: flex; align-items: center; gap: 18px;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; letter-spacing: 0.04em; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo .pulse { color: var(--accent); font-family: var(--mono); font-size: 18px; }
.logo small { font-size: 11px; color: var(--faint); font-weight: 600; letter-spacing: 0.14em; }
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--accent2); border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.08); border-radius: 999px; padding: 3px 10px;
  white-space: nowrap;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent2); animation: blink 1.6s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.nav { display: flex; gap: 2px; margin-left: 6px; }
.nav a {
  color: var(--muted); font-size: 14px; font-weight: 600; padding: 6px 10px; border-radius: 7px; white-space: nowrap;
}
.nav a:hover { color: var(--text); text-decoration: none; background: var(--surface2); }
.nav a.active { color: var(--accent); background: var(--accent-dim); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.countdown { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.countdown b { color: var(--accent); font-weight: 700; }
.lang-switch { display: flex; border: 1px solid var(--border-strong); border-radius: 7px; overflow: hidden; }
.lang-switch a {
  padding: 5px 10px; font-size: 12px; font-weight: 700; color: var(--muted); background: transparent;
}
.lang-switch a:hover { text-decoration: none; color: var(--text); }
.lang-switch a.active { background: var(--accent); color: #04222a; }

/* ---------- ticker ---------- */
.ticker-wrap { border-bottom: 1px solid var(--border); background: var(--bg2); overflow: hidden; }
.ticker { max-width: 1220px; margin: 0 auto; padding: 0 20px; height: 38px; display: flex; align-items: center; gap: 12px; }
.ticker-label { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); white-space: nowrap; }
.ticker-viewport { overflow: hidden; flex: 1; }
.ticker-track { display: inline-flex; gap: 48px; white-space: nowrap; animation: tick 60s linear infinite; font-size: 13px; color: var(--muted); }
.ticker-track span b { color: var(--text); font-weight: 600; }
.ticker-track span i { font-style: normal; color: var(--accent); font-family: var(--mono); font-size: 12px; margin-right: 6px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- layout ---------- */
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 20px; }
.hero { padding: 34px 0 8px; }
.hero h1 { font-size: 30px; line-height: 1.25; letter-spacing: -0.01em; }
.hero h1 .accent { color: var(--accent); }
.hero p.lede { color: var(--muted); font-size: 15px; margin-top: 8px; max-width: 720px; }
.hero .meta-line { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 10px; }
.hero .meta-line b { color: var(--muted); }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px;
}
.stat .num { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat .num small { font-size: 15px; color: var(--accent); }
.stat .lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }

.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
section.block { margin-bottom: 34px; }
.section-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 16px; }
.section-head h2 { font-size: 19px; }
.section-head .sub { font-size: 13px; color: var(--faint); }
.section-head .more { margin-left: auto; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* filter chips + search */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.chip {
  border: 1px solid var(--border-strong); background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  font-family: var(--sans);
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #04222a; }
.search-box { margin-left: auto; display: flex; gap: 8px; }
.search-box input {
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  border-radius: 8px; padding: 7px 12px; font-size: 14px; width: 210px; font-family: var(--sans);
}
.search-box input::placeholder { color: var(--faint); }
.search-box input:focus { outline: none; border-color: var(--accent); }
.btn {
  display: inline-block; background: var(--accent); color: #04222a; font-weight: 700;
  border: none; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; font-family: var(--sans);
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover { background: var(--accent-dim); }

/* feed cards */
.feed { display: flex; flex-direction: column; gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px;
}
.card:hover { border-color: var(--border-strong); }
.card-top { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--faint); font-family: var(--mono); flex-wrap: wrap; }
.card-top .src { color: var(--accent); font-weight: 700; }
.score {
  font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.4); background: var(--accent-dim);
  border-radius: 6px; padding: 1px 7px;
}
.score.hot { color: var(--warn); border-color: rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.1); }
.tag { border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 8px; font-size: 11px; color: var(--muted); }
.card h3 { font-size: 18px; line-height: 1.4; margin: 9px 0 6px; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card p.sum { color: var(--muted); font-size: 14.5px; }
.verdict {
  margin-top: 10px; padding: 9px 12px; border-left: 3px solid var(--accent2);
  background: rgba(52, 211, 153, 0.07); border-radius: 0 8px 8px 0; font-size: 14px;
}
.verdict b { color: var(--accent2); font-weight: 700; }
.card-foot { display: flex; align-items: center; gap: 14px; margin-top: 11px; font-size: 13px; }
.sources-toggle { background: none; border: none; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; font-family: var(--sans); }
.sources-toggle:hover { text-decoration: underline; }
.src-list { display: none; margin-top: 10px; border-top: 1px dashed var(--border-strong); padding-top: 10px; }
.src-list.open { display: block; }
.src-list li { list-style: none; font-size: 13.5px; color: var(--muted); padding: 3px 0; }
.src-list li a { color: var(--text); }
.src-list li .angle { color: var(--faint); }

/* digest */
.digest-card { background: linear-gradient(135deg, #0f1b2d, #111826); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.digest-card h3 { font-size: 17px; margin-bottom: 4px; }
.digest-card .date { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-bottom: 12px; }
.digest-card ol { margin-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.digest-card li { font-size: 14.5px; color: var(--muted); }
.digest-card li b { color: var(--text); }

/* sidebar */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 78px; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.side-card h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.side-card h3 .more { margin-left: auto; font-size: 12px; }
.model-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.model-row:first-of-type { border-top: none; }
.model-row .rank { font-family: var(--mono); color: var(--faint); width: 18px; }
.model-row .name { font-weight: 700; }
.model-row .org { color: var(--faint); font-size: 12.5px; }
.model-row .trend { margin-left: auto; font-family: var(--mono); font-size: 12px; }
.trend.up { color: var(--accent2); }
.trend.down { color: var(--danger); }
.trend.new { color: var(--warn); }
.follow-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.follow-item {
  border: 1px solid var(--border-strong); background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; cursor: pointer; font-family: var(--sans);
}
.follow-item.on { background: var(--accent); border-color: var(--accent); color: #04222a; }
.follow-label { font-size: 12px; color: var(--faint); font-weight: 700; letter-spacing: 0.06em; margin: 10px 0 6px; text-transform: uppercase; }
.status-list { font-size: 13.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.status-list code { font-family: var(--mono); color: var(--text); font-size: 12.5px; }
.status-ok { color: var(--accent2); font-weight: 700; }
.src-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.src-cloud a { font-size: 12.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; }
.src-cloud a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.sub-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sub-row .btn { font-size: 13px; padding: 7px 13px; }

/* tables */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.data th, table.data td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { font-size: 12.5px; color: var(--muted); font-weight: 700; background: var(--surface2); cursor: pointer; white-space: nowrap; }
table.data th:hover { color: var(--accent); }
table.data tr:last-child td { border-bottom: none; }
table.data td.num { font-family: var(--mono); font-size: 13px; }
table.data tr:hover td { background: rgba(34, 211, 238, 0.04); }
.table-scroll { overflow-x: auto; }

/* timeline */
.timeline { position: relative; margin-left: 8px; padding-left: 22px; border-left: 2px solid var(--border-strong); display: flex; flex-direction: column; gap: 18px; }
.timeline .tl-item { position: relative; }
.timeline .tl-item::before {
  content: ""; position: absolute; left: -29px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--bg);
}
.timeline .tl-date { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 700; }
.timeline h4 { font-size: 16px; margin: 2px 0 4px; }
.timeline p { font-size: 14px; color: var(--muted); }

/* price events */
.price-ev { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--border); }
.price-ev:first-of-type { border-top: none; }
.price-ev .delta { font-family: var(--mono); font-weight: 700; font-size: 13px; padding: 2px 9px; border-radius: 6px; white-space: nowrap; }
.delta.down { color: var(--accent2); background: rgba(52, 211, 153, 0.1); }
.delta.up { color: var(--danger); background: rgba(248, 113, 113, 0.1); }
.delta.free { color: var(--warn); background: rgba(251, 191, 36, 0.1); }
.price-ev h4 { font-size: 15px; }
.price-ev p { font-size: 13.5px; color: var(--muted); }

/* ad placeholders — replace with AdSense unit code after approval */
.ad-slot {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--bg2); color: var(--faint);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-align: center; padding: 14px;
}
.ad-slot .ad-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; font-weight: 700; color: var(--faint); }
.ad-slot .ad-size { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ad-leaderboard { min-height: 90px; margin: 0 0 22px; }
.ad-infeed { min-height: 110px; margin: 0; }
.ad-rect { min-height: 250px; }
.ad-bottom { min-height: 90px; margin: 8px 0 22px; }

/* footer */
footer { border-top: 1px solid var(--border); margin-top: 30px; padding: 26px 0 40px; color: var(--faint); font-size: 13.5px; }
footer .foot-grid { display: flex; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); }
footer .mono { font-family: var(--mono); font-size: 12px; }

/* misc */
.empty-note { color: var(--faint); font-size: 14px; padding: 18px 0; }
.kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; color: var(--accent); font-weight: 700; text-transform: uppercase; }
h2.page-title { font-size: 26px; margin: 26px 0 6px; }
.page-lede { color: var(--muted); max-width: 720px; margin-bottom: 20px; }
.back-link { font-size: 13.5px; }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .countdown { display: none; }
  .hero h1 { font-size: 24px; }
  .search-box input { width: 150px; }
}
