/* låneoversigt.dk - kontoudtog: papir, blæk, linjeret grønt */
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/public-sans-vf.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --papir: #f7f6f1;
  --papir-2: #eeede4;
  --hvid: #fffefb;
  --blaek: #1d2b36;
  --daempet: #4e5b63;
  --groen: #2f6b55;
  --groen-dyb: #1f4a3b;
  --groen-lys: #e2ebe4;
  --guld: #9a6b1a;
  --linje: #d6d8cc;
  --advarsel: #8e2f1f;
  --serif: "Source Serif 4", Georgia, serif;
  --tekst: "Public Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --rund: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papir); color: var(--blaek); font-family: var(--tekst); font-size: 1.0625rem; line-height: 1.62; }
::selection { background: var(--groen-lys); }
img, svg { max-width: 100%; }
a { color: var(--groen); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--groen-dyb); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--guld); outline-offset: 2px; border-radius: 2px; }
.ramme { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.spring { position: absolute; left: 1rem; top: -4rem; background: var(--blaek); color: var(--hvid); padding: .5rem .9rem; z-index: 10; }
.spring:focus { top: .75rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); margin: 0 0 1rem; font-weight: 650; }
h2 { font-size: clamp(1.45rem, 3vw, 1.95rem); margin: 2.4em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.6em 0 .4em; }
p { margin: 0 0 1em; }
.overlinje { font-family: var(--mono); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--groen); margin-bottom: .9rem; }
.indledning { font-size: clamp(1.1rem, 2vw, 1.25rem); line-height: 1.55; max-width: 44ch; color: var(--daempet); }
.note { font-size: .98rem; color: var(--daempet); padding-top: .9rem; border-top: 1px solid var(--linje); }

/* Top */
.top { background: var(--hvid); border-bottom: 1px solid var(--linje); }
.top-ind { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1.6rem; padding-block: .9rem; }
.ordmaerke { display: inline-flex; align-items: center; gap: .55rem; color: var(--blaek); text-decoration: none; font-family: var(--serif); font-weight: 650; font-size: 1.35rem; }
.ordmaerke:hover { color: var(--blaek); }
.maerke-ikon { width: 1.7rem; height: 1.7rem; color: var(--groen); flex: none; }
.menu { display: flex; flex-wrap: wrap; gap: .1rem 1.15rem; }
.menu a { color: var(--daempet); text-decoration: none; font-weight: 500; font-size: .96rem; padding-block: .3rem; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--blaek); border-bottom-color: var(--linje); }
.menu a[aria-current="page"] { color: var(--groen-dyb); border-bottom-color: var(--groen); }

/* Knapper */
.knapper { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.knap { display: inline-flex; align-items: center; min-height: 2.9rem; padding: .65rem 1.3rem; border: 1.5px solid var(--groen); border-radius: var(--rund); background: var(--groen); color: var(--hvid); font: 600 1rem/1 var(--tekst); text-decoration: none; transition: background-color .15s ease-out; }
.knap:hover { background: var(--groen-dyb); border-color: var(--groen-dyb); color: var(--hvid); text-decoration: none; }
.knap-lys { background: transparent; color: var(--groen-dyb); }
.knap-lys:hover { background: var(--groen-lys); color: var(--groen-dyb); }

/* Helt */
.helt { background: var(--hvid); border-bottom: 1px solid var(--linje); }
.helt-ind { display: grid; gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.anatomi { margin: 0; background: var(--papir); border: 1px solid var(--linje); border-radius: var(--rund); padding: 1.2rem 1.2rem .9rem; }
.anatomi svg { display: block; width: 100%; height: auto; }
.anatomi-linjer line { stroke: var(--linje); stroke-width: 1; }
.a-laan { fill: var(--groen); } .a-rente { fill: #7fa891; } .a-gebyr { fill: var(--guld); }
.anatomi-tekst text { font-family: var(--mono); font-size: 15px; fill: var(--blaek); }
.anatomi-tekst .sum { font-family: var(--serif); font-weight: 650; font-size: 19px; }
.anatomi figcaption { font-size: .9rem; color: var(--daempet); margin-top: .7rem; }
@media (min-width: 880px) { .helt-ind { grid-template-columns: 1.1fr .9fr; } }

/* Sektioner */
.sektion { padding-block: clamp(1rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4.5rem); }
.sektion-lys { background: var(--papir-2); padding-block: clamp(2.5rem, 6vw, 4rem); }
.to-spalter { display: grid; gap: 1rem 4rem; }
@media (min-width: 880px) { .to-spalter { grid-template-columns: 1fr 1fr; } }
.tal-liste { margin: 0; }
.tal-liste div { display: grid; grid-template-columns: 11rem 1fr; gap: .2rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--linje); }
.tal-liste div:first-child { border-top: 1px solid var(--linje); }
.tal-liste dt { font-weight: 650; }
.tal-liste dd { margin: 0; color: var(--daempet); }
@media (max-width: 520px) { .tal-liste div { grid-template-columns: 1fr; } }
.genveje { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.genvej { display: flex; flex-direction: column; gap: .45rem; padding: 1.3rem 1.3rem 1.4rem; background: var(--hvid); border: 1px solid var(--linje); border-radius: var(--rund); color: var(--daempet); text-decoration: none; transition: border-color .15s ease-out, transform .15s ease-out; }
.genvej:hover { border-color: var(--groen); color: var(--daempet); transform: translateY(-2px); }
.genvej-titel { font-family: var(--serif); font-weight: 650; font-size: 1.2rem; color: var(--blaek); }

/* Tekstsider */
.tekstside { padding-bottom: 4rem; }
.side-top { padding-block: clamp(2.2rem, 6vw, 4rem) 1.2rem; border-bottom: 1px solid var(--linje); margin-bottom: 1.5rem; }
.artikel { max-width: 68ch; }
.artikel h2:first-child { margin-top: 1em; }
.punkter { padding-left: 1.3rem; } .punkter li { margin-bottom: .45rem; } .punkter li::marker { color: var(--groen); font-weight: 650; }
.typer { display: grid; gap: 0; }
.type { padding: 1.3rem 0; border-bottom: 1px solid var(--linje); }
.type h2 { margin: 0 0 .2rem; font-size: 1.4rem; }
.type-meta { font-family: var(--mono); font-size: .85rem; color: var(--groen); margin-bottom: .6rem; }
.type p:last-child { margin-bottom: 0; }

/* Tabeller */
.tabel-ramme { overflow-x: auto; margin: 1.2rem 0 1.6rem; border: 1px solid var(--linje); border-radius: var(--rund); background: var(--hvid); }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { padding: .6rem .9rem; text-align: left; border-bottom: 1px solid var(--linje); white-space: nowrap; }
thead th { font-family: var(--mono); font-weight: 400; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--daempet); background: var(--papir); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.tal { font-family: var(--mono); text-align: right; font-size: .93rem; }
thead th:not(:first-child) { text-align: right; }
.tabel-titel { margin-top: 2.2rem; }

/* Beregner */
.beregner { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 860px) { .beregner { grid-template-columns: 1fr 1fr; align-items: start; } }
.felter { display: grid; gap: .9rem; background: var(--hvid); border: 1px solid var(--linje); border-radius: var(--rund); padding: 1.3rem; }
.felter label { display: grid; grid-template-columns: 1fr auto; gap: .3rem .6rem; font-weight: 600; font-size: .95rem; }
.felter .enhed { font-family: var(--mono); font-weight: 400; font-size: .82rem; color: var(--daempet); align-self: end; }
.felter input { grid-column: 1 / -1; width: 100%; font: 400 1.05rem var(--mono); padding: .6rem .7rem; border: 1px solid #b9bcae; border-radius: var(--rund); background: var(--papir); color: var(--blaek); }
.felter input:focus { border-color: var(--groen); outline: 2px solid var(--groen-lys); outline-offset: 0; }
.resultat { background: var(--blaek); color: #eef1ec; border-radius: var(--rund); padding: 1.4rem 1.4rem 1.2rem; }
.res-hoved { display: flex; flex-direction: column; gap: .2rem; padding-bottom: 1rem; border-bottom: 1px solid #3c4b56; margin-bottom: .4rem; }
.res-etiket { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: #b4c2bb; }
.res-tal { font-family: var(--serif); font-weight: 650; font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.res-liste { margin: 0; }
.res-liste div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed #3c4b56; }
.res-liste div:last-child { border-bottom: 0; }
.res-liste dt { color: #c9d3ce; } .res-liste dd { margin: 0; font-family: var(--mono); text-align: right; white-space: nowrap; }
.res-advarsel { margin: .8rem 0 0; padding: .7rem .8rem; background: #f6e3d8; color: var(--advarsel); border-radius: var(--rund); font-size: .95rem; }

/* Tjekliste */
.tjek { max-width: 46rem; }
.tjek-status { display: flex; align-items: center; gap: 1rem; font-family: var(--mono); font-size: .95rem; margin-bottom: 1rem; }
.tjek-bar { flex: 1; height: .5rem; background: var(--papir-2); border-radius: 99px; overflow: hidden; }
.tjek-bar span { display: block; height: 100%; width: 0; background: var(--groen); transition: width .25s ease-out; }
.tjek-liste { list-style: none; padding: 0; margin: 0; counter-reset: p; border-top: 1px solid var(--linje); }
.tjek-liste li { border-bottom: 1px solid var(--linje); }
.tjek-liste label { display: grid; grid-template-columns: auto 1fr; gap: .9rem; padding: 1rem .2rem; cursor: pointer; }
.tjek-liste input { width: 1.3rem; height: 1.3rem; margin-top: .2rem; accent-color: var(--groen); }
.tjek-liste strong { display: block; font-weight: 650; }
.tjek-forklaring { display: block; color: var(--daempet); font-size: .97rem; margin-top: .15rem; }
.tjek-liste input:checked + span strong { color: var(--groen-dyb); }
.tjek-slut { margin-top: 1.2rem; padding: 1rem 1.1rem; background: var(--groen-lys); border-radius: var(--rund); color: var(--groen-dyb); font-weight: 600; }

/* Bund */
.bund { background: var(--blaek); color: #c9d3ce; padding-block: 2.4rem; font-size: .95rem; }
.bund-ind { display: grid; gap: 1.2rem 3rem; }
@media (min-width: 800px) { .bund-ind { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.bund-navn { font-family: var(--serif); font-weight: 650; font-size: 1.15rem; color: #fff; margin-bottom: .4rem; }
.bund-note { max-width: 46ch; margin: 0; }
.bund nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.bund a { color: #e6ece8; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
