@font-face { font-family: "Barlow Condensed"; src: url("/assets/fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/public-sans-vf.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("/assets/fonts/red-hat-mono-vf.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --beton: #e9e7e2;
  --flade: #f6f5f2;
  --hvid: #ffffff;
  --sort: #1b1d1f;
  --graa: #55595e;
  --streg: #cfccc5;
  --orange: #d9541e;
  --orange-moerk: #b0400f;
  --orange-lys: #fbe4d8;
  --kond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Red Hat Mono", ui-monospace, Menlo, monospace;
  --ramme: 70rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--beton); color: var(--sort); font: 400 1.03rem/1.65 var(--sans); }
a { color: var(--orange-moerk); text-underline-offset: .18em; }
a:hover { color: var(--sort); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--kond); font-weight: 600; text-transform: uppercase; letter-spacing: .01em; line-height: 1; margin: 0 0 .45em; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 8vw, 5.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-top: 1.5em; }
h3 { font-size: 1.35rem; margin-top: 1.3em; }
p, ul, ol { margin: 0 0 1em; }
p, li { max-width: 66ch; }
.mono { font-family: var(--mono); }

.spring { position: absolute; left: -999px; top: 0; background: var(--sort); color: #fff; padding: .6rem 1rem; z-index: 10; }
.spring:focus { left: 1rem; top: 1rem; }
.ramme { width: 100%; max-width: var(--ramme); margin-inline: auto; padding-inline: 1.25rem; }

.top { background: var(--sort); color: #fff; }
.top-ind { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 2rem; padding-block: .85rem; }
.ordmaerke { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--kond); font-size: 2rem; line-height: 1; color: #fff; text-decoration: none; letter-spacing: .04em; }
.ordmaerke svg { width: 1.8rem; height: 1.5rem; color: var(--orange); }
.menu { display: flex; flex-wrap: wrap; gap: .1rem 1.3rem; font-weight: 600; font-size: .95rem; }
.menu a { color: #ddd; text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.menu a:hover { color: #fff; }
.menu a[aria-current="page"] { color: #fff; border-bottom-color: var(--orange); }

.helt { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.helt-ind { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2.5rem; align-items: center; }
.indledning { font-size: clamp(1.08rem, 2vw, 1.22rem); max-width: 44ch; }
.knapper { display: flex; flex-wrap: wrap; gap: .75rem; }
.knap { display: inline-block; font: inherit; font-weight: 700; background: var(--orange); color: #fff; text-decoration: none; padding: .75rem 1.25rem; border-radius: 3px; border: 0; cursor: pointer; }
.knap:hover { background: var(--sort); color: #fff; }
.knap-lys { background: transparent; color: var(--sort); box-shadow: inset 0 0 0 2px var(--sort); }
.knap-lys:hover { background: var(--sort); color: #fff; }
.pil::after { content: " \2192"; }

/* Profiltegning */
.profil-fig { margin: 0 0 1.5rem; }
.profil { width: 100%; height: auto; display: block; background: var(--flade); border-radius: 4px; }
.p-krop { fill: #d9d6cf; }
.p-kant { fill: none; stroke: var(--sort); stroke-width: 3; stroke-linejoin: miter; }
.p-haand { stroke: var(--sort); stroke-width: 5; stroke-linecap: round; }
.p-stolper line { stroke: var(--graa); stroke-width: 2; }
.p-forkant circle { fill: var(--orange); }
.p-maal line { stroke: var(--orange); stroke-width: 2; }
.p-tekst text { font-family: var(--mono); font-size: 15px; fill: var(--sort); }
.profil-fig figcaption { font-size: .95rem; color: var(--graa); margin-top: .6rem; }

.sektion { padding: clamp(2rem, 5vw, 3.25rem) 0; }
.sektion-lys { background: var(--flade); }
.to-spalter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3.5rem; }
.to-spalter > div > h2:first-child { margin-top: 0; }
.formel { font-family: var(--mono); font-size: clamp(1rem, 4.2vw, 1.6rem); white-space: nowrap; max-width: 100%; background: var(--sort); color: #fff; padding: 1rem 1.3rem; border-radius: 4px; display: inline-block; margin: .5rem 0 1rem; }
.formel b { color: #ff8a57; font-weight: 600; }

.genveje { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.genvej { display: block; border-radius: 4px; background: var(--flade); color: var(--sort); text-decoration: none; padding: 1.4rem 1.3rem; transition: background .2s ease; }
.genvej:hover { background: var(--hvid); color: var(--sort); }
.genvej-titel { display: block; font-family: var(--kond); font-size: 1.6rem; text-transform: uppercase; margin-bottom: .3rem; }
.genvej-titel::after { content: " \2192"; color: var(--orange); }

.side-top { padding: clamp(2rem, 6vw, 3.5rem) 0 .5rem; }
.side-top h1 { font-size: clamp(2.5rem, 7vw, 4.2rem); }
.artikel { padding-bottom: 3rem; }
.artikel > h2:first-child { margin-top: .4em; }
.boks { background: var(--flade); border-radius: 4px; padding: 1.1rem 1.3rem; margin: 1.5rem 0; max-width: 46rem; }
.boks p:last-child { margin-bottom: 0; }
.note { font-size: .93rem; color: var(--graa); }

.kort-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 0; list-style: none; margin: 1.2rem 0 2rem; }
.kort-liste li { background: var(--flade); border-radius: 4px; padding: 1.1rem 1.2rem; max-width: none; }
.kort-liste h3 { margin-top: 0; }
.kort-liste p { margin: 0; }

.ord { display: grid; grid-template-columns: 12rem 1fr; gap: 0; margin: 1rem 0 2rem; max-width: 52rem; }
.ord dt, .ord dd { padding: .7rem 0; border-bottom: 1px solid var(--streg); margin: 0; }
.ord dt { font-family: var(--kond); font-size: 1.3rem; text-transform: uppercase; }

/* Beregner */
.beregner { background: var(--hvid); border-radius: 4px; padding: clamp(1.2rem, 3.5vw, 2rem); margin-bottom: 2rem; }
.b-felter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.felt label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.felt .enhed { display: flex; align-items: center; border: 2px solid var(--streg); border-radius: 3px; background: #fff; }
.felt .enhed:focus-within { border-color: var(--sort); }
.felt input { width: 100%; min-width: 0; font: 1.2rem var(--mono); padding: .55rem .7rem; border: 0; background: transparent; color: var(--sort); }
.felt input:focus { outline: none; }
.felt .enhed span { padding: 0 .7rem; color: var(--graa); font-family: var(--mono); }
.felt small { display: block; color: var(--graa); font-size: .85rem; margin-top: .25rem; }
.b-fejl { color: var(--orange-moerk); font-weight: 600; min-height: 1.5em; }
.b-hoved { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--streg); margin: 0 0 1.5rem; padding: 0; list-style: none; border-radius: 3px; overflow: hidden; }
.b-hoved li { background: var(--flade); padding: .9rem 1rem; }
.b-hoved strong { display: block; font-family: var(--mono); font-size: 1.6rem; font-weight: 600; line-height: 1.15; }
.b-hoved span { font-size: .85rem; color: var(--graa); }
.tabel-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1rem; }
.tabel { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: .95rem; }
.tabel th, .tabel td { text-align: right; padding: .55rem .8rem; border-bottom: 1px solid var(--streg); white-space: nowrap; }
.tabel th:first-child, .tabel td:first-child { text-align: left; }
.tabel thead th { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--graa); font-weight: 600; }
.tabel tr.valgt td { background: var(--orange-lys); font-weight: 600; }

.bund { margin-top: 2rem; background: var(--sort); color: #cfcfcf; }
.bund-flade { padding: 1.6rem 0 2.2rem; }
.bund-ind { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; align-items: baseline; }
.bund-navn { font-family: var(--kond); font-size: 1.5rem; color: #fff; text-transform: uppercase; margin: 0; }
.bund-navn span { display: block; font-family: var(--sans); text-transform: none; font-size: .92rem; color: #cfcfcf; }
.bund nav { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.bund a { color: #e6e6e6; }
.bund a:hover { color: #fff; }

@media (max-width: 860px) {
  .helt-ind, .to-spalter { grid-template-columns: 1fr; }
  .genveje, .kort-liste, .b-felter { grid-template-columns: 1fr; }
  .b-hoved { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .ord { grid-template-columns: 1fr; }
  .ord dt { border-bottom: 0; padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .genvej { transition: none; } }
.b-titel { margin-top: 0; font-family: var(--sans); text-transform: none; font-size: .95rem; font-weight: 600; color: var(--graa); letter-spacing: 0; }
.b-fejl:empty { display: none; }
