/* LuckyDraw Insights — marketing site
   Palette mirrors lib/core/theme/app_colors.dart so the site and app read as
   one product. Keep these in sync when the app theme changes. */

:root {
  --bg: #0d1117;
  --bg-elevated: #1a1f2e;
  --surface: #2a3042;
  --border: #374151;
  --border-light: #4b5563;

  --blue: #2563eb;
  --blue-light: #60a5fa;
  --yellow: #fbbf24;
  --green: #10b981;
  --orange: #f59e0b;
  --red: #ef4444;

  --text: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --radius: 12px;
  --radius-lg: 20px;
  --maxw: 1120px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;

  /* Guard against stray horizontal scroll. It must be `clip`, not `hidden`:
     setting overflow on one axis computes the other from `visible` to `auto`,
     which makes the body its own scroll container. iOS Safari then never
     collapses its address bar and toolbars, costing ~130px of vertical space
     on every phone — enough that the simulator's counter and tier tally can no
     longer be seen together. `clip` blocks the same overflow without creating
     a scroll container. The real fix for the overflow itself is the
     max-width:420px rule that drops .header-cta. */
  overflow-x: hidden; /* fallback: Safari < 16 has no `clip` */
  overflow-x: clip;
}

a {
  color: var(--blue-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

/* Two-row header, in the shape the major lottery sites use: the brand gets a
   full row at real size, and navigation sits on its own strip underneath.
   A 44px logo squeezed beside the nav links was unreadable — this artwork is a
   detailed wordmark, not a compact glyph, so it needs the height. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
}

.header-nav {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.92;
}

.brand-logo {
  height: 82px;
  width: auto;
  max-width: 100%;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.brand-logo-lg {
  height: 96px;
}

/* Nav strip: uppercase and letter-spaced so it reads as a distinct band
   beneath the brand rather than competing with it. */
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  padding: 0 24px;
  min-height: 48px;
  flex-wrap: wrap;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
  text-decoration: none;
  border-bottom-color: var(--yellow);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.97rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

/* A store the app has not shipped to yet. Deliberately rendered as a span
   rather than a link: the Play listing 404s until the closed test is promoted
   to production, and a dead store link reads worse than an honest "soon". */
.btn-soon {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.btn svg {
  flex: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.32);
}

.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.44);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 92px 0 88px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 640px;
  background: radial-gradient(
    ellipse at center,
    rgba(37, 99, 235, 0.20) 0%,
    rgba(37, 99, 235, 0) 68%
  );
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 60px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.13);
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: var(--blue-light);
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin-bottom: 20px;
}

.grad {
  background: linear-gradient(135deg, var(--blue-light), var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  font-size: 1.12rem;
  color: var(--text-secondary);
  max-width: 30rem;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.hero-note {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* ---------- Sections ---------- */

section {
  padding: 84px 0;
}

.section-head {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto 52px;
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.35rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 14px;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.divider {
  border-top: 1px solid var(--border);
}

/* ---------- Feature cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 18px;
}

.i-blue   { background: rgba(37, 99, 235, 0.16); }
.i-yellow { background: rgba(251, 191, 36, 0.16); }
.i-green  { background: rgba(16, 185, 129, 0.16); }
.i-red    { background: rgba(239, 68, 68, 0.16); }
.i-orange { background: rgba(245, 158, 11, 0.16); }
.i-purple { background: rgba(139, 92, 246, 0.16); }

.card h3 {
  font-size: 1.12rem;
  margin-bottom: 9px;
  font-weight: 700;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.96rem;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 34px;
  counter-reset: step;
}

.step {
  text-align: center;
}

.step-num {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff;
}

.step h3 {
  font-size: 1.06rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---------- Disclaimer ---------- */

.notice {
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
}

.notice h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--orange);
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.notice p {
  color: var(--text-secondary);
  font-size: 0.97rem;
  margin-bottom: 12px;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice strong {
  color: var(--text);
}

/* ---------- CTA ---------- */

.cta {
  text-align: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(251, 191, 36, 0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 62px 30px;
}

.cta h2 {
  margin-bottom: 12px;
}

.cta p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.store-badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  cursor: default;
}

/* A badge for a store the app has actually shipped to — clickable, unlike the
   "coming soon" placeholders which stay inert. */
.badge-live {
  cursor: pointer;
  text-decoration: none;
  border-color: var(--yellow);
  background: rgba(0, 0, 0, 0.42);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.badge-live:hover,
.badge-live:focus-visible {
  border-color: var(--orange);
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

.badge span {
  display: block;
  text-align: left;
  line-height: 1.25;
}

.badge svg {
  flex: none;
}

.badge .small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.badge .big {
  font-size: 0.98rem;
  font-weight: 700;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 52px 0 36px;
  background: #0a0d12;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  margin-bottom: 34px;
}

.footer-brand {
  max-width: 22rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 14px;
}

.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 9px;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.93rem;
}

.footer-col a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* ---------- Legal / content pages ---------- */

.doc {
  padding: 64px 0 84px;
  max-width: 46rem;
}

.doc h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 10px;
}

.doc .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.doc h2 {
  font-size: 1.28rem;
  margin: 38px 0 12px;
  padding-top: 6px;
}

.doc h3 {
  font-size: 1.05rem;
  margin: 24px 0 8px;
}

.doc p,
.doc li {
  color: var(--text-secondary);
  margin-bottom: 13px;
}

.doc ul,
.doc ol {
  padding-left: 22px;
  margin-bottom: 14px;
}

.doc strong {
  color: var(--text);
}

.doc .callout {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 22px 0;
}

.doc .callout p:last-child {
  margin-bottom: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .lede {
    max-width: none;
  }

  .phone {
    max-width: 300px;
  }

  .brand-logo {
    height: 62px;
  }

  .nav-links {
    gap: 18px;
    justify-content: center;
  }

  .nav-links a {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }

  section {
    padding: 62px 0;
  }

  .hero {
    padding: 62px 0;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 18px;
  }

  /* Full-width only for the stacked hero CTAs — scoping matters, an unscoped
     rule also stretches the compact header button and wraps it onto 3 lines. */
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .site-header .btn {
    padding: 9px 15px;
    font-size: 0.87rem;
    white-space: nowrap;
  }

  .brand-logo {
    height: 52px;
  }

  .brand-logo-lg {
    height: 72px;
  }

  .header-main-inner {
    padding: 12px 18px;
  }

  .nav-links {
    padding: 0 18px;
    gap: 14px;
  }
}

/* Below ~420px the brand and the header CTA cannot both fit on the top row,
   and the CTA wins the overflow, pushing the page into horizontal scroll. Drop
   it — the hero's identical button is immediately below. */
@media (max-width: 420px) {
  .header-cta {
    display: none;
  }

  .ball {
    width: 34px;
    height: 34px;
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Latest results (live) ---------- */

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.result-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.result-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

/* Mirrors the app's GameMark: a lettered ball, one colour per game. Keeping
   the two in step means the site and the app read as one product. */
.result-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.28),
    0 3px 10px rgba(0, 0, 0, 0.35);
}

.result-head h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}

.result-date {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.result-balls {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

/* Six balls must fit one row: a Powerball line wrapping its special ball onto
   a second row reads as a rendering fault. */
.result-ball {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #111827;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: inset 0 -4px 9px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.result-ball.is-special {
  background: linear-gradient(150deg, var(--yellow), #f59e0b);
  color: #111827;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2),
    inset 0 -4px 9px rgba(0, 0, 0, 0.16);
}

.result-empty {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Skeleton shown until the live fetch resolves. */
.result-card.is-loading {
  min-height: 148px;
}

.result-skeleton {
  height: 96px;
  border-radius: var(--radius);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 37%,
    rgba(255, 255, 255, 0.04) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

@media (max-width: 480px) {
  .result-ball {
    width: 38px;
    height: 38px;
    font-size: 0.92rem;
  }
}

/* ---------- Number generator ---------- */

.gen-note {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 26px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.gen-note strong { color: var(--blue-light); }

.gen-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 26px;
  align-items: start;
}

.gen-controls,
.gen-output-wrap {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.gen-field {
  display: block;
  margin-bottom: 20px;
}

.gen-field span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.gen-field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
}

.gen-opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
}

.gen-opt input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.gen-opt input:disabled { cursor: not-allowed; }
.gen-opt:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }

.gen-opt strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.gen-opt em {
  display: block;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 2px;
}

.gen-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.gen-buttons .btn {
  flex: 1;
  min-width: 104px;
  padding: 12px 16px;
  font-size: 0.92rem;
}

.gen-status {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.gen-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.gen-ball {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #111827;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: inset 0 -4px 9px rgba(0, 0, 0, 0.18);
}

.gen-ball.is-special {
  background: linear-gradient(150deg, var(--yellow), #f59e0b);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2),
    inset 0 -4px 9px rgba(0, 0, 0, 0.16);
}

/* Risk bands share one colour language with the app. */
.gen-risk {
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid;
}

.gen-risk.risk-low {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}
.gen-risk.risk-low strong { color: var(--green); }

.gen-risk.risk-moderate {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}
.gen-risk.risk-moderate strong { color: var(--orange); }

.gen-risk.risk-high {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}
.gen-risk.risk-high strong { color: var(--red); }

.gen-risk-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.gen-risk-head span { color: var(--text-muted); font-size: 0.82rem; }

.gen-risk-text {
  color: var(--text-secondary);
  font-size: 0.87rem;
  line-height: 1.5;
}

.gen-risk-reasons {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.gen-batch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.gen-batch-row:last-child { border-bottom: none; }

.gen-batch-nums {
  flex: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.95rem;
}

.gen-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.gen-dot.risk-low { background: var(--green); }
.gen-dot.risk-moderate { background: var(--orange); }
.gen-dot.risk-high { background: var(--red); }

.gen-copy { margin-top: 16px; width: 100%; }

@media (max-width: 880px) {
  .gen-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .gen-ball { width: 42px; height: 42px; font-size: 0.95rem; }
  .gen-batch-nums { font-size: 0.85rem; }
}

/* ---------- Device frame (hero) ---------- */

/* Holds a real screenshot of the app rather than a mockup. The screen element
   crops the simulator's status bar via a negative offset — percentage margins
   resolve against width, and the bar is 14.1% of the image width — then draws a
   clean status bar over the top. */
.device {
  justify-self: center;
  width: 100%;
  max-width: 300px;
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(160deg, #3a4353, #1a1f2b 40%, #2b3240);
  box-shadow:
    0 38px 80px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.device-screen {
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  background: #111827;
  aspect-ratio: 1206 / 2622;
}

.device-screen img {
  display: block;
  width: 100%;
  height: auto;
}

/* Sits exactly over the simulator's own status bar (the top 170px of a 2622px
   capture = 6.5% of screen height) rather than cropping it. Cropping pushed the
   app's title row up underneath this bar; overlaying leaves the app's layout
   untouched and still hides the capture artefacts. */
.device-statusbar {
  position: absolute;
  inset: 0 0 auto 0;
  height: 6.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
  color: #fff;
  background: #111827;
  pointer-events: none;
}

.device-time {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.device-island {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 27%;
  aspect-ratio: 3.2;
  border-radius: 999px;
  background: #000;
}

.device-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: 0.95;
}

@media (max-width: 880px) {
  .device {
    max-width: 268px;
  }
}

/* ---------- Device showcase (rotating screenshots) ---------- */

.device-showcase {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* Slides stack; only the active one is visible. The screen keeps the
   screenshot's aspect ratio so the frame never changes size between slides. */
.device-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.device-slide.is-active {
  opacity: 1;
  position: relative;
}

.device-caption {
  color: var(--text-secondary);
  font-size: 0.88rem;
  text-align: center;
  min-height: 2.4em;
  max-width: 19rem;
  line-height: 1.4;
}

.device-dots {
  display: flex;
  gap: 8px;
}

.device-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border-light);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.device-dot:hover { background: var(--text-secondary); }

.device-dot.is-active {
  background: var(--blue-light);
  transform: scale(1.35);
}

@media (prefers-reduced-motion: reduce) {
  .device-slide { transition: none; }
}

/* Explains what the 0–100 score means. Without it the number reads as a grade
   where zero looks like failure, when zero is the best possible result. */
.gen-risk-scale {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* ---------- Coverage ---------- */

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.coverage-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

/* National games apply to every visitor, so they lead. */
.coverage-card.is-national {
  grid-column: 1 / -1;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(96, 165, 250, 0.28);
}

.coverage-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.coverage-card.is-national h3 { color: var(--blue-light); }

.coverage-card ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.coverage-card li {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.coverage-card li::before {
  content: "•";
  color: var(--text-muted);
  margin-right: 6px;
}

.coverage-note {
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 42rem;
}

/* ---------- Latest results: state picker ---------- */

.results-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: -22px 0 28px;
}

.results-state-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

#results-state {
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-family: inherit;
  min-width: 200px;
}

/* State games repeat names across states, so the card title carries the code
   and needs room to breathe. */
.result-meta { min-width: 0; }
.result-meta h3 { overflow-wrap: anywhere; }

/* ---------- Results: national pair, then state games ---------- */

/* Both grids share a two-column track so state games line up directly beneath
   the national pair rather than reflowing to a different rhythm. */
.results-national,
.results-local {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 760px;
  margin: 0 auto;
}

.results-controls {
  margin: 28px auto 22px;
  max-width: 760px;
  justify-content: center;
}

.results-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.results-local:empty {
  display: none;
}
