/* Fonts are served from /fonts (latin subsets from Google Fonts, OFL), so no third-party request blocks rendering. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f1f1ee;
  --text: #16181d;
  --text-2: #4b5160;
  --muted: #6b7180;
  --border: #e3e3de;
  --accent: #0f766e;
  --link: #0b5f59;
  --up: #15803d;
  --down: #b91c1c;
  --warn-bg: #fff4d6;
  --warn-text: #8a5a00;

  --confirmed-bg: #dcf5e6;  --confirmed-text: #106b36;
  --unverified-bg: #fdf0cf; --unverified-text: #845400;
  --contradicted-bg: #fde0de; --contradicted-text: #a1241b;
  --rumor-bg: #ebe7fb;      --rumor-text: #5b3fb5;
  --insufficient-bg: #ececec; --insufficient-text: #555a63;
  --pending-bg: #e1eefc;    --pending-text: #1f5aa6;

  /* One hue per category; tiles and tags tint from it. */
  --c-markets: #0f766e; --c-etfs-funds: #2563eb; --c-regulation: #7c3aed; --c-security: #dc2626;
  --c-treasuries: #c2410c; --c-exchanges: #0891b2; --c-stablecoins: #15803d; --c-defi: #db2777;
  --c-protocols: #4f46e5; --c-prediction-markets: #b45309; --c-ai-tech: #9333ea; --c-macro: #475569;
  --c-other: #6b7280;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1e222b;
    --text: #e8eaef;
    --text-2: #b7bcc8;
    --muted: #8a90a0;
    --border: #2a2f3a;
    --accent: #2dd4bf;
    --link: #5eead4;
    --up: #4ade80;
    --down: #f87171;
    --warn-bg: #3a2e10;
    --warn-text: #fcd34d;

    --confirmed-bg: #12351f;  --confirmed-text: #6ee7a0;
    --unverified-bg: #3a2e10; --unverified-text: #fcd34d;
    --contradicted-bg: #3d1614; --contradicted-text: #fca5a5;
    --rumor-bg: #2a2345;      --rumor-text: #c4b5fd;
    --insufficient-bg: #262a33; --insufficient-text: #aab0bd;
    --pending-bg: #152a45;    --pending-text: #93c5fd;
    --shadow: none;
    --c-markets: #2dd4bf; --c-etfs-funds: #60a5fa; --c-regulation: #a78bfa; --c-security: #f87171;
    --c-treasuries: #fb923c; --c-exchanges: #22d3ee; --c-stablecoins: #4ade80; --c-defi: #f472b6;
    --c-protocols: #818cf8; --c-prediction-markets: #fbbf24; --c-ai-tech: #c084fc; --c-macro: #94a3b8;
    --c-other: #9ca3af;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  font-feature-settings: 'cv11', 'ss01';
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
.wrap { max-width: 780px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.num { font-family: var(--mono); font-size: 0.85em; font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }

/* Header and footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand-block { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex: 1; }
.site-header nav { flex: none; }
.site-header nav a { white-space: nowrap; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); letter-spacing: -0.02em; white-space: nowrap; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.tagline { margin: 0; font-size: 0.82rem; font-weight: 400; letter-spacing: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Live bar: freshness on the left, top coins on the right */
.live-bar { border-bottom: 1px solid var(--border); background: var(--bg); font-size: 0.8rem; }
.live-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.live-status { margin: 0; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.live-status b { color: var(--text-2); font-weight: 600; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 60%, transparent); animation: live-pulse 2.4s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
/* Ticker: an endless strip of coins and markets, faded at both edges, paused on hover */
.ticker { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker-scroll calc(var(--ticker-items, 10) * 4.5s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-list { list-style: none; display: flex; align-items: center; gap: 22px; margin: 0; padding: 0 11px; }
.ticker-item a, .ticker-item > span { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); white-space: nowrap; }
.ticker-item a:hover { text-decoration: none; color: var(--text); }
.ticker-item img { width: 14px; height: 14px; border-radius: 50%; }
.ticker-item b { font-weight: 600; }
.ticker-markets b { color: var(--muted); }
.ticker-item .num { font-size: 0.95em; }
.ticker-divider { width: 1px; height: 14px; background: var(--border); }
@media (prefers-reduced-motion: reduce) {
  .ticker { overflow-x: auto; scrollbar-width: none; }
  .ticker::-webkit-scrollbar { display: none; }
  .ticker-track { animation: none; }
  .ticker-list[aria-hidden='true'] { display: none; }
}
.site-header nav { display: flex; gap: 18px; font-size: 0.92rem; }
.site-header nav a { color: var(--text-2); }
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 24px 0 40px; color: var(--muted); font-size: 0.85rem; }
.disclaimer strong { color: var(--text-2); }

/* Stream */
.intro { padding: 28px 0 8px; }
.intro h1 { font-size: 1.7rem; margin: 0 0 6px; }
.intro p { margin: 0; color: var(--text-2); max-width: 60ch; }
.intro.compact { padding: 20px 0 0; }
.intro.compact h1 { font-size: 1.35rem; margin: 0 0 2px; }
.intro.compact p { font-size: 0.9rem; color: var(--muted); }
.stream { display: grid; gap: 12px; }

.card { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 16px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.card-body { min-width: 0; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.card-title { font-size: 1.12rem; margin: 8px 0 4px; }
.card-title a { color: var(--text); }
.card-summary { margin: 4px 0 0; color: var(--text-2); font-size: 0.93rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sources { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; font-size: 0.8rem; }
.source-count { color: var(--muted); }
.card-sources .source { color: var(--muted); }
.card-sources .source:hover { color: var(--link); }
.card-sources .source.role-primary, .card-sources .source.role-onchain { color: var(--text-2); font-weight: 500; }
.card-sources .more { color: var(--muted); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.badge-confirmed { background: var(--confirmed-bg); color: var(--confirmed-text); }
.badge-unverified { background: var(--unverified-bg); color: var(--unverified-text); }
.badge-contradicted { background: var(--contradicted-bg); color: var(--contradicted-text); }
.badge-rumor { background: var(--rumor-bg); color: var(--rumor-text); }
.badge-insufficient_evidence { background: var(--insufficient-bg); color: var(--insufficient-text); }
.badge-pending { background: var(--pending-bg); color: var(--pending-text); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 8px; background: var(--surface-2); font-size: 0.8rem; }
.chip a { color: var(--text); }
.chip.up .num:first-of-type { color: var(--up); }
.chip.down .num:first-of-type { color: var(--down); }
.chip.warn { background: var(--warn-bg); color: var(--warn-text); font-weight: 500; }
.chip.pending { color: var(--muted); }
.unusual { font-weight: 700; color: var(--warn-text); }

.pager { display: flex; justify-content: space-between; align-items: center; margin: 24px 0; font-size: 0.9rem; }
.empty { text-align: center; padding: 64px 16px; color: var(--text-2); }

/* Story page */
.story h1 { font-size: 1.6rem; margin: 10px 0 8px; }
.back { display: inline-block; margin: 20px 0 12px; font-size: 0.88rem; color: var(--muted); }
.lede { font-size: 1.08rem; color: var(--text-2); margin: 0 0 8px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.panel h2 { font-size: 1rem; margin: 0 0 10px; }
.reasons { margin: 0 0 8px; padding-left: 20px; }
.table-scroll { overflow-x: auto; }
.market { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 620px; }
.market th, .market td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.market th:first-child { text-align: left; }
.market thead th { font-weight: 500; color: var(--muted); font-size: 0.78rem; }
.flag { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 50%; background: var(--warn-bg); color: var(--warn-text); font-weight: 700; font-size: 0.72rem; font-family: var(--font); }
.claims { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
.claim p { margin: 0 0 4px; }
.claim blockquote { margin: 4px 0; padding: 4px 0 4px 12px; border-left: 3px solid var(--border); color: var(--text-2); font-size: 0.92rem; }
.claim.stance-contradicts blockquote { border-left-color: var(--down); }
.tag { display: inline-block; padding: 0 6px; border-radius: 5px; background: var(--surface-2); font-size: 0.75rem; font-weight: 600; color: var(--text-2); }
.tag.contra { background: var(--contradicted-bg); color: var(--contradicted-text); }
.posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.post-meta { font-size: 0.8rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.post-meta b { color: var(--text-2); font-weight: 600; }
.role { text-transform: capitalize; }
.provenance { margin-top: 20px; }

/* About */
.prose { max-width: 66ch; padding-top: 12px; }
.prose h1 { font-size: 1.7rem; }
.prose h2 { font-size: 1.15rem; margin-top: 28px; }
.prose li { margin-bottom: 6px; }
.labels { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; align-items: baseline; }
.labels dd { margin: 0; color: var(--text-2); }

@media (max-width: 560px) {
  .site-header nav { gap: 12px; font-size: 0.86rem; }
  .intro h1, .story h1 { font-size: 1.4rem; }
  .card { padding: 14px; }
  .labels { grid-template-columns: 1fr; }
  /* The smallest labels stay readable on a phone. */
  .badge, .cat-tag, .tag { font-size: 0.8rem; }
  .card-sources, .card-meta, .post-meta { font-size: 0.85rem; }
}

/* Touch screens get finger-sized targets (44px) on the controls people tap most. */
@media (pointer: coarse) {
  .category, .cred-menu summary { min-height: 44px; }
  .cred-option { min-height: 44px; }
  .site-header nav a, .pager a, .back { display: inline-flex; align-items: center; min-height: 44px; }
  .back { margin: 8px 0 4px; }
}

/* Icons */
.icon { width: 16px; height: 16px; flex: none; vertical-align: -3px; }

/* Categories: one hue each, from the --c-* tokens */
.cat-markets { --cat: var(--c-markets); } .cat-etfs-funds { --cat: var(--c-etfs-funds); }
.cat-regulation { --cat: var(--c-regulation); } .cat-security { --cat: var(--c-security); }
.cat-treasuries { --cat: var(--c-treasuries); } .cat-exchanges { --cat: var(--c-exchanges); }
.cat-stablecoins { --cat: var(--c-stablecoins); } .cat-defi { --cat: var(--c-defi); }
.cat-protocols { --cat: var(--c-protocols); } .cat-prediction-markets { --cat: var(--c-prediction-markets); }
.cat-ai-tech { --cat: var(--c-ai-tech); } .cat-macro { --cat: var(--c-macro); } .cat-other { --cat: var(--c-other); }

.cat-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 600; color: var(--cat, var(--muted)); }
.cat-tag .icon { width: 14px; height: 14px; vertical-align: 0; }
.cat-tag:hover { text-decoration: none; opacity: 0.85; }

/* Toolbar: category tabs, with the credibility menu at the end of the same line. */
.toolbar { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 14px; }

/* Category tabs: every tab visible on desktop (wrapping), one swipeable row on phones. */
.categories { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.category { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 0.84rem; line-height: 1.3; white-space: nowrap; transition: border-color 0.15s, background 0.15s; }
.category .icon { width: 15px; height: 15px; vertical-align: 0; color: var(--cat, var(--muted)); }
.category:hover { text-decoration: none; color: var(--text); border-color: color-mix(in srgb, var(--cat, var(--text)) 60%, var(--border)); }
.category.active { background: color-mix(in srgb, var(--cat, var(--text)) 16%, var(--surface)); border-color: var(--cat, var(--text)); color: var(--text); font-weight: 600; }

/* Credibility: a compact dropdown, secondary to the categories */
.cred-menu { position: relative; flex: none; }
.cred-menu summary { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px dashed var(--border); color: var(--muted); font-size: 0.8rem; line-height: 1.3; cursor: pointer; list-style: none; white-space: nowrap; user-select: none; }
.cred-menu summary::-webkit-details-marker { display: none; }
.cred-menu summary:hover, .cred-menu[open] summary { border-style: solid; color: var(--text-2); }
.cred-value { color: var(--text-2); font-weight: 600; }
.cred-value.badge { font-size: 0.72rem; padding: 1px 7px; }
.chevron { width: 12px; height: 12px; transition: transform 0.15s; }
.cred-menu[open] .chevron { transform: rotate(180deg); }
.cred-options { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 180px; padding: 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); display: grid; }
.cred-option { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; color: var(--text-2); font-size: 0.86rem; }
.cred-option:hover { text-decoration: none; background: var(--surface-2); color: var(--text); }
.cred-option.active { color: var(--text); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot-confirmed { background: var(--confirmed-text); } .dot-unverified { background: var(--unverified-text); }
.dot-rumor { background: var(--rumor-text); } .dot-contradicted { background: var(--contradicted-text); }

@media (max-width: 640px) {
  .brand-block { flex-direction: column; gap: 0; }
  .tagline { font-size: 0.7rem; }
  .site-header nav a[href="/feed.xml"] { display: none; }
  .live-row { gap: 12px; }
  .live-count { display: none; }
  .toolbar { align-items: center; margin: 12px 0; }
  /* Bleed to the left edge and fade out on the right, so it reads as "swipe for more". */
  .categories { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; padding: 0 0 2px 16px; scroll-padding: 0 16px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
  .categories.at-end { -webkit-mask-image: none; mask-image: none; }
  .categories::-webkit-scrollbar { display: none; }
  .cred-label { display: none; }
}
.intro h1.with-icon { display: flex; align-items: center; gap: 10px; }
.intro h1.with-icon .icon { width: 28px; height: 28px; color: var(--cat, var(--accent)); }

/* Card thumbnail: our own chart, the coin's logo or the topic icon */
.thumb { position: relative; display: grid; place-items: center; width: 112px; height: 76px; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--cat, var(--muted)) 12%, var(--surface-2)); color: var(--cat, var(--muted)); }
.thumb:hover { text-decoration: none; }
.thumb-icon { width: 34px; height: 34px; }
.thumb-logo { width: 36px; height: 36px; border-radius: 50%; }
.thumb-symbol { font-weight: 700; font-size: 0.95rem; color: var(--text-2); }
.thumb-chart { background: var(--surface-2); place-items: end stretch; }
.thumb-chart .spark { width: 100%; height: 100%; }
.thumb-label { position: absolute; top: 5px; left: 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 0.68rem; font-weight: 700; color: var(--text-2); }
.thumb-label img { width: 14px; height: 14px; border-radius: 50%; }
.chip img { width: 14px; height: 14px; border-radius: 50%; }

.spark { overflow: visible; }
.spark-line { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { stroke: none; opacity: 0.14; }
.spark-t0 { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.spark-dot { fill: var(--surface); stroke-width: 1.8; }
.spark-up .spark-line, .spark-up .spark-dot { stroke: var(--up); } .spark-up .spark-area { fill: var(--up); }
.spark-down .spark-line, .spark-down .spark-dot { stroke: var(--down); } .spark-down .spark-area { fill: var(--down); }
.spark-flat .spark-line, .spark-flat .spark-dot { stroke: var(--muted); } .spark-flat .spark-area { fill: var(--muted); }

@media (max-width: 560px) {
  .card { grid-template-columns: minmax(0, 1fr) 76px; gap: 12px; }
  .thumb { width: 76px; height: 60px; }
  .thumb-icon { width: 26px; height: 26px; }
  .thumb-logo { width: 28px; height: 28px; }
  .thumb-label { font-size: 0; gap: 0; }
}
.category-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.category-list .muted { font-size: 0.88rem; }
