/* ATTN Revenue — Attention Mine's own dark palette and green, laid out with Apple's system materials. */
:root {
  color-scheme: dark;
  /* Attention Mine's own dark theme tokens (attentionmine.com): black 14,14,13 · gray-900 23,23,22 ·
     gray-800 45,46,44 · gray-700 68,69,65 · gray-200 190,191,188 · green scale 300/500/600 */
  --bg: #0e0e0d;
  --surface: #171716;
  --surface-2: #2d2e2c;
  --surface-3: #444541;
  --separator: rgba(190, 191, 188, 0.14);
  --grid: rgba(190, 191, 188, 0.09);
  --label: #ffffff;
  --label-2: #bebfbc;
  --label-3: #8b8c87;
  --accent: #1ba81b;        /* bars and marks: their green-600, the step that passes the dark lightness band on #171716 */
  --accent-hover: #22d222;  /* green-500 */
  --accent-text: #72e272;   /* green-300, their accent-display: links, focus, small text accents */
  --accent-soft: rgba(27, 168, 27, 0.42);
  --accent-glow: rgba(34, 210, 34, 0.08);
  --good: #4ada4a;          /* green-400, their positive badge */
  --bad: #ff5a4e;
  --warn: #f5b83d;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 4vw, 32px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* component display rules must never un-hide an element */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 400 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
p, h1, h2, dl, dd, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }

/* ── bar ─────────────────────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 10;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(14, 14, 13, 0.74);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator);
}
.bar-inner {
  max-width: 1120px; margin: 0 auto; height: 52px;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 18px; height: 18px; color: var(--accent); flex: none; }
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-ticker {
  font-size: 12px; font-weight: 600; color: var(--label-2);
  padding: 2px 7px; border-radius: 6px; background: var(--surface-2); letter-spacing: 0.02em;
}
.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--label-2);
  padding: 5px 11px 5px 9px; border-radius: 999px; background: var(--surface);
  white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--label-3); position: relative; }
.status[data-state="live"] .status-dot { background: var(--good); }
.status[data-state="live"] .status-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: var(--good); opacity: 0; animation: pulse 2.4s ease-out infinite;
}
.status[data-state="delayed"] .status-dot { background: var(--warn); }
.status[data-state="offline"] .status-dot { background: var(--bad); }
@keyframes pulse { 0% { transform: scale(0.4); opacity: 0.45; } 70%, 100% { transform: scale(1.3); opacity: 0; } }

/* ── page ────────────────────────────────────────────────────────── */
.page {
  max-width: 1120px; margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: 28px calc(40px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 16px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-width: 0;
}
.eyebrow { font-size: 13px; font-weight: 500; color: var(--label-2); }
.card-title { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }

/* ── top: today + live round ─────────────────────────────────────── */
.top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.today { padding: 14px 4px 8px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.hero {
  font-family: var(--font-display);
  font-size: clamp(52px, 8.4vw, 88px); line-height: 1; font-weight: 600; letter-spacing: -0.04em;
  margin-top: 4px;
}
.hero-sub { font-size: 17px; color: var(--label-2); letter-spacing: -0.01em; }
.spark { position: relative; height: 84px; margin-top: 14px; touch-action: pan-y; }
.spark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.spark .s-base { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.spark .s-area { fill: url(#spark-fill); }
.spark .s-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .s-proj { fill: none; stroke: var(--accent); stroke-opacity: 0.6; stroke-width: 2; stroke-dasharray: 1 5; stroke-linecap: round; }
.spark .s-target { fill: var(--bg); stroke: var(--accent); stroke-opacity: 0.8; stroke-width: 1.5; }
.spark .s-dot { fill: var(--accent-hover); stroke: var(--bg); stroke-width: 2; }
.spark .s-halo { fill: var(--accent-hover); transform-box: fill-box; transform-origin: center; animation: halo 2.4s ease-out infinite; }
.spark .s-cross { stroke: var(--label-3); stroke-width: 1; shape-rendering: crispEdges; }
.spark .s-hover { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
@keyframes halo { 0% { transform: scale(1); opacity: 0.5; } 80%, 100% { transform: scale(3.4); opacity: 0; } }
.spark-tip { min-width: 0; white-space: nowrap; }
.spark-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.today-facts { display: flex; flex-wrap: wrap; gap: 14px 48px; margin-top: 18px; }
.today-facts div { display: grid; gap: 2px; }
.today-facts dt { font-size: 13px; color: var(--label-2); }
.today-facts dd { font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; }
.today-facts dd.fact-note { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--label-3); font-variant-numeric: tabular-nums; margin-top: 2px; }
.today-facts dd.accent-value { color: var(--good); }

.round { display: flex; flex-direction: column; gap: 16px; }
.round-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.round-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.chip {
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--label); white-space: nowrap;
}
.chip[data-phase="drawing"] { color: var(--accent-text); }
.chip[data-phase="paused"] { color: var(--warn); }
.bar-right { display: flex; align-items: center; gap: 8px; }
.notice {
  font-size: 13px; font-weight: 600; color: var(--warn); white-space: nowrap;
  padding: 5px 11px; border-radius: 999px; background: rgba(245, 184, 61, 0.12);
}
.round-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; flex: 1; }
.board {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px;
  width: clamp(150px, 15vw, 176px); aspect-ratio: 1;
}
.cell {
  border-radius: 6px; background: var(--surface-2);
  position: relative; overflow: hidden;
}
/* a tile with no ad keeps the deposit-intensity fill; a tile with an ad shows its picture */
.cell > i {
  position: absolute; inset: 0; background: var(--accent);
  opacity: var(--fill, 0); transition: opacity 600ms ease;
}
.cell > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.round-facts { display: grid; gap: 12px; }
.round-facts div { display: grid; gap: 1px; }
.round-facts dt { font-size: 13px; color: var(--label-2); }
.round-facts dd { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.round-facts .dd-sub { font-size: 13px; font-weight: 400; color: var(--label-2); letter-spacing: 0; }
.timer { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.timer-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width 1s linear; }
.round-last { font-size: 13px; color: var(--label-2); margin-top: -4px; }

/* ── tiles ───────────────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; }
.tile { padding: 18px 22px; display: grid; gap: 3px; }
.tile + .tile { border-left: 0.5px solid var(--separator); }
.tile-label { font-size: 13px; color: var(--label-2); }
.tile-value { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.tile-sub { font-size: 13px; color: var(--label-3); font-variant-numeric: tabular-nums; }

/* ── chart ───────────────────────────────────────────────────────── */
.chart-card { display: grid; gap: 14px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.chart-titles { display: grid; gap: 4px; }
.chart-readout { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.readout-value { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.readout-label { font-size: 13px; color: var(--label-2); }
.segmented {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface-2); border-radius: 9px; padding: 2px; gap: 2px;
}
.segmented button {
  border: 0; background: transparent; border-radius: 7px; padding: 6px 16px;
  font-size: 13px; font-weight: 500; color: var(--label-2); cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}
.segmented button[aria-selected="true"] { background: var(--surface-3); color: var(--label); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.segmented button:focus-visible, .text-button:focus-visible, .chart:focus-visible, .rows a:focus-visible {
  outline: 2px solid var(--accent-text); outline-offset: 2px;
}
.chart { position: relative; height: 260px; outline: none; border-radius: 8px; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis-label { fill: var(--label-3); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--accent); transition: fill 120ms ease; }
.chart .bar[data-soft] { fill: var(--accent-soft); }
.chart .bar[data-active] { fill: var(--accent-hover); }
.chart .ghost { fill: none; stroke: var(--label-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .area { fill: rgba(27, 168, 27, 0.10); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .crosshair { stroke: var(--label-3); stroke-width: 1; shape-rendering: crispEdges; }
.chart .ghost[data-active] { stroke: var(--label-2); }
.chart .band-hit { fill: transparent; cursor: default; }
.chart .band-active { fill: var(--accent-glow); }
.chart .loading-label { fill: var(--label-3); font-size: 12px; font-family: var(--font); }
.chart .loading-base { stroke: var(--grid); stroke-width: 1; stroke-dasharray: 2 4; }
.tooltip {
  position: absolute; z-index: 2; pointer-events: none;
  min-width: 150px; padding: 10px 12px; border-radius: 12px;
  background: rgba(45, 46, 44, 0.94);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  font-size: 13px; line-height: 1.35;
}
.tooltip .tt-time { color: var(--label-2); margin-bottom: 4px; }
.tooltip .tt-value { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.tooltip .tt-row { color: var(--label-2); font-variant-numeric: tabular-nums; }
.tooltip .tt-flag { color: var(--warn); margin-top: 4px; }
.chart-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-note { font-size: 13px; color: var(--label-3); }
.text-button { border: 0; background: none; padding: 4px 0; font-size: 13px; font-weight: 500; color: var(--accent-text); cursor: pointer; border-radius: 4px; }
.table-wrap { overflow-x: auto; max-height: 340px; overflow-y: auto; border-top: 0.5px solid var(--separator); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.table-wrap th { position: sticky; top: 0; background: var(--surface); text-align: right; font-weight: 500; color: var(--label-2); padding: 10px 8px; white-space: nowrap; }
.table-wrap th:first-child, .table-wrap td:first-child { text-align: left; }
.table-wrap td { text-align: right; padding: 8px; border-top: 0.5px solid var(--separator); white-space: nowrap; }

/* ── lists ───────────────────────────────────────────────────────── */
.lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.list-card { padding-bottom: 8px; }
.rows { list-style: none; margin-top: 8px; }
.rows li + li { border-top: 0.5px solid var(--separator); }
.rows a, .rows .row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center;
  padding: 11px 0; text-decoration: none; border-radius: 6px;
}
.rows a:hover .row-title { color: var(--accent-text); }
.row-title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 120ms ease; }
.row-sub { font-size: 13px; color: var(--label-2); grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-value { font-size: 15px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; grid-column: 2; grid-row: 1; }
.row-value.inflow { color: var(--good); }
.row-value-sub { font-size: 13px; color: var(--label-2); text-align: right; font-variant-numeric: tabular-nums; grid-column: 2; grid-row: 2; }
.rows .empty { padding: 14px 0; color: var(--label-3); font-size: 13px; }
.rows li.fresh { animation: fresh 1.6s ease-out; }
@keyframes fresh { from { background: var(--accent-glow); } to { background: transparent; } }

/* ── token ───────────────────────────────────────────────────────── */
.token { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 20px; }
.stat { display: grid; gap: 3px; align-content: end; }
.stat-label { font-size: 13px; color: var(--label-2); text-wrap: balance; }
.stat-value { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 13px; color: var(--label-3); font-variant-numeric: tabular-nums; }

.foot { display: grid; gap: 6px; padding: 8px 4px 0; font-size: 12px; color: var(--label-3); max-width: 72ch; }

/* ── responsive ──────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .top { grid-template-columns: 1fr; }
  .today { padding: 6px 2px 4px; }
  .lists { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile:nth-child(3) { border-left: 0; }
  .tile:nth-child(n+3) { border-top: 0.5px solid var(--separator); }
}
@media (max-width: 520px) {
  .card { padding: 16px; border-radius: 16px; }
  .tile { padding: 14px 16px; }
  .tile-value { font-size: 22px; }
  .round-body { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
  .board { width: 124px; gap: 4px; }
  .cell { border-radius: 4px; }
  .round-facts { gap: 8px; }
  .round-facts dd { font-size: 17px; }
  .token { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart { height: 220px; }
  .brand-ticker { display: none; }
  .today-facts { gap: 12px 24px; }
  .spark { height: 68px; }
  .segmented button { padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
