/* Digitale Firma legal + error pages (agb, privacy, privacy-en, imprint, imprint-en, 404).
 *
 * CEO 2026-11-13: "warum hat das andere CI?" — the legal pages followed the
 * reader's system theme on a light olive canvas while digitalefirma.com is a dark glass
 * page. They now wear the site's CI: the same near-black ground, Roboto, the
 * mint "9" mark, the lime pill CTA and the footer from index.html, with a
 * long-form reading layout (max ~72ch, left table of contents on wide screens).
 *
 * Only the wrapper changed. The legal TEXT inside <article class="doc"> is the
 * markup the pages had before, byte for byte apart from added heading ids.
 * Values follow tokens.css; this file is under /assets/ so the Dockerfile's
 * COPY assets/ line already ships it (no new COPY to forget). */

:root {
  --ink: #fbfbfa; --soft: #c6c8c4; --mute: #9a9c99; --dim: #7c7d7c;
  --lime: #d2dc4f; --lime-deep: #c6c85a; --lime-ink: #1a1d0c; --pos: #8fce9d;
  --ground: #050605; --panel: rgba(255, 255, 255, .045); --panel-line: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .10);
  /* Named here so the light version below can change them; the dark values are the ones the rules always had. */
  --sub: #8f918e; --btn-ink: #f2f2f2; --btn-line: rgba(255, 255, 255, .16); --btn-bg: rgba(255, 255, 255, .03);
  --btn-bg-hi: rgba(255, 255, 255, .12); --code-bg: rgba(255, 255, 255, .07); --link-line: rgba(210, 220, 79, .65);
  --accent-ink: var(--lime); --focus: var(--lime); --glow-a: 210, 220, 79; --glow-b: 143, 206, 157;
  --ft-line: rgba(255, 255, 255, .05); --chip-line: rgba(255, 255, 255, .10); --chip-bg: rgba(255, 255, 255, .055);
  --panel-shadow: none;
  --font: "Roboto", "Helvetica Neue", "Segoe UI", system-ui, Arial, sans-serif;
  --mono: "SF Mono", Consolas, Menlo, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.7 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
a { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px;
  background: var(--lime); color: var(--lime-ink); font-weight: 500; text-decoration: none; }
.skip:focus { top: 12px; }

/* the soft glow behind the page head, same palette as the index footer stage */
.lg-glow { position: absolute; inset: 0 0 auto 0; height: 560px; z-index: 0; pointer-events: none;
  background: radial-gradient(48% 70% at 12% 0%, rgba(var(--glow-a), .10), rgba(var(--glow-a), 0) 70%),
              radial-gradient(40% 60% at 88% 0%, rgba(var(--glow-b), .09), rgba(var(--glow-b), 0) 70%); }

/* ── top bar (index.html .topbar, at a fixed scale) ── */
.lg-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1240px; margin: 0 auto; padding: 22px 24px; }
.lg-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); min-width: 0; }
.lg-logo { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, #8fd6a4, #6cbe86 55%, #57ad74); color: #fff; font-weight: 600; font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(0, 0, 0, .25); }
.lg-brand b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.lg-brand small { display: block; font-size: 12px; color: var(--sub); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-act { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.lg-lang { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
  border: 1px solid var(--btn-line); background: var(--btn-bg); color: var(--btn-ink); font-size: 13px; font-weight: 500;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background .2s; }
.lg-lang:hover { background: var(--btn-bg-hi); }
.lg-cta { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--lime); color: var(--lime-ink); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background .2s, transform .2s; }
.lg-cta:hover { background: var(--lime-deep); transform: translateY(-1px); }
.lg-cta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── reading layout ── */
.lg { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 72ch); justify-content: center;
  gap: 72px; max-width: 1240px; margin: 0 auto; padding: 40px 24px 120px; }
.lg-kick { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--panel-line); background: var(--panel); color: var(--soft); font-size: 12.5px; font-weight: 500; letter-spacing: .01em; }
.lg-kick::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 2.5px rgba(143, 206, 157, .18); }

/* table of contents: a sticky rail on wide screens, a fold-out on small ones */
.lg-toc { display: none; }
.lg-toc-m { margin: 0 0 28px; border: 1px solid var(--panel-line); border-radius: 16px; background: var(--panel); box-shadow: var(--panel-shadow); }
.lg-toc-m summary { cursor: pointer; list-style: none; padding: 14px 18px; font-size: 14px; font-weight: 500; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; border-radius: 16px; min-height: 48px; }
.lg-toc-m summary::-webkit-details-marker { display: none; }
.lg-toc-m summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--soft); border-bottom: 1.5px solid var(--soft);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.lg-toc-m[open] summary::after { transform: rotate(-135deg); }
.lg-toc-m ol { padding: 0 18px 14px; }
.lg-toc ol, .lg-toc-m ol { list-style: none; margin: 0; display: grid; gap: 2px; }
.lg-toc a, .lg-toc-m a { display: block; padding: 6px 12px; border-radius: 10px; color: var(--mute); font-size: 13.5px; line-height: 1.4;
  text-decoration: none; border-left: 2px solid transparent; transition: color .2s, background .2s; }
.lg-toc a:hover, .lg-toc-m a:hover { color: var(--ink); background: var(--panel); }
.lg-toc a.on { color: var(--ink); border-left-color: var(--lime); border-radius: 0 10px 10px 0; background: var(--panel); }
.lg-toc-t { margin: 0 0 10px 14px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.lg-toc .lg-toc-sep { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

@media (min-width: 1080px) {
  .lg { grid-template-columns: 236px minmax(0, 72ch); }
  .lg-toc { display: block; }
  .lg-toc nav { position: sticky; top: 28px; max-height: calc(100vh - 56px); overflow: auto; padding-bottom: 12px; scrollbar-width: thin; }
  .lg-toc-m { display: none; }
}

/* ── the document ── */
.doc { min-width: 0; overflow-wrap: anywhere; color: var(--soft); }
.doc h1 { margin: 0 0 10px; color: var(--ink); font-size: clamp(32px, 5vw, 46px); font-weight: 300; line-height: 1.12; letter-spacing: -.025em; }
.doc h2 { margin: 52px 0 12px; color: var(--ink); font-size: 21px; font-weight: 500; line-height: 1.3; letter-spacing: -.012em; scroll-margin-top: 24px; }
.doc h3 { margin: 26px 0 8px; color: var(--ink); font-size: 16px; font-weight: 500; }
.doc p, .doc li { margin: 0 0 14px; color: var(--soft); }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li::marker { color: var(--dim); }
.doc strong, .doc b { color: var(--ink); font-weight: 500; }
.doc a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc a:hover { color: var(--accent-ink); text-decoration-color: var(--accent-ink); }
.doc code { font-family: var(--mono); font-size: .86em; padding: 2px 6px; border-radius: 6px; background: var(--code-bg); color: var(--ink); }
.doc .sub { margin: 0 0 8px; font-size: 14px; color: var(--mute); }
.doc .back, .doc .brand { display: none; }
.doc .meta { margin: 28px 0 8px; padding: 18px 20px; border: 1px solid var(--panel-line); border-radius: 16px; background: var(--panel);
  font-size: 14.5px; line-height: 1.65; color: var(--soft); }
.doc .note { margin: 20px 0; padding: 16px 20px; border-left: 3px solid var(--lime); border-radius: 0 14px 14px 0; background: var(--panel); }
.doc .note p { margin: 0; color: var(--ink); font-size: 15px; }
.doc .en { margin-top: 88px; padding-top: 56px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.doc .en h1 { font-size: clamp(28px, 4vw, 38px); }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14.5px; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; color: var(--soft); }
.doc th { color: var(--ink); font-weight: 500; background: var(--panel); }
.doc em { color: var(--mute); }

/* 404: two glass blocks, same type */
.doc .block { margin: 0 0 18px; padding: 28px; border: 1px solid var(--panel-line); border-radius: 20px; background: var(--panel); box-shadow: var(--panel-shadow); }
.doc .block h1 { font-size: clamp(26px, 5vw, 36px); }
.doc .block h2 { margin: 22px 0 8px; font-size: 17px; }
.doc .code { margin: 0 0 10px; font: 500 12.5px/1 var(--mono); letter-spacing: .14em; color: var(--accent-ink); }
.doc .cta { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--lime);
  color: var(--lime-ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.doc .cta:hover { background: var(--lime-deep); color: var(--lime-ink); }
.doc .foot { font-size: 13.5px; color: var(--mute); margin-top: 28px; }

/* ── footer: index.html .ft, copied at the same values ── */
.ft * { margin: 0; padding: 0; box-sizing: border-box; }
.ft a { text-decoration: none; }
.ft svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* CEO 2026-11-14: Riesen-Wortmarke aus dem Footer entfernt, Footer nur noch so hoch wie sein Inhalt */
.ft{height:auto!important;min-height:0!important;padding-bottom:64px}
.ft-content{margin-bottom:0!important}
/* CEO 2026-11-14: auch der Farbverlauf ist raus — Footer einfarbig */
.ft-stage,.ft-fog{display:none!important}
.ft{--fu:min(calc(100vw / 1440),calc(100vh / 672));position:relative;height:100vh;min-height:calc(560*var(--fu));background:var(--ground);overflow:hidden;isolation:isolate;color:var(--ink);border-top:1px solid var(--ft-line)}
@supports (height:100svh){.ft{--fu:min(calc(100vw / 1440),calc(100svh / 672));height:100svh}}
.ft-stage{position:absolute;inset:0;z-index:0;background:radial-gradient(70% 55% at 22% 100%,rgba(210,220,79,.22),rgba(210,220,79,0) 70%),radial-gradient(60% 50% at 82% 100%,rgba(143,206,157,.18),rgba(143,206,157,0) 70%),linear-gradient(to bottom,#050605 0%,#070806 38%,#10130b 68%,#1b200f 100%)}
.ft-stage::after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,#050605 0%,rgb(5 6 5 / .96) 26%,rgb(5 6 5 / .72) 44%,rgb(5 6 5 / 0) 70%)}
.ft-word{position:absolute;left:50%;bottom:calc(-2*var(--fu));transform:translateX(-50%);z-index:1;margin:0;font-size:calc(480*var(--fu));font-weight:600;line-height:.74;letter-spacing:-.045em;white-space:nowrap;pointer-events:none;user-select:none;color:rgb(232 236 214 / .16);background:linear-gradient(to bottom,rgb(255 255 255 / .24),rgb(210 220 79 / .07) 52%,rgb(255 255 255 / .13));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 calc(-1*var(--fu)) 0 rgb(255 255 255 / .22)) drop-shadow(0 0 calc(18*var(--fu)) rgb(210 220 79 / .16))}
.ft-fog{position:absolute;inset:auto 0 0;z-index:2;height:17%;pointer-events:none;background:linear-gradient(to top,#1b200f 0%,rgb(27 32 15 / .6) 30%,rgb(27 32 15 / 0) 100%)}
.ft-content{position:relative;z-index:3;display:grid;grid-template-columns:calc(440*var(--fu)) calc(240*var(--fu)) calc(240*var(--fu)) 1fr;align-items:start;width:calc(1440*var(--fu));margin:0 auto;padding:calc(86*var(--fu)) calc(100*var(--fu)) 0 calc(160*var(--fu))}
.ft-logo{display:inline-flex;align-items:center;gap:calc(10*var(--fu));font-size:calc(17*var(--fu));font-weight:500;letter-spacing:-.02em;color:var(--ink)}
.ft-mark{width:calc(30*var(--fu));height:calc(30*var(--fu));border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 34% 28%,#8fd6a4,#6cbe86 55%,#57ad74);color:#fff;font-size:calc(14*var(--fu));font-weight:600;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 calc(1*var(--fu)) calc(2*var(--fu)) rgba(0,0,0,.25)}
.ft-title{margin-top:calc(19*var(--fu));font-size:calc(20*var(--fu));font-weight:500;line-height:1.2;letter-spacing:-.02em}
.ft-text{max-width:calc(412*var(--fu));margin-top:calc(18*var(--fu));color:var(--soft);font-size:calc(13.7*var(--fu));font-weight:300;line-height:1.5;letter-spacing:.005em}
.ft-cta{display:inline-flex;align-items:center;gap:calc(6*var(--fu));height:calc(34*var(--fu));margin-top:calc(20*var(--fu));padding:0 calc(16*var(--fu)) 0 calc(17*var(--fu));border-radius:999px;background:var(--lime);color:#1a1d0c;font-size:calc(12*var(--fu));font-weight:500;letter-spacing:-.005em;transition:background .2s,transform .2s}
.ft-cta:hover{background:#c6c85a;color:#1a1d0c;transform:translateY(-1px)}
.ft-cta svg{width:calc(13*var(--fu));height:calc(13*var(--fu))}
.ft-copy{margin-top:calc(23*var(--fu));color:var(--mute);font-size:calc(12.2*var(--fu));letter-spacing:.01em}
.ft-status{display:flex;flex-wrap:wrap;gap:calc(8*var(--fu));margin-top:calc(16*var(--fu));list-style:none}
.ft-chip{display:inline-flex;align-items:center;gap:calc(6*var(--fu));height:calc(25*var(--fu));padding:0 calc(10*var(--fu));border:1px solid var(--chip-line);border-radius:999px;background:var(--chip-bg);color:var(--soft);font-size:calc(10.8*var(--fu));font-weight:500;letter-spacing:-.005em;white-space:nowrap}
.ft-chip svg{width:calc(11*var(--fu));height:calc(11*var(--fu));fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ft-dot{width:calc(6*var(--fu));height:calc(6*var(--fu));border-radius:50%;background:var(--pos);box-shadow:0 0 0 calc(2.5*var(--fu)) rgba(143,206,157,.18)}
.ft-col__title{font-size:calc(16*var(--fu));font-weight:500;line-height:1;letter-spacing:-.02em;color:var(--ink)}
.ft-list{display:grid;gap:calc(20.5*var(--fu));margin-top:calc(24*var(--fu));list-style:none;font-size:calc(13.7*var(--fu));line-height:1.24;letter-spacing:.015em}
.ft-list a{color:var(--soft);transition:opacity .2s}
.ft-list a:hover{opacity:.55;color:var(--soft)}
.ft-col--menu .ft-list{gap:calc(15*var(--fu));margin-top:calc(21*var(--fu));font-weight:500;letter-spacing:-.01em}
.ft-col--menu .ft-list a{color:var(--ink)}
@media (max-width:1180px){
  .ft{--fu:max(.9px,min(calc(100vw / 1040),calc(100vh / 672)))}
  @supports (height:100svh){.ft{--fu:max(.9px,min(calc(100vw / 1040),calc(100svh / 672)))}}
  .ft-content{grid-template-columns:calc(400*var(--fu)) calc(190*var(--fu)) calc(210*var(--fu)) 1fr;width:calc(1040*var(--fu));padding:calc(64*var(--fu)) calc(40*var(--fu)) 0}
  .ft-text{max-width:calc(350*var(--fu))}
  .ft-word{font-size:calc(352*var(--fu));bottom:calc(10*var(--fu))}
}
@media (max-width:760px){
  .ft{--fu:1px;display:flex;flex-direction:column;height:auto;min-height:100vh}
  @supports (height:100svh){.ft{min-height:100svh}}
  .ft-stage::after{background:linear-gradient(to bottom,#050605 0%,rgb(5 6 5 / .95) 50%,rgb(5 6 5 / .8) 68%,rgb(5 6 5 / 0) 90%)}
  .ft-content{grid-template-columns:auto auto auto;justify-content:space-between;gap:36px 12px;width:100%;padding:40px 20px 0;margin-bottom:max(48vw,170px)}
  .ft-brand{grid-column:1 / -1}
  .ft-title{font-size:21px}
  .ft-text{max-width:34em;font-size:14px}
  .ft-cta{height:40px;padding:0 18px;font-size:13.5px}
  .ft-cta svg{width:14px;height:14px}
  .ft-copy{font-size:12.5px}
  .ft-chip{height:28px;font-size:12px}
  .ft-col__title{font-size:15px}
  .ft-list,.ft-col--menu .ft-list{gap:14px;margin-top:20px;font-size:13px;letter-spacing:0;white-space:nowrap}
  .ft-word{bottom:max(5vw,80px);font-size:34vw}
  .ft-fog{height:12%}
}

/* ── light version (CEO 2026-11-14) ──
   Dark stays the default. data-theme="light" is set on <html> before first
   paint by the inline script in each page's <head>; the sun/moon button in the
   top bar switches (see /assets/theme.js). Palette = the Digitale Firma app's light set,
   values duplicated on purpose: ground #F2F5F6, teal #0E5561, lime #C8D400. */
.lg-theme { padding: 0; font: inherit; cursor: pointer; color: var(--soft); font-size: 17px; }
.lg-theme:hover { color: var(--ink); }
.th-sun, .th-moon { display: block; width: 1em; height: 1em; }
.th-moon { display: none; }
:root[data-theme="light"] .th-sun { display: none; }
:root[data-theme="light"] .th-moon { display: block; }
:root[data-theme="light"] {
  --ink: #0E2A32; --soft: #33505A; --mute: #48626C; --dim: #56707A;
  --lime: #C8D400; --lime-deep: #b6c100; --pos: #23694b;
  --ground: #F2F5F6; --panel: rgba(255, 255, 255, .78); --panel-line: rgba(14, 42, 50, .11);
  --line: rgba(14, 42, 50, .14);
  --sub: #48626C; --btn-ink: #0E2A32; --btn-line: rgba(14, 42, 50, .20); --btn-bg: rgba(255, 255, 255, .72);
  --btn-bg-hi: #fff; --code-bg: rgba(14, 85, 97, .08); --link-line: rgba(14, 85, 97, .55);
  --accent-ink: #0E5561; --focus: #0E5561; --glow-a: 14, 85, 97; --glow-b: 200, 212, 0;
  --ft-line: rgba(14, 42, 50, .10); --chip-line: rgba(14, 42, 50, .12); --chip-bg: rgba(255, 255, 255, .7);
  --panel-shadow: 0 1px 1px rgba(11, 68, 80, .04), 0 12px 32px -16px rgba(11, 68, 80, .20);
  color-scheme: light;
}
:root[data-theme="light"] .lg-toc a.on { border-left-color: #0E5561; }

/* ── phone ── */
@media (max-width: 600px) {
  .lg-top { padding: 14px 16px; }
  .lg-brand small { display: none; }
  .lg-logo { width: 36px; height: 36px; flex-basis: 36px; font-size: 16px; }
  .lg-cta { height: 40px; padding: 0 14px; font-size: 13.5px; }
  .lg-cta svg { display: none; }
  .lg-lang { width: 40px; height: 40px; }
  .lg-act { gap: 8px; }
  .lg { padding: 20px 16px 88px; }
  .doc { font-size: 15.5px; }
  .doc h2 { margin-top: 40px; font-size: 19px; }
  .doc .block { padding: 22px 18px; }
}
@media (max-width: 400px) {
  .lg-cta { padding: 0 12px; font-size: 13px; }
  .lg-act { gap: 6px; }
  .lg-lang { width: 36px; height: 36px; }
}

/* ── print: a legal page gets printed — plain black on white, no chrome ── */
@media print {
  :root { --ink: #000; --soft: #111; --mute: #333; --dim: #444; --line: #bbb; --panel: transparent; --panel-line: #bbb; }
  html, body { background: #fff; color: #000; }
  .lg-top, .lg-toc, .lg-toc-m, .lg-glow, .lg-kick, .ft, .skip { display: none !important; }
  .lg { display: block; padding: 0; }
  .doc a { color: #000; }
}
