/* Front page and 404 page. A dictionary entry for the name: a heavy serif
   for the headings, the system sans for the text, and Danish red only for
   the entry numbers and link underlines. Only system fonts, so visitors'
   browsers don't contact a font service. (/luft keeps using style.css.) */
:root {
  color-scheme: light;
  --bg: #f4f6f6;
  --fg: #172432;
  --muted: #5f676b;
  --rule: #13171c;
  --red: #c9102e;
  --serif: Georgia, "Noto Serif", "Droid Serif", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 1rem/1.55 var(--sans);
  color: var(--fg);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: calc(808px + 2 * 24px);
  margin: 0 auto;
  padding: 26px 24px 112px;
}

h1, p, dl, dd { margin: 0; }

a {
  color: inherit;
  text-decoration-color: var(--red);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}
a:hover { color: var(--red); }
a:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.brand { font-weight: 700; font-size: 0.95rem; }

/* Georgia only comes in bold; a hairline stroke makes the big heading
   closer to a black weight. */
h1 {
  margin-top: clamp(64px, 11vw, 112px);
  font-family: var(--serif);
  font-size: clamp(2.7rem, 9.4vw, 5.2rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.02em;
  -webkit-text-stroke: 0.012em currentColor;
  text-wrap: balance;
}

/* No single word left alone on a line. */
p, dd { text-wrap: pretty; }

.lead { max-width: 30rem; margin-top: 22px; font-size: 1.06rem; color: var(--muted); }

/* ---------- The entries ---------- */

.entries { margin-top: 50px; padding-top: 6px; border-top: 1.5px solid var(--rule); }

.entry {
  display: grid;
  grid-template-columns: 12rem minmax(0, 26.5rem) 1fr;
  align-items: baseline;
  padding: 16px 0 12px;
}
.entry dt { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; line-height: 1.25; }
/* The numbers are set in the sans: Georgia's old-style figures make a small
   "1" look like an "I". */
.entry sup {
  position: relative;
  top: -0.8em;
  margin-left: 3px;
  font-family: var(--sans);
  font-size: 0.5em;
  font-weight: 700;
  font-variant-numeric: lining-nums;
  line-height: 0;
  vertical-align: baseline;
  color: var(--red);
}
.entry .link { text-align: right; }

/* "i stednavne", "engelsk": usage labels, like in a dictionary. */
.usage { font-family: var(--serif); font-size: 1.06em; color: var(--muted); }

/* ---------- Phones ---------- */

@media (max-width: 640px) {
  main { padding: 20px 20px 80px; }
  .entry { grid-template-columns: 1fr; padding: 14px 0 10px; }
  .entry dd { margin-top: 2px; }
  .entry .link { text-align: left; margin-top: 4px; }
}

/* ---------- 404 ---------- */

.notfound h1 { font-size: clamp(2.4rem, 7vw, 3.8rem); }
.notfound .back { margin-top: 22px; }
