/* Coupossum. System fonts only (no web fonts, so no third-party requests). */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f3f0eb;
  --text: #1c1917;
  --muted: #6b645c;
  --line: #e7e2da;
  --accent: #0f766e;
  --accent-strong: #0b5e57;
  --accent-soft: #e3f3f0;
  --accent-ink: #ffffff;
  --hot: #e0466e;
  --hot-soft: #fde8ee;
  --ship: #2563eb;
  --ship-soft: #e5edfd;
  --gold-soft: #fdf3dc;
  --gold: #a16207;
  --shadow: 0 1px 2px rgba(28, 25, 23, .05), 0 4px 14px rgba(28, 25, 23, .06);
  --shadow-hover: 0 2px 4px rgba(28, 25, 23, .06), 0 10px 28px rgba(28, 25, 23, .10);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --surface: #1d1b19;
    --surface-2: #26231f;
    --text: #f2efea;
    --muted: #a8a097;
    --line: #34302b;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-soft: #123a36;
    --accent-ink: #0b1f1d;
    --hot: #fb7196;
    --hot-soft: #3d1a25;
    --ship: #7aa2ff;
    --ship-soft: #1b2643;
    --gold-soft: #3a2e12;
    --gold: #f5c84c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
main { padding: 28px 0 64px; }
section { margin: 0 0 48px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.55rem); }
h3 { font-size: 1.02rem; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.icon { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

/* Header */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; flex: none; }
.logo:hover { color: var(--text); }
.logo img { width: 40px; height: 40px; }
.logo .accent { color: var(--accent); }
nav.main { display: flex; gap: 4px; margin-left: auto; }
nav.main a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
nav.main a:hover { color: var(--text); background: var(--surface-2); }
nav.main a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.top-search { display: none; position: relative; flex: 0 1 260px; }
.top-search input { width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .92rem; }
.top-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
@media (min-width: 900px) { .top-search { display: block; } }
@media (max-width: 680px) {
  header.top .wrap { flex-wrap: wrap; gap: 6px 12px; padding-top: 8px; }
  nav.main { width: 100%; margin: 0 -8px; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
  nav.main::-webkit-scrollbar { display: none; }
}

/* Buttons and inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700;
  padding: 10px 16px; border-radius: 999px; border: 0; font-size: .92rem; cursor: pointer; line-height: 1.2;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent-strong); color: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-lg { padding: 14px 22px; font-size: 1rem; }
form.search { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 12px; }
form.search input[type=search], form.search input[type=number], form.search select {
  padding: 11px 14px; font-size: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text);
}
form.search input[type=search] { flex: 1 1 260px; min-width: 0; }
/* The option list is drawn by the browser; give it explicit colours so it's readable in dark mode
   (otherwise it can get light text on the browser's white list). */
select option { background-color: var(--surface); color: var(--text); }
form.search input:focus, form.search select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

/* Hero (home) */
.hero {
  position: relative; overflow: hidden; display: grid; gap: 24px; align-items: center;
  padding: 40px 28px; margin: 0 0 40px; border-radius: 28px;
  background:
    radial-gradient(1100px 380px at 100% 0%, color-mix(in srgb, var(--hot) 14%, transparent), transparent 60%),
    radial-gradient(900px 420px at 0% 100%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
@media (min-width: 860px) { .hero { grid-template-columns: 1.4fr .8fr; padding: 56px 48px; } }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { color: var(--muted); font-size: 1.12rem; max-width: 560px; }
.hero form.search { background: var(--surface); padding: 8px; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 640px; }
.hero form.search input[type=search], .hero form.search select { border: 0; background-color: var(--surface); }
.hero form.search input[type=search]:focus { box-shadow: none; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .85rem; font-weight: 600; }
.pill strong { color: var(--text); }
.hero-art { display: none; justify-self: center; position: relative; }
.hero-art img { width: 220px; height: 220px; filter: drop-shadow(0 18px 30px rgba(28, 25, 23, .18)); }
.hero-art .bubble { position: absolute; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 14px; padding: 8px 12px; font-weight: 800; font-size: .95rem; white-space: nowrap; }
.hero-art .b1 { top: 6px; left: -46px; color: var(--hot); transform: rotate(-6deg); }
.hero-art .b2 { bottom: 26px; right: -40px; color: var(--accent); transform: rotate(5deg); }
@media (min-width: 860px) { .hero-art { display: block; } }
@media (max-width: 640px) {
  .hero { padding: 28px 18px; border-radius: 22px; }
  .hero form.search select { flex: 1; }
  .hero form.search .btn { flex: 1 1 100%; }
  .wrap { padding: 0 14px; }
}

/* Section headings with "see all" link */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.section-head a::after { content: " →"; }

/* Grids */
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
.grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.four { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid.cats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--surface); box-shadow: var(--shadow); transition: box-shadow .18s, transform .18s, border-color .18s; }

/* Store avatar: first letter on a colour derived from the name */
.avatar {
  --h: 170; display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 11px; font-weight: 800; font-size: .95rem; text-transform: uppercase;
  background: hsl(var(--h) 70% 92%); color: hsl(var(--h) 55% 28%);
}
@media (prefers-color-scheme: dark) { .avatar { background: hsl(var(--h) 35% 22%); color: hsl(var(--h) 70% 80%); } }
.avatar.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.6rem; }

/* Offer (coupon) card */
.offer { display: flex; flex-direction: column; gap: 10px; position: relative; }
.offer:hover { box-shadow: var(--shadow-hover); }
.offer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.offer .store { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-size: .9rem; font-weight: 700; }
.offer .store a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer .store a:hover { color: var(--accent); }
.hl { flex: none; font-size: .78rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.hl.hot { background: var(--hot-soft); color: var(--hot); }
.hl.ship { background: var(--ship-soft); color: var(--ship); }
.hl.gift { background: var(--gold-soft); color: var(--gold); }
.offer h3 { overflow-wrap: anywhere; margin: 0; font-size: 1.02rem; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.offer .meta { font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.offer .meta span { display: inline-flex; align-items: center; gap: 5px; }
.offer .meta .soon { color: var(--hot); font-weight: 700; }
.offer .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 4px; }
.ticket { display: inline-flex; align-items: stretch; border: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 12px; overflow: hidden; background: var(--accent-soft); }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 800; color: var(--accent); padding: 7px 12px; letter-spacing: .04em; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy { border: 0; border-left: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); background: var(--surface); color: var(--text); font-weight: 700; font-size: .82rem; padding: 0 12px; cursor: pointer; }
.copy:hover { background: var(--surface-2); }
.nocode { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 8px 12px; }
.offer .actions .btn { margin-left: auto; }
.offer:target { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Product card */
.product { padding: 12px; gap: 8px; }
.product .media { position: relative; border-radius: 12px; overflow: hidden; background: #fff; aspect-ratio: 1 / 1; }
.product .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.product .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .85rem; background: var(--surface-2); }
.product .media .badge { position: absolute; top: 8px; left: 8px; }
.product .store { font-size: .8rem; font-weight: 600; }
.product .store a { color: var(--muted); }
.product h3 { font-size: .92rem; font-weight: 600; -webkit-line-clamp: 2; }
.price { font-weight: 800; font-size: 1.1rem; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.price-row s { color: var(--muted); font-weight: 400; font-size: .88rem; }
.product .meta { font-size: .78rem; }
.product .actions .btn { width: 100%; margin: 0; padding: 9px 12px; }
.badge { display: inline-block; background: var(--hot); color: #fff; font-weight: 800; font-size: .78rem; padding: 3px 9px; border-radius: 999px; }

/* Store tiles */
.store-tile { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); padding: 14px 16px; }
.store-tile:hover { border-color: var(--accent); color: var(--text); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.store-tile .name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-tile .count { color: var(--accent); font-weight: 700; white-space: nowrap; font-size: .85rem; background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; }

/* Category tiles (home) */
.grid.cats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid.cats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cat-tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--text); }
.cat-tile:hover { border-color: var(--accent); color: var(--text); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.cat-tile .emoji { font-size: 1.6rem; line-height: 1; width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; }
.cat-tile .name { font-weight: 700; display: block; }
.cat-tile .n { color: var(--muted); font-size: .82rem; }

/* Chips (letters, categories, offer types) */
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 22px; }
.letters a { text-decoration: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; color: var(--text); font-size: .88rem; font-weight: 600; }
.letters a:hover { border-color: var(--accent); }
.letters a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cats .count { color: var(--muted); font-size: .78rem; margin-left: 2px; font-weight: 500; }
.cats a[aria-current="page"] .count { color: var(--accent-ink); opacity: .8; }

.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 28px; }
.note { font-size: .84rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 20px; }
.empty { color: var(--muted); padding: 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Page header (listing pages) */
.page-head { margin-bottom: 8px; }
.page-head p { color: var(--muted); max-width: 640px; }

/* Store page header */
.store-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 24px; margin-bottom: 20px; }
.store-head .info { flex: 1; min-width: 220px; }
.store-head h1 { margin-bottom: 6px; font-size: clamp(1.5rem, 4vw, 2.1rem); }
.store-head .facts { display: flex; flex-wrap: wrap; gap: 8px; }

/* About */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 800; margin-bottom: 10px; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .rules { grid-template-columns: 1fr 1fr; } }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 28px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 28px; font-size: .9rem; color: var(--muted); background: var(--surface); }
.foot { display: grid; gap: 28px; }
@media (min-width: 760px) { .foot { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot-h { color: var(--text); margin: 0 0 10px; font-size: .9rem; font-weight: 700; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot .logo { margin-bottom: 10px; }
footer .disclosure { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .82rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Code blocks with a copy button (AI page) */
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; background: var(--surface-2); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.codeblock { position: relative; margin: 10px 0; }
.codeblock pre { margin: 0; padding: 14px 70px 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; font-size: .88rem; line-height: 1.5; }
.codeblock pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.codeblock .copy { position: absolute; top: 8px; right: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; }
.card ol { padding-left: 20px; margin: 0 0 10px; }
.prompts { padding-left: 20px; }
.prompts li { margin: 6px 0; font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { background: var(--surface-2); }

.store-head .summary { color: var(--muted); margin: 0 0 10px; max-width: 640px; }

/* Offer conditions and terms */
.conditions { display: flex; flex-wrap: wrap; gap: 6px; }
.conditions span { font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); }
details.terms { font-size: .84rem; color: var(--muted); }
details.terms summary { cursor: pointer; font-weight: 600; color: var(--text); }
details.terms p { margin: 6px 0 0; overflow-wrap: anywhere; }
