/* Live numbers page: one compact screen. Layout ideas from the Zenith site (black canvas, hairlines, cards,
   mono labels); colours are Kahan Chalein's own: night-bus blue-black, a marigold sunrise and sea teal. */
:root {
  --bg: #06080d;
  --panel: #0b0f16;
  --raised: #111622;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eceff4;
  --dim: #a1a9b8;
  --faint: #8a93a3;
  --sun: #f2b441;            /* UI accent */
  --sun-on: #140c00;
  --sea: #3fd2bc;            /* live dot */
  --mark-1: #c9821c;         /* chart series 1 (validated on --panel) */
  --mark-2: #27a492;         /* chart series 2 */
  --track: rgba(255, 255, 255, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: rgba(6, 8, 13, 0.8); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 50px; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand b { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--sun); color: var(--sun-on); font-family: Georgia, serif; font-size: 14px; }
.brand span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-cta { display: flex; gap: 8px; flex: none; }
.btn { display: inline-flex; align-items: center; height: 30px; padding: 0 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line-strong); transition: background .2s, border-color .2s, box-shadow .3s; }
.btn.ghost:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.04); }
.btn.primary { background: var(--sun); border-color: var(--sun); color: var(--sun-on); box-shadow: 0 8px 26px -12px rgba(242, 180, 65, 0.6); }
@media (max-width: 560px) { .btn.ghost { display: none; } }

/* header: a soft glow, like Zenith's hero, but one line tall */
.head { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; padding: 22px 0 14px; }
.head::before { content: ""; position: absolute; inset: -50px calc(50% - 50vw) auto; height: 220px; z-index: -1;
  background: radial-gradient(ellipse 40% 80% at 30% 0%, rgba(242, 180, 65, 0.13), transparent 70%),
              radial-gradient(ellipse 25% 60% at 85% 0%, rgba(63, 210, 188, 0.06), transparent 70%); }
h1 { font-size: clamp(22px, 3.4vw, 28px); line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; }
h1 em { font-family: Fraunces, Georgia, serif; font-style: italic; font-weight: 600; letter-spacing: -0.01em; color: var(--sun); }
.lede { color: var(--faint); font-size: 13px; margin-top: 3px; }
.head-r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
@media (max-width: 640px) { .head-r { align-items: flex-start; } }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 11px; color: var(--dim); background: rgba(255, 255, 255, 0.02); }
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--sea); box-shadow: 0 0 8px var(--sea); animation: pulse 2.4s ease-in-out infinite; }
.eyebrow.stale i { background: var(--faint); box-shadow: none; animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
.clock { font-size: 11.5px; color: var(--faint); }
.clock b { color: var(--text); font-weight: 500; }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; background: var(--line); }
.stat { background: var(--panel); padding: 12px 16px; }
.stat b { display: block; font-size: 26px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 13px; }
.stat small { display: block; font-size: 11.5px; color: var(--faint); }
.stat.lead b { color: var(--sun); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* cards */
.card { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 60%), var(--panel); overflow: hidden; transition: border-color .3s; }
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(242, 180, 65, 0.08), transparent 60%); }
.card:hover { border-color: var(--line-strong); }
.card:hover::after { opacity: 1; }
.card h3 { font-size: 13px; font-weight: 600; }
.card .note { font-size: 11.5px; color: var(--faint); }
.card.hl { border-color: rgba(242, 180, 65, 0.35); }
.card.hl h3::before { content: "goSTOPS · "; color: var(--sun); font-family: var(--mono); font-weight: 500; font-size: 11px; }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }

.duo { display: grid; grid-template-columns: 7fr 5fr; gap: 10px; margin-top: 10px; }
@media (max-width: 820px) { .duo { grid-template-columns: 1fr; } }

/* daily chart */
.legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--dim); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.chart { position: relative; height: 168px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); }
.chart .axis text { fill: var(--faint); font: 10.5px var(--mono); }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: rgba(255, 255, 255, 0.035); }
.chart .val { fill: var(--text); font: 500 11px var(--font); }
.table-view { font-size: 12px; color: var(--faint); }
.table-view summary { cursor: pointer; width: max-content; }
.table-view table { width: 100%; border-collapse: collapse; margin-top: 6px; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { text-align: left; padding: 4px; border-bottom: 1px solid var(--line); }
.table-view th { font-weight: 500; }

/* funnel */
.funnel { list-style: none; padding: 0; display: grid; gap: 9px; }
.funnel li { display: grid; grid-template-columns: 128px 1fr 76px; gap: 10px; align-items: center; }
.funnel .lbl { font-size: 12.5px; line-height: 1.3; }
.funnel .lbl small { display: block; color: var(--faint); font-size: 11px; }
.funnel .num { text-align: right; font-variant-numeric: tabular-nums; line-height: 1.2; }
.funnel .num b { font-size: 15px; font-weight: 600; }
.funnel .num small { color: var(--faint); font-size: 11px; margin-left: 6px; }
.funnel .num { white-space: nowrap; }

/* bars */
.bar { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--mark-1); transform-origin: left; animation: grow .9s var(--ease) both; }
.bar.sea i { background: var(--mark-2); }
@keyframes grow { from { transform: scaleX(0); } }
.rows { list-style: none; padding: 0; margin-top: 8px; display: grid; gap: 6px; }
.rows li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 12.5px; }
.rows li .bar { grid-column: 1 / -1; height: 4px; }
.rows .n { font-variant-numeric: tabular-nums; color: var(--dim); }
.empty { margin-top: 8px; font-size: 12px; color: var(--faint); border: 1px dashed var(--line-strong); border-radius: 8px; padding: 6px 10px; }

/* bento: six small cards in one row */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 10px; }
@media (max-width: 980px) { .bento { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .bento { grid-template-columns: 1fr; } }
.big { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.big div b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.big div span { font-size: 11.5px; color: var(--faint); }

/* notes, footer */
.notes { margin-top: 12px; font-size: 13px; color: var(--dim); }
.notes summary { cursor: pointer; width: max-content; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }
.notes ul { padding: 8px 0 0 18px; display: grid; gap: 4px; max-width: 820px; }
.notes b { color: var(--text); font-weight: 600; }
.notes a { color: var(--sun); text-decoration: underline; text-underline-offset: 3px; }
.foot { margin-top: 18px; padding: 12px 0 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.foot p:first-child { color: var(--dim); }

/* tooltip */
.tip { position: fixed; z-index: 30; pointer-events: none; background: var(--raised); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 7px 10px; font-size: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); min-width: 120px; }
.tip b { display: block; font-weight: 600; margin-bottom: 2px; }
.tip div { display: flex; justify-content: space-between; gap: 12px; color: var(--dim); }
.tip div span:last-child { color: var(--text); font-variant-numeric: tabular-nums; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

@media (prefers-reduced-motion: reduce) { .bar i, .eyebrow i { animation: none; } .card, .btn { transition: none; } }
