/*
Theme Name: Omsorgskris
Description: Tema för omsorgskris.se – Tankesmedjan Synaps.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: omsorgskris
*/

/* One of each: the hairline, the two radii (cards; form controls and buttons, as in theme.json), the space between
   sections and the statement size. Line heights: 1 (figures), 1.05 (display), 1.2 (titles),
   1.45 (compact text), 1.6 (body). */
/* Type scale, one step per role. Weights: 400 to read, 700 to find.
   16 small text, compact text, labels · 19 body, menu, card titles, standing links · 24 subheadings, ingress, the question in the band
   36 section headings, statements · 60 big headings, pull quote, figures · 80 page titles */
:root {
	--oks-line: color-mix(in srgb, var(--wp--preset--color--ink) 20%, transparent);
	--oks-radius: 8px;
	--oks-radius-control: 6px;
	--oks-section: clamp(3rem, 6vw, 4rem);
	--oks-step: clamp(2rem, 4vw, 2.5rem); /* inside one argument: from the text to its figures */
	--oks-exit: clamp(4rem, 8vw, 6rem); /* the content has ended: before Läs vidare */
	--oks-statement: var(--wp--preset--font-size--x-large);
	--oks-display: 5rem; /* the top step of the type scale; the other five are the theme's sizes */
	--oks-focus: var(--wp--preset--color--ink);
	--oks-controls: 3.5rem;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { overflow-wrap: break-word; }
h1, h2, h3, h4, .oks-handelse__title, .oks-stat__label { hyphens: manual; overflow-wrap: break-word; }
/* No lone last word: headings balance their lines, running text avoids a one-word last line */
:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(main) :where(p, li, dd, figcaption) { text-wrap: pretty; }
.oks-nowrap { white-space: nowrap; }
/* Headings (h1–h3) never hyphenate mid-word, phones included ("fun-gerar"); a word too long for the line
   still breaks (overflow-wrap) instead of overflowing. Smaller labels may hyphenate on phones. */
@media (max-width: 599px) { h4, .oks-stat__label { hyphens: auto; } }
/* Acronyms with their expansion (IVO, SÄBO): a quiet dotted underline, the title on hover */
abbr[title] { text-decoration: underline dotted 1px; text-underline-offset: .2em; cursor: help; }
/* The title only shows on hover: a tap or the keyboard (oks_abbr_focusable) spells the term out in the text */
abbr[tabindex]:focus::after { content: " (" attr(title) ")"; }
/* Link underlines clear the descenders and stay fine on bold headings. Links and controls ease between states. */
body a:not(.wp-element-button) { text-underline-offset: .16em; text-decoration-thickness: max(1px, .07em); }
@media (prefers-reduced-motion: no-preference) { a, button, .oks-badge { transition: color .15s ease-out, background-color .15s ease-out, border-color .15s ease-out; } }
/* Browser surfaces carry the palette */
:root { accent-color: var(--wp--preset--color--teal); caret-color: var(--wp--preset--color--teal); -webkit-tap-highlight-color: color-mix(in srgb, var(--wp--preset--color--teal) 20%, transparent); }
::selection { background: var(--wp--preset--color--teal); color: var(--wp--preset--color--cream); }
:is(.oks-hero, .oks-band, .has-teal-background-color) ::selection { background: var(--wp--preset--color--cream); color: var(--wp--preset--color--teal); }
:is(.site-footer) ::selection { background: var(--wp--preset--color--amber); color: var(--wp--preset--color--ink); }
:where(a, abbr, button, input, select, textarea, summary, video):focus-visible { outline: 3px solid var(--oks-focus); outline-offset: 3px; border-radius: 2px; }
.oks-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* The visually-hidden data table is nowrap and wider than a phone; keep its box from widening the page. */
.oks-chart { position: relative; overflow-x: clip; margin: 1rem 0 0; }

/* The footer sits at the bottom of the short pages (404, search results): no cream strip under it. Only there:
   as flex items, the other pages' last margins would stop collapsing into the footer's and add height. */
:is(.error404, .search) .wp-site-blocks { min-height: 100dvh; display: flex; flex-direction: column; }
:is(.error404, .search) .wp-site-blocks > main { flex: 1 0 auto; }
/* 404: the five menu sections as a row of links under the search */
.oks-sections { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; font-weight: 700; }
.oks-sections a { display: inline-block; padding-block: .5rem; }
/* Search results: rows with a hairline, like the incidents and reports; the title a step above its sentence */
.oks-results { margin-block-start: 1.5rem; }
.oks-results .wp-block-post-template { margin-block: 0; }
.oks-results .wp-block-post-template > li { margin: 0; padding-block: 1.25rem; border-top: 1px solid var(--oks-line); }
.oks-results .wp-block-post-template > li:last-child { border-bottom: 1px solid var(--oks-line); }
.oks-results .wp-block-post-title { margin: 0; font-size: var(--wp--preset--font-size--large); line-height: 1.2; }
.oks-results .wp-block-post-excerpt { margin-block: .4rem 0; }
.oks-results .wp-block-post-excerpt__excerpt { margin: 0; }
.oks-results .wp-block-query-pagination { margin-block-start: 1.25rem; gap: .5rem; font-weight: 700; }
.oks-results .wp-block-query-pagination-numbers { display: flex; gap: .5rem; }
.oks-results .wp-block-query-pagination :is(a, .page-numbers) { display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; text-align: center; border-radius: var(--oks-radius-control); margin: 0; }
.oks-results .wp-block-query-pagination .page-numbers.current { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); }
.oks-results .wp-block-query-pagination > a { padding-inline: .75rem; }

/* Header & footer */
.site-header { background: var(--wp--preset--color--cream-dark); border-bottom: 0; padding-block: 1.1rem; }
.site-header .wp-block-navigation { gap: clamp(1rem, 2.2vw, 2.25rem); font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--medium); font-weight: 400; }
.site-header .wp-block-navigation-item__content { text-decoration: none; padding-block: .25rem; }
.site-header .wp-block-navigation-item__content:hover,
.site-header .wp-block-navigation-item__content[aria-current="page"],
.site-header .is-ancestor > .wp-block-navigation-item__content { text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; }
.site-header .wp-block-navigation { flex: none; margin-inline-start: auto; } /* very large text: the menu drops under the name, still on the right, instead of pushing the page sideways */
/* The site's name is the header's identity and the way home (the menu has no "Start") */
.site-header .wp-block-site-title { margin: 0; font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large); font-weight: 700; line-height: 1.45; letter-spacing: 0; color: var(--wp--preset--color--teal); white-space: nowrap; }
.site-header .wp-block-site-title a { color: inherit; text-decoration: none; }
.site-header .wp-block-site-title a:hover { text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; }
/* "Meny" button + full-screen teal overlay with large cream links, up to 781px (core switches at 600px) */
.site-header .wp-block-navigation__responsive-container-open,
.site-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--teal); min-width: 48px; min-height: 48px; justify-content: flex-end; align-items: center; margin-inline-end: -6px; }
/* A larger icon (thicker lines) whose right edge meets the page margin */
.site-header :is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close) svg { width: 32px; height: 32px; }
.site-header .wp-block-navigation__responsive-container-close { display: flex; }
@media (max-width: 781px) {
	.site-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.site-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
.site-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; --oks-focus: var(--wp--preset--color--amber); }
.site-header .wp-block-navigation__responsive-container.is-menu-open :is(.wp-block-navigation__responsive-container-close, .wp-block-navigation-item__content, h1, h2, h3, h4, h5, h6) { color: var(--wp--preset--color--cream); }
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: var(--wp--preset--font-size--x-large); font-weight: 700; min-height: 48px; display: inline-flex; align-items: center; }
/* Overlay: the current page (or its section) keeps a clear cream underline */
.site-header .wp-block-navigation__responsive-container.is-menu-open :is(.wp-block-navigation-item__content[aria-current="page"], .is-ancestor > .wp-block-navigation-item__content) { text-decoration: underline; text-decoration-color: var(--wp--preset--color--cream); text-decoration-thickness: 3px; text-underline-offset: .25em; }
.site-footer { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--cream); padding-block: 3rem; margin-block-start: 4rem; --oks-focus: var(--wp--preset--color--amber); }
.site-footer :is(h1,h2,h3,h4,h5,h6) { color: var(--wp--preset--color--cream); }
.site-footer a:not(.wp-element-button), .site-footer .wp-social-link { color: var(--wp--preset--color--cream); }
.site-footer a:not(.wp-element-button):hover, .site-footer a:not(.wp-element-button):focus-visible { color: var(--wp--preset--color--amber); }
.site-footer .wp-element-button { background: var(--wp--preset--color--amber); color: var(--wp--preset--color--ink); }
.site-footer .wp-element-button:hover, .site-footer .wp-element-button:focus-visible { background: var(--wp--preset--color--cream); color: var(--wp--preset--color--ink); }
.oks-footer-info { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--cream) 25%, transparent); font-size: var(--wp--preset--font-size--small); display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; }
.oks-footer-info p { margin: 0; }
.oks-footer-info img { display: block; width: 140px; max-width: 140px; height: auto; }
.site-footer ul.wp-block-list { list-style: none; padding-left: 0; }
.site-footer ul.wp-block-list li + li { margin-top: .35rem; }

/* Block styles */
.is-style-ingress { font-size: var(--wp--preset--font-size--large); line-height: 1.45; color: var(--wp--preset--color--teal); font-weight: 700; }
/* A long ingress (Problemen) is set in regular weight and bolds only its key sentence, so the bold part stays one line's worth, like the short ledes */
.is-style-ingress:has(strong) { font-weight: 400; }
.is-style-ingress strong { font-weight: 700; }
.is-style-ruta { background: var(--wp--preset--color--sand); border-radius: var(--oks-radius); padding: clamp(1.25rem, 3vw, 2rem); }

/* Nyckeltal */
.oks-stats { display: grid; gap: 2rem clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
/* A figure is not a card: a hairline above it (as in the front page's Tre kriser), no box */
.oks-stat { scroll-margin-top: 1.5rem; padding: .9rem 0 0; border-top: 1px solid var(--oks-line); }
.oks-stat__value { font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--x-large); font-weight: 700; margin: 0; line-height: 1.05; color: var(--wp--preset--color--teal); }
/* The unit sits directly under the value on cards (one figure; it never wraps on its own at a random width) */
.oks-stat__unit { display: block; margin-top: .2rem; font-size: var(--wp--preset--font-size--small); font-weight: 700; line-height: 1.2; color: var(--wp--preset--color--ink); }
/* Paired figures: "privat 82 %" and "kommunal 77 %" on their own lines on cards, inline (with ·) in sentences */
.oks-stat__pair { white-space: nowrap; }
.oks-stat__value--pairs .oks-stat__pair { white-space: normal; } /* on a card: wraps only if a very large text size leaves no room */
.oks-stat__value--pairs .oks-stat__pair { display: block; }
.oks-stat__value--pairs .oks-stat__sep { display: none; }
.oks-stat__pair .oks-stat__unit { display: inline-block; min-width: 5.5em; margin: 0; }
/* Trend ("9,16 → 10,06"): the start value and arrow smaller and muted, the current value carries the figure */
.oks-stat__from { font-size: var(--wp--preset--font-size--medium); letter-spacing: 0; color: var(--wp--preset--color--muted); white-space: nowrap; }
.oks-stat__label { font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--medium); font-weight: 700; line-height: 1.2; color: var(--wp--preset--color--teal); margin: 0 0 .5rem; }
/* Wide stat rows (problem pages, press): three across, two plus a full-width one, or one column – never a lone card */
.oks-stats.alignwide { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .oks-stats.alignwide { grid-template-columns: repeat(2, minmax(0, 1fr)); } .oks-stats.alignwide > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 900px) { .oks-stats.alignwide { grid-template-columns: repeat(3, minmax(0, 1fr)); } .oks-stats.alignwide > :last-child:nth-child(odd) { grid-column: auto; } }
/* Figures are link targets (#nyckeltal-…): land below the top edge and show which one was meant */
.oks-stat:target { outline: 3px solid var(--wp--preset--color--teal); outline-offset: 3px; }
.oks-stats__updated { margin-block: 0 1.25rem !important; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.oks-stat__desc, .oks-stat__source { font-size: var(--wp--preset--font-size--small); margin: .5rem 0 0; }
.oks-stat__source { color: var(--wp--preset--color--muted); }

/* Charts */
.oks-chart svg { display: block; width: 100%; max-width: 26rem; height: auto; font-family: var(--wp--preset--font-family--body); font-size: 16px; font-variant-numeric: tabular-nums; }
.oks-chart__bar, .oks-chart__dot { fill: var(--wp--preset--color--teal); }
.oks-chart__line { stroke: var(--wp--preset--color--teal); stroke-width: 3; }
.oks-chart__label, .oks-chart__value { fill: var(--wp--preset--color--ink); }

/* Vittnesmål */
.oks-testimonies { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.oks-testimony { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1rem; align-items: start; background: var(--wp--preset--color--sand); border-radius: var(--oks-radius); padding: 1.25rem; }
.oks-testimony--no-portrait { grid-template-columns: minmax(0, 1fr); }
/* Films: the player box is the picture plus a strip below it, so the native controls (shown while paused)
   never cover the burned-in subtitles. Native size comes from the attachment (--oks-film-w / --oks-film-r);
   never wider than the file. */
.wp-block-video, .oks-film { container-type: inline-size; --oks-film-w: 854px; --oks-film-r: .5621; margin-block: 1rem; }
:is(.wp-block-video, .oks-film) video { --oks-film-box: min(100cqw, var(--oks-film-w)); display: block; width: var(--oks-film-box); max-width: 100%; height: calc(var(--oks-film-box) * var(--oks-film-r) + var(--oks-controls)); object-fit: contain; object-position: top; background: #000; border-radius: var(--oks-radius); }
:is(.wp-block-video, .oks-film) figcaption { margin: .5rem 0 0; }
/* core sets object-fit: cover on videos with a poster, which would crop the picture into the strip */
:is(.wp-block-video, .oks-film) video[poster] { object-fit: contain; }
/* Phones: films run edge to edge, outside any card padding */
@media (max-width: 599px) {
	/* Negative margins equal to the padding around the film (no 100vw: it includes classic scrollbars) */
	.wp-block-video, .oks-film { width: auto; max-width: none; margin-inline: calc(-1 * var(--oks-bleed, var(--wp--style--root--padding-left, 1rem))) !important; }
	:is(.wp-block-video, .oks-film) video { margin-inline: auto; border-radius: 0; }
	:is(.wp-block-video, .oks-film) figcaption { padding-inline: 1rem; }
}
.oks-testimony__media { position: relative; width: 96px; aspect-ratio: 1; overflow: hidden; border-radius: 50%; }
/* Portraits are stills from the interview films (logo top left, subtitles at the bottom): zoom in on the face. */
.oks-testimony__portrait { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; transform: scale(1.6); transform-origin: 55% 36%; }
.oks-testimony__media > a { display: block; width: 100%; height: 100%; }
/* Film affordance: a drawn play button over the portrait (decorative; "Se filmen" is the real link) */
.oks-testimony__play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.oks-testimony__play svg { width: 40%; height: auto; max-width: 3.5rem; filter: drop-shadow(0 1px 3px var(--oks-line)); }
.oks-testimony__play circle { fill: color-mix(in srgb, var(--wp--preset--color--ink) 72%, transparent); }
.oks-testimony__play path { fill: var(--wp--preset--color--cream); }
.oks-testimony__media > a:hover .oks-testimony__play circle { fill: var(--wp--preset--color--teal); }
.oks-testimony__film { margin: .5rem 0 0; font-weight: 700; }
.oks-testimony__summary { margin: 0; }
.oks-testimony__quote { margin: 0; padding: 0; border: 0; font-size: var(--wp--preset--font-size--large); font-style: italic; }
.oks-testimony__name { font-weight: 700; margin: .75rem 0 0; }
.oks-testimony__role { margin: 0; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
@media (max-width: 480px) { .oks-testimony { grid-template-columns: minmax(0, 1fr); } }

/* A wide page's lede shares the left edge with its wide headings and grids, at a readable measure */
.oks-lede > p { max-width: 46rem; margin-block: 0; }
.oks-lede > p + p { margin-block-start: 1.25rem; }
/* A short section on a wide page keeps the page's left edge at a readable measure (long essays keep the centred column) */
.wp-block-post-content > .oks-section { margin-block-start: var(--oks-section); }
.oks-section > * { max-width: 46rem; }
.oks-section > h2 { margin-block: 0 1rem; }
.oks-section > .oks-rapporter { max-width: none; margin-block: 0; }
.oks-section > :last-child { margin-block-end: 0; }
/* A section with one small errand (Press: Logotyp) does not rank with the big ones */
/* A testimony and its second film (Kapacitetsbristen) are equals, side by side */
@media (min-width: 960px) {
	.oks-section:has(> .oks-testimonies + .wp-block-video) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; align-items: start; }
	.oks-section:has(> .oks-testimonies + .wp-block-video) > * { max-width: none; margin-block: 0; }
	.oks-section:has(> .oks-testimonies + .wp-block-video) > h2 { grid-column: 1 / -1; }
}
/* Vittnesmål page: films as 16:9 stills – two large case features, interviews in a grid */
.oks-filmcards { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem) 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .oks-filmcards--film { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .oks-filmcards--film { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 782px) { .oks-filmcards--stor { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; } }
.oks-filmcard__media { position: relative; display: block; container-type: inline-size; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--oks-radius); background: #000; }
.oks-filmcard__img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Every still shows a face: the play button sits in the lower-left corner, the duration lower right */
.oks-filmcard__media .oks-testimony__play { inset: auto auto .6rem .6rem; display: block; }
.oks-filmcard__media .oks-testimony__play svg { display: block; width: clamp(2.5rem, 12cqi, 3.5rem); min-width: 2.5rem; max-width: 3.5rem; }
.oks-filmcard__time { position: absolute; right: .6rem; bottom: .6rem; padding: .15rem .5rem; border-radius: var(--oks-radius-control); background: color-mix(in srgb, var(--wp--preset--color--ink) 85%, transparent); color: var(--wp--preset--color--cream); font-size: var(--wp--preset--font-size--small); font-weight: 700; line-height: 1.45; font-variant-numeric: tabular-nums; }
.oks-filmcard__body > * { margin: 0; }
.oks-filmcard__body { padding-top: .85rem; }
.oks-filmcard__name { font-size: var(--wp--preset--font-size--medium); line-height: 1.2; }
.oks-filmcard--stor .oks-filmcard__name { font-size: var(--wp--preset--font-size--large); }
.oks-filmcard__role { margin-top: .2rem !important; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.oks-filmcard__text { margin-top: .75rem !important; max-width: 60ch; }
.oks-filmcard:has(.oks-filmcard__media:hover) .oks-filmcard__name a { text-decoration-thickness: 2px; }
.oks-filmcard__media:hover .oks-testimony__play circle { fill: var(--wp--preset--color--teal); }

/* Händelser */
.oks-handelser { list-style: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
/* An incident is not a card: a hairline above it, no box (rows in the archive, columns on the front page) */
.oks-handelse article { padding-top: 1rem; border-top: 1px solid var(--oks-line); }
.oks-handelse__meta { margin: 0; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.oks-handelse__meta time { font-weight: 400; color: var(--wp--preset--color--ink); font-variant-numeric: tabular-nums; }
.oks-handelse__title { font-size: var(--wp--preset--font-size--large); margin: .25rem 0 .5rem; }
.oks-handelse__summary { margin: 0 0 .5rem; }
.oks-handelse__summary > p { margin: 0 0 .5rem; }
.oks-handelse__source { margin: 0; font-size: var(--wp--preset--font-size--small); }
.oks-badges { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.oks-badges li { font-size: var(--wp--preset--font-size--small); line-height: 1.2; }
/* Topic badges are links to the archive filtered by that topic: a pill you can see is a control (≥ 32px to tap),
   underlined on hover and focus. Statuses (IVO-anmäld, Lex Sarah) are labels, not links: plain bold text. */
.oks-badge { display: inline-flex; align-items: center; min-height: 2rem; box-sizing: border-box; padding: .35rem .85rem; border: 1px solid color-mix(in srgb, var(--wp--preset--color--teal) 55%, transparent); border-radius: 999px; background: var(--wp--preset--color--cream); color: var(--wp--preset--color--ink); text-decoration: none; }
.oks-badge:hover, .oks-badge:focus-visible { color: var(--wp--preset--color--teal); border-color: var(--wp--preset--color--teal); text-decoration: underline; text-underline-offset: .2em; }
.oks-badges--status { gap: .25rem 1.25rem; }
.oks-badges--status li { font-weight: 700; color: var(--wp--preset--color--ink); }
.oks-meta dd .oks-badges { margin: 0; }
.oks-more { margin-top: 1rem; font-weight: 700; }

/* Filter & sidnumrering */
/* Filter row: Region, Typ, År and Visa in one balanced row on desktop, two by two on tablets, stacked on phones */
.oks-filters { display: grid; gap: 1rem; align-items: end; grid-template-columns: minmax(0, 1fr); background: var(--wp--preset--color--sand); padding: 1.25rem; border-radius: var(--oks-radius); }
@media (min-width: 480px) { .oks-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .oks-filters { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, .8fr) auto; } }
.oks-filters__field { display: grid; gap: .25rem; min-width: 0; }
.oks-filters__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.oks-filters__reset { font-weight: 700; }
.oks-filters label { font-weight: 700; }
.oks-filters select { width: 100%; }
.oks-filters select, .wp-block-search .wp-block-search__input { font: inherit; min-height: 48px; padding: .5rem; border: 2px solid var(--wp--preset--color--ink); border-radius: var(--oks-radius-control); background: var(--wp--preset--color--white); color: var(--wp--preset--color--ink); }
/* The search field is the same control as the filter's */
.wp-block-search .wp-block-search__label { font-weight: 700; }
.wp-block-search .wp-block-search__button { min-height: 48px; margin-inline-start: .5rem; }
.oks-filters button { min-height: 48px; padding-inline: 1.5rem; border: 0; cursor: pointer; font-size: inherit; }
.oks-count { font-size: var(--wp--preset--font-size--large); margin-top: 2rem; }
.oks-pagination ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.oks-pagination a, .oks-pagination li > span { display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; text-align: center; border-radius: var(--oks-radius-control); }
.oks-pagination li > span[aria-current] { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); }
.oks-pagination .oks-pagination__step { padding-inline: .75rem; font-weight: 700; }
.oks-empty { font-size: var(--wp--preset--font-size--large); }
.oks-empty a { font-weight: 700; }
/* Verkligheten: the archive is a list of rows with a date rail (date and kommun left, the text right on desktop;
   stacked on phones); "Visa mer" opens the rest of the summary in place */
.oks-archive .oks-handelser--kompakt { grid-template-columns: minmax(0, 1fr); gap: 0; }
.oks-archive .oks-handelser--kompakt .oks-handelse article { height: auto; padding-block: 1.25rem; }
.oks-archive .oks-handelse:last-child article { border-bottom: 1px solid var(--oks-line); }
.oks-archive .oks-handelser--kompakt .oks-handelse article > :not(.oks-handelse__meta) { max-width: 48rem; }
.oks-handelse__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; margin-top: .25rem; }
.oks-handelse__foot > * { margin: 0 !important; }
.oks-handelse__foot > .oks-handelse__more[open] { flex-basis: 100%; }
@media (min-width: 782px) {
	.oks-archive .oks-handelser--kompakt .oks-handelse article { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 2rem; align-items: start; }
	.oks-archive .oks-handelser--kompakt .oks-handelse article > * { grid-column: 2; }
	.oks-archive .oks-handelse article > .oks-handelse__meta { grid-column: 1; grid-row: 1 / -1; padding-top: .2rem; }
	.oks-archive .oks-handelse__meta .oks-handelse__sep { display: none; }
	.oks-archive .oks-handelse__meta .oks-handelse__kommun { display: block; }
	.oks-archive .oks-handelse__title { margin-top: 0; }
}
.oks-handelse__more { margin: 0 0 .75rem; }
.oks-handelse__more > summary { cursor: pointer; font-weight: 700; color: var(--wp--preset--color--teal); min-height: 44px; display: flex; align-items: center; gap: .4rem; list-style: none; width: fit-content; }
.oks-handelse__more > summary::-webkit-details-marker { display: none; }
.oks-handelse__more > summary::before { content: ""; width: .5em; height: .5em; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .15s ease-out; }
.oks-handelse__more[open] > summary::before { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .oks-handelse__more > summary::before { transition: none; } }
.oks-handelse__more > summary:hover { text-decoration: underline; }
.oks-handelse__rest > p { margin: 0 0 .5rem; }
/* Archive: the title reads a step above its summary */
.oks-archive .oks-handelser--kompakt .oks-handelse__title { font-size: var(--wp--preset--font-size--large); line-height: 1.2; }
.oks-archive :is(.oks-handelse__summary, .oks-handelse__rest) { font-size: var(--wp--preset--font-size--small); line-height: 1.45; }
.oks-handelser--kompakt .oks-badges { margin-top: 0; }
/* Verkligheten: table of contents, the archive's intro (wide, like the archive), the two quotes side by side */
.oks-toc { border-block: 1px solid var(--oks-line); padding-block: 1rem; }
.oks-toc > * { margin-block: 0; }
.oks-toc__title { font-weight: 700; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.oks-toc ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin-block-start: .35rem; }
.oks-toc a { display: inline-block; padding-block: .3rem; }
.oks-archive-intro { margin-block-start: var(--oks-section) !important; }
.oks-archive-intro > * { margin-block: 0 1rem; max-width: 46rem; }
.oks-archive-intro > h2 { margin-block-end: .75rem; }
.oks-quotes { margin-block-start: var(--oks-section) !important; }
/* The quote is the evidence, its source only the reference */
.oks-quotes .is-style-ruta > p:first-child { font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large); font-weight: 700; line-height: 1.2; }
.oks-quotes .is-style-ruta > p:last-child { font-size: var(--wp--preset--font-size--small); margin-block-start: 1rem; }
.oks-quotes .is-style-ruta > p:last-child > a:only-child { font-weight: 400; }
/* After the list a new part of the page begins */
.oks-archive + .oks-intro { margin-block-start: var(--oks-exit) !important; padding-block-start: var(--oks-step); border-block-start: 1px solid var(--oks-line); }
.oks-quotes .is-style-ruta { height: 100%; box-sizing: border-box; }

/* Förslag, rapporter, kort */
.oks-forslag { list-style: none; padding: 0; counter-reset: forslag; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.oks-forslag > li { counter-increment: forslag; position: relative; background: var(--wp--preset--color--sand); border-radius: var(--oks-radius); padding: 1.25rem 1.25rem 1.25rem 4rem; }
.oks-forslag > li::before { content: counter(forslag); position: absolute; left: 1.25rem; top: 1.1rem; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--teal); }
.oks-forslag h3 { margin: 0 0 .5rem; }
/* Lösningar: the nine reform tracks as a compact, citable list (#<slug>): number + title, then Förslag and Effekt,
   hairlines between rows, no card. Desktop: one row per track (title | Förslag | Effekt). */
.oks-forslag.oks-reformspar { display: block; margin-block-start: 1.25rem; }
.oks-forslag.oks-reformspar > li { background: none; border-radius: 0; padding: .9rem 0 .9rem 2.5rem; border-top: 1px solid var(--oks-line); scroll-margin-top: 1.5rem; }
.oks-forslag.oks-reformspar > li:last-child { border-bottom: 1px solid var(--oks-line); }
.oks-forslag.oks-reformspar > li::before { left: 0; top: .9rem; font-size: var(--wp--preset--font-size--medium); line-height: 1.2; }
.oks-reformspar__title { margin: 0 0 .25rem !important; font-size: var(--wp--preset--font-size--medium); line-height: 1.2; }
.oks-reformspar__text { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.45; }
.oks-reformspar__text + .oks-reformspar__text { margin-top: .2rem; }
.oks-forslag.oks-reformspar > li:target { outline: 3px solid var(--wp--preset--color--teal); outline-offset: 3px; }
.oks-reformspar__head { display: none; }
@media (min-width: 900px) {
	/* Förslag and Effekt said once, as column heads; the labels in the rows stay for screen readers */
	.oks-reformspar__head { display: grid; box-sizing: border-box; grid-template-columns: minmax(0, 15rem) minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 2rem; margin-block-start: 1.25rem; padding-inline-start: 2.5rem; font-size: var(--wp--preset--font-size--small); font-weight: 700; }
	.oks-reformspar__head > :first-child { grid-column: 2; }
	.oks-reformspar__head + .oks-forslag.oks-reformspar { margin-block-start: .4rem; }
	.oks-reformspar__text strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.oks-forslag.oks-reformspar > li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 2rem; align-items: baseline; }
	.oks-reformspar__title { margin: 0 !important; }
	.oks-reformspar__text + .oks-reformspar__text { margin-top: 0; }
}
/* The report the Olle Andersson film is about, linked right under the film */
.oks-film-link { margin-block-start: .75rem !important; font-weight: 700; }
.oks-cards { list-style: none; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
/* Reports and articles: rows, not cards. The cover (a cut-out with a transparent background, kept whole) in a
   240px box beside the text, above it at 160px on phones; a hairline between rows. */
.oks-rapporter { list-style: none; padding: 0; margin-block: 1rem 0; }
.oks-rapport { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 1.75rem; align-items: start; padding-block: 1.5rem; border-top: 1px solid var(--oks-line); }
.oks-rapporter + .oks-rapporter { margin-block-start: 0; }
.oks-rapport__cover { width: 160px; }
.oks-rapport__cover img { display: block; width: 100%; height: auto; }
@media (min-width: 600px) { .oks-rapport--omslag { grid-template-columns: 240px minmax(0, 1fr); } .oks-rapport__cover { width: 240px; } }
.oks-rapport__body > * { margin-block: 0; }
.oks-rapport__body > * + * { margin-block-start: .6rem; }
.oks-rapport__body > * { max-width: 46rem; }
/* A report's action stands clear of its text; inline-block, so the button's padding counts in the layout */
.oks-rapport__body > p:has(> .wp-element-button), .oks-fields p:has(> .wp-element-button) { margin-block-start: 1rem; }
:is(.oks-rapport__body, .oks-fields) p > .wp-element-button { display: inline-block; box-sizing: border-box; max-width: 100%; overflow-wrap: anywhere; } /* a long address may break at very large text sizes */
.oks-rapport__body h3 { font-size: var(--wp--preset--font-size--large); line-height: 1.2; }
/* Our own reports (with a cover) carry the filled button; an article elsewhere the outlined one */
.oks-rapport:not(.oks-rapport--omslag) .wp-element-button:not(:hover, :focus-visible) { background: none; color: var(--wp--preset--color--teal); box-shadow: inset 0 0 0 2px currentColor; }
/* Läs vidare: always wide, laid out by its own width (container query), never 3 narrow columns or a lone card */
/* It leads away from the page, so it ranks below the page: its own hairline, a smaller heading, low pictures */
.oks-read-more { container-type: inline-size; margin-block-start: var(--oks-exit) !important; padding-block-start: var(--oks-step); border-block-start: 1px solid var(--oks-line); }
.oks-read-more__title { margin: 0 0 1rem; font-size: var(--wp--preset--font-size--large); }
.oks-read-more .oks-card > img { aspect-ratio: 5 / 2; }
.oks-read-more .oks-card h3 { font-size: var(--wp--preset--font-size--medium); line-height: 1.2; }
.oks-read-more .oks-card--text h3 { font-size: var(--wp--preset--font-size--large); }
.oks-read-more .oks-card p { font-size: var(--wp--preset--font-size--small); line-height: 1.45; }
/* One column on a phone: three pictures would take a whole screen on the way out; the cards are text */
@container (max-width: 479.98px) { .oks-read-more .oks-card > img { display: none; } }
.oks-read-more .oks-cards { grid-template-columns: minmax(0, 1fr); margin: 0; }
.oks-read-more .oks-card > img { flex: none; }
@container (min-width: 480px) {
	.oks-read-more .oks-cards:has(> li:nth-child(even):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	/* odd counts below three-across: one column of horizontal cards */
	.oks-read-more .oks-cards:not(:has(> li:nth-child(even):last-child)) .oks-card { flex-direction: row; }
	.oks-read-more .oks-cards:not(:has(> li:nth-child(even):last-child)) .oks-card > img { width: 38%; aspect-ratio: 4 / 3; height: auto; }
}
@container (min-width: 860px) {
	.oks-read-more .oks-cards:has(> li:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.oks-read-more .oks-cards:has(> li:nth-child(3):last-child) .oks-card { flex-direction: column; }
	.oks-read-more .oks-cards:has(> li:nth-child(3):last-child) .oks-card > img { width: 100%; aspect-ratio: 2 / 1; }
}
/* Two cards: the image beside the text, like the odd counts above. Stacked, two half-page photos would outweigh the page. */
@container (min-width: 860px) {
	.oks-read-more .oks-cards:has(> li:nth-child(2):last-child) .oks-card { flex-direction: row; }
	.oks-read-more .oks-cards:has(> li:nth-child(2):last-child) .oks-card > img { width: 38%; aspect-ratio: 4 / 3; }
}
@container (min-width: 1000px) { .oks-read-more .oks-cards:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* A card without a picture (or whose picture the row already shows) is text-only: the title a size up, top-aligned;
   the row's cards share one height (grid rows stretch) */
.oks-card--text .oks-card__body { padding: clamp(1.25rem, 2.5vw, 1.75rem); }
.oks-card--text h3 { font-size: var(--wp--preset--font-size--x-large); line-height: 1.05; margin: 0 0 .6rem; }
.oks-card { display: flex; flex-direction: column; overflow: hidden; background: var(--wp--preset--color--sand); border-radius: var(--oks-radius); color: inherit; text-decoration: none; }
.oks-card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
/* Covers on a white ground (the sharing image, the thumbnail): the white gives way to the card's sand */
:is(.oks-card, .oks-report__cover) img[src*="/omslag-"] { mix-blend-mode: multiply; }
.oks-card__body { padding: 1.25rem; }
.oks-cards > li { display: flex; }
.oks-cards > li > .oks-card { flex: 1; }
.oks-card:hover h3, .oks-card:focus-visible h3 { text-decoration: underline; }

/* An incident's page ends with other incidents (compact rows) and one line to the essay */
.oks-fler { margin-block-start: var(--oks-section) !important; }
.oks-fler > h2 { margin-block: 0 1rem; }
.oks-fler .oks-handelser.oks-handelser--rader { grid-template-columns: minmax(0, 1fr); gap: 0; margin-block: 0; }
.oks-fler .oks-handelser.oks-handelser--rader .oks-handelse article { padding-block: 1rem; height: auto; }
.oks-fler .oks-handelser.oks-handelser--rader .oks-handelse:last-child article { border-bottom: 1px solid var(--oks-line); }
.oks-fler .oks-handelser.oks-handelser--rader .oks-handelse__source { margin-top: .5rem; }
.oks-fler__essay { margin-block: 1.5rem 0; font-weight: 700; }

/* Fält på enskilda sidor */
.oks-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem 1rem; }
.oks-meta dt { font-weight: 700; }
.oks-meta dd { margin: 0; }
.oks-sources { padding-left: 1.25rem; }

/* A fixed-width featured image (a report's cover) never outgrows a narrow phone */
.wp-block-post-featured-image { max-width: 100%; }

/* The narrowest phones: a long heading word ("avkommersialisering") still fits its line */
@media (max-width: 359.98px) { .wp-block-post-content h2 { font-size: var(--wp--preset--font-size--large); } }

/* Section headings in running page text get room above them */
.wp-block-post-content > h2.wp-block-heading:not(:first-child) { margin-block-start: var(--oks-section); }
/* Page intro (text beside the featured illustration): text starts at the top, not centred against the image */
.oks-intro > .wp-block-column > :first-child { margin-block-start: 0; }
/* Problemen: the Varning: Norge box sizes to its three lines, top-aligned with the image (which keeps its 4:3) */
.oks-feature > .wp-block-column { display: flex; flex-direction: column; }
.oks-feature .is-style-ruta { flex: none; display: flex; flex-direction: column; justify-content: flex-start; margin: 0; }
.oks-feature .is-style-ruta > * { margin-inline: 0 !important; }
.oks-feature .wp-block-image { margin: 0 0 2.25rem; position: relative; }
.oks-feature .wp-block-image figcaption { position: absolute; top: 100%; left: 0; right: 0; }
.oks-feature > .wp-block-column:has(.is-style-ruta) { padding-bottom: 2.25rem; }
@media (max-width: 781px) { .oks-feature > .wp-block-column:has(.is-style-ruta) { padding-bottom: 0; } }

/* Overview columns after an intro (Problemen): more room above the column headings than below them */
.wp-block-post-content > .wp-block-columns.alignwide:not(:first-child) { margin-block-start: var(--oks-section); }
/* Columns directly under their own heading belong to it */
.wp-block-post-content > h2 + .wp-block-columns.alignwide:not(:first-child) { margin-block-start: 1.25rem; }
.wp-block-column > h2.wp-block-heading:first-child { margin-block-end: .5rem; }
/* Problemen: the front page's text-link pattern, pinned to the bottom of each column so the links share a baseline */
.oks-overview > .wp-block-column { display: flex; flex-direction: column; }
.oks-overview > .wp-block-column > p:last-child { margin-block-start: auto; padding-top: 1.25rem; font-weight: 700; }
/* Desktop: heading, question, the figure's label, explanation, bars and source, text and link each share a row across the three columns, so the bars start level */
@media (min-width: 1000px) {
	.wp-block-columns.oks-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.oks-overview > .wp-block-column { display: grid; grid-row: span 8; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
	.oks-overview .oks-stats, .oks-overview .oks-stat { display: grid; grid-row: span 4; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); row-gap: 0; }
	.oks-overview .oks-stat__label { grid-row: 1; }
	.oks-overview .oks-stat__desc { grid-row: 2; }
	.oks-overview .oks-stat__value { grid-row: 3; }
	.oks-overview .oks-stat__source { grid-row: 4; }
}
/* Narrower, "Kapacitetsbristen" no longer fits a third of the page: one crisis after the other, at a readable measure */
@media (max-width: 999.98px) {
	.wp-block-columns.oks-overview { flex-wrap: wrap !important; }
	.oks-overview > .wp-block-column { flex-basis: 100% !important; }
	.oks-overview > .wp-block-column > * { max-width: 46rem; }
}
.is-style-ruta > p:last-child > a:only-child { font-weight: 700; }

/* Teal page band (old-site look) */
.oks-hero { background: var(--wp--preset--color--teal); color: var(--wp--preset--color--cream); margin-block: 0 clamp(2rem, 5vw, 3.5rem) !important; padding: clamp(2.5rem, 6vw, 4.5rem) 1rem; text-align: center; --oks-focus: var(--wp--preset--color--amber); }
.oks-hero__inner { max-width: 1100px; margin-inline: auto; }
/* The longest band title ("Kapacitetsbristen", ~9em in Filson Soft) must fit on one line: cap the size at what fits the band. */
.oks-hero__title { color: var(--wp--preset--color--sand); font-size: min(var(--oks-display), max(2.5rem, 8.5vw), calc((100vw - 2rem) / 9.2)); line-height: 1.05; margin: 0; overflow-wrap: break-word; }
.oks-hero__sub { color: var(--wp--preset--color--sand); font-size: var(--wp--preset--font-size--large); font-weight: 700; line-height: 1.2; margin: 1.25rem auto 0; max-width: 24em; text-wrap: balance; }
/* Title-only bands (no Underrubrik) are shorter: ~200px at 1440 instead of ~320, same title size */
.oks-hero--kort { padding-block: clamp(2rem, 4vw, 3.25rem); }
/* Long titles (over 40 characters, an incident's headline) are set smaller and balanced, so they take two or three lines, not four */
.oks-hero--lang .oks-hero__title { font-size: var(--wp--preset--font-size--xx-large); line-height: 1.05; max-width: 24em; margin-inline: auto; }
.oks-hero__back { margin: 0 0 1rem; font-size: var(--wp--preset--font-size--small); }
.oks-hero__back a { color: var(--wp--preset--color--sand); display: inline-block; padding-block: 11px; margin-block: -11px; } /* 44px to tap, same line */
.oks-hero a { color: var(--wp--preset--color--cream); }
/* Front-page hero (old-site pattern): teal band, sand card with the text and the latest reports and articles */
.oks-hero-film { background: var(--wp--preset--color--teal); padding: clamp(1.5rem, 4vw, 3.5rem) 1rem; margin-block-start: 0 !important; }
.oks-hero-film > .oks-hero-card { background: var(--wp--preset--color--sand); color: var(--wp--preset--color--ink); border-radius: var(--oks-radius); padding: clamp(1.5rem, 4vw, 3rem); gap: clamp(1.5rem, 4vw, 3.5rem); margin-block: 0; }
.oks-hero-card__text > * { margin-block: 0; }
.oks-hero-card__text > * + * { margin-block-start: 1rem; }
.oks-hero-card__text { container-type: inline-size; }
/* Capped by its column, so "Omsorgskrisen" stays whole on the narrowest phones and at large text sizes */
.oks-hero-card h1 { color: var(--wp--preset--color--teal); font-size: min(var(--wp--preset--font-size--xx-large), 13cqi); line-height: 1; hyphens: manual; }
.oks-hero-card .is-style-ingress { font-size: var(--wp--preset--font-size--medium); line-height: 1.2; color: var(--wp--preset--color--teal); }
/* The thesis is the line to remember: larger than the question, ink on sand */
.oks-hero-card .oks-thesis { font-family: var(--wp--preset--font-family--heading); font-size: var(--oks-statement); line-height: 1.2; letter-spacing: -.01em; color: var(--wp--preset--color--ink); text-wrap: balance; margin-block-start: 1.25rem; }
.oks-hero-card .wp-block-buttons { margin-block-start: 1.75rem; }
/* 480p films: never wider than the file, no layout jump before the metadata loads */
.oks-closing__film .wp-block-video { margin-block: 0; }
@media (min-width: 960px) { .oks-hero-card__text { flex: 1 1 0 !important; } .oks-hero-card__nytt { flex: 1 1 0 !important; } }
/* Latest reports and articles beside the hero text: picture, type line, title; each row one link (oks/rapporter kompakt) */
.oks-hero-card__nytt > * { margin-block: 0; }
.oks-nytt__rubrik { font-size: var(--wp--preset--font-size--medium); line-height: 1.2; color: var(--wp--preset--color--teal); }
.oks-rapporter--kompakt { display: grid; gap: .75rem; margin-block: 1rem 0; }
.oks-nytt { display: grid; grid-template-columns: min(8rem, 30%) minmax(0, 1fr); gap: 1rem; align-items: center; padding: .75rem; background: var(--wp--preset--color--cream); border-radius: var(--oks-radius); color: inherit; text-decoration: none; }
.oks-nytt:not(:has(.oks-nytt__bild)) { grid-template-columns: minmax(0, 1fr); }
.oks-nytt__bild { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: calc(var(--oks-radius) / 2); background: var(--wp--preset--color--sand); }
.oks-nytt__bild img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A cover is shown whole (portrait), its white paper blended into the tint */
.oks-nytt__bild--omslag img { object-fit: contain; padding: .4rem; box-sizing: border-box; mix-blend-mode: multiply; }
.oks-nytt__text { overflow-wrap: anywhere; } /* "rättighetsskyddet" at twice the text size */
.oks-nytt__meta .oks-nowrap { white-space: normal; } /* the narrow column: a date may wrap rather than push the page sideways */
.oks-nytt__meta { display: block; font-size: var(--wp--preset--font-size--small); line-height: 1.3; color: var(--wp--preset--color--muted); }
.oks-nytt__titel { display: block; margin-block-start: .3rem; font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--medium); font-weight: 700; line-height: 1.2; color: var(--wp--preset--color--ink); text-wrap: balance; }
.oks-nytt:hover .oks-nytt__titel, .oks-nytt:focus-visible .oks-nytt__titel { text-decoration: underline; }
.oks-nytt__alla { margin-block-start: 1rem !important; font-weight: 700; }
@media (max-width: 599px) { .oks-nytt { grid-template-columns: min(6rem, 30%) minmax(0, 1fr); gap: .75rem; } }
/* A tablet held upright: the text above the list, as on phones. */
@media (max-width: 959.98px) {
	.wp-block-columns:is(.oks-hero-card, .oks-closing) { flex-wrap: wrap !important; }
	.wp-block-columns:is(.oks-hero-card, .oks-closing) > .wp-block-column { flex-basis: 100% !important; }
}
@media (max-width: 599px) {
	.oks-hero-film > .oks-hero-card { padding: 1.5rem 1.25rem; }
}

/* Let the page band / cover touch the header (cancel blockGap above <main>) */
.wp-site-blocks > main:has(> .oks-hero, > .wp-block-post-content > :is(.oks-hero-film, .wp-block-cover.alignfull):first-child) { margin-block-start: 0; }

/* Front page: four beats (problem → proof → cause → fix), each with its own treatment */
.oks-beat { margin-block-start: var(--oks-section) !important; }
.oks-beat > h2 { margin-block: 0 1.25rem; }
/* Problem: a band of its own, so it cannot read as part of the incidents below. One crisis per row, a name on the
   left and its figure drawn on the right: rows let a bar run long enough to compare, and read straight down. */
.oks-beat--problem { margin-block-start: 0 !important; padding: clamp(3rem, 6vw, 4rem) 1rem; background: var(--wp--preset--color--sand); }
.oks-beat--problem > h2 { margin-block: 0 clamp(1.5rem, 3vw, 2.5rem); font-size: min(var(--wp--preset--font-size--xx-large), calc((100vw - 2rem) / 8.4)); line-height: 1.05; letter-spacing: -.02em; }
.oks-beat--problem > .oks-kris { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem clamp(2rem, 5vw, 4rem); margin-block: 0; padding-block: clamp(1.5rem, 2.5vw, 2rem); border-top: 1px solid var(--oks-line); }
.oks-beat--problem > .oks-kris:last-child { padding-block-end: 0; }
.oks-kris > * { margin-block: 0; }
.oks-kris > h3 { font-size: var(--wp--preset--font-size--x-large); line-height: 1.1; }
.oks-kris > p { font-weight: 700; }
/* Beside each other once the longest name fits its column whole ("Kapacitetsbristen" at 36px needs 20.5rem). */
@media (min-width: 860px) {
	.oks-beat--problem > .oks-kris { grid-template-columns: minmax(min(20.5rem, 40%), 1fr) minmax(0, 2fr); grid-template-rows: auto 1fr; }
	.oks-kris > .oks-stats { grid-column: 2; grid-row: 1 / span 2; }
	.oks-kris > :not(.oks-stats) { grid-column: 1; }
}
.oks-kris .oks-stats { display: block; }
.oks-kris .oks-stat { padding: 0; border-top: 0; }
.oks-kris .oks-stat__label { font-family: var(--wp--preset--font-family--body); font-size: var(--wp--preset--font-size--medium); color: var(--wp--preset--color--ink); margin: 0; }
.oks-kris .oks-stat__desc { font-size: var(--wp--preset--font-size--medium); margin-top: .125rem; text-wrap: pretty; }
.oks-kris .oks-stat__source { margin-top: .75rem; }
/* A crisis page's figures are its evidence, set out the same way: their own band, one figure per row. The page title
   already names the crisis, so each figure's name, meaning and source take the left column and its bars the right. */
.oks-figurer { margin-block-start: var(--oks-section) !important; padding: clamp(3rem, 6vw, 4rem) 1rem; background: var(--wp--preset--color--sand); }
.oks-figurer .oks-stats { display: block; }
.oks-figurer .oks-stat { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 4rem); padding-block: clamp(1.5rem, 2.5vw, 2rem); border-top: 1px solid var(--oks-line); }
.oks-figurer .oks-stat:first-child { padding-block-start: 0; border-top: 0; }
.oks-figurer .oks-stat:last-child { padding-block-end: 0; }
.oks-figurer .oks-stat__label { margin: 0; font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large); font-weight: 700; line-height: 1.2; color: var(--wp--preset--color--teal); }
.oks-figurer .oks-stat__desc { margin-top: .5rem; font-size: var(--wp--preset--font-size--medium); text-wrap: pretty; }
.oks-figurer .oks-stat__source { margin-top: .75rem; }
@media (min-width: 860px) {
	.oks-figurer .oks-stat { grid-template-columns: minmax(min(20.5rem, 40%), 1fr) minmax(0, 2fr); grid-template-rows: auto auto 1fr; }
	.oks-figurer .oks-stat > * { grid-column: 1; }
	.oks-figurer .oks-stat > .oks-stat__value { grid-column: 2; grid-row: 1 / span 3; margin-block-start: 0; }
}
/* The figure and what it counts on one line, the bar under them. A scale with a real end draws the whole of it. */
.oks-stat__value--bars { display: grid; align-self: start; gap: 1rem; margin-block-start: 1rem; }
.oks-stat__value--bars .oks-stat__sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.oks-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .625rem; }
.oks-bar__value { order: -1; max-width: 100%; overflow-wrap: anywhere; font-size: var(--wp--preset--font-size--xx-large); line-height: 1; letter-spacing: -.02em; font-variant-numeric: lining-nums; color: var(--wp--preset--color--teal); }
.oks-bar .oks-stat__unit { font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large); font-weight: 700; letter-spacing: 0; line-height: 1.2; color: var(--wp--preset--color--ink); }
.oks-bar__mark { display: block; flex: 0 0 100%; height: .875rem; margin-top: .25rem; }
.oks-bar__mark--track { background: color-mix(in srgb, var(--wp--preset--color--teal) 16%, transparent); }
.oks-bar__mark::before { content: ""; display: block; width: var(--oks-bar); height: 100%; border-radius: 0 4px 4px 0; background: var(--wp--preset--color--teal); print-color-adjust: exact; }
@media (forced-colors: active) {
	.oks-bar__mark { forced-color-adjust: none; outline: 1px solid CanvasText; }
	.oks-bar__mark::before { background: CanvasText; }
}
/* Proof: one quote at display size, then the latest incidents side by side */
.oks-pullquote { margin: 0 0 clamp(2rem, 4vw, 3rem); padding: 0; border: 0; }
.oks-pullquote p { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: var(--wp--preset--font-size--xx-large); line-height: 1.05; letter-spacing: -.02em; color: var(--wp--preset--color--teal); margin: 0; max-width: 17ch; text-wrap: balance; }
.oks-pullquote cite { display: block; margin-top: 1.25rem; font-style: normal; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); max-width: 60ch; text-wrap: balance; }
.oks-pullquote cite a:first-child { font-weight: 700; font-size: var(--wp--preset--font-size--medium); }
.oks-handelser--kompakt { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 2rem clamp(1.5rem, 3.5vw, 3.5rem); }
.oks-handelser--kompakt .oks-handelse article { box-sizing: border-box; height: 100%; display: flex; flex-direction: column; }
.oks-handelser--kompakt .oks-handelse__source { margin-top: auto; }
.oks-latest .oks-more { margin-top: 1.5rem; }
.oks-handelser--kompakt .oks-handelse__title { font-size: var(--wp--preset--font-size--medium); line-height: 1.2; }
/* Cause: full-width teal band, sand heading, cream text */
.oks-band { background: var(--wp--preset--color--teal); color: var(--wp--preset--color--cream); padding: clamp(3rem, 7vw, 5rem) 1rem; margin-block-start: var(--oks-section) !important; --oks-focus: var(--wp--preset--color--amber); }
.oks-band h2 { color: var(--wp--preset--color--sand); font-size: min(var(--wp--preset--font-size--xx-large), calc((100vw - 2rem) / 8.4)); line-height: 1.05; margin-block-end: 1.5rem; }
.oks-band a { color: var(--wp--preset--color--cream); font-weight: 700; }
.oks-band a:hover { color: var(--wp--preset--color--sand); }
.oks-band__lead { font-family: var(--wp--preset--font-family--heading); font-size: var(--oks-statement); font-weight: 700; line-height: 1.2; color: var(--wp--preset--color--sand); }
/* Lösningar: the same three proposals as the front page, wide, right under the page's first section */
.wp-block-post-content > .oks-forslag-tre { margin-block-start: var(--oks-section); }
.oks-forslag-tre > h2 { margin-block: 0 1.25rem; }
.oks-forslag-tre > p { max-width: 46rem; }
/* Fix: the three points as numbered sand cards in a row, then the testimony and two actions */
.oks-forslag--rad { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1.25rem; margin-block-start: 1.5rem; }
/* Titles share a row across the cards (subgrid), so the body text starts on one line */
.oks-forslag--rad > li { display: grid; grid-template-columns: minmax(0, 1fr); grid-row: span 2; grid-template-rows: subgrid; row-gap: .5rem; align-content: start; padding: 3.75rem 1.5rem 1.5rem; }
.oks-forslag--rad > li::before { left: 1.5rem; top: 1rem; font-size: var(--wp--preset--font-size--x-large); line-height: 1; }
.oks-forslag--rad > li strong { display: block; font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large); line-height: 1.2; color: var(--wp--preset--color--teal); margin-bottom: 0; align-self: start; }
/* The close ("Vittnesmål"): Magnus Jegermalm's film at no more than its native width, his line beside it
   (his name links to his vittnesmål, so the film needs no caption), then one primary and one secondary action */
.oks-beat--close > .oks-closing { margin-block: 0; gap: clamp(1.5rem, 4vw, 3rem); }
.oks-closing__lead a { font-weight: 700; }
.oks-closing__actions > * { margin-block: 0; }
.oks-closing__actions > p:not(.oks-closing__lead) { font-weight: 700; }
.oks-closing__actions > * + * { margin-block-start: 1rem; }
/* His own line beside the film frames it (same text as his vittnesmål) */
.oks-closing__lead { font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large); line-height: 1.2; color: var(--wp--preset--color--ink); }
/* The one action: the report, with its cover */
.oks-closing__actions > .oks-report { margin-block-start: 1.75rem; gap: 1.25rem; padding: 1.25rem; background: var(--wp--preset--color--sand); border-radius: var(--oks-radius); align-items: center; flex-wrap: wrap !important; }
/* The cover thumbnail (a book-only crop of the mockup) */
.oks-report__cover { margin: 0; flex: none; width: 6.5rem; }
.oks-report__cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.oks-report__body > * { margin-block: 0; }
.oks-report__title { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: var(--wp--preset--font-size--medium); line-height: 1.2; color: var(--wp--preset--color--teal); }
.oks-report__body .wp-block-buttons { margin-block-start: .75rem; }
.oks-report .wp-block-button__link { white-space: nowrap; }
/* Narrow closing column (tablets): the cover goes above the title instead of pushing the button out */
.oks-report__body { flex: 1 1 13rem; min-width: 0; } /* wide enough for the nowrap button, else the cover goes above */
@media (max-width: 480px) { .oks-closing__actions > .oks-report { gap: 1rem; padding: 1rem; } .oks-report__cover { width: 4.5rem; } .oks-report .wp-block-button__link { padding-inline: 1rem; white-space: normal; } }
/* Film and text about equally tall on desktop (the film ~600px wide, as in the hero) */
@media (min-width: 960px) { .oks-closing__film { flex: 1.1 1 0 !important; } .oks-closing__actions { flex: 1 1 0 !important; } }
/* Below three across: rows with the number beside the text (two across would leave a lone third card) */
@media (max-width: 959.98px) {
	.oks-forslag--rad { grid-template-columns: minmax(0, 1fr); }
	.oks-forslag--rad > li { padding: 1.25rem 1.25rem 1.25rem 3.5rem; }
	.oks-forslag--rad > li::before { left: 1.25rem; top: 1.15rem; font-size: var(--wp--preset--font-size--large); }
	.oks-forslag--rad > li > * { max-width: 46rem; }
}

/* Outline buttons speak teal, not ink */
.wp-block-button.is-style-outline > .wp-block-button__link { color: var(--wp--preset--color--teal); border-color: var(--wp--preset--color--teal); background: transparent; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { color: var(--wp--preset--color--white); background: var(--wp--preset--color--teal); }

/* Phones: two latest incidents are proof enough before "Se alla … händelser" */
@media (max-width: 599px) { .oks-beat--proof .oks-handelser--kompakt > li:nth-child(n+3) { display: none; } }

/* A phone on its side: the first screen shows content, not only the band; a film fits the screen, controls included;
   the whole menu fits without scrolling */
@media (max-height: 500px) and (orientation: landscape) {
	.site-header { padding-block: .25rem; }
	.oks-hero { padding-block: 1.25rem; margin-block-end: 1.5rem !important; }
	.oks-hero__back { margin-block-end: .25rem; }
	.oks-hero__title { font-size: min(3rem, 8vw); }
	.oks-hero__sub { margin-block-start: .5rem; font-size: var(--wp--preset--font-size--medium); }
	.oks-hero-film { padding-block: .75rem; }
	:is(.wp-block-video, .oks-film) video { --oks-film-box: min(100cqw, var(--oks-film-w), calc((100dvh - 1rem - var(--oks-controls)) / var(--oks-film-r))); margin-inline: auto; }
	.site-header .wp-block-navigation__responsive-container.is-menu-open { padding-block: .5rem; }
	.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 3rem; }
	.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 0; }
	.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: var(--wp--preset--font-size--large); min-height: 44px; padding-block: 0; }
}

/* Touch, on any screen size: small controls reach 44px. Where the look stays, the extra height is padding that
   the negative margin takes back, so the layout does not move. */
@media (pointer: coarse) {
	.oks-badge { min-height: 2.75rem; }
	.oks-toc a { padding-block: .5rem; }
	.site-footer .wp-block-social-links { margin-inline-start: -10px; }
	.site-footer .wp-social-link a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
	:is(.oks-filmcard__name, .wp-block-post-title, .site-header .wp-block-site-title) a, .oks-footer-info__logo { display: inline-block; padding-block: .65rem; margin-block: -.65rem; }
}

/* Print: journalists and offices print the figures and the proposals. Black on white paper, no screen furniture,
   nothing hidden behind "Visa mer", sources with their addresses. */
@media print {
	@page { margin: 16mm 14mm; }
	html { font-size: 75%; }
	body { background: none; }
	* { transition: none !important; }
	.site-footer, .skip-link, .wp-block-navigation, .oks-toc, .oks-filters, .oks-read-more, .oks-reformspar__head, .oks-fler, .oks-more, .oks-hero__back, .oks-sections, .wp-block-search,
	.wp-block-buttons, .oks-report, .wp-block-video, .oks-film, .oks-film-link, .oks-closing__film, .oks-testimony__media, .oks-testimony__film,
	:is(.oks-intro, .oks-feature) .wp-block-image, .oks-filmcard__time, .oks-testimony__play, .oks-handelse__more > summary,
	:is(.oks-overview > .wp-block-column, .oks-kris) > p:last-child { display: none !important; }
	.site-header { background: none; padding-block: 0 4mm; }
	body a { color: inherit; text-decoration: none; }
	abbr[title] { text-decoration: none; }
	abbr[title]::after { content: " (" attr(title) ")"; }
	/* Sand and cream text were drawn for the teal band; on paper it is ink on white */
	:is(.oks-hero, .oks-hero-film, .oks-band, .oks-beat--problem, .oks-figurer) { background: none; color: var(--wp--preset--color--ink); margin-inline: 0 !important; margin-block: 0 6mm !important; padding: 0; text-align: left; }
	:is(.oks-hero, .oks-band) :is(.oks-hero__title, .oks-hero__sub, h2, a, .oks-band__lead) { color: var(--wp--preset--color--ink); }
	.oks-hero__title, .oks-hero--lang .oks-hero__title, .oks-hero-card h1 { color: var(--wp--preset--color--ink); font-size: 2.75rem; line-height: 1.05; margin-inline: 0; max-width: none; }
	.oks-hero__inner { max-width: none; }
	.oks-hero__sub { font-size: 1.5rem; margin: .4rem 0 0; max-width: none; }
	.oks-band h2 { font-size: 2.25rem; }
	.oks-hero-film > .oks-hero-card { background: none; padding: 0; }
	.oks-pullquote p { font-size: 2.5rem; max-width: none; }
	/* Cards lose the sand; a hairline keeps them together */
	:is(.oks-forslag:not(.oks-reformspar) > li, .is-style-ruta, .oks-testimony) { background: none; border: .5pt solid var(--oks-line); border-radius: 0; }
	.oks-testimony { grid-template-columns: minmax(0, 1fr); }
	.oks-badge { min-height: 0; padding: 0; border: 0; background: none; }
	.oks-handelse__more::details-content { display: block; content-visibility: visible; }
	.oks-handelse__foot > .oks-handelse__more { flex-basis: 100%; }
	:is(.oks-card, .oks-report__cover) img[src*="/omslag-"] { mix-blend-mode: normal; }
	.wp-block-post-featured-image { width: 50mm !important; }
	.oks-rapport { grid-template-columns: 30mm minmax(0, 1fr); }
	.oks-rapport:not(.oks-rapport--omslag) { grid-template-columns: minmax(0, 1fr); }
	.oks-rapport__cover { width: 30mm; }
	/* A report's button becomes its address; a source shows where it leads */
	:is(.oks-rapport__body, .oks-fields) p > .wp-element-button { padding: 0; background: none; border: 0; color: var(--wp--preset--color--ink); font-weight: 700; text-decoration: none; }
	:is(.oks-rapport__body, .oks-fields) p > .wp-element-button::after, :is(.oks-handelse__source, .oks-stat__source, .oks-sources) a[href^="http"]::after { content: " " attr(href); font-size: .85em; font-weight: 400; color: var(--wp--preset--color--muted); overflow-wrap: anywhere; }
	/* Pages break between things, not through them */
	h1, h2, h3, .oks-toc__title { break-after: avoid; }
	:is(.oks-stat, .oks-handelse, .oks-rapport, .oks-forslag > li, .oks-testimony, .oks-filmcard, figure, blockquote) { break-inside: avoid; }
	p, li { orphans: 3; widows: 3; }
}
