:root {
  color-scheme: light dark;
  --paper: #f8f5ef;
  --ink: #1d1b18;
  --soft: #5f594f;
  --rule: #d9d2c5;
  --accent: #6b2c22;
  --flag-bg: #f6e3b4;
  --flag-ink: #553a00;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", P052, "TeX Gyre Pagella", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171614;
    --ink: #ece7dd;
    --soft: #a9a296;
    --rule: #38342e;
    --accent: #e0a48f;
    --flag-bg: #4a3a12;
    --flag-ink: #f6e3b4;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.62 var(--serif);
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  padding: .5rem .75rem; background: var(--ink); color: var(--paper);
  font: 500 .875rem var(--sans);
}
.skip:focus { top: 1rem; }

/* Open flags for review: every one must be gone before go-live */
.flag {
  background: var(--flag-bg);
  color: var(--flag-ink);
  padding: .05em .3em;
  border-radius: 2px;
  font: 500 .82em/1.5 var(--sans);
  font-variant-numeric: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Document layout */
.doc {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}
.rail { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.mark { color: var(--ink); font-size: 1.1875rem; letter-spacing: .01em; text-decoration: none; }
.nav { display: flex; gap: 1.1rem; font: 400 .875rem/1.4 var(--sans); }
.nav a { color: var(--soft); text-decoration: none; padding: .25rem 0; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: 0 1px 0 var(--accent); }

.sheet { min-width: 0; padding-top: 2.5rem; }
h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.5rem, 1.9rem + 3vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -.012em;
}
.sub { margin: .75rem 0 0; color: var(--soft); font: 400 .9375rem/1.5 var(--sans); }

/* Impressum: label and value pairs */
.facts { margin: 2.5rem 0 0; border-top: 1px solid var(--ink); }
.facts > div { padding: 1.1rem 0 1.15rem; border-bottom: 1px solid var(--rule); }
.facts dt {
  margin-bottom: .3rem;
  color: var(--soft);
  font: 500 .75rem/1.4 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.facts dd { margin: 0; }
.facts p { margin: 0; }
.facts p + p { margin-top: .35rem; }
.name { font-size: 1.375rem; line-height: 1.3; }

/* Datenschutz: numbered sections */
.sec { padding-top: 1.75rem; margin-top: 1.75rem; border-top: 1px solid var(--rule); position: relative; }
.sec:first-of-type { border-top-color: var(--ink); margin-top: 2.5rem; }
.sec h2 { margin: 0 0 .6rem; font-weight: 400; font-size: 1.5rem; line-height: 1.25; }
.sec h2 .no { color: var(--accent); margin-right: .5em; }
.sec p, .sec ul { margin: 0 0 .85rem; text-wrap: pretty; }
.sec > :last-child { margin-bottom: 0; }
.sec ul { padding-left: 1.15em; }
.sec li { margin-bottom: .3rem; }
.sec li::marker { color: var(--soft); }
.pin { font-size: 1.1875rem; line-height: 1.45; }
address { font-style: normal; }

.foot { padding-top: 3rem; color: var(--soft); font: 400 .8125rem/1.5 var(--sans); }

/* Home */
.home { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; max-width: 68rem; margin: 0 auto; padding: 1.5rem 1.25rem; }
.home main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 4rem 0; }
.home h1 { font-size: clamp(3.25rem, 1.75rem + 8vw, 7.5rem); line-height: 1; letter-spacing: -.02em; }
.home hr { width: 3.5rem; height: 1px; margin: 2rem 0 1.5rem; border: 0; background: var(--accent); }
.home .line { margin: 0; color: var(--soft); }
.home footer { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.home footer small { color: var(--soft); font: 400 .875rem/1.4 var(--sans); }

@media (min-width: 60rem) {
  body { font-size: 1.1875rem; }
  .doc { grid-template-columns: 13rem minmax(0, 42rem); column-gap: 5rem; justify-content: center; padding: 4.5rem 2.5rem 5rem; }
  .rail { position: sticky; top: 4.5rem; align-self: start; display: block; padding: 0; border: 0; }
  .nav { flex-direction: column; gap: .35rem; margin-top: 1.75rem; }
  .nav a { align-self: flex-start; }
  .sheet { padding-top: 0; }
  .facts > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); column-gap: 1.5rem; }
  .facts dt { margin: .32rem 0 0; }
  .sec h2 .no { position: absolute; left: -2rem; width: 1.5rem; margin: 0; text-align: right; }
  .home { padding: 3rem 2.5rem; }
  .home .nav { flex-direction: row; gap: 1.5rem; margin-top: 0; }
}

@media print {
  :root { --paper: #fff; --ink: #000; --soft: #333; --rule: #bbb; --accent: #000; --flag-bg: #eee; --flag-ink: #000; }
  body { font-size: 11pt; }
  .doc { display: block; padding: 0; max-width: none; }
  .rail { position: static; padding-bottom: .5rem; }
  .nav, .skip { display: none; }
  .sec { break-inside: avoid; }
}
