/* CouponScout - single stylesheet, no build step, no framework.
   Hand-written so the whole site ships as plain files. */

:root {
  --ink: #111827;
  --ink-2: #3f4a5a;
  --ink-3: #6b7686;
  --line: #e3e7ed;
  --line-2: #eef1f5;
  --bg: #f6f7f9;
  --card: #ffffff;
  --navy: #101b2d;
  --navy-2: #1b2a44;
  --accent: #c8281c;
  --accent-soft: #fdecea;
  --link: #1746b8;
  --ok: #10693f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 27, 45, .06), 0 1px 3px rgba(16, 27, 45, .04);
  --shadow-lg: 0 4px 14px rgba(16, 27, 45, .10);
  --wrap: 1100px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: var(--ink); padding: 10px 14px; z-index: 20;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- top bar ---------- */

.topbar {
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  position: sticky; top: 0; z-index: 10;
}

.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 60px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 800; line-height: 1;
}

.brand-name { font-size: 1.05rem; letter-spacing: -.02em; }

.nav { display: flex; flex-wrap: wrap; gap: 4px; }

.navlink {
  color: #b9c4d4; font-size: .875rem; font-weight: 600;
  padding: 6px 10px; border-radius: 7px; white-space: nowrap;
}
.navlink:hover { color: #fff; background: rgba(255, 255, 255, .09); text-decoration: none; }
.navlink.active { color: #fff; background: var(--navy-2); }

/* ---------- hero ---------- */

.hero { padding: 40px 0 8px; max-width: 760px; }
.hero-slim { padding-top: 32px; }
.hero-h1 { font-size: 2.15rem; margin-bottom: .6rem; }
.hero-lede { color: var(--ink-2); font-size: 1.02rem; margin: 0 0 22px; }

/* ---------- stat bar ---------- */

.statbar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 10px;
}

.stat { background: var(--card); padding: 14px 16px; }
.stat-n { display: block; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.stat-l { display: block; font-size: .78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }

.stat-note { font-size: .82rem; color: var(--ink-3); margin: 0 0 8px; }

/* ---------- blocks ---------- */

.block { padding: 30px 0 6px; }

.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { margin: 0; }
.block-count { font-size: .82rem; color: var(--ink-3); white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.grid-offers { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* ---------- offer card ---------- */

.offer-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0 0 12px; overflow: hidden;
  box-shadow: var(--shadow); color: var(--ink);
  transition: box-shadow .12s ease, transform .12s ease, border-color .12s ease;
}
.offer-card:hover {
  text-decoration: none; border-color: #cfd6e0;
  box-shadow: var(--shadow-lg); transform: translateY(-1px);
}

/* Brand-supplied product image, hotlinked from their CDN. Kept on a plain
   white tile so a transparent PNG never lands on a clashing background. */
.offer-media { background: #fff; border-bottom: 1px solid var(--line-2); }
.offer-img {
  display: block; width: 100%; height: 150px;
  object-fit: contain; padding: 10px; background: #fff;
}
.offer-img-empty {
  background: linear-gradient(135deg, #f3f5f8 0%, #e9edf3 100%);
}
.offer-body { padding: 12px 15px 0; display: flex; flex-direction: column; flex: 1; }

.offer-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.offer-prov { font-size: .78rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }

.badge {
  background: var(--accent-soft); color: var(--accent);
  font-size: .75rem; font-weight: 800; padding: 2px 7px; border-radius: 5px;
  white-space: nowrap;
}
/* A verified discount and a brand-sale-page listing are different claims.
   They must not look identical, or the site is blurring what it actually knows. */
.badge.verified-discount { background: var(--accent-soft); color: var(--accent); }
.badge.sale-page, .badge-soft { background: #eef4ff; color: #1c4bb0; font-weight: 700; }

.deal-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.offer-card.verified-discount { border-left: 3px solid #eeb2ab; }
.offer-card.sale-page { border-left: 3px solid #c3d5f4; }

/* ---------- deal page media ---------- */
.deal-media { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 18px; display: flex; justify-content: center; }
.deal-media img { max-width: 340px; width: 100%; height: auto; max-height: 320px;
  object-fit: contain; display: block; }

.offer-title {
  font-size: .95rem; font-weight: 600; margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em;
}

.offer-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.offer-price .now { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.offer-price .was { font-size: .85rem; color: var(--ink-3); text-decoration: line-through; }

.offer-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2);
}
.offer-checked { font-size: .74rem; color: var(--ink-3); }
.offer-go { font-size: .8rem; font-weight: 600; color: var(--link); }

/* ---------- provider card ---------- */

.prov-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px;
  box-shadow: var(--shadow); color: var(--ink);
  transition: box-shadow .12s ease, border-color .12s ease;
}
.prov-card:hover { text-decoration: none; border-color: #cfd6e0; box-shadow: var(--shadow-lg); }

.prov-cat {
  display: inline-block; align-self: flex-start;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); background: var(--line-2);
  padding: 2px 7px; border-radius: 5px; margin-bottom: 8px;
}
.prov-name { font-size: 1.05rem; margin: 0 0 6px; }
.prov-meta { font-size: .84rem; color: var(--ink-2); margin: 0 0 12px; }
.prov-go { font-size: .8rem; font-weight: 600; color: var(--link); margin-top: auto; }

/* ---------- breadcrumbs ---------- */

.crumbs { padding: 20px 0 0; font-size: .82rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--link); }
.crumbs .sep { color: #c3cad4; }

/* ---------- provider / deal head ---------- */

.prov-head { padding: 16px 0 4px; max-width: 780px; }
.prov-head h1 { font-size: 1.85rem; }
.prov-note { color: var(--ink-2); margin: 0 0 18px; }

.deal-head { padding: 14px 0 4px; max-width: 780px; }
.deal-head h1 { font-size: 1.75rem; margin-bottom: .35rem; }
.deal-at { color: var(--ink-3); margin: 0 0 18px; font-size: .95rem; }

.price-box {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.price-now { font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; color: var(--accent); }
.price-was { font-size: 1rem; color: var(--ink-3); text-decoration: line-through; }
.price-pct {
  font-size: .85rem; font-weight: 800; color: #fff; background: var(--accent);
  padding: 3px 9px; border-radius: 6px;
}

.cta {
  display: inline-block; background: var(--navy); color: #fff;
  font-weight: 600; font-size: .95rem; padding: 12px 20px; border-radius: 8px;
}
.cta:hover { background: var(--navy-2); text-decoration: none; }
.cta-note { font-size: .8rem; color: var(--ink-3); margin: 10px 0 0; max-width: 620px; }

/* ---------- facts list ---------- */

.facts { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line); }
.facts li {
  display: flex; gap: 14px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .88rem;
}
.facts .k { flex: 0 0 150px; color: var(--ink-3); }
.facts .v { flex: 1 1 auto; word-break: break-word; color: var(--ink); }

.provenance {
  font-size: .85rem; color: var(--ink-2);
  background: #f0f4fb; border-left: 3px solid var(--link);
  padding: 10px 14px; border-radius: 0 6px 6px 0; margin: 0;
}

.fine { font-size: .88rem; color: var(--ink-2); max-width: 720px; }

/* ---------- faq ---------- */

.faq { max-width: 780px; }
.faq details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 15px; margin-bottom: 8px;
}
.faq summary { font-weight: 600; cursor: pointer; font-size: .95rem; }
.faq summary::marker { color: var(--ink-3); }
.faq p { margin: 9px 0 0; font-size: .89rem; color: var(--ink-2); }

.disclaimer {
  font-size: .8rem; color: var(--ink-3);
  margin: 30px 0 10px; padding-top: 16px; border-top: 1px solid var(--line);
}

.empty { color: var(--ink-3); font-size: .9rem; font-style: italic; }

/* ---------- compare table ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }

.cmp { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 660px; }
.cmp th, .cmp td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.cmp thead th {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); background: #fafbfc; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp tbody tr:hover { background: #fafbfd; }
.cmp .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp .num.strong { font-weight: 700; color: var(--accent); }
.cmp .src { color: var(--ink-3); font-size: .82rem; }
.cmp .tag {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); background: var(--line-2); padding: 2px 6px; border-radius: 4px;
}

/* ---------- footer ---------- */

.foot { margin-top: 46px; background: var(--navy); color: #a9b6c9; }
.foot-inner { padding: 28px 20px 34px; }
.foot-tag { color: #dfe6f0; font-size: .92rem; margin: 0 0 6px; }
.foot-meta { font-size: .82rem; margin: 0 0 14px; }
.foot-meta .sep { color: #56657f; }
.foot-repo { color: #9fb4d4; text-decoration: underline; text-underline-offset: 2px; }
.foot-repo:hover { color: #dbe6f5; }
.foot-repo::before { content: "\00b7"; color: #56657f; margin: 0 6px; }
.foot-legal { font-size: .78rem; line-height: 1.65; color: #8695ab; margin: 0; max-width: 780px; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  h1 { font-size: 1.65rem; }
  .hero-h1 { font-size: 1.7rem; }
  .prov-head h1, .deal-head h1 { font-size: 1.5rem; }
  .price-now { font-size: 1.7rem; }
  .statbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li { flex-direction: column; gap: 2px; }
  .facts .k { flex: none; }
  .topbar-inner { padding-top: 10px; padding-bottom: 10px; }
  .nav { width: 100%; overflow-x: auto; }
}
