:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #16182b;
  --muted: #62667d;
  --line: #e4e6f0;
  --brand: #ff9900;        /* logo orange: fills (buttons, chips) */
  --brand-ink: #16182b;    /* text on top of the orange */
  --brand-text: #a85400;   /* orange used as text on the page background */
  --brand-soft: #fff1dc;
  --deal: #e5343d;
  --good: #12805c;
  --good-soft: #dff5ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 24, 43, .06), 0 6px 18px rgba(22, 24, 43, .06);
}

/* Theme: follows the visitor's system setting unless they pick one with the toggle (which sets data-theme on <html>).
   The dark palette appears twice because a media query and an attribute selector can't share one rule. */
:root { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1020;
  --surface: #181a30;
  --ink: #eef0ff;
  --muted: #a0a4c2;
  --line: #2a2d4a;
  --brand: #ff9900;
  --brand-ink: #16182b;
  --brand-text: #ffb340;
  --brand-soft: #3a2a10;
  --deal: #ff6b73;
  --good: #4fd6a3;
  --good-soft: #143a2e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1020;
    --surface: #181a30;
    --ink: #eef0ff;
    --muted: #a0a4c2;
    --line: #2a2d4a;
    --brand: #ff9900;
    --brand-ink: #16182b;
    --brand-text: #ffb340;
    --brand-soft: #3a2a10;
    --deal: #ff6b73;
    --good: #4fd6a3;
    --good-soft: #143a2e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* Prototype banner */
.proto-bar {
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  text-align: center;
  padding: 6px 12px;
}

/* Header */
header.site {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.head-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.section-nav { display: flex; gap: 22px; border-top: 1px solid var(--line); }
.section-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 10px 0; border-bottom: 2px solid transparent; }
.section-nav a:hover { color: var(--ink); }
.section-nav a.active { color: var(--brand-text); border-bottom-color: var(--brand); }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -.02em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.logo span { color: var(--brand-text); }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo .name { font-weight: inherit; }
.logo .mark { width: 38px; height: 38px; padding: 3px; background: #fff; border-radius: 9px; }
.search { flex: 1; max-width: 520px; margin-left: auto; }
.search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
}
.search input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Hero */
.hero { padding: 40px 0 24px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; margin: 0 0 10px; letter-spacing: -.03em; }
.hero p { margin: 0; color: var(--muted); max-width: 620px; font-size: 17px; }
.stats { display: flex; gap: 24px; margin-top: 18px; flex-wrap: wrap; }
.stat b { display: block; font-size: 22px; }
.stat span { color: var(--muted); font-size: 13px; }

/* Controls */
.controls { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 0 16px; }
.cat-select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
}
.cat-select:hover { border-color: var(--brand); }
.sort select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}

/* Grid + cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; padding-bottom: 40px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.thumb { position: relative; height: 150px; display: grid; place-items: center; font-size: 64px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 8px; }
.asof { font-size: 12px; color: var(--muted); margin-top: -4px; }
.badge-off, .badge-hot { z-index: 1; }
.badge-off {
  position: absolute; top: 10px; left: 10px;
  background: var(--deal); color: #fff;
  font-weight: 700; font-size: 13px;
  padding: 3px 9px; border-radius: 999px;
}
.badge-hot {
  position: absolute; top: 10px; right: 10px;
  background: #fff; color: #b3261e;
  font-weight: 700; font-size: 12px;
  padding: 3px 9px; border-radius: 999px;
}
.body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.card h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.note { margin: 0; font-size: 13px; color: var(--muted); }
.prices { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.was { color: var(--muted); text-decoration: line-through; font-size: 14px; }
.code { font: 12px ui-monospace, Consolas, monospace; background: var(--brand-soft); padding: 2px 6px; border-radius: 6px; user-select: all; }

/* Coupon box: deliberately loud. Amazon's own page still shows the regular price until this code is entered at
   checkout, so a visitor who skims past a quiet line of text will think the deal is wrong and leave. */
.coupon { border: 2px dashed var(--brand); background: var(--brand-soft); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.coupon-label { font-size: 12px; font-weight: 700; color: var(--brand-text); }
.coupon-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coupon-code { font: 700 16px ui-monospace, Consolas, monospace; letter-spacing: .04em; user-select: all; color: var(--ink); }
.coupon-copy { border: 1px solid var(--brand); background: var(--surface); color: var(--brand-text); font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.coupon-copy:hover { background: var(--brand); color: var(--brand-ink); }
.coupon-copy.copied { background: var(--good); border-color: var(--good); color: #fff; }
.copied-note { font-size: 12px; color: var(--good); font-weight: 700; max-height: 0; overflow: hidden; opacity: 0; transition: opacity .2s ease; }
.copied-note.show { max-height: 40px; opacity: 1; }

/* "Ring it or miss it": the hard coupon countdown. Deliberately urgent (red, not the coupon's orange) so it reads
   as a countdown, not just more coupon decoration. */
.ring-badge { font-size: 12px; font-weight: 700; color: var(--deal); display: flex; align-items: center; gap: 4px; }

/* Report button: deliberately quiet — it's a safety valve for visitors, not something to compete with the CTA. */
.report-btn { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 2px 0; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: transparent; }
.report-btn:hover { color: var(--deal); text-decoration-color: var(--deal); }
.report-btn:disabled { cursor: default; text-decoration: none; }
.report-thanks { font-size: 12px; color: var(--good); font-weight: 600; }
.verify {
  font-size: 12px; font-weight: 600;
  color: var(--good); background: var(--good-soft);
  border-radius: 8px; padding: 4px 8px; align-self: flex-start;
}
.verify.warn { color: #8a5a00; background: #fff1cf; }
:root[data-theme="dark"] .verify.warn { color: #ffd479; background: #4a3600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .verify.warn { color: #ffd479; background: #4a3600; } }
.cta {
  display: block; text-align: center; text-decoration: none;
  background: var(--brand); color: var(--brand-ink);
  font-weight: 700; padding: 10px; border-radius: 10px;
}
.cta:hover { filter: brightness(1.08); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 48px 0; }

/* Newsletter + footer */
.news { background: var(--brand-soft); border-radius: var(--radius); padding: 28px; margin-bottom: 32px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.news h2 { margin: 0 0 4px; font-size: 20px; }
.news p { margin: 0; color: var(--muted); }
.news form { display: flex; gap: 8px; flex-wrap: wrap; }
.news input { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 220px; background: var(--surface); color: var(--ink); }
.news button { padding: 10px 18px; border: 0; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 700; cursor: pointer; }
.news .thanks { color: var(--good); font-weight: 600; }

footer.site { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0 32px; font-size: 13px; color: var(--muted); }
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
footer.site a { color: var(--ink); }
.disclosure { max-width: 780px; }

@media (max-width: 560px) {
  .head-row { flex-wrap: wrap; }
  /* flex: 1 100% (not just width: 100%) so the search box really wraps onto its own row */
  .search { flex: 1 1 100%; max-width: none; margin-left: 0; order: 3; }
  .logo + .theme-toggle, .head-row .theme-toggle { margin-left: auto; }
}

/* Legal / info pages */
.legal { max-width: 760px; padding-top: 32px; padding-bottom: 40px; }
.legal h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; margin: 0 0 6px; letter-spacing: -.02em; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 22px; }
.legal a { color: var(--brand-text); }
.legal .callout { background: var(--brand-soft); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
footer.site .disclosure a { color: var(--brand-text); }

/* Light/dark toggle button in the header */
.theme-toggle {
  flex: none; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--brand); }
.theme-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.logo + .theme-toggle { margin-left: auto; } /* legal pages have no search box, so push the button right */
