:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #111111;
  --ink-2: #3a3a3a;
  --muted: #5a5a5a;
  --rule: #111111;
  --hair: #e3e3e3;
  --hair-2: #d6d6d6;
  --wash: #f4f4f2;
  --accent: #b3261e;
  --up: #0b6b3a;
  --down: #b3261e;
  --bar: #111111;
  --bar-dim: #b9b9b9;
  --compare: #a8a8a8;
  --area: rgba(17, 17, 17, 0.06);
  --pop: #ffffff;
  --serif: "Noto Serif", Georgia, serif;
  --sans: "Fira Sans", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121212;
    --ink: #f2f0ea;
    --ink-2: #d2cfc7;
    --muted: #a19e96;
    --rule: #f2f0ea;
    --hair: #2a2a2a;
    --hair-2: #383838;
    --wash: #1c1c1c;
    --accent: #ff6b5e;
    --up: #4cc38a;
    --down: #ff7b72;
    --bar: #f2f0ea;
    --bar-dim: #5a5a5a;
    --compare: #6e6e6e;
    --area: rgba(242, 240, 234, 0.08);
    --pop: #1c1c1c;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121212;
  --ink: #f2f0ea;
  --ink-2: #d2cfc7;
  --muted: #a19e96;
  --rule: #f2f0ea;
  --hair: #2a2a2a;
  --hair-2: #383838;
  --wash: #1c1c1c;
  --accent: #ff6b5e;
  --up: #4cc38a;
  --down: #ff7b72;
  --bar: #f2f0ea;
  --bar-dim: #5a5a5a;
  --compare: #6e6e6e;
  --area: rgba(242, 240, 234, 0.08);
  --pop: #1c1c1c;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1440px; margin: 0 auto; padding-left: 48px; padding-right: 48px; }

.mast { padding-top: 18px; }
.dateline { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.tools { display: flex; align-items: center; gap: 2px; }
.iconbtn { width: 36px; height: 36px; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; border-radius: 50%; }
.iconbtn:hover { background: var(--wash); color: var(--ink); }
.iconbtn svg { width: 18px; height: 18px; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 42px; z-index: 30; min-width: 200px; background: var(--pop); border: 1px solid var(--rule); padding: 6px; display: none; text-transform: none; letter-spacing: 0; font-size: 14px; }
.menu-pop.open { display: block; }
.menu-pop .who { padding: 8px 10px; color: var(--muted); font-size: 12px; }
.menu-pop a { display: block; padding: 8px 10px; color: var(--ink); }
.menu-pop a:hover { background: var(--wash); }
.masthead { margin-top: 10px; border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 12px 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.masthead .title { font-family: var(--serif); font-weight: 800; font-size: 52px; letter-spacing: -0.02em; line-height: 1; }
.masthead .title:hover { color: var(--ink); }
.masthead .tagline { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-2); }
.sitenav { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--hair-2); padding: 11px 0 10px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.sitenav::-webkit-scrollbar { display: none; }
.sitenav a { display: inline-flex; align-items: center; gap: 7px; }
.sitenav a.on { color: var(--accent); }
.sitenav .cnt { font-weight: 400; color: var(--muted); font-size: 13px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

main { padding-top: 26px; padding-bottom: 72px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead h1 { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.1; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pagehead h1 .ext { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--muted); }
.pagehead p { margin: 6px 0 0; color: var(--ink-2); }
.refresh { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.refresh button, .btn-line { border: 1px solid var(--hair-2); background: none; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: var(--ink-2); }
.refresh button:hover, .btn-line:hover { border-color: var(--ink); color: var(--ink); }
.stale { color: var(--accent); }

.tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 26px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { font-size: 13.5px; padding: 7px 14px; border: 1px solid var(--hair-2); border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tabs a:hover { border-color: var(--ink); color: var(--ink); }
.tabs a.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tabs a.on .live-dot { background: var(--bg); }

.sec { margin-top: 40px; }
.sec:first-child { margin-top: 0; }
.sec.ruled { border-top: 3px solid var(--rule); padding-top: 20px; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px 18px; flex-wrap: wrap; margin-bottom: 14px; }
.sechead h2 { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.sechead h2.sm { font-size: 22px; }
.sechead .desc { font-size: 13px; color: var(--muted); }
.kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.row { display: flex; flex-wrap: wrap; gap: 40px; }
.row > .main { flex: 2 1 560px; min-width: 0; }
.row > .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 34px; }

.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border-top: 1px solid var(--rule); overflow: hidden; }
.cell { box-shadow: 1px 0 0 var(--hair-2), 0 1px 0 var(--hair-2); padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cell .big { font-family: var(--serif); font-size: 38px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.cell .line { font-size: 13px; color: var(--ink-2); }
.cell .line b { color: var(--ink); }
.delta { font-weight: 700; white-space: nowrap; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat { color: var(--muted); }
.cmp { font-size: 13px; }
.cmp .note { color: var(--muted); font-weight: 400; }

.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); border-top: 1px solid var(--rule); overflow: hidden; }
.site { box-shadow: 1px 0 0 var(--hair-2), 0 1px 0 var(--hair-2); padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.site .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.site .name { font-family: var(--serif); font-weight: 800; font-size: 22px; line-height: 1.15; }
.site .host { font-size: 12px; color: var(--muted); }
.site .act { text-align: right; }
.site .act .big { font-family: var(--serif); font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.site .act .lbl { font-size: 12px; color: var(--muted); margin-top: 3px; }
.site .foot { border-top: 1px solid var(--hair); padding-top: 10px; font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.site .foot b { color: var(--ink); }

.mostread { list-style: none; margin: 0; padding: 0; }
.mostread li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--hair); }
.mostread li:first-child { border-top: 0; }
.mostread .rk { font-family: var(--serif); font-weight: 800; font-size: 20px; color: var(--accent); line-height: 1; }
.mostread .tt { font-family: var(--serif); font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mostread .rd { font-weight: 700; font-size: 15px; text-align: right; white-space: nowrap; }
.rise { display: inline-flex; align-items: center; gap: 3px; font-family: var(--sans); font-size: 11px; font-weight: 700; color: var(--up); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.rise svg { width: 11px; height: 11px; }
.fresh { font-family: var(--sans); font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }

.reading { list-style: none; margin: 0; padding: 0; }
.reading li { display: grid; grid-template-columns: 52px 96px minmax(0, 1fr) 110px; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.reading .rk { font-family: var(--serif); font-size: 34px; font-weight: 800; color: var(--accent); line-height: 1; }
.reading .tt { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.28; }
.reading .meta { font-size: 12.5px; color: var(--muted); margin-top: 5px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.reading .val { text-align: right; font-size: 12.5px; color: var(--ink-2); }
.reading .val b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.thumb { width: 96px; height: 64px; background: var(--wash) center/cover no-repeat; display: block; }
.thumb.empty { display: grid; place-items: center; color: var(--hair-2); }
.thumb.empty svg { width: 22px; height: 22px; }

.hero { display: flex; gap: 32px; align-items: flex-end; flex-wrap: wrap; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--hair-2); padding: 18px 0 20px; }
.hero .bignum { font-family: var(--serif); font-size: 84px; font-weight: 800; line-height: 0.95; letter-spacing: -0.03em; }
.hero .lbl { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.hero .chartbox { flex: 1 1 380px; min-width: 0; }
.hero .facts { display: flex; gap: 30px; flex-wrap: wrap; }
.hero .facts .v { font-family: var(--serif); font-size: 30px; font-weight: 800; line-height: 1.1; }
.hero .facts .l { font-size: 12.5px; color: var(--ink-2); }

.chips { display: inline-flex; gap: 4px; }
.chips button { border: 1px solid var(--hair-2); background: none; border-radius: 999px; padding: 4px 11px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.chips button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gl { stroke: var(--hair); stroke-width: 1; }
.chart .base { stroke: var(--rule); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.cur { stroke: var(--ink); }
.chart .ln.prev { stroke: var(--compare); }
.chart .area { fill: var(--area); }
.chart .bar { fill: var(--bar); }
.chart .bar.dim { fill: var(--bar-dim); }
.chart .bar.hl { fill: var(--accent); }
.chart .cross { stroke: var(--hair-2); stroke-width: 1; }
.chart .dot { stroke: var(--bg); stroke-width: 2; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12px; padding: 7px 10px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -10px; opacity: 0; transition: opacity .12s; z-index: 5; }
.tip.on { opacity: 1; }
.tip .k { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.mlabels { display: grid; gap: 0; margin-top: 8px; }
.mlabels div { text-align: center; font-size: 12px; color: var(--ink-2); }
.mlabels div span { display: block; color: var(--muted); font-size: 11.5px; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 2px; display: inline-block; }

.hbars { display: flex; flex-direction: column; gap: 11px; }
.hbar .r { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.hbar .r span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .r span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
.hbar .r b { color: var(--ink); }
.hbar .t { height: 6px; background: var(--wash); margin-top: 5px; }
.hbar .t i { display: block; height: 100%; background: var(--bar); }
.devs { display: flex; gap: 26px; flex-wrap: wrap; }
.devs .v { font-family: var(--serif); font-size: 28px; font-weight: 800; line-height: 1.1; }
.devs .l { font-size: 13px; color: var(--ink-2); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tbl th.l { text-align: left; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--hair); text-align: right; vertical-align: middle; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.l { text-align: left; }
.tbl td.t { text-align: left; white-space: normal; width: 100%; }
.tbl td.t a { font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tbl td.rk { font-family: var(--serif); font-weight: 800; color: var(--accent); font-size: 18px; text-align: left; padding-right: 0; }
.tbl td.im { padding-right: 0; }
.tbl td.im .thumb { width: 72px; height: 48px; }
.tbl .site-n { font-family: var(--serif); font-weight: 800; font-size: 17px; }
.tbl .pv { font-weight: 600; }
.tbl .pd { display: block; font-size: 12px; }
.tblwrap { overflow-x: auto; }
.more { margin-top: 12px; width: 100%; border: 1px solid var(--hair-2); background: none; padding: 9px; font-size: 13px; color: var(--ink-2); }
.more:hover { border-color: var(--ink); color: var(--ink); }

.notice { font-size: 13.5px; color: var(--ink-2); border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); padding: 10px 0; margin-bottom: 22px; font-family: var(--serif); font-style: italic; }
.notice a { color: var(--accent); font-style: normal; font-weight: 600; font-family: var(--sans); }
.empty-state { color: var(--muted); padding: 22px 0; font-size: 13.5px; font-family: var(--serif); font-style: italic; }
.err { color: var(--down); font-size: 13.5px; }
.skeleton { background: linear-gradient(90deg, var(--wash) 25%, var(--hair) 50%, var(--wash) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.form { display: grid; gap: 12px; }
.form label { font-size: 12.5px; color: var(--ink-2); display: grid; gap: 5px; }
.form input[type=text], .form input[type=password], .form select { border: 1px solid var(--hair-2); background: var(--bg); padding: 10px 12px; width: 100%; border-radius: 0; }
.form input:focus, .form select:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.btn { border: 1px solid var(--ink); background: var(--ink); color: var(--bg); padding: 9px 16px; font-weight: 600; font-size: 13.5px; }
.btn.ghost { background: none; color: var(--ink); border-color: var(--hair-2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.danger { background: none; color: var(--down); border-color: var(--down); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; color: var(--ink); font-size: 13.5px; }
.pill { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--accent); }
.msg { font-size: 13.5px; }
.msg.ok { color: var(--up); }
.msg.bad { color: var(--down); }
.panel { border-top: 1px solid var(--rule); padding-top: 16px; }

body.tv .mast .dateline, body.tv .mast .masthead .tagline { display: none; }
body.tv .wrap { max-width: none; padding-left: 28px; padding-right: 28px; }
body.tv .masthead .title { font-size: 40px; }
body.tv .site .act .big { font-size: 56px; }
body.tv .sites { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

@media (max-width: 760px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .masthead .title { font-size: 36px; }
  .masthead .tagline { font-size: 14px; }
  .sitenav { gap: 20px; }
  main { padding-top: 18px; }
  .pagehead h1 { font-size: 26px; }
  .sechead h2 { font-size: 23px; }
  .row { gap: 30px; }
  .cells { grid-template-columns: 1fr 1fr; }
  .cell { padding: 12px 12px 14px; }
  .cell .big { font-size: 26px; }
  .sites { grid-template-columns: 1fr; }
  .hero .bignum { font-size: 64px; }
  .reading li { grid-template-columns: 34px 68px minmax(0, 1fr); gap: 10px; }
  .reading .rk { font-size: 24px; }
  .reading .thumb { width: 68px; height: 46px; }
  .reading .tt { font-size: 16.5px; }
  .reading .val { grid-column: 3; text-align: left; }
  .reading .val b { display: inline; font-size: 18px; margin-right: 4px; }
  .tbl .hide-m, .tbl td.im { display: none; }
  .mlabels div span { display: none; }
  .mlabels div { font-size: 10.5px; white-space: nowrap; }
  .mlabels div:nth-child(even) { visibility: hidden; }
}
