/*
Theme Name: Ruurlo knooppunt
Theme URI: https://www.ruurlo.nu/
Author: Ingela de Groot
Description: Svensk reseguide till Ruurlo, Achterhoek och Gelderland. Trakten som ett nät av numrerade knutpunkter: orange fält, polderblå linjer, diken som rutnät och en kastanjeallé i sidfoten.
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: rl-knooppunt
*/

/* ==========================================================================
   Grund
   ========================================================================== */

:root {
	--oranje: #F26B1D;
	--oranje-djup: #B4450C;
	--polder: #102A33;
	--polder-2: #1C3C47;
	--melk: #F8F9F6;
	--grijs: #5A6C72;
	--sloot: #D3D9D8;
	--dis: #C9D3D5;
	--disp: 'Josefin Sans', 'Futura', 'Century Gothic', sans-serif;
	--text: 'Merriweather Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--wide: 1240px;
	--measure: 700px;
}

html { -webkit-text-size-adjust: 100%; }
body {
	background: var(--melk);
	color: var(--polder);
	font-family: var(--text);
	font-weight: 400;
	font-size: 1.125rem;
	line-height: 1.72;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "kern" 1;
}
@media (max-width: 600px) { body { font-size: 1.0625rem; } }

h1, h2, h3, h4 { font-family: var(--disp); font-weight: 700; color: var(--polder); text-wrap: balance; }
h3 { font-weight: 600; }
p, li { text-wrap: pretty; }
strong, b { font-weight: 700; }

a { color: var(--polder); text-decoration-color: var(--oranje); text-decoration-thickness: 2px; text-underline-offset: .22em; }
a:hover { color: var(--oranje-djup); text-decoration-thickness: 3px; }
@media (prefers-reduced-motion: no-preference) {
	a, .rl-btn, .rl-tegar a, .rl-kp, .rl-nasta { transition: color .18s ease, background-color .18s ease, border-color .18s ease, text-decoration-color .18s ease; }
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--polder);
	outline-offset: 3px;
	border-radius: 1px;
}

.rl-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.rl-dot { margin: 0 .5em; }

.rl-skip {
	position: absolute; left: 1rem; top: -100px; z-index: 1000;
	background: var(--polder); color: var(--melk); padding: .8rem 1.1rem; font-weight: 700; text-decoration: none;
}
.rl-skip:focus { top: 1rem; outline: 3px solid var(--oranje); outline-offset: 2px; color: var(--melk); }

/* Knutpunkten: siffra i en ring. */
.rl-kp {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 2rem; height: 2rem; border-radius: 50%;
	border: 2.5px solid var(--polder); background: var(--melk); color: var(--polder);
	font-family: var(--disp); font-weight: 700; font-size: 1rem; line-height: 1;
	padding-top: .14em; font-variant-numeric: tabular-nums;
}
.rl-kp.is-big { width: 3rem; height: 3rem; border-width: 3px; font-size: 1.4rem; }
.rl-kp.is-huge { width: clamp(5rem, 9vw, 7.5rem); height: clamp(5rem, 9vw, 7.5rem); border-width: 4px; font-size: clamp(2.4rem, 4.6vw, 3.8rem); background: var(--oranje); border-color: var(--oranje); }

.rl-btn {
	display: inline-flex; align-items: center; min-height: 48px; padding: .7rem 1.35rem .62rem;
	background: var(--polder); color: var(--melk); font-weight: 700; font-size: 1rem; text-decoration: none;
	border: 2px solid var(--polder);
}
.rl-btn:hover { background: var(--melk); color: var(--polder); }
.rl-arrowlink { font-weight: 700; display: inline-flex; gap: .4em; align-items: baseline; min-height: 44px; align-items: center; }

/* ==========================================================================
   Sidhuvud
   ========================================================================== */

.rl-header { border-bottom: 2px solid var(--polder); background: var(--melk); }
.rl-header-row { min-height: 84px; gap: 1.5rem; }
.rl-brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--polder); min-height: 48px; }
.rl-brand:hover { color: var(--polder); }
.rl-mark { width: 40px; height: 40px; display: block; flex: none; }
.rl-brand-text { display: flex; flex-direction: column; line-height: 1; }
.rl-wordmark { font-family: var(--disp); font-weight: 700; font-size: 1.85rem; letter-spacing: .01em; padding-top: .12em; }
.rl-tag { font-size: .8rem; color: var(--grijs); margin-top: .3rem; letter-spacing: .01em; }
.rl-brand.is-light, .rl-brand.is-light:hover { color: var(--melk); }
.rl-brand.is-light .rl-tag { color: var(--dis); }

.rl-nav .wp-block-navigation-item__content { display: inline-flex; align-items: center; min-height: 44px; padding: .55rem .8rem .5rem; text-decoration: none; color: var(--polder); }
.rl-nav .wp-block-navigation-item__content:hover,
.rl-nav .current-menu-item > .wp-block-navigation-item__content,
.rl-nav [aria-current="page"] { text-decoration: underline; text-decoration-color: var(--oranje); text-decoration-thickness: 3px; text-underline-offset: .4em; color: var(--polder); }
.rl-nav .wp-block-navigation__submenu-container { border: 2px solid var(--polder) !important; background: var(--melk) !important; min-width: 300px !important; padding: .4rem 0; }
.rl-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .55rem 1.1rem; font-weight: 600; width: 100%; }
.rl-nav .wp-block-navigation-submenu__toggle { min-width: 24px; min-height: 24px; }
.rl-nav-om { margin-left: .4rem; }

/* Mobilmenyn: ett polderblått fält. */
.rl-nav .wp-block-navigation__responsive-container-open,
.rl-nav .wp-block-navigation__responsive-container-close { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; color: var(--polder); }
@media (max-width: 599px) { .rl-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: inline-flex; } }
.rl-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--polder) !important; color: var(--melk) !important; padding: 1.25rem clamp(1rem, 5vw, 2rem) 2.5rem;
}
.rl-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { color: var(--melk); }
.rl-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 3.5rem; align-items: flex-start !important; gap: .2rem !important; }
.rl-nav .is-menu-open .wp-block-navigation__container { align-items: flex-start !important; gap: .1rem !important; width: 100%; }
.rl-nav .is-menu-open .wp-block-navigation-item { width: 100%; align-items: flex-start !important; }
.rl-nav .is-menu-open .wp-block-navigation-item__content { color: var(--melk) !important; font-family: var(--disp); font-size: 1.65rem; font-weight: 700; padding: .45rem 0 .3rem !important; }
.rl-nav .is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; background: transparent !important; padding: 0 0 .6rem 1rem !important; min-width: 0 !important; }
.rl-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-family: var(--text); font-size: 1.05rem; font-weight: 600; }
.rl-nav .is-menu-open :focus-visible { outline-color: var(--oranje); }
.rl-nav .is-menu-open .wp-block-navigation-item__content:hover { text-decoration-color: var(--oranje); }

@media (max-width: 1100px) and (min-width: 600px) {
	.rl-tag { display: none; }
	.rl-nav .wp-block-navigation-item__content { padding-left: .5rem; padding-right: .5rem; }
	.rl-nav { font-size: .88rem !important; }
}

/* ==========================================================================
   Startsidan: orange fält och kartan
   ========================================================================== */

.rl-hero-wrap { background: var(--oranje); margin-top: 0 !important; padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.rl-hero-inner { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.rl-hero-title { font-size: clamp(3rem, 7.4vw, 6.6rem); line-height: .94; letter-spacing: -.02em; margin: 0 0 .35em; }
.rl-hero-lede { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.55; max-width: 32ch; margin: 0 0 1.2rem; }
.rl-hero-by { font-size: .98rem; max-width: 40ch; margin: 0 0 2rem; }
.rl-hero-links { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; align-items: center; margin: 0; }
.rl-hero-links .rl-arrowlink { color: var(--polder); text-decoration-color: var(--polder); }
.rl-hero-links .rl-arrowlink:hover { color: var(--polder); text-decoration-color: var(--melk); }
.rl-hero-links .rl-btn:hover { border-color: var(--melk); }

.rl-kaart { margin: 0; }
.rl-map { display: block; width: 100%; height: auto; overflow: visible; }
.rl-m-border { fill: none; stroke: var(--polder); stroke-width: 2; stroke-dasharray: .1 7; stroke-linecap: round; }
.rl-m-land { font-family: var(--disp); font-weight: 600; font-size: 15px; letter-spacing: .28em; fill: var(--polder); }
.rl-m-river { fill: none; stroke: var(--melk); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rl-m-river.is-big { stroke-width: 7; }
.rl-m-water { font-family: var(--text); font-style: italic; font-size: 13px; fill: var(--polder); }
.rl-m-rail { fill: none; stroke: var(--polder); stroke-width: 4.5; stroke-linejoin: round; }
.rl-m-rail-tie { fill: none; stroke: var(--oranje); stroke-width: 2; stroke-dasharray: 7 7; stroke-linejoin: round; }
.rl-town circle { fill: var(--polder); }
.rl-lbl { font-family: var(--text); font-weight: 600; font-size: 13.5px; fill: var(--polder); }
.rl-lbl.is-major { font-family: var(--disp); font-weight: 700; font-size: 18px; }
.rl-pin circle { fill: var(--melk); stroke: var(--polder); stroke-width: 3.5; }
.rl-pin-n { font-family: var(--disp); font-weight: 700; font-size: 17px; fill: var(--polder); }
.rl-m-scale path { fill: none; stroke: var(--polder); stroke-width: 2; }
.rl-m-scale text { font-family: var(--text); font-size: 12px; fill: var(--polder); }

.rl-kaart figcaption { margin-top: 1rem; }
.rl-kaart-h { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .35rem; }
.rl-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); border-top: 2px solid var(--polder); }
.rl-legend li { border-bottom: 1px solid rgba(16, 42, 51, .35); }
.rl-legend a, .rl-legend-nolink { display: flex; align-items: center; gap: .65rem; padding: .55rem .4rem .5rem 0; text-decoration: none; color: var(--polder); min-height: 52px; }
.rl-legend-t { display: flex; flex-direction: column; line-height: 1.2; }
.rl-legend-name { font-family: var(--disp); font-weight: 700; font-size: 1.08rem; padding-top: .1em; }
.rl-legend-what { font-size: .82rem; }
.rl-legend a:hover .rl-legend-name, .rl-legend a:focus-visible .rl-legend-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.rl-legend a:hover .rl-kp, .rl-legend a:focus-visible .rl-kp { background: var(--polder); color: var(--melk); }
.rl-kaart-note { display: block; font-size: .82rem; margin-top: .7rem; max-width: 60ch; }
.rl-kaart:has([data-n="1"] a:is(:hover, :focus-visible)) .rl-pin[data-n="1"] circle,
.rl-kaart:has([data-n="2"] a:is(:hover, :focus-visible)) .rl-pin[data-n="2"] circle,
.rl-kaart:has([data-n="3"] a:is(:hover, :focus-visible)) .rl-pin[data-n="3"] circle,
.rl-kaart:has([data-n="4"] a:is(:hover, :focus-visible)) .rl-pin[data-n="4"] circle,
.rl-kaart:has([data-n="5"] a:is(:hover, :focus-visible)) .rl-pin[data-n="5"] circle { fill: var(--polder); }
.rl-kaart:has([data-n="1"] a:is(:hover, :focus-visible)) .rl-pin[data-n="1"] .rl-pin-n,
.rl-kaart:has([data-n="2"] a:is(:hover, :focus-visible)) .rl-pin[data-n="2"] .rl-pin-n,
.rl-kaart:has([data-n="3"] a:is(:hover, :focus-visible)) .rl-pin[data-n="3"] .rl-pin-n,
.rl-kaart:has([data-n="4"] a:is(:hover, :focus-visible)) .rl-pin[data-n="4"] .rl-pin-n,
.rl-kaart:has([data-n="5"] a:is(:hover, :focus-visible)) .rl-pin[data-n="5"] .rl-pin-n { fill: var(--melk); }
.rl-legend a:focus-visible { outline-offset: 0; }

@media (max-width: 900px) {
	.rl-hero-inner { grid-template-columns: 1fr; }
	.rl-hero-title { font-size: clamp(2.7rem, 12vw, 4.4rem); }
}
@media (max-width: 600px) {
	.rl-town .rl-lbl { font-size: 17px; }
	.rl-lbl.is-major { font-size: 23px; }
	.rl-pin circle { r: 19px; }
	.rl-pin-n { font-size: 22px; }
	.rl-town.is-minor { display: none; }
	.rl-m-land, .rl-m-water { font-size: 18px; }
	.rl-m-scale text { font-size: 16px; }
}

/* ==========================================================================
   Sektioner
   ========================================================================== */

.rl-section { margin-top: clamp(4rem, 8vw, 7rem) !important; }
.rl-sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 3rem; border-bottom: 2px solid var(--polder); padding-bottom: .9rem; margin-bottom: 2.2rem; }
.rl-sec-title { font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.05; margin: 0; }
.rl-sec-note { margin: 0; max-width: 46ch; font-size: .98rem; }

/* Guiderna som rutt: knutpunkter på en linje. */
.rl-rutt { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; position: relative; }
.rl-rutt::before { content: ""; position: absolute; left: 1.5rem; right: 0; top: calc(1.5rem - 1.5px); height: 3px; background: var(--polder); }
.rl-rutt::after { content: ""; position: absolute; right: -2px; top: calc(1.5rem - 7px); border: 7px solid transparent; border-left: 11px solid var(--polder); border-right: 0; }
.rl-rutt-stop { position: relative; }
.rl-rutt-stop a { display: flex; flex-direction: column; gap: .7rem; text-decoration: none; color: var(--polder); height: 100%; }
.rl-rutt-stop .rl-kp { position: relative; z-index: 1; }
.rl-rutt-t { font-family: var(--disp); font-weight: 700; font-size: clamp(1.3rem, 1.9vw, 1.55rem); line-height: 1.15; padding-top: .35rem; }
.rl-rutt-e { font-size: .97rem; line-height: 1.6; }
.rl-rutt-stop a:hover .rl-kp, .rl-rutt-stop a:focus-visible .rl-kp { background: var(--oranje); border-color: var(--polder); }
.rl-rutt-stop a:hover .rl-rutt-t { text-decoration: underline; text-decoration-color: var(--oranje); text-decoration-thickness: 3px; text-underline-offset: .2em; }
.rl-rutt-stop.is-current .rl-kp { background: var(--polder); color: var(--melk); }
@media (max-width: 860px) {
	.rl-rutt { grid-template-columns: 1fr; gap: 0; }
	.rl-rutt::before { left: calc(1.5rem - 1.5px); right: auto; top: 1.5rem; bottom: 1.5rem; width: 3px; height: auto; }
	.rl-rutt::after { display: none; }
	.rl-rutt-stop a { display: grid; grid-template-columns: 3rem 1fr; column-gap: 1.1rem; row-gap: .2rem; padding-bottom: 1.8rem; }
	.rl-rutt-stop .rl-kp { grid-row: span 2; }
	.rl-rutt-t { padding-top: .55rem; }
}

/* Listposter i dikesrutnätet. */
.rl-nytt { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.rl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 3vw, 3rem); row-gap: 0; }
.rl-grid.is-3, .rl-grid.is-feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rl-item { border-top: 2px solid var(--polder); padding: 1.1rem 0 2.2rem; display: flex; flex-direction: column; gap: .5rem; }
.rl-item-text { display: flex; flex-direction: column; gap: .45rem; }
.rl-item-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--sloot); margin-bottom: .5rem; }
.rl-item-img img, .rl-qitem .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rl-item-kick, .rl-qitem .wp-block-post-terms { margin: 0; font-size: .85rem; font-weight: 700; }
.rl-item-kick a, .rl-qitem .wp-block-post-terms a { color: var(--oranje-djup); text-decoration: none; display: inline-block; min-height: 24px; }
.rl-item-kick a:hover, .rl-qitem .wp-block-post-terms a:hover { text-decoration: underline; }
.rl-item-title, .rl-qitem .wp-block-post-title { font-size: 1.42rem; line-height: 1.16; margin: 0; font-weight: 700; }
.rl-item-title a, .rl-qitem .wp-block-post-title a { text-decoration: none; color: var(--polder); }
.rl-item-title a:hover, .rl-qitem .wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--oranje); text-decoration-thickness: 3px; text-underline-offset: .16em; }
.rl-item-ex, .rl-qitem .wp-block-post-excerpt { margin: 0; font-size: .97rem; line-height: 1.6; }
.rl-qitem .wp-block-post-excerpt__excerpt { margin: 0; }
.rl-item-meta, .rl-qitem .wp-block-post-date { margin: .2rem 0 0; font-size: .85rem; color: var(--grijs); }
.rl-item.is-lead { border-top-width: 6px; padding-top: 1.4rem; }
.rl-item.is-lead .rl-item-title { font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.04; }
.rl-item.is-lead .rl-item-ex { font-size: 1.1rem; line-height: 1.6; }
.rl-item.is-lead:not(.has-img) .rl-item-text { padding-top: .4rem; }
.rl-qitem .wp-block-post-featured-image { aspect-ratio: 3 / 2; overflow: hidden; margin: 0 0 .5rem; }
.rl-qitem .wp-block-post-featured-image a { display: block; height: 100%; }
.rl-feed .wp-block-post-template { margin: 0; padding: 0; }
@media (max-width: 1000px) {
	.rl-nytt { grid-template-columns: 1fr; }
	.rl-grid.is-3, .rl-grid.is-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.rl-grid, .rl-grid.is-3, .rl-grid.is-feed { grid-template-columns: 1fr; }
}

/* Ämnena som tegar: långsmala fält mellan dikena. */
.rl-tegar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 6px solid var(--polder); border-bottom: 2px solid var(--polder); }
.rl-tegar li { border-left: 1px solid var(--polder); }
.rl-tegar li:first-child { border-left: 0; }
.rl-tegar a { display: flex; flex-direction: column; gap: .7rem; height: 100%; min-height: 12rem; padding: 1.4rem 1.2rem 1.3rem; text-decoration: none; color: var(--polder); }
.rl-tegar li:first-child a { padding-left: 0; }
.rl-teg-t { font-family: var(--disp); font-weight: 700; font-size: 1.45rem; line-height: 1.1; }
.rl-teg-d { font-size: .93rem; line-height: 1.55; flex: 1; }
.rl-teg-n { font-size: .85rem; font-weight: 700; }
.rl-tegar a:hover, .rl-tegar a[aria-current="page"] { background: var(--oranje); }
.rl-tegar li:first-child a:hover, .rl-tegar li:first-child a[aria-current="page"] { padding-left: 1.2rem; }
.rl-tegar a:focus-visible { outline-offset: -4px; }
@media (prefers-reduced-motion: no-preference) { .rl-tegar a { transition: background-color .2s ease, padding .2s ease; } }
@media (max-width: 1000px) {
	.rl-tegar { grid-template-columns: 1fr; }
	.rl-tegar li { border-left: 0; border-top: 1px solid var(--polder); }
	.rl-tegar li:first-child { border-top: 0; }
	.rl-tegar a, .rl-tegar li:first-child a { min-height: 0; padding: 1.1rem 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem 1rem; }
	.rl-tegar a:hover, .rl-tegar li:first-child a:hover, .rl-tegar a[aria-current="page"], .rl-tegar li:first-child a[aria-current="page"] { padding-left: .8rem; padding-right: .8rem; }
	.rl-teg-d { grid-column: 1 / -1; grid-row: 2; }
	.rl-teg-n { grid-column: 2; grid-row: 1; align-self: center; }
}

/* Om-rutan på startsidan. */
.rl-about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); border-top: 2px solid var(--polder); padding-top: 2rem; }
.rl-about .rl-sec-title { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.rl-about-text { max-width: 62ch; }
.rl-about-text p { margin: 0 0 1.1em; }
@media (max-width: 860px) { .rl-about { grid-template-columns: 1fr; } }

/* ==========================================================================
   Artikel
   ========================================================================== */

.rl-article-head { max-width: 900px; margin: clamp(2.5rem, 6vw, 5rem) auto 2.4rem; }
.rl-kicker { margin: 0 0 1rem; font-weight: 700; font-size: .95rem; }
.rl-kicker a { color: var(--oranje-djup); text-decoration: none; border-bottom: 3px solid var(--oranje); padding-bottom: .1rem; display: inline-block; min-height: 24px; }
.rl-kicker a:hover { color: var(--polder); }
.rl-article-title { font-size: clamp(2.3rem, 5.2vw, 4.3rem) !important; line-height: 1.02 !important; letter-spacing: -.015em; margin: 0 0 1.2rem !important; }
.rl-dek { font-size: clamp(1.15rem, 1.7vw, 1.35rem); line-height: 1.55; max-width: 48ch; margin: 0 0 1.4rem !important; }
.rl-dek p { margin: 0; }
.rl-byline { gap: .35rem !important; align-items: baseline; font-size: .92rem; color: var(--grijs); }
.rl-byline .wp-block-post-author-name { color: var(--polder); font-weight: 700; }
.rl-byline .wp-block-post-date { color: var(--grijs); font-size: .92rem; }
.rl-byline .wp-block-post-date::before { content: "·"; margin: 0 .5em 0 .15em; }
.rl-hero-img { max-width: var(--wide); margin: 0 auto 3rem !important; }
.rl-hero-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }

.rl-read { display: grid; grid-template-columns: minmax(0, 1fr) min(var(--measure), 100%) minmax(0, 1fr); column-gap: clamp(2rem, 4vw, 4rem); max-width: var(--wide); margin: 0 auto; }
.rl-read-aside { grid-column: 1; grid-row: 1; justify-self: end; width: 100%; max-width: 270px; }
.rl-read > .rl-body, .rl-read > .rl-read-main { grid-column: 2; grid-row: 1; min-width: 0; }
.rl-read-aside > * { position: sticky; top: 2rem; }
@media (max-width: 1100px) {
	.rl-read { grid-template-columns: minmax(0, 1fr); max-width: var(--measure); }
	.rl-read-aside { grid-column: 1; grid-row: 1; justify-self: stretch; max-width: none; }
	.rl-read > .rl-body, .rl-read > .rl-read-main { grid-column: 1; grid-row: 2; }
	.rl-read-aside > * { position: static; }
}

/* Lappen på styret: innehållsförteckningen som rutt. */
.rl-lapp { border-top: 2px solid var(--polder); padding-top: .9rem; margin-bottom: 2.5rem; }
.rl-lapp-h { font-weight: 700; font-size: .9rem; margin: 0 0 .8rem; }
.rl-lapp ol { list-style: none; margin: 0; padding: 0; }
.rl-lapp li { position: relative; }
.rl-lapp li:not(:last-child)::before { content: ""; position: absolute; left: calc(.875rem - 1px); top: 1.75rem; bottom: -.1rem; width: 2px; background: var(--polder); }
.rl-lapp a { display: flex; gap: .75rem; align-items: flex-start; padding: 0 0 .85rem; text-decoration: none; font-size: .9rem; line-height: 1.4; color: var(--polder); min-height: 44px; }
.rl-lapp a > span:last-child { padding-top: .3rem; }
.rl-lapp .rl-kp { width: 1.75rem; height: 1.75rem; font-size: .85rem; border-width: 2px; }
.rl-lapp a:hover > span:last-child { text-decoration: underline; text-decoration-color: var(--oranje); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.rl-lapp a:hover .rl-kp { background: var(--oranje); }

/* Brödtexten. */
.rl-body { font-size: 1.125rem; line-height: 1.75; }
@media (max-width: 600px) { .rl-body { font-size: 1.0625rem; } }
.rl-body > * { margin-top: 0; margin-bottom: 1.3em; }
.rl-body h2 { font-size: clamp(1.65rem, 2.6vw, 2.15rem); line-height: 1.12; margin: 2.3em 0 .7em; scroll-margin-top: 1.5rem; }
.rl-body h3 { font-size: 1.32rem; line-height: 1.25; margin: 1.9em 0 .5em; }
.rl-body ul, .rl-body ol { padding-left: 1.3em; }
.rl-body li { margin-bottom: .55em; }
.rl-body ul li::marker { color: var(--oranje-djup); }
.rl-body ol li::marker { font-family: var(--disp); font-weight: 700; }
.rl-body blockquote { margin: 2em 0; padding: .2em 0 .2em 1.3em; border-left: 6px solid var(--oranje); font-family: var(--disp); font-size: 1.45rem; line-height: 1.35; }
.rl-body blockquote p { margin: 0; }
.rl-body img { max-width: 100%; height: auto; }
.rl-body table { width: 100%; border-collapse: collapse; font-size: .97rem; font-variant-numeric: tabular-nums; }
.rl-body th, .rl-body td { text-align: left; padding: .6rem .8rem .6rem 0; border-bottom: 1px solid var(--sloot); vertical-align: top; }
.rl-body th { border-bottom: 2px solid var(--polder); }
.rl-body .rl-fakta { background: var(--oranje); padding: 1.4rem 1.5rem 1.2rem; margin: 2.2em 0; }
.rl-body .rl-fakta > :first-child { margin-top: 0; }
.rl-body .rl-fakta h3 { margin: 0 0 .6rem; font-size: 1.3rem; }
.rl-body .rl-fakta ul { margin: 0; }
.rl-body .rl-fakta li::marker { color: var(--polder); }
.rl-body .rl-fakta p:last-child { margin-bottom: 0; }
.rl-body .rl-fakta a { text-decoration-color: var(--polder); }
.rl-body .rl-fakta a:hover { color: var(--polder); text-decoration-color: var(--melk); }
.rl-body [lang="nl"] { font-style: italic; }
.rl-body dfn { font-style: italic; }

/* Arkivinläggen: samma läsyta, ingen orange accent i huvudet. */
.rl-is-arkiv .rl-kicker a { color: var(--grijs); border-bottom-color: var(--sloot); }

.rl-author { max-width: var(--measure); margin: 4rem auto 0 !important; border-top: 2px solid var(--polder); padding-top: 1.2rem; }
.rl-author-k { margin: 0; font-size: .85rem; font-weight: 700; color: var(--grijs); }
.rl-author-name { font-family: var(--disp); font-weight: 700; font-size: 1.5rem; margin: .1rem 0 .4rem; }
.rl-author .wp-block-post-author-biography { font-size: .98rem; line-height: 1.65; margin: 0 0 .6rem; }
.rl-author-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; }

/* ==========================================================================
   Guide (pelarsida)
   ========================================================================== */

.rl-guide-head { background: var(--polder); color: var(--melk); margin-top: 0 !important; padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.rl-guide-head-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.rl-guide-kp { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .7rem; font-size: .88rem; font-weight: 700; color: var(--dis); }
.rl-guide-kp .rl-kp { color: var(--polder); }
.rl-guide-title { color: var(--melk) !important; font-size: clamp(2.3rem, 5.4vw, 4.6rem) !important; line-height: 1.02 !important; letter-spacing: -.015em; margin: 0 0 1.1rem !important; max-width: 18ch; }
.rl-guide-head .rl-dek { color: var(--melk); max-width: 52ch; }
.rl-guide-head .rl-byline, .rl-guide-head .rl-byline .wp-block-post-author-name { color: var(--dis); }
.rl-guide-head .rl-byline .wp-block-post-author-name { color: var(--melk); }
.rl-guide-head :focus-visible { outline-color: var(--oranje); }
.rl-hero-img.is-guide { margin-top: 0 !important; }
.rl-read.is-guide { margin-top: clamp(2.5rem, 5vw, 4rem) !important; }
@media (max-width: 700px) {
	.rl-guide-head-inner { grid-template-columns: 1fr; gap: 1.2rem; }
	.rl-guide-kp { flex-direction: row; align-items: center; }
}

.rl-nasta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 1.1rem; align-items: center; margin: 3.5rem 0 0; padding: 1.3rem 1.4rem; border: 2px solid var(--polder); text-decoration: none; color: var(--polder); }
.rl-nasta-k { grid-column: 2 / 4; grid-row: 1; font-size: .85rem; font-weight: 700; }
.rl-nasta .rl-kp { grid-column: 1; grid-row: 1 / 3; }
.rl-nasta-t { grid-column: 2; grid-row: 2; font-family: var(--disp); font-weight: 700; font-size: 1.45rem; line-height: 1.15; padding-top: .15em; }
.rl-nasta-pil { grid-column: 3; grid-row: 2; font-size: 1.6rem; }
.rl-nasta:hover { background: var(--oranje); color: var(--polder); }

/* ==========================================================================
   Sidor, arkiv, sök och 404
   ========================================================================== */

.rl-page-head { max-width: var(--measure); margin: clamp(2.5rem, 6vw, 5rem) auto 2rem !important; border-bottom: 2px solid var(--polder); padding-bottom: 1.4rem; }
.rl-page-title { font-size: clamp(2.3rem, 5vw, 4rem) !important; line-height: 1.02 !important; margin: 0 0 1rem !important; }
.rl-page-body { max-width: var(--measure); margin-left: auto !important; margin-right: auto !important; }

.rl-archive-head { margin: clamp(2.5rem, 6vw, 5rem) auto 2.5rem !important; max-width: var(--wide); }
.rl-arch-k { margin: 0 0 .6rem; font-weight: 700; font-size: .95rem; }
.rl-archive-title { font-size: clamp(2.5rem, 6.4vw, 5.4rem) !important; line-height: 1 !important; letter-spacing: -.02em; margin: 0 0 1rem !important; }
.rl-archive-title.is-search { font-size: clamp(2rem, 4.4vw, 3.4rem) !important; }
.rl-archive-head .rl-dek { max-width: 56ch; }
.wp-block-query-pagination { margin-top: 2rem; font-weight: 700; gap: 1rem; }
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }

.rl-search { max-width: 640px; margin-top: 1.5rem !important; }
.rl-search .wp-block-search__inside-wrapper { border: 0; padding: 0; gap: 0; }
.rl-search .wp-block-search__input { border: 2px solid var(--polder); border-right: 0; border-radius: 0; background: #fff; color: var(--polder); min-height: 54px; padding: .6rem 1rem; font: inherit; }
.rl-search .wp-block-search__button { border-radius: 0; margin: 0; min-height: 54px; padding: .6rem 1.4rem; background: var(--polder); color: var(--melk); border: 2px solid var(--polder); font-weight: 700; }
.rl-search .wp-block-search__button:hover { background: var(--oranje); color: var(--polder); }

.rl-404-inner { margin: clamp(3rem, 7vw, 6rem) auto 0 !important; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem clamp(1.5rem, 4vw, 3rem); align-items: start; }
.rl-404-kp { margin: 0; grid-row: span 2; }
.rl-404-inner .rl-search { grid-column: 2; margin-top: 0 !important; }
@media (max-width: 640px) { .rl-404-inner { grid-template-columns: 1fr; } .rl-404-inner .rl-search { grid-column: 1; } }

/* ==========================================================================
   Sidfot med kastanjeallén
   ========================================================================== */

.rl-site-footer { margin-top: clamp(5rem, 10vw, 8rem); }
.rl-allee { display: block; width: 100%; height: clamp(70px, 11vw, 140px); max-width: none !important; margin: 0 !important; }
.rl-allee-trees, .rl-allee-ground { fill: var(--polder); }
.rl-allee-road { fill: var(--sloot); }
.rl-footer { background: var(--polder); color: var(--melk); padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: 2.5rem; margin-top: 0 !important; }
.rl-footer a { color: var(--melk); text-decoration-color: var(--oranje); }
.rl-footer a:hover { color: var(--melk); text-decoration-color: var(--melk); }
.rl-footer :focus-visible { outline-color: var(--oranje); }
.rl-footer-cols { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1fr; gap: 2.5rem clamp(1.5rem, 3vw, 3rem); }
.rl-footer-brand p { font-size: .95rem; line-height: 1.6; max-width: 36ch; margin: 1rem 0 0; }
.rl-footer-h { font-weight: 700; font-size: .9rem; color: var(--dis); margin: 0 0 .7rem; }
.rl-footer ul { list-style: none; margin: 0; padding: 0; }
.rl-footer li a { display: inline-flex; align-items: center; gap: .6rem; min-height: 40px; font-size: .95rem; text-decoration: none; }
.rl-footer li a:hover { text-decoration: underline; text-decoration-color: var(--oranje); text-decoration-thickness: 2px; }
.rl-footer .rl-kp { width: 1.6rem; height: 1.6rem; font-size: .8rem; border-width: 2px; background: var(--oranje); border-color: var(--oranje); }
.rl-friskrivning { margin-top: 3rem !important; padding-top: 1.4rem; border-top: 1px solid rgba(248, 249, 246, .25); font-size: .88rem; color: var(--dis); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.rl-friskrivning p { margin: 0; max-width: 78ch; }
@media (max-width: 960px) { .rl-footer-cols { grid-template-columns: 1fr 1fr; } .rl-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .rl-footer-cols { grid-template-columns: 1fr; } }

/* Utskrift */
@media print { .rl-header, .rl-site-footer, .rl-read-aside, .rl-more, .rl-nasta { display: none !important; } body { background: #fff; } }

/* Inget glapp mellan sidhuvud och orange eller mörkt fält. */
.wp-site-blocks > main:has(> .rl-hero-wrap:first-child), .wp-site-blocks > main.rl-guide-page { margin-block-start: 0; }
.rl-home > .rl-hero-wrap:first-child, .rl-guide-page > .rl-guide-head:first-child { margin-block-start: 0 !important; }
.rl-feed .wp-block-post-template > li { margin: 0 !important; }
.rl-nav .is-menu-open .rl-nav-om { margin-left: 0; }
.rl-kp { box-sizing: border-box; }
