/* ============================================================================
   VERIFICATION AHHHH BOT 💀  — maximum chaos edition
   comic sans. thick wonky borders. hard offset shadows. rainbow everything.
   tilted. wiggling. loud. still works though (chaos != broken).
   no external fonts/images/anything (CSP: 'self' only).
   ============================================================================ */

:root {
  /* the loud crayon box */
  --hotpink: #ff2d95;
  --lime:    #9bff28;
  --cyan:    #12dcff;
  --yellow:  #ffe11a;
  --grape:   #9b4cff;
  --orange:  #ff7a00;

  --ink: #14110d;            /* thick comic outline / text */
  --paper: #fffdf3;          /* the card, slightly off so it feels drawn */
  --paper-2: #fff7df;        /* recessed panels */
  --paper-3: #ffeffb;        /* hover raise (pink tint) */

  --bg-0: #ffd93d;           /* base behind the rainbow soup */

  --text: #14110d;
  --text-2: #2a251d;         /* body, still nearly-black so comic sans reads */
  --muted: #5a5142;
  --faint: #6d6353;

  --accent: var(--hotpink);
  --accent-ink: #d40f6e;     /* pink as text, still AA-ish on white */
  --accent-tint: #ffe3f1;
  --accent-tint-2: #ffb3d8;
  --on-accent: #fff;
  --grad: linear-gradient(135deg, var(--hotpink) 0%, var(--grape) 45%, var(--cyan) 100%);
  --grad-soft: linear-gradient(100deg, var(--hotpink), var(--orange) 55%, var(--yellow));

  --ok: #0b8f2f;
  --ok-ink: #076b22;
  --ok-tint: #ccffd6;
  --ok-line: var(--ink);

  --warn: #b83200;
  --warn-tint: #ffe08a;
  --warn-line: var(--ink);

  --focus: var(--cyan);

  --radius-card: 22px;
  --radius: 15px;
  --radius-sm: 11px;

  /* hard offset comic shadows (no blur = sticker energy) */
  --shadow-card: 10px 10px 0 var(--ink), 20px 20px 0 rgba(155, 76, 255, 0.35);
  --shadow-btn: 5px 5px 0 var(--ink);
  --border: 3px solid var(--ink);

  --font: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue",
    "Segoe Print", "Bradley Hand", "Apple Color Emoji", "Segoe UI Emoji", cursive, sans-serif;

  --dur-fast: 0.09s;
  --dur: 0.16s;
  --dur-slow: 0.5s;
  --ease-out: cubic-bezier(0.22, 0.61, 0.20, 1);
  --ease-pop: cubic-bezier(0.18, 1.4, 0.4, 1);
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--lime); color: var(--ink); }

html { -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: clamp(18px, 5vw, 56px);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* RAINBOW SOUP. loud blobs on a yellow base, slowly drifting hue. */
  background:
    radial-gradient(900px 620px at 12% -8%, rgba(255, 45, 149, 0.55) 0%, transparent 55%),
    radial-gradient(820px 620px at 108% 8%, rgba(18, 220, 255, 0.55) 0%, transparent 55%),
    radial-gradient(760px 700px at 88% 112%, rgba(155, 76, 255, 0.5) 0%, transparent 55%),
    radial-gradient(700px 680px at -8% 108%, rgba(155, 255, 40, 0.5) 0%, transparent 55%),
    var(--bg-0);
  background-attachment: fixed;
  animation: partyHue 18s linear infinite;
}
@keyframes partyHue { to { filter: hue-rotate(360deg); } }

@media (max-height: 640px) { body { align-items: start; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── The card (a sticker slapped on crooked) ───────────────────────────── */
.card {
  position: relative;
  width: 100%;
  max-width: 494px;
  border-radius: var(--radius-card);
  padding: clamp(22px, 5vw, 34px);
  overflow-wrap: anywhere;
  background: var(--paper);
  border: var(--border);
  box-shadow: var(--shadow-card);
  transform: rotate(-1.4deg);
  animation: slapIn 0.5s var(--ease-pop) both, cardWobble 7s ease-in-out 0.6s infinite;
}
@keyframes slapIn {
  0%   { opacity: 0; transform: rotate(9deg) scale(0.7); }
  70%  { opacity: 1; transform: rotate(-3deg) scale(1.03); }
  100% { transform: rotate(-1.4deg) scale(1); }
}
@keyframes cardWobble {
  0%, 100% { transform: rotate(-1.4deg); }
  50%      { transform: rotate(0.9deg); }
}
.card--wide { max-width: 700px; }

/* State machine: `hidden` (toggled by app.js) always wins. */
[hidden] { display: none !important; }
[data-state] { animation: rise var(--dur-slow) var(--ease-pop) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px) rotate(-1deg); }
  to   { opacity: 1; transform: none; }
}

[data-state="working"],
[data-state="done"],
[data-state="pending"],
[data-state="declined"],
[data-state="vpn-blocked"],
[data-state="need-location"],
[data-state="invalid"],
[data-state="error"] { text-align: center; padding: 8px 0 4px; }

/* ── Brand header ──────────────────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 22px;
  padding-bottom: 20px;
  border-bottom: 3px dashed var(--ink);
}
.brand__mark {
  flex: none;
  display: inline-flex;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  align-items: center;
  justify-content: center;
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-6deg);
  animation: markJiggle 2.4s ease-in-out infinite;
}
@keyframes markJiggle {
  0%, 100% { transform: rotate(-6deg); }
  25%      { transform: rotate(6deg) scale(1.06); }
  50%      { transform: rotate(-8deg); }
  75%      { transform: rotate(4deg); }
}
.brand__mark svg { display: block; width: 24px; height: 24px; }
.brand__lockup { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__name {
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.2px;
  text-shadow: 2px 2px 0 var(--yellow);
}
.brand__sub { color: var(--accent-ink); font-weight: 700; font-size: 12px; letter-spacing: 0.2px; }

/* ── Typography ────────────────────────────────────────────────────────── */
h1 {
  font-size: clamp(24px, 6vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.3px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--text);
  text-wrap: balance;
  text-shadow: 2.5px 2.5px 0 var(--cyan);
}
h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 800;
  color: var(--accent-ink);
  margin: 22px 0 12px;
}
p { margin: 0 0 14px; color: var(--text-2); }
p:last-child { margin-bottom: 0; }
.lead { color: var(--text-2); font-size: 16.5px; font-weight: 600; }
.muted { color: var(--muted); }
.fine { font-size: 13px; line-height: 1.5; color: var(--faint); margin: 16px 0 0; }
strong { color: var(--text); font-weight: 800; background: linear-gradient(transparent 62%, var(--yellow) 62%); padding: 0 1px; }

a {
  color: var(--accent-ink);
  text-decoration: underline wavy var(--grape);
  text-underline-offset: 3px;
  border-radius: 3px;
  font-weight: 800;
  transition: color var(--dur) ease, background var(--dur) ease;
}
a:hover { color: #fff; background: var(--grape); }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ── pills ─────────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: 999px;
  padding: 5px 12px;
  line-height: 1;
  border: 2.5px solid var(--ink);
}
.pill--trust {
  color: var(--ink);
  background: var(--lime);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-2deg);
  margin: 0 0 16px;
}
.pill--trust svg { width: 14px; height: 14px; }
.pill--soft {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--cyan);
  padding: 2px 8px;
  vertical-align: 1px;
  margin-right: 4px;
}

/* ── Disclosure ────────────────────────────────────────────────────────── */
.disclosure {
  background: var(--paper-2);
  border: 3px dashed var(--ink);
  border-radius: var(--radius);
  padding: 4px 18px 18px;
  margin: 20px 0 4px;
}
.disclosure h2:first-child { margin-top: 16px; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.check-list li {
  position: relative;
  margin: 0;
  padding: 10px 2px 10px 32px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.45;
  border-top: 2px dotted var(--ink);
  overflow-wrap: anywhere;
  animation: rowIn 0.42s var(--ease-pop) both;
}
.check-list li:first-child { border-top: 0; }
.check-list li:nth-child(1) { animation-delay: 0.05s; }
.check-list li:nth-child(2) { animation-delay: 0.10s; }
.check-list li:nth-child(3) { animation-delay: 0.15s; }
.check-list li:nth-child(4) { animation-delay: 0.20s; }
.check-list li:nth-child(5) { animation-delay: 0.25s; }
.check-list li:nth-child(6) { animation-delay: 0.30s; }
.check-list li:nth-child(7) { animation-delay: 0.35s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px) rotate(-1deg); } to { opacity: 1; transform: none; } }

/* chunky emoji-ish bullet (drawn in CSS, no image request) */
.check-list li::before {
  content: "★";
  position: absolute;
  left: 2px; top: 8px;
  font-size: 17px;
  line-height: 1;
  color: var(--hotpink);
  -webkit-text-stroke: 0.6px var(--ink);
}
.check-list--ok li::before { content: "✔"; color: var(--ok); }

/* ── Callout: REQUIRED location ────────────────────────────────────────── */
.callout {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin: 18px 0 2px;
  padding: 15px 16px;
  border-radius: var(--radius);
  background: var(--cyan);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  transform: rotate(0.6deg);
}
.callout__icon {
  flex: none;
  display: inline-flex;
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--hotpink);
  color: #fff;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--ink);
}
.callout__icon svg { width: 19px; height: 19px; }
.callout__body { font-size: 14px; line-height: 1.45; font-weight: 600; }
.callout__body strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; background: none; }

/* ── Geo opt-in (optional) ─────────────────────────────────────────────── */
.geo-opt {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  margin: 18px 0 2px;
  padding: 14px 16px;
  background: var(--paper-2);
  border: 3px dashed var(--ink);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur) ease, transform var(--dur-fast) ease;
}
.geo-opt:hover { background: var(--paper-3); transform: rotate(-0.8deg); }
.geo-opt:active { transform: translateY(1px); }
#geo-check {
  flex: none;
  appearance: none;
  -webkit-appearance: none;
  width: 24px; height: 24px;
  margin: 0;
  border: 3px solid var(--ink);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background var(--dur) ease;
}
#geo-check::before {
  content: "✔";
  font-size: 15px;
  color: var(--ink);
  transform: scale(0) rotate(-20deg);
  transition: transform 0.14s var(--ease-pop);
}
#geo-check:checked { background: var(--lime); }
#geo-check:checked::before { transform: scale(1) rotate(0deg); }
#geo-check:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--focus); }

/* ── Captcha slot ──────────────────────────────────────────────────────── */
#captcha { margin: 18px 0 2px; }
#captcha:not([hidden]) { min-height: 65px; display: flex; justify-content: center; }
#captcha > * { max-width: 100%; }
#captcha iframe { max-width: 100% !important; }
@media (max-width: 340px) {
  #captcha:not([hidden]) { transform: scale(0.92); transform-origin: top center; }
}

/* ── Primary button (BIG CHUNKY CLICKABLE) ─────────────────────────────── */
button.primary, .primary {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 56px;
  margin-top: 20px;
  padding: 15px 18px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--grad-soft);
  color: var(--ink);
  font-family: inherit;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.2px;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast) ease, background var(--dur) ease;
}
button.primary:hover, .primary:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 7px 7px 0 var(--ink); }
button.primary:active, .primary:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
button.primary:focus-visible, .primary:focus-visible { outline: none; box-shadow: var(--shadow-btn), 0 0 0 3px #fff, 0 0 0 6px var(--focus); }
button.primary:disabled, .primary:disabled {
  background: repeating-linear-gradient(45deg, #eee 0 10px, #ddd 10px 20px);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: 3px 3px 0 rgba(20,17,13,0.35);
  transform: none;
}

/* ── Working: spinner ──────────────────────────────────────────────────── */
[data-state="working"] .muted { margin-top: 18px; font-size: 15.5px; color: var(--text-2); font-weight: 700; }
.spinner {
  width: 46px; height: 46px;
  margin: 8px auto 0;
  border-radius: 50%;
  border: 6px dashed var(--hotpink);
  animation: spin 1.4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Done: success ─────────────────────────────────────────────────────── */
.check {
  width: 70px; height: 70px;
  margin: 4px auto 18px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  display: grid;
  place-items: center;
  animation: pop 0.5s var(--ease-pop) both, spinOnce 0.6s var(--ease-out) both;
}
.check svg { display: block; width: 34px; height: 34px; }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes spinOnce { from { rotate: -220deg; } to { rotate: 0deg; } }
[data-state="done"] h1 { margin-top: 0; }

/* ── State icons (warn / location) ─────────────────────────────────────── */
.state-icon {
  display: inline-flex;
  width: 66px; height: 66px;
  margin: 4px auto 16px;
  border-radius: 20px;
  align-items: center;
  justify-content: center;
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-4deg);
}
.state-icon svg { width: 32px; height: 32px; }
.state-icon--warn { background: var(--warn-tint); color: var(--warn); }
.state-icon--location { background: var(--grad); color: #fff; }

.state-hint {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dotted var(--ink);
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
[data-state] .state-hint { text-align: left; }
[data-state="working"] .state-hint, [data-state="done"] .state-hint,
[data-state="pending"] .state-hint, [data-state="declined"] .state-hint,
[data-state="vpn-blocked"] .state-hint,
[data-state="invalid"] .state-hint, [data-state="error"] .state-hint,
[data-state="need-location"] .state-hint { text-align: center; }
#invalid-msg, #error-msg { color: var(--muted); font-weight: 600; }

/* ── Piracy / landing wide page ───────────────────────────────────────── */
.card--wide h1 { margin-bottom: 14px; }
.card--wide h2 {
  font-size: 14px;
  color: var(--accent-ink);
  border-bottom: 3px dotted var(--ink);
  padding-bottom: 8px;
}
.card--wide ul { margin: 0 0 14px; padding-left: 22px; color: var(--text-2); }
.card--wide li { margin: 7px 0; }
.card--wide p { color: var(--text-2); }
.card--wide a { overflow-wrap: anywhere; }
.devnote { font-size: 13px; color: var(--faint); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 380px) {
  body { padding: 12px; }
  .card { border-radius: 18px; padding: 20px 16px; transform: rotate(-1deg); }
  .disclosure { padding: 2px 14px 14px; }
  .check-list li { padding-left: 30px; font-size: 14px; }
  h1 { font-size: 22px; }
}
@media (min-width: 560px) { .card { padding: 36px; } }

/* ── Reduced motion: chaos calms down for the people who need it ────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  body { animation: none !important; }
  .card { animation: none !important; transform: rotate(-1deg); }
  .brand__mark { animation: none !important; }
  [data-state], .check-list li, .check { animation: none !important; }
  .spinner { animation: spin 1.4s linear infinite !important; }
}

/* ── Forced-colors safety ──────────────────────────────────────────────── */
@media (forced-colors: active) {
  .card { border: 3px solid CanvasText; }
  button.primary, .primary { border: 3px solid ButtonText; }
  #geo-check { border: 3px solid CanvasText; }
  .check-list li::before { forced-color-adjust: none; }
}
