/* SnapTrack — one small stylesheet. Dark by default, light when the OS asks. */

:root {
  --bg: #0d0f12;
  --surface: #14171c;
  --surface-2: #1b1f26;
  --line: #262b33;
  --text: #e7e9ec;
  --muted: #8b939e;
  --accent: #f2b544;
  --accent-soft: rgba(242, 181, 68, 0.14);
  --bar: #5b6676;
  --link: #9cc3ff;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7f5;
    --surface: #ffffff;
    --surface-2: #f1f1ee;
    --line: #e4e4df;
    --text: #17191c;
    --muted: #6a7078;
    --accent: #b9770e;
    --accent-soft: rgba(185, 119, 14, 0.12);
    --bar: #b3b8bf;
    --link: #1f5fbf;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.brand-tld { color: var(--muted); font-weight: 500; }
nav { display: flex; gap: 2px; overflow-x: auto; }
nav a { color: var(--muted); padding: 6px 10px; border-radius: 6px; white-space: nowrap; font-size: 14px; }
nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

/* Hero */
.hero { padding: 40px 0 24px; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.eyebrow a { color: inherit; }
h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 680; max-width: 24ch; }
.lede { margin: 10px 0 0; color: var(--muted); max-width: 62ch; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.kpi { background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-value { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.kpi-text { font-size: 18px; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-note { color: var(--muted); font-size: 12.5px; }
.accent { color: var(--accent); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
h2 { margin: 0; font-size: 15px; font-weight: 620; }
.more { font-size: 13px; }
.count { font-size: 13px; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; }
.notice { border-color: var(--accent-soft); }
.notice p { margin: 8px 0 0; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid-2 > .card { margin-bottom: 20px; }
.grid-wide-left { grid-template-columns: 1.6fr 1fr; align-items: start; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13.5px; }
.empty { color: var(--muted); margin: 4px 0; }
.tag { font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; vertical-align: middle; letter-spacing: 0; }
.status { margin: -4px 0 24px; }

/* Charts */
.chart { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 11px var(--sans); }
.chart .bar { fill: var(--bar); transition: fill 0.12s; }
.chart .bar.hot { fill: var(--accent); }
.chart .hit { fill: transparent; }
.chart .col:hover .bar { fill: var(--text); }
.spark { display: block; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }

/* Tables */
.scroll { overflow-x: auto; max-height: 640px; overflow-y: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 6px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.num { text-align: right !important; }

.filter { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.filter input { flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 7px 11px; outline: none; }
.filter input:focus { border-color: var(--accent); }

/* Today list */
.domain-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.domain-list li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); break-inside: avoid; font-size: 14px; }
.domain-list li span:last-child { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Month registrar shares */
.share-list { list-style: none; margin: 0; padding: 0; }
.share-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 6px 0; font-size: 14px; }
.share-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--w), var(--surface-2) var(--w)); }

/* About */
.prose { max-width: 720px; }
.prose p, .prose li { color: var(--text); }
.prose h2 { margin: 22px 0 6px; }
.prose code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.defs { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 16px 0; }
.defs dt { font-weight: 600; }
.defs dd { margin: 0; color: var(--muted); }
.status-list li { margin: 3px 0; }

/* Footer */
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 13px; padding-top: 12px; padding-bottom: 40px; }
.foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-wide-left { grid-template-columns: 1fr; gap: 0; }
  .domain-list { columns: 1; }
  .hide-sm { display: none; }
  .hero { padding: 28px 0 18px; }
  .kpi-value { font-size: 24px; }
  .brand-tld { display: none; }
  .defs { grid-template-columns: 1fr; gap: 2px; }
  .defs dd { margin-bottom: 8px; }
}

@media (max-width: 440px) {
  .nav-about { display: none; }
  nav a { padding: 6px 8px; }
}
