/* smartlån.dk - "kontoudtoget": dyb blæknavy, køligt papir, signalgrøn til det, der er godt at vide */
@font-face { font-family: "Schibsted Grotesk"; src: url("/assets/fonts/schibsted-grotesk.woff2") format("woff2"); font-weight: 400 900; font-style: normal; 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 {
  --navy: #13253a;
  --navy-2: #1d3550;
  --papir: #f2f4f1;
  --hvid: #fbfcfa;
  --tekst: #17222e;
  --graa: #556271;
  --streg: #d5dbd6;
  --groen: #1f7a5a;
  --mint: #5fd3a3;
  --rav: #b4651b;
  --rav-lys: #f6e6d4;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papir); color: var(--tekst); font: 400 1.0625rem/1.62 "Schibsted Grotesk", system-ui, sans-serif; }
svg { max-width: 100%; }
a { color: var(--navy); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--groen); }
h1, h2, h3 { font-weight: 800; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.95rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; margin-top: 1.4em; letter-spacing: -.01em; }
p, ul, ol { margin: 0 0 1em; }
.tal, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ramme { width: min(1100px, 100% - 32px); margin-inline: auto; }
.spring { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: .5em 1em; z-index: 9; }
.spring:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--groen); outline-offset: 3px; }

.top { background: var(--navy); color: #fff; }
.top-ind { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 16px 0; flex-wrap: wrap; }
.ordmaerke { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.maerke { width: 26px; height: 26px; color: #fff; }
.menu { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: .97rem; }
.menu a { color: #cfd9e3; text-decoration: none; padding: 4px 0; }
.menu a:hover, .menu a[aria-current="page"] { color: #fff; box-shadow: 0 2px 0 var(--mint); }

.helt { background: var(--navy); color: #e6edf3; padding: clamp(36px, 6vw, 80px) 0 clamp(44px, 7vw, 90px); }
.helt h1 { color: #fff; }
.helt-ind { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.indledning { font-size: clamp(1.08rem, 2vw, 1.22rem); color: var(--graa); max-width: 58ch; }
.helt .indledning { color: #c3cfdb; }
.etiket { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--groen); margin-bottom: 12px; }
.helt .etiket { color: var(--mint); }
.soejler { width: 100%; height: auto; display: block; }
.soejler text { font-family: var(--mono); }
.knapper { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.knap { display: inline-block; padding: .75em 1.25em; background: var(--mint); color: var(--navy); font-weight: 800; text-decoration: none; border-radius: 6px; }
.knap:hover { background: #fff; color: var(--navy); }
.knap-lys { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px #6d8196; }
.knap-lys:hover { background: var(--navy-2); color: #fff; }
.tekstside .knap { background: var(--navy); color: #fff; }
.tekstside .knap-lys { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }

.sektion { padding: clamp(36px, 6vw, 72px) 0; }
.sektion + .sektion { border-top: 1px solid var(--streg); }
.sektion > .ramme > h2:first-child { margin-top: 0; }
.regel-raekke { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--hvid); border-radius: 8px; box-shadow: 0 0 0 1px var(--streg); }
.regel { padding: 24px; }
.regel + .regel { box-shadow: -1px 0 0 var(--streg); }
.regel-tal { display: block; font-family: var(--mono); font-size: clamp(2rem, 4vw, 2.6rem); color: var(--navy); line-height: 1; margin-bottom: 10px; }
.regel p { margin: 0; color: var(--graa); }
.genveje { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.genvej { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--hvid); border-radius: 8px; box-shadow: 0 0 0 1px var(--streg); text-decoration: none; color: var(--graa); }
.genvej-titel { font-weight: 800; font-size: 1.2rem; color: var(--navy); letter-spacing: -.01em; }
.genvej:hover { box-shadow: 0 0 0 2px var(--navy); }

.tekstside { padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 7vw, 88px); }
.side-top { max-width: 780px; margin-bottom: clamp(24px, 4vw, 40px); }
.artikel { max-width: 70ch; }
.artikel li { margin-bottom: .45em; }
.boks { background: var(--hvid); padding: 20px 22px; border-radius: 8px; box-shadow: 0 0 0 1px var(--streg); margin: 1.6em 0; }
.boks > :last-child { margin-bottom: 0; }
.boks-rav { background: var(--rav-lys); box-shadow: none; }
.formel { font-family: var(--mono); background: var(--navy); color: #e6edf3; padding: 18px 20px; border-radius: 8px; overflow-x: auto; font-size: .95rem; }
.lille { font-size: .92rem; color: var(--graa); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--streg); white-space: nowrap; }
th { font-weight: 700; color: var(--navy); }
td.tal, th.tal { text-align: right; }
.tabel-wrap { overflow-x: auto; background: var(--hvid); border-radius: 8px; box-shadow: 0 0 0 1px var(--streg); }

/* Beregner */
.beregner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.felter { background: var(--hvid); border-radius: 8px; box-shadow: 0 0 0 1px var(--streg); padding: 22px; display: grid; gap: 16px; }
.felt label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.felt .hjaelp { display: block; font-weight: 400; font-size: .88rem; color: var(--graa); }
.felt-ind { display: flex; align-items: center; gap: 8px; }
.felt input { width: 100%; font: inherit; font-family: var(--mono); font-size: 1.05rem; padding: 10px 12px; border: 1.5px solid var(--streg); border-radius: 6px; background: #fff; color: var(--tekst); }
.felt input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(31, 122, 90, .22); }
.enhed { font-family: var(--mono); color: var(--graa); min-width: 3.5em; }
.resultat { background: var(--navy); color: #e6edf3; border-radius: 8px; padding: 24px; }
.resultat h2 { color: #fff; margin-top: 0; font-size: 1.2rem; }
.hoved-tal { font-family: var(--mono); font-size: clamp(2rem, 5vw, 2.8rem); color: #fff; line-height: 1.1; margin: 0 0 4px; }
.hoved-tal-label { color: #a9b8c6; margin: 0 0 18px; }
.linjer { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0 0 18px; }
.linjer dt { color: #c3cfdb; }
.linjer dd { margin: 0; font-family: var(--mono); color: #fff; text-align: right; }
.fordeling { height: 14px; border-radius: 7px; background: #3a4f66; overflow: hidden; display: flex; margin-bottom: 8px; }
.fordeling span { display: block; height: 100%; }
.fordeling .del-laan { background: var(--mint); }
.fordeling .del-omk { background: #f0a660; }
.forklaring { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; color: #c3cfdb; margin-bottom: 14px; }
.prik { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.besked { padding: 12px 14px; border-radius: 6px; background: var(--navy-2); font-size: .95rem; margin: 0; }
.besked[data-type="advarsel"] { background: #5a3a1c; color: #ffe7cf; }

.bund { border-top: 1px solid var(--streg); padding: 32px 0 40px; font-size: .95rem; }
.bund-ind { display: flex; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; }
.bund-navn { font-weight: 800; color: var(--navy); margin: 0 0 4px; font-size: 1.1rem; }
.bund-note { color: var(--graa); max-width: 48ch; margin: 0; }
.bund nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: flex-start; }

@media (max-width: 880px) {
  .helt-ind, .beregner { grid-template-columns: 1fr; }
  .regel-raekke { grid-template-columns: 1fr; }
  .regel + .regel { box-shadow: 0 -1px 0 var(--streg); }
  .genveje { grid-template-columns: 1fr; }
}
