/* ==========================================================================
   GotDealio — design system
   Self-contained, no external fonts/CDNs (works offline once synced).
   ========================================================================== */

:root {
  /* surfaces */
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --surface-3: #e7ebf4;
  --line: #e3e7f0;
  --line-strong: #d4dae6;

  /* ink */
  --ink: #0f1729;
  --ink-2: #2b3447;
  --muted: #626b80;
  --faint: #97a0b4;

  /* brand — emerald */
  --brand: #0a9d6e;
  --brand-ink: #06734f;
  --brand-soft: #e4f6ef;

  /* gold */
  --gold: #d4af37;
  --gold-ink: #8a6a12;
  --gold-soft: #f8efcf;

  /* royal blue */
  --royal: #1f3f99;
  --royal-deep: #142a63;
  --royal-soft: #e7ecfa;
  --indigo: #1f3f99;
  --indigo-soft: #e7ecfa;

  /* semantic */
  --good: #0a9d6e;
  --good-soft: #e4f6ef;
  --wait: #dca10a;
  --wait-soft: #faf0d2;
  --skip: #df574e;
  --skip-soft: #fbe7e5;

  /* grade colors */
  --g-a: #0a9d6e;
  --g-b: #4aa46f;
  --g-c: #d4af37;
  --g-d: #e08a2e;
  --g-f: #df574e;

  /* shape + depth */
  --r-xs: 8px;
  --r-sm: 11px;
  --r: 15px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 41, .06), 0 1px 1px rgba(15, 23, 41, .04);
  --shadow: 0 2px 6px rgba(15, 23, 41, .06), 0 12px 28px -12px rgba(15, 23, 41, .18);
  --shadow-lg: 0 12px 48px -12px rgba(15, 23, 41, .28);

  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.kicker {
  text-transform: uppercase; letter-spacing: .09em; font-size: 12px;
  font-weight: 800; color: var(--gold-ink);
}
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ----- top bar --------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; gap: 18px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: #fff; font-size: 19px; font-weight: 800;
  background: linear-gradient(140deg, #1f3f99 0%, #0a9d6e 100%);
  box-shadow: 0 4px 14px -3px rgba(31, 63, 153, .55), inset 0 0 0 1px rgba(212, 175, 55, .55);
}
.brand .tail { color: var(--brand); }
.beta-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: .09em; color: #10243b;
  background: var(--gold); padding: 2px 6px; border-radius: 5px;
  align-self: flex-start; margin-top: 2px;
}
.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav a {
  padding: 8px 13px; border-radius: var(--r-pill); font-size: 14.5px; font-weight: 600;
  color: var(--ink-2); transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--royal); color: #fff; }
#navToggle { display: none; color: var(--ink); }

.search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: var(--r-pill); padding: 8px 14px; min-width: 230px;
  transition: border-color .15s, background .15s;
}
.search:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search input { border: 0; background: transparent; outline: none; font-size: 16px; width: 100%; color: var(--ink); }
.search .ico { color: var(--faint); }
.search button.ico { border: 0; background: transparent; padding: 0; cursor: pointer; display: inline-flex; align-items: center; transition: color .15s; }
.search button.ico:hover { color: var(--brand); }

.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center;
  font-size: 17px; transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.icon-btn .count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--skip); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: var(--r-pill); display: grid; place-items: center; border: 2px solid var(--bg);
}

/* ----- buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  padding: 11px 18px; border-radius: var(--r-pill); font-weight: 700; font-size: 14.5px;
  transition: transform .08s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), #0a8a50); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -6px rgba(15, 184, 107, .6); }
.btn-primary:hover { box-shadow: 0 10px 22px -6px rgba(15, 184, 107, .7); }
.btn-dark { background: var(--ink); color: #fff; border-color: transparent; }
.btn-amber { background: linear-gradient(135deg, var(--wait), #e08800); border-color: transparent; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn-outline { background: transparent; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }

/* ----- hero ------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1100px 520px at 12% -15%, #0c7d57 0%, transparent 55%),
              radial-gradient(1000px 520px at 100% 0%, #294fb0 0%, transparent 52%),
              radial-gradient(720px 460px at 80% 125%, rgba(212, 175, 55, .22) 0%, transparent 60%),
              linear-gradient(160deg, #0a1c40 0%, #102a55 55%, #0a1733 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .07) 1px, transparent 0);
  background-size: 22px 22px; pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; top: 0; left: 0; width: 60%; height: 100%; z-index: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .06) 45%, rgba(212, 175, 55, .12) 55%, transparent 100%);
  transform: translateX(-130%) skewX(-14deg); animation: gd-sheen 8s ease-in-out 1.5s infinite; pointer-events: none;
}
.hero-inner { position: relative; padding: 64px 0 76px; text-align: center; }
.hero .badge-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  padding: 6px 13px; border-radius: var(--r-pill); backdrop-filter: blur(4px);
}
.hero h1 { font-size: clamp(32px, 5.4vw, 56px); line-height: 1.05; letter-spacing: -.03em; margin: 0 auto 16px; max-width: 14ch; font-weight: 850; }
.hero h1 .hl { background: linear-gradient(110deg, #f6e3a3, #d4af37 58%, #c79a2b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { font-size: clamp(16px, 2vw, 20px); color: rgba(255, 255, 255, .82); max-width: 56ch; margin: 0 auto 30px; }

.hero-search {
  display: flex; align-items: center; gap: 8px; background: #fff; border-radius: var(--r-pill);
  padding: 8px 8px 8px 20px; max-width: 620px; margin: 0 auto; box-shadow: var(--shadow-lg);
}
.hero-search input { flex: 1; border: 0; outline: none; font-size: 16px; color: var(--ink); background: transparent; }
.hero-search .ico { color: var(--faint); font-size: 18px; }

.hero-stats { display: flex; justify-content: center; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.hero-stats .stat span { font-size: 13px; color: rgba(255, 255, 255, .7); }

/* ----- sections -------------------------------------------------------- */
.section { padding: 44px 0; }
.section.tight { padding: 30px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; margin: 0 0 4px; font-weight: 800; }
.section-head p { margin: 0; color: var(--muted); font-size: 15px; }
.section-head .link { color: var(--brand-ink); font-weight: 700; font-size: 14.5px; white-space: nowrap; }

/* value props */
.valueprops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -42px; position: relative; z-index: 3; }
.vp {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px;
  box-shadow: var(--shadow); }
.vp .ico { font-size: 26px; margin-bottom: 10px; display: block; }
.vp h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.01em; }
.vp p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* chips / filters */
.chips { display: flex; gap: 9px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
  padding: 8px 15px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600;
  transition: background .15s, color .15s, border-color .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .spacer { flex: 1; }
.select {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-pill);
  padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); outline: none;
}

/* ----- deal grid + cards ---------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.deal-card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .12s, box-shadow .15s, border-color .15s; cursor: pointer;
}
.deal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.dc-media {
  position: relative; height: 152px; display: grid; place-items: center; font-size: 56px; padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
  border-bottom: 1px solid var(--line);
}
.dc-media img { transition: transform .25s ease; }
.deal-card:hover .dc-media img { transform: scale(1.05); }
.dc-media .flags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.dc-score { position: absolute; top: 10px; right: 10px; }
.dc-watch {
  position: absolute; bottom: 10px; right: 10px; width: 34px; height: 34px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .9); border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 16px; backdrop-filter: blur(4px); transition: transform .1s; }
.dc-watch:hover { transform: scale(1.08); }
.dc-watch.on { background: var(--skip-soft); border-color: var(--skip); }

.dc-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.dc-brand { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; }
.dc-title { font-size: 14.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.dc-spark { margin: 8px 0 6px; }
.dc-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price-now { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.price-was { font-size: 13px; color: var(--faint); text-decoration: line-through; }
.dc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.save-pill { font-size: 12px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); padding: 4px 9px; border-radius: var(--r-pill); }
.save-pill.none { color: var(--muted); background: var(--surface-2); }
.retailer-count { font-size: 12px; color: var(--muted); }

/* ----- score badge ----------------------------------------------------- */
.score {
  --p: 0; --gc: var(--g-c);
  width: 52px; height: 52px; border-radius: var(--r-pill); display: grid; place-items: center;
  background: conic-gradient(var(--gc) calc(var(--p) * 1%), var(--surface-3) 0);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 41, .25);
}
.score .inner {
  width: 42px; height: 42px; border-radius: var(--r-pill); background: var(--surface);
  display: grid; place-items: center; line-height: 1;
}
.score .num { font-size: 16px; font-weight: 800; color: var(--ink); }
.score.lg { width: 86px; height: 86px; }
.score.lg .inner { width: 70px; height: 70px; }
.score.lg .num { font-size: 27px; }
.score.lg .num small { font-size: 12px; font-weight: 700; color: var(--muted); display: block; }

.score-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800;
  padding: 4px 10px 4px 6px; border-radius: var(--r-pill); color: #fff;
}
.score-chip .dot { width: 18px; height: 18px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 11px; }
.g-a .num, .grade-a { color: var(--g-a) !important; }
.bg-a { background: var(--g-a); } .bg-b { background: var(--g-b); } .bg-c { background: var(--g-c); }
.bg-d { background: var(--g-d); } .bg-f { background: var(--g-f); }

/* ----- tags / flags ---------------------------------------------------- */
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: .03em;
}
.flag {
  font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: var(--r-pill); color: #fff;
  text-transform: uppercase; letter-spacing: .03em; box-shadow: var(--shadow-sm);
}
.flag.clearance { background: var(--indigo); }
.flag.penny { background: #8b5cf6; }
.flag.fake { background: var(--skip); }
.flag.low { background: var(--brand); }
.flag.lightning { background: var(--wait); }

/* ----- verdict --------------------------------------------------------- */
.verdict {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r);
  border: 1px solid; font-weight: 600;
}
.verdict .v-ico { font-size: 24px; }
.verdict .v-body b { display: block; font-size: 15px; font-weight: 800; }
.verdict .v-body span { font-size: 13.5px; }
.verdict.buy { background: var(--good-soft); border-color: #b8e8cf; color: var(--brand-ink); }
.verdict.wait { background: var(--wait-soft); border-color: #f3dca6; color: #9a6700; }
.verdict.neutral { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink-2); }

/* ----- generic cards / detail ----------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow-sm); }
.grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; }

.crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin: 22px 0 18px; }
.crumb a:hover { color: var(--brand-ink); }

.detail-media {
  height: 320px; border-radius: var(--r); display: grid; place-items: center; font-size: 120px; padding: 26px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%); border: 1px solid var(--line); position: relative;
}
.detail-media .flags { position: absolute; top: 14px; left: 14px; display: flex; gap: 7px; }
.detail h1 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; margin: 6px 0 6px; }
.detail .brand-line { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; }
.detail .blurb { color: var(--muted); font-size: 15px; margin: 8px 0 18px; }

.pricebox { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.pricebox .now { font-size: 34px; font-weight: 850; letter-spacing: -.02em; }
.pricebox .was { font-size: 16px; color: var(--faint); text-decoration: line-through; }
.pricebox .off { font-size: 13px; font-weight: 800; color: var(--brand-ink); background: var(--brand-soft); padding: 4px 10px; border-radius: var(--r-pill); }

/* score breakdown */
.breakdown { display: flex; flex-direction: column; gap: 13px; }
.bd-row .bd-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.bd-row .bd-top b { font-weight: 700; }
.bd-row .bd-top .pts { color: var(--muted); font-weight: 600; }
.bd-bar { height: 8px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.bd-fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--brand), #34e89e); transition: width .5s ease; }
.bd-desc { font-size: 12px; color: var(--faint); margin-top: 4px; }

/* compare table */
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 700; padding: 0 12px 10px; }
.compare td { padding: 13px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.compare tr.best td { background: var(--brand-soft); }
.compare tr.best td:first-child { border-top-left-radius: var(--r-sm); border-bottom-left-radius: var(--r-sm); }
.compare tr.best td:last-child { border-top-right-radius: var(--r-sm); border-bottom-right-radius: var(--r-sm); }
.compare .r-name { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.compare .r-total { font-weight: 800; font-size: 16px; }
.compare .best-tag { font-size: 10.5px; font-weight: 800; color: #3f3007; background: linear-gradient(100deg, #f3d98a, #d4af37); padding: 2px 8px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .03em; box-shadow: 0 2px 8px -3px rgba(212, 175, 55, .7); }
.compare .oos { color: var(--faint); }
.compare tbody td { transition: background .15s; }
.compare tbody tr:not(.best):hover td { background: var(--surface-2); }

/* tabular numerals keep prices column-aligned */
.price-now, .price-was, .pricebox .now, .pricebox .was, .compare td, .wr-price, .hero-stats .stat b {
  font-variant-numeric: tabular-nums;
}

/* sparkline / history */
.spark { display: block; width: 100%; }
.history-card .legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.history-card .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ----- watchlist ------------------------------------------------------- */
.watch-row { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.watch-row .wr-emoji { width: 56px; height: 56px; border-radius: var(--r-sm); display: grid; place-items: center; font-size: 30px; background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); flex: none; }
.watch-row .wr-main { flex: 1; min-width: 0; }
.watch-row .wr-title { font-weight: 700; font-size: 15px; }
.watch-row .wr-sub { font-size: 13px; color: var(--muted); }
.watch-row .wr-price { text-align: right; }
.watch-row .wr-price b { font-size: 18px; font-weight: 800; }

/* toggle */
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--surface-3); border-radius: var(--r-pill); transition: background .15s; }
.switch .track::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::before { transform: translateX(18px); }

/* ----- alert / explainer banner --------------------------------------- */
.banner { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r); background: linear-gradient(120deg, var(--indigo-soft), #fff); border: 1px solid #dcdcf6; }
.banner .b-ico { font-size: 26px; }
.banner h3 { margin: 0 0 4px; font-size: 16px; }
.banner p { margin: 0; font-size: 14px; color: var(--muted); }

/* ----- empty / misc ---------------------------------------------------- */
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty .e-ico { font-size: 46px; margin-bottom: 12px; }
.empty h3 { margin: 0 0 6px; color: var(--ink); }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 100; display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ----- footer ---------------------------------------------------------- */
.footer { background: linear-gradient(160deg, var(--royal-deep) 0%, #0c1830 100%); color: rgba(255, 255, 255, .72); margin-top: 50px; border-top: 2px solid var(--gold); }
.footer-inner { padding: 44px 0 30px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer h4 { color: #fff; font-size: 14px; margin: 0 0 14px; }
.footer a { display: block; padding: 5px 0; font-size: 13.5px; transition: color .15s; }
.footer a:hover { color: #fff; }
.footer .brand { color: #fff; margin-bottom: 12px; }
.footer .blurb { font-size: 13.5px; line-height: 1.6; max-width: 30ch; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0; font-size: 12.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.disclosure { background: rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius: var(--r-sm); padding: 12px 14px; font-size: 12px; line-height: 1.5; margin-top: 16px; }

/* ----- FAQ ------------------------------------------------------------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; background: var(--surface); }
.faq-item + .faq-item { margin-top: 12px; }
.faq-item h4 { margin: 0 0 6px; font-size: 15.5px; }
.faq-item p { margin: 0; color: var(--muted); font-size: 14px; }

/* ----- responsive ------------------------------------------------------ */
@media (max-width: 980px) {
  .valueprops { grid-template-columns: repeat(2, 1fr); }
  .grid, .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  #navToggle { display: grid; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 6px 0;
    box-shadow: 0 16px 34px -16px rgba(16, 36, 59, .4); z-index: 60;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 22px; border-radius: 0; font-size: 15.5px; }
  .nav a.active { background: var(--royal-soft); color: var(--royal); }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .grid, .grid.cols-3, .valueprops { grid-template-columns: 1fr; }
  /* topbar wraps to two rows: brand + icons on top, full-width search below */
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 10px 0; row-gap: 8px; gap: 8px; }
  .search { display: flex; order: 10; flex-basis: 100%; min-width: 0; margin-left: 0; }
  a.icon-btn { margin-left: auto; } /* pushes icons/account/menu right of the brand */
  .icon-btn, #navToggle { flex: none; }
  .topbar .acct-btn { padding: 8px 10px; font-size: 13px; }
  .brand { font-size: 16px; gap: 7px; }
  .beta-badge { display: none; }
  /* compare table: drop the Ship column (still counted in Total), tighten cells */
  .compare { font-size: 13px; }
  .compare th:nth-child(3), .compare td:nth-child(3) { display: none; }
  .compare th { padding: 0 6px 8px; }
  .compare td { padding: 10px 6px; }
  .compare .r-total { font-size: 14px; }
  .footer-inner { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* ===== animations & premium polish ===================================== */
@keyframes gd-fadeup { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes gd-sheen { 0% { transform: translateX(-130%) skewX(-14deg); } 55%, 100% { transform: translateX(240%) skewX(-14deg); } }
@keyframes gd-shimmer { 0% { background-position: -180% 0; } 100% { background-position: 180% 0; } }
@keyframes gd-floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.hero-inner { position: relative; z-index: 1; }

@media (prefers-reduced-motion: no-preference) {
  .hero .badge-row, .hero h1, .hero p.sub, .hero-search, .hero-stats { animation: gd-fadeup .6s both; }
  .hero h1 { animation-delay: .08s; }
  .hero p.sub { animation-delay: .16s; }
  .hero-search { animation-delay: .24s; }
  .hero-stats { animation-delay: .32s; }
  .grid .deal-card { animation: gd-fadeup .5s both; }
  .grid .deal-card:nth-child(1) { animation-delay: .04s; }
  .grid .deal-card:nth-child(2) { animation-delay: .09s; }
  .grid .deal-card:nth-child(3) { animation-delay: .14s; }
  .grid .deal-card:nth-child(4) { animation-delay: .19s; }
  .grid .deal-card:nth-child(5) { animation-delay: .24s; }
  .grid .deal-card:nth-child(6) { animation-delay: .29s; }
  .grid .deal-card:nth-child(7) { animation-delay: .34s; }
  .grid .deal-card:nth-child(8) { animation-delay: .39s; }
  .vp, .coming-soon { animation: gd-fadeup .55s both; }
}

/* premium "coming soon" — penny deals */
.coming-soon {
  position: relative; overflow: hidden; border-radius: var(--r-lg); color: #fff; text-align: center; padding: 48px 28px;
  background: radial-gradient(720px 320px at 18% -10%, #0c7d57 0%, transparent 60%),
              radial-gradient(720px 340px at 100% 110%, rgba(212, 175, 55, .30) 0%, transparent 60%),
              linear-gradient(150deg, #142a63 0%, #1f3f99 60%, #102a55 100%);
  box-shadow: var(--shadow-lg); border: 1px solid rgba(212, 175, 55, .35);
}
.coming-soon::before {
  content: ""; position: absolute; top: 0; left: 0; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .08) 50%, transparent);
  transform: translateX(-130%) skewX(-14deg); animation: gd-sheen 7s ease-in-out 2s infinite; pointer-events: none;
}
.coming-soon > * { position: relative; z-index: 1; }
.coming-soon .cs-lock { font-size: 42px; display: inline-block; animation: gd-floaty 3.6s ease-in-out infinite; }
.coming-soon .cs-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #2c2103; background: linear-gradient(100deg, #f3d98a, #d4af37);
  padding: 6px 14px; border-radius: var(--r-pill); margin: 10px 0 14px; box-shadow: 0 6px 16px -6px rgba(212, 175, 55, .65);
}
.coming-soon h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 10px; letter-spacing: -.02em; font-weight: 850; }
.coming-soon p { max-width: 58ch; margin: 0 auto 22px; color: rgba(255, 255, 255, .85); font-size: 15.5px; line-height: 1.6; }
.cs-meter { max-width: 380px; margin: 0 auto; }
.cs-meter .cs-bar { height: 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .16); overflow: hidden; }
.cs-meter .cs-fill { height: 100%; width: 34%; border-radius: var(--r-pill); background: linear-gradient(90deg, #d4af37, #f6e3a3, #d4af37); background-size: 200% 100%; animation: gd-shimmer 3s linear infinite; }
.cs-meter .cs-label { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .72); margin-top: 9px; font-weight: 700; }

/* ===== award-level polish ============================================== */
:root { --display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif; --ease: cubic-bezier(.16, .84, .3, 1); }

/* editorial display type on the big moments */
.hero h1, .section-head h2, .coming-soon h2, .detail h1, .empty h3, .faq-item h4 {
  font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-optical-sizing: auto;
}
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.0; font-weight: 600; max-width: 16ch; }
.hero h1 .hl { font-style: italic; font-weight: 500; }
.section-head h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 600; }
.hero-inner { padding: 84px 0 94px; }
.hero p.sub { font-size: clamp(16px, 2vw, 21px); }

/* compact hero on phones (after the display-type sizing above so it wins) */
@media (max-width: 560px) {
  .hero-inner { padding: 44px 0 56px; }
  .hero h1 { font-size: 32px; }
  .hero p.sub { font-size: 15px; margin-bottom: 22px; }
  .hero-stats { margin-top: 24px; gap: 18px; }
}

/* film grain over the hero for a cinematic finish */
.grain {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* refined card + button motion */
.deal-card { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s; }
.deal-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.dc-media img { transition: transform .4s var(--ease); }
.deal-card:hover .dc-media img { transform: scale(1.07); }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -65%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .4), transparent);
  transform: skewX(-18deg); transition: left .6s var(--ease); pointer-events: none;
}
.btn-primary:hover::after { left: 130%; }

/* trusted-stores marquee */
.marquee {
  overflow: hidden; padding: 17px 0; background: var(--surface);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track { display: inline-flex; align-items: center; white-space: nowrap; animation: gd-marquee 32s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { font-family: var(--display); font-size: 19px; font-style: italic; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; padding: 0 26px; }
.marquee-item::after { content: "◆"; color: var(--gold); font-size: 9px; font-style: normal; margin-left: 26px; }
@keyframes gd-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--rd, 0ms); }
.reveal-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } .marquee-track, .coming-soon::before, .hero::before { animation: none !important; } }

/* ===== icon system ===================================================== */
.icn { display: inline-block; vertical-align: -0.18em; flex: none; }
.ph-ic { display: inline-grid; place-items: center; color: var(--faint); }
.ph-ic .icn { vertical-align: 0; }
.hero-badge { gap: 6px; }
.hero-badge .icn { vertical-align: -0.14em; }
.verdict .v-ico { display: inline-flex; align-items: center; }
.verdict .v-ico .icn { vertical-align: 0; }
.dc-watch { color: var(--ink-2); }
.dc-watch .icn { vertical-align: 0; }
.dc-watch.on { color: var(--skip); }
.empty .e-ico { color: var(--faint); display: flex; justify-content: center; }
.empty .e-ico .icn { vertical-align: 0; }
.vp .ico { display: block; }
.vp .ico .icn { vertical-align: 0; }
.search .ico .icn, .hero-search .ico .icn { vertical-align: -0.22em; }
.cs-lock .icn { vertical-align: 0; }
.cs-badge .icn { vertical-align: -0.18em; margin-right: 4px; }
.icon-btn .icn { vertical-align: -0.2em; }
.b-ico .icn { vertical-align: 0; }
.btn .icn { vertical-align: -0.2em; }

.loader { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--brand); animation: gd-spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes gd-spin { to { transform: rotate(360deg); } }

/* logo mark */
.brand-logo { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; display: block; box-shadow: 0 5px 16px -5px rgba(31, 63, 153, .55); transition: transform .4s var(--ease); }
.brand-logo svg { display: block; width: 100%; height: 100%; }
.brand:hover .brand-logo { transform: rotate(-5deg) scale(1.06); }

/* ===== extra polish & motion ========================================== */
.save-pill { animation: gd-pulse 2.6s ease-in-out infinite; }
@keyframes gd-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(10, 157, 110, 0); } 50% { box-shadow: 0 0 0 4px rgba(10, 157, 110, .13); } }
.brand-logo svg circle { animation: gd-twinkle 3.4s ease-in-out infinite; }
@keyframes gd-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.deal-card:hover { box-shadow: 0 24px 52px -22px rgba(20, 42, 99, .42); }
.btn-primary, .btn-dark, .chip, .icon-btn { transition: transform .12s var(--ease), box-shadow .18s, background .18s, border-color .18s; }
.btn-primary:active, .btn-dark:active { transform: translateY(1px) scale(.99); }
.compare tr.best td { position: relative; }
.dc-score .score { transition: transform .3s var(--ease); }
.deal-card:hover .dc-score .score { transform: scale(1.08); }
.verdict { transition: transform .3s var(--ease); }
.verdict:hover { transform: translateX(2px); }

/* ===== account + login modal ========================================== */
.acct-btn { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 8px 16px; border-radius: var(--r-pill); font-weight: 700; font-size: 14px; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; transition: background .15s, border-color .15s, color .15s; }
.acct-btn:hover { background: var(--surface-2); border-color: var(--royal); }
.acct-btn.in { background: var(--royal-soft); border-color: var(--royal); color: var(--royal); }
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 41, .55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; animation: gd-fadein .2s; }
@keyframes gd-fadein { from { opacity: 0; } to { opacity: 1; } }
.modal-card { position: relative; background: var(--surface); border-radius: var(--r-lg); padding: 30px 28px; width: 100%; max-width: 400px; max-height: calc(100vh - 40px); overflow-y: auto; box-shadow: var(--shadow-lg); animation: gd-modalpop .25s var(--ease); }
@keyframes gd-modalpop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; transition: background .15s; }
.modal-x:hover { background: var(--surface-3); }
.gd-modal-title { font-family: var(--display); font-size: 24px; font-weight: 600; margin: 0 0 6px; letter-spacing: -.01em; }
.seg { display: flex; background: var(--surface-2); border-radius: var(--r-pill); padding: 4px; margin: 0 0 18px; }
.seg-btn { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: var(--r-pill); font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.seg-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.fld { display: block; margin-bottom: 14px; }
.fld span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.fld input { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 11px 13px; font-size: 16px; font-family: inherit; outline: none; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; }
.fld input:focus { border-color: var(--royal); box-shadow: 0 0 0 3px var(--royal-soft); }
.auth-msg { font-size: 13px; padding: 10px 12px; border-radius: var(--r-sm); margin-bottom: 12px; line-height: 1.4; }
.auth-msg.err { background: var(--skip-soft); color: var(--skip); }
.auth-msg.ok { background: var(--brand-soft); color: var(--brand-ink); }

/* ===== focus visibility (keyboard a11y) ================================ */
a:focus-visible, button:focus-visible, .select:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2.5px solid var(--royal); outline-offset: 2px;
}
.deal-card:focus-visible { outline-offset: 0; } /* ring would clip under overflow: hidden */
.select:focus-visible { border-color: var(--royal); box-shadow: 0 0 0 3px var(--royal-soft); }
/* these inputs sit in containers with their own focus treatment — skip the double ring */
.search input:focus-visible, .hero-search input:focus-visible, .fld input:focus-visible { outline: none; }
.hero-search:focus-within { box-shadow: var(--shadow-lg), 0 0 0 3px rgba(212, 175, 55, .55); }
