/* Promotiecode.nl
   Suunta: painettu reclamefolder / kuponkiarkki, ei SaaS-kortteja.
   Kulmikkaat muodot, hiusviivat varjojen sijaan, kapea otsikkokirjasin (Archivo wdth),
   koodit kuittifontilla (IBM Plex Mono). Brändivärit vanhalta sivulta: navy #121758, oranssi #ef6624. */
@font-face { font-family: "Archivo"; src: url(/fonts/archivo-latin.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/fonts/plexmono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/fonts/plexmono-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --navy: #121758;
  --navy-ink: #0d1147;
  --orange: #ef6624;
  --orange-ink: #b8460f;
  --paper: #f6f3ec;
  --paper-2: #ece7dc;
  --white: #fffdf8;
  --ink: #16182b;
  --muted: #5b5d6e;
  --rule: #d9d3c4;
  --rule-strong: #16182b;
  --green: #17723a;
  --body: "Archivo", "Arial Narrow", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.65 var(--body); font-stretch: 100%; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--body); line-height: 1.05; color: var(--navy-ink); }
h1, .h-section, .page-head h1, .prose h2 { font-stretch: 84%; font-weight: 700; letter-spacing: -.01em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 99; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.ic-sm { width: 16px; height: 16px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Header: yksi navy-palkki, navigaatio isoilla kapeilla versaaleilla */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.brand img { display: block; width: 200px; height: auto; }
.search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.search input { width: 100%; height: 42px; border: 0; border-radius: 2px; padding: 0 14px 0 40px; font: 500 16px var(--body); background: var(--white); color: var(--ink); }
.ic-search { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.search-results { position: absolute; top: 46px; left: 0; right: 0; margin: 0; padding: 0; list-style: none; background: var(--white); border: 2px solid var(--ink); max-height: 60vh; overflow: auto; }
.search-results li + li { border-top: 1px solid var(--rule); }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; color: var(--ink); text-decoration: none; font-weight: 500; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--paper-2); }
.search-results small { color: var(--green); font-weight: 700; }
.main-nav { border-top: 1px solid rgba(255,255,255,.16); }
.main-nav .wrap { display: flex; overflow-x: auto; scrollbar-width: none; }
.main-nav a { color: #e4e5f2; text-decoration: none; font-weight: 600; font-size: 15.5px; padding: 11px 14px; white-space: nowrap; }
.main-nav a:first-child { padding-left: 0; }
.main-nav a:hover, .main-nav a[aria-current] { color: #fff; box-shadow: inset 0 -3px var(--orange); }
.main-nav .nav-hot { color: #ff9a66; }

/* Hero: tasainen navy, iso kapea otsikko, ei liukuväriä */
.hero { background: var(--navy); color: #fff; padding: 48px 0 52px; border-bottom: 4px solid var(--orange); }
.hero h1 { color: #fff; font-size: clamp(30px, 4.2vw, 50px); max-width: 820px; margin: 0 0 16px; line-height: 1.08; }
.hero .lead { color: #cfd1ea; max-width: 620px; margin: 0 0 18px; font-size: 18px; }
.hero-shops { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0; font-size: 15px; }
.hero-shops span { font-weight: 600; color: #ff9a66; }
.hero-shops a { color: #fff; font-weight: 600; }

/* Osiot */
.block { margin-top: 64px; margin-bottom: 64px; }
.h-section { font-size: clamp(23px, 2.4vw, 28px); margin: 56px 0 0; padding-bottom: 10px; border-bottom: 2px solid var(--rule-strong); }
.h-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--rule-strong); margin: 56px 0 0; }
.h-row .h-section { border: 0; margin: 0; }
.more { font-weight: 700; white-space: nowrap; color: var(--orange-ink); padding-bottom: 10px; }
.page-head { margin: 8px 0 8px; }
.page-head h1 { font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0; }
.cat-count { color: var(--muted); margin: 6px 0 0; font-size: 14.5px; }

/* Kruimelpolku */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 18px 0 10px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--rule); }
.crumbs a { color: var(--muted); }

/* Kategoriat: hakemistotaulukko viivoin, ei laattoja */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); margin-top: 24px; }
.cat-tile { display: flex; align-items: center; gap: 12px; padding: 17px 18px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); font-weight: 500; font-size: 16px; line-height: 1.2; background: var(--white); hyphens: auto; overflow-wrap: anywhere; }
.cat-tile:hover { background: var(--navy); color: #fff; }
.cat-tile:hover .ic-cat { color: var(--orange); }
.ic-cat { width: 22px; height: 22px; color: var(--navy); stroke-width: 1.75; }
.cat-grid-season { margin-top: 0; border-top: 0; }
.cat-grid-season .cat-tile { background: var(--paper-2); }
.cat-grid-season .ic-cat { color: var(--orange-ink); }
.cat-head { display: flex; align-items: center; gap: 18px; }
.cat-head-icon { width: 64px; height: 64px; background: var(--navy); display: grid; place-items: center; flex: none; }
.cat-head-icon .ic-cat { width: 32px; height: 32px; color: #fff; }

/* Logot: neliö ilman korttikehystä */
.logo { display: grid; place-items: center; background: #fff; flex: none; position: relative; overflow: hidden; }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.logo-sm { width: 112px; height: 56px; }
/* Brändikuvake (neliö) 2:1-laatikossa: pienempi ja keskellä */
.logo.logo-icon img { inset: 12% 0; height: 76%; }
.logo-md { width: 128px; height: 64px; }
.logo-lg { width: 220px; height: 110px; outline: 1px solid var(--rule); }
.logo-fallback { font-weight: 800; font-stretch: 70%; font-size: 30px; color: var(--navy); }
.logo-lg .logo-fallback { font-size: 52px; }

/* Kaupat: logoseinä, solut jakavat viivat */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); margin-top: 24px; }
.shop-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: var(--white); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 22px 12px 18px; text-decoration: none; color: var(--ink); }
.shop-tile:hover { background: #fff; box-shadow: inset 0 0 0 2px var(--navy); }
.shop-tile-name { max-width: 100%; min-width: 0; overflow-wrap: anywhere; font-weight: 500; font-size: 15px; line-height: 1.2; }
.shop-tile-count { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--green); }
.shop-list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.shop-list .shop-tile { padding: 12px 6px; }
.shop-list .logo-md { width: 112px; height: 56px; }

/* Tarjoukset: kuponkirivit. Runko | rei'itys | kanta (alennus + toiminto) */
.offers { margin-top: 24px; display: grid; gap: 20px; }
.offer { position: relative; display: grid; grid-template-columns: 136px minmax(0, 1fr) 210px; align-items: stretch; background: var(--white); border: 1px solid var(--rule); }
.offer-logo { display: grid; place-items: start center; padding: 22px 0 0 20px; text-decoration: none; }
.offer-logo .logo-sm { width: 112px; height: 56px; }
.offer-body { padding: 22px 28px 22px 20px; min-width: 0; }
.offer-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 6px; font-size: 13.5px; }
.offer-shop { font-weight: 600; color: var(--ink); text-decoration: none; }
.kind { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.kind-code { color: var(--orange-ink); }
.kind-deal { color: var(--green); }
.offer-title { font-size: 19px; font-weight: 600; line-height: 1.25; margin: 0 0 8px; color: var(--ink); overflow-wrap: anywhere; }
.offer-text { color: var(--muted); margin: 0 0 10px; font-size: 15.5px; overflow-wrap: anywhere; }
.offer-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; margin: 0; font-size: 13.5px; color: var(--muted); }
.offer-foot .soon { color: #b3261e; font-weight: 700; }
.terms summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.terms p { margin: 6px 0 0; }
.offer-stub { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 22px 22px; border-left: 2px dashed var(--rule); background: var(--white); }
/* rei'ityksen puolikkaat ympyrät */
.offer-stub::before, .offer-stub::after { content: ""; position: absolute; left: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 1px solid var(--rule); }
.offer-stub::before { top: -10px; clip-path: inset(50% 0 0 0); }
.offer-stub::after { bottom: -10px; clip-path: inset(0 0 50% 0); }
.tag { font-weight: 750; font-stretch: 75%; font-size: 34px; line-height: .9; color: var(--orange); text-align: center; letter-spacing: -.01em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--navy); color: #fff; font: 600 15.5px var(--body); border: 0; border-radius: 2px; padding: 13px 16px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--orange); }
.btn-lg { padding: 15px 22px; font-size: 16px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.offer-stub .btn { width: 100%; height: 48px; }

/* "Toon code": kuitin repäisyliuska, koodin loppu näkyy */
.btn-code { position: relative; width: 100%; height: 48px; border: 2px dashed var(--orange); border-radius: 0; background: #fff; cursor: pointer; font: 600 17px var(--mono); color: var(--ink); overflow: hidden; padding: 0; letter-spacing: .06em; }
.code-peek { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.code-cover { position: absolute; inset: -2px 44px -2px -2px; background: var(--orange); color: #fff; font: 600 15.5px var(--body); display: grid; place-items: center; transition: inset .15s; }
.btn-code:hover .code-cover { inset: -2px 54px -2px -2px; background: var(--orange-ink); }
.btn-code.revealed { cursor: copy; background: #fff7f2; }
.btn-code.revealed .code-cover { display: none; }
.btn-code.revealed .code-peek { position: static; transform: none; display: block; }
.code-panel[hidden] { display: none; }
.code-panel { position: fixed; z-index: 50; right: 20px; bottom: var(--panel-bottom, 20px); width: min(420px, calc(100vw - 40px)); max-height: calc(100dvh - var(--panel-bottom, 20px) - 10px); overflow-y: auto; padding: 20px; background: #fff; border: 2px solid var(--orange); box-shadow: 0 8px 32px #0004; }
.code-panel-label { margin: 0 28px 12px 0; font-weight: 600; }
.code-panel-row { display: flex; align-items: center; gap: 10px; }
.code-panel-value { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 700 20px var(--mono); }
.code-panel-copy { flex: none; }
.code-panel-status { margin: 12px 0 0; font-size: 14px; }
.code-panel-close { position: absolute; right: 10px; top: 8px; border: 0; background: transparent; font-size: 27px; cursor: pointer; }
@media (max-width: 480px) { .code-panel { right: 10px; bottom: var(--panel-bottom, 10px); width: calc(100vw - 20px); padding: 16px; } .code-panel-row { flex-wrap: wrap; } }

/* Kauppasivu */
.shop-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: 16px 0 32px; border-bottom: 2px solid var(--rule-strong); }
.shop-head-text { min-width: 0; }
.shop-head h1 { font-size: clamp(28px, 3.2vw, 40px); margin: 0 0 10px; overflow-wrap: break-word; hyphens: auto; }
.shop-cats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; font-size: 14px; }
.shop-cats a { font-weight: 700; color: var(--navy); }
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.shop-aside { position: sticky; top: 120px; }
.howto { background: var(--navy); color: #dfe1f0; padding: 24px 26px; margin-top: 56px; }
.howto h2 { color: #fff; font-size: 19px; font-weight: 600; margin: 0 0 10px; }
.howto ol { margin: 0; padding-left: 20px; font-size: 15px; }
.howto li + li { margin-top: 4px; }
.h-aside { font-size: 19px; font-weight: 600; margin: 36px 0 0; padding-bottom: 8px; border-bottom: 2px solid var(--rule-strong); }
.shop-aside .shop-list { margin-top: 0; border-top: 0; }
.empty { display: flex; gap: 16px; align-items: flex-start; background: var(--white); border: 2px dashed var(--rule); padding: 22px; margin-top: 18px; }
.empty p { margin: 0 0 12px; }
.ic-empty { width: 36px; height: 36px; color: var(--orange); }

/* Leipäteksti */
.prose { max-width: 720px; }
.prose h2 { font-size: 24px; margin: 36px 0 12px; }
.prose p, .prose li { color: #2c2e40; }
.shop-text { margin-top: 64px; max-width: 700px; }
.shop-text h2 { border-bottom: 2px solid var(--rule-strong); padding-bottom: 10px; }
.prose-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 48px; }
.todo { background: #fff3cd; padding: 8px 12px; font-family: var(--mono); }

/* Top 50: numeroitu lista kuin hintalista */
.top50 { list-style: none; padding: 0; margin: 24px 0 0; border-top: 2px solid var(--rule-strong); }
.top50 li { border-bottom: 1px solid var(--rule); }
.top50 a { display: flex; align-items: center; gap: 18px; padding: 14px 4px; text-decoration: none; color: var(--ink); }
.top50 a:hover { background: var(--white); }
.rank { width: 46px; flex: none; font-weight: 700; font-stretch: 75%; font-size: 26px; color: var(--orange); text-align: right; }
.t-name { flex: 1; font-weight: 500; font-size: 18px; }
.t-count { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* A–Z */
.az { display: flex; flex-wrap: wrap; position: sticky; top: 104px; background: var(--paper); padding: 10px 0; z-index: 5; border-bottom: 1px solid var(--rule); }
.az a { min-width: 36px; text-align: center; padding: 6px 8px; text-decoration: none; font-weight: 600; font-size: 17px; color: var(--navy); }
.az a:hover { background: var(--navy); color: #fff; }
.az-group { scroll-margin-top: 170px; }
.az-group h2 { font-size: 32px; font-stretch: 80%; font-weight: 700; color: var(--orange); border-bottom: 2px solid var(--rule-strong); padding-bottom: 4px; margin: 32px 0 10px; }
.az-group ul { columns: 4 200px; column-gap: 28px; list-style: none; padding: 0; margin: 0; }
.az-group li { padding: 3px 0; break-inside: avoid; border-bottom: 1px dotted var(--rule); }
.az-group a { text-decoration: none; color: var(--ink); }
.az-group a:hover { color: var(--orange-ink); text-decoration: underline; }
.dot { display: inline-block; width: 7px; height: 7px; background: var(--green); vertical-align: middle; }

/* FAQ */
.faq { border-top: 2px solid var(--rule-strong); margin-top: 24px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 2px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; padding: 14px 0; color: var(--navy-ink); }

/* Footer */
.site-footer { background: var(--navy-ink); color: #c2c4dc; margin-top: 96px; padding: 56px 0 28px; font-size: 15px; border-top: 4px solid var(--orange); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h2 { color: #fff; font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 2px 0; }
.site-footer a { color: #c2c4dc; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.14); margin-top: 28px; padding-top: 16px; font-size: 13.5px; color: #9093b4; }
.footer-legal p { margin: 4px 0; }

/* Evästeilmoitus + toast */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 580px; margin: 0 auto; background: var(--white); border: 2px solid var(--ink); padding: 14px 16px; z-index: 50; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; font-size: 15px; }
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 260px; }
.consent div { display: flex; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140px); background: var(--ink); color: #fff; padding: 12px 18px; font-weight: 600; transition: transform .2s; z-index: 60; }
.toast.show { transform: translate(-50%, 0); }

/* Mobiili */
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; gap: 0; }
  .shop-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-row { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .brand img { width: 168px; }
  .search { max-width: none; flex-basis: 100%; }
  .search input { height: 40px; }
  .ic-search { top: 10px; }
  .main-nav a { padding: 9px 10px; font-size: 14px; }
  .hero { padding: 22px 0 26px; }
  .hero .lead { font-size: 16px; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .cat-tile { padding: 12px 10px; font-size: 15px; gap: 8px; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .offer { grid-template-columns: minmax(0, 1fr); }
  .offer-logo { padding: 16px 0 0 14px; place-items: start; }
  .offer-logo .logo-sm { width: 104px; height: 52px; }
  .offer-body { padding: 8px 14px 16px 14px; }
  .offer-stub { grid-column: 1 / -1; flex-direction: row; align-items: center; border-left: 0; border-top: 2px dashed var(--rule); padding: 12px 14px; }
  .offer-stub::before { top: -10px; left: -10px; clip-path: inset(0 0 0 50%); }
  .offer-stub::after { top: -10px; bottom: auto; left: auto; right: -10px; clip-path: inset(0 50% 0 0); }
  .tag { font-size: 28px; min-width: 70px; }
  .offer-stub .btn, .offer-stub .btn-code { flex: 1; }
  .shop-head { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
  .shop-head .logo-lg { width: 120px; height: 60px; }
  .shop-head h1 { font-size: 25px; }
  .shop-out { grid-column: 1 / -1; }
  .az { top: 128px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .h-section { font-size: 22px; overflow-wrap: break-word; }
  .btn { white-space: normal; text-align: center; }
  .empty { padding: 16px; gap: 12px; }
  .offer-stub { min-width: 0; }
  .offer-stub .btn-code { min-width: 0; }
}

@media (max-width: 640px) { .top50 a { gap: 12px; } .top50 .logo-sm { width: 88px; height: 44px; } .t-count { display: none; } }
.report { display: grid; gap: 8px; margin: 20px 0; max-width: 560px; }
.report label { font-weight: 600; }
.report input, .report textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; width: 100%; box-sizing: border-box; }
.report button { justify-self: start; margin-top: 4px; }
.report-status { margin: 0; color: var(--muted); }
.newsletter { background: var(--white); border: 1px solid var(--rule); border-radius: 12px; padding: 22px 24px; scroll-margin-top: 170px; }
.newsletter h2 { font-size: 20px; margin: 0 0 4px; color: var(--ink); }
.newsletter p { margin: 0 0 12px; color: var(--muted); }
.newsletter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-row input { flex: 1 1 220px; font: inherit; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; min-width: 0; }
.newsletter .newsletter-small { font-size: 13px; margin: 10px 0 0; }
.newsletter-status { margin: 8px 0 0 !important; font-weight: 600; color: var(--green) !important; }
.newsletter-status:empty { display: none; }
.newsletter-footer { margin-bottom: 40px; }
.newsletter-shop { margin: 32px 0; padding: 24px 26px; border-radius: 0; }
.newsletter-shop h2 { font-size: 19px; }
.newsletter-shop > p:first-of-type { font-size: 15px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
