/* Morgendagens Helte – grafit og stålgrå, Citroën-rød og Peugeot-blå som sektionsfarver (--accent sættes pr. sektion). */
:root {
  --ink: #16181B;
  --ink-2: #3E434A;
  --muted: #555B64;
  --ground: #E7E9EC;
  --panel: #FFFFFF;
  --head: #121417;
  --line: #E3E5E8;
  --line-2: #C9CDD3;
  --hover: #F2F3F5;
  --red: #C8262B;
  --red-ink: #A51E22;
  --sel: #FBF1F1;
  --pdf-bg: #F3E3E3;
  --pdf-fg: #9A1C20;
  --ok-bg: #E4F3E8;
  --ok-fg: #1D5E33;
  --wait-bg: #EEF0F2;
  --err-bg: #FBE9E9;
  --err-fg: #8E1A1D;
  --focus: #2F5BD3;
  --accent: #16181B;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: Barlow, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(18, 20, 23, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 1rem; line-height: 1.5; }
img { max-width: 100%; }
a { color: var(--red-ink); }
a:hover { color: #7E1519; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.meta { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.88rem; }
.hint { color: var(--muted); font-size: 0.92rem; margin: 0; }
.inline { display: inline; margin: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 32px 16px 24px; }
.narrow { max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: 28px; }
.stack-s { display: flex; flex-direction: column; gap: 12px; }
.h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1.05; text-transform: uppercase; }
.h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1.1; text-transform: uppercase; letter-spacing: 0.02em; }
@media (min-width: 720px) { .wrap { padding: 40px 24px 24px; } }

/* Top */
.top { background: var(--head); color: #fff; }
.top__inner { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
@media (min-width: 720px) { .top__inner { padding: 14px 24px; } }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; margin-right: auto; }
.brand:hover { color: #fff; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.04em; text-transform: uppercase; }
.brand__sub { font-size: 0.78rem; color: #A9AEB6; letter-spacing: 0.02em; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.05em; text-transform: uppercase; }
.nav a, .nav__button { color: #D3D6DB; text-decoration: none; padding: 10px 0; }
.nav a:hover, .nav__button:hover { color: #fff; }
.nav a[aria-current] { color: #fff; box-shadow: inset 0 -3px 0 var(--red); }
.nav__button { border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.topsearch { display: flex; flex: 1 1 220px; max-width: 280px; }
.topsearch input { flex: 1 1 auto; min-width: 0; height: 40px; border: 0; border-radius: 4px 0 0 4px; padding: 0 12px; font: inherit; font-size: 0.95rem; background: #2A2D32; color: #fff; }
.topsearch input::placeholder { color: #A9AEB6; }
.topsearch button { width: 44px; height: 40px; border: 0; border-radius: 0 4px 4px 0; background: #2A2D32; color: #D3D6DB; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.topsearch button:hover { color: #fff; }

/* Knapper */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 4px; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2A2D32; color: #fff; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: #A91F24; color: #fff; }
.btn--light { background: #fff; color: var(--ink); align-self: flex-start; }
.btn--light:hover { color: var(--ink); background: #E7E9EC; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2); font-family: var(--body); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 0.95rem; }
.btn--ghost:hover { background: var(--hover); color: var(--ink); }
.btn--ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); font-family: var(--body); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 0.95rem; }
.btn--disabled, .btn:disabled { background: #DDE0E4; color: #5F656E; cursor: default; }
.btn--danger { background: #fff; color: var(--err-fg); border: 1px solid #D9A7A9; font-family: var(--body); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 0.95rem; }
.btn--danger:hover { background: var(--err-bg); }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; }
.iconbtn:hover { background: var(--ground); color: var(--ink); }
.iconbtn--danger { color: var(--err-fg); width: 40px; height: 40px; }

/* Forsidens billede */
.hero { background: #0C0D0F; }
.hero__inner { max-width: 1200px; margin: 0 auto; position: relative; min-height: 440px; display: flex; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 11, 13, 0.9) 0%, rgba(10, 11, 13, 0.6) 50%, rgba(10, 11, 13, 0.1) 85%); }
.hero__text { position: relative; max-width: 580px; padding: 40px 16px 96px; display: flex; flex-direction: column; justify-content: center; gap: 16px; color: #fff; }
@media (min-width: 720px) { .hero__text { padding: 48px 24px 48px 40px; } }
.hero__title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 3rem); line-height: 1; text-transform: uppercase; }
.hero__lead { margin: 0; font-size: 1.08rem; color: #D7DADF; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; color: #BFC3C9; }
.hero__thumbs { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; }
.hero__thumb { width: 84px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 3px; background: #000; cursor: pointer; overflow: hidden; }
.hero__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.hero__thumb[aria-pressed="true"] { border-color: #fff; }
.hero__thumb[aria-pressed="true"] img { opacity: 1; }
.hero__caption { position: absolute; right: 16px; top: 16px; font-family: var(--mono); font-size: 0.78rem; color: #fff; background: rgba(10, 11, 13, 0.7); padding: 4px 10px; border-radius: 3px; text-decoration: none; }
.hero__caption:hover { color: #fff; text-decoration: underline; }
.bigsearch { display: flex; max-width: 480px; }
.bigsearch input { flex: 1 1 auto; min-width: 0; height: 48px; border: 0; border-radius: 4px 0 0 4px; padding: 0 16px; font: inherit; color: var(--ink); background: #fff; }
.bigsearch button { height: 48px; border: 0; border-radius: 0 4px 4px 0; padding: 0 22px; background: var(--red); color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.bigsearch--page { max-width: 720px; }
.bigsearch--page input { border: 1px solid var(--line-2); border-right: 0; }

/* Paneler og sektioner */
.panels { display: flex; flex-wrap: wrap; gap: 28px; }
.panels > * { flex: 1 1 440px; min-width: 0; }
.panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel.pad { padding: 20px 24px; overflow: visible; }
.panel__bar { height: 5px; background: var(--accent); }
.panel__head { padding: 22px 24px 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.panel__title { margin: 0 auto 0 0; font-family: var(--display); font-weight: 700; font-size: 2rem; text-transform: uppercase; letter-spacing: 0.02em; }
.panel__title a { color: inherit; text-decoration: none; }
.panel__title a:hover { color: var(--accent); }
.panel__subtitle { margin: 0 0 12px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.03em; }
.panel:not(.pad) > .panel__subtitle { padding: 18px 24px 0; }

.models { padding-bottom: 8px; }
.model { border-top: 1px solid var(--line); display: block; }
.model__head, .model--link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 24px; cursor: pointer; list-style: none; color: var(--ink); text-decoration: none; }
.model__head::-webkit-details-marker { display: none; }
.model__head:hover, .model--link:hover { background: var(--hover); color: var(--ink); }
.model__name { margin-right: auto; font-family: var(--display); font-weight: 700; font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }
.chev { flex: 0 0 auto; transition: transform 0.15s; color: var(--muted); }
.model[open] > .model__head .chev { transform: rotate(90deg); }
.rows { list-style: none; margin: 0 24px 14px; padding: 0; border-top: 1px solid var(--line); }
.rows__item { border-bottom: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 8px 0 16px; color: var(--ink); text-decoration: none; }
.row:hover { background: var(--hover); color: var(--ink); }
.row:hover .chev { transform: translateX(2px); }
.row__name { flex: 1 1 auto; font-weight: 500; }

.about p { color: var(--ink-2); }
.callout { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.callout p { margin: 0; color: #C9CDD3; }
.empty { padding: 40px 24px; text-align: center; color: var(--ink-2); }
.empty__title { font-weight: 600; margin: 0 0 4px; }

/* Mappeside */
.banner { background: #0C0D0F; color: #fff; }
.banner__inner { max-width: 1200px; margin: 0 auto; position: relative; min-height: 240px; display: flex; align-items: flex-end; }
.banner--plain .banner__inner { min-height: 0; }
.banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.banner__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 11, 13, 0.9) 0%, rgba(10, 11, 13, 0.6) 45%, rgba(10, 11, 13, 0.05) 80%); }
.banner__text { position: relative; padding: 28px 16px; display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
@media (min-width: 720px) { .banner__text { padding: 28px 24px 28px 40px; } }
.banner__title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1; text-transform: uppercase; }
.banner .meta { color: #C9CDD3; margin: 0; }
.crumbs { font-size: 0.9rem; color: #C3C7CD; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: #C3C7CD; }
.crumbs a:hover { color: #fff; }
.crumbs [aria-current] { color: #fff; }
.intro { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-start; }
.intro__text { margin: 0; flex: 1 1 520px; min-width: 0; max-width: 760px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.9rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 500; }
.chip:hover { background: var(--hover); color: var(--ink); }

/* Filliste */
.files__tools { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: flex-end; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.filter { flex: 1 1 280px; min-width: 0; position: relative; color: var(--muted); }
.filter svg { position: absolute; left: 12px; top: 13px; }
.filter input { width: 100%; height: 44px; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 12px 0 40px; font: inherit; color: var(--ink); background: #fff; }
.tablewrap { overflow-x: auto; }
.table { width: 100%; min-width: 560px; border-collapse: collapse; }
.table th { text-align: left; font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; border-bottom: 1px solid var(--line); height: 44px; padding: 0 8px; }
.table td { border-bottom: 1px solid #EEF0F2; padding: 0 8px; height: 48px; }
.table tbody tr:hover { background: #F5F6F7; }
.table tr.is-selected { background: var(--sel); }
.table__check { width: 52px; text-align: center; }
.table__size { width: 110px; text-align: right !important; white-space: nowrap; }
.table__dl { width: 60px; text-align: right; }
.table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--red); margin: 0; cursor: pointer; }
.sort { border: 0; background: none; padding: 10px 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.file { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 0; color: var(--ink); text-decoration: none; }
.file:hover { color: var(--ink); }
.file:hover .file__name { text-decoration: underline; }
.checkhit { display: flex; align-items: center; justify-content: center; min-height: 48px; cursor: pointer; }
.file__name { font-family: var(--mono); font-size: 0.88rem; overflow-wrap: anywhere; }
.badge { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 22px; padding: 0 4px; border-radius: 3px; font-family: var(--mono); font-size: 0.68rem; font-weight: 500; }
.badge--pdf { background: var(--pdf-bg); color: var(--pdf-fg); }
.badge--other { background: #E3E8F3; color: #22479E; }
.selbar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 20px; background: #F5F6F7; border-top: 1px solid var(--line); }
.selbar__label { margin-right: auto; font-size: 0.9rem; }
.selbar.is-active { background: var(--ink); }
.selbar.is-active .selbar__label { color: #fff; }

/* Søgning */
.pagehead { display: flex; flex-direction: column; gap: 14px; }
.results { list-style: none; margin: 0; padding: 0 24px 12px; }
.result { padding: 14px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.result__file { font-family: var(--mono); font-weight: 500; overflow-wrap: anywhere; color: var(--ink); }
.result__where { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.result__where:hover { text-decoration: underline; color: var(--ink); }
.hits { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hit { display: flex; gap: 14px; padding: 8px 10px; border-radius: 4px; background: #F5F6F7; color: var(--ink-2); text-decoration: none; font-size: 0.94rem; }
.hit:hover { background: #ECEEF1; color: var(--ink); }
.hit__page { flex: 0 0 64px; }
.hit__text { min-width: 0; overflow-wrap: anywhere; }
mark { background: #FFE08A; color: var(--ink); padding: 0 1px; border-radius: 2px; }

/* Formularer */
.form { display: flex; flex-direction: column; gap: 16px; }
.form--inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; margin-top: 16px; }
.form--inline .field { flex: 1 1 260px; }
.panel.form { padding: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 600; font-size: 0.92rem; }
.field label .hint { font-weight: 400; display: inline; }
.field input:not([type=checkbox]):not([type=color]):not([type=file]), .field textarea { width: 100%; min-height: 44px; border: 1px solid var(--line-2); border-radius: 4px; padding: 10px 12px; font: inherit; color: var(--ink); background: #fff; }
.field input[type=color] { width: 64px; height: 44px; padding: 2px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; }
.field textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.grid2 { display: flex; flex-wrap: wrap; gap: 20px; }
.grid2 > :first-child { flex: 1 1 340px; min-width: 0; }
.grid2 > :last-child { flex: 0 1 280px; min-width: 0; }
.notice { padding: 12px 16px; border-radius: 4px; background: var(--ok-bg); color: var(--ok-fg); font-weight: 500; }
.notice--error { background: var(--err-bg); color: var(--err-fg); }

/* Admin */
.admin { max-width: 1280px; margin: 0 auto; padding: 24px 16px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.admin__tree { flex: 1 1 280px; max-width: 360px; min-width: 0; padding-bottom: 10px; }
.admin__treehead { padding: 16px 16px 0; }
.admin__main { flex: 999 1 560px; min-width: 0; gap: 20px; }
.tree { list-style: none; margin: 0; padding: 0 8px; }
.tree__item { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px 0 calc(10px + var(--depth, 0) * 16px); border-radius: 4px; color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.tree__item:hover { background: var(--hover); color: var(--ink); }
.tree__item.is-current { background: var(--ink); color: #fff; }
.tree__item.is-current .meta { color: #C9CDD3; }
.tree__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 0.75rem; padding: 0 6px; border-radius: 3px; background: var(--wait-bg); color: var(--ink-2); }
.is-current .tag { background: #3E434A; color: #fff; }
.titlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; background: var(--wait-bg); color: var(--ink-2); }
.pill--ok { background: var(--ok-bg); color: var(--ok-fg); }
.list { list-style: none; margin: 0; padding: 0; }
.list__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-height: 48px; padding: 4px 0; border-top: 1px solid #EEF0F2; }
.list__row > a:first-child { margin-right: auto; }
.list__row--file .file__name { flex: 1 1 260px; min-width: 0; color: var(--ink); }
.state { font-size: 0.82rem; padding: 2px 8px; border-radius: 3px; background: var(--ok-bg); color: var(--ok-fg); }
.state--wait { background: var(--wait-bg); color: var(--ink-2); }
.state--error { background: var(--err-bg); color: var(--err-fg); }
.stats { display: flex; flex-wrap: wrap; gap: 12px; }
.stat { flex: 1 1 140px; padding: 14px 16px; border-radius: 4px; background: #F5F6F7; display: flex; flex-direction: column; }
.stat__n { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1; }
.stat__l { font-size: 0.9rem; color: var(--muted); }
.stat--error { background: var(--err-bg); color: var(--err-fg); }
.coverthumb { width: 100%; height: 140px; object-fit: cover; border-radius: 4px; display: block; }
.coverthumb--none { border: 1px dashed #B9BEC5; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 16px; color: var(--muted); font-size: 0.92rem; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; border: 2px dashed #B9BEC5; border-radius: var(--radius); background: #F7F8F9; text-align: center; padding: 16px; cursor: pointer; color: var(--ink-2); margin-bottom: 12px; }
.drop.is-over { border-color: var(--ink); background: #EEF0F2; }
.drop__title { font-weight: 600; color: var(--ink); }
.uploads { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border-radius: 4px; background: #F5F6F7; font-size: 0.92rem; }
.upload__name { flex: 1 1 240px; min-width: 0; font-family: var(--mono); overflow-wrap: anywhere; }
.upload progress { width: 140px; accent-color: var(--ink); }
.upload--error { background: var(--err-bg); color: var(--err-fg); }
.upload--done { background: var(--ok-bg); color: var(--ok-fg); }

.foot { max-width: 1200px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid #CDD1D6; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.86rem; color: var(--muted); }
.foot > :first-child { margin-right: auto; }
@media (min-width: 720px) { .foot { padding: 24px 24px 40px; } }

.drop__alt { margin: -4px 0 12px; }
.slide { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; padding: 14px 0; border-top: 1px solid #EEF0F2; }
.slide__img { width: 160px; height: 90px; object-fit: cover; border-radius: 4px; flex: 0 0 auto; }
.slide__form { flex: 1 1 360px; min-width: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.slide__form .field { flex: 1 1 180px; min-width: 0; }
.slide__actions { display: flex; gap: 8px; }
.field select { width: 100%; min-height: 44px; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 10px; font: inherit; color: var(--ink); background: #fff; }
