/* billedeupload.dk - "lysbordet": lyst papir, grafitblæk, koboltblå som eneste accent, beskæringshjørner som motiv. */
@font-face { font-family: "Bricolage"; src: url("/fonts/bricolage-grotesque-vf.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("/fonts/atkinson-next.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --papir: #f6f4ef;
  --papir-2: #edeae2;
  --papir-3: #e2ded3;
  --blaek: #17191e;
  --blaek-2: #4b4f58;
  --linje: #d6d1c5;
  --kobolt: #2a44c4;
  --kobolt-dyb: #1e3296;
  --kobolt-lys: #e3e7fa;
  --slukket: #5d6068;
  --skrift: "Atkinson Next", system-ui, sans-serif;
  --display: "Bricolage", "Atkinson Next", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, monospace;
  --r: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--papir); color: var(--blaek);
  font: 400 1.0625rem/1.6 var(--skrift);
  font-variant-numeric: lining-nums;
}
::selection { background: var(--kobolt); color: #fff; }
a { color: var(--kobolt); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--kobolt-dyb); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--kobolt); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; }

.ramme { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.spring { position: absolute; left: -999px; top: 0; background: var(--blaek); color: #fff; padding: .6rem 1rem; z-index: 10; }
.spring:focus { left: 1rem; top: 1rem; }

/* Top */
.top { border-bottom: 1px solid var(--linje); }
.top-ind { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.ordmaerke { display: inline-flex; align-items: center; gap: .6rem; color: var(--blaek); text-decoration: none; padding: .35rem 0; }
.ordmaerke:hover { color: var(--blaek); }
.logo-maerke { width: 1.9rem; height: 1.9rem; flex: none; border-radius: 7px; }
.logo-ord { height: 1.15rem; width: auto; flex: none; display: block; }
.logo-maerke-lille { width: 1.5rem; height: 1.5rem; }
.logo-ord-lille { height: .95rem; }
.top-nav { display: flex; gap: 1.25rem; }
.top-nav .top-link:first-child { display: none; }
.top-link { font-size: .95rem; color: var(--blaek-2); text-decoration: none; padding: .4rem 0; }
.top-link:hover { color: var(--kobolt); text-decoration: underline; }

/* Helt med uploadfelt */
.helt { padding: 2rem 0 2.5rem; }
.helt-ind { display: grid; gap: 1.75rem; }
.helt h1 { font-size: clamp(2.1rem, 7.5vw, 3.6rem); font-weight: 750; letter-spacing: -0.035em; max-width: 14ch; }
.indledning { font-size: 1.15rem; color: var(--blaek-2); margin-top: 1rem; max-width: 40ch; }

.felt {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 2.5rem 1.25rem 2rem; border-radius: var(--r);
  background:
    radial-gradient(circle at 1px 1px, rgba(23,25,30,.09) 1px, transparent 1.4px) 0 0 / 18px 18px,
    #fbfaf7;
  border: 2px dashed #bdb7aa;
  color: var(--blaek-2);
}
.hjoerne { position: absolute; width: 22px; height: 22px; border: 0 solid var(--kobolt); }
.h-1 { top: -9px; left: -9px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 4px; }
.h-2 { top: -9px; right: -9px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 4px; }
.h-3 { bottom: -9px; right: -9px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 4px; }
.h-4 { bottom: -9px; left: -9px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 4px; }
.felt-ikon { width: 3rem; height: 3rem; color: #9a9486; margin-bottom: .9rem; }
.felt-titel { font: 700 1.35rem/1.2 var(--display); color: var(--blaek); letter-spacing: -0.015em; margin-bottom: .5rem; }
.felt-tekst { max-width: 34ch; margin-bottom: 1.4rem; }
.felt-formater { font-size: .875rem; margin-top: 1rem; color: var(--slukket); }

.knap {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.4rem;
  border-radius: 999px; border: 0; background: var(--kobolt); color: #fff;
  font: 700 1rem/1 var(--skrift); text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgba(23,25,30,.12), 0 4px 12px -4px rgba(42,68,196,.35);
  transition: background-color .18s cubic-bezier(.16,1,.3,1), transform .18s cubic-bezier(.16,1,.3,1);
}
.knap:hover { background: var(--kobolt-dyb); color: #fff; }
.knap:active { transform: translateY(1px); }
.knap:disabled { background: var(--papir-3); color: var(--slukket); box-shadow: none; cursor: not-allowed; transform: none; }
.knap-lys { background: transparent; color: var(--kobolt); box-shadow: inset 0 0 0 1.5px var(--kobolt); }
.knap-lys:hover { background: var(--kobolt-lys); color: var(--kobolt-dyb); }
.knapper { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.fakta { list-style: none; margin: 2.25rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--linje); display: grid; gap: 1rem; }
.fakta li { display: flex; gap: .8rem; align-items: flex-start; color: var(--blaek-2); font-size: .975rem; line-height: 1.45; }
.fakta svg { width: 1.5rem; height: 1.5rem; color: var(--kobolt); flex: none; margin-top: .1rem; }
.fakta strong { display: block; color: var(--blaek); }

/* Indhold */
.indhold { padding-bottom: 4rem; }
.afsnit { max-width: 44rem; padding: 2.75rem 0 0; scroll-margin-top: 1.25rem; }
.afsnit h2 { font-size: clamp(1.55rem, 4.6vw, 2.1rem); margin-bottom: 1rem; }
.afsnit > p { max-width: 68ch; }

.trin { list-style: none; counter-reset: trin; margin: 1.25rem 0 1.25rem; padding: 0; display: grid; gap: 1rem; }
.trin li { counter-increment: trin; position: relative; padding-left: 3rem; }
.trin li::before {
  content: counter(trin); position: absolute; left: 0; top: -.05rem;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--kobolt-lys); color: var(--kobolt-dyb); font: 700 1rem/1 var(--display);
}

.forloeb { margin: 1.25rem 0 0; display: grid; gap: 0; }
.forloeb > div { padding: 1rem 0; border-top: 1px solid var(--linje); }
.forloeb > div:last-child { border-bottom: 1px solid var(--linje); }
.forloeb dt { font: 700 1.1rem/1.3 var(--display); letter-spacing: -0.01em; margin-bottom: .3rem; }
.forloeb dd { margin: 0; color: var(--blaek-2); }

.tabel-ramme { overflow-x: auto; margin: 1.25rem 0 1.25rem; border: 1px solid var(--linje); border-radius: var(--r); background: #fbfaf7; }
.deling { border-collapse: collapse; width: 100%; font-size: .95rem; }
.deling th, .deling td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--linje); white-space: nowrap; vertical-align: top; }
.deling tbody tr:last-child > * { border-bottom: 0; }
.deling thead th { font-size: .8rem; font-weight: 700; color: var(--blaek-2); background: var(--papir-2); }
.deling tbody th { font-family: var(--display); font-weight: 700; position: sticky; left: 0; background: #fbfaf7; }
code { font: 400 .875rem/1.4 var(--mono); background: var(--papir-2); padding: .15rem .4rem; border-radius: 5px; color: var(--blaek); }
.note { color: var(--blaek-2); font-size: .975rem; }

.gamle {
  margin-top: 2.75rem; padding: 1.75rem 1.25rem; border-radius: var(--r);
  background: var(--kobolt-lys); max-width: 46rem;
  transition: box-shadow .6s cubic-bezier(.16,1,.3,1);
}
.gamle:target { box-shadow: 0 0 0 3px var(--kobolt), 0 10px 30px -12px rgba(30,50,150,.45); }
.gamle h2 { color: var(--kobolt-dyb); }
.gamle p, .gamle li { color: #262a36; }
.punkter { margin: 1rem 0 0; padding-left: 1.2rem; display: grid; gap: .6rem; }
.punkter li::marker { color: var(--kobolt); }

.sporgsmaal { border-top: 1px solid var(--linje); }
.sporgsmaal details { border-bottom: 1px solid var(--linje); }
.sporgsmaal summary {
  cursor: pointer; list-style: none; padding: 1rem 2.25rem 1rem 0; position: relative;
  font: 700 1.05rem/1.35 var(--display); letter-spacing: -0.01em;
}
.sporgsmaal summary::-webkit-details-marker { display: none; }
.sporgsmaal summary::after {
  content: ""; position: absolute; right: .35rem; top: 1.3rem; width: .6rem; height: .6rem;
  border-right: 2px solid var(--kobolt); border-bottom: 2px solid var(--kobolt); transform: rotate(45deg);
  transition: transform .2s cubic-bezier(.16,1,.3,1);
}
.sporgsmaal details[open] summary::after { transform: rotate(-135deg); top: 1.55rem; }
.sporgsmaal summary:hover { color: var(--kobolt-dyb); }
.sporgsmaal details p { color: var(--blaek-2); padding: 0 0 1.1rem; max-width: 64ch; }

/* Tekstsider */
.tekstside { padding: 2.5rem 0 4rem; }
.side-top { max-width: 44rem; margin-bottom: 2rem; }
.side-top h1 { font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -0.03em; }
.artikel { max-width: 44rem; }
.artikel h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
.artikel p { max-width: 68ch; }

/* Bund */
.bund { border-top: 1px solid var(--linje); padding: 2rem 0 2.5rem; background: var(--papir-2); }
.bund-ind { display: grid; gap: 1rem; }
.bund-logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--blaek); text-decoration: none; justify-self: start; }
.bund-logo:hover { color: var(--blaek); }
.bund nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.bund nav a { color: var(--blaek-2); font-size: .95rem; }
.bund nav a:hover { color: var(--kobolt); }

@media (min-width: 640px) {
  .ramme { padding: 0 1.5rem; }
  .top-nav .top-link:first-child { display: inline; }
  .fakta { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .felt { padding: 3rem 2rem 2.5rem; }
  .gamle { padding: 2.25rem 2.25rem; }
}
@media (min-width: 960px) {
  .helt { padding: 3.75rem 0 3rem; }
  .helt-ind { grid-template-columns: 5fr 6fr; gap: 3.5rem; align-items: center; }
  .felt { min-height: 22rem; justify-content: center; }
  .bund-ind { grid-template-columns: auto 1fr; align-items: center; }
  .bund nav { justify-content: flex-end; }
}

/* ===================== Upload-tjenesten (agent C, 23/11) ===================== */
:root {
  --ok: #1f7a4d; --ok-lys: #e3f2ea;
  --fare: #b3261e; --fare-dyb: #8c1d17; --fare-lys: #fbe9e7;
  --ud: cubic-bezier(.16, 1, .3, 1);
}
.sr-kun { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); font-size: .9em; }
::placeholder { color: #6e7079; opacity: 1; }
input, textarea, select, button { font: inherit; color: inherit; }
html { scrollbar-color: #bdb7aa transparent; }

.knap-lille { min-height: 2.5rem; padding: 0 1rem; font-size: .925rem; }
.knap-fare { background: var(--fare); box-shadow: 0 1px 2px rgba(23,25,30,.12), 0 4px 12px -4px rgba(179,38,30,.35); }
.knap-fare:hover { background: var(--fare-dyb); }
.knap:focus-visible { outline-offset: 3px; }

/* Besked om udløbet billede (kun ved ?udloebet=1) */
.besked {
  display: flex; gap: .9rem; align-items: flex-start; margin: 0 0 2rem; padding: 1rem 1.1rem;
  border-radius: var(--r); background: var(--kobolt-lys); color: #262a36; scroll-margin-top: 1rem;
  box-shadow: 0 0 0 1.5px rgba(42,68,196,.25);
}
.besked svg { width: 1.5rem; height: 1.5rem; flex: none; color: var(--kobolt); margin-top: .1rem; }
.besked-titel { font: 700 1.1rem/1.3 var(--display); color: var(--kobolt-dyb); margin-bottom: .25rem; }

/* Uploadfeltet: åbent */
.kun-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .kun-touch { display: inline; } .kun-mus { display: none; } }
.fil-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.felt[data-felt="aaben"] { transition: border-color .2s var(--ud), background-color .2s var(--ud), transform .25s var(--ud); }
.felt[data-felt="aaben"] .felt-ikon { color: var(--kobolt); }
.felt[data-felt="aaben"] .knap { min-width: 11rem; }
.felt.traek { border-color: var(--kobolt); background-color: var(--kobolt-lys); transform: scale(1.012); }
.felt-slip {
  position: absolute; inset: 0; display: grid; place-items: center; margin: 0; border-radius: var(--r);
  font: 700 1.35rem/1 var(--display); color: var(--kobolt-dyb); background: rgba(227,231,250,.94);
  opacity: 0; pointer-events: none; transition: opacity .18s var(--ud);
}
.felt.traek .felt-slip { opacity: 1; }
.felt.traek .hjoerne { transform: scale(1.15); }
.hjoerne { transition: transform .3s var(--ud); }
.felt-advarsel { margin: 1rem 0 0; padding: .6rem .8rem; border-radius: 8px; background: var(--fare-lys); color: var(--fare-dyb); font-size: .95rem; }
.felt-vilkaar { font-size: .875rem; color: var(--slukket); margin: .35rem 0 0; }
.felt-vilkaar a { color: inherit; }
.ts:empty { display: none; }
.ts { margin-top: 1rem; }

.levetid { border: 0; margin: 1.35rem 0 0; padding: 0; min-width: 0; }
.levetid legend { font-size: .875rem; font-weight: 700; color: var(--blaek-2); padding: 0; margin: 0 auto .5rem; }
.levetid-gruppe { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--papir-2); box-shadow: inset 0 0 0 1px var(--linje); }
.levetid-valg { position: relative; cursor: pointer; }
.levetid-valg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.levetid-valg span { display: block; padding: .45rem .85rem; border-radius: 999px; font-size: .925rem; font-weight: 700; color: var(--blaek-2); transition: background-color .18s var(--ud), color .18s var(--ud), box-shadow .18s var(--ud); }
.levetid-valg:hover span { color: var(--blaek); }
.levetid-valg input:checked + span { background: #fff; color: var(--kobolt-dyb); box-shadow: 0 1px 3px rgba(23,25,30,.14), 0 0 0 1px rgba(42,68,196,.2); }
.levetid-valg input:focus-visible + span { outline: 3px solid var(--kobolt); outline-offset: 2px; }
.levetid-knap {
  display: none; align-items: center; gap: .4rem; margin-top: 1rem; min-height: 2.75rem; padding: 0 1rem;
  border-radius: 999px; border: 0; background: var(--papir-2); box-shadow: inset 0 0 0 1px var(--linje); cursor: pointer; font-size: .95rem; color: var(--blaek-2);
}
.levetid-knap strong { color: var(--kobolt-dyb); }
.levetid-knap svg { width: 1rem; height: 1rem; }
@media (max-width: 639px) {
  .levetid-linje { display: none; }
  .levetid-knap { display: inline-flex; }
}

/* Bundark (levetid på mobil) - åbnes kun ved tryk */
.ark {
  border: 0; padding: 0; margin: 0; max-width: 100%; width: 100%; max-height: 90vh;
  position: fixed; left: 0; right: 0; bottom: 0; top: auto; margin-inline: auto;
  background: #fbfaf7; color: var(--blaek); border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 40px -10px rgba(23,25,30,.35);
}
.ark::backdrop { background: rgba(23,25,30,.42); }
.ark[open] { animation: ark-ind .32s var(--ud); }
.ark[open]::backdrop { animation: tone-ind .25s ease-out; }
@keyframes ark-ind { from { transform: translateY(100%); } to { transform: none; } }
@keyframes tone-ind { from { opacity: 0; } to { opacity: 1; } }
.ark-ind { padding: .6rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); display: grid; gap: .9rem; }
.ark-greb { justify-self: center; width: 2.5rem; height: 4px; border-radius: 4px; background: var(--papir-3); }
.ark-titel { font-size: 1.3rem; }
.ark-tekst { color: var(--blaek-2); font-size: .95rem; margin: 0; }
.levetid-ark-valg { margin: 0; display: grid; gap: .5rem; }
.levetid-ark-valg .levetid-valg span { padding: .9rem 1rem; border-radius: 12px; background: var(--papir-2); font-size: 1rem; text-align: left; }
.levetid-ark-valg .levetid-valg input:checked + span { background: var(--kobolt-lys); box-shadow: inset 0 0 0 2px var(--kobolt); }
.ark .knap { width: 100%; }

/* Resultat */
.resultat { margin-top: 2rem; padding: 1.25rem; border-radius: 14px; background: #fbfaf7; border: 1px solid var(--linje); scroll-margin-top: 1rem; }
.resultat-top { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1rem; }
.resultat-top h2 { font-size: 1.35rem; margin-right: auto; }
.resultat-note { font-size: .95rem; color: var(--blaek-2); margin: -.25rem 0 1rem; }
.format { display: flex; flex-wrap: wrap; gap: .35rem; }
.format label { position: relative; cursor: pointer; }
.format input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.format span { display: block; padding: .35rem .7rem; border-radius: 999px; font-size: .875rem; font-weight: 700; color: var(--blaek-2); box-shadow: inset 0 0 0 1px var(--linje); transition: background-color .15s var(--ud), color .15s var(--ud); }
.format input:checked + span { background: var(--blaek); color: #fff; box-shadow: none; }
.format input:focus-visible + span { outline: 3px solid var(--kobolt); outline-offset: 2px; }
.filer { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.fil {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: .9rem; align-items: start; padding: .85rem;
  border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--linje), 0 2px 6px -3px rgba(23,25,30,.12);
  animation: fil-ind .35s var(--ud) both;
}
@keyframes fil-ind { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fil-mini { width: 4.5rem; height: 4.5rem; border-radius: 8px; overflow: hidden; display: grid; place-items: center; color: #9a9486;
  background: radial-gradient(circle at 1px 1px, rgba(23,25,30,.09) 1px, transparent 1.4px) 0 0 / 10px 10px, var(--papir-2); }
.fil-mini img { width: 100%; height: 100%; object-fit: cover; }
.fil-mini svg { width: 2rem; height: 2rem; }
.fil-krop { min-width: 0; display: grid; gap: .45rem; }
.fil-navn { margin: 0; font: 700 1rem/1.3 var(--display); display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; }
.fil-maal { font: 400 .85rem/1 var(--skrift); color: var(--slukket); }
.fil-status { margin: 0; display: flex; align-items: center; gap: .5rem; font-size: .925rem; color: var(--blaek-2); font-variant-numeric: tabular-nums; }
.prik { width: .55rem; height: .55rem; border-radius: 50%; background: var(--papir-3); flex: none; }
.fil[data-tilstand="sender"] .prik, .fil[data-tilstand="koe"] .prik, .fil[data-tilstand="behandles"] .prik { background: var(--kobolt); animation: puls 1.1s ease-in-out infinite; }
.fil[data-tilstand="faerdig"] .prik { background: var(--ok); }
.fil[data-tilstand="faerdig"] .fil-status { color: var(--ok); }
.fil[data-tilstand="fejl"] .prik { background: var(--fare); }
.fil[data-tilstand="fejl"] .fil-status { color: var(--fare-dyb); font-weight: 700; }
.fil[data-tilstand="fejl"] { box-shadow: 0 0 0 1.5px rgba(179,38,30,.45); }
@keyframes puls { 50% { opacity: .35; } }
.fil-bar { height: 4px; border-radius: 4px; background: var(--papir-2); overflow: hidden; }
.fil-bar span { display: block; height: 100%; background: var(--kobolt); transform-origin: left; transform: scaleX(0); transition: transform .25s var(--ud); }
.fil[data-tilstand="koe"] .fil-bar span, .fil[data-tilstand="behandles"] .fil-bar span {
  background: repeating-linear-gradient(-45deg, var(--kobolt) 0 8px, #4a63d8 8px 16px); background-size: 200% 100%; animation: stribe 1s linear infinite;
}
@keyframes stribe { to { background-position: -22.6px 0; } }
.fil[data-tilstand="faerdig"] .fil-bar, .fil[data-tilstand="fejl"] .fil-bar { display: none; }
.fil-igen { justify-self: start; }

.kode-linje { display: flex; gap: .4rem; min-width: 0; }
.kode-linje input {
  flex: 1; min-width: 0; height: 2.6rem; padding: 0 .75rem; border-radius: 8px; border: 1px solid var(--linje);
  background: var(--papir); font: 400 .85rem/1 var(--mono); color: var(--blaek);
}
.kode-linje input:focus-visible { outline: 3px solid var(--kobolt); outline-offset: 1px; border-color: var(--kobolt); }
.kopier {
  flex: none; height: 2.6rem; min-width: 5.6rem; padding: 0 .9rem; border-radius: 8px; border: 0; cursor: pointer;
  background: var(--blaek); color: #fff; font-weight: 700; font-size: .9rem;
  transition: background-color .18s var(--ud), transform .12s var(--ud);
}
.kopier:hover { background: #2c2f37; }
.kopier:active { transform: scale(.96); }
.kopier.kopieret { background: var(--ok); }
.slet-link { padding: .65rem .75rem; border-radius: 10px; background: var(--papir-2); display: grid; gap: .45rem; }
.slet-link-tekst { margin: 0; font-size: .875rem; color: var(--blaek-2); }
.slet-link-tekst strong { color: var(--blaek); }
.slet-link .kode-linje input { background: #fff; }

/* Annoncepladser: reserveret højde, når de slås til (ingen layoutspring). Tomme og skjulte indtil da. */
.annonce { margin: 2.5rem 0 0; min-height: 280px; }
.annonce[hidden] { display: none; }

/* Billedside */
.billede-main { padding: 1.75rem 0 4rem; }
.lysbord {
  position: relative; margin: 0; padding: 1rem; border-radius: 14px;
  background: radial-gradient(circle at 1px 1px, rgba(23,25,30,.08) 1px, transparent 1.4px) 0 0 / 18px 18px, #fbfaf7;
  border: 1px solid var(--linje); display: grid; gap: .75rem; justify-items: center;
}
.lysbord-billede { display: block; max-width: 100%; line-height: 0; }
.lysbord img { display: block; max-width: 100%; height: auto; max-height: 78vh; width: auto; object-fit: contain; border-radius: 4px;
  box-shadow: 0 1px 2px rgba(23,25,30,.12), 0 12px 30px -16px rgba(23,25,30,.45); background: #fff; }
.lysbord-tekst { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; font-size: .9rem; color: var(--blaek-2); }
.billede-info { display: grid; gap: 2rem; margin-top: 2rem; }
.koder-boks h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.koder { display: grid; gap: .9rem; }
.kode label { display: flex; flex-wrap: wrap; gap: .15rem .6rem; align-items: baseline; font-weight: 700; margin-bottom: .35rem; }
.kode label span { font-weight: 400; font-size: .875rem; color: var(--slukket); }
.billede-sider { align-self: start; display: grid; gap: .9rem; padding: 1.25rem; border-radius: 12px; background: var(--papir-2); }
.billede-sider p { margin: 0; font-size: .95rem; color: var(--blaek-2); }
.anmeld-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; justify-self: start; color: var(--fare-dyb); }
.anmeld-link:hover { color: var(--fare); }
.anmeld-link svg { width: 1.15rem; height: 1.15rem; }

/* Slet-side */
.slet { display: grid; gap: 1.5rem; max-width: 46rem; }
.slet-mini { width: 10rem; height: 10rem; border-radius: 12px; overflow: hidden; background: var(--papir-2); border: 1px solid var(--linje); }
.slet-mini img { width: 100%; height: 100%; object-fit: cover; }
.slet-krop h1 { font-size: clamp(2rem, 6vw, 2.8rem); letter-spacing: -0.03em; margin-bottom: .75rem; }
.slet-krop h1:focus { outline: none; }
.slet-tid { color: var(--blaek-2); }
.slet-fejl { margin-top: 1rem; padding: .7rem .9rem; border-radius: 8px; background: var(--fare-lys); color: var(--fare-dyb); font-weight: 700; }
@media (min-width: 640px) { .slet { grid-template-columns: 10rem 1fr; align-items: start; } }

/* Formular (anmeld) */
.anmeld-gitter { display: grid; gap: 2.5rem; }
.vigtig { padding: 1rem 1.1rem; border-radius: var(--r); background: var(--fare-lys); color: #4a1410; margin-bottom: 1.75rem; display: grid; gap: .5rem; }
.vigtig a { color: var(--fare-dyb); }
.formular { display: grid; gap: 1.4rem; }
.felt-gruppe { display: grid; gap: .35rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.felt-gruppe > label, .felt-gruppe > legend { font: 700 1.05rem/1.3 var(--display); padding: 0; }
.valgfrit { font: 400 .9rem/1 var(--skrift); color: var(--slukket); }
.hjaelp { margin: 0; font-size: .9rem; color: var(--blaek-2); }
.formular input[type="text"], .formular input[type="url"], .formular input[type="email"], .formular textarea {
  width: 100%; min-height: 3rem; padding: .7rem .85rem; border-radius: 10px; border: 1.5px solid #c9c3b6; background: #fff;
  font-size: 1rem; transition: border-color .15s var(--ud), box-shadow .15s var(--ud);
}
.formular textarea { resize: vertical; min-height: 8rem; line-height: 1.5; }
.formular input:focus-visible, .formular textarea:focus-visible { outline: none; border-color: var(--kobolt); box-shadow: 0 0 0 3px rgba(42,68,196,.25); }
.formular [aria-invalid="true"] { border-color: var(--fare) !important; }
.taeller { margin: 0; font-size: .85rem; color: var(--slukket); text-align: right; font-variant-numeric: tabular-nums; }
.fejl-tekst { margin: 0; font-size: .9rem; font-weight: 700; color: var(--fare-dyb); }
.kategorier { gap: .5rem; }
.kategorier legend { margin-bottom: .5rem; }
.kategori { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem .85rem; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--linje); cursor: pointer; transition: box-shadow .15s var(--ud), background-color .15s var(--ud); }
.kategori:hover { box-shadow: inset 0 0 0 1.5px #b0aa9c; }
.kategori:has(input:checked) { background: var(--kobolt-lys); box-shadow: inset 0 0 0 2px var(--kobolt); }
.kategori input { margin: .25rem 0 0; width: 1.1rem; height: 1.1rem; accent-color: var(--kobolt); flex: none; }
.kategori span { font-size: .925rem; color: var(--blaek-2); line-height: 1.45; }
.kategori strong { display: block; color: var(--blaek); font-size: 1rem; }
.felt-par { display: grid; gap: 1.4rem; }
.erklaering { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; }
.erklaering input { width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; accent-color: var(--kobolt); flex: none; }
.formular-fejl { margin: 0; padding: .7rem .9rem; border-radius: 8px; background: var(--fare-lys); color: var(--fare-dyb); font-weight: 700; }
.formular .knap { justify-self: start; min-width: 12rem; }
.kvittering { padding: 1.5rem; border-radius: 14px; background: var(--ok-lys); color: #133d28; }
.kvittering svg { width: 2.25rem; height: 2.25rem; color: var(--ok); }
.kvittering h2 { font-size: 1.5rem; margin: .5rem 0 .6rem; }
.kvittering:focus { outline: none; }
.anmeld-bagefter h2 { margin-top: 0; }
@media (min-width: 640px) { .felt-par { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .anmeld-gitter { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 3.5rem; } .anmeld-bagefter { position: sticky; top: 1.5rem; } }

/* Tekstsider */
.artikel ul.punkter { margin-bottom: 1em; }
.indhold-liste { margin: 0 0 1rem; padding: 1rem 1.25rem; border-radius: var(--r); background: var(--papir-2); }
.indhold-liste ol { margin: 0; padding-left: 1.3rem; columns: 2 14rem; column-gap: 2rem; }
.indhold-liste li { margin: .15rem 0; break-inside: avoid; }
.artikel h2[id] { scroll-margin-top: 1rem; }
.artikel section { margin-top: 2rem; }

@media (min-width: 960px) {
  .billede-info { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem; }
  .fil { grid-template-columns: 5.5rem 1fr; }
  .fil-mini { width: 5.5rem; height: 5.5rem; }
  .resultat { padding: 1.5rem; }
}

/* ===================== Administration ===================== */
.admin .top { background: #fbfaf7; }
.admin-navn { font: 700 1.1rem/1 var(--display); }
.admin-bruger { font-size: .85rem; color: var(--slukket); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.faner { display: flex; gap: .25rem; overflow-x: auto; padding-bottom: 0; }
.faner a { padding: .7rem .9rem; color: var(--blaek-2); text-decoration: none; font-weight: 700; font-size: .95rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.faner a:hover { color: var(--blaek); }
.faner a[aria-current="page"] { color: var(--kobolt-dyb); border-bottom-color: var(--kobolt); }
.faner .tal { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--fare); color: #fff; font-size: .78rem; }
.admin-main { padding-top: 1.5rem; padding-bottom: 4rem; }
.admin-h1 { font-size: 1.8rem; margin-bottom: 1.25rem; overflow-wrap: anywhere; }
.admin-h2 { font-size: 1.2rem; margin: 2rem 0 .75rem; }
.admin-besked { padding: .75rem 1rem; border-radius: 10px; background: var(--kobolt-lys); color: #1e2a5e; font-weight: 700; margin-bottom: 1.25rem; }
.admin-besked-udfoert { background: var(--ok-lys); color: #133d28; }
.admin-besked-fejl { background: var(--fare-lys); color: var(--fare-dyb); }
.admin-tal { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .6rem; margin-bottom: 1.25rem; }
.admin-tal > div { padding: .8rem .9rem; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--linje); display: grid; gap: .2rem; }
.admin-tal span { font-size: .8rem; color: var(--slukket); font-weight: 700; }
.admin-tal strong { font: 700 1.3rem/1.15 var(--display); font-variant-numeric: tabular-nums; }
.admin-tal .fare { background: var(--fare-lys); box-shadow: 0 0 0 1.5px var(--fare); }
.admin-liste { margin: 0; display: grid; gap: 0; max-width: 44rem; }
.admin-liste > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--linje); font-size: .95rem; }
.admin-liste dt { color: var(--slukket); font-weight: 700; }
.admin-liste dd { margin: 0; overflow-wrap: anywhere; }
.admin-boks { margin-top: 2rem; padding: 1.25rem; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--linje); max-width: 44rem; }
.admin-boks h2 { font-size: 1.2rem; margin-bottom: .75rem; }
.admin-boks form + form { margin-top: .75rem; }
.admin-form { display: grid; gap: .5rem; }
.admin-form label { font-weight: 700; }
.admin-form-linje { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.admin input[type="text"] { min-height: 2.75rem; padding: 0 .75rem; border-radius: 8px; border: 1.5px solid #c9c3b6; background: #fff; min-width: 0; flex: 1 1 14rem; }
.admin input[type="text"]:focus-visible { outline: 3px solid var(--kobolt); outline-offset: 1px; }
.admin .admin-check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.admin-form .knap { justify-self: start; }
.admin-note { font-size: .875rem; color: var(--slukket); margin: .5rem 0 0; }
.admin-tom { color: var(--blaek-2); padding: 1rem 0; }
.admin-tilbage { margin-bottom: .5rem; }
.admin-kort { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.admin-kort > li { display: grid; grid-template-columns: 4.5rem 1fr; gap: .9rem; padding: .85rem; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--linje); }
.admin-kort > li.ny { box-shadow: 0 0 0 1.5px var(--fare); }
.admin-kort p { margin: 0 0 .3rem; }
.admin-kort-top { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }
.admin-dato { font-size: .85rem; color: var(--slukket); }
.admin-citat { font-size: .9rem; color: var(--blaek-2); overflow-wrap: anywhere; }
.admin-tekst { margin: .25rem 0 .5rem; padding: .6rem .8rem; border-radius: 8px; background: var(--papir-2); font-size: .95rem; white-space: normal; overflow-wrap: anywhere; }
.admin-anm { padding: 1rem 0; border-top: 1px solid var(--linje); }
.admin-anm:first-of-type { border-top: 0; padding-top: 0; }
.admin-mini { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 8px; overflow: hidden; background: var(--papir-2); }
.admin-mini img { width: 100%; height: 100%; object-fit: cover; }
.flise { display: grid; place-items: center; width: 100%; height: 100%; padding: .25rem; text-align: center; font-size: .72rem; line-height: 1.2; font-weight: 700; color: var(--slukket); background: var(--papir-2); }
.flise-fare { color: var(--fare-dyb); background: var(--fare-lys); }
.admin-gitter { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .75rem; }
.admin-gitter a { display: grid; gap: .4rem; text-decoration: none; color: var(--blaek); }
.admin-gitter .admin-mini { width: 100%; height: auto; aspect-ratio: 1; }
.admin-gitter-tekst { font-size: .8rem; color: var(--blaek-2); display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.admin-billede { display: grid; gap: 1.25rem; }
.admin-stor { width: 12rem; height: 12rem; border-radius: 12px; overflow: hidden; background: var(--papir-2); }
.admin-stor img { width: 100%; height: 100%; object-fit: contain; }
.maerkat { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--papir-2); color: var(--blaek-2); }
.maerkat-aktiv { background: var(--ok-lys); color: var(--ok); }
.maerkat-fjernet, .maerkat-fare { background: var(--fare-lys); color: var(--fare-dyb); }
.kat-boern, .kat-trusler { color: var(--fare-dyb); }
.admin-tabel td, .admin-tabel th { white-space: nowrap; }
@media (min-width: 720px) { .admin-billede { grid-template-columns: 12rem 1fr; align-items: start; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .felt.traek { transform: none; }
}

/* Mobil: miniature ved siden af navn og status; links i fuld bredde under */
@media (max-width: 639px) {
  .fil { grid-template-columns: 3.5rem 1fr; gap: .45rem .75rem; padding: .75rem; }
  .fil-mini { width: 3.5rem; height: 3.5rem; grid-row: span 3; }
  .fil-krop { display: contents; }
  .fil-navn, .fil-status, .fil-bar { grid-column: 2; }
  .fil .kode-linje, .fil .slet-link, .fil .fil-igen { grid-column: 1 / -1; }
  .fil .kopier { min-width: 5rem; }
  .resultat { padding: 1rem .85rem; margin-inline: -.25rem; }
}
