/* Bokaförråd – en stilmall för hela sajten */

@font-face {
  font-family: "Figtree";
  src: url(/static/fonts/figtree-latin.woff2) format("woff2");
  font-weight: 300 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  src: url(/static/fonts/figtree-latin-ext.woff2) format("woff2");
  font-weight: 300 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f6f5f0;
  --surface: #ffffff;
  --surface-2: #efede6;
  --ink: #13201b;
  --muted: #5a6661;
  --line: #e2dfd6;
  --brand: #0f6e5a;
  --brand-strong: #0a5545;
  --brand-soft: #e1f0ea;
  --accent: #ffb321;
  --accent-strong: #f29f00;
  --accent-ink: #1d1600;
  --accent-soft: #fff3d6;
  --focus: #1a73e8;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(19, 32, 27, .06), 0 8px 24px rgba(19, 32, 27, .07);
  --shadow-lg: 0 2px 6px rgba(19, 32, 27, .08), 0 24px 60px rgba(19, 32, 27, .16);
  --header-h: 64px;
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
/* mörkt läge gäller bara när DARK_MODE i sitegen/config.py sätter data-dark på <html> */
@media (prefers-color-scheme: dark) {
  :root[data-dark] {
    --bg: #0f1513;
    --surface: #161e1b;
    --surface-2: #1d2824;
    --ink: #e7eeea;
    --muted: #9aa8a2;
    --line: #2a3632;
    --brand: #3dbd99;
    --brand-strong: #5fd0b0;
    --brand-soft: #173a31;
    --accent: #ffbf47;
    --accent-strong: #ffcf70;
    --accent-soft: #3a2f14;
    --focus: #8ab4f8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.eyebrow { font-size: .85rem; font-weight: 650; color: var(--brand); letter-spacing: .02em; margin-bottom: .6em; }
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); color: var(--muted); max-width: 46em; }
.hl { color: var(--brand); }

/* ---------- knappar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 1.15em; border-radius: 999px; border: 1px solid transparent;
  font: 650 1rem/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.btn-accent:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { min-height: 36px; font-size: .9rem; padding: 0 .95em; }
.btn-block { display: flex; width: 100%; }
.facility .btn:not(.btn-sm) { max-width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-block: .6em; }  /* "Se lediga förråd hos Prinsens Lager →" får brytas på smal skärm */
.link-arrow { font-weight: 650; text-decoration: none; }
.link-arrow::after { content: " →"; }

/* ---------- sidhuvud ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--brand); text-decoration: none; }
.logo img { display: block; width: auto; height: 47px; }  /* logotypen C1, original i Drive under Logotyp. 47 px ger 152 px bredd (normalt minst 150) och frizon inom sidhuvudets 64 px */
.nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 550; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); }
.nav-cta a { border: 1px solid var(--line); margin-left: 6px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); width: 44px; height: 44px; padding: 10px; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav ul {
    position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 12px 16px; box-shadow: var(--shadow);
    display: none;
  }
  .nav.open ul { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
  .nav-cta a { margin: 6px 0 0; text-align: center; }
}

.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 14px 0 0; margin: 0; font-size: .875rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; opacity: .5; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- hjälte och sektioner ---------- */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(18px, 3vw, 28px); }
.hero-tight { padding-top: clamp(16px, 3vw, 32px); }
.hero h1 { max-width: 15em; }
.section { padding: clamp(40px, 6vw, 80px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.split-wide { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 860px) { .split, .split-wide { grid-template-columns: 1fr; } }
.narrow { max-width: 760px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step h2 { font-size: 1.15rem; margin-top: 14px; }
.step p { color: var(--muted); margin: 0; }
.step-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.size-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0 24px; }
.size-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.size-tile:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-2px); }
.size-tile b { font-size: 1.3rem; font-weight: 800; color: var(--brand); }
.size-tile span { color: var(--muted); font-size: .92rem; }

.city-grid, .op-grid, .guide-grid, .link-cloud { list-style: none; margin: 0; padding: 0; }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.city-grid a, .op-grid a, .guide-grid a {
  display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.city-grid a:hover, .op-grid a:hover, .guide-grid a:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); }
.city-grid span, .op-grid span, .guide-grid span { font-size: .875rem; color: var(--muted); }
.section-alt .city-grid a, .section-alt .op-grid a { background: var(--bg); }
.city-grid .is-empty a { background: transparent; border-style: dashed; }  /* kommuner utan förråd; full kontrast på texten */
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.op-grid small { color: var(--muted); margin-top: 6px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.guide-grid b { font-size: 1.05rem; }
.link-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.link-cloud a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.link-cloud a:hover { border-color: var(--brand); }
.more-links { margin-top: 18px; }

/* ---------- sökverktyget ---------- */
.finder { position: relative; }
.finder-bar {
  position: sticky; top: var(--header-h); z-index: 30;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px max(20px, calc((100vw - 1240px) / 2 + 20px));
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
}
.search { position: relative; flex: 1 1 380px; max-width: 560px; display: flex; align-items: center; }
.search-icon { position: absolute; left: 16px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 52px; padding: 0 128px 0 46px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font: 500 1.05rem var(--font); box-shadow: var(--shadow); appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.locate {
  position: absolute; right: 6px; height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 0;
  display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; font: 650 .92rem var(--font); cursor: pointer;
}
.locate svg { width: 18px; height: 18px; }
.locate:hover { background: var(--brand-strong); }
.locate.is-busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.suggest {
  position: absolute; top: 58px; left: 0; right: 0; z-index: 50; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); max-height: 360px; overflow: auto;
}
.suggest li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.suggest li small { color: var(--muted); white-space: nowrap; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--surface-2); }
.filters { position: relative; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip, .select-chip select {
  height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: 550 .92rem var(--font); cursor: pointer;
}
.chip:hover, .select-chip select:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.select-chip select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.select-sort { margin-left: auto; }
.filters .seg { margin-right: 4px; }
@media (max-width: 760px) {
  .finder-bar { padding: 10px 16px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; width: calc(100% + 32px); }
  .filters::-webkit-scrollbar { display: none; }
  .filters > * { flex: 0 0 auto; }
  .select-sort { margin-left: 0; }
  .seg-help { align-self: center; }
  .search input { height: 48px; font-size: 1rem; }
  .locate span { display: none; }
  .locate { padding: 0 11px; }
  .search input { padding-right: 56px; }
}

.finder-body { display: grid; grid-template-columns: minmax(360px, 460px) 1fr; height: calc(100vh - var(--header-h) - 76px); min-height: 520px; border-bottom: 1px solid var(--line); }
/* sökrutan och raden med storlekar under varandra: lika breda, så breda som raden behöver men aldrig bredare än skärmen */
@media (min-width: 761px) and (max-width: 1060px) {
  .finder-bar { display: grid; grid-template-columns: fit-content(100%); }
  .search { max-width: none; }
  .finder-body { height: calc(100vh - var(--header-h) - 127px); }  /* baren har två rader */
}
.results { overflow-y: auto; padding: 16px 16px 24px max(20px, calc((100vw - 1240px) / 2 + 20px)); overscroll-behavior: contain; }
.results-head { padding: 4px 4px 12px; }
.results-head h2 { font-size: 1.25rem; margin: 0 0 2px; }
.results-sub { margin: 0; font-size: .9rem; color: var(--muted); }
.results-sub a { font-weight: 650; }
.results-how { margin: 2px 0 0; font-size: .78rem; color: var(--muted); }
.results-how a { color: var(--muted); }
.map-wrap { position: relative; background: var(--surface-2); }
.map-wrap .map { position: absolute; inset: 0; }
.map-placeholder { position: absolute; inset: 0; background:
  radial-gradient(circle at 30% 40%, var(--brand-soft) 0 8%, transparent 9%),
  repeating-linear-gradient(0deg, transparent 0 46px, var(--line) 46px 47px),
  repeating-linear-gradient(90deg, transparent 0 46px, var(--line) 46px 47px); opacity: .5; pointer-events: none; transition: opacity .4s; }
.map-ready .map-placeholder { opacity: 0; }
.view-toggle { display: none; }

@media (max-width: 860px) {
  .finder-body { display: block; height: auto; min-height: 0; border-bottom: 0; }
  .results { overflow: visible; padding: 12px 16px 96px; }
  .map-wrap { position: fixed; inset: calc(var(--header-h) + var(--bar-h, 118px)) 0 0 0; z-index: 20; display: none; }
  .finder[data-view="map"] .map-wrap { display: block; }
  .finder[data-view="map"] .results { visibility: hidden; height: 0; overflow: hidden; padding: 0; }
  .view-toggle {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; z-index: 35; left: 50%; transform: translateX(-50%);
    bottom: calc(18px + env(safe-area-inset-bottom)); height: 48px; padding: 0 20px; border-radius: 999px; border: 0;
    background: var(--ink); color: var(--bg); font: 700 .98rem var(--font); box-shadow: var(--shadow-lg); cursor: pointer;
  }
  .view-toggle svg { width: 20px; height: 20px; }
  .finder:not(.in-view) .view-toggle { display: none; }
  /* kartans upphovsrättsrad ovanför knappen Visa lista */
  .map-wrap .maplibregl-ctrl-bottom-left, .map-wrap .maplibregl-ctrl-bottom-right { bottom: calc(74px + env(safe-area-inset-bottom)); }
}

/* ---------- kort ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.card {
  position: relative; display: flex; gap: 12px; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s;
}
.card:hover, .card.is-active { border-color: var(--brand); box-shadow: var(--shadow); }
.card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); }
.card-main:hover { color: var(--ink); }
.card-main::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-top { display: flex; align-items: center; gap: 8px; }
.card-title { font-weight: 700; font-size: 1.04rem; line-height: 1.25; }
.card-addr { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist { font-size: .82rem; color: var(--muted); font-weight: 600; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-size: .76rem; font-weight: 700; letter-spacing: .01em; }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.feats { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: .8rem; color: var(--muted); }
.feats span::before { content: "✓ "; color: var(--brand); font-weight: 800; }
.card-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; text-align: right; }
.price { display: block; line-height: 1.1; white-space: nowrap; }
.price b { font-size: 1.12rem; font-weight: 800; }
.price small { color: var(--muted); font-size: .78rem; }
.price-none small { display: block; max-width: 7em; white-space: normal; }
.more { width: 100%; margin-top: 12px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.cards-compact .card { padding: 12px; }

/* ---------- kartnålar ---------- */
.pin {
  font: 750 .82rem/1 var(--font); padding: 6px 9px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.06);
  white-space: nowrap; transition: transform .12s, background .12s;
}
.pin-dot { width: 16px; height: 16px; padding: 0; background: var(--brand); border: 3px solid #fff; }
.pin:hover, .pin.is-active { background: var(--ink); color: var(--bg); transform: scale(1.12); }
.pin-dot.is-active, .pin-dot:hover { background: var(--accent); }
/* kluster i samma storlekar och färger som när de ritades i kartbilden */
.cluster { display: grid; place-items: center; padding: 0; border-radius: 50%; border: 3px solid rgba(255,255,255,.9); cursor: pointer;
  background: var(--brand); color: #fff; font: 750 .82rem/1 var(--font); transition: transform .12s, background .12s; }
.cluster-s { width: 36px; height: 36px; }
.cluster-m { width: 44px; height: 44px; }
.cluster-l { width: 54px; height: 54px; }
.cluster:hover, .cluster.is-active { background: var(--ink); color: var(--bg); transform: scale(1.1); }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26,115,232,.25); }
.maplibregl-ctrl-attrib { font-size: 11px; }

/* ---------- lådan med anläggning och bokning ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 59; background: rgba(10, 16, 14, .35); }
.drawer {
  position: fixed; z-index: 60; top: calc(var(--header-h) + 12px); bottom: 12px; left: max(12px, calc((100vw - 1240px) / 2 + 12px));
  width: min(480px, calc(100vw - 24px)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  animation: slide-in .22s ease-out;
}
@keyframes slide-in { from { transform: translateX(-16px); opacity: 0; } }
@media (max-width: 860px) {
  .drawer { inset: auto 0 0 0; top: 6vh; width: 100%; border-radius: 22px 22px 0 0; animation: slide-up .25s ease-out; padding-bottom: env(safe-area-inset-bottom); }
  @keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }
}
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.35rem; margin: 6px 0 2px; }
.drawer-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.drawer-close { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.3rem; cursor: pointer; }
.drawer-body { padding: 16px 20px 24px; }
.drawer-body h3 { font-size: 1rem; margin: 18px 0 8px; }
.drawer-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- storleksval och bokning ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--ink); font: 600 .9rem var(--font); cursor: pointer; white-space: nowrap; }
.seg button:hover { background: var(--surface-2); }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.seg-help { font-size: .88rem; font-weight: 600; white-space: nowrap; }
.book-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.book-price { margin: 0 0 12px; }
.book-price b { font-size: 1.6rem; font-weight: 850; }
.book-price small { color: var(--muted); }
.book-note { font-size: .84rem; color: var(--muted); margin: 10px 0 0; }
.book-camp { font-size: .84rem; color: var(--muted); margin: -4px 0 12px; }
.book-camp .tag { color: var(--ink); }
.book-cta { font-size: 1.05rem; min-height: 52px; }
.unit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.unit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.unit-row.is-pick { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.u-size b { display: block; font-weight: 750; }
.u-size small { color: var(--muted); font-size: .82rem; }
.u-price { text-align: right; white-space: nowrap; }
.u-price b { font-weight: 800; }
.u-price small { color: var(--muted); font-size: .8rem; }
.unit-row .u-camp { grid-column: 1 / -1; justify-self: start; margin-top: -4px; }  /* egen rad, så att storlek och pris får plats på mobil */
.unit-row .btn { min-width: 72px; }
.units-empty p { color: var(--muted); }
.show-units { margin-top: 8px; }
.unit-row.is-full { opacity: .65; }
.unit-group { margin: 10px 0 0; font-size: .85rem; font-weight: 700; color: var(--muted); }  /* vinförvaring, skåp och boxar under 1 m² sist i listan */
.tag-full { background: var(--surface-2); color: var(--muted); padding: 4px 9px; }

.partners { display: grid; gap: 8px; }
.partner { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.partner:hover { border-color: var(--brand); color: var(--ink); }
.partner-icon { flex: 0 0 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.partner-icon svg { width: 20px; height: 20px; }
.partner b { display: block; font-size: .95rem; }
.partner small { display: block; color: var(--muted); font-size: .84rem; }
.ad-label { position: absolute; top: 6px; right: 8px; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- anläggningssidan ---------- */
.facility { padding-top: 18px; padding-bottom: 56px; }
.facility-head { margin-bottom: 24px; }
.facility-head h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); margin: 10px 0 6px; }
.facility-addr { font-size: 1.08rem; color: var(--muted); }
.feat-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.feat-list li { padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; font-weight: 550; }
.feat-list li::before { content: "✓ "; color: var(--brand); font-weight: 800; }
.facility-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.facility-side { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 20px; }
.side-partners h2 { font-size: 1.05rem; margin-bottom: 10px; }
@media (max-width: 960px) {
  .facility-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facility-side { display: contents; }  /* pris och boka först, flyttips efter pristabellen */
  .facility-side .book-panel { order: -1; margin-bottom: 20px; }
  .side-partners { order: 2; margin-bottom: 20px; }
  /* över hela sidan såg knappen ut som ett sökfält: centrerad med sin egen bredd, och texten runt den centrerad */
  .book-panel { text-align: center; }
  .book-panel .book-cta.btn-block { width: fit-content; margin-inline: auto; }
}
@media (max-width: 560px) {
  .book-panel { text-align: left; }
  .book-panel .book-cta.btn-block { width: 100%; }  /* på mobil hela bredden, lätt att träffa */
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); margin-bottom: 20px; }
.panel h2 { font-size: 1.3rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 24px; margin: 0 0 20px; }
.facts dt { font-size: .82rem; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.terms { display: grid; gap: 12px; margin: 0 0 14px; }
.terms dt { font-size: .82rem; color: var(--muted); font-weight: 600; }
.terms dd { margin: 0; }
@media (min-width: 640px) { .terms > div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; } .terms dt { padding-top: 2px; } }
.mini-map { position: relative; height: 260px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.mini-map > .btn { position: absolute; z-index: 3; left: 10px; bottom: 10px; background: var(--surface); }
.note, .source-note { font-size: .85rem; color: var(--muted); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--accent-soft); font-size: .78rem; font-weight: 650; }

/* ---------- tabeller ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
caption { text-align: left; padding: 12px 14px 0; color: var(--muted); font-size: .85rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { font-size: .8rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 650; }
.price-matrix td, .price-matrix th { white-space: nowrap; }
.county-table th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }  /* kommunen syns när man rullar i sidled */
.county-table td.muted { white-space: normal; min-width: 12em; }
.op-table td:not(:last-child), .op-table th { white-space: nowrap; }  /* jämförelsen av företagen; uppsägningen får bryta rad */
.op-table td:last-child { min-width: 16em; }
.op-table th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }  /* företaget syns när man rullar i sidled */

/* ---------- vanliga frågor ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 32px 14px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.5rem; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq summary h3 { display: inline; font-size: 1.02rem; margin: 0; }
.faq p { color: var(--muted); margin: 0 0 16px; }

/* ---------- artiklar ---------- */
.article { max-width: 780px; padding-top: 18px; padding-bottom: 64px; }
.article-head { margin-bottom: 28px; }
.article-head h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
.prose { font-size: 1.06rem; }
.prose h2 { margin-top: 1.8em; }
.prose > h2:first-child { margin-top: 0; }  /* i två kolumner ligger rubrikerna då på samma rad */
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose table { margin: 1em 0; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.prose blockquote p:last-child { margin: 0; }
.article-cta { margin: 40px 0; padding: 24px; border-radius: var(--radius); background: var(--brand); color: #fff; }
.article-cta h2 { color: #fff; margin-bottom: 6px; }
.article-cta p { color: rgba(255,255,255,.85); }
.article-more { margin-top: 32px; }

/* ---------- sidfot ---------- */
.site-footer { background: #0f1b17; color: #c9d3cf; padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: #e7eeea; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: #8fa39b; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: .95rem; }
.footer-brand p { max-width: 30em; font-size: .95rem; margin-top: 12px; }
.footer-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid #22322c; font-size: .82rem; color: #8fa39b; }
.footer-legal p { margin: 0 0 6px; }
.footer-legal a { color: #b8c6c0; text-decoration: underline; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; width: max-content; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 550; max-width: calc(100vw - 32px); }
.toast:empty { padding: 0; box-shadow: none; }  /* tom men kvar, så att skärmläsare hör nästa meddelande */

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.linklike { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
@media (max-width: 600px) {
  .page-home .hero { padding: 18px 0 10px; }
  .page-home .hero .eyebrow { display: none; }
  .page-home .hero .lead { font-size: .98rem; margin-bottom: 4px; }
  .hero-tight { padding-bottom: 8px; }
}
.ad-tag { display: inline-block; font-size: .68rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 4px; }

/* ---------- nyckeltal och billigaste per storlek ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0 0; max-width: 900px; }
.kpis div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.kpis dt { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpis dd { margin: 2px 0 0; font-size: 1.3rem; font-weight: 800; }
@media (max-width: 700px) { .kpis { grid-template-columns: 1fr 1fr; } .kpis dd { font-size: 1.1rem; } }
.lead-sm { font-size: 1.02rem; margin-bottom: 20px; }
.cheap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cheap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.cheap h3 { margin-bottom: 8px; }
.cheap-list { list-style: none; margin: 0; padding: 0; display: grid; }
.cheap-list li { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "name price btn" "meta price btn"; gap: 0 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.cheap-list li:first-child { border-top: 0; }
.cheap-name { grid-area: name; font-weight: 650; color: var(--ink); text-decoration: none; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cheap-name:hover { text-decoration: underline; color: var(--ink); }
.cheap-meta { grid-area: meta; font-size: .8rem; color: var(--muted); }
.cheap-price { grid-area: price; text-align: right; white-space: nowrap; }
.cheap-price b { font-weight: 800; }
.cheap-price small { color: var(--muted); font-size: .78rem; }
.cheap-list .btn { grid-area: btn; }
.diff { font-size: .78rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.diff.up { color: #b45309; }
.diff.down { color: var(--brand); }
.price .per-m2 { display: block; font-weight: 650; color: var(--brand); }

/* ---------- reservation ---------- */
.reserve-mount { margin-top: 14px; }
.reserve { border: 1.5px solid var(--brand); border-radius: var(--radius); padding: 16px; background: var(--surface); }
.reserve h3 { margin: 0 0 4px; }
.reserve .book-note { margin: 0 0 12px; }
.reserve-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.reserve-grid label, .consent { font-size: .85rem; font-weight: 600; color: var(--muted); }
.reserve-grid .wide { grid-column: 1 / -1; }
.reserve-grid input, .reserve-grid select, .reserve-grid textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: 500 1rem var(--font);
}
.reserve-grid input:focus, .reserve-grid select:focus, .reserve-grid textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.reserve-grid .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin-bottom: 12px; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--brand); }
.reserve-error { color: #b42318; font-weight: 600; margin: 0 0 10px; }
.reserve-done { border: 1.5px solid var(--brand); background: var(--brand-soft); border-radius: var(--radius); padding: 16px; }
.reserve-done h3 { margin: 0 0 4px; color: var(--brand); }
@media (max-width: 480px) { .reserve-grid { grid-template-columns: 1fr; } }

/* ---------- förenklad sökrad: storlek synlig, filter bakom en knapp ---------- */
.filter-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .92rem var(--font); cursor: pointer; }
.filter-btn svg { width: 16px; height: 16px; }
.filter-btn[aria-expanded="true"], .filter-btn:hover { border-color: var(--ink); }
.filter-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; }
.filter-panel { position: absolute; z-index: 45; top: calc(100% + 6px); right: max(20px, calc((100vw - 1240px) / 2 + 20px)); width: 340px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px; }
.filter-panel fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.filter-panel legend { font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.filter-actions { display: flex; justify-content: space-between; gap: 8px; }
.seg-sm button { height: 30px; font-size: .86rem; }
.finder-bar { position: sticky; }
.results-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sort { display: inline-flex; flex: 0 0 auto; padding: 2px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.sort button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--ink); font: 600 .85rem var(--font); cursor: pointer; }
.sort button:hover { background: var(--surface-2); }
.sort button[aria-checked="true"] { background: var(--ink); color: var(--bg); }  /* samma valda läge som storlekarna */
.results-how { margin: 14px 4px 0; font-size: .78rem; color: var(--muted); }
.results-how a { color: var(--muted); }
.feat-line { margin: 0 0 6px; font-size: .9rem; color: var(--muted); }
@media (max-width: 860px) {
  .filter-panel { position: absolute; top: 100%; bottom: auto; left: 0; right: 0; width: auto; border-radius: 0 0 20px 20px; padding: 16px 20px 18px; }
  .filter-actions .btn { flex: 1; min-height: 44px; }
}
@media (max-width: 760px) {
  .filters { flex-wrap: nowrap; overflow: visible; margin: 0; padding: 0; width: 100%; max-width: 560px; gap: 8px; }  /* lika bred som sökrutan */
  .filters .seg { flex: 1 1 auto; justify-content: space-between; }
  .filters .seg button { padding: 0 9px; }
  .long { display: none; }
  .seg-help { display: none; }
  .filter-btn { width: 40px; padding: 0; justify-content: center; position: relative; flex: 0 0 auto; }
  .filter-btn .filter-count { position: absolute; top: -4px; right: -4px; }
  .filter-panel { position: absolute; top: 100%; bottom: auto; left: 0; right: 0; border-radius: 0 0 20px 20px; padding: 16px 16px 18px; }
}
@media (max-width: 359px) { .filters .seg button { padding: 0 6px; } }  /* storlekarna ryms bredvid filterknappen */
.ts-box { margin: 0 0 12px; min-height: 0; }

/* ---------- filterpanelen: typ överst, kryssrutor med förklaring ---------- */
.seg-fill { display: flex; }
.seg-fill button { flex: 1; }
.check { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--line); cursor: pointer; }
.check:first-of-type, .check[hidden] + .check { border-top: 0; }
.check input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--brand); margin: 0; }
.check-text { flex: 1; display: flex; flex-direction: column; }
.check-text b { font-weight: 650; font-size: .95rem; }
.check-text small { color: var(--muted); font-size: .8rem; }
.check-n { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.check-n::before { content: "("; } .check-n::after { content: ")"; }
.check-n:empty::before, .check-n:empty::after { content: none; }
.filter-actions [data-filter-done] { margin-left: auto; }

/* ---------- storleksguiden: fem kort i samma skala ---------- */
.section-tight { padding-top: 12px; }
.size-cards { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.size-card { display: flex; flex-direction: column; height: 100%; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.size-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.unit-svg { width: 100%; height: auto; margin-bottom: 8px; }
.unit-svg .u-top { fill: var(--surface-2); stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.unit-svg .u-left { fill: var(--bg); stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.unit-svg .u-right { fill: var(--brand-soft); stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.unit-svg .u-door { fill: var(--accent); stroke: var(--ink); stroke-width: 1; }
.unit-svg .u-slat { stroke: var(--accent-ink); stroke-opacity: .35; stroke-width: 1; }
.unit-svg .u-person { fill: var(--ink); opacity: .7; }
.size-card-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.size-card-title { font-weight: 800; font-size: 1.1rem; }
.size-card-range { font-weight: 700; color: var(--brand); }
.size-card-ex { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.size-card-price { font-size: .88rem; font-weight: 650; margin-top: 6px; }
.size-card-cta { margin-top: auto; padding-top: 10px; font-size: .88rem; font-weight: 700; color: var(--brand); }
.size-card-cta::after { content: " →"; }
@media (max-width: 1000px) { .size-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .size-cards { grid-template-columns: 1fr; gap: 8px; }
  .size-card { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 10px 12px; }
  .unit-svg { margin: 0; }
  .size-card-cta { display: none; }
}
.size-cards-last { margin-bottom: 0; }
