:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface-1: #ffffff;
  --border: #e3e5e9;
  --text-primary: #191919;
  --text-secondary: #666666;
  --series-1: #257de0;
  --track: #e8eef7;
  --hero-from: #0f1b3d;
  --hero-to: #1f4fa0;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111214;
    --surface-1: #191919;
    --border: #2a2c30;
    --text-primary: #efefef;
    --text-secondary: #9c9c9c;
    --series-1: #338ced;
    --track: #232a35;
    --hero-from: #0a1022;
    --hero-to: #173a78;
  }
}

* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text-primary); }
a { color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.hero { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: #fff; padding: 48px 0 40px; margin-bottom: 24px; }
.hero h1 { font-size: 44px; margin: 0 0 8px; letter-spacing: -0.02em; }
.eyebrow { text-transform: uppercase; font-size: 12px; letter-spacing: .12em; opacity: .75; margin: 0 0 6px; }
.lede { max-width: 640px; font-size: 17px; opacity: .9; margin: 0 0 20px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a { text-decoration: none; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); font-size: 14px; }
.links a:hover { background: rgba(255,255,255,.22); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.tile, .card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; }
.tile { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.tile .label { color: var(--text-secondary); font-size: 13px; }
.tile .value { font-size: 30px; font-weight: 600; letter-spacing: -0.01em; }
.tile .note { color: var(--text-secondary); font-size: 12px; }

.grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
.card { padding: 18px 20px; margin-bottom: 16px; min-width: 0; }
.card h2 { font-size: 17px; margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px; }
.card h2 small { font-weight: 400; color: var(--text-secondary); font-size: 13px; }
.more { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--text-secondary); text-decoration: none; }
.more:hover { color: var(--text-primary); }
.meta, .fine, .empty { color: var(--text-secondary); font-size: 13px; }

/* Bar chart: thin bars, 4px rounded data end, square at the baseline */
.bars { display: flex; flex-direction: column; gap: 2px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 2fr) 3fr 48px; align-items: center; gap: 12px; padding: 5px 6px; border-radius: 6px; text-decoration: none; }
.bar-row:hover { background: var(--track); }
.bar-label { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 12px; }
.bar { display: block; height: 100%; min-width: 2px; background: var(--series-1); border-radius: 0 4px 4px 0; }
.bar-value { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.table-view { margin-top: 10px; font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--text-secondary); }
.table-view table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table-view th, .table-view td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.table-view .num { text-align: right; font-variant-numeric: tabular-nums; }
#tip { position: fixed; z-index: 10; max-width: 320px; pointer-events: none; background: var(--text-primary); color: var(--surface-1); font-size: 12px; padding: 6px 9px; border-radius: 6px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); }
.timeline li { position: relative; margin-bottom: 14px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--series-1); border: 2px solid var(--surface-1); }
.timeline time { display: block; font-size: 12px; color: var(--text-secondary); }
.timeline a { text-decoration: none; }
.timeline a:hover { text-decoration: underline; }

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.video, .post { text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.video img, .post img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--track); }
.vtitle, .ptitle { font-weight: 600; font-size: 14px; line-height: 1.35; }
.video:hover .vtitle, .post:hover .ptitle { text-decoration: underline; }

.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; }
.news li:last-child { border-bottom: 0; }
.news a { text-decoration: none; font-weight: 500; }
.news a:hover { text-decoration: underline; }

.x-embed { max-height: 560px; overflow: auto; }
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

footer { padding: 8px 20px 40px; color: var(--text-secondary); font-size: 13px; }
