:root {
  --bg: #fff8ef; --fg: #2b2540; --muted: #6b657d; --card: #fff; --line: #f1e2cf;
  --accent: #e0431f; --accent-fg: #fff; --accent-soft: #ffe7de;
  --pop: #6c4bff; --pop-soft: #ece8ff; --sun: #ffd23f; --sun-soft: #fff1b8;
  --good: #0f8a47; --good-soft: #dff5e8; --bad: #c42a1c; --warn: #a64b05;
  --shadow: 0 1px 2px rgba(60, 30, 10, .06), 0 6px 18px rgba(60, 30, 10, .07);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1522; --fg: #f4eefb; --muted: #aaa2bd; --card: #251e31; --line: #3a3049;
    --accent: #ff7a59; --accent-fg: #1f1226; --accent-soft: #3d2530;
    --pop: #a794ff; --pop-soft: #30284d; --sun: #ffd23f; --sun-soft: #3f3718;
    --good: #4ade80; --good-soft: #17352a; --bad: #f87171; --warn: #fbbf24;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 2rem; font-weight: 800; margin: 1.4rem 0 .6rem; }
h2 { font-size: 1.45rem; font-weight: 800; margin: 2.6rem 0 .9rem; }
.lead { font-size: 1.12rem; color: var(--muted); }
:focus-visible { outline: 3px solid var(--pop); outline-offset: 2px; border-radius: 6px; }

/* header */
.top { background: var(--card); border-bottom: 2px solid var(--line); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; padding-top: 1.05rem; padding-bottom: 1.05rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; text-decoration: none; color: var(--fg); }
.brand::before {
  content: "%"; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px;
  background: var(--accent); color: var(--accent-fg); font-weight: 800; transform: rotate(-6deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .15);
}
.top nav { display: flex; gap: .3rem; flex-wrap: wrap; flex: 1; }
.top nav a { text-decoration: none; color: var(--fg); padding: .3rem .8rem; border-radius: 999px; font-weight: 600; }
.top nav a.sub { color: var(--muted); font-weight: 500; }
.top nav a:hover { background: var(--accent-soft); color: var(--accent); }
/* the bar uses the whole window; page content stays in the narrower column */
.top .wrap { max-width: none; padding-left: clamp(14px, 2.5vw, 32px); padding-right: clamp(14px, 2.5vw, 32px); }
.top nav a { white-space: nowrap; }
.top .cta { padding: .4rem 1rem; font-size: .95rem; white-space: nowrap; }
.top .cta.order { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; padding: .35rem 1.1rem .4rem; text-align: center; }
.top .cta.order small { font-size: .72rem; font-weight: 500; opacity: .95; }
.top .cta.alerts { background: var(--card); color: var(--accent); border: 2px solid var(--accent); box-shadow: none; }

.foot { margin-top: 4.5rem; background: var(--card); border-top: 2px solid var(--line); padding: 1.8rem 0; color: var(--muted); font-size: .9rem; }
.foot p { margin: .3rem 0; }

.flash { padding: .8rem 1.1rem; border-radius: 14px; border: 2px solid var(--line); background: var(--card); margin-top: 1rem; }
.flash.error { border-color: var(--bad); color: var(--bad); }
.flash.ok { border-color: var(--good); background: var(--good-soft); }

/* controls */
button, .btn {
  display: inline-block; font: inherit; font-weight: 700; background: var(--accent); color: var(--accent-fg);
  border: 0; border-radius: 999px; padding: .6rem 1.3rem; cursor: pointer; text-decoration: none;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .18); transition: transform .08s, box-shadow .08s, filter .15s;
}
button:hover, .btn:hover { filter: brightness(1.06); }
button:active, .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
.btn.big { padding: .75rem 1.6rem; font-size: 1.05rem; }
input, select, textarea {
  font: inherit; color: inherit; background: var(--card); border: 2px solid var(--line);
  border-radius: 14px; padding: .55rem .9rem; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pop); box-shadow: 0 0 0 3px var(--pop-soft); }

/* hero */
.hero {
  position: relative; overflow: hidden; margin: 1.4rem 0 0; padding: 2.4rem 1.6rem 1.8rem;
  border-radius: 28px; background: linear-gradient(135deg, var(--sun-soft), var(--accent-soft) 60%, var(--pop-soft));
  border: 2px solid var(--line);
}
.hero::after {
  content: "★"; position: absolute; right: 1.4rem; top: .6rem; font-size: 4.5rem; line-height: 1;
  color: var(--sun); transform: rotate(14deg); opacity: .9; pointer-events: none;
}
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin: 0 0 .5rem; max-width: 26ch; text-wrap: balance; }
.hero > p { font-size: 1.1rem; margin: 0 0 1.2rem; max-width: 46ch; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.3rem; padding: 0; list-style: none; }
.chips li { background: var(--card); border-radius: 999px; padding: .3rem .85rem; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow); }

.subscribe { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: 1.5rem 0; max-width: 560px; box-shadow: var(--shadow); }
.hero .subscribe { margin: 0; }
.subscribe .row { display: flex; gap: .5rem; margin: .6rem 0 .4rem; }
.subscribe input[type=email] { flex: 1; min-width: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.group-card { text-decoration: none; color: inherit; display: block; position: relative; padding-top: 1.5rem; transition: transform .12s; }
.group-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; border-radius: 16px 16px 0 0; background: var(--accent); }
.grid > .group-card:nth-child(3n+2)::before { background: var(--pop); }
.grid > .group-card:nth-child(3n+3)::before { background: var(--sun); }
.group-card:hover { transform: translateY(-3px) rotate(-.4deg); }
.group-card h3 { margin: 0 0 .3rem; font-size: 1.2rem; }
.group-card p { margin: .3rem 0; }
.group-card .count { display: inline-block; background: var(--good-soft); color: var(--good); border-radius: 999px; padding: .15rem .7rem; font-weight: 700; font-size: .9rem; }

.post { padding: 0; overflow: hidden; transition: transform .12s; }
.post:hover { transform: translateY(-3px); }
.post img { width: 100%; height: 170px; object-fit: cover; display: block; }
.post .body { padding: 1.1rem; }
.post h3 { margin: .3rem 0 .4rem; }
.post h3 a { color: inherit; text-decoration: none; }
.post h3 a:hover { color: var(--accent); }
.meta { font-size: .85rem; color: var(--muted); margin: 0; }
.tag { text-transform: uppercase; font-size: .7rem; font-weight: 700; letter-spacing: .06em; padding: .15rem .55rem; border-radius: 999px; background: var(--pop-soft); color: var(--pop); }
.tag.review { background: var(--sun); color: #2b2540; }
.stars { color: var(--warn); font-weight: 700; }

/* latest deals */
.deal-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.deal-list li {
  display: flex; gap: .3rem 1rem; align-items: center; flex-wrap: wrap; padding: .85rem 1.1rem;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.deal-list li > a { text-decoration: none; color: var(--fg); }
.deal-list li > a:hover { color: var(--accent); }
.deal-list .price { margin-left: auto; }

.price { font-size: 1.35rem; font-weight: 800; white-space: nowrap; }
.price small { font-weight: 500; color: var(--muted); font-size: .85rem; }
.was { color: var(--muted); font-size: .9rem; }

/* comparison table: one rounded card per row */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px 6px; }
table.compare { width: 100%; border-collapse: separate; border-spacing: 0 .8rem; }
.compare th { text-align: left; padding: 0 1.1rem; color: var(--muted); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.compare td { text-align: left; padding: 1rem 1.1rem; vertical-align: top; background: var(--card); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.compare td:first-child { border-left: 2px solid var(--line); border-radius: var(--radius) 0 0 var(--radius); }
.compare td:last-child { border-right: 2px solid var(--line); border-radius: 0 var(--radius) var(--radius) 0; }
.compare tr.best td { border-color: var(--good); background: linear-gradient(var(--good-soft), var(--card) 70%); }
.compare th.sortable { cursor: pointer; user-select: none; }
.compare th.sortable::after { content: " ↑"; }
.compare th.sortable[aria-sort=descending]::after { content: " ↓"; }
.compare .act { text-align: right; white-space: nowrap; vertical-align: middle; }
.features { margin: .4rem 0 0; color: var(--muted); font-size: .92rem; }
.features ul, .features ol { margin: 0; padding-left: 1.1rem; }
.features p { margin: .2rem 0; }
.features strong { color: var(--fg); }
.badge { font-size: .72rem; font-weight: 700; padding: .12rem .6rem; border-radius: 999px; border: 2px solid var(--line); margin-left: .3rem; white-space: nowrap; vertical-align: middle; }
.badge.best { background: var(--good); color: #fff; border-color: var(--good); }
.badge.drop { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.badge.gone { color: var(--bad); border-color: var(--bad); }
.checked.stale { color: var(--warn); }
.ended { margin-top: 1.5rem; }
.ended summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.ended-table { margin-top: .2rem; opacity: .75; width: 100%; border-collapse: separate; border-spacing: 0 .5rem; }
.ended-table td { background: var(--card); padding: .7rem 1rem; }
tr:target td { border-color: var(--pop); box-shadow: 0 0 0 3px var(--pop-soft); }

.tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.tabs a { text-decoration: none; color: var(--muted); padding: .35rem .95rem; border-radius: 999px; font-weight: 600; background: var(--card); border: 2px solid var(--line); }
.tabs a.on { color: var(--accent-fg); background: var(--fg); border-color: var(--fg); }
.pager { display: flex; gap: 1rem; align-items: center; margin: 1.5rem 0; }

.article, .narrow { max-width: 720px; }
.article .cover { width: 100%; border-radius: var(--radius); margin: 1rem 0; box-shadow: var(--shadow); }
.prose { overflow-wrap: anywhere; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; }
.prose table { border-collapse: collapse; }
.prose th, .prose td { border: 2px solid var(--line); padding: .4rem .7rem; }
.prose blockquote { margin-left: 0; padding: .1rem 1rem; border-left: 5px solid var(--sun); background: var(--sun-soft); border-radius: 0 12px 12px 0; }
.prose pre { background: var(--card); padding: 1rem; overflow-x: auto; border-radius: 12px; border: 2px solid var(--line); }

@media (max-width: 1340px) {
  .bar { row-gap: .6rem; }
  .top .brand { margin-right: auto; }
  .top nav { order: 5; flex-basis: 100%; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.7rem; }
  .top .cta.alerts { display: none; }
  .top .cta.order { flex-basis: 100%; margin-top: .3rem; order: 1; }
  .top nav { order: 0; }
  .bar { gap: .3rem; padding-top: .8rem; padding-bottom: .8rem; }
  .top nav { flex-basis: 100%; gap: .1rem; margin: 0 -.5rem; }
  .top nav a { padding: .25rem .6rem; }
  .hero { padding: 1.6rem 1.1rem 1.3rem; border-radius: 22px; }
  .hero::after { font-size: 2.2rem; right: .9rem; top: .5rem; }
  .hero h1 { padding-right: 2rem; }
  .compare thead { display: none; }
  .table-wrap { overflow-x: visible; }
  .compare, .compare tbody, .compare tr, .compare td { display: block; width: 100%; }
  .compare tr { margin-bottom: .9rem; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
  .compare tr.best { border-color: var(--good); }
  .compare td, .compare td:first-child, .compare td:last-child { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: .5rem 1.1rem; }
  .compare .act { text-align: left; padding-bottom: 1rem; }
  .compare .act .btn { display: block; text-align: center; }
  .ended-table, .ended-table tbody, .ended-table tr, .ended-table td { display: block; width: 100%; }
  .subscribe .row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .refbox .nudge { animation: none; }
  html { scroll-behavior: auto; }
}

/* news */
.news-list { display: grid; gap: .9rem; margin: 1rem 0; }
.news-item { display: flex; gap: 1rem; padding: 0; overflow: hidden; }
.news-item .thumb { flex: 0 0 150px; background: var(--line); }
.news-item .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-item .body { padding: .9rem 1.1rem; min-width: 0; }
.news-item h3 { margin: .15rem 0 .35rem; font-size: 1.12rem; }
.news-item h3 a { color: var(--fg); text-decoration: none; }
.news-item h3 a:hover { color: var(--accent); }
.news-item .excerpt { margin: 0 0 .4rem; color: var(--muted); }
@media (max-width: 640px) {
  .news-item { flex-direction: column; gap: 0; }
  .news-item .thumb { flex-basis: auto; height: 150px; }
}

/* news story page + referral box */
.crumb { margin: 1.2rem 0 0; }
.crumb a { text-decoration: none; font-weight: 600; }
.story { max-width: 720px; }
.story .cover { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); margin: .4rem 0 1rem; box-shadow: var(--shadow); }
.story .lead { font-size: 1.15rem; color: var(--fg); border-left: 5px solid var(--sun); padding-left: 1rem; }
.refbox {
  display: flex; gap: 1.1rem; align-items: center; max-width: 720px; margin: 2rem 0; padding: 1.3rem 1.4rem;
  border-radius: 24px; border: 2px solid var(--line); box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--sun-soft), var(--accent-soft));
}
.refbox .icon { font-size: 2.6rem; line-height: 1; }
.refbox h2 { margin: 0 0 .25rem; font-size: 1.3rem; }
.refbox p { margin: 0 0 .8rem; }
.refbox .cta-row { display: flex; align-items: center; gap: .8rem; }
.refbox .nudge { flex: none; color: var(--accent); animation: nudge 1.1s ease-in-out infinite alternate; }
@keyframes nudge { from { transform: translateX(0); } to { transform: translateX(-12px); } }
.refbox .note { margin: .6rem 0 0; font-size: .85rem; color: var(--muted); }
@media (max-width: 640px) { .refbox { flex-direction: column; align-items: flex-start; } .refbox .txt, .refbox .cta-row { width: 100%; } .refbox .cta-row .btn { display: block; text-align: center; flex: 1; } }
.story .fullstory { font-weight: 600; }
.deal-detail .source { font-size: 1rem; }
.deal-detail .price { font-size: 1.9rem; margin: .6rem 0 .2rem; }
.deal-detail .struck { text-decoration: line-through; color: var(--muted); }
.deal-detail .features { font-size: 1rem; }
.compare .desc { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }
