/* Bentax brainstorm */
:root {
  --teal: #103B3D;
  --teal-700: #0B2B2D;
  --teal-100: #E7EFEF;
  --teal-50: #F3F7F7;
  --orange: #FF6600;
  --orange-ink: #C4540F;
  --orange-50: #FFF3EA;
  --gul-50: #FFF8E1;
  --gul-ink: #8A6400;
  --ink: #222222;
  --muted: #5E6B6C;
  --line: #D9E2E2;
  --bg: #F6F4F0;
  --white: #FFFFFF;
  --danger: #B3261E;
  --ok: #1E7A45;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow-soft: 0 10px 30px rgba(16,59,61,.08);
  --serif: "Andada Pro", Georgia, serif;
  --sans: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
}
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2 { font-family: var(--serif); color: var(--teal); line-height: 1.2; }
h1 { font-size: 1.75rem; margin: .5rem 0 .25rem; }
h2 { font-size: 1.25rem; margin: 1.75rem 0 .75rem; display: flex; align-items: center; gap: .5rem; }
p { margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.lille-tekst { font-size: .875rem; margin-top: 1.5rem; }

/* ---------- knapper og felter ---------- */
.knap {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--orange); color: #fff; border: 0; border-radius: var(--radius);
  padding: .8rem 1.25rem; font-weight: 700; cursor: pointer; text-decoration: none;
  min-height: 48px;
}
.knap:hover { background: var(--orange-ink); }
.knap:disabled { opacity: .4; cursor: default; }
.knap.lys { background: var(--white); color: var(--teal); border: 1px solid var(--line); }
.knap.lys:hover { background: var(--teal-50); }
.knap.lille { min-height: 36px; padding: .4rem .9rem; font-size: .9rem; }
.knap.fare { background: var(--danger); }
.link { background: none; border: 0; padding: 0; color: var(--teal); text-decoration: underline; cursor: pointer; font-size: .9rem; }
.link.fare { color: var(--danger); }
.link.lys, .lys { color: #fff; }

input[type=text], input[type=password], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); padding: .75rem .9rem;
}
select { padding: .4rem .5rem; font-size: .9rem; }
textarea { resize: vertical; min-height: 6rem; }
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 3px solid rgba(255,102,0,.35); outline-offset: 1px; border-color: var(--orange); }
.stor { font-size: 1.15rem; padding: .9rem 1rem; }
.label { font-weight: 700; color: var(--teal); }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.række { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1rem; }
.række input[type=text] { width: auto; flex: 1 1 160px; }
.fejl { color: var(--danger); font-weight: 500; }
.ok { color: var(--ok); font-weight: 500; }

/* ---------- login-bokse ---------- */
body.center { display: flex; align-items: center; justify-content: center; padding: 16px; }
.boks {
  width: 100%; max-width: 420px; background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); padding: 2rem 1.5rem; text-align: center;
}
.boks.midt { margin: 3rem auto; }
.logo { width: 160px; height: auto; margin-bottom: .5rem; }
.stort-ikon { font-size: 3.5rem; }

/* ---------- topbar ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: .6rem 16px;
}
.logo-lille { width: 96px; height: auto; display: block; }
.faser { display: flex; gap: .25rem; flex: 1; overflow-x: auto; font-size: .8rem; }
.faser span { padding: .2rem .55rem; border-radius: 99px; color: var(--muted); white-space: nowrap; }
.faser span.aktiv { background: var(--teal); color: #fff; font-weight: 700; }
.bruger { display: flex; align-items: center; gap: .5rem; font-weight: 500; font-size: .9rem; margin-left: auto; }
.admin .top strong { flex: 1; color: var(--teal); }
@media (max-width: 560px) {
  .faser { order: 3; flex-basis: 100%; }
}

.fasebesked {
  background: var(--orange-50); color: var(--orange-ink); padding: .75rem 16px;
  display: flex; gap: 1rem; align-items: center; justify-content: center; font-weight: 500;
}

.indhold { max-width: 720px; margin: 0 auto; padding: 1rem 16px 4rem; }
.indhold.bred { max-width: 1100px; }

.kort {
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
  padding: 1.25rem; margin-top: 1rem;
}
.kort h2:first-child { margin-top: 0; }
.tal {
  font-family: var(--sans); font-size: .8rem; font-weight: 700; background: var(--teal-100);
  color: var(--teal); padding: .1rem .55rem; border-radius: 99px;
}

/* ---------- kategorivalg ---------- */
.katvalg { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.katvalg legend { margin-bottom: .5rem; padding: 0; }
.katknap input { position: absolute; opacity: 0; pointer-events: none; }
.katknap > span {
  display: flex; flex-direction: column; align-items: center; gap: .15rem; text-align: center;
  border: 2px solid var(--line); border-radius: var(--radius); padding: .7rem .4rem;
  cursor: pointer; font-weight: 500; font-size: .9rem; min-height: 72px; justify-content: center;
}
.katknap .ikon { font-size: 1.5rem; }
.katknap input:focus-visible + span { outline: 3px solid rgba(255,102,0,.35); }
.kat-vild input:checked + span { border-color: var(--orange); background: var(--orange-50); color: var(--orange-ink); }
.kat-mindre input:checked + span { border-color: #E0A800; background: var(--gul-50); color: var(--gul-ink); }
.kat-klassisk input:checked + span { border-color: var(--teal); background: var(--teal-50); color: var(--teal); }
@media (max-width: 420px) {
  .katvalg { grid-template-columns: 1fr; }
  .katknap > span { flex-direction: row; min-height: 48px; gap: .5rem; }
  .katknap .ikon { font-size: 1.2rem; }
}

.tag {
  display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem;
  border-radius: 99px; white-space: nowrap;
}
.tag-vild { background: var(--orange-50); color: var(--orange-ink); }
.tag-mindre { background: var(--gul-50); color: var(--gul-ink); }
.tag-klassisk { background: var(--teal-100); color: var(--teal); }

/* ---------- idélister ---------- */
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.ide {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem 1rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.ide p { margin: .25rem 0 0; white-space: normal; overflow-wrap: anywhere; }
.ide > p:first-child { margin: 0; }

/* ---------- afstemning ---------- */
.stemmebar {
  position: sticky; top: 58px; z-index: 5; margin: 0 -16px 1rem; padding: .75rem 16px;
  background: var(--teal); color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
}
@media (max-width: 560px) { .stemmebar { top: 92px; } }
.stemmebar strong { font-size: 1.4rem; }
.prikker { display: flex; gap: 4px; flex: 1; }
.prikker i { width: 14px; height: 14px; border-radius: 50%; background: var(--orange); transition: background .15s; }
.prikker i.brugt { background: rgba(255,255,255,.2); }
.status { font-size: .85rem; opacity: .9; margin-left: auto; }
.status.fejl { color: #FFB4A9; }
.status.ok { color: #9BE3B6; }
.stem { align-items: center; }
.stem.har { border-color: var(--orange); background: var(--orange-50); }
.stepper { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
.stepper button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white);
  font-size: 1.4rem; font-weight: 700; color: var(--teal); cursor: pointer; line-height: 1;
}
.stepper .plus { background: var(--orange); border-color: var(--orange); color: #fff; }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper output { min-width: 2ch; text-align: center; font-weight: 700; font-size: 1.25rem; color: var(--teal); }

/* ---------- resultat ---------- */
.resultat { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.resultat li {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem 1rem; display: flex; gap: 1rem; align-items: flex-start; position: relative;
}
.resultat .plads {
  flex-shrink: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--teal-100);
  color: var(--teal); font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.resultat li.top .plads { background: var(--orange); color: #fff; }
.rtekst { flex: 1; min-width: 0; }
.rtekst p { margin: 0 0 .35rem; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .85rem; color: var(--muted); }
.bar { height: 8px; background: var(--teal-50); border-radius: 99px; margin-top: .5rem; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--orange); border-radius: 99px; }
.stjerne { color: var(--orange); }

/* ---------- admin ---------- */
.faseknapper { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
@media (max-width: 640px) { .faseknapper { grid-template-columns: repeat(2, 1fr); } }
.faseknap {
  display: flex; align-items: center; gap: .5rem; padding: .8rem; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--white); cursor: pointer; font-weight: 700; color: var(--teal);
}
.faseknap .nr {
  width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--teal-100); display: flex;
  align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0;
}
.faseknap.aktiv { background: var(--teal); border-color: var(--teal); color: #fff; }
.faseknap.aktiv .nr { background: var(--orange); color: #fff; }
.tal-raekke { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; }
.tal-raekke div { background: var(--teal-50); border-radius: var(--radius); padding: .75rem; text-align: center; }
.tal-raekke strong { display: block; font-size: 1.75rem; color: var(--teal); font-family: var(--serif); }
.tal-raekke span { font-size: .85rem; color: var(--muted); }
.tabel-wrap { overflow-x: auto; }
.tabel { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabel th { text-align: left; color: var(--muted); font-weight: 500; border-bottom: 2px solid var(--line); padding: .5rem; }
.tabel td { border-bottom: 1px solid var(--line); padding: .5rem; vertical-align: top; overflow-wrap: anywhere; }
.tabel td:first-child { min-width: 220px; }
.tabel select { min-width: 150px; }
.num { text-align: right; white-space: nowrap; }
.arkivliste { list-style: none; padding: 0; margin: 0 0 1rem; }
.arkivliste li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fare-zone { border: 1px solid #F3C9C5; }

/* ---------- storskærm ---------- */
body.skaerm { background: var(--teal); color: #fff; }
.praes, .resskaerm { max-width: 1100px; margin: 0 auto; padding: 1rem 16px 3rem; }
.praes { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.praes-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .95rem; opacity: .95; }
.praes-top .link { color: #fff; }
.praes-kort {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1rem;
  background: var(--white); color: var(--ink); border-radius: var(--radius-lg); padding: clamp(1.5rem, 5vw, 4rem);
  margin: 1.5rem 0; min-height: 50vh;
}
.praes-kort .tag { font-size: clamp(.9rem, 1.6vw, 1.2rem); padding: .3rem .9rem; }
.praes-kort p { font-family: var(--serif); font-size: clamp(1.6rem, 4.2vw, 3.4rem); line-height: 1.2; color: var(--teal); margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.praes-af { color: var(--muted); font-size: clamp(1rem, 2vw, 1.4rem); }
.praes-nav { display: flex; justify-content: space-between; gap: 1rem; }
.praes-nav .knap { min-width: 140px; font-size: 1.1rem; }
.skaerm h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); margin-top: 1.5rem; }
.resultat.stor li { padding: 1rem 1.25rem; transition: opacity .4s, transform .4s; }
.resultat.stor .rtekst p { font-family: var(--serif); font-size: clamp(1.1rem, 2.2vw, 1.6rem); color: var(--teal); }
.resultat.stor .plads { width: 3rem; height: 3rem; font-size: 1.3rem; }
.resultat.stor li .slor { display: none; }
.resultat.stor li.skjult .rtekst { visibility: hidden; }
.resultat.stor li.skjult .slor {
  display: flex; position: absolute; inset: 0 0 0 5rem; align-items: center;
  font-family: var(--serif); font-size: 2rem; color: var(--line);
}
.resultat.stor li.afslort { animation: frem .5s ease-out; }
@keyframes frem { from { transform: scale(.96); opacity: .3; } to { transform: none; opacity: 1; } }
.resten { margin-top: 2rem; }
.resten summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; margin-bottom: .5rem; }
.resten .resultat li { color: var(--ink); }
