:root {
  --bg: #C8102E;
  --fg: #ffffff;
  --accent: #FFD100;
  --btn-bg: #ffffff;
  --btn-fg: #C8102E;
  --rule: rgba(255, 255, 255, 0.4);
}

/* YES state: the whole page flips to yellow with black type. */
html.is-yes {
  --bg: #FFD100;
  --fg: #111111;
  --accent: #C8102E;
  --btn-bg: #111111;
  --btn-fg: #FFD100;
  --rule: rgba(17, 17, 17, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body {
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--fg); }
a:hover { color: var(--accent); }
.accent { color: var(--accent); }

.page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

/* Header */
.header {
  padding-top: 24px; padding-bottom: 24px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
}
.wordmark { font-family: 'Anton', sans-serif; font-size: 22px; letter-spacing: 1px; line-height: 1.2; }
.header-right { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.live { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.presented { display: flex; align-items: center; gap: 10px; }
.presented-label { font-size: 12px; font-weight: 600; letter-spacing: 1px; }

.logo {
  display: flex; align-items: center; text-decoration: none;
  background: #ffffff; border-radius: 10px; padding: 4px 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease;
}
.logo:hover { transform: rotate(-3deg) scale(1.05); }
.logo:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.logo img { height: 80px; width: auto; display: block; }
.logo-text { display: none; }
/* Fallback while the real logo file is missing */
.logo--text { background: none; box-shadow: none; padding: 0; }
.logo--text img { display: none; }
.logo--text .logo-text {
  display: block; font-family: 'Anton', sans-serif; font-size: 17px; line-height: 1; letter-spacing: 1px;
  border: 2px solid currentColor; border-radius: 6px; padding: 5px 10px;
}

/* Hero */
.hero {
  flex-grow: 1; padding-top: 24px; padding-bottom: 48px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 20px;
}
h1 { margin: 0; font-size: 24px; font-weight: 600; }
.answer {
  font-family: 'Anton', sans-serif; font-size: clamp(150px, 24vw, 320px);
  line-height: 0.85; letter-spacing: -2px;
}
html.is-yes .answer { font-size: clamp(120px, 20vw, 280px); }
.quip { margin: 0; font-size: 28px; font-weight: 800; max-width: 760px; min-height: 1.3em; }
.check {
  margin-top: 8px; min-height: 56px; padding: 0 32px; border: none; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: inherit; font-size: 18px; font-weight: 800;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  transition: transform 0.12s ease;
}
.check:hover { transform: scale(1.04); }
.check:active { transform: scale(0.97); }
.check:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.check.spin svg { animation: spin 0.5s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
.checks { font-size: 15px; font-weight: 600; }

/* Hold the answer back for a moment until status.json has been read,
   so a YES day never flashes a NO first. */
html.is-loading .answer,
html.is-loading .quip,
html.is-loading h1 { visibility: hidden; }

/* Stats */
.stats { padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 24px; }
.stat { flex: 1 1 240px; border-top: 3px solid var(--fg); padding-top: 16px; text-align: left; }
.stat-num { font-family: 'Anton', sans-serif; font-size: 56px; line-height: 1; }
.stat-label { font-size: 16px; font-weight: 600; margin-top: 6px; }
.short, .m-only { display: none; }

/* Footer */
.footer {
  padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 14px;
}

/* Phone layout (matches mockups/Mobile) */
@media (max-width: 640px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .header { padding-top: 24px; padding-bottom: 8px; flex-wrap: nowrap; }
  .wordmark { font-size: 15px; }
  .m-only { display: inline; }
  .live, .presented-label { display: none; }
  .logo { padding: 3px 6px; border-radius: 8px; }
  .logo img { height: 60px; }
  .logo--text .logo-text { font-size: 15px; }

  .hero { gap: 16px; padding-top: 8px; padding-bottom: 24px; }
  h1 { font-size: 18px; }
  .answer { font-size: min(190px, 48vw); letter-spacing: 0; }
  html.is-yes .answer { font-size: min(170px, 42vw); }
  .quip { font-size: 20px; line-height: 1.3; }
  .check { min-height: 52px; padding: 0 28px; font-size: 17px; margin-top: 0; }
  .checks { font-size: 14px; }

  .stats { gap: 12px; flex-wrap: nowrap; padding-bottom: 16px; }
  .stat { flex: 1 1 0; padding-top: 10px; min-width: 0; }
  .stat-num { font-size: 32px; }
  .stat-label { font-size: 13px; margin-top: 4px; }
  .long { display: none; }
  .short { display: inline; }

  .footer { border-top: none; padding-top: 0; padding-bottom: 20px; font-size: 12px; line-height: 1.4; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .dot, .check.spin svg { animation: none; }
  .check { transition: none; }
}
