/*
  Retreat-OS legal pages — shared layout and typography for the German pages
  (public/impressum.html, public/datenschutz.html) and their English
  counterparts (public/legal-notice.html, public/privacy-policy.html).

  All four pages must render identically, so colour, type and spacing live here
  rather than in a page <style> block. The palette matches /adam and /ott.

  The brand lockup is styled by /brand.css and must never be redefined here;
  `npm run check` enforces that.
*/

:root {
  --bg: #0c1a1c;
  --line: rgba(181, 231, 222, .12);
  --text: #f2f7f4;
  --muted: #a6b5b1;
  --muted-2: #8a9b97;
  --teal: #55e2cf;
  --aqua: #9bf0df;
  --max: 720px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 12% -6%, rgba(85, 226, 207, .07), transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(107, 212, 255, .05), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.legal-wrap { width: min(calc(100% - 44px), var(--max)); margin: 0 auto; }

.legal-header {
  padding: 26px 0 22px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

/* Brand lockup left, language switch right. */
.legal-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px 20px;
}

/* Restrained text link to the same page in the other language. */
.legal-lang {
  color: #c3d3cf;
  font-size: .85rem;
  text-decoration: none;
  padding: 10px 2px;
  white-space: nowrap;
}
.legal-lang:hover { color: #fff; text-decoration: underline; }

.legal { padding: 44px 0 56px; }

.legal h1 {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 800;
}

.legal h2 {
  margin: 46px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: clamp(1.25rem, 3.6vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -.01em;
  font-weight: 700;
}

.legal h1 + h2 { margin-top: 34px; }

.legal h3 {
  margin: 32px 0 8px;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--aqua);
}

.legal h4 {
  margin: 22px 0 6px;
  font-size: .96rem;
  font-weight: 700;
  color: var(--text);
}

.legal p { margin: 0 0 14px; color: var(--muted); overflow-wrap: break-word; }

.legal ul { margin: 0 0 16px; padding-left: 1.2em; color: var(--muted); }
.legal li { margin-bottom: 6px; }
.legal li::marker { color: var(--teal); }

.legal a {
  color: var(--aqua);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(155, 240, 223, .42);
  overflow-wrap: anywhere;
}
.legal a:hover { color: var(--text); text-decoration-color: currentColor; }

.legal-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 44px;
  color: var(--muted-2);
  font-size: .82rem;
}
.legal-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px 24px;
  flex-wrap: wrap;
}
.legal-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.legal-nav a {
  display: inline-block;
  padding: 10px 2px;
  color: #c3d3cf;
  text-decoration: none;
}
.legal-nav a:hover { color: #fff; text-decoration: underline; }
.legal-nav a[aria-current="page"] { color: var(--aqua); }

.legal a:focus-visible,
.legal-lang:focus-visible,
.legal-nav a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .legal-wrap { width: calc(100% - 32px); }
  .legal { padding: 34px 0 44px; }
  .legal-footer-inner { flex-direction: column; align-items: flex-start; }
}
