/*
  Shared stylesheet for /privacy, /datenschutz, /imprint, /impressum, /support.
  Mirrors iOS Brogress/Utilities/StyleLibrary.swift palette + typography.
  Dark page bg, brand gold accents, Bebas Neue headings, Roboto Condensed body.
*/

:root {
  --bg: #111113;
  --bg-soft: #1A1A20;
  --bg-elevated: #23232B;
  --ink: #FAFAE7;
  --ink-soft: #D4D4C5;
  --ink-muted: #7A7A75;
  --accent: #B68616;
  --accent-soft: #D29F34;
  --rule: #38382A;
  --highlight: #1F1A0A;
  --warn-bg: #2A2310;
  --warn-border: #D29F34;
  --max-width: 44rem;
  --heading: "Bebas Neue", "Helvetica Neue", Arial, sans-serif;
  --body: "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --label: "Bebas Neue", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--ink);
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 2.5rem) 6rem;
}

/* ---------- Language switcher ---------- */
.lang-switcher {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--label);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.lang-switcher a {
  color: var(--ink-muted);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.lang-switcher a:hover {
  color: var(--ink);
}

.lang-switcher a[aria-current="page"] {
  color: var(--accent-soft);
  border-bottom-color: var(--accent-soft);
}

.lang-switcher .sep {
  color: var(--rule);
  font-weight: 400;
}

/* ---------- Header ---------- */
header.masthead {
  padding-bottom: 2.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  font-family: var(--label);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 1.25rem;
}

h1 {
  font-family: var(--heading);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  line-height: 1.0;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

h1 em {
  font-style: normal;
  font-weight: 400;
  color: var(--accent-soft);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
  margin: 0;
}

.meta strong {
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- Lede ---------- */
.lede {
  font-family: var(--body);
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 400;
  margin: 0 0 3rem;
}

/* ---------- Table of contents ---------- */
.toc {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin: 0 0 3.5rem;
  font-size: 0.94rem;
}

.toc-label {
  font-family: var(--label);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  padding: 0;
  margin: 0;
  column-count: 2;
  column-gap: 1.5rem;
}

.toc li {
  counter-increment: toc;
  break-inside: avoid;
  padding: 0.2rem 0;
}

.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  margin-right: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Headings ---------- */
h2 {
  font-family: var(--heading);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.5vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 4rem 0 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  scroll-margin-top: 1.5rem;
}

h2 .num {
  font-family: var(--label);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--accent-soft);
  display: block;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

h3 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.18rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 2.25rem 0 0.85rem;
  color: var(--ink);
}

h2:first-of-type {
  margin-top: 1rem;
}

/* ---------- Body ---------- */
p {
  margin: 0 0 1.15rem;
}

p strong,
li strong {
  font-weight: 600;
  color: var(--ink);
}

em {
  font-style: italic;
  color: var(--ink-soft);
}

ul,
ol {
  padding-left: 1.4rem;
  margin: 0 0 1.5rem;
}

li {
  margin-bottom: 0.55rem;
}

/* ---------- Tables ---------- */
.table-wrap {
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

th,
td {
  text-align: left;
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

th {
  background: var(--bg-elevated);
  font-family: var(--label);
  font-weight: 400;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
}

tr:last-child td {
  border-bottom: none;
}

/* ---------- Callout boxes ---------- */
.callout {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--highlight);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 0.96rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-label {
  font-family: var(--label);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 0.5rem;
}

.callout.warn {
  background: var(--warn-bg);
  border-left-color: var(--warn-border);
}

.callout.warn .callout-label {
  color: var(--accent-soft);
}

/* ---------- Address block ---------- */
.address {
  font-style: normal;
  padding: 1.25rem 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin: 1rem 0 1.5rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.address strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: baseline;
}

footer a {
  color: var(--ink-soft);
}

footer a:hover {
  color: var(--accent-soft);
}

/* ---------- Print ---------- */
@media print {
  body {
    background: white;
    color: black;
    font-size: 11pt;
  }

  .toc,
  footer {
    display: none;
  }

  h2 {
    page-break-after: avoid;
    border-top: 1px solid #999;
    color: black;
  }

  h1, h3, .eyebrow, .lang-switcher a[aria-current="page"], .toc-label, h2 .num, .callout-label {
    color: black;
  }

  a {
    color: black;
  }

  .address, .toc, .callout, .table-wrap {
    background: white;
    border-color: #999;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 540px) {
  .toc ol {
    column-count: 1;
  }

  .meta {
    flex-direction: column;
    gap: 0.25rem;
  }

  th,
  td {
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
  }
}
