/* Skolans lov. One stylesheet, no framework, light theme only.
   Design: a Swedish wall planner (årsplanering). White paper, green-black ink, one accent (fir green)
   for lov and actions, almanac red only for red days, amber only for warnings.
   Type: Familjen Grotesk (Familjen STHLM, SIL OFL 1.1, see /assets/fonts/OFL-familjen-grotesk.txt). */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("/assets/fonts/familjen-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  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: "Familjen Grotesk";
  src: url("/assets/fonts/familjen-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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 {
  color-scheme: light only;
  --paper: #ffffff;
  --panel: #f2f4f2;
  --panel-2: #e7ebe8;
  --line: #d8dfda;
  --line-strong: #b5c1ba;
  --field-edge: #7d8b84; /* form fields: 3.6:1 on white, the 3:1 a field's outline needs (WCAG 1.4.11) */
  --ink: #17241e;
  --ink-2: #4b5852;
  --fir: #1d5c45;
  --fir-dark: #14432f;
  --lov: #d4e9dd;
  --lov-edge: #8fc3a8;
  --red: #b42318;
  --amber: #774a00;
  --amber-bg: #fbf0d6;
  --ok-bg: #e5f0ea;
  --bad: #8f1d14;
  --bad-bg: #fbe8e5;
  --tint: #eef5f1;       /* page heads, the home hero and cards: paper with a breath of fir */
  --radius: 6px;         /* fields and buttons */
  --radius-lg: 12px;     /* cards and tiles */
  --gutter: 20px;
  --font: "Familjen Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  font-feature-settings: "kern";
  overflow-x: hidden;
}
a { color: var(--fir); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--fir-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fir); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--lov); }

h1, h2, h3 { color: var(--ink); font-weight: 650; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.35rem + 2.1vw, 2.6rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.022em; margin: 0.25em 0 0.4em; }
h2 { font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.6rem); line-height: 1.2; letter-spacing: -0.01em; margin: 3.25rem 0 0.9rem; }
h3 { font-size: 1.125rem; line-height: 1.3; margin: 1.6rem 0 0.5rem; }
p { margin: 0 0 1em; max-width: 70ch; }
.lead { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
small, .muted { color: var(--ink-2); }
p.muted { font-size: 0.9375rem; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Prototype notice: quiet, on the same edges as the page */
.proto-banner { background: var(--panel); border-bottom: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink-2); }
.proto-banner .container { padding-top: 6px; padding-bottom: 6px; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .container { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo:hover { color: var(--ink); }
.logo svg { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 24px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500; padding: 20px 0 18px; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--fir); }
@media (max-width: 760px) {
  .site-header .container { flex-wrap: wrap; gap: 0 18px; min-height: 0; padding-top: 12px; }
  .nav { margin-left: 0; width: 100%; gap: 20px; }
  .nav a { padding: 10px 0 10px; }
}

/* The page head: crumbs, title and the first answer on a tinted band from edge to edge. The band is
   painted by a pseudo-element, so the content keeps the page's container. */
.masthead, .hero { position: relative; isolation: isolate; }
.masthead::before, .hero::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  background: var(--tint); border-bottom: 1px solid #dde8e1;
}
.masthead { padding: 2px 0 30px; margin-bottom: 6px; }
.masthead h1 { margin-top: 0.4em; }
.masthead .lead { margin-bottom: 0; }
.masthead .lead + .facts, .masthead .lead + .nextlov, .masthead .lead + .lovsum { margin-top: 22px; }
.masthead .nextlov { margin-bottom: 16px; }
.masthead .facts { margin-bottom: 0; }
.masthead .facts li { border-top-color: #d3e0d8; }

/* Breadcrumbs */
.crumbs { font-size: 0.875rem; color: var(--ink-2); margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--ink-2); }

/* Home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px 56px; padding: 48px 0 34px; align-items: start; }
@media (min-width: 980px) { .hero { grid-template-columns: minmax(0, 1fr) 340px; } }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 2.8vw, 3.2rem); margin-top: 0; }
/* On the tinted band, fields and cards are white paper lifted a little. */
.hero .search input, .masthead .search input { box-shadow: 0 1px 2px rgba(23, 36, 30, 0.06), 0 8px 24px rgba(23, 36, 30, 0.07); }
.hero .search input:focus, .masthead .search input:focus { box-shadow: inset 0 0 0 1px var(--fir), 0 8px 24px rgba(23, 36, 30, 0.07); }

/* The school year as one row of weeks, darker where more kommuner have lov (home page) */
.lovstrip { grid-column: 1 / -1; margin: 4px 0 0; }
.lovstrip figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-bottom: 4px; }
.lovstrip figcaption b { font-size: 1.0625rem; font-weight: 650; }
.lovstrip figcaption span { font-size: 0.875rem; color: var(--ink-2); }
.lovstrip svg { display: block; width: 100%; height: 86px; overflow: visible; font-family: var(--font); }
.lovstrip rect { stroke: none; }
.lovstrip .s0 { fill: var(--paper); stroke: #d3e0d8; stroke-width: 1; }
.lovstrip .s1 { fill: #d4e9dd; }
.lovstrip .s2 { fill: #9fcab4; }
.lovstrip .s3 { fill: #5c9a7e; }
.lovstrip .s4 { fill: var(--fir); }
.lovstrip .lab text { font-size: 13px; font-weight: 600; fill: var(--ink); }
.lovstrip .mon text { font-size: 12.5px; fill: var(--ink-2); }
.lovstrip-key { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 2px 0 0; padding: 0; list-style: none; font-size: 0.8125rem; color: var(--ink-2); }
.lovstrip-key li { display: inline-flex; align-items: center; gap: 7px; }
.lovstrip-key i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.lovstrip-key .k0 { background: var(--paper); box-shadow: inset 0 0 0 1px #c9d8cf; }
.lovstrip-key .k1 { background: #d4e9dd; box-shadow: inset 0 0 0 1px #b6d4c4; }
.lovstrip-key .k4 { background: var(--fir); }
/* Phones: the lov names would collide, and the months carry the strip. */
@media (max-width: 600px) {
  .lovstrip svg { height: 68px; }
  .lovstrip .lab { display: none; }
  .lovstrip .cells, .lovstrip .mon { transform: translateY(-18px); }
}

/* Search */
.search { position: relative; max-width: 640px; margin: 22px 0 10px; }
.search label { display: block; font-weight: 600; margin-bottom: 8px; }
.search input {
  width: 100%; height: 58px; font: inherit; font-size: 1.125rem; padding: 0 16px 0 50px;
  border: 1px solid var(--field-edge); border-radius: var(--radius); background: var(--paper); color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: #627069; }
.search input:focus { outline: none; border-color: var(--fir); box-shadow: inset 0 0 0 1px var(--fir); }
.search .icon { position: absolute; left: 17px; top: 52px; width: 20px; height: 20px; color: var(--ink-2); pointer-events: none; }
.search-results { list-style: none; margin: 6px 0 0; padding: 6px; position: absolute; left: 0; right: 0; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(23, 36, 30, 0.14); z-index: 4; max-height: 70vh; overflow-y: auto; }
.search-results[hidden] { display: none; }
/* Rows the table filter hides stay hidden when a phone layout turns rows into grids. */
tr[hidden] { display: none !important; }
.search-results li a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.search-results li a:hover, .search-results li[aria-selected="true"] a { background: var(--panel); }
.search-results .meta { color: var(--ink-2); font-size: 0.875rem; text-align: right; }
.search-results .group { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); padding: 10px 12px 4px; }
/* Family calendar: the hits are buttons that add a school, styled like the search's links. */
.search-results li button { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 4px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.search-results li button:hover, .search-results li button:focus-visible { background: var(--panel); }
.search-results li button .badge { margin-left: 6px; }
.family-picked { list-style: none; margin: 8px 0 20px; padding: 0; max-width: 760px; }
.family-picked li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.family-picked li.muted { border-bottom: 0; }
.family-picked .badge { margin-left: 6px; }
.family-picked .btn { flex: none; min-height: 36px; padding: 4px 12px; }
.family-out { max-width: 760px; margin: 8px 0 28px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.search-hint { font-size: 0.9375rem; color: var(--ink-2); }

/* Plain lists of links (popular kommuner, neighbours) */
.linklist { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.linklist .muted { font-size: 0.875rem; }
.hero .linklist::before { content: "Vanliga kommuner:"; color: var(--ink-2); }

/* The national overview next to the hero: an almanac-style list */
.almanac { background: var(--paper); border: 1px solid #dbe6df; border-radius: var(--radius-lg); padding: 22px 24px 18px; box-shadow: 0 1px 2px rgba(23, 36, 30, 0.04); }
.almanac h2 { font-size: 1.0625rem; margin: 0 0 10px; }
.almanac dl { margin: 0; }
.almanac div { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.almanac dt { font-weight: 600; }
.almanac dt a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.almanac dt a:hover { color: var(--fir); text-decoration-color: currentColor; }
/* The family calendar, under the search: one line and a quiet button, below the search's weight. */
.family-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; max-width: 640px; margin: 26px 0 0; padding: 14px 16px; background: var(--paper); border: 1px solid #dbe6df; border-radius: var(--radius-lg); }
.family-cta .cta-icon { flex: none; width: 36px; height: 36px; padding: 7px; border-radius: 9px; background: var(--lov); color: var(--fir-dark); }
.family-cta p { flex: 1 1 240px; margin: 0; color: var(--ink-2); }
.family-cta b { color: var(--ink); font-weight: 600; }
.family-cta .btn { flex: none; }
.almanac dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.almanac .sub { grid-column: 1 / -1; font-size: 0.875rem; color: var(--ink-2); }
.almanac p { font-size: 0.875rem; color: var(--ink-2); margin: 10px 0 0; }

/* Three short explanations, as text columns (no boxes) */
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.cols3 > div { border-top: 2px solid var(--ink); padding-top: 14px; }
.cols3 h3 { margin: 0 0 6px; }
.cols3 p { margin: 0; color: var(--ink-2); }
@media (max-width: 820px) { .cols3 { grid-template-columns: 1fr; gap: 24px; } }

/* Panels: the one container style */
.card, .panel { background: var(--tint); border-radius: var(--radius-lg); padding: 22px 24px; }
.card h3, .panel h3 { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

/* Next lov, as a sentence */
.nextlov { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 22px; font-size: 1.125rem; }
.nextlov::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 2px; background: var(--fir); transform: translateY(1px); }
.nextlov[hidden] { display: none; }
.nextlov p { margin: 0; }

/* The five lov at a glance: five white tiles, each with its icon, the dates and the week as a pill */
.lovsum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.lovsum li { display: flex; flex-direction: column; background: var(--paper); border: 1px solid #dbe6df; border-radius: var(--radius-lg); padding: 14px 16px 16px; }
.lovsum + p { margin-top: 14px; }
.lovsum .k { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.lovicon { width: 20px; height: 20px; flex: none; color: var(--fir); }
.lovsum .v { display: block; font-size: 1.125rem; font-weight: 650; line-height: 1.3; letter-spacing: -0.005em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.lovsum .w { display: block; font-size: 0.8125rem; color: var(--ink-2); margin-top: auto; padding-top: 10px; }
.lovsum .wk { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--lov); color: var(--fir-dark); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .lovsum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lovsum li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* The school year on one page: a wall planner, months as columns, one row per date */
.planner-wrap { margin: 26px 0 6px; }
.planner-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 10px; }
.planner-head h2 { margin: 0; }
.planner-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.planner-hint { display: none; font-size: 0.875rem; color: var(--ink-2); margin: -4px 0 10px; }
@media (max-width: 900px) { .planner-hint { display: block; } }
.planner { display: grid; grid-template-columns: repeat(11, minmax(74px, 1fr)); gap: 0 6px; min-width: 860px; }
.pm h3 { margin: 0; padding: 0 4px 6px; font-size: 0.8125rem; font-weight: 600; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.pm h3 span { color: var(--ink-2); font-weight: 400; }
.pm ol { list-style: none; margin: 0; padding: 0; }
.pm li { display: flex; justify-content: space-between; align-items: center; height: 21px; padding: 0 5px; font-size: 0.75rem; line-height: 1; border-bottom: 1px solid #e9ede9; font-variant-numeric: tabular-nums; }
.pm li b { font-weight: 400; }
.pm li i { font-style: normal; font-size: 0.6875rem; color: var(--ink-2); }
.pm li.w { background: var(--panel); color: var(--ink-2); }
.pm li.l { background: var(--lov); }
.pm li.w.l { background: #c6e0d1; }
.pm li.d { background: repeating-linear-gradient(135deg, #ffffff 0 3px, var(--lov) 3px 6px); }
.pm li.r b { color: var(--red); font-weight: 700; }
.pm li.s { box-shadow: inset 3px 0 0 var(--fir); }
.pm li.t { outline: 2px solid var(--ink); outline-offset: -2px; position: relative; z-index: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 16px; height: 12px; border-radius: 2px; flex: none; }
.sw.l { background: var(--lov); box-shadow: inset 0 0 0 1px var(--lov-edge); }
.sw.d { background: repeating-linear-gradient(135deg, #ffffff 0 3px, var(--lov) 3px 6px); box-shadow: inset 0 0 0 1px var(--lov-edge); }
.sw.w { background: var(--panel-2); }
.sw.s { background: var(--paper); box-shadow: inset 3px 0 0 var(--fir), inset 0 0 0 1px var(--line); }
.sw.r { width: auto; height: auto; color: var(--red); font-weight: 700; font-size: 0.875rem; }
.sw.t { background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); }

/* Notices and status labels */
.notice { background: var(--panel); border-left: 3px solid var(--fir); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; margin: 16px 0; max-width: 78ch; }
.notice strong { display: block; margin-bottom: 2px; }
.notice.ok { background: var(--ok-bg); border-left-color: var(--fir); }
.notice.warn { background: var(--amber-bg); border-left-color: #b07800; }
.notice.bad { background: var(--bad-bg); border-left-color: var(--bad); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 600; line-height: 1.4; padding: 2px 8px; border-radius: 4px; background: var(--panel-2); color: var(--ink); white-space: nowrap; vertical-align: 1px; }
.badge svg { width: 13px; height: 13px; flex: none; }
.badge.ok { background: var(--ok-bg); color: var(--fir-dark); }
.badge.warn { background: var(--amber-bg); color: var(--amber); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

.statuslist { list-style: none; padding: 0; margin: 0 0 1em; max-width: 72ch; }
.statuslist li { padding: 10px 0; border-top: 1px solid var(--line); }
.statuslist .badge { margin-right: 10px; }

/* Facts about a school: a definition grid with rules, no boxes */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 28px; margin: 10px 0 18px; padding: 0; list-style: none; }
.facts li { border-top: 1px solid var(--line); padding: 10px 0 12px; }
.facts span { display: block; font-size: 0.875rem; color: var(--ink-2); }
.facts b { font-weight: 600; overflow-wrap: anywhere; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9688rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 14px 11px 0; vertical-align: top; }
th { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid var(--ink); white-space: nowrap; }
td { border-bottom: 1px solid var(--line); }
td b { font-weight: 600; }
td .note { display: block; font-size: 0.875rem; color: var(--ink-2); margin-top: 2px; max-width: 60ch; }
td.nowrap, th.nowrap { white-space: nowrap; }
.mk { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }
.mk.l { background: var(--lov); box-shadow: inset 0 0 0 1px var(--lov-edge); }
.mk.d { background: repeating-linear-gradient(135deg, #ffffff 0 2px, var(--lov) 2px 4px); box-shadow: inset 0 0 0 1px var(--lov-edge); }
.mk.n { background: transparent; }
@media (max-width: 560px) {
  .hide-sm { display: none; }
  th, td { padding-right: 10px; }
  /* The date table stacks on phones: what, then date and week on one line */
  table.events thead { display: none; }
  table.events tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.events tr:first-child { border-top: 2px solid var(--ink); }
  table.events td { display: block; border: 0; padding: 0; }
  table.events td:first-child { grid-column: 1 / -1; }
  table.events td.nowrap { white-space: normal; }
  table.events td:last-child { color: var(--ink-2); text-align: right; }
  /* The chain table stacks too: the school and its kommun, then the four dates with their labels */
  table.chain thead { display: none; }
  table.chain tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.chain tr:first-child { border-top: 2px solid var(--ink); }
  table.chain td { display: block; border: 0; padding: 0; }
  table.chain td.nowrap { white-space: normal; }
  table.chain td:first-child, table.chain td.kommun, table.chain td[colspan] { grid-column: 1 / -1; }
  table.chain td.kommun { margin-top: -6px; font-size: 0.875rem; color: var(--ink-2); }
  /* The län table stacks the same way: the kommun, then its four dates with their labels */
  table.lantable thead { display: none; }
  table.lantable tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.lantable tr:first-child { border-top: 2px solid var(--ink); }
  table.lantable td { display: block; border: 0; padding: 0; }
  table.lantable td.nowrap { white-space: normal; }
  table.lantable td:first-child { grid-column: 1 / -1; font-weight: 600; }
  table.lantable td[data-label]::before { content: attr(data-label); display: block; font-size: 0.8125rem; color: var(--ink-2); }
  table.chain td[data-label]::before { content: attr(data-label); display: block; font-size: 0.8125rem; color: var(--ink-2); }
}
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 14px 0; }
.filters input, .filters select { font: inherit; font-size: 0.9375rem; height: 42px; padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--field-edge); background: var(--paper); color: var(--ink); }

/* Week distribution on lov pages */
.bars { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.bars li { display: grid; grid-template-columns: 84px 1fr 110px; align-items: center; gap: 14px; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.bars .bar { display: block; width: 100%; height: 12px; overflow: visible; }
.bars .bar rect { fill: var(--fir); }

/* Calendar subscription */
.subscribe { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.subscribe + p { margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 0.9375rem; font-weight: 600; min-height: 42px; padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--fir); color: #fff; border-color: var(--fir); }
.btn.primary:hover { background: var(--fir-dark); border-color: var(--fir-dark); color: #fff; }

/* School lists */
.school-list { columns: 3 240px; column-gap: 32px; margin: 8px 0; padding: 0; list-style: none; }
.school-list li { break-inside: avoid; padding: 5px 0; }
.school-list .badge { margin-left: 6px; }
details.more { margin: 8px 0; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--fir); }

/* FAQ */
.faq { margin: 0; max-width: 72ch; }
.faq dt { font-weight: 600; margin-top: 18px; }
.faq dd { margin: 4px 0 0; color: var(--ink-2); }

/* Error report: closed at the foot of every page with dates, open on /om-datan/ */
.report { margin-top: 64px; border-top: 1px solid var(--line); }
.report summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 18px 0; }
.report summary::-webkit-details-marker { display: none; }
.report-q { color: var(--ink-2); }
.report-a { font-weight: 600; color: var(--fir); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.report summary:hover .report-a { color: var(--fir-dark); text-decoration-thickness: 2px; }
.report details[open] .report-a { color: var(--ink); text-decoration: none; }
.report-body { padding-bottom: 4px; }
.report-form { background: var(--panel); border-radius: var(--radius); padding: 22px 24px; max-width: 680px; margin: 0 0 24px; }
.report-form .field { margin: 0 0 20px; max-width: none; }
.report-form fieldset { border: 0; padding: 0; min-width: 0; }
.report-form label, .report-form legend { display: block; font-weight: 600; margin: 0 0 6px; padding: 0; }
.report-form .choice { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; margin: 0; padding: 4px 0; cursor: pointer; }
.report-form .choice input { flex: none; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--fir); }
.report-form .hint { display: block; margin: -2px 0 8px; font-size: 0.9375rem; color: var(--ink-2); }
.report-form input[type="text"], .report-form input[type="url"], .report-form textarea {
  display: block; width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--field-edge); border-radius: var(--radius); -webkit-appearance: none; appearance: none;
}
.report-form textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.report-form input[type="text"]:focus, .report-form input[type="url"]:focus, .report-form textarea:focus { outline: none; border-color: var(--fir); box-shadow: inset 0 0 0 1px var(--fir); }
.report-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.report-send { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 4px 0 14px; }
.report-send .btn[disabled] { opacity: 0.6; cursor: progress; }
.report-status { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }
.report-status.bad { color: var(--bad); font-weight: 600; }
.report-note { margin: 0; font-size: 0.875rem; color: var(--ink-2); }
.report-done { background: var(--ok-bg); border-radius: var(--radius); padding: 18px 22px; max-width: 680px; }
.report-done:focus { outline: none; }
.report-done strong { display: block; font-size: 1.0625rem; color: var(--fir-dark); }
.report-done p { margin: 4px 0 0; }
.report-page { padding: 48px var(--gutter); }

/* Footer: the one dark area, deep fir, so every page ends on solid ground (text 9:1, small print 6.4:1) */
.site-footer { margin-top: 80px; background: var(--fir-dark); padding: 48px 0 52px; font-size: 0.9063rem; color: #dfeae3; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px 32px; }
.site-footer h2 { font-size: 0.9375rem; margin: 0 0 12px; color: #ffffff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 7px 0; }
.site-footer a { color: #dfeae3; text-decoration-color: rgba(223, 234, 227, 0.4); }
.site-footer a:hover { color: #ffffff; text-decoration-color: #ffffff; }
.site-footer :focus-visible { outline-color: #ffffff; }
.site-footer .footer-meta { margin: 32px 0 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.16); max-width: none; font-size: 0.875rem; color: #b3c9bd; }
.site-footer mark.todo { background: #fbf0d6; color: #774a00; }

/* Trust pages: om oss, kontakt, integritet, ändringslogg */
.plain-list { margin: 0 0 1em; padding-left: 1.25em; max-width: 70ch; }
.plain-list li { margin: 0 0 0.5em; }
.publisher { line-height: 1.75; }
mark.todo { background: var(--amber-bg); color: var(--amber); font-weight: 600; padding: 0 4px; border-radius: 3px; }
.changelog { list-style: none; margin: 0; padding: 0; max-width: 76ch; }
.changelog > li { border-top: 1px solid var(--line); padding: 14px 0 2px; scroll-margin-top: 84px; }
.changelog > li:target { box-shadow: inset 3px 0 0 var(--fir); padding-left: 16px; }
.changelog p { margin: 0 0 12px; }
.changelog .log-head { margin-bottom: 4px; }
.log-head .badge { margin-right: 8px; }

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 1rem; }
  .lead { font-size: 1.0625rem; }
  h2 { margin-top: 2.6rem; }
  .card, .panel, .report-form { padding: 18px; }
  .report-form .choice { padding: 8px 0; }
}

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  .site-header, .site-footer, .search, .subscribe, .proto-banner, .linklist, .nextlov, .crumbs, .report, .report-form { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .planner { min-width: 0; }
  .planner-scroll { overflow: visible; }
  .pm li { height: 15px; font-size: 7.5pt; }
  a { color: inherit; text-decoration: none; }
}
