:root {
  color-scheme: dark;
  --bg: #0d0a0a;
  --panel: #171212;
  --panel-2: #1f1918;
  --line: rgba(240, 232, 220, .1);
  --text: #f3ece2;
  --soft: #c9beb1;
  --muted: #8f857a;
  --accent: #e0242f;
  --up: #45d483;
  --down: #ff7a7a;
  --font: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
button { font: inherit; color: inherit; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(13, 10, 10, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding: 8px 0; }
.title { display: flex; align-items: center; gap: 10px; }
.title h1 { font-size: 19px; }
.title .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.ranges { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.ranges button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; color: var(--soft); font-weight: 600; font-size: 14px; }
.ranges button[aria-selected="true"] { background: var(--text); color: var(--bg); }

main { padding: 20px 0 48px; }
.sec-h { font-size: 22px; margin: 28px 0 12px; }
.sec-h .muted { font-size: 15px; font-weight: 500; margin-left: 6px; }
.banner { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: #2a2113; border: 1px solid #5a4520; color: #f3d9a4; font-size: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 12px; }

/* sign-in */
.signin { max-width: 360px; margin: 12vh auto 0; display: flex; flex-direction: column; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.signin p { margin: 0; color: var(--soft); }
.signin input { font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); outline: none; }
.signin input:focus { border-color: var(--accent); }
.signin button { border: 0; border-radius: 12px; padding: 12px; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; }
.err { color: var(--down) !important; min-height: 1.2em; font-size: 14px; }

/* right now */
.now { display: grid; grid-template-columns: auto 1fr; gap: 18px 28px; align-items: center; background: linear-gradient(135deg, #24120f, var(--panel) 60%); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; }
.now-main { display: flex; flex-direction: column; }
.now .k { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 rgba(69, 212, 131, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(69, 212, 131, 0); } 100% { box-shadow: 0 0 0 0 rgba(69, 212, 131, 0); } }
#now-total { font-size: 56px; line-height: 1.05; font-weight: 700; font-variant-numeric: tabular-nums; }
.now-sites { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.now-sites li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; }
.now-sites li i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.now-sites li b { font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .now { grid-template-columns: 1fr; } .now-sites { justify-content: flex-start; } }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.tile > span:first-child { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.tile b { display: block; font-size: 30px; line-height: 1.15; font-variant-numeric: tabular-nums; margin-top: 2px; }
.chg { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.chg.up { color: var(--up); } .chg.down { color: var(--down); }
@media (max-width: 720px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile b { font-size: 26px; } }

/* bar lists */
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 14px; }
.bars .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); }
.bars .v { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.bars .track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: rgba(240, 232, 220, .06); overflow: hidden; }
.bars .fill { height: 100%; border-radius: 4px; background: var(--c, var(--soft)); }
.bars .empty { color: var(--muted); font-size: 14px; display: block; }

/* site cards */
.site { margin-top: 28px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 18px; overflow: hidden; }
.site-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 18px 0; }
.site-h h2 { font-size: 21px; }
.site-h .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.live { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.live .pulse { animation-duration: 2.4s; }
.live.zero .pulse { background: var(--muted); animation: none; }
.site-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mini .tile { background: var(--panel-2); padding: 12px 14px; }
.mini .tile b { font-size: 24px; }
@media (max-width: 720px) { .mini { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.trend { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 6px; }
.trend h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 0 4px 6px; }
.plot { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 140px auto; column-gap: 8px; padding: 4px 4px 0; }
.yax { position: relative; min-width: 24px; }
.yax span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pbox { position: relative; touch-action: pan-y; cursor: crosshair; }
.pbox svg { display: block; width: 100%; height: 100%; overflow: visible; }
.xax { grid-column: 2; position: relative; height: 22px; }
.xax span { position: absolute; top: 5px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.xax span.first { transform: none; } .xax span.last { transform: translateX(-100%); }
.trend .grid { stroke: rgba(240, 232, 220, .07); stroke-width: 1; }
.trend .line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .area { fill: var(--c); opacity: .12; }
.trend .xh { stroke: rgba(240, 232, 220, .35); stroke-width: 1; }
.trend .mk { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--panel-2); pointer-events: none; }
.grid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid4 .panel { background: var(--panel-2); padding: 14px 16px; border-radius: 14px; }
@media (max-width: 720px) { .grid4 { grid-template-columns: minmax(0, 1fr); } }
.livepages { font-size: 14px; color: var(--soft); }
.livepages b { color: var(--text); }
.actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.actions div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.actions span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.actions b { font-size: 22px; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.devs { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin-bottom: 10px; }
.devs i { display: block; height: 100%; }
.devs i:nth-child(1) { background: #3987e5; } .devs i:nth-child(2) { background: #d95926; } .devs i:nth-child(3) { background: #c98500; }
.devkey { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--soft); }
.devkey li::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; background: var(--k); }
.note { padding: 16px 18px; color: var(--soft); font-size: 14px; }
.foot { margin-top: 28px; text-align: center; }

.tip { position: fixed; z-index: 30; pointer-events: none; background: #f3ece2; color: #120d0c; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.tip span { font-weight: 500; color: #4d4540; margin-right: 6px; }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* right-now lists, search terms, ticket pages */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.h3sub { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); margin-left: 6px; }
.now-panel { background: var(--panel-2); padding: 14px 16px; border-radius: 14px; display: grid; gap: 16px; }
.now-panel.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .now-panel.two { grid-template-columns: minmax(0, 1fr); } }
.live-list .track { height: 6px; }
.scope { margin: -4px 2px 0; }
.grid4 .panel.wide { grid-column: 1 / -1; }
.tbl-wrap { overflow-x: auto; }
.terms { width: 100%; border-collapse: collapse; font-size: 14px; }
.terms th { text-align: right; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 0 0 8px 12px; white-space: nowrap; }
.terms th:first-child, .terms td:first-child { text-align: left; padding-left: 0; }
.terms td { text-align: right; padding: 7px 0 7px 12px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.terms td:first-child { color: var(--text); word-break: break-word; }
