/* hurtigkredit.dk - nøgtern forbrugeroplysning: papir, blæk og en dyb grøn */
@font-face { font-family: "Literata"; src: url("/assets/fonts/literata.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/public-sans.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --papir: #f7f6f2;
  --papir-2: #ecebe4;
  --hvid: #ffffff;
  --blaek: #1d2433;
  --blaek-2: #2b3447;
  --groen: #1f5c4a;
  --mynte: #7fc4a8;
  --mynte-lys: #dcefe6;
  --daempet: #5a6170;
  --linje: #d6d4ca;
  --rav: #9a5414;
  --rav-lys: #fbecd9;
  --serif: "Literata", Georgia, serif;
  --tekst: "Public Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::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.65; }
::selection { background: var(--mynte); color: var(--blaek); }
img, svg { max-width: 100%; }
a { color: var(--groen); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--blaek); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--groen); outline-offset: 2px; border-radius: 2px; }

.ramme { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.spring { position: absolute; left: 1rem; top: -4rem; background: var(--mynte); color: var(--blaek); padding: 0.5rem 0.9rem; font-weight: 700; z-index: 10; }
.spring:focus { top: 0.75rem; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; text-wrap: balance; }
h1 { font-weight: 600; font-size: clamp(2.3rem, 6vw, 3.8rem); margin: 0 0 1rem; letter-spacing: -0.015em; }
h2 { font-weight: 600; font-size: clamp(1.5rem, 3.2vw, 2rem); margin: 2.2em 0 0.5em; letter-spacing: -0.01em; }
h3 { font-weight: 600; font-size: 1.2rem; margin: 1.4em 0 0.4em; }
p { margin: 0 0 1em; }
.indledning { font-size: clamp(1.12rem, 2.1vw, 1.27rem); line-height: 1.55; max-width: 46ch; color: var(--blaek-2); }
.etiket { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--groen); margin: 0 0 0.8rem; }

/* Top */
.top { background: var(--blaek); color: var(--papir); }
.top-ind { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 0.85rem; }
.ordmaerke { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--papir); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.4rem; line-height: 1; }
.ordmaerke:hover { color: var(--papir); }
.ordmaerke .punkt { color: var(--mynte); }
.maerke { width: 1.8rem; height: 1.8rem; color: var(--mynte); flex: none; }
.menu { display: flex; flex-wrap: wrap; gap: 0.1rem 1.1rem; }
.menu a { color: #c9cfdb; text-decoration: none; font-weight: 500; font-size: 0.97rem; padding-block: 0.3rem; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--hvid); border-bottom-color: #6b7489; }
.menu a[aria-current="page"] { color: var(--hvid); border-bottom-color: var(--mynte); }

/* Knapper */
.knapper { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.knap { display: inline-flex; align-items: center; min-height: 3rem; padding: 0.7rem 1.3rem; border-radius: 6px; background: var(--groen); color: var(--hvid); border: 2px solid var(--groen); font: 600 1rem/1 var(--tekst); text-decoration: none; transition: background-color .15s ease-out; }
.knap:hover { background: #174a3b; border-color: #174a3b; color: var(--hvid); }
.knap-lys { background: transparent; color: var(--groen); }
.knap-lys:hover { background: var(--mynte-lys); color: var(--groen); }

/* Forside */
.helt { border-bottom: 1px solid var(--linje); }
.helt-ind { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 7vw, 5rem); align-items: center; }
@media (min-width: 880px) { .helt-ind { grid-template-columns: 1.4fr 1fr; } }
.noegletal { background: var(--hvid); border: 1px solid var(--linje); border-radius: 10px; padding: 1.3rem 1.4rem; }
.nt-titel { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--daempet); margin-bottom: 0.6rem; }
.nt-linje { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; margin: 0; border-top: 1px solid var(--papir-2); }
.tal { font-family: var(--mono); font-size: 0.98rem; white-space: nowrap; }
.nt-sum { border-top: 2px solid var(--blaek); font-weight: 700; }
.nt-sum .tal { font-weight: 400; color: var(--groen); font-size: 1.1rem; }
.nt-note { font-size: 0.9rem; color: var(--daempet); margin: 0.6rem 0 0; }

.sektion { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.sektion h2 { margin-top: 0; }
.spoergsmaal { list-style: none; counter-reset: q; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0; }
@media (min-width: 800px) { .spoergsmaal { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.spoergsmaal li { counter-increment: q; border-top: 1px solid var(--linje); padding: 1.1rem 0 0.4rem; }
.spoergsmaal h3 { margin: 0 0 0.4rem; }
.spoergsmaal h3::before { content: counter(q) ". "; color: var(--groen); }
.sektion-lys { background: var(--hvid); border-block: 1px solid var(--linje); }
.to-spalter { display: grid; gap: 2rem 3rem; }
@media (min-width: 860px) { .to-spalter { grid-template-columns: 1fr 1fr; } }
.prikker { padding-left: 1.2rem; }
.prikker li { margin-bottom: 0.45rem; }
.prikker li::marker { color: var(--groen); }

/* Tekstsider */
.tekstside { padding-bottom: 4rem; }
.side-top { padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; border-bottom: 1px solid var(--linje); margin-bottom: 1.5rem; }
.artikel { max-width: 68ch; }
.kilde { font-size: 0.95rem; color: var(--daempet); margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--linje); }
.tjek { list-style: none; padding: 0; }
.tjek li { position: relative; padding-left: 1.8rem; margin-bottom: 0.5rem; }
.tjek li::before { content: ""; position: absolute; left: 0.15rem; top: 0.5rem; width: 0.85rem; height: 0.5rem; border-left: 2.5px solid var(--groen); border-bottom: 2.5px solid var(--groen); transform: rotate(-45deg); }

.sammenlign { display: grid; gap: 1rem; margin: 1.2rem 0; }
@media (min-width: 640px) { .sammenlign { grid-template-columns: 1fr 1fr; } }
.kort { background: var(--hvid); border: 1px solid var(--linje); border-radius: 10px; padding: 1.1rem 1.2rem 0.4rem; }
.kort-navn { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; margin-bottom: 0.3rem; }
.kort-tal { font-family: var(--mono); font-size: 0.95rem; color: var(--groen); }

.regel { border-top: 1px solid var(--linje); padding-top: 0.4rem; }
.regel:first-child { border-top: 0; }
.regel h2 { margin-top: 1.2em; }

.skridt { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.skridt li { counter-increment: s; position: relative; padding-left: 3.2rem; }
.skridt li::before { content: counter(s); position: absolute; left: 0; top: 1.95rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--groen); color: var(--hvid); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; }
.skridt h2 { margin-top: 1.6em; }
.rammeboks { background: var(--mynte-lys); border-radius: 10px; padding: 0.4rem 1.4rem 0.6rem; margin-top: 2.5rem; }
.rammeboks h2 { margin-top: 1rem; font-size: 1.35rem; }

/* Beregner */
.beregner { display: grid; gap: 1.2rem; margin-bottom: 2.5rem; }
@media (min-width: 860px) { .beregner { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.felter { background: var(--hvid); border: 1px solid var(--linje); border-radius: 10px; padding: 1.3rem; display: grid; gap: 1rem; }
.felt-gruppe label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.input-enhed { display: flex; align-items: stretch; border: 1.5px solid #9aa0ad; border-radius: 6px; background: var(--hvid); overflow: hidden; }
.input-enhed:focus-within { border-color: var(--groen); box-shadow: 0 0 0 3px var(--mynte-lys); }
.input-enhed input { flex: 1; min-width: 0; border: 0; padding: 0.7rem 0.8rem; font: 400 1.05rem var(--mono); color: var(--blaek); background: transparent; }
.input-enhed input:focus { outline: none; }
.input-enhed span { display: flex; align-items: center; padding: 0 0.8rem; background: var(--papir-2); color: var(--daempet); font-size: 0.95rem; }
.resultat { background: var(--blaek); color: var(--papir); border-radius: 10px; padding: 1.3rem 1.4rem; }
.res-titel { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mynte); }
.resultat dl { margin: 0; }
.resultat dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.65rem 0; border-top: 1px solid #3a4459; }
.resultat dt { color: #c9cfdb; }
.resultat dd { margin: 0; font-family: var(--mono); font-size: 1.1rem; white-space: nowrap; }
.resultat .res-hoved dd { font-size: 1.6rem; color: var(--mynte); }
.advarsel { margin: 1rem 0 0; padding: 0.8rem 1rem; background: var(--rav-lys); color: #4f2a08; border-radius: 6px; font-size: 0.95rem; }
.fejl { margin: 1rem 0 0; color: #ffc9b8; }

/* Fod */
.bund { background: var(--blaek); color: #b9c0cf; padding-block: 2.5rem; }
.bund-ind { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .bund-ind { grid-template-columns: 1.4fr 1fr; } }
.bund-navn { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--papir); margin: 0 0 0.4rem; }
.bund-tekst { max-width: 52ch; font-size: 0.93rem; }
.bund nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-content: start; }
.bund a { color: var(--papir); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
