/* dobbelt-a.dk - sætterkassen: cremet papir, trykfarvens sort og en enkelt rød */
@font-face { font-family: "Young Serif"; src: url("/assets/fonts/young-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/assets/fonts/literata.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }

:root {
  --papir: #f4efe4;
  --papir-2: #ebe4d4;
  --papir-3: #e1d8c3;
  --blaek: #1d1a16;
  --blaek-2: #3b362f;
  --daempet: #6a6153;
  --roed: #b8321d;
  --roed-lys: #e0533a;
  --linje: #cfc4ad;
  --display: "Young Serif", Georgia, serif;
  --tekst: "Literata", Georgia, serif;
  --maal: 66ch;
}

*, *::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;
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
}
::selection { background: var(--roed); color: var(--papir); }
img, svg { max-width: 100%; }
a { color: var(--roed); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--blaek); }
:focus-visible { outline: 2px solid var(--roed); outline-offset: 3px; }

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

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; text-wrap: balance; color: var(--blaek); }
h1 { font-size: clamp(2.5rem, 7.5vw, 4.75rem); margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.1rem); margin: 2.4em 0 0.6em; }
h3 { font-size: 1.2rem; margin: 0 0 0.6rem; }
p { margin: 0 0 1em; }
em { font-style: italic; }
.indledning { font-size: clamp(1.12rem, 2.1vw, 1.3rem); line-height: 1.55; max-width: 44ch; color: var(--blaek-2); }
.overrubrik { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--roed); font-weight: 600; margin-bottom: 1.1rem; }

/* Top */
.top { border-bottom: 1px solid var(--blaek); }
.top-ind { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.75rem; padding-block: 0.9rem; }
.ordmaerke { display: inline-flex; align-items: baseline; gap: 0.6rem; color: var(--blaek); text-decoration: none; font-family: var(--display); font-size: 1.45rem; line-height: 1; }
.ordmaerke-tegn { display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem; background: var(--blaek); color: var(--papir); font-size: 1.15rem; border-radius: 50%; align-self: center; }
.ordmaerke:hover { color: var(--roed); }
.menu { display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; }
.menu a { color: var(--blaek); text-decoration: none; font-size: 0.98rem; padding-block: 0.25rem; background: linear-gradient(var(--roed), var(--roed)) left bottom / 0 1px no-repeat; transition: background-size .2s ease-out; }
.menu a:hover { background-size: 100% 1px; color: var(--blaek); }
.menu a[aria-current="page"] { color: var(--roed); background-size: 100% 1px; }

/* Knapper */
.knapper { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.knap { display: inline-flex; align-items: center; min-height: 2.9rem; padding: 0.65rem 1.3rem; background: var(--blaek); color: var(--papir); border: 1px solid var(--blaek); text-decoration: none; font-weight: 600; }
.knap:hover { background: var(--roed); border-color: var(--roed); color: var(--papir); }
.knap-lys { background: transparent; color: var(--blaek); }
.knap-lys:hover { background: var(--papir-2); color: var(--blaek); border-color: var(--blaek); }

/* Forside */
.helt { border-bottom: 1px solid var(--blaek); }
.helt-ind { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 8vw, 6rem); align-items: center; }
.helt h1 { font-size: clamp(3.2rem, 11vw, 7rem); }
.helt-tegn { display: flex; align-items: baseline; justify-content: center; gap: 0.15em; font-family: var(--display); font-size: clamp(5.5rem, 22vw, 13rem); line-height: 0.9; user-select: none; }
.tegn-lig { color: var(--linje); font-size: 0.55em; }
.tegn-ny { color: var(--roed); }
@media (min-width: 880px) { .helt-ind { grid-template-columns: 1.15fr 1fr; } }

.sektion { padding-block: clamp(2rem, 6vw, 4rem); }
.sektion h2:first-child { margin-top: 0; }
.to-spalter { display: grid; gap: 2.5rem; }
.to-spalter > div { max-width: var(--maal); }
@media (min-width: 880px) { .to-spalter { grid-template-columns: 1fr 1fr; gap: 4.5rem; } }
.punkter { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.punkter li { margin-bottom: 0.8rem; padding-left: 0.3rem; }
.punkter li::marker { font-family: var(--display); color: var(--roed); }
.pil { text-decoration: none; font-weight: 600; }
.pil::after { content: " \2192"; }
.pil:hover { text-decoration: underline; }

.sektion-tavle { background: var(--blaek); color: var(--papir); }
.sektion-tavle h2 { color: var(--papir); }
.taelling { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1.5rem 2rem; margin: 0; }
.taelling div { padding-top: 0.9rem; border-top: 1px solid rgba(244,239,228,.3); }
.taelling dt { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.1; color: var(--roed-lys); }
.taelling dd { margin: 0.35rem 0 0; color: #d9d1c0; font-size: 0.95rem; line-height: 1.4; }

.genveje { display: grid; gap: 0; border-top: 1px solid var(--blaek); }
@media (min-width: 760px) { .genveje { grid-template-columns: repeat(3, 1fr); } }
.genvej { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem 1.25rem 1.75rem 0; color: var(--blaek); text-decoration: none; border-bottom: 1px solid var(--linje); }
@media (min-width: 760px) { .genvej { padding: 1.5rem 1.5rem 1.75rem; border-bottom: 0; border-right: 1px solid var(--linje); } .genvej:first-child { padding-left: 0; } .genvej:last-child { border-right: 0; } }
.genvej:hover { color: var(--blaek); }
.genvej:hover .genvej-titel { color: var(--roed); }
.genvej-titel { font-family: var(--display); font-size: 1.45rem; line-height: 1.15; transition: color .15s ease-out; }
.genvej-titel::after { content: " \2192"; color: var(--roed); }
.genvej-roed .genvej-titel { color: var(--roed); }

/* Tekstsider */
.tekstside { padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem); }
.side-top { padding-bottom: 1.75rem; border-bottom: 1px solid var(--blaek); margin-bottom: 1rem; }
.side-top .indledning { max-width: 54ch; }
.artikel { max-width: var(--maal); }
.artikel-efter { margin-top: 1.5rem; }
.liste { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.liste li { margin-bottom: 0.65rem; padding-left: 0.2rem; }
.liste li::marker { color: var(--roed); }
.navne { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.navne li { font-family: var(--display); font-size: 1.25rem; padding: 0.3rem 0.85rem; background: var(--papir-2); border-radius: 999px; }

/* Alfabet */
.alfabet { list-style: none; padding: 0; margin: 2rem 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(3.4rem, 1fr)); gap: 0; border-top: 1px solid var(--linje); border-left: 1px solid var(--linje); }
.alfabet li { font-family: var(--display); font-size: 1.6rem; text-align: center; padding: 0.55rem 0 0.4rem; border-right: 1px solid var(--linje); border-bottom: 1px solid var(--linje); line-height: 1.1; }
.alfabet li span { display: block; font-family: var(--tekst); font-size: 0.85rem; color: var(--daempet); }
.alfabet .alfabet-dansk { background: var(--blaek); color: var(--papir); }
.alfabet .alfabet-dansk span { color: #d9d1c0; }

/* Værktøj */
.vaerktoej { margin-top: 3rem; padding: clamp(1.25rem, 4vw, 2.25rem); background: var(--papir-2); max-width: 62rem; }
.vaerktoej h2 { margin-top: 0; }
.vaerktoej label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.vaerktoej textarea, .vaerktoej input { width: 100%; font: inherit; font-size: 1rem; padding: 0.7rem 0.8rem; border: 1px solid var(--blaek); background: var(--papir); color: var(--blaek); border-radius: 0; }
.vaerktoej textarea { resize: vertical; line-height: 1.5; }
.sorter { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .sorter { grid-template-columns: 1.1fr 1fr 1fr; } }
.sorter-ud h3 { font-size: 1.05rem; margin-top: 0.15rem; }
.sorter-liste { margin: 0; padding-left: 1.6rem; font-variant-numeric: tabular-nums; }
.sorter-liste li { padding: 0.15rem 0; border-bottom: 1px solid var(--linje); }
.sorter-liste li::marker { color: var(--daempet); font-size: 0.85em; }
.sorter-liste .markeret { color: var(--roed); font-weight: 600; }
.omskriv-ud { display: grid; gap: 0.25rem; margin: 1.25rem 0 0; }
.omskriv-ud div { display: grid; gap: 0.15rem 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--linje); }
@media (min-width: 640px) { .omskriv-ud div { grid-template-columns: 12rem 1fr; } }
.omskriv-ud dt { color: var(--daempet); font-size: 0.95rem; }
.omskriv-ud dd { margin: 0; font-family: var(--display); font-size: 1.2rem; overflow-wrap: anywhere; }
.note { font-size: 0.9rem; color: var(--daempet); margin-top: 1rem; margin-bottom: 0; }

/* Tabel */
.tabel-wrap { overflow-x: auto; margin: 0 0 1.25rem; border-top: 1px solid var(--blaek); border-bottom: 1px solid var(--blaek); }
.tabel { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.tabel th, .tabel td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--linje); white-space: nowrap; }
.tabel thead th { font-weight: 600; color: var(--daempet); font-size: 0.85rem; }
.tabel tbody th { font-family: var(--display); font-size: 1.35rem; font-weight: 400; position: sticky; left: 0; background: var(--papir); }
.tabel tbody tr:last-child th, .tabel tbody tr:last-child td { border-bottom: 0; }
kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; padding: 0.08em 0.4em; border: 1px solid var(--linje); background: var(--papir-2); border-radius: 3px; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.88em; }

/* Bund */
.bund { border-top: 1px solid var(--blaek); padding-block: 1.75rem 2.25rem; }
.bund-ind { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; align-items: baseline; }
.bund-navn { font-family: var(--display); font-size: 1.1rem; margin: 0; }
.bund-navn span { color: var(--roed); margin-right: 0.5rem; }
.bund nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: 0.95rem; }
.bund nav a { color: var(--blaek-2); }

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