:root {
  --bg: #f6f4ef;
  --fg: #1c1b1a;
  --muted: #6b6864;
  --accent: #b3261e;
  --rule: #d9d5cd;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --fg: #ece9e3;
    --muted: #9a958e;
    --accent: #e3574d;
    --rule: #2e2c29;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}
.card {
  max-width: 40rem;
  width: 100%;
}
.mark {
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 20px;
}
h1 em {
  font-style: italic;
  color: var(--accent);
}
p {
  font-size: 1.1rem;
  margin: 0 0 16px;
}
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
p.muted {
  color: var(--muted);
  font-size: 1rem;
}
footer {
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

/* Kølapp */
:root {
  --paper: #fffdf8;
  --paper-edge: #e4dfd4;
  --ink: #1c1b1a;
  --on-accent: #ffffff;
  --slot: #2a2826;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #24221f;
    --paper-edge: #3a3733;
    --ink: #ece9e3;
    --on-accent: #1c1b1a;
    --slot: #050505;
  }
}
.kolapp {
  margin-top: 8px;
}
.kolapp[hidden] { display: none; }
.kolapp h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  margin: 0 0 16px;
}
.automat {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 32rem;
}
.trekk {
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 10px 10px 0 0;
  padding: 18px 22px;
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.trekk:hover { filter: brightness(1.08); }
.trekk:active { filter: brightness(0.95); }
.trekk:focus-visible {
  outline: 3px solid var(--fg);
  outline-offset: 3px;
}
.trekk .teller {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 400;
  opacity: 0.85;
}
.spalte {
  height: 8px;
  background: var(--slot);
  border-radius: 0 0 4px 4px;
}
.utskrift {
  overflow: hidden;
  padding: 0 10px 12px;
}
.lapp {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper-edge);
  border-top: 2px dashed var(--paper-edge);
  padding: 16px 18px 18px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}
.lapp[hidden] { display: none; }
.lapp.skrives { animation: skriv-ut 520ms steps(7, end) both; }
@keyframes skriv-ut {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .lapp.skrives { animation: none; }
}
.lapp p { margin: 0; }
.lapp-topp {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px !important;
}
.lapp-nr {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 2.8rem;
  line-height: 1;
  letter-spacing: 0.05em;
  margin-bottom: 12px !important;
}
.lapp-navn {
  font-size: 1.4rem;
  line-height: 1.25;
  margin-bottom: 8px !important;
  overflow-wrap: anywhere;
}
.lapp-om {
  font-size: 1rem;
  margin-bottom: 12px !important;
}
.lapp-lenke {
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.kontakt {
  margin-top: 32px !important;
  font-size: 0.9rem !important;
}
