:root {
  color-scheme: dark;
  --bg: #0b0e11;
  --surface: #13181d;
  --surface-raised: #1a2128;
  --line: #27313a;
  --line-strong: #3a4752;
  --text: #edf1f4;
  --muted: #94a1ac;
  --open: #9be15d;
  --open-ink: #10210a;
  --request: #f4b740;
  --request-soft: #2b2110;
  --danger: #ff8d7a;
  --radius: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  /* Charts. The site's green and amber are too alike for colorblind readers to
     tell apart as chart colors, so charts use a validated blue, with gray for
     de-emphasis. */
  --viz-accent: #3987e5;
  --viz-track: #104281;
  --viz-muted: #4a5661;
  --viz-grid: #1f272e;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; }

button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--open);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
  background: rgba(11, 14, 17, .92);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}

.scope { width: 28px; height: 28px; flex: none; }
.scope .ring { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.scope .blip { fill: var(--open); }
.scope .sweep { fill: var(--open); fill-opacity: .4; transform-origin: 16px 16px; animation: sweep 5s linear infinite; }

@keyframes sweep { to { transform: rotate(360deg); } }

.topbar-end { display: flex; align-items: center; gap: 14px; }

.alerts-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.alerts-button:hover { border-color: var(--muted); color: var(--text); }
.alerts-button.is-on { border-color: var(--open); color: var(--open); }
.alerts-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.alerts {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}
.alerts::backdrop { background: rgba(0, 0, 0, .6); }
.alerts h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.01em; }
.alerts-intro { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.alerts fieldset { margin: 0 0 12px; padding: 0; border: 0; }
.alerts legend { margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.alerts-choice { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 15px; cursor: pointer; }
.alerts-choice input, .alerts-tags input { accent-color: var(--open); }
.alerts-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0 24px; }
.alerts-tags label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.alerts-tags label:has(input:checked) { border-color: var(--open); color: var(--text); }
.alerts-status { min-height: 20px; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.alerts-status.is-error { color: var(--danger); }
.alerts-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.alerts-primary, .alerts-secondary {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.alerts-primary { border: 0; background: var(--open); color: var(--open-ink); }
.alerts-primary:disabled { opacity: .6; cursor: progress; }
.alerts-secondary { border: 1px solid var(--line-strong); background: none; }
.alerts-secondary:hover { border-color: var(--muted); }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a[aria-current="page"] { background: var(--surface-raised); color: var(--text); }

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.live[data-state="live"] .live-dot { background: var(--open); animation: pulse 2.4s ease-in-out infinite; }
.live[data-state="stale"] .live-dot { background: var(--request); }
.live[data-state="down"] .live-dot { background: var(--danger); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(155, 225, 93, .5); }
  50% { box-shadow: 0 0 0 5px rgba(155, 225, 93, 0); }
}

/* Intro */

main { padding: 0 var(--gutter); max-width: 1500px; margin: 0 auto; }

.intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 48px;
  padding: clamp(28px, 5vw, 52px) 0 24px;
}

h1 {
  margin: 0;
  max-width: 17em;
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.intro-cta { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.intro-cta a { color: var(--request); font-weight: 600; text-underline-offset: 3px; }
.intro-cta a:hover { color: #ffd27a; }

.tally { display: flex; gap: clamp(20px, 3vw, 36px); margin: 0; }
.tally dt { font-size: 13px; color: var(--muted); white-space: nowrap; }
.tally dd {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.tally dd.is-open { color: var(--open); }
.tally dd.is-request { color: var(--request); }

/* First-run scan */

.scan {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  color: var(--muted);
}

.scan-track {
  flex: 1 1 120px;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}

#scan-bar { display: block; height: 100%; width: 0; background: var(--open); transition: width .4s; }
#scan-percent { font-family: var(--mono); color: var(--text); }

/* Filters */

.filters {
  position: sticky;
  top: 53px;
  z-index: 10;
  margin: 0 calc(var(--gutter) * -1) 20px;
  padding: 12px var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.filters-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }

.search { flex: 1 1 240px; }

.search input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}
.search input::placeholder { color: var(--muted); }

.segments {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.segments button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.segments button:hover { color: var(--text); }
.segments button[aria-pressed="true"] { background: var(--line-strong); color: var(--text); font-weight: 600; }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--open); }

/* The tag row scrolls sideways: by swipe, mouse wheel, keyboard focus, or the
   arrows that appear at whichever end has more tags. */
.tags-wrap { position: relative; margin-top: 10px; }
.tags-wrap:has(.tags:empty) { display: none; }

.tags {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.tags::-webkit-scrollbar { display: none; }

.tags-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 44px;
  padding: 0;
  border: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.tags-arrow.is-prev { left: 0; padding-right: 14px; background: linear-gradient(to right, var(--bg) 55%, transparent); text-align: left; }
.tags-arrow.is-next { right: 0; padding-left: 14px; background: linear-gradient(to left, var(--bg) 55%, transparent); text-align: right; }
.tags-arrow:hover { color: var(--open); }

.tags button {
  flex: none;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.tags button:hover { border-color: var(--line-strong); color: var(--text); }
.tags button[aria-pressed="true"] { border-color: var(--open); color: var(--open); }

/* Feed */

.result-note { min-height: 21px; margin: 0 0 12px; font-size: 14px; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 18px;
}

/* Each card has two faces. The front sets the height; the back scrolls inside it. */
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  perspective: 1600px;
  cursor: pointer;
}
.card.is-arriving { animation: arrive .7s cubic-bezier(.2, .7, .2, 1); }

.card-inner {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.card.is-flipped .card-inner { transform: rotateY(180deg); }

.card-face {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: border-color .15s;
}
.card:hover .card-face { border-color: var(--line-strong); }
.card.is-arriving .card-face { border-color: var(--open); }

.card-front { position: relative; display: flex; flex: 1; flex-direction: column; }

.card-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  transform: rotateY(180deg);
  cursor: auto;
}

.card-flip {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(237, 241, 244, .2);
  border-radius: 50%;
  background: rgba(11, 14, 17, .72);
  color: var(--text);
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.card-flip:hover { background: rgba(11, 14, 17, .92); border-color: rgba(237, 241, 244, .45); }
.card-flip svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.card-back-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-back-head .card-title { min-width: 0; }

.card-unflip {
  flex: none;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.card-unflip:hover { border-color: var(--muted); color: var(--text); }

.card-back-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 14px;
  line-height: 1.55;
  color: #c3ccd4;
  overflow-wrap: anywhere;
}
.card-back-scroll:focus-visible { outline-offset: -2px; }

.card-back-text { margin: 0; }

.card-about { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-about:empty { display: none; }
.card-about-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-about-heading { margin: 14px 0 4px; font-size: 14px; color: var(--text); }
.card-about-title + .card-about-heading { margin-top: 0; }
.card-about p { margin: 0 0 8px; }
.card-about ul { margin: 0 0 8px; padding-left: 18px; }
.card-about li { margin-bottom: 3px; }
.card-about strong { color: var(--text); }
.card-about .card-about-note { margin: 0; color: var(--muted); }

.card-platforms { margin: 0; font-size: 13px; color: var(--muted); }

@keyframes arrive {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: none; }
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 460 / 215;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-raised), var(--line));
}

.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s;
}
.card:hover .card-media img { transform: scale(1.03); }

.card-media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  font-weight: 600;
  text-align: center;
  color: var(--muted);
}

.badge-new {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--open);
  color: var(--open-ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.card-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 14px; }

.card-title { margin: 0; font-size: 17px; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }

.card-by { margin: -4px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

.card-text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  color: #c3ccd4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 0; padding: 0; list-style: none; }
.card-tags li {
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--surface-raised);
  font-size: 12px;
  color: var(--muted);
}

.card-foot { margin-top: auto; padding-top: 8px; }

.card-facts { display: grid; gap: 3px; margin: 0 0 10px; font-size: 13px; }
.card-facts div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; }
.card-facts dt { color: var(--muted); }
.card-facts dd { margin: 0; font-variant-numeric: tabular-nums; }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  transition: filter .15s, background-color .15s;
}
.card-actions { display: flex; gap: 8px; }
.card-actions .cta { flex: 1; }

.card-save {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.card-save:hover { border-color: var(--muted); color: var(--text); }
.card-save svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.card-save[aria-pressed="true"] { border-color: var(--request); color: var(--request); }
.card-save[aria-pressed="true"] svg { fill: currentColor; }

.card-signed { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.card-undo { padding: 0; border: 0; background: none; color: var(--text); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.card.is-signed-up .card-media img { opacity: .5; }

.saved-filter {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.saved-filter:hover { color: var(--text); }
.saved-filter[aria-pressed="true"] { border-color: var(--request); color: var(--request); font-weight: 600; }

.cta-open { background: var(--open); color: var(--open-ink); }
.cta-open:hover { filter: brightness(1.1); }
.cta-request { border-color: var(--request); background: var(--request-soft); color: var(--request); }
.cta-request:hover { background: #3a2c14; }

/* Skeletons and messages */

.card-skeleton { min-height: 390px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); animation: shimmer 1.4s ease-in-out infinite; }

@keyframes shimmer { 50% { opacity: .55; } }

.feed-state { margin: 40px 0; text-align: center; color: var(--muted); }
.feed-state button {
  margin-left: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

#sentinel { height: 1px; }

.more { display: flex; justify-content: center; margin: 28px 0 0; }
.more button {
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.more button:hover { border-color: var(--muted); background: var(--surface-raised); }

.new-pill {
  position: fixed;
  top: 66px;
  left: 50%;
  z-index: 30;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 20px;
  background: var(--open);
  color: var(--open-ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transform: translateX(-50%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
}

.footer {
  max-width: 1500px;
  margin: 56px auto 0;
  padding: 20px var(--gutter) 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.footer p { margin: 0 0 4px; }

/* Featured playtests */

.featured { margin: 0 0 28px; }
.featured-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; }
.featured-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.featured-head a { font-size: 14px; color: var(--muted); text-underline-offset: 3px; }
.featured-head a:hover { color: var(--text); }

.card.is-featured .card-face { border-color: var(--request); }
.badge-featured {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--request);
  color: #241a05;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Ad slots. In the feed a slot takes one card's place; on other pages it's a band. */

.ad-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.ad-slot:not([data-filled]) { display: none; }
.ad-feed { min-height: 250px; }
.ad-banner { margin: 28px 0 0; min-height: 120px; }
.ad-label { margin-bottom: 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ad-slot .adsbygoogle { flex: 1; }

.ad-slot.is-promo { justify-content: center; gap: 6px; }
.promo-title { font-size: 18px; line-height: 1.25; letter-spacing: -.01em; }
.promo-text { margin: 0; font-size: 14px; color: #c3ccd4; }
.promo-cta {
  align-self: flex-start;
  margin-top: 8px;
  padding: 8px 14px;
  border: 1px solid var(--request);
  border-radius: 7px;
  background: var(--request-soft);
  color: var(--request);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.promo-cta:hover { background: #3a2c14; }

.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 10px; }
.footer-links a { color: var(--text); text-underline-offset: 3px; }

/* Plain text pages */

.prose { max-width: 720px; padding-top: clamp(28px, 5vw, 52px); padding-bottom: 8px; font-size: 16px; line-height: 1.6; color: #c3ccd4; }
.prose h1 { color: var(--text); }
.prose h2 { margin: 28px 0 8px; font-size: 19px; color: var(--text); }
.prose p { margin: 0 0 12px; }
.prose a { color: var(--text); text-underline-offset: 3px; }
.prose-meta { color: var(--muted); font-size: 14px; }

/* Stats page */

.dash-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding: clamp(28px, 5vw, 52px) 0 24px;
}
.dash-sub { margin: 8px 0 0; font-size: 15px; color: var(--muted); }

.dash-button, .dash-toggle, .dash-copy {
  flex: none;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  font-size: 14px;
  cursor: pointer;
}
.dash-toggle, .dash-copy { min-height: 32px; padding: 0 10px; background: none; color: var(--muted); font-size: 13px; }
.dash-button:hover, .dash-toggle:hover, .dash-copy:hover { border-color: var(--muted); color: var(--text); }

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.dash-hero, .dash-tile {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.dash-hero { grid-column: 1 / -1; }
.dash-label { margin: 0; font-size: 13px; color: var(--muted); }
.dash-hero-value { margin: 4px 0 0; font-size: clamp(48px, 7vw, 64px); font-weight: 650; line-height: 1.05; letter-spacing: -.02em; }
.dash-value { margin: 6px 0 0; font-size: 30px; font-weight: 600; line-height: 1.15; }

.meter { height: 8px; margin-top: 10px; overflow: hidden; border-radius: 4px; background: var(--viz-track); }
.meter span { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--viz-accent); }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}
.dash-tall { grid-row: span 2; }
.dash-card {
  min-width: 0;
  margin: 0;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.dash-wide { grid-column: 1 / -1; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dash-card h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.dash-caption { margin: 2px 0 12px; font-size: 13px; color: var(--muted); }
.dash-empty { margin: 20px 0; font-size: 14px; color: var(--muted); }

.dash-table { max-height: 340px; overflow: auto; }
.dash-table table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.dash-table th, .dash-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.dash-table th { font-weight: 600; color: var(--muted); }
.dash-table :is(th, td):not(:first-child) { text-align: right; }

.viz { display: block; overflow: visible; }
.viz:focus-visible { outline: 2px solid var(--open); outline-offset: 4px; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; shape-rendering: crispEdges; }
.viz-axis { stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; }
.viz-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-label { fill: var(--text); font-size: 12px; font-weight: 600; }
.viz-bar.is-accent { fill: var(--viz-accent); }
.viz-bar.is-muted { fill: var(--viz-muted); }
.viz-bar.is-active, .hbar-fill.is-active { filter: brightness(1.3); }
.viz-line { fill: none; stroke: var(--viz-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viz-area { fill: var(--viz-accent); fill-opacity: .1; }
.viz-dot { fill: var(--viz-accent); stroke: var(--surface); stroke-width: 2; }
.viz-crosshair { stroke: var(--muted); stroke-width: 1; }

.viz-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: -4px 0 10px; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.viz-legend li { display: flex; align-items: center; gap: 6px; }
.viz-swatch { width: 10px; height: 10px; border-radius: 2px; }
.viz-swatch.is-accent { background: var(--viz-accent); }
.viz-swatch.is-muted { background: var(--viz-muted); }

.viz-tooltip {
  position: fixed;
  z-index: 50;
  display: grid;
  gap: 1px;
  max-width: 280px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #0e1216;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}
.viz-tooltip strong { font-size: 14px; color: var(--text); }

.hbar-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.hbar-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13px; }
.hbar-label { color: #c3ccd4; overflow-wrap: anywhere; }
.hbar-bar { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hbar-fill { flex: none; height: 12px; border-radius: 0 4px 4px 0; background: var(--viz-accent); }
.hbar-value { font-size: 12px; font-variant-numeric: tabular-nums; }

.dash-facts { margin-top: 28px; }
.dash-facts h2 { margin: 0 0 12px; font-size: 20px; letter-spacing: -.01em; }
.dash-facts ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dash-facts li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 15px;
}

.dash-downloads { margin-top: 28px; }
.dash-downloads h2 { margin: 0 0 12px; font-size: 20px; letter-spacing: -.01em; }
.dash-downloads ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.dash-downloads li { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.dash-downloads a { font-weight: 600; text-underline-offset: 3px; }
.dash-downloads span { color: var(--muted); }

@media (min-width: 960px) {
  .dash-kpis { grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); }
  .dash-hero { grid-column: auto; }
}

@media (max-width: 640px) {
  .intro { padding-top: 24px; }
  .filters { position: static; }
  .segments { flex: 1; }
  .segments button { flex: 1; padding: 0 8px; }
  .tally { width: 100%; justify-content: space-between; }
  .tags button { min-height: 38px; }
  .card-unflip { min-height: 38px; }
}

@media (max-width: 420px) {
  .live-detail { display: none; }
  .alerts-label { display: none; }
  .topbar-end { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
