:root {
  --bg: #fbf7f0;
  --glow: rgba(255, 90, 54, .10);
  --card: #ffffff;
  --ink: #17151f;
  --muted: #6b6577;
  --line: #ece4d6;
  --accent: #ff5a36;
  --accent-ink: #ffffff;
  --good: #0b8a5f;
  --good-bg: #e2f6ec;
  --good-line: #9fdcbf;
  --out-bg: #f3eee6;
  --panel: #17151f;
  --panel-ink: #fbf7f0;
  --panel-muted: #b6afc0;
  --panel-line: #34303f;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131019;
    --glow: rgba(255, 122, 92, .10);
    --card: #1d1926;
    --ink: #f5f1ea;
    --muted: #a59eb1;
    --line: #2e2939;
    --accent: #ff7a5c;
    --accent-ink: #1a0f0c;
    --good: #4fdca4;
    --good-bg: #10301f;
    --good-line: #1f5c41;
    --out-bg: #262130;
    --panel: #221d2d;
    --panel-ink: #f5f1ea;
    --panel-muted: #aca5b8;
    --panel-line: #3a3447;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(900px 420px at 50% -120px, var(--glow), transparent 70%), var(--bg);
  background-color: var(--bg);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 18px 16px 48px; }
a { color: inherit; }
h1, h2, h3 { font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif; }

/* ---- top bar */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.01em; font-size: 1.08rem; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); position: relative; }
.dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--good); opacity: 0; animation: ping 2.4s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.4); opacity: .7; } 100% { transform: scale(1.4); opacity: 0; } }

/* ---- hero */
.hero { text-align: center; padding: 44px 0 26px; }
.hero h1 { font-size: clamp(1.15rem, 3.6vw, 1.4rem); font-weight: 700; color: var(--muted); margin: 0 0 6px; letter-spacing: -.01em; }
#where { color: var(--ink); }
.answer {
  margin: 0 0 26px;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(2.6rem, 10vw, 4.6rem); line-height: 1.02; font-weight: 800; letter-spacing: -.035em;
}
.answer[data-state="in"] { color: var(--good); }
.answer[data-state="unknown"] { color: var(--muted); }

.countries { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: .92rem; color: var(--ink);
  padding: 8px 14px 8px 10px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line);
  transition: border-color .15s, transform .15s;
}
.chip:hover { border-color: var(--muted); }
.chip:active { transform: scale(.97); }
.chip[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.flag { width: 22px; height: 15px; border-radius: 3px; overflow: hidden; display: inline-flex; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.flag svg { width: 100%; height: 100%; display: block; }

/* ---- product tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 8px 0 22px; }
.tile {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 20px;
  padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 4px;
}
.tile[data-state="in"] { background: var(--good-bg); border-color: var(--good-line); }
.eyebrow { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile h3 { margin: 0; font-size: 1.3rem; letter-spacing: -.02em; }
.tile-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.price { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pill { font-size: .8rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--out-bg); color: var(--muted); white-space: nowrap; }
.tile[data-state="in"] .pill { background: var(--good); color: var(--card); }
.buy {
  margin-top: 12px; text-align: center; text-decoration: none; font-weight: 800;
  padding: 11px 14px; border-radius: 12px; background: var(--good); color: var(--card);
}
.view { margin-top: 10px; font-size: .85rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; }

/* ---- alerts panel */
.alerts { background: var(--panel); color: var(--panel-ink); border-radius: 24px; padding: 26px 22px 22px; margin-bottom: 26px; }
.alerts h2 { margin: 0 0 6px; font-size: clamp(1.35rem, 4.6vw, 1.7rem); letter-spacing: -.025em; line-height: 1.15; }
.lede { margin: 0 0 18px; color: var(--panel-muted); }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.toggle { position: relative; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.toggle span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: .92rem;
  border: 1.5px solid var(--panel-line); color: var(--panel-muted);
}
.toggle span::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; }
.toggle input:checked + span { border-color: var(--accent); color: var(--panel-ink); }
.toggle input:checked + span::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--panel); }
.toggle input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

button { font: inherit; cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
.cta {
  width: 100%; border: 0; border-radius: 14px; padding: 15px 18px;
  font-weight: 800; font-size: 1.05rem; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 24px -10px var(--accent); transition: transform .15s, filter .15s;
}
.cta:hover { filter: brightness(1.05); }
.cta:active { transform: translateY(1px); }
.ghost { border: 1.5px solid var(--panel-line); background: transparent; color: var(--panel-ink); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.ghost:hover { border-color: var(--panel-muted); }
.text { border: 0; background: none; color: var(--panel-muted); text-decoration: underline; text-underline-offset: 3px; padding: 10px 6px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.on { margin: 0 0 12px; font-weight: 800; }
.on span:first-child { color: var(--good); }
.hint { margin: -4px 0 12px; color: var(--panel-muted); font-size: .92rem; }
.note { background: rgba(255,255,255,.06); border: 1px solid var(--panel-line); border-radius: 12px; padding: 10px 12px; font-size: .92rem; margin: 14px 0 0; }
.msg { margin: 12px 0 0; font-size: .92rem; color: var(--panel-muted); }
.msg:empty { display: none; }
.msg.error { color: #ff9b85; }
.elsewhere { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--panel-line); color: var(--panel-muted); font-size: .92rem; }
.elsewhere a { color: var(--panel-ink); font-weight: 700; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, .chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- how it works */
.how h2 { font-size: 1.05rem; margin: 0 0 12px; }
.how ol { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.how li { counter-increment: step; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.how li::before {
  content: counter(step); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .85rem; margin-bottom: 4px;
}
.how li span { color: var(--muted); font-size: .9rem; }
@media (max-width: 600px) {
  .how ol { grid-template-columns: 1fr; }
}

footer { margin-top: 28px; color: var(--muted); font-size: .8rem; text-align: center; }
footer p { margin: 0 0 6px; }

@media (prefers-reduced-motion: reduce) {
  .dot::after { animation: none; }
  .chip, .cta { transition: none; }
}
