/* lånehjälpen.se - "Läs det finstilta": skogsgrön bläckfärg på krämvitt papper, ockra som accent, Literata (rubriker) och Schibsted Grotesk (text), förstoringsglas över avtal som bildmotiv */
@font-face { font-family: "Literata"; src: url("/assets/fonts/literata.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@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; }

:root {
--bg: #f6f2e9; --bg2: #ece5d5; --card: #fffdf8; --ink: #1b2a25; --muted: #56645e; --line: #d8cfbb;
  --heading: #1e3b31; --link: #1f5a47; --focus: #c98f1f;
  --accent: #d9a23d; --accent-ink: #1b2a25;
  --brand: #f6f2e9; --brand-ink: #1e3b31;
  --hero-bg: #ece5d5; --hero-ink: #1b2a25; --hero-muted: #3c4a44; --hero-heading: #1e3b31;
  --foot-bg: #1e3b31; --foot-ink: #eef0e8;
  --display: "Literata", Georgia, serif; --text: "Schibsted Grotesk", system-ui, sans-serif; --num: "Literata", Georgia, serif;
  --h-weight: 600; --h-spacing: -0.015em; --r: 10px; --knap-r: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 1.0625rem; line-height: 1.62; text-rendering: optimizeLegibility; overflow-wrap: break-word; }
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.ramme { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.spring { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-ink); padding: 0.5rem 0.9rem; font-weight: 700; z-index: 10; border-radius: var(--r); }
.spring:focus { top: 0.75rem; }
h1, h2, h3 { font-family: var(--display); font-weight: var(--h-weight, 600); line-height: 1.1; letter-spacing: var(--h-spacing, -0.01em); text-wrap: balance; color: var(--heading, inherit); }
h1 { font-size: clamp(2.3rem, 6.4vw, 4.2rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.2rem); margin: 2.4em 0 0.6em; }
h3 { font-size: 1.25rem; margin: 1.6em 0 0.4em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: 0.45em; }
.indledning { font-size: clamp(1.1rem, 2.1vw, 1.28rem); line-height: 1.55; max-width: 42ch; }
.daempet { color: var(--muted); }

.top { background: var(--brand); color: var(--brand-ink); }
.top-ind { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1.5rem; padding-block: 0.9rem; }
.ordmaerke { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--brand-ink); text-decoration: none; font-family: var(--display); font-size: 1.45rem; line-height: 1; font-weight: var(--logo-weight, 600); }
.ordmaerke:hover { color: var(--brand-ink); }
.ordmaerke svg { width: 1.9rem; height: 1.9rem; flex: none; }
.menu { display: flex; flex-wrap: wrap; gap: 0.1rem 1.15rem; }
.menu a { color: var(--brand-ink); opacity: 0.86; text-decoration: none; font-weight: 600; font-size: 0.97rem; padding-block: 0.35rem; border-bottom: 2px solid transparent; }
.menu a:hover { opacity: 1; border-bottom-color: currentColor; }
.menu a[aria-current="page"] { opacity: 1; border-bottom-color: var(--accent); }

.knapper { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.knap { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0.7rem 1.35rem; border: 2px solid var(--accent); border-radius: var(--knap-r, 999px); background: var(--accent); color: var(--accent-ink); font: 700 1rem/1.1 var(--text); text-decoration: none; cursor: pointer; transition: filter .15s ease-out, transform .15s ease-out; }
.knap:hover { filter: brightness(1.07); color: var(--accent-ink); }
.knap:active { transform: translateY(1px); }
.knap-lys { background: transparent; color: inherit; border-color: currentColor; }
.knap-lys:hover { color: inherit; filter: none; background: var(--knap-lys-hover, rgba(127,127,127,.12)); }

.helt { background: var(--hero-bg); color: var(--hero-ink); overflow: hidden; }
.helt-ind { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 7vw, 5.5rem); align-items: center; }
.helt h1 { color: var(--hero-heading, var(--hero-ink)); }
.helt .indledning { color: var(--hero-muted); }
.helt-bild svg { display: block; width: 100%; height: auto; max-height: 26rem; }
@media (min-width: 880px) { .helt-ind { grid-template-columns: 1.1fr 0.9fr; } }
@media (max-width: 879px) { .helt-bild svg { max-height: 14rem; margin-inline: auto; } }

.sektion { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.sektion > .ramme > h2:first-child, .sektion h2.forsta { margin-top: 0; }
.sektion-alt { background: var(--bg2); }
.to-spalter { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 820px) { .to-spalter { grid-template-columns: 1fr 1fr; } }
.to-spalter h2 { margin-top: 0; }

.kort-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); margin-block: 1.5rem; }
.kort { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem 1.35rem 1.1rem; }
.kort h3 { margin-top: 0; }
.kort p:last-child { margin-bottom: 0; }
.kort-nr { font-family: var(--mono, var(--text)); font-size: 0.85rem; color: var(--muted); letter-spacing: 0.06em; display: block; margin-bottom: 0.4rem; }
.genveje { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.genvej { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.35rem; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .15s ease-out, border-color .15s ease-out; }
.genvej:hover { transform: translateY(-2px); border-color: var(--ink); color: var(--ink); }
.genvej-titel { font-family: var(--display); font-size: 1.3rem; font-weight: var(--h-weight, 600); line-height: 1.15; color: var(--heading, var(--ink)); }
.genvej-titel::after { content: " \2192"; }

.punkter { counter-reset: p; list-style: none; padding: 0; }
.punkter > li { counter-increment: p; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.punkter > li::before { content: counter(p); position: absolute; left: 0; top: 0.05rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 0.95rem/1.8rem var(--text); text-align: center; }

.tekstside { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.side-top { max-width: 46rem; margin-bottom: 2rem; }
.side-top .indledning { max-width: none; }
.etikett { display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem; }
.artikel { max-width: 44rem; }
.artikel h2:first-child { margin-top: 0; }
.faktaruta { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.3rem; margin: 1.6rem 0; }
.faktaruta > :last-child { margin-bottom: 0; }
.faktaruta h3 { margin-top: 0; }
.tabel-wrap { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; background: var(--card); }
th, td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; background: var(--bg2); }
tr:last-child td { border-bottom: 0; }
dl.ordlista dt { font-weight: 700; font-family: var(--display); font-size: 1.15rem; margin-top: 1.2rem; }
dl.ordlista dd { margin: 0.25rem 0 0; }

.verktyg { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.1rem, 3vw, 1.8rem); margin: 1.5rem 0 2rem; }
.verktyg h2 { margin-top: 0; }
.falt-grid { display: grid; gap: 0.9rem 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); }
.falt label, .falt .falt-navn { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.3rem; }
.falt input, .falt select { width: 100%; min-height: 2.9rem; padding: 0.55rem 0.75rem; border: 1px solid var(--input-line, var(--muted)); border-radius: calc(var(--r) * 0.6); background: var(--bg); color: var(--ink); font: inherit; }
.falt input:focus { border-color: var(--link); }
.falt small { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
.resultat { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: grid; gap: 0.8rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.resultat div { display: flex; flex-direction: column; }
.resultat span { font-size: 0.9rem; color: var(--muted); }
.resultat strong { font-family: var(--num, var(--display)); font-size: 1.55rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.notis { font-size: 0.9rem; color: var(--muted); margin-top: 1rem; }
.tjeklista { list-style: none; padding: 0; margin: 1rem 0; }
.tjeklista li { margin: 0; border-bottom: 1px solid var(--line); }
.tjeklista label { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.75rem 0.2rem; cursor: pointer; }
.tjeklista input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; flex: none; accent-color: var(--accent); }
.tjeklista input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.fremdrift { height: 0.55rem; background: var(--bg2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.fremdrift i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s ease-out; }

.bund { background: var(--foot-bg); color: var(--foot-ink); padding-block: 2.2rem; margin-top: 0; }
.bund-ind { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; align-items: baseline; }
.bund-navn { font-family: var(--display); font-size: 1.2rem; margin: 0; }
.bund nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.bund a { color: var(--foot-ink); opacity: 0.85; }
.bund a:hover { opacity: 1; }
.bund-not { flex-basis: 100%; font-size: 0.88rem; opacity: 0.75; margin: 0; max-width: 60ch; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Sitets egne træk */
.top { border-bottom: 1px solid var(--line); }
.ordmaerke { font-weight: 700; letter-spacing: -0.02em; }
.helt h1 em { font-style: italic; font-weight: 500; color: #8a5a12; }
.fraga { font-family: var(--display); font-size: 1.2rem; font-weight: 600; color: var(--heading); display: block; margin-bottom: 0.2rem; }
.exempel { font-family: var(--display); font-style: italic; }
.sektion-alt .kort { background: var(--bg); }
