:root {
  --paper: #fafaf6;
  --paper-raised: #ffffff;
  --ink: #16141a;
  --ink-soft: rgba(22, 20, 26, 0.6);
  --hairline: rgba(22, 20, 26, 0.12);
  --tape-amber: #ffb800;
  --siren-red: #e02419;
  --hazard-tint: rgba(255, 184, 0, 0.1);
  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-body: "Inter", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "Menlo", monospace;
}

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

html,
body {
  height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

a {
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--tape-amber);
  outline-offset: 2px;
}

/* ---------- topbar ---------- */

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px clamp(16px, 4vw, 28px) 0;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.01em;
}

.wordmark-scam {
  color: var(--siren-red);
}

.topbar-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: right;
}

/* ---------- stage ---------- */

.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vh, 38px);
  text-align: center;
  padding-inline: clamp(16px, 4vw, 28px);
}

.scam-button {
  font-family: var(--font-display);
  background: var(--siren-red);
  color: #ffffff;
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  padding: clamp(20px, 4.5vh, 38px) clamp(32px, 8vw, 72px);
  transform: rotate(-1.5deg);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.scam-button:hover {
  transform: rotate(-1.5deg) translate(-3px, -3px);
  box-shadow: 14px 14px 0 var(--ink);
}

.scam-button:active {
  transform: rotate(-1.5deg) translate(7px, 7px);
  box-shadow: 2px 2px 0 var(--ink);
}

.scam-button:disabled {
  opacity: 0.75;
  cursor: wait;
}

.scam-button-label {
  display: block;
  font-size: clamp(44px, 10vw, 96px);
  line-height: 1;
  letter-spacing: 0.01em;
}

.scam-button-sub {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.6vw, 14px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.scam-error {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--siren-red);
}

.record-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.record-value {
  font-family: var(--font-display);
  font-size: clamp(38px, 8vh, 72px);
  line-height: 1.05;
}

.record-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.ticker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--hazard-tint);
  border: 1px solid var(--tape-amber);
  padding: 8px 14px;
}

.ticker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--siren-red);
  animation: ticker-pulse 1.6s ease-in-out infinite;
}

.ticker.is-fresh {
  animation: ticker-flash 0.8s ease;
}

@keyframes ticker-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

@keyframes ticker-flash {
  0% {
    background: var(--tape-amber);
    transform: scale(1.05);
  }
  100% {
    background: var(--hazard-tint);
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-dot,
  .ticker.is-fresh {
    animation: none;
  }
  .scam-button,
  .scam-button:hover,
  .scam-button:active {
    transition: none;
  }
}

/* ---------- bottombar ---------- */

.bottombar {
  padding: 10px clamp(16px, 4vw, 28px) 14px;
  text-align: center;
}

.disclaimer {
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 760px;
  margin-inline: auto;
}

/* ---------- success dialog ---------- */

.success-dialog {
  margin: auto;
  border: 4px solid var(--ink);
  box-shadow: 12px 12px 0 var(--ink);
  background: var(--paper-raised);
  padding: clamp(20px, 4vw, 30px);
  width: min(540px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
}

.success-dialog::backdrop {
  background: rgba(22, 20, 26, 0.55);
}

.success-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--siren-red);
}

.success-title {
  font-family: var(--font-display);
  font-size: clamp(23px, 4.5vw, 32px);
  line-height: 1.15;
  margin-top: 8px;
}

.success-copy {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.success-receipt {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 16px;
  border: 2px solid var(--ink);
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.button-primary {
  font-family: var(--font-display);
  font-size: 15px;
  background: var(--siren-red);
  color: #ffffff;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 11px 20px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.button-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.button-primary:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0 var(--ink);
}

.button-ghost {
  font-family: var(--font-mono);
  font-size: 13px;
  background: transparent;
  color: var(--ink);
  border: 3px solid var(--ink);
  padding: 11px 16px;
  text-decoration: none;
  cursor: pointer;
}

.button-ghost:hover {
  background: var(--hazard-tint);
}

/* ---------- short screens ---------- */

@media (max-height: 620px) {
  .stage {
    gap: 14px;
  }
  .scam-button-label {
    font-size: clamp(36px, 7vh, 64px);
  }
  .record-value {
    font-size: clamp(30px, 6vh, 48px);
  }
}
