/* danielsolves.ai — layout for the legal pages (Impressum, Datenschutz).
   Loads after styles/site.css and reuses its tokens, so both pages follow the
   light/dark switch without any colour of their own. */

/* Header: brand plus a way back, no site navigation. */
.doc-head {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: oklch(from var(--bg) l c h / 0.82);
  border-bottom: 1px solid var(--line);
}
.doc-head-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 20px; }
.doc-head-right { display: flex; align-items: center; gap: 16px; }
.doc-back {
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  text-decoration: none; transition: color 0.2s; white-space: nowrap;
}
.doc-back:hover { color: var(--accent); }

.theme-btn {
  background: none; border: 1px solid var(--line-strong); border-radius: 10px;
  width: 34px; height: 34px; padding: 0; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}
.theme-btn:hover { color: var(--text); border-color: var(--text); }
.theme-btn .ic-sun { display: none; }
.theme-btn .ic-moon { display: block; }
:root[data-theme="light"] .theme-btn .ic-sun { display: block; }
:root[data-theme="light"] .theme-btn .ic-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .ic-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-btn .ic-moon { display: none; }
}

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  padding: 12px 20px; border-radius: var(--r-control); text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
a, button { touch-action: manipulation; }

/* Body: a single readable column, no decoration competing with the text. */
.doc { padding: clamp(48px, 7vw, 80px) 0 clamp(56px, 8vw, 96px); }
.doc .wrap { max-width: 820px; }
.doc [id] { scroll-margin-top: 88px; }

.doc-title { font-size: clamp(34px, 5.5vw, 56px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 600; }
.doc-lede { color: var(--muted); font-size: var(--fs-lede); margin-top: 18px; max-width: 60ch; line-height: 1.6; text-wrap: pretty; }

.doc-sec { margin-top: clamp(38px, 5vw, 56px); }
.doc-sec h2 {
  font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; letter-spacing: -0.02em;
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
.doc-sec p { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 68ch; text-wrap: pretty; }
.doc-sec p + p, .doc-sec ul + p, .doc-sec p + ul, .doc-sec ol + p { margin-top: 16px; }
.doc-sec strong { color: var(--text); font-weight: 600; }
.doc-sec a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.doc-sec ul, .doc-sec ol { color: var(--muted); font-size: 16px; line-height: 1.7; padding-left: 22px; max-width: 68ch; }
.doc-sec ul { list-style: none; padding-left: 0; }
.doc-sec ul li { position: relative; padding-left: 22px; margin-top: 9px; }
.doc-sec ul li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.doc-sec ol li { margin-top: 9px; padding-left: 4px; }

.doc-address {
  font-style: normal; color: var(--text) !important; font-size: 16px; line-height: 1.75;
  padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface); display: inline-block; min-width: min(100%, 340px);
}

.doc-dl { display: grid; grid-template-columns: 190px 1fr; gap: 0; margin-top: 4px; }
.doc-dl dt {
  font-family: var(--mono); font-size: 12.5px; color: var(--faint);
  letter-spacing: 0.06em; padding: 14px 16px 14px 0;
  border-top: 1px solid var(--line);
}
.doc-dl dd { color: var(--text); font-size: 15.5px; line-height: 1.6; padding: 14px 0; border-top: 1px solid var(--line); }
.doc-dl--rights dd { color: var(--muted); }
.doc-dl--rights dt { color: var(--accent); }
@media (max-width: 620px) {
  .doc-dl { grid-template-columns: 1fr; }
  .doc-dl dt { padding-bottom: 0; border-top: 1px solid var(--line); }
  .doc-dl dd { padding-top: 6px; border-top: none; }
}

/* Table of contents */
.doc-toc {
  margin-top: 40px; padding: 24px 28px;
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface);
}
.doc-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; columns: 2; column-gap: 32px; }
.doc-toc li { counter-increment: toc; margin: 0 0 10px; break-inside: avoid; }
.doc-toc li::before {
  content: counter(toc) ". "; font-family: var(--mono); font-size: 12px; color: var(--faint);
}
.doc-toc a { color: var(--muted); text-decoration: none; font-size: 14.5px; }
.doc-toc a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 620px) { .doc-toc ol { columns: 1; } }

/* The editorial note that must not survive to production. */
.doc-todo {
  border: 1px dashed var(--accent);
  background: var(--accent-soft);
  border-radius: var(--r-card);
  padding: 24px 28px;
  margin-bottom: 44px;
}
.doc-todo--warn { border-color: var(--danger); background: oklch(from var(--danger) l c h / 0.08); }
.doc-todo-head {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.doc-todo--warn .doc-todo-head { color: var(--danger); }
.doc-todo p, .doc-todo li { color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 70ch; }
.doc-todo p + p, .doc-todo p + ul, .doc-todo p + ol, .doc-todo ul + p, .doc-todo ol + p { margin-top: 14px; }
.doc-todo ul, .doc-todo ol { padding-left: 20px; }
.doc-todo ul { list-style: none; padding-left: 0; }
.doc-todo ul li { position: relative; padding-left: 20px; margin-top: 8px; }
.doc-todo ul li::before {
  content: ""; position: absolute; left: 2px; top: 10px;
  width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.5;
}
.doc-todo ol li { margin-top: 10px; }
.doc-todo strong { color: var(--text); }

code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--surface-sunken); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 6px; color: var(--text);
}

.doc-note {
  font-size: 14px !important; color: var(--faint) !important;
  border-left: 2px solid var(--line-strong); padding-left: 16px; margin-top: 18px;
}

/* Consent status + revocation, rendered by legal.js inside section 5. */
.doc-consent {
  margin-top: 28px; padding: 22px 24px;
  border: 1px solid var(--line-strong); border-radius: var(--r-card);
  background: var(--surface);
}
.doc-consent p { max-width: 70ch; }
.doc-consent .doc-note { margin-top: 12px; }
.doc-btn {
  margin-top: 16px; padding: 10px 18px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  color: var(--text); background: transparent;
  border: 1px solid var(--line-input); border-radius: var(--r-control);
  cursor: pointer; transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.doc-btn:hover { border-color: var(--danger); color: var(--danger); background: oklch(from var(--danger) l c h / 0.08); }
.doc-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.doc-btn[hidden] { display: none; }

.doc-updated {
  font-family: var(--mono); font-size: 12.5px; color: var(--faint);
  margin-top: clamp(44px, 6vw, 64px); padding-top: 24px; border-top: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skip-link { transition: none; }
}
