/* p-skiver.dk - skilteblå, asfalt og gul vejstribe */
@font-face { font-family: "Barlow Condensed"; src: url("/assets/fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --blaa: #0f4a96;
  --blaa-dyb: #0a3570;
  --blaa-lys: #e6eef8;
  --asfalt: #1d232b;
  --asfalt-2: #2b333d;
  --gul: #f4c430;
  --hvid: #ffffff;
  --graa: #f3f4f1;
  --linje: #d4d8dc;
  --tekst: #1d232b;
  --daempet: #525c68;
  --roed: #c1121f;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --brod: "Barlow", system-ui, sans-serif;
  --rund: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--graa); color: var(--tekst); font-family: var(--brod); font-size: 1.0625rem; line-height: 1.6; }
::selection { background: var(--gul); color: var(--asfalt); }
a { color: var(--blaa); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--blaa-dyb); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gul); outline-offset: 2px; box-shadow: 0 0 0 5px var(--asfalt); }

.ramme { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.ramme.smal { width: min(100% - 2rem, 46rem); }
.spring { position: absolute; left: 1rem; top: -4rem; background: var(--gul); color: var(--asfalt); padding: 0.5rem 0.9rem; font-weight: 600; z-index: 10; }
.spring:focus { top: 0.75rem; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.04; letter-spacing: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7.5vw, 4.6rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.75rem, 4vw, 2.4rem); margin: 2em 0 0.5em; }
h3 { font-size: 1.45rem; margin: 0 0 0.3rem; }
p { margin: 0 0 1em; }
.indledning { font-size: clamp(1.12rem, 2.2vw, 1.28rem); line-height: 1.5; max-width: 42ch; }
.overtekst { font-family: var(--display); font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 0.6rem; color: var(--blaa); }

/* Top */
.top { background: var(--asfalt); color: #fff; }
.top-ind { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 0.7rem; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font-family: var(--display); font-size: 1.55rem; line-height: 1; }
.logo:hover { color: #fff; }
.logo-p { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; background: var(--blaa); border-radius: 5px; box-shadow: inset 0 0 0 2px var(--blaa), inset 0 0 0 4px #fff; font-size: 1.5rem; }
.menu { display: flex; flex-wrap: wrap; gap: 0.1rem 1.2rem; }
.menu a { color: #cdd3da; text-decoration: none; font-weight: 600; font-size: 0.98rem; padding-block: 0.3rem; }
.menu a:hover { color: #fff; }
.menu a[aria-current="page"] { color: var(--gul); }

/* Forside-top */
.helt { background: var(--blaa); color: #fff; padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.helt .overtekst { color: var(--gul); }
.helt-ind { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 52rem) { .helt-ind { grid-template-columns: 1.4fr 1fr; } }
.helt-skive { justify-self: center; width: min(100%, 17rem); }
.helt .knap { background: var(--gul); color: var(--asfalt); }
.helt .knap:hover { background: #fff; color: var(--asfalt); }
.helt .knap-lys { background: transparent; color: #fff; border-color: #fff; }
.helt .knap-lys:hover { background: #fff; color: var(--blaa); }

/* P-skiven */
.pskive { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25)); }
.ps-krop { fill: #0d3f82; stroke: #fff; stroke-width: 4; }
.ps-felt { fill: #fff; }
.ps-p { font-family: var(--display); font-size: 44px; font-weight: 600; fill: var(--blaa); }
.ps-urflade { fill: #fff; }
.ps-time { stroke: var(--asfalt); stroke-width: 3; }
.ps-kvarter { stroke: #8a939d; stroke-width: 1.6; }
.ps-tal { font-family: var(--display); font-size: 20px; font-weight: 600; fill: var(--asfalt); }
.ps-viser { fill: var(--roed); }
.ps-nav { fill: var(--asfalt); }
.pskive g[transform] { transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* Sektioner */
.sektion { padding-block: clamp(2rem, 5vw, 3.5rem); }
.sektion > .ramme > h2:first-child { margin-top: 0; }
.trin { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
@media (min-width: 46rem) { .trin { grid-template-columns: 1fr 1fr; } }
@media (min-width: 66rem) { .trin { grid-template-columns: repeat(4, 1fr); } }
.trin li { display: flex; gap: 0.9rem; background: var(--hvid); border: 1px solid var(--linje); border-radius: var(--rund); padding: 1.1rem; }
.trin-nr { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 6px; background: var(--blaa); color: #fff; font-family: var(--display); font-size: 1.5rem; }
.trin p { margin: 0; color: var(--daempet); font-size: 1rem; }
.sektion-moerk { background: var(--asfalt); color: #e5e8eb; }
.sektion-moerk h2 { color: #fff; margin-top: 0.3em; }
.sektion-moerk a { color: var(--gul); }
.sektion-moerk strong { color: #fff; }
.to-spalter { display: grid; gap: 1rem 3.5rem; }
@media (min-width: 52rem) { .to-spalter { grid-template-columns: 1.2fr 1fr; } }
.fejl { list-style: none; padding: 0; margin: 0; }
.fejl li { padding: 0.8rem 0 0.8rem 2rem; border-bottom: 1px solid var(--asfalt-2); position: relative; }
.fejl li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 3px solid var(--roed); background: linear-gradient(135deg, transparent 43%, var(--roed) 43%, var(--roed) 57%, transparent 57%); }

.genveje { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .genveje { grid-template-columns: repeat(3, 1fr); } }
.genvej { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.2rem; background: var(--hvid); border: 1px solid var(--linje); border-radius: var(--rund); color: var(--daempet); text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.genvej:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(29, 35, 43, 0.1); color: var(--daempet); }
.genvej-titel { font-family: var(--display); font-size: 1.5rem; color: var(--blaa); }

.knapper { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }
.knap { display: inline-block; background: var(--blaa); color: #fff; text-decoration: none; padding: 0.75rem 1.2rem; border-radius: 6px; font-weight: 600; }
.knap:hover { background: var(--blaa-dyb); color: #fff; }
.knap-lys { background: transparent; color: var(--blaa); border: 2px solid var(--blaa); padding: calc(0.75rem - 2px) calc(1.2rem - 2px); }
.knap-lys:hover { background: var(--blaa); color: #fff; }

/* Tekstsider */
.tekstside { padding-block: clamp(2rem, 6vw, 3.5rem) 3rem; }
.side-top { margin-bottom: 1.8rem; }
.artikel { max-width: 68ch; }
.artikel ul { padding-left: 1.2rem; }
.artikel li { margin-bottom: 0.5rem; }
.artikel-gitter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 3rem; align-items: start; }
@media (min-width: 60rem) { .artikel-gitter { grid-template-columns: minmax(0, 1fr) 20rem; } .artikel-gitter aside { position: sticky; top: 1rem; margin-top: 2.6rem; } }
.faktaboks { background: var(--hvid); border: 1px solid var(--linje); border-radius: var(--rund); padding: 1.2rem; }
.faktaboks h2 { margin: 0 0 0.6rem; font-size: 1.6rem; }
.faktaboks dl { margin: 0; }
.faktaboks div { padding: 0.55rem 0; border-top: 1px solid var(--linje); }
.faktaboks dt { font-family: var(--display); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blaa); }
.faktaboks dd { margin: 0; }

/* Beregner */
.beregner { display: grid; gap: 1.5rem; background: var(--hvid); border: 1px solid var(--linje); border-radius: var(--rund); padding: clamp(1rem, 3vw, 1.75rem); margin-bottom: 1rem; }
@media (min-width: 56rem) { .beregner { grid-template-columns: 1fr 1.15fr; } }
.beregner-felter { display: grid; gap: 0.9rem 1rem; grid-template-columns: 1fr 1fr; align-content: start; }
.beregner-felter .felt:first-child, .beregner-felter .felt:nth-child(2) { grid-column: 1 / -1; }
.felt { display: block; }
.felt-navn { display: block; font-weight: 600; font-size: 0.92rem; color: var(--daempet); margin-bottom: 0.25rem; }
.felt input, .felt select { width: 100%; font: 600 1.25rem var(--brod); color: var(--tekst); padding: 0.55rem 0.7rem; border: 1px solid #aab2bb; border-radius: 6px; background: #fff; min-height: 2.9rem; }
.felt input:disabled { opacity: 0.45; }
.flueben { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.5rem; font-weight: 600; cursor: pointer; }
.flueben input { width: 1.2rem; height: 1.2rem; accent-color: var(--blaa); }
.beregner-svar { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: 1.25rem; align-items: center; background: var(--blaa-lys); border-radius: var(--rund); padding: 1.2rem; }
.svar-etiket { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.1em; color: var(--blaa); margin: 0; font-size: 0.95rem; }
.svar-tid { font-family: var(--display); font-size: clamp(2.6rem, 8vw, 3.6rem); line-height: 1; margin: 0 0 0.8rem; color: var(--asfalt); }
.svar-tid-lille { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.svar-note { margin: 0; color: var(--daempet); font-size: 0.97rem; }
@media (max-width: 30rem) { .beregner-svar { grid-template-columns: 1fr; } .svar-skive { width: 9rem; } }

.tabel-wrap { overflow-x: auto; border: 1px solid var(--linje); border-radius: var(--rund); background: var(--hvid); margin: 0.5rem 0 1rem; }
.tabel { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.tabel th, .tabel td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--linje); vertical-align: top; }
.tabel th { font-family: var(--display); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blaa); white-space: nowrap; }
.tabel td:first-child, .tabel td:nth-child(3) { white-space: nowrap; font-weight: 600; }
.tabel tr:last-child td { border-bottom: 0; }

/* Skilte og zoner */
.skilt-eksempel { display: grid; gap: 1.5rem 3rem; align-items: center; margin-bottom: 1rem; }
@media (min-width: 46rem) { .skilt-eksempel { grid-template-columns: 13rem 1fr; } }
.skilt { width: min(13rem, 60vw); height: auto; }
.skilt-forklaring { margin: 0; }
.skilt-forklaring div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--linje); }
.skilt-forklaring dt { font-family: var(--display); font-size: 1.5rem; line-height: 1.1; }
.skilt-forklaring dt.roed { color: var(--roed); }
.skilt-forklaring dd { margin: 0; }
.zone-fig { margin: 0 0 1.5rem; }
.zone-fig svg { width: 100%; height: auto; display: block; }
.zone-fig figcaption { font-size: 0.92rem; color: var(--daempet); margin-top: 0.4rem; }
.z-vej { fill: #3a434e; }
.z-stribe { stroke: var(--gul); stroke-width: 4; stroke-dasharray: 26 18; }
.z-omraade { fill: rgba(15, 74, 150, 0.08); stroke: var(--blaa); stroke-width: 2; stroke-dasharray: 8 6; }
.z-pladser rect { fill: none; stroke: #fff; stroke-width: 2; }
.z-tavle { fill: var(--blaa); stroke: #fff; stroke-width: 3; }
.z-tavle-t { font: 600 18px var(--display); fill: #fff; letter-spacing: 2px; }
.z-tavle-p { font: 600 34px var(--display); fill: #fff; }
.z-streg { stroke: #fff; stroke-width: 5; }
.z-tekst { font: 600 20px var(--display); fill: var(--blaa); }

/* Bund */
.bund { background: var(--asfalt); color: #cdd3da; margin-top: 2rem; }
.vejstribe { height: 6px; background: repeating-linear-gradient(90deg, var(--gul) 0 40px, transparent 40px 70px); }
.bund-ind { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2.5rem; padding-block: 2rem; }
.bund-navn { font-family: var(--display); font-size: 1.5rem; color: #fff; margin: 0 0 0.3rem; }
.bund-tekst { margin: 0; font-size: 0.95rem; max-width: 34ch; }
.bund nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-content: start; max-width: 32rem; }
.bund a { color: #cdd3da; text-decoration: none; font-size: 0.97rem; }
.bund a:hover { color: #fff; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { .pskive g[transform], .genvej { transition: none; } .genvej:hover { transform: none; } }
