/* ── Design tokens — Ivoire (default) ───────────────────────── */
:root {
  --bg: #F0EADE;
  --bg-raised: #FAF6EC;
  --bg-deep: #14110D;
  --ink: #1B1814;
  --ink-soft: #5A5246;
  --ink-mute: #8A8275;
  --hair: rgba(27, 24, 20, .12);
  --hair-strong: rgba(27, 24, 20, .22);
  --accent: #5C6A3F;
  --accent-soft: #8B9462;
  --gold: #B89254;
  --bg-deep-ink: #EFE6D2;
  --bg-deep-mute: #A89E88;
  --radius: 14px;
  --pad: clamp(20px, 3vw, 40px);
  --maxw: 1280px;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, monospace;

  /* legacy compat */
  --text-primary: var(--ink);
  --text-secondary: var(--ink-soft);
  --text-meta: var(--ink-mute);
  --border: var(--hair-strong);
  --bg-card: var(--bg-raised);
  --bg-section: var(--bg);
  --bg-subtle: var(--bg);
  --espresso: var(--bg-deep);
  --warm-beige: var(--gold);
  --terracotta: #b8795b;
  --max-width: var(--maxw);
  --heading-font: var(--font-display);
  --body-font: var(--font-body);
  --shadow-card: none;
  --shadow-hover: none;
  --radius-sm: 8px;
  --radius-md: 8px;
  --radius-lg: var(--radius);
  --radius-xl: var(--radius);
  --radius-full: 999px;
}

[data-theme="minuit"] {
  --bg: #14110D;
  --bg-raised: #1E1A14;
  --bg-deep: #0A0805;
  --ink: #EFE6D2;
  --ink-soft: #B5AB95;
  --ink-mute: #7B7460;
  --hair: rgba(239, 230, 210, .12);
  --hair-strong: rgba(239, 230, 210, .25);
  --accent: #C9A567;
  --accent-soft: #8E7843;
  --gold: #E2C078;
  --bg-deep-ink: #EFE6D2;
  --bg-deep-mute: #A89E88;
}

[data-theme="atelier"] {
  --bg: #FAF4EA;
  --bg-raised: #FFFCF6;
  --bg-deep: #2A1E18;
  --ink: #1F1612;
  --ink-soft: #6B564A;
  --ink-mute: #A0907D;
  --hair: rgba(31, 22, 18, .10);
  --hair-strong: rgba(31, 22, 18, .22);
  --accent: #C24C2C;
  --accent-soft: #E69372;
  --gold: #2E5C3E;
  --bg-deep-ink: #FAF4EA;
  --bg-deep-mute: #B8A893;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 400; letter-spacing: -.01em; }
h1 { font-size: clamp(48px, 7vw, 92px); line-height: .96; }
h2 { font-size: clamp(36px, 4.5vw, 60px); line-height: 1.02; }
h3 { font-size: 28px; line-height: 1.1; }
p { margin: 0; }

/* ── Typography helpers ─────────────────────────────────────── */
.serif { font-family: var(--font-display); font-weight: 400; letter-spacing: -.005em; }
.mono { font-family: var(--font-mono); font-weight: 400; letter-spacing: .02em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
/* Förklarande text bredvid en eyebrow-rubrik: samma dämpade ton, men gemen
   och ospärrad så den läses som en mening och inte som en till rubrik. */
.eyebrow-note {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11.5px;
  margin-left: 6px;
}
.num-display {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: .85;
  letter-spacing: -.03em;
  font-feature-settings: "lnum";
}
.ink-soft { color: var(--ink-soft); }
.ink-mute { color: var(--ink-mute); }
.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;
}

/* ── Shell ──────────────────────────────────────────────────── */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app {
  width: min(var(--maxw), calc(100vw - 48px));
  margin: 0 auto;
  padding-bottom: 80px;
  flex: 1;
}
.page { flex: 1; width: min(var(--maxw), calc(100vw - 48px)); margin: 0 auto; padding: 32px var(--pad) 8px; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1100; /* above the filter bar (1001) and Leaflet panes so content scrolls under the menu */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px var(--pad);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
}
.brand .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-3px);
  flex-shrink: 0;
  align-self: center;
}
.brand-mark { display: none; } /* legacy, replaced by .dot */

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav a,
.nav-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  appearance: none;
  font-family: var(--font-body);
}
.nav a:hover, .nav-button:hover {
  background: var(--hair);
  color: var(--ink);
}
.nav a.active {
  background: var(--ink);
  color: var(--bg);
}
.nav .nav-active {
  background: var(--ink);
  color: var(--bg);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  letter-spacing: .005em;
  transition: all .18s ease;
  text-decoration: none;
  appearance: none;
  min-height: 38px;
  line-height: 1;
}
.btn.primary, .btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn.primary:hover, .btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.btn.secondary, .btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hair-strong);
}
.btn.secondary:hover, .btn-ghost:hover {
  border-color: var(--ink);
}
.btn.ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--hair-strong);
}
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-accent {
  background: var(--accent);
  color: var(--bg-raised);
  border-color: var(--accent);
}
.btn-accent:hover { filter: brightness(1.08); }
.btn.small, .btn-sm {
  padding: 8px 15px;
  font-size: 12.5px;
  min-height: 36px;
}
.btn.destructive {
  background: transparent;
  color: var(--terracotta);
  border-color: var(--terracotta);
}
.btn.destructive:hover { background: rgba(184,121,91,.1); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }

/* ── Pills / Tags ───────────────────────────────────────────── */
.pill, .nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  border: 1px solid var(--hair-strong);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  letter-spacing: .04em;
}
.pill.dark {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.pill.grey {
  background: color-mix(in srgb, var(--ink) 45%, var(--bg-raised));
  color: var(--bg-raised);
  border-color: transparent;
}
button.pill {
  cursor: pointer;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
}
button.pill.grey:hover { background: color-mix(in srgb, var(--ink) 62%, var(--bg-raised)); }

.pill.accent, .nav-pill.nav-active {
  background: var(--accent);
  color: var(--bg-raised);
  border-color: var(--accent);
}
.badge, .chip, .subtle-pill { /* compat */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  border: 1px solid var(--hair-strong);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  letter-spacing: .04em;
}
.badge.current { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: transparent; }
.badge.new { color: #4a7a8a; background: rgba(74,122,138,.12); border-color: transparent; }
.badge.recurring { color: #7a6848; background: rgba(216,195,165,.35); border-color: transparent; }
.badge.unavailable { color: var(--terracotta); background: rgba(184,121,91,.12); border-color: transparent; }
.badge.uncertain { color: var(--ink-mute); background: rgba(138,130,117,.15); border-color: transparent; }
.badge.ghost { color: var(--ink-soft); border-color: var(--hair-strong); background: transparent; }

/* ── Stars ──────────────────────────────────────────────────── */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--gold);
}
.stars svg { width: 12px; height: 12px; display: block; }

/* ── Photo placeholder ──────────────────────────────────────── */
.photo, .card-media {
  position: relative;
  background: var(--bg);
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--ink) 8%, transparent) 0 1px, transparent 1px 8px);
  background-size: 8px 8px;
  overflow: hidden;
  isolation: isolate;
}
/* Bildtexten ritas bara när det finns en. Utan data-caption blev det annars
   en tom bricka med bakgrund och padding nere till vänster på varje bild. */
.photo:not([data-caption])::after,
.photo[data-caption=""]::after { content: none; }
.photo::after {
  content: attr(data-caption);
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--ink-soft);
  text-transform: uppercase;
  background: color-mix(in srgb, var(--bg-raised) 80%, transparent);
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
}
.photo .corner {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 22px;
  height: 22px;
  border-top: 1.5px solid var(--ink-soft);
  border-left: 1.5px solid var(--ink-soft);
  pointer-events: none;
}
.photo .corner.br {
  top: auto; left: auto;
  bottom: 14px; right: 14px;
  border-top: 0; border-left: 0;
  border-bottom: 1.5px solid var(--ink-soft);
  border-right: 1.5px solid var(--ink-soft);
}
.card-media::before { content: none; }
.card-media.img { background-size: cover; background-position: center; background-image: none; }

/* ── Cards ──────────────────────────────────────────────────── */
.card, .detail-box, .panel, .gate, .profile-card, .auth-card, .admin-card, .support-card, .policy-card, .result-card, .filter-bar {
  background: var(--bg-raised);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
}
.card { overflow: hidden; }
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color .18s;
}
.card-link:hover, .card-link:focus-visible {
  border-color: var(--ink);
}
.card-inner {
  padding: 20px 22px 22px;
  display: grid;
  gap: 10px;
}

/* ── Section head ───────────────────────────────────────────── */
.section-head, .section {
  margin-top: 0;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 28px;
}
.section-title, .page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 1.02;
  margin: 0;
}
.section-desc, .subtitle, .panel-subtitle, .section-kicker {
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 70ch;
}
.section-kicker, .subtitle { font-size: 0.94rem; }
.page-title-wrap { display: grid; gap: 8px; margin-bottom: 28px; }

/* ── Grids ──────────────────────────────────────────────────── */
.grid-3, .grid-2, .grid-4 {
  display: grid;
  gap: 20px;
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── Period ribbon ──────────────────────────────────────────── */
.period-banner {
  background: var(--bg-deep);
  color: var(--bg-deep-ink);
  border-radius: var(--radius);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1.4fr auto auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 40px;
}
.period-banner .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bg-deep-mute);
}
.period-banner .title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 400;
  line-height: .98;
  margin: 8px 0 0;
  letter-spacing: -.015em;
}
.period-banner .dates {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bg-deep-mute);
  margin-top: 10px;
}
.period-banner .count {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 60px);
  line-height: .85;
  letter-spacing: -.03em;
  text-align: right;
}
.period-banner .count-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bg-deep-mute);
  margin-top: 12px;
  text-align: right;
}

/* ── Period notice (admin-toggled) ──────────────────────────── */
.period-notice {
  padding: 18px 22px;
  margin: -16px 0 32px;
  background: var(--bg-raised);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.period-notice p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14.5px;
  /* Grundvikten är 500, inte 600: Source Sans 3 finns bara i 400/500/600/700,
     och 600 mot fetstilens 700 gick knappt att se. */
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
}
.period-notice p + p { margin-top: 10px; }
.period-notice strong { font-weight: 700; }
.period-notice em { font-style: italic; }
.period-notice a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 720px) {
  .period-notice { padding: 16px 18px; margin: -8px 0 26px; }
}

/* ── Hero (landing) ─────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 32px 0 36px;
  background: none;
  box-shadow: none;
  color: var(--ink);
  border-radius: 0;
}
.hero-copy { display: grid; gap: 16px; align-content: center; }
.hero h1 {
  font-size: clamp(64px, 9vw, 132px);
  line-height: .9;
  margin-top: 10px;
}
.hero p {
  font-size: 17px;
  line-height: 1.6;
  max-width: 48ch;
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero-note, .hero-legend { color: var(--ink-mute); font-size: 13px; }
.hero-panel {
  background: var(--bg-deep);
  color: var(--bg-deep-ink);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--bg-deep);
  color: var(--bg-deep-ink);
  margin-top: 8px;
  padding: 0;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer nav a, .footer a { color: var(--bg-deep-mute); font-size: 12.5px; transition: color .15s; }
.footer nav a:hover, .footer a:hover { color: var(--bg-deep-ink); }
.footer-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bg-deep-mute);
}
.footer p { margin: 0; line-height: 1.55; font-size: 0.92rem; }

/* ── Forms & fields ─────────────────────────────────────────── */
.auth-form, .form-grid, .inline-form {
  display: grid;
  gap: 16px;
}
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.field input, .field select, .field textarea {
  /* Utan detta får fälten sin min-content-bredd (input har size=20 som
     standard) och spränger smala grid-kolumner – i admins användarvy sköt de
     ut genom kortets kant. */
  width: 100%;
  min-width: 0;
  border: 1px solid var(--hair-strong);
  border-radius: 8px;
  padding: 11px 13px;
  background: var(--bg-raised);
  color: var(--ink);
  min-height: 44px;
  transition: 160ms ease;
  font-family: var(--font-body);
}
/* Kryss- och radioknappar är inte textfält: de ska varken sträckas till hela
   bredden eller få fältens minsta höjd. Utan undantaget blev radioknapparna i
   medlemsvalet stora cirklar som tryckte ut texten åt höger. */
.field input[type="checkbox"],
.field input[type="radio"] {
  width: auto;
  min-width: 0;
  min-height: 0;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Valbara alternativ med förklaring, t.ex. medlemskapet vid registrering.
   Ligger i en .field, så typografin måste tas tillbaka från .field label. */
/* Både med och utan .field-förälder: .field label är mer specifik än en ensam
   klass, så alternativen skulle annars ärva fältetiketternas versaler. */
.choice-option,
.field .choice-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
}
.choice-option:hover { border-color: var(--hair-strong); }
.choice-option:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.choice-option input { margin-top: 3px; }
.choice-option .choice-title,
.field .choice-option .choice-title {
  font-weight: 600;
  line-height: 1.3;
  font-family: var(--font-body);
  font-size: 14.5px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
}
.choice-option .choice-hint,
.field .choice-option .choice-hint {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink-mute);
  margin-top: 3px;
  line-height: 1.4;
}

/* Samma sak för kryssrutor med löptext inuti ett fält. */
.field .filter-option {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
}

.field select[multiple] { min-height: 160px; padding: 8px 12px; }
/* File inputs don't stretch inside the .field grid like text inputs/selects do,
   which leaves their border box narrower than the cell. Force full width so it
   lines up with neighbouring fields (e.g. the photo upload form). */
.field input[type="file"] { width: 100%; display: block; cursor: pointer; padding: 10px 12px; }
.field textarea { min-height: 120px; resize: vertical; font-family: var(--font-body); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-mute); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
.field.error input, .field.error select, .field.error textarea {
  border-color: var(--terracotta);
}
.form-error { color: var(--terracotta); font-size: 0.82rem; font-weight: 500; }
.form-hint, .helper-text { color: var(--ink-mute); font-size: 12.5px; line-height: 1.5; }
.checkbox-list { display: grid; gap: 10px; }
.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
}
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }
.toggle-row, .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Tables ─────────────────────────────────────────────────── */
.table, .admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-raised);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
}
.table th, .table td, .admin-table th, .admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--hair);
  text-align: left;
  vertical-align: top;
}
.table th, .admin-table th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.table tr:hover td, .admin-table tbody tr:hover td { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.table tbody tr:last-child td, .admin-table tbody tr:last-child td { border-bottom: 0; }
/* Wide admin tables scroll sideways on narrow screens instead of being
   clipped by the card's overflow. */
@media (max-width: 860px) {
  .table, .admin-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .table th, .admin-table th { white-space: nowrap; }
}
.table-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 8px;
  padding: 14px 18px;
  border: 1px solid transparent;
  line-height: 1.7;
  font-size: 14px;
}
.alert.success { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--accent); }
.alert.info { background: rgba(74,122,138,.08); border-color: rgba(74,122,138,.22); color: #2a6070; }
.alert.warning { background: rgba(184,146,84,.12); border-color: rgba(184,146,84,.35); color: #7a6030; }
.alert.error { background: rgba(184,121,91,.08); border-color: rgba(184,121,91,.25); color: #8a3a1a; }
.alert.neutral { background: var(--bg-raised); border-color: var(--hair); color: var(--ink-soft); }
.banner {
  padding: 10px 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  color: var(--accent);
}
.banner.warning { background: rgba(184,146,84,.12); border-color: rgba(184,146,84,.35); color: #7a6030; }

/* ── Misc layout helpers ────────────────────────────────────── */
.stack, .stack-gap { display: grid; gap: 20px; }
.detail-grid { display: grid; gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr); gap: 24px; }
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.auth-stack { display: grid; gap: 24px; max-width: 760px; margin: 0 auto; }
.columns-2 { columns: 2; column-gap: 24px; }
.columns-2 > * { break-inside: avoid; }
.actions, .hero-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.topline { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }

/* ── Restaurant card specifics ──────────────────────────────── */
.restaurant-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.01em;
}
.restaurant-location, .small, .helper-text, .meta {
  color: var(--ink-mute);
  font-size: 12.5px;
  line-height: 1.55;
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

/* ── Detail/info boxes ──────────────────────────────────────── */
.detail-box, .offer-box, .quote-box, .callout, .note-box, .summary-box {
  background: var(--bg-raised);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 20px 22px;
  overflow: visible;
}
.detail-box h3 { font-family: var(--font-display); font-size: 26px; font-weight: 400; margin: 0 0 10px; }
.detail-box p { margin: 0; color: var(--ink-soft); line-height: 1.7; }
.detail-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.detail-list li { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--hair); }
.detail-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-list .key { color: var(--ink-mute); }
.detail-list .value { color: var(--ink); text-align: right; }
.progress { height: 8px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s ease; }
.note { padding: 10px 14px; border-radius: 8px; background: var(--bg-raised); border: 1px solid var(--hair); color: var(--ink-soft); line-height: 1.6; font-size: 13.5px; }

/* ── Review card ────────────────────────────────────────────── */
.review-card {
  background: var(--bg-raised);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: grid;
  gap: 12px;
}
.review-card .top { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.review-meta, .admin-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink-mute); font-size: 12.5px; }

/* ── Stats ──────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-top: 1px solid var(--hair); background: var(--hair); }
.stat { background: var(--bg-raised); padding: 16px; }
.stat-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.stat-value { margin-top: 6px; font-family: var(--font-display); font-size: 1.45rem; font-weight: 400; }
.stat-unit { font-size: 12px; color: var(--ink-mute); }

/* ── Panel containers ───────────────────────────────────────── */
.panel, .gate, .profile-card, .auth-card, .admin-card, .support-card, .policy-card {
  padding: 24px;
  overflow: visible;
}
.panel-title { margin: 0 0 10px; font-family: var(--font-display); font-size: 1.85rem; font-weight: 400; line-height: 1.1; }
.auth-card h2, .profile-card h2, .admin-card h2, .support-card h2, .policy-card h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.08;
}

/* ── Admin ──────────────────────────────────────────────────── */
.admin-menu { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }
.admin-section { display: grid; gap: 20px; }
.admin-section details { border: 1px solid var(--hair); border-radius: var(--radius); background: var(--bg-raised); }
.admin-section details summary { list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 600; }
.admin-section details summary::-webkit-details-marker { display: none; }
.admin-section details .details-body { padding: 0 20px 20px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px;
  background: var(--bg-raised);
  border: 1px dashed var(--hair-strong);
  border-radius: var(--radius);
  color: var(--ink-soft);
}
.empty-state h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.8rem; font-weight: 400; }

/* ── Between-period ─────────────────────────────────────────── */
.between-period {
  background: var(--bg-raised);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}
.between-period h2 { font-family: var(--font-display); font-weight: 400; margin: 0 0 10px; }
.between-period p { margin: 0; color: var(--ink-mute); line-height: 1.65; }

/* ── Filter bar ─────────────────────────────────────────────── */
.filter-bar { padding: 18px 22px; display: grid; gap: 16px; }
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* ── Filter dropdown (multi-select) ─────────────────────────── */
/* min-width: 0 så en lång vald text kan kortas av i stället för att tränga
   ut sin kolumn i rutnätet på smalare skärmar. */
.filter-details { position: relative; min-width: 0; }
.filter-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  outline: none;
}
.filter-details > summary::-webkit-details-marker { display: none; }
.filter-summary-val {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding-right: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238A8275' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  min-width: 0;
}
.filter-details[open] .filter-summary-val {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%231B1814' d='M0 6h10L5 0z'/%3E%3C/svg%3E");
}
.filter-summary-val .filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 10px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.filter-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: -12px;
  background: var(--bg-raised);
  border: 1px solid var(--hair-strong);
  border-radius: var(--radius);
  padding: 12px;
  z-index: 1000;
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  display: grid;
  gap: 2px;
  box-shadow: 0 8px 32px rgba(27,24,20,.14);
}
.filter-panel-sm {
  min-width: 0;
  width: 160px;
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-soft);
  transition: background .12s;
}
.filter-option:hover { background: var(--hair); color: var(--ink); }
.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.filter-option input:checked + span { color: var(--ink); font-weight: 500; }
/* Rubrik inuti en filtermeny som rymmer mer än en sak, t.ex. betygsgränserna
   under favoritkrysset i Urval. */
.filter-panel-heading {
  margin: 8px 0 2px;
  padding: 8px 8px 0;
  border-top: 1px solid var(--hair);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.filter-panel-heading:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.filter-panel-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hair);
}

/* ── Filterrad (restaurang- och periodlistan) ───────────────── */
/* En rad med filter som får brytas. Sök + "Rensa allt" hålls ihop i
   .filter-tail så de följs åt när raden bryts – ligger de löst hamnar
   "Rensa allt" ensamt längst till vänster på nästa rad. */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 18px;
  padding: 16px 20px;
  margin-bottom: 20px;
  background: var(--bg-raised);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  position: relative;
  z-index: 1001; /* över listan, under topbaren (1100) */
}
.filter-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter-field > .eyebrow,
.filter-details > summary > .eyebrow { font-size: 10px; letter-spacing: .14em; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-buttons .btn { white-space: nowrap; }

/* Av/på-valen i Urval: små rutor i stället för piller, så gruppen ryms bredvid
   de andra fälten och på en telefon tar tre val en rad i stället för tre. */
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--hair-strong);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: .04em;
  line-height: 1.5;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.filter-chip:hover { border-color: var(--ink-soft); }
.filter-chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* En ensam knapp i ett fält ska hålla sin egen bredd, inte sträckas ut till
   hela kolumnen som rutnätet ger den. */
.filter-field > .btn { align-self: flex-start; }
.filter-sep { width: 1px; height: 28px; align-self: center; background: var(--hair-strong); }
.filter-tail { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-left: auto; }
.filter-toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }

.filter-search { position: relative; display: flex; align-items: center; }
.filter-search > svg {
  position: absolute;
  left: 8px;
  width: 13px;
  height: 13px;
  color: var(--ink-mute);
  pointer-events: none;
}
.filter-search input {
  width: 190px;
  padding: 5px 10px 5px 28px;
  border: 1px solid var(--hair-strong);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  outline: none;
}
.filter-search input:focus { border-color: var(--ink-soft); }
.filter-search-clear {
  position: absolute;
  right: 7px;
  font-size: 15px;
  line-height: 1;
  color: var(--ink-mute);
  text-decoration: none;
}

/* Allt ryms på en rad bara när sidan är fullbred (--maxw). Under det blir
   raden ett rutnät i stället för en flexrad som bryts godtyckligt – en bruten
   rad lämnade ett stort tomrum, eftersom verktygsraden hålls högerställd av
   margin-left:auto och hamnade ensam längst ut på nästa rad. Skiljelinjerna
   tas bort så de inte blir hängande streck i slutet av en rad. */
@media (max-width: 1279px) {
  .filter-row {
    display: grid;
    /* 132 px räcker för det längsta valet ("Område A–Ö", "Helsingborg") och
       ger fem fält på en rad redan vid ~850 px – tidigare stod tre fält
       utspridda över raden med luft som ingen behövde. */
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    align-items: start;
    gap: 14px 12px;
    padding: 14px 16px;
  }
  .filter-row .filter-sep { display: none; }
  /* Perioden har långa namn och behöver dubbel bredd. */
  .filter-row > .is-wide { grid-column: span 2; }
  /* Verktygsraden är sista raden och fyller den: valen till vänster,
     sökfältet tar resten. */
  .filter-row > .filter-tail { grid-column: 1 / -1; }
  .filter-tail { margin-left: 0; }
  .filter-tail .filter-search { flex: 1 1 180px; }
  .filter-search input { width: 100%; }
}

/* Så här smalt blir tre kolumner för trångt för menyerna som fälls ut under
   fälten – men bara två, inte en: ett fält per rad gjorde filterrutan högre
   än telefonens skärm. */
@media (max-width: 560px) {
  .filter-row {
    grid-template-columns: 1fr 1fr;
    gap: 14px 12px;
  }
  .filter-row > .is-wide,
  /* Fälten är udda till antalet: sista menyn fyller sin rad i stället för
     att lämna en tom ruta bredvid sig. */
  .filter-row > .filter-details:last-of-type { grid-column: 1 / -1; }
  /* Sökfältet får bli kortare så "Rensa allt" ryms bredvid det. */
  .filter-tail .filter-search { flex-basis: 140px; }
}

/* Rubrikrad med vyväxlare (Lista/Karta) */
.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--hair);
}
.page-head-row .view-toggle { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
@media (max-width: 760px) {
  .page-head-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ── Hero restaurant ────────────────────────────────────────── */
.restaurant-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: stretch; }
.hero-image {
  min-height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--ink) 8%, transparent) 0 1px, transparent 1px 8px);
  background-size: 8px 8px;
  position: relative;
}

/* ── Link helpers ───────────────────────────────────────────── */
.link { color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; }
.link-button { appearance: none; border: 0; background: transparent; color: var(--terracotta); padding: 0; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.positive { color: var(--accent); }
.negative { color: var(--terracotta); }
.dim { color: var(--ink-mute); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.micro { font-size: 12.5px; line-height: 1.55; }
.hr { height: 1px; background: var(--hair); border: 0; margin: 0; }

/* ── Page nav ───────────────────────────────────────────────── */
.nav-pill { cursor: default; }
a.nav-pill, button.nav-pill { cursor: pointer; }

/* ── Swish QR ───────────────────────────────────────────────── */
.support-qr-link { display: inline-flex; align-items: center; transition: opacity .15s; }
.support-qr-link:hover { opacity: .85; }

/* ── Pagination (override Tailwind pagination template) ─────── */
.pagination { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--hair-strong);
  color: var(--ink-soft);
  font-size: 13px;
  transition: all .15s;
}
.pagination a:hover { background: var(--hair); color: var(--ink); }
.pagination .active span, [aria-current="page"] > span {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.pagination [disabled] span { opacity: .35; pointer-events: none; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 36px; }
  .hero-panel { min-height: auto; }
  .restaurant-hero, .split, .auth-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters, .form-grid.three { grid-template-columns: 1fr 1fr; }
  .columns-2 { columns: 1; }
  .period-banner { grid-template-columns: 1fr auto; }
  .period-banner > *:last-child { grid-column: 2; }
}

@media (max-width: 640px) {
  .page { padding: 20px var(--pad) 60px; }
  .topbar { padding: 12px var(--pad); }
  .nav a, .nav-button { padding: 7px 11px; font-size: 13px; }
  .grid-3, .grid-4, .grid-2, .filters, .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .period-banner { grid-template-columns: 1fr; padding: 24px 20px; }
  .period-banner .count, .period-banner .count-label { text-align: left; }
  .hero { padding: 32px 0 24px; }
  .hero h1 { font-size: clamp(48px, 12vw, 80px); }
  .section-head, .toolbar, .topline { align-items: flex-start; flex-direction: column; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; }
  .nav { gap: 2px; }
}

@prefers-reduced-motion: reduce {
  * { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- Blogg */
/* Ett blogginlägg är den enda sidan en utloggad besökare (och Google) kan
   läsa i sin helhet, så texten får en egen, smalare spaltbredd. */
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: var(--bg-raised);
  margin-bottom: 16px;
}
.blog-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.blog-tag {
  padding: 2px 8px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  color: var(--ink-soft);
}
.blog-card-title { font-size: 30px; line-height: 1.15; margin: 0; }
.blog-card-title a { color: inherit; text-decoration: none; }
.blog-card-title a:hover { color: var(--accent); }
.blog-excerpt { color: var(--ink-soft); font-size: 14px; margin: 0; }
.blog-more {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.blog-more:hover { text-decoration: underline; }

/* Artikeln tar hela spaltbredden. Löptexten hålls vid en läsbar radlängd men
   centreras, medan karta och tabell breder ut sig över hela bredden – en
   världskarta i 70 tecken är oläslig, och en tabell som slutar mitt på sidan
   ser ut som ett fel. */
.blog-article { max-width: 1180px; }
.blog-body > p,
.blog-body > ul,
.blog-body > ol,
.blog-body > blockquote,
.blog-body > h2,
.blog-body > h3 { max-width: 96ch; }
.blog-article .page-title { margin-top: 6px; }
.blog-body { margin-top: 22px; font-size: 16px; line-height: 1.7; }
/* Kartan: full bredd, egen ram, och aldrig högre än att den ryms i fönstret. */
.blog-body p img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  margin: 4px 0 22px;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.blog-body p:has(img) { max-width: 100%; }
.blog-body p > a:has(img) { display: block; }
.blog-body > *:first-child { margin-top: 0; }
.blog-body h2 { font-family: var(--font-display); font-size: 30px; line-height: 1.2; margin: 32px 0 10px; }
.blog-body h3 { font-family: var(--font-display); font-size: 23px; line-height: 1.25; margin: 26px 0 8px; }
.blog-body p { margin: 0 0 16px; }
.blog-body ul, .blog-body ol { margin: 0 0 16px; padding-left: 22px; }
.blog-body li { margin-bottom: 6px; }
.blog-body blockquote {
  margin: 0 0 16px;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--hair-strong);
  color: var(--ink-soft);
}
.blog-body code { font-family: var(--font-mono); font-size: .88em; }
.blog-body hr { border: 0; border-top: 1px solid var(--hair); margin: 28px 0; }
/* Statistiktabellen. Den skrivs som Markdown i inlägget, så den kan innehålla
   precis vad admin vill – stilen får därför inte utgå från ett visst antal
   kolumner. */
/* Tabellen får inte bli så bred att blicken tappar raden mellan marknad och
   siffra – den centreras i stället under kartan. */
.blog-body table {
  width: 100%;
  max-width: 940px;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 14px;
}
.blog-body th, .blog-body td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--hair);
  text-align: left;
}
.blog-body th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 400;
}
.blog-body td:not(:first-child), .blog-body th:not(:first-child) { text-align: right; }
.blog-body th { vertical-align: bottom; line-height: 1.35; }
.blog-body th .th-sub { display: block; letter-spacing: .06em; }
/* Sorterbara rubriker: hela rubriken är klickbar, pilen visar riktningen. */
.blog-body th.is-sortable { cursor: pointer; user-select: none; }
.blog-body th.is-sortable:hover, .blog-body th.is-sortable:focus-visible { color: var(--ink); outline: none; }
.blog-body th[aria-sort]::after { content: ' ▾'; color: var(--accent); }
.blog-body th[aria-sort="ascending"]::after { content: ' ▴'; }
.blog-body tbody tr:last-child td { border-bottom: 0; }
/* Summeraden är fetstilad i Markdown – lyft den lite extra. */
.blog-body tbody tr:last-child { background: color-mix(in srgb, var(--ink) 4%, transparent); }
/* Fotnoten under tabellen står i kursiv i Markdown. */
.blog-body em { color: var(--ink-soft); }

/* Kortlistan följer sidans bredd i stället för att bli en smal remsa när
   fönstret är stort. */
@media (min-width: 900px) {
  .blog-card { padding: 26px 28px 28px; }
}

@media (max-width: 720px) {
  .blog-card-title { font-size: 24px; }
  .blog-article .page-title { max-width: none; }
  .blog-body { font-size: 15px; }
  .blog-body table { display: block; overflow-x: auto; }
}
