:root {
  --navy: #0b2a4a;
  --orange: #c2490a;
  --orange-light: #fff1e8;
  --ink: #1c2733;
  --muted: #5b6775;
  --line: #dde3ea;
  --bg: #f5f7fa;
  --card: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--navy); }
img { max-width: 100%; }
h1 { font-size: 1.75rem; line-height: 1.25; color: var(--navy); margin: 1.25rem 0 1rem; }
h2 { font-size: 1.3rem; color: var(--navy); margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; margin: .25rem 0; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 20; }

.announcement { background: var(--orange); color: #fff; text-align: center; font-size: .9rem; padding: 6px 0; }
.announcement a { color: #fff; font-weight: 700; }

.site-header { background: var(--navy); color: #fff; }
.header-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.3rem; }
.logo img { border: 1px solid #ffffff40; border-radius: 7px; }
.menu { display: flex; gap: 20px; }
.menu a { color: #fff; text-decoration: none; font-weight: 600; }
.menu a:hover, .menu a[aria-current] { color: #ffb27d; }
.menu-toggle { display: none; margin-left: auto; background: none; color: #fff; border: 1px solid #ffffff66; border-radius: 6px; padding: 6px 12px; font: inherit; }
.search { position: relative; margin-left: auto; flex: 0 1 280px; }
.search input { width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; font: inherit; }
.search-results { position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px #0002; }
.search-results li > * { display: block; padding: 8px 10px; color: var(--ink); text-decoration: none; border-radius: 6px; }
.search-results a:hover, .search-results a:focus { background: var(--orange-light); }

.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 12px 0 0; font-size: .85rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; }
.section { margin: 2rem 0; }
.empty { color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 10px; padding: 16px; }

.coupons { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.coupon { display: grid; grid-template-columns: 110px minmax(0, 1fr) 210px; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.coupon p { margin: .15rem 0; }
.coupon h3 { line-height: 1.3; }
.coupon-logo { text-decoration: none; }
.discount { align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border-right: 2px dashed var(--line); padding-right: 12px; color: var(--navy); }
.discount strong { font-size: 1.9rem; line-height: 1.1; }
.discount span { font-size: .85rem; font-weight: 700; color: var(--muted); }
.coupon-meta { font-size: .85rem; }
.coupon-meta a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; }
.coupon-meta .store-logo { width: 22px; height: 22px; border-radius: 5px; }
.expiry-line { font-size: .8rem; font-weight: 700; color: var(--muted); }
.expiry-line .expiry { font-weight: 400; }
.more summary { cursor: pointer; font-size: .85rem; color: var(--navy); font-weight: 600; }
.more p { font-size: .9rem; }
.badge { display: inline-block; background: var(--orange-light); color: var(--orange); font-weight: 800; border-radius: 6px; padding: 2px 8px; margin-right: 4px; }
.expiry { font-size: .8rem; color: var(--muted); }
.coupons.grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid .coupon { grid-template-columns: 90px minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: start; }
.grid .coupon-action { grid-column: 1 / -1; }
.grid .discount strong { font-size: 1.5rem; }
.is-expired { opacity: .65; grid-template-columns: 110px minmax(0, 1fr); }
.is-expired .coupon-action { display: none; }

.disclosure { font-size: .8rem; color: var(--muted); margin: 1rem 0 -1rem; }

.carousel { position: relative; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
.carousel::-webkit-scrollbar { display: none; }
.coupon.slide { flex: 0 0 min(260px, 78%); scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.slide-store { color: var(--muted); font-size: .85rem; }
.slide h3 { min-height: 2.6em; }
.slide .coupon-action { width: 100%; margin-top: auto; }
.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 10px; }
.dots button { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); }
.dots button[aria-current="true"]::before { background: var(--navy); border-color: var(--navy); }

.picks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.coupon.pick { display: block; padding: 0; }
.pick a { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; padding: 16px 8px; text-align: center; text-decoration: none; color: var(--ink); border-radius: 12px; }
.pick a:hover { background: var(--orange-light); }
.pick-store { font-size: .85rem; color: var(--muted); }
.pick strong { font-size: 1.1rem; color: var(--navy); }
.pick-action { margin-top: auto; font-size: .85rem; font-weight: 700; color: var(--orange); }

.button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--orange); color: #fff; font-weight: 700; text-decoration: none; border: 0; border-radius: 8px; padding: 11px 14px; font-size: .95rem; cursor: pointer; }
.button:hover { filter: brightness(1.08); }
.button.show-code { flex-direction: column; gap: 2px; padding-top: 8px; padding-bottom: 8px; }
.masked { background: #fff; color: var(--navy); border: 1px dashed var(--navy); border-radius: 4px; padding: 0 12px; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; letter-spacing: 1px; }

.store-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; flex: none; }
.store-logo.placeholder { display: grid; place-items: center; width: var(--size); height: var(--size); background: var(--logo); color: #fff; font-weight: 800; font-size: calc(var(--size) * .34); }
.store-head { display: flex; align-items: center; gap: 16px; margin-top: 1rem; }
.store-head h1 { margin: 0; }
.store-head p { margin: .25rem 0 0; }

.tiles, .cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tiles a { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; text-align: center; text-decoration: none; font-weight: 600; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 8px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cards a { display: block; height: 100%; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.tiles a:hover, .cards a:hover { border-color: var(--orange); }

.banner { background: linear-gradient(120deg, var(--navy), #174a7c); color: #fff; border-radius: 16px; padding: 28px 24px; margin: 2rem 0; }
.banner h2 { color: #fff; font-size: 1.6rem; margin: 0; }
.banner .eyebrow { text-transform: uppercase; letter-spacing: 1px; font-size: .75rem; color: #ffb27d; margin: 0 0 4px; }
.banner .button { display: inline-flex; width: auto; }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 600; cursor: pointer; }
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.5rem; }
.letters { display: flex; flex-wrap: wrap; gap: 8px; }
.letters a { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px 12px; text-decoration: none; font-weight: 700; }

.site-footer { background: var(--navy); color: #c9d3df; margin-top: 3rem; padding: 24px 0; font-size: .9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: #fff; }

.code-dialog { width: min(420px, calc(100% - 32px)); border: 0; border-radius: 16px; padding: 28px 24px; text-align: center; color: var(--ink); box-shadow: 0 20px 60px #0005; }
.code-dialog::backdrop { background: #0b2a4acc; }
.dialog-close { position: absolute; top: 8px; right: 12px; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.dialog-store { margin: 0; color: var(--muted); font-weight: 600; }
.dialog-code { display: flex; gap: 8px; align-items: stretch; border: 2px dashed var(--orange); border-radius: 10px; padding: 8px; }
.dialog-code code { flex: 1; align-self: center; font-size: 1.4rem; font-weight: 800; overflow-wrap: anywhere; user-select: all; }
.copy { background: var(--navy); color: #fff; border: 0; border-radius: 6px; padding: 8px 18px; font: inherit; font-weight: 700; cursor: pointer; }
.dialog-status { min-height: 1.5em; margin: 6px 0; color: #1f6f54; font-weight: 600; }

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .menu { display: none; order: 3; width: 100%; flex-direction: column; gap: 4px; }
  .menu.open { display: flex; }
  .menu a { padding: 6px 0; }
  .search { order: 4; flex-basis: 100%; }
  .coupons .coupon { grid-template-columns: 80px minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px 12px; }
  .coupons .coupon-action { grid-column: 1 / -1; }
  .coupons.grid { grid-template-columns: minmax(0, 1fr); }
  .discount strong { font-size: 1.45rem; }
  .discount span { font-size: .7rem; }
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: 1.45rem; }
}
