/* ══════════════════════════════════════════════════════════════════
   Arenio — "Protokoll"
   Gestaltungsidee: Das Dokument als Ort. Eine Randspalte mit
   Protokoll-Marken links, eine durchlaufende Linie als Rückgrat, und
   die rote Linie als das, was sie ist: ein Strich, der nicht
   überschritten wird. Keine externen Ressourcen (System-Schriften).
   ══════════════════════════════════════════════════════════════════ */

:root {
  /* Grund: kühles Aktenpapier, leicht grünstichiges Grau — gewählt, nicht geerbt */
  --ground:   #E9E8E3;
  --sheet:    #F6F5F1;
  --sheet-2:  #DFDED7;
  --ink:      #16202A;
  --muted:    #525F66;   /* auf 5,1:1 gebracht — 4,5 war zu knapp */
  --rule:     #CBCCC4;
  --rule-soft:#DBDBD3;
  /* Siegellack — der eine laute Ton, sparsam eingesetzt */
  --seal:     #B03A2B;
  --seal-ink: #8E2E22;
  --seal-soft:#F0DED9;
  --on-seal:  #FFFFFF;   /* Schrift auf Siegelrot — hell auf dunklem Rot */
  /* Grünspan — ruhige Gegenstimme für „geschützt / gehalten" */
  --verd:     #3E6B63;
  --verd-soft:#DCE6E3;

  --display: "Iowan Old Style", Charter, "Bitstream Charter", "Palatino Linotype",
             Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --wrap: 68rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --spine: 8.5rem;          /* Breite der Protokoll-Randspalte */
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:   #12171A;
    --sheet:    #1A2024;
    --sheet-2:  #232A2F;
    --ink:      #E4E2DA;
    --muted:    #98A5AB;
    --rule:     #2C353A;
    --rule-soft:#232B30;
    --seal:     #DA7460;
    --seal-ink: #E9917F;
    --seal-soft:#39231E;
    --on-seal:  #14191C;  /* Dark-Mode: dunkle Schrift auf hellerem Rot (≈5,7:1) */
    --verd:     #74A79C;
    --verd-soft:#1E2E2B;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.06rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--seal); color: var(--on-seal); padding: .7rem 1.1rem;
  font-family: var(--mono); font-size: .85rem; border-radius: 0 0 4px 0;
}
.skip:focus { left: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Randspalte + Rückgrat ─────────────────────────────────────── */
.sheet { position: relative; }
.sheet .wrap { position: relative; }

/* Die durchlaufende Linie: links vom Inhalt, nur ab Tablet sichtbar */
@media (min-width: 60rem) {
  .rail { padding-left: var(--spine); position: relative; }
  .rail::before {
    content: ""; position: absolute; left: calc(var(--spine) - 2.2rem); top: 0; bottom: 0;
    width: 1px; background: var(--rule);
  }
  .mark {
    position: absolute; left: 0; top: .25rem; width: calc(var(--spine) - 3.2rem);
    font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
    text-transform: uppercase; color: var(--muted); text-align: right;
    line-height: 1.5;
  }
  .mark::after {
    content: ""; position: absolute; right: -1.06rem; top: .42rem;
    width: 5px; height: 5px; border-radius: 50%; background: var(--seal);
  }
}
@media (max-width: 59.99rem) {
  .mark {
    display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
    text-transform: uppercase; color: var(--seal); margin-bottom: .5rem;
  }
}

/* ── Kopf ──────────────────────────────────────────────────────── */
header.site { border-bottom: 1px solid var(--rule); background: var(--sheet); }
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: .95rem; padding-bottom: .95rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-family: var(--display); font-size: 1.35rem; font-weight: 700;
  letter-spacing: -0.015em; color: var(--ink); text-decoration: none;
}
.brand .seal {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--seal); display: inline-block; transform: translateY(-.15rem);
}
nav.site { display: flex; gap: 1.5rem; flex-wrap: wrap; }
nav.site a {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .04em;
  color: var(--muted); text-decoration: none; padding: .2rem 0;
  border-bottom: 1px solid transparent;
}
nav.site a:hover, nav.site a:focus-visible {
  color: var(--ink); border-bottom-color: var(--seal);
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
@media (max-width: 62rem) { .hero-grid { grid-template-columns: 1fr; } }

.kicker {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--seal); margin: 0 0 1.1rem;
  display: flex; align-items: center; gap: .6rem;
}
.kicker::before {
  content: ""; width: 1.8rem; height: 1px; background: var(--seal);
}

h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.9rem, 8.5vw, 5.2rem); line-height: .95;
  letter-spacing: -0.035em; margin: 0; text-wrap: balance;
}
h1 .thin { font-weight: 400; font-style: italic; letter-spacing: -0.02em; }

.claim {
  font-family: var(--display); font-size: clamp(1.25rem, 2.9vw, 1.75rem);
  line-height: 1.25; margin: 1.3rem 0 0; max-width: 22ch; text-wrap: balance;
}
.claim em { font-style: normal; color: var(--seal); }
.lede { margin: 1.4rem 0 0; max-width: 46ch; color: var(--muted); }

.hero-cta { margin-top: 2rem; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.btn {
  display: inline-block; background: var(--seal); color: var(--on-seal);
  font-family: var(--mono); font-size: .82rem; letter-spacing: .04em;
  padding: .75rem 1.3rem; border-radius: 2px; text-decoration: none;
  border: 1px solid var(--seal);
}
.btn:hover, .btn:focus-visible { background: var(--seal-ink); border-color: var(--seal-ink); }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--rule);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  background: transparent; border-color: var(--seal); color: var(--seal);
}

/* ── Mandats-Karte: zeigt das Produkt, statt es zu behaupten ────── */
.mandate {
  background: var(--sheet); border: 1px solid var(--rule);
  border-radius: 3px; padding: 1.4rem 1.5rem 1.2rem;
  box-shadow: 0 1px 0 var(--rule-soft), 0 18px 40px -32px rgba(0,0,0,.5);
  position: relative;
}
.mandate::after {
  content: ""; position: absolute; top: -.55rem; right: 1.4rem;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--seal), var(--seal-ink));
  box-shadow: 0 2px 6px -2px rgba(0,0,0,.45);
}
.mandate-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--rule); padding-bottom: .7rem; margin-bottom: .2rem;
  padding-right: 2.2rem;
}
.mandate-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: .7rem;
  align-items: center; padding: .62rem 0; border-bottom: 1px dotted var(--rule);
  font-size: .9rem;
}
.mandate-row:last-of-type { border-bottom: 0; }
.mandate-row .val {
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .88rem;
}
.tag {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .09em;
  padding: .16rem .42rem; border-radius: 2px; white-space: nowrap;
  background: var(--sheet-2); color: var(--muted);
}
.tag.must { background: var(--seal-soft); color: var(--seal-ink); }
.tag.held { background: var(--verd-soft); color: var(--verd); }

.redacted {
  display: inline-block; background: var(--ink); color: transparent;
  border-radius: 1px; user-select: none; letter-spacing: .1em;
  padding: 0 .25rem;
}
.mandate-foot {
  margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--rule);
  font-size: .78rem; color: var(--muted); display: flex; gap: .5rem; align-items: baseline;
}
.mandate-foot .dot { color: var(--verd); }

/* ── Abschnitte ────────────────────────────────────────────────── */
section { padding: clamp(2.8rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--rule); }
h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.1;
  letter-spacing: -0.02em; margin: 0 0 .5rem; text-wrap: balance;
}
.sub { color: var(--muted); margin: 0 0 2.2rem; max-width: 56ch; }

/* Ablauf: Protokoll-Streifen statt Karten-Raster */
.proto { display: grid; gap: 0; }
.proto-step {
  display: grid; grid-template-columns: 3.2rem 1fr; gap: 1.2rem;
  padding: 1.15rem 0; border-bottom: 1px solid var(--rule-soft);
  align-items: start;
}
.proto-step:last-child { border-bottom: 0; }
.proto-step .idx {
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
  padding-top: .18rem; font-variant-numeric: tabular-nums;
  border-right: 1px solid var(--rule); padding-right: .9rem; text-align: right;
}
.proto-step h3 { margin: 0 0 .25rem; font-size: 1.06rem; letter-spacing: -0.01em; }
.proto-step p { margin: 0; color: var(--muted); font-size: .95rem; max-width: 62ch; }
.proto-step .who {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .08em;
  text-transform: uppercase; margin-top: .45rem; display: inline-block;
  color: var(--verd);
}
.proto-step .who.human { color: var(--seal); }

/* Der Beweis: was drinbleibt vs. was rausgeht */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule);
         border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
@media (max-width: 46rem) { .split { grid-template-columns: 1fr; } }
.split > div { background: var(--sheet); padding: 1.3rem 1.4rem; }
.split h3 {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; margin: 0 0 1rem; color: var(--muted);
  display: flex; align-items: center; gap: .5rem;
}
.split h3 .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--verd); }
.split .outside h3 .pip { background: var(--seal); }
.split ul { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.split li {
  padding: .5rem 0; border-bottom: 1px dotted var(--rule);
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
}
.split li:last-child { border-bottom: 0; }
.split li .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .86rem; }
.split figcaption {
  margin-top: 1rem; font-size: .85rem; color: var(--muted); max-width: 60ch;
}

/* Prinzipien als Hauptbuch-Zeilen */
.ledger { border-top: 1px solid var(--rule); }
.ledger-item {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem); padding: 1.5rem 0; border-bottom: 1px solid var(--rule-soft);
}
@media (max-width: 52rem) { .ledger-item { grid-template-columns: 1fr; gap: .4rem; } }
.ledger-item h3 {
  margin: 0; font-family: var(--display); font-size: 1.2rem; letter-spacing: -0.01em;
}
.ledger-item p { margin: 0; color: var(--muted); max-width: 60ch; }
.ledger-item p + p { margin-top: .6rem; }

/* Einsatzfelder */
.fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule);
          border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
@media (max-width: 46rem) { .fields { grid-template-columns: 1fr; } }
.field { background: var(--sheet); padding: 1.2rem 1.3rem; }
.field b { display: block; font-size: 1rem; margin-bottom: .3rem; }
.field span { color: var(--muted); font-size: .92rem; }

/* Einwände */
.qa { border-top: 1px solid var(--rule); }
.qa details {
  border-bottom: 1px solid var(--rule-soft); padding: .1rem 0;
}
.qa summary {
  cursor: pointer; padding: 1rem 0; font-weight: 600; font-size: 1rem;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem;
  align-items: baseline;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; font-family: var(--mono); color: var(--seal); font-size: 1.1rem;
  line-height: 1;
}
.qa details[open] summary::after { content: "–"; }
.qa summary:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
.qa .a { padding: 0 0 1.1rem; color: var(--muted); max-width: 64ch; margin: 0; }

/* Stand & Kontakt */
.standbox {
  border: 1px solid var(--rule); border-left: 3px solid var(--seal);
  background: var(--sheet); border-radius: 3px; padding: 1.6rem 1.7rem;
}
.standbox h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
.standbox p { max-width: 62ch; color: var(--muted); }
.standbox p strong { color: var(--ink); font-weight: 600; }
.contact-line { margin-top: 1.3rem; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.mono-link {
  font-family: var(--mono); font-size: .88rem; color: var(--seal);
  text-decoration: none; border-bottom: 1px solid currentColor;
}

/* ── Dokumentseiten ────────────────────────────────────────────── */
.doc { padding-block: clamp(2.5rem, 6vw, 4rem) 1rem; max-width: 44rem; }
.doc h1 { font-size: clamp(2.1rem, 5.5vw, 3rem); line-height: 1.05; }
.doc .stand {
  font-family: var(--mono); font-size: .74rem; color: var(--muted);
  margin-top: .9rem; letter-spacing: .04em;
}
.doc h2 {
  font-size: 1.2rem; margin: 2.6rem 0 .5rem; padding-top: .9rem;
  border-top: 1px solid var(--rule-soft);
}
.doc h3 { font-size: .98rem; margin: 1.5rem 0 .25rem; font-family: var(--sans); }
.doc p, .doc li { font-size: .96rem; }
.doc p { margin: .65rem 0; }
.doc ul { padding-left: 1.15rem; }
.doc li { margin-bottom: .3rem; }
.doc li::marker { color: var(--seal); }
.doc a { color: var(--seal); text-underline-offset: .18em; }
.doc address {
  font-style: normal; background: var(--sheet); border: 1px solid var(--rule);
  border-left: 3px solid var(--seal); border-radius: 2px;
  padding: 1rem 1.2rem; margin: .9rem 0; font-size: .95rem; line-height: 1.7;
}
.doc .note {
  background: var(--sheet-2); border-radius: 2px; padding: 1rem 1.2rem;
  font-size: .92rem; color: var(--muted);
}
.doc .toc {
  font-family: var(--mono); font-size: .8rem; background: var(--sheet);
  border: 1px solid var(--rule); border-radius: 2px; padding: 1rem 1.2rem;
  margin: 1.5rem 0 0;
}
.doc .toc ol { margin: .4rem 0 0; padding-left: 1.4rem; }
.doc .toc li { margin-bottom: .18rem; }
.doc .toc a { text-decoration: none; }
.doc .toc a:hover { text-decoration: underline; }

/* ── Fuß ───────────────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--rule); background: var(--sheet);
  margin-top: clamp(2.5rem, 6vw, 4rem); padding: 2.2rem 0;
  font-size: .86rem; color: var(--muted);
}
footer.site .wrap {
  display: flex; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap;
  align-items: baseline;
}
footer.site nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover, footer.site a:focus-visible { color: var(--seal); }
footer.site .imprint-line { font-family: var(--mono); font-size: .74rem; letter-spacing: .03em; }

a:focus-visible, summary:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--seal); outline-offset: 3px; border-radius: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .btn, nav.site a, .mono-link { transition: color .14s ease, background-color .14s ease, border-color .14s ease; }
}

/* ── Druck ─────────────────────────────────────────────────────── */
@media print {
  :root { --ground:#fff; --sheet:#fff; --ink:#000; --muted:#333; --rule:#999; }
  header.site nav, .hero-cta, .skip { display: none; }
  body { font-size: 11pt; }
  .rail { padding-left: 0; }
  .rail::before, .mark::after { display: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* Nur für Screenreader — die geschwärzten Werte brauchen eine Textentsprechung */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  border: 0;
}

/* Ersatz für entfernte Inline-Styles (CSP-freundlich) */
figure.mandate, figure.plain { margin: 0; }
.hint { color: var(--muted); font-size: .9rem; }
.note-strong { border-left: 3px solid var(--seal); }
.nm-top { margin-top: 0; }
.nm-bot { margin-bottom: 0; }
