/* pskiver.dk - dansk vejafmærkning: skiltblå, hvid kant, undertavle, Archivo smal og bred */
@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --blaa: #174a94;
  --blaa-dyb: #0e2a52;
  --blaa-lys: #dfe8f5;
  --roed: #e2251d;
  --gul: #f6c21c;
  --papir: #f4f3ef;
  --hvid: #fff;
  --blaek: #0f1d33;
  --blaek-2: #3f4b5e;
  --streg: #cfd3da;
  --r: 14px;
  --ramme: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papir);
  color: var(--blaek);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gul); color: var(--blaek); }
img, svg { display: block; max-width: 100%; }
a { color: var(--blaa); text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--blaa-dyb); text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--gul); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-stretch: 72%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.005em;
  word-spacing: 0.08em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0 0 1em; }
.nb { white-space: nowrap; }

.ramme { width: 100%; max-width: var(--ramme); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .ramme { padding: 0 2rem; } }

.spring { position: absolute; left: -9999px; top: 0; background: var(--gul); color: var(--blaek); padding: 0.5rem 1rem; z-index: 10; }
.spring:focus { left: 1rem; top: 1rem; }

/* Top */
.top { background: var(--hvid); border-bottom: 1px solid var(--streg); }
.top-ind { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.ordmaerke { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--blaek); font-stretch: 78%; font-weight: 800; font-size: 1.45rem; letter-spacing: -0.01em; }
.ordmaerke:hover { color: var(--blaek); }
.ordmaerke b { color: var(--blaa); font-weight: 800; }
.maerke { width: 2.25rem; height: 2.25rem; filter: drop-shadow(0 1px 2px rgba(14, 42, 82, 0.35)); }
.menu { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-weight: 600; font-size: 0.95rem; }
.menu a { color: var(--blaek-2); text-decoration: none; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--blaa); border-bottom-color: currentColor; }
@media (max-width: 40rem) {
  .menu { width: 100%; justify-content: space-between; gap: 0.25rem 0.75rem; font-size: 0.86rem; }
}

/* Skiltet (værktøjet) */
.skilt-felt {
  background: var(--blaa);
  background-image: radial-gradient(120% 90% at 85% 0%, #2a63b6 0%, var(--blaa) 55%, #123d7c 100%);
  padding: 1.25rem 0 2rem;
}
@media (min-width: 48rem) { .skilt-felt { padding: 2.5rem 0 3.25rem; } }
.skilt {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  color: var(--hvid);
  border: 4px solid var(--hvid);
  border-radius: calc(var(--r) + 6px);
  padding: 1.25rem 1.1rem 1.1rem;
  box-shadow: 0 18px 40px -18px rgba(5, 18, 40, 0.65);
}
@media (min-width: 48rem) {
  .skilt { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 1.5rem 2.5rem; padding: 2rem 2.25rem 1.75rem; border-width: 5px; }
}
.skilt h1 { font-size: clamp(2.1rem, 7.2vw, 3.6rem); font-stretch: 68%; }
.skilt-intro { margin: 0.75rem 0 1.25rem; max-width: 34ch; color: #e3ebf8; font-size: 1.05rem; }

.felt label { display: block; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: #cfdcf1; margin-bottom: 0.35rem; }
.felt-raekke { display: flex; flex-wrap: wrap; gap: 0.6rem; }
input[type="time"], select {
  font: inherit;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--blaek);
  background: var(--hvid);
  border: 2px solid var(--hvid);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  min-height: 3rem;
}
input[type="time"] { font-size: 1.35rem; min-width: 9rem; }
.knap-lys {
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--hvid);
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 0.55rem 1rem;
  min-height: 3rem;
  cursor: pointer;
  transition: background-color 0.2s ease-out, border-color 0.2s ease-out;
}
.knap-lys:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--hvid); }
.knap-lys:active { transform: translateY(1px); }

.resultat { margin-top: 1.5rem; }
.resultat-label { margin: 0; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: #cfdcf1; }
.resultat-tid { margin: 0; line-height: 1; }
.resultat-tid output {
  display: inline-block;
  font-size: clamp(4.5rem, 22vw, 7rem);
  font-weight: 800;
  font-stretch: 88%;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--hvid);
}
.resultat-note { margin: 0.4rem 0 0; color: #e3ebf8; font-size: 0.95rem; max-width: 40ch; }

.skive { margin: 0; justify-self: center; align-self: center; width: min(78vw, 18rem); }
@media (min-width: 48rem) { .skive { width: min(100%, 21rem); grid-row: 1; grid-column: 2; } }
.skive-svg { width: 100%; height: auto; filter: drop-shadow(0 10px 18px rgba(5, 18, 40, 0.45)); }
#viser { transform-origin: 120px 120px; transform-box: view-box; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
@media (prefers-reduced-motion: reduce) { #viser { transition: none; } }

.undertavle {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1.5rem;
  align-items: center;
  background: var(--hvid);
  color: var(--blaek);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  box-shadow: inset 0 0 0 2px var(--blaek);
}
@media (min-width: 48rem) {
  .undertavle { grid-template-columns: auto auto 1fr; padding: 1rem 1.5rem; }
  .undertavle label { grid-column: 1 / -1; }
  .undertavle-note { grid-column: 3; grid-row: 2; }
}
.undertavle label { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blaek-2); }
.undertavle select { border-color: var(--blaek); font-size: 1.1rem; width: 100%; }
@media (min-width: 48rem) { .undertavle select { width: auto; } }
.undertavle-svar { margin: 0; font-size: 1.15rem; font-weight: 600; }
.undertavle-svar strong { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--blaa); }
.undertavle-note { margin: 0; font-size: 0.9rem; color: var(--blaek-2); line-height: 1.45; }

/* Regler på forsiden */
.regler { padding: 3rem 0 1rem; }
.regler h2, .videre h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 1.5rem; }
.huskeliste { margin: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 48rem) { .huskeliste { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.huskeliste > div { border-top: 3px solid var(--blaek); padding: 1rem 0 1.5rem; }
.huskeliste dt { font-weight: 800; font-stretch: 80%; font-size: 1.35rem; line-height: 1.15; margin-bottom: 0.4rem; }
.huskeliste dd { margin: 0; color: var(--blaek-2); max-width: 46ch; }

.videre { padding: 2rem 0 4rem; }
.videre-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--streg); }
.videre-liste li { border-bottom: 1px solid var(--streg); }
.videre-liste a {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem 3rem 1.1rem 0;
  text-decoration: none;
  color: var(--blaek);
}
.videre-liste a span { font-weight: 800; font-stretch: 80%; font-size: 1.3rem; color: var(--blaa); }
.videre-liste a small { font-size: 0.98rem; color: var(--blaek-2); }
.videre-liste a::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border-top: 3px solid var(--blaa);
  border-right: 3px solid var(--blaa);
  transform: translateY(-50%) rotate(45deg);
  transition: right 0.2s ease-out;
}
.videre-liste a:hover::after { right: 0.4rem; }
.videre-liste a:hover span { text-decoration: underline; text-decoration-thickness: 2px; }

/* Artikelsider */
.side-top { background: var(--blaa); color: var(--hvid); padding: 2.25rem 0 2rem; }
.side-top h1 { font-size: clamp(2.2rem, 7vw, 3.8rem); font-stretch: 68%; max-width: 20ch; }
.side-top p { margin: 0.9rem 0 0; color: #e3ebf8; max-width: 52ch; font-size: 1.1rem; }
.artikel { padding: 2.5rem 0 4rem; }
.artikel .ramme > * { max-width: 68ch; }
.artikel h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); margin: 2.5rem 0 0.75rem; }
.artikel h2:first-child { margin-top: 0; }
.artikel h3 { font-size: 1.3rem; font-stretch: 82%; margin: 1.75rem 0 0.4rem; }
.artikel ul, .artikel ol { padding-left: 1.25rem; margin: 0 0 1.2em; }
.artikel li { margin-bottom: 0.45em; }
.artikel li::marker { color: var(--blaa); font-weight: 700; }

.tavle {
  margin: 1.5rem 0;
  background: var(--hvid);
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px var(--blaek);
  padding: 1rem 1.1rem;
}
.tavle p:last-child { margin-bottom: 0; }
.tavle-titel { font-weight: 800; font-stretch: 80%; font-size: 1.15rem; margin-bottom: 0.35rem; }

.tabel-wrap { overflow-x: auto; margin: 1.25rem 0 1.5rem; border-radius: 12px; border: 1px solid var(--streg); background: var(--hvid); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--streg); white-space: nowrap; }
th { font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--blaek-2); background: var(--blaa-lys); }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--blaa); }

.knap {
  display: inline-block;
  background: var(--blaa);
  color: var(--hvid);
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  transition: background-color 0.2s ease-out;
}
.knap:hover { background: var(--blaa-dyb); color: var(--hvid); }

/* Fod */
.bund { background: var(--blaa-dyb); color: #c9d6ea; padding: 2rem 0 2.5rem; font-size: 0.95rem; }
.bund-ind { display: grid; gap: 0.5rem; }
.bund-navn { margin: 0; font-weight: 800; font-stretch: 78%; font-size: 1.2rem; color: var(--hvid); }
.bund a { color: var(--hvid); }
.bund-note { margin: 0.25rem 0 0; max-width: 52ch; }
