/*
Theme Name: Slotspojken
Theme URI: https://slotspojken.se/
Author: Slotspojkens redaktion
Description: Lätt och snabbt tema för Slotspojken. Systemtypsnitt, inga externa anrop, inget jQuery. Innehållsförteckning av H2-rubrikerna, brödsmulor med schema, kortgrid per kategori och stöd för innehållsklasserna slp-tabell, slp-disclaimer och slp-kallor.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: slotspojken
*/

/* ==========================================================================
   1. Variabler
   ========================================================================== */
:root {
	--ink: #16172b;
	--ink-2: #2c2e4a;
	--text: #26283d;
	--muted: #62647a;
	--bg: #fbf8f2;
	--paper: #ffffff;
	--sand: #f3ede1;
	--line: #e6dfd0;
	--red: #c8322a;
	--red-d: #a2241d;
	--gold: #e9a823;
	--gold-l: #fdf3dc;
	--green: #1d7454;
	--green-l: #e6f3ec;
	--radius: 14px;
	--radius-s: 9px;
	--shadow: 0 1px 2px rgba(22, 23, 43, .06), 0 8px 24px -12px rgba(22, 23, 43, .18);
	--shadow-h: 0 2px 4px rgba(22, 23, 43, .08), 0 18px 40px -16px rgba(22, 23, 43, .28);
	--wrap: 1200px;
	--narrow: 780px;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--header-h: 68px;
}

/* ==========================================================================
   2. Grund
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 1.0625rem/1.7 var(--sans);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
img { border-radius: var(--radius-s); }
a { color: var(--red-d); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-family: var(--sans); line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1.15em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
::selection { background: var(--gold); color: var(--ink); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.slp-skip { position: absolute; left: 1rem; top: -60px; z-index: 1000; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-s); }
.slp-skip:focus { top: 1rem; color: #fff; }

.slp-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.slp-wrap--narrow { max-width: var(--narrow); }
@media (min-width: 720px) { .slp-wrap { padding: 0 32px; } }

/* ==========================================================================
   3. Ansvarsrad och sidhuvud
   ========================================================================== */
.slp-rgbar { background: var(--ink); color: #c9cadb; font-size: .78rem; line-height: 1.4; }
.slp-rgbar .slp-wrap { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; align-items: center; justify-content: center; padding-top: .45rem; padding-bottom: .45rem; }
.slp-rgbar a { color: #fff; text-decoration: none; opacity: .9; }
.slp-rgbar a:hover { color: var(--gold); opacity: 1; }
.slp-rgbar__age { background: var(--gold); color: var(--ink); font-weight: 800; border-radius: 4px; padding: 0 .4rem; }

.slp-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(251, 248, 242, .92);
	-webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s, box-shadow .2s;
}
.slp-scrolled .slp-header { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(22, 23, 43, .4); }
.slp-header__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.slp-header__brand { flex: 0 0 auto; }

.slp-brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.slp-brand:hover { color: var(--ink); text-decoration: none; }
.slp-brand .slp-reels { width: 40px; height: 40px; flex: 0 0 40px; }
.slp-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.slp-brand__name { font-weight: 900; font-size: 1.28rem; letter-spacing: -.03em; }
.slp-brand__tag { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.custom-logo-link img { max-height: 52px; width: auto; border-radius: 0; display: block; }

/* Meny */
.slp-nav { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.slp-nav__list, .slp-nav .menu, .slp-nav > div > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.slp-nav li { position: relative; }
.slp-nav a { display: block; padding: .5rem .8rem; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none; }
.slp-nav a:hover { background: var(--sand); color: var(--ink); }
.slp-nav .current-menu-item > a, .slp-nav .current-menu-ancestor > a, .slp-nav .current_page_item > a { background: var(--ink); color: #fff; }
.slp-nav .sub-menu, .slp-nav .children {
	list-style: none; margin: 0; padding: .4rem; position: absolute; top: 100%; left: 0; min-width: 220px;
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-h);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s;
}
.slp-nav li:hover > .sub-menu, .slp-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.slp-nav .sub-menu a { border-radius: var(--radius-s); }
.slp-subtoggle { display: none; }

.slp-search { position: relative; display: flex; align-items: center; }
.slp-search input {
	width: 150px; height: 40px; padding: 0 40px 0 14px; border-radius: 999px; border: 1px solid var(--line);
	background: var(--paper); font: inherit; font-size: .9rem; color: var(--ink); transition: width .2s, border-color .2s;
}
.slp-search input:focus { width: 210px; outline: none; border-color: var(--ink); }
.slp-search button { position: absolute; right: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }

.slp-burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; position: relative; }
.slp-burger__bars, .slp-burger__bars::before, .slp-burger__bars::after { position: absolute; left: 12px; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; content: ""; }
.slp-burger__bars { top: 21px; }
.slp-burger__bars::before { top: -6px; left: 0; }
.slp-burger__bars::after { top: 6px; left: 0; }
.slp-nav-open .slp-burger__bars { background: transparent; }
.slp-nav-open .slp-burger__bars::before { top: 0; transform: rotate(45deg); }
.slp-nav-open .slp-burger__bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
	.slp-burger { display: block; }
	.slp-nav {
		position: fixed; left: 0; right: 0; top: var(--slp-nav-top, 100px); bottom: 0; margin: 0;
		flex-direction: column; align-items: stretch; gap: 1rem; padding: 1.25rem 20px 2rem;
		background: var(--bg); overflow-y: auto; border-top: 1px solid var(--line);
		opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .2s;
	}
	.slp-nav-open .slp-nav { opacity: 1; visibility: visible; transform: none; }
	.slp-nav-open { overflow: hidden; }
	.slp-nav__list, .slp-nav .menu, .slp-nav > div > ul { flex-direction: column; align-items: stretch; gap: .2rem; }
	.slp-nav a { font-size: 1.1rem; padding: .8rem 1rem; border-radius: var(--radius-s); }
	.slp-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 1rem; display: none; background: transparent; }
	.slp-nav li.is-open > .sub-menu { display: block; }
	.slp-subtoggle { display: block; position: absolute; right: 4px; top: 6px; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; }
	.slp-subtoggle::before { content: ""; display: block; width: 9px; height: 9px; margin: auto; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: .2s; }
	.is-open > .slp-subtoggle::before { transform: rotate(-135deg); }
	.slp-search input, .slp-search input:focus { width: 100%; height: 48px; font-size: 1rem; }
	.slp-brand__tag { display: none; }
}
@media (max-width: 960px) { .admin-bar .slp-nav { --slp-nav-top: 146px; } }

/* Läsframsteg */
.slp-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.slp-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); transform: scaleX(0); transform-origin: 0 50%; }

/* ==========================================================================
   4. Startsidans hero
   ========================================================================== */
.slp-hero {
	position: relative; overflow: hidden; color: #e9e9f2;
	background:
		radial-gradient(1200px 400px at 85% -10%, rgba(233, 168, 35, .25), transparent 60%),
		radial-gradient(800px 380px at -10% 110%, rgba(200, 50, 42, .35), transparent 60%),
		var(--ink);
	padding: 3.5rem 0 3.25rem;
}
@media (min-width: 900px) { .slp-hero { padding: 5rem 0 4.5rem; } }
.slp-hero .slp-wrap { position: relative; z-index: 2; }
.slp-hero__inner { position: relative; z-index: 2; max-width: 640px; }
.slp-hero__eyebrow { display: inline-block; margin: 0 0 1rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.slp-hero__title { color: #fff; font-size: clamp(2rem, 5.2vw, 3.6rem); line-height: 1.05; letter-spacing: -.035em; max-width: 15ch; margin-bottom: .45em; }
.slp-hero__lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); max-width: 56ch; color: #c9cadb; }
.slp-chips { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.slp-chips a { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .95rem; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font-weight: 600; text-decoration: none; transition: .15s; }
.slp-chips a:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.slp-chips span { font-size: .78rem; opacity: .7; }

/* Tre dekorativa hjul */
.slp-hero__reels { position: absolute; right: 40px; top: 50%; transform: translateY(-50%) rotate(-8deg); display: none; gap: 14px; z-index: 1; opacity: .95; }
@media (min-width: 1000px) { .slp-hero__reels { display: flex; } }
@media (min-width: 1000px) and (max-width: 1180px) { .slp-hero__reels { right: 10px; transform: translateY(-50%) rotate(-8deg) scale(.8); } }
.slp-hero__reels span {
	width: 92px; height: 250px; border-radius: 20px;
	background:
		linear-gradient(180deg, var(--ink) 0, transparent 22%, transparent 78%, var(--ink) 100%),
		repeating-linear-gradient(180deg, #fbf8f2 0 76px, #f3ede1 76px 80px);
	box-shadow: inset 0 0 0 4px rgba(233, 168, 35, .6), 0 20px 50px -20px rgba(0, 0, 0, .6);
	position: relative;
}
.slp-hero__reels span::after { content: "7"; position: absolute; inset: 0; display: grid; place-items: center; font: 900 4.2rem/1 var(--sans); color: var(--red); }
.slp-hero__reels span:nth-child(2) { transform: translateY(-26px); }
.slp-hero__reels span:nth-child(3) { transform: translateY(14px); }
.slp-hero__reels span:nth-child(3)::after { content: "★"; color: var(--gold); font-size: 3.6rem; }

/* ==========================================================================
   5. Artikel och sida
   ========================================================================== */
.slp-entry__head { padding: 2rem 0 1rem; }
@media (min-width: 900px) { .slp-entry__head { padding: 2.75rem 0 1.25rem; } }
.slp-entry__title { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -.03em; margin: .35rem 0 .5em; }
.slp-entry__lead { font-size: 1.2rem; color: var(--ink-2); line-height: 1.55; }
.slp-kicker { display: inline-block; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--red); text-decoration: none; margin-top: .75rem; }
.slp-kicker:hover { color: var(--red-d); text-decoration: underline; }

.slp-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; font-size: .85rem; color: var(--muted); }
.slp-crumbs li:not(:last-child)::after { content: "›"; margin-left: .35rem; color: #a7a8b8; }
.slp-crumbs a { color: var(--muted); text-decoration: none; }
.slp-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.slp-crumbs [aria-current] { color: var(--ink-2); display: inline-block; max-width: 38ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

.slp-meta { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; font-size: .88rem; color: var(--muted); padding-top: .9rem; border-top: 1px solid var(--line); margin-top: .5rem; }
.slp-meta a { color: var(--ink); font-weight: 600; text-decoration: none; }
.slp-meta a:hover { text-decoration: underline; }
.slp-meta > span { display: inline-flex; align-items: center; gap: .4rem; }
.slp-meta > span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #c3c4d0; margin-right: .7rem; margin-left: -.45rem; }
@media (max-width: 560px) { .slp-meta__date--pub { display: none !important; } .slp-meta > span + span::before { display: none; } }

.slp-entry__hero { margin: .75rem auto 0; }
.slp-entry__hero img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--radius); display: block; box-shadow: var(--shadow); }
.slp-entry__hero figcaption { font-size: .82rem; color: var(--muted); margin-top: .5rem; }

/* Layout med innehållsförteckning */
.slp-layout { padding-top: 1.75rem; padding-bottom: 3rem; }
.slp-layout__main { max-width: var(--narrow); margin: 0 auto; padding: 0; min-width: 0; }
.slp-entry .slp-layout { max-width: var(--narrow); }
.slp-has-toc .slp-entry .slp-layout, .slp-layout--front { max-width: var(--wrap); }
.slp-has-toc .slp-layout__main { max-width: 760px; }

@media (min-width: 1100px) {
	.slp-has-toc .slp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; align-items: start; }
	.slp-has-toc .slp-layout__main { grid-column: 1; grid-row: 1; margin: 0 0 0 auto; width: 100%; }
	.slp-has-toc .slp-layout__aside { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
	/* Rubrik och huvudbild linjerar med textspalten */
	.slp-has-toc .slp-entry__head .slp-wrap--narrow, .slp-has-toc .slp-entry__hero { max-width: var(--wrap); }
	.slp-has-toc .slp-entry__head .slp-wrap--narrow > *, .slp-has-toc .slp-entry__hero > * { max-width: min(760px, calc(100% - 344px)); margin-left: max(0px, calc(100% - 344px - 760px)); }
}

/* Innehållsförteckning */
.slp-toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 1.75rem; box-shadow: var(--shadow); }
.slp-toc summary { cursor: pointer; list-style: none; padding: .9rem 1.1rem; font-weight: 800; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.slp-toc summary::-webkit-details-marker { display: none; }
.slp-toc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: .2s; margin-left: auto; }
.slp-toc[open] summary::after { transform: rotate(-135deg); }
.slp-toc__count { font-weight: 500; font-size: .8rem; color: var(--muted); }
.slp-toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0 .6rem .8rem; }
.slp-toc li { counter-increment: toc; }
.slp-toc a { display: grid; grid-template-columns: 1.6rem 1fr; gap: .25rem; padding: .42rem .5rem; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; font-size: .9rem; line-height: 1.35; border-left: 3px solid transparent; }
.slp-toc a::before { content: counter(toc, decimal-leading-zero); font: 700 .74rem/1.75 var(--mono); color: #a7a8b8; }
.slp-toc a:hover { background: var(--sand); color: var(--ink); }
.slp-toc a.is-active { background: var(--gold-l); color: var(--ink); border-left-color: var(--gold); font-weight: 600; }
.slp-toc a.is-active::before { color: var(--red); }
@media (min-width: 1100px) {
	.slp-toc { box-shadow: none; background: transparent; border: 0; margin: 0; }
	.slp-toc summary { cursor: default; pointer-events: none; padding: 0 .5rem .6rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
	.slp-toc summary::after { display: none; }
	.slp-toc ol { padding: 0; border-left: 1px solid var(--line); }
	.slp-toc a { border-radius: 0 var(--radius-s) var(--radius-s) 0; margin-left: -2px; }
}

/* ==========================================================================
   6. Brödtext
   ========================================================================== */
.slp-prose { font-size: 1.0625rem; }
@media (min-width: 720px) { .slp-prose { font-size: 1.125rem; } }
.slp-prose > * + h2 { margin-top: 2.4em; }
.slp-prose h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); position: relative; }
.slp-prose h3 { font-size: 1.25rem; margin-top: 1.9em; }
.slp-prose h4 { font-size: 1.05rem; margin-top: 1.6em; }
.slp-prose h2::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--red), var(--gold)); margin-bottom: .7rem; }
.slp-prose ul, .slp-prose ol { padding-left: 1.3em; margin: 0 0 1.25em; }
.slp-prose li { margin-bottom: .4em; }
.slp-prose li::marker { color: var(--red); font-weight: 700; }
.slp-prose strong { color: var(--ink); }
.slp-prose blockquote { margin: 1.75em 0; padding: 1.1rem 1.4rem; border-left: 4px solid var(--gold); background: var(--gold-l); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--serif); font-size: 1.15em; color: var(--ink); }
.slp-prose blockquote p:last-child { margin: 0; }
.slp-prose code { font-family: var(--mono); font-size: .88em; background: var(--sand); padding: .1em .35em; border-radius: 5px; }
.slp-prose figure { margin: 1.75em 0; }
.slp-prose figcaption, .wp-caption-text { font-size: .85rem; color: var(--muted); margin-top: .45rem; text-align: center; }
.slp-prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.slp-prose .wp-block-embed iframe { aspect-ratio: auto; }

.alignleft { float: left; margin: .35em 1.5em 1em 0; max-width: 45%; }
.alignright { float: right; margin: .35em 0 1em 1.5em; max-width: 45%; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignnone { margin: 1.25em 0; }
@media (max-width: 560px) { .alignleft, .alignright { float: none; margin: 1.25em auto; max-width: 100%; display: block; } }
.slp-prose::after { content: ""; display: table; clear: both; }
.slp-prose h2, .slp-prose .slp-kallor, .slp-prose .slp-disclaimer, .slp-prose table { clear: both; }

/* Tabeller */
.slp-prose table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.75em 0; font-size: .95rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.slp-prose th, .slp-prose td { padding: .8rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.slp-prose thead th { background: var(--ink); color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; border-bottom: 0; }
.slp-prose tbody tr:last-child td { border-bottom: 0; }
.slp-prose tbody tr:nth-child(even) td { background: #fcfaf6; }
.slp-prose tbody tr:hover td { background: var(--gold-l); }
.slp-prose td:first-child { font-weight: 700; color: var(--ink); }
.slp-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.75em 0; border-radius: var(--radius); }
.slp-tablewrap table { margin: 0; min-width: 560px; }

/* slp-tabell med tre eller fler kolumner blir kort på mobil, tack vare data-label på cellerna.
   Tvåkolumnstabeller får plats och står kvar som tabell. */
@media (max-width: 640px) {
	.slp-prose table.slp-tabell:has(thead th:nth-child(3)), .slp-prose table.slp-tabell:has(thead th:nth-child(3)) tbody, .slp-prose table.slp-tabell:has(thead th:nth-child(3)) tr, .slp-prose table.slp-tabell:has(thead th:nth-child(3)) td { display: block; width: 100%; }
	.slp-prose table.slp-tabell:has(thead th:nth-child(3)) { background: transparent; border: 0; box-shadow: none; overflow: visible; }
	.slp-prose table.slp-tabell:has(thead th:nth-child(3)) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.slp-prose table.slp-tabell:has(thead th:nth-child(3)) tr { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .8rem; overflow: hidden; box-shadow: var(--shadow); }
	.slp-prose table.slp-tabell:has(thead th:nth-child(3)) td { border-bottom: 1px solid var(--line); padding: .65rem 1rem; background: transparent !important; }
	.slp-prose table.slp-tabell:has(thead th:nth-child(3)) td:last-child { border-bottom: 0; }
	.slp-prose table.slp-tabell:has(thead th:nth-child(3)) td:first-child { background: var(--sand) !important; font-size: 1.02rem; }
	.slp-prose table.slp-tabell:has(thead th:nth-child(3)) td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .15rem; }
}

/* Ansvarsruta */
.slp-disclaimer {
	position: relative; margin: 2.5em 0 1.5em; padding: 1.1rem 1.2rem 1.1rem 4rem;
	background: var(--green-l); border: 1px solid #c8e3d5; border-radius: var(--radius);
	font-size: .9rem; line-height: 1.6; color: #24453a;
}
.slp-disclaimer::before { content: "18+"; position: absolute; left: 1rem; top: 1.1rem; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--green); color: #fff; font: 800 .78rem/2.3rem var(--sans); text-align: center; }
.slp-disclaimer strong { color: #123a2c; }
.slp-disclaimer a { color: #0f5a40; }

/* Källor */
.slp-kallor {
	margin: 2rem 0 0; padding: 1.3rem 1.4rem; background: var(--paper);
	border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: var(--radius);
	font-size: .88rem; line-height: 1.65; color: var(--ink-2);
}
.slp-prose .slp-kallor h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .6rem; display: flex; align-items: center; gap: .55rem; }
.slp-prose .slp-kallor h2::before { content: ""; width: 18px; height: 18px; margin: 0; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23e9a823' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.slp-kallor h3 { font-size: .95rem; margin-top: 1rem; }
.slp-kallor p:last-child, .slp-kallor ul:last-child { margin-bottom: 0; }
.slp-kallor ul, .slp-kallor ol { padding-left: 1.1em; }

/* Skribentruta */
.slp-authorbox { display: flex; gap: 1rem; align-items: flex-start; margin: 2.5rem 0 0; padding: 1.25rem; border-radius: var(--radius); background: var(--sand); font-size: .92rem; color: var(--ink-2); }
.slp-authorbox .slp-reels { width: 48px; height: 48px; flex: 0 0 48px; }
.slp-authorbox p { margin: 0; }
.slp-authorbox__name { font-weight: 800; color: var(--ink); margin-bottom: .2rem !important; }

.slp-tags { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.slp-tags a { display: inline-block; padding: .3rem .7rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); text-decoration: none; }
.slp-tags a:hover { border-color: var(--ink); color: var(--ink); }
.slp-pagelinks { margin: 2rem 0; font-weight: 600; }

/* ==========================================================================
   7. Kort och gridar
   ========================================================================== */
.slp-section-title { font-size: clamp(1.4rem, 2.5vw, 1.8rem); letter-spacing: -.025em; margin: 0 0 1.25rem; }
.slp-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
@media (min-width: 720px) { .slp-grid { gap: 1.75rem; } }

.slp-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; position: relative; }
.slp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.slp-card__media { display: block; aspect-ratio: 16 / 9; background: var(--sand); overflow: hidden; }
.slp-card__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; transition: transform .4s; }
.slp-card:hover .slp-card__media img { transform: scale(1.04); }
.slp-card__placeholder { display: grid; place-items: center; height: 100%; background: radial-gradient(circle at 70% 20%, rgba(233, 168, 35, .35), transparent 55%), var(--ink); }
.slp-card__placeholder .slp-reels { width: 72px; height: 72px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4)); }
.slp-card__body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.slp-card__cat { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--red); margin-bottom: .45rem; }
.slp-card__title { font-size: 1.12rem; line-height: 1.3; margin: 0 0 .5rem; letter-spacing: -.01em; }
.slp-card__title a { color: var(--ink); text-decoration: none; }
.slp-card__title a::after { content: ""; position: absolute; inset: 0; }
.slp-card:hover .slp-card__title a { color: var(--red-d); }
.slp-card__excerpt { font-size: .92rem; color: var(--muted); line-height: 1.55; margin: 0 0 .9rem; }
.slp-card__date { margin-top: auto; font-size: .78rem; color: #8a8ca0; }

.slp-catsection { padding: 3rem 0; }
.slp-catsection:nth-of-type(odd) { background: var(--sand); }
.slp-catsection__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.slp-catsection__head .slp-section-title { margin: 0; }
.slp-more { font-weight: 700; font-size: .95rem; text-decoration: none; }
.slp-more:hover { text-decoration: underline; }

.slp-related { padding: 3rem 0 3.5rem; background: var(--sand); border-top: 1px solid var(--line); }

/* Arkiv */
.slp-archivehead { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--sand), var(--bg)); }
.slp-archivehead__title { font-size: clamp(1.9rem, 4.2vw, 2.8rem); letter-spacing: -.03em; margin: .6rem 0 .35em; }
.slp-archivehead__desc { color: var(--ink-2); max-width: 62ch; font-size: 1.08rem; }
.slp-archive { padding-top: 2.25rem; padding-bottom: 3.5rem; }
.slp-empty { padding: 2rem; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); }

.nav-links { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 2.5rem; }
.nav-links .page-numbers { min-width: 44px; height: 44px; padding: 0 .9rem; display: inline-grid; place-items: center; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-weight: 700; text-decoration: none; }
.nav-links .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.nav-links a.page-numbers:hover { border-color: var(--ink); }

/* Sökformulär */
.slp-searchform { display: flex; gap: .5rem; max-width: 520px; margin-top: 1.25rem; }
.slp-searchform input { flex: 1; min-width: 0; height: 50px; padding: 0 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font: inherit; }
.slp-searchform input:focus { outline: none; border-color: var(--ink); }
.slp-searchform button { height: 50px; padding: 0 1.4rem; border: 0; border-radius: 12px; background: var(--red); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.slp-searchform button:hover { background: var(--red-d); }

/* 404 */
.slp-404 { text-align: center; padding: 4rem 0 3rem; }
.slp-404 .slp-searchform { margin-left: auto; margin-right: auto; }
.slp-404__reels { display: inline-flex; gap: 10px; padding: 12px; background: var(--ink); border-radius: 20px; margin-bottom: 1.5rem; }
.slp-404__reels span { width: 64px; height: 84px; display: grid; place-items: center; background: var(--bg); border-radius: 10px; font: 900 2.6rem/1 var(--sans); color: var(--red); }

/* ==========================================================================
   8. Formulär (Contact Form 7 och kommentarer)
   ========================================================================== */
.wpcf7 form, .comment-form { display: grid; gap: .9rem; max-width: 620px; }
.wpcf7 label, .comment-form label { display: block; font-weight: 600; font-size: .92rem; color: var(--ink); margin-bottom: .3rem; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea,
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font: inherit; font-size: 1rem; color: var(--ink);
}
.wpcf7 textarea, .comment-form textarea { min-height: 160px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus, .comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-l); }
.wpcf7 input[type="submit"], .comment-form input[type="submit"] { justify-self: start; padding: .85rem 1.6rem; border: 0; border-radius: 12px; background: var(--red); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.wpcf7 input[type="submit"]:hover, .comment-form input[type="submit"]:hover { background: var(--red-d); }
.wpcf7-response-output { border-radius: 12px; padding: .8rem 1rem !important; margin: .5rem 0 0 !important; }
.slp-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.slp-comments__list { list-style: none; padding: 0; }
.slp-comments__list .comment-body { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1rem; }

/* ==========================================================================
   9. Sidfot
   ========================================================================== */
.slp-footer { background: var(--ink); color: #b9bacd; font-size: .93rem; margin-top: 0; }
.slp-footer__grid { display: grid; gap: 2rem; padding-top: 3.25rem; padding-bottom: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .slp-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; } }
@media (min-width: 1100px) { .slp-footer__grid { grid-template-columns: 1.3fr repeat(var(--slp-footcols, 2), minmax(0, 1fr)); gap: 3rem; } }
/* Långa listor i sidfoten, till exempel senaste inlägg, kortas till åtta rader */
.slp-footer .widget_recent_entries li:nth-child(n+9), .slp-footer .slp-footer__col > ul > li:nth-child(n+9) { display: none; }
.slp-footer li { line-height: 1.4; }
.slp-footer .widget:last-child { margin-bottom: 0; }
.slp-footer a { color: #fff; text-decoration: none; }
.slp-footer a:hover { color: var(--gold); }
.slp-footer .widget-title { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 1rem; }
.slp-footer ul { list-style: none; margin: 0; padding: 0; }
.slp-footer li { margin-bottom: .55rem; }
.slp-footer .widget { margin-bottom: 1.75rem; }
.slp-brand--footer { color: #fff; margin-bottom: 1rem; }
.slp-brand--footer:hover { color: #fff; }
.slp-brand--footer .slp-reels rect:first-child { fill: #2c2e4a; }
.slp-footer__about p { max-width: 44ch; }
.slp-footer__rg { font-size: .85rem; padding: .9rem 1rem; border-radius: var(--radius-s); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.slp-footer__rg strong { background: var(--gold); color: var(--ink); border-radius: 4px; padding: 0 .35rem; margin-right: .25rem; }
.slp-footer__rg a { text-decoration: underline; text-underline-offset: 2px; }
.slp-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 1.1rem 0; font-size: .8rem; color: #8d8fa6; }

.slp-top { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-h); opacity: 0; visibility: hidden; transform: translateY(10px); transition: .2s; }
.slp-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.slp-top:hover { background: var(--red); }

/* ==========================================================================
   10. Block och WordPress-klasser
   ========================================================================== */
.wp-block-image img { border-radius: var(--radius); }
.wp-block-button__link { background: var(--red); color: #fff; border-radius: 12px; padding: .8rem 1.4rem; font-weight: 700; text-decoration: none; }
.wp-block-button__link:hover { background: var(--red-d); color: #fff; }
.wp-block-separator { border: 0; border-top: 1px solid var(--line); }
.wp-block-table { margin: 1.75em 0; overflow-x: auto; }
.wp-block-table table { margin: 0; }
.wp-block-details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; margin: 0 0 .75rem; }
.wp-block-details summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.sticky .slp-card__cat::after { content: " · Utvald"; color: var(--gold); }
.bypostauthor { display: block; }

@media print {
	.slp-rgbar, .slp-header, .slp-footer, .slp-related, .slp-layout__aside, .slp-top, .slp-crumbs { display: none !important; }
	body { background: #fff; font-size: 11pt; }
}
