:root {
  --red: #a3212b;
  --red-deep: #7c1820;
  --green: #1d5236;
  --green-deep: #133a26;
  --cream: #f4ead5;
  --cream-2: #e9dcc0;
  --ink: #2a1a14;
  --gold: #e0a93b;
  --muted: #6d5a4c;
  --stitch: rgba(244, 234, 213, .55);
  --radius: 14px;
  --mono: "Rubik Mono One", "Rubik", system-ui, sans-serif;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --sans: "Rubik", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--red);
  /* stickad rät-maska: små V:n i två toner */
  background-image:
    radial-gradient(ellipse 3px 5px at 25% 50%, rgba(0,0,0,.09) 60%, transparent 62%),
    radial-gradient(ellipse 3px 5px at 75% 50%, rgba(255,255,255,.06) 60%, transparent 62%);
  background-size: 12px 12px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, select, input { font: inherit; color: inherit; }

/* ---------- stickade band ---------- */
.knit-band {
  height: 88px;
  background-repeat: repeat-x;
  background-position: center;
  background-color: var(--green);
}
.knit-band.thin { height: 24px; background-color: var(--cream); }

/* ---------- header ---------- */
.site-head { background: var(--green); color: var(--cream); }
.head-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 16px 18px;
  display: flex;
  gap: 16px 24px;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
}
.logo { text-decoration: none; display: grid; line-height: 1; }
.logo-big {
  font-family: var(--mono);
  font-size: clamp(30px, 6vw, 58px);
  letter-spacing: -.02em;
  color: var(--cream);
  text-shadow: 3px 3px 0 var(--red), 6px 6px 0 var(--green-deep);
  margin: 6px 0;
  hyphens: manual;
}
.logo-small { font-family: var(--pixel); font-size: 14px; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }

.tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs a {
  font-family: var(--pixel);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px dashed var(--stitch);
  font-size: 15px;
}
.tabs a b { font-family: var(--sans); font-weight: 700; margin-left: 4px; opacity: .8; }
.tabs a.on { background: var(--cream); color: var(--red); border-style: solid; border-color: var(--cream); }

/* ---------- main ---------- */
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 16px 48px; }

.panel {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  box-shadow: 0 0 0 6px var(--cream), 0 0 0 8px var(--red-deep);
  outline: 2px dashed var(--red);
  outline-offset: -8px;
}

.controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 26px; }
.controls .group { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.controls .label { font-family: var(--pixel); font-size: 13px; color: var(--muted); margin-right: 2px; }
.chip {
  border: 2px solid var(--green);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--green);
  display: inline-flex; gap: 6px; align-items: center;
}
.chip:hover { background: rgba(29,82,54,.08); }
.chip.on { background: var(--green); color: var(--cream); }
.chip .dir { font-family: var(--pixel); font-size: 12px; }
.search {
  flex: 1 1 200px;
  min-width: 0;
  border: 2px solid var(--green);
  border-radius: 999px;
  padding: 7px 14px;
  background: #fffaf0;
}
select.chip { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%); background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }

.count { font-family: var(--pixel); color: var(--cream); margin: 0 0 12px; font-size: 14px; }

/* ---------- kort ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.card {
  background: var(--cream);
  border-radius: var(--radius);
  text-decoration: none;
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 0 var(--red-deep);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card::after { /* söm */
  content: ""; position: absolute; inset: 5px; border: 2px dashed rgba(163,33,43,.35); border-radius: 10px; pointer-events: none;
}
.card:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 9px 0 var(--red-deep); }
.card .thumb { background: var(--cream-2); aspect-ratio: 3/4; height: 100%; width: 104px; object-fit: cover; }
.card .thumb.bottle { object-fit: contain; background: #fff; padding: 8px 4px; }
.card .body { padding: 12px 14px 12px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card h3 { margin: 0; font-size: 16px; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.card .meta { font-size: 12.5px; color: var(--muted); }
.card .row { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: auto; }
.card .nums { display: grid; gap: 3px; font-size: 13px; }
.card .price { font-weight: 700; font-size: 15px; }
.card .mini { width: 64px; height: 64px; flex: none; }
.rank {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: var(--red); color: var(--cream); font-family: var(--pixel); font-size: 12px;
  padding: 3px 7px; border-radius: 6px; box-shadow: 0 2px 0 var(--red-deep);
}

.badge {
  display: inline-block; font-family: var(--pixel); font-size: 11px; line-height: 1;
  padding: 4px 6px 3px; border-radius: 5px; background: var(--green); color: var(--cream);
  white-space: nowrap;
}
.badge.gold { background: var(--gold); color: var(--ink); }
.badge.ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--cream-2); }

/* stickade betyg: snöflingor */
.flakes { display: inline-flex; gap: 1px; vertical-align: middle; }
.flakes svg { width: 15px; height: 15px; }
.flakes .off { opacity: .2; }
.score { font-weight: 700; font-size: 13px; margin-left: 4px; }

/* ---------- sektionsrubriker ---------- */
.sec-title {
  font-family: var(--mono); color: var(--cream); font-size: clamp(20px, 3.4vw, 30px);
  margin: 38px 0 6px; text-shadow: 3px 3px 0 var(--red-deep);
}
.sec-title:first-child { margin-top: 0; }
.sec-lead { color: var(--cream); opacity: .9; margin: 0 0 18px; max-width: 70ch; line-height: 1.5; }

.reasons { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12.5px; display: grid; gap: 3px; }
.reasons li::before { content: "✶ "; color: var(--red); }

/* ---------- detaljsida ---------- */
.back { display: inline-block; font-family: var(--pixel); color: var(--cream); margin-bottom: 18px; text-decoration: none; }
.back:hover { text-decoration: underline; }
.detail { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 28px; align-items: start; }
.detail .hero { border-radius: var(--radius); overflow: hidden; background: var(--cream-2); box-shadow: 0 0 0 6px var(--cream), 0 10px 0 6px var(--red-deep); }
.detail .hero img { width: 100%; height: auto; }
.detail .hero.bottle img { background: #fff; padding: 24px; max-height: 520px; object-fit: contain; }
.detail h1 { font-family: var(--mono); font-size: clamp(22px, 4vw, 36px); line-height: 1.1; margin: 0 0 8px; }
.detail .facts { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; margin: 6px 0 14px; }
.detail .facts b { color: var(--ink); }
.big-score { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; }
.big-score .num { font-family: var(--mono); font-size: 44px; color: var(--red); line-height: 1; }
.big-score .flakes svg { width: 24px; height: 24px; }
.sb-btn {
  display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 4px;
  background: var(--green); color: var(--cream); text-decoration: none; font-weight: 700;
  padding: 11px 18px; border-radius: 999px; box-shadow: 0 4px 0 var(--green-deep);
}
.sb-btn:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--green-deep); }
.sb-btn.off { background: var(--cream-2); color: var(--muted); box-shadow: none; pointer-events: none; }

.spider-wrap { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 12px 20px; align-items: center; }
.spider-wrap svg { width: 100%; height: auto; overflow: visible; }
.legend { display: grid; gap: 8px; font-size: 13.5px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 22px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .note { color: var(--muted); font-size: 12.5px; line-height: 1.4; }

.timeline { margin-top: 28px; display: grid; gap: 14px; }
.tasting { display: grid; grid-template-columns: 70px 1fr; gap: 14px; padding-top: 14px; border-top: 2px dashed var(--cream-2); }
.tasting .yr { font-family: var(--mono); color: var(--green); font-size: 18px; }
.tasting .yr small { display: block; font-family: var(--pixel); font-size: 11px; color: var(--muted); margin-top: 4px; }
.tasting p { margin: 6px 0 0; line-height: 1.55; white-space: pre-line; }
.tasting .pics { display: flex; gap: 8px; margin-top: 8px; }
.tasting .pics img { width: 64px; height: 84px; object-fit: cover; border-radius: 8px; }
.taste-txt { line-height: 1.55; margin: 10px 0; }

.empty { color: var(--cream); font-family: var(--pixel); padding: 30px 0; }

/* ---------- footer ---------- */
.site-foot { background: var(--green); color: var(--cream); }
.site-foot p { max-width: 1180px; margin: 0 auto; padding: 18px 16px; font-size: 13px; opacity: .85; }

@media (max-width: 760px) {
  .detail { grid-template-columns: 1fr; }
  .detail .hero { max-width: 340px; }
  .spider-wrap { grid-template-columns: 1fr; }
  .knit-band { height: 64px; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { .card, .sb-btn { transition: none; } }
.card .nums { min-width: 0; }
.card .nums > span:last-child { display: flex; flex-wrap: wrap; gap: 4px; }
.card .row { position: static; }
.card .mini:not(:empty) {
  position: absolute; left: 10px; bottom: 12px; width: 72px; height: 72px; padding: 4px;
  background: rgba(244,234,213,.94); border-radius: 50%; box-shadow: 0 0 0 2px var(--red), 0 3px 0 2px var(--red-deep);
}

/* ---------- annons ---------- */
.ad { margin: 34px 0 6px; position: relative; }
.ad.in-grid { grid-column: 1 / -1; margin: 6px 0; }
.ad-label {
  display: inline-block; font-family: var(--pixel); font-size: 11px; color: var(--cream);
  opacity: .75; margin-bottom: 6px; letter-spacing: .06em;
}
.ad a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 4px var(--cream), 0 8px 0 4px var(--red-deep); transition: transform .15s ease; }
.ad a:hover { transform: translateY(-2px); }
.ad img { width: 100%; height: auto; }
@media (max-width: 700px) { .ad img { aspect-ratio: 900 / 1040; } }

.rank.gold { background: var(--gold); color: var(--ink); box-shadow: 0 2px 0 #a8791f; }
.sec-title small { font-family: var(--pixel); font-size: 14px; opacity: .8; margin-left: 6px; text-shadow: none; }

/* ---------- intern lista ---------- */
.ilist { display: grid; gap: 0; padding: 8px 16px; }
.irow {
  display: grid; grid-template-columns: 34px 44px minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 2px dashed var(--cream-2); text-decoration: none;
}
.irow:last-child { border-bottom: 0; }
.irow:hover { background: rgba(163,33,43,.05); }
.irow.dim { opacity: .5; }
.irank { font-family: var(--mono); color: var(--red); font-size: 15px; text-align: right; }
.irow img { width: 44px; height: 60px; object-fit: contain; background: #fff; border-radius: 6px; }
.iname { display: grid; gap: 2px; min-width: 0; }
.iname b { font-size: 15px; overflow-wrap: anywhere; }
.iname small { color: var(--muted); font-size: 12.5px; }
.iname .ireasons { color: var(--red); }
.itags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: end; max-width: 240px; }
.iprice { font-weight: 700; white-space: nowrap; }
@media (max-width: 700px) {
  .irow { grid-template-columns: 28px 40px minmax(0, 1fr) auto; }
  .itags { grid-column: 3 / -1; justify-content: start; max-width: none; }
}

/* ================= om ================= */
.site-foot a { color: var(--cream); }
.about-hero { margin: 0 0 26px; border-radius: var(--radius); overflow: hidden; border: 3px dashed var(--stitch); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.about-hero img { display: block; width: 100%; height: auto; }
.about { max-width: 760px; }
.about .sec-lead a { color: var(--gold); }
.threads { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.threads a {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--cream); color: var(--ink); text-decoration: none;
  border-radius: var(--radius); border: 3px solid var(--green);
  box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 5px var(--stitch);
}
.threads a:hover { background: #fff8e8; }
.threads b { font-family: var(--mono); color: var(--red); font-size: 20px; font-weight: 400; }
.threads span { flex: 1; line-height: 1.35; }
.threads i { font-style: normal; font-weight: 700; color: var(--green); }
.btn-x {
  display: inline-block; padding: 12px 20px; border-radius: 999px;
  background: var(--green); color: var(--cream); text-decoration: none;
  font-family: var(--pixel); font-size: 15px; border: 2px dashed var(--stitch);
}
.btn-x:hover { background: var(--green-deep); }

/* ================= säsongens avbockning ================= */
.rank.done { background: var(--green); box-shadow: 0 2px 0 var(--green-deep); }
.card.is-done .thumb { filter: saturate(.55); }
.progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--cream); font-family: var(--pixel); font-size: 14px; margin: 0 0 22px; }
.progress b { font-family: var(--mono); font-weight: 400; font-size: 18px; }
.progress .bar { flex: 1; min-width: 160px; height: 14px; border-radius: 7px; background: rgba(0,0,0,.25); border: 2px dashed var(--stitch); overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--cream); }

/* ================= SEO: intro + förrenderat innehåll (ersätts av appen) ================= */
.intro { width: 100%; max-width: 1180px; margin: 0 auto; padding: 26px 16px 0; color: var(--cream); }
.intro h1 { font-family: var(--mono); font-weight: 400; font-size: clamp(20px, 3.4vw, 32px); line-height: 1.15; margin: 0 0 8px; text-shadow: 2px 2px 0 var(--red-deep); }
.intro p { margin: 0; max-width: 75ch; line-height: 1.5; opacity: .92; }
.intro a { color: var(--gold); }
.seo-list { color: var(--cream); line-height: 1.5; padding-left: 22px; }
.seo-list li { margin-bottom: 8px; }
.seo-list a { color: var(--cream); }
.seo-list span { opacity: .8; }
.seo-beer { padding: 20px; }
.seo-beer h1 { font-family: var(--mono); font-weight: 400; margin: 0 0 8px; }
