/* was-bedeutet-hodl.de — shared stylesheet
   -------------------------------------------------- */

:root {
  --bg: #fbfaf6;
  --bg-elev: #ffffff;
  --fg: #171921;
  --fg-soft: #3f434e;
  --muted: #6a6f7c;
  --accent: #f7931a;
  --accent-soft: #fef1e0;
  --accent-strong: #d97706;
  --success: #059669;
  --danger: #dc2626;
  --border: #e8e6df;
  --border-strong: #d3d0c6;
  --card: #f2f0e9;
  --code-bg: #efece2;
  --shadow-sm: 0 1px 2px rgba(23,25,33,.05);
  --shadow-md: 0 4px 16px rgba(23,25,33,.06);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --w-read: 68ch;
  --w-wide: 82ch;
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.13rem, 1.05rem + 0.4vw, 1.25rem);
  --step-2: clamp(1.3rem, 1.15rem + 0.75vw, 1.55rem);
  --step-3: clamp(1.6rem, 1.35rem + 1.25vw, 1.95rem);
  --step-4: clamp(2rem, 1.6rem + 2vw, 2.75rem);
  --step-5: clamp(2.4rem, 1.85rem + 2.75vw, 3.4rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1116;
    --bg-elev: #171a21;
    --fg: #eef0f4;
    --fg-soft: #c1c5ce;
    --muted: #8b91a0;
    --accent: #ffa733;
    --accent-soft: #3a2812;
    --accent-strong: #ffc270;
    --border: #262a33;
    --border-strong: #363b46;
    --card: #1a1d25;
    --code-bg: #1e2229;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,.3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--fg);
  color: var(--bg);
  padding: 10px 16px;
  font-weight: 600;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Header */
.site-header {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
}
.site-header .inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: var(--r-sm);
}
.brand:hover { color: var(--accent); }
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--fg), var(--fg-soft));
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}
nav.primary {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
nav.primary a {
  color: var(--fg-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: color .15s ease, background .15s ease;
}
nav.primary a:hover,
nav.primary a[aria-current="page"] {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

/* Main container */
main { display: block; }
.container {
  max-width: var(--w-read);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 40px) 20px 60px;
}
.container.wide { max-width: var(--w-wide); }

/* Article header */
.article-header { margin-bottom: 8px; }
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-strong); }
.breadcrumbs .sep { color: var(--border-strong); }

h1 {
  font-size: var(--step-5);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0.3em 0 0.4em;
  font-weight: 800;
}
.lead {
  font-size: var(--step-1);
  color: var(--fg-soft);
  line-height: 1.5;
  margin: 0 0 1em;
  font-weight: 400;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.87rem;
  margin: 0 0 1.5em;
  align-items: center;
}
.meta-row .dot { width: 3px; height: 3px; background: var(--border-strong); border-radius: 50%; }

/* Typography */
p { margin: 0.9em 0; color: var(--fg-soft); }
p strong, li strong { color: var(--fg); font-weight: 600; }
article > p:first-of-type::first-line { font-weight: 500; }
h2 {
  font-size: var(--step-3);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 2.2em 0 0.5em;
  font-weight: 700;
  color: var(--fg);
  scroll-margin-top: 90px;
}
h3 {
  font-size: var(--step-2);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 1.8em 0 0.4em;
  font-weight: 700;
  color: var(--fg);
  scroll-margin-top: 90px;
}
h4 {
  font-size: 1.05rem;
  margin: 1.4em 0 0.3em;
  font-weight: 700;
  color: var(--fg);
}
h2 + p, h3 + p, h4 + p { margin-top: 0.4em; }

a { color: var(--accent-strong); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

ul, ol { padding-left: 1.4em; color: var(--fg-soft); }
li { margin: 0.5em 0; }
li::marker { color: var(--accent); }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* Quick answer callout */
.quick-answer {
  background: linear-gradient(180deg, var(--accent-soft), transparent 250%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  padding: 18px 22px;
  margin: 1.5em 0;
}
.quick-answer .kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-strong);
  font-weight: 700;
  margin: 0 0 6px;
}
.quick-answer p { margin: 0; color: var(--fg); font-size: 1.02rem; line-height: 1.55; }

/* Note callout */
.note {
  background: var(--card);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin: 1.5em 0;
  font-size: 0.94rem;
  color: var(--fg-soft);
}
.note strong { color: var(--fg); }

/* Table of contents */
.toc {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 22px;
  margin: 1.5em 0 2em;
  box-shadow: var(--shadow-sm);
}
.toc .kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 8px;
}
.toc ol {
  counter-reset: toc;
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 1;
  column-gap: 24px;
}
@media (min-width: 640px) { .toc ol { columns: 2; } }
.toc li {
  counter-increment: toc;
  margin: 4px 0;
  padding-left: 24px;
  position: relative;
  break-inside: avoid;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.toc a { color: var(--fg); text-decoration: none; font-size: 0.95rem; }
.toc a:hover { color: var(--accent-strong); text-decoration: underline; }

/* Figure and illustrations */
figure {
  margin: 1.8em 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
figure.plain { background: transparent; border: 0; box-shadow: none; padding: 0; }
figure svg { width: 100%; height: auto; display: block; border-radius: var(--r-sm); }
figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 10px 4px 2px;
  line-height: 1.5;
  text-align: center;
}

/* Hero figure — larger */
.hero-figure {
  margin: 1.4em 0 2em;
  background: linear-gradient(160deg, var(--bg-elev), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 8px;
  box-shadow: var(--shadow-md);
}
.hero-figure svg { border-radius: var(--r-md); }

/* Slang term cards / pills grid */
.pills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 1.2em 0 1.5em;
  padding: 0;
  list-style: none;
}
.pills li {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  transition: border-color .15s, transform .15s;
}
.pills li:hover { border-color: var(--accent); transform: translateY(-1px); }
.pills li strong { display: block; color: var(--fg); margin-bottom: 3px; font-size: 0.98rem; }
.pills li span { color: var(--muted); font-size: 0.87rem; line-height: 1.45; display: block; }

/* Comparison table */
.compare {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.compare thead th {
  background: var(--card);
  color: var(--fg);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.compare tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  padding: 12px 16px;
  vertical-align: top;
  background: var(--card);
  border-right: 1px solid var(--border);
  width: 34%;
  font-size: 0.9rem;
}
.compare tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-soft);
  vertical-align: top;
}
.compare tbody tr:last-child td,
.compare tbody tr:last-child th { border-bottom: 0; }
.compare .yes { color: var(--success); font-weight: 600; }
.compare .no { color: var(--danger); font-weight: 600; }

/* Pro/Con split */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 1.3em 0 1.8em;
}
@media (min-width: 640px) { .split { grid-template-columns: 1fr 1fr; } }
.split .box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.split .box h3 { margin-top: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.split .box.pro h3 { color: var(--success); }
.split .box.con h3 { color: var(--danger); }
.split .box ul { margin: 0.5em 0; padding-left: 1.2em; }
.split .box li { margin: 0.4em 0; font-size: 0.94rem; }

/* FAQ accordion */
.faq { margin: 1em 0; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0;
  margin: 10px 0;
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 18px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--fg);
  font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s, border-color .2s;
  flex-shrink: 0;
}
.faq details[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--accent);
}
.faq .answer { padding: 0 18px 16px; color: var(--fg-soft); }
.faq .answer p:first-child { margin-top: 0; }
.faq .answer p:last-child { margin-bottom: 0; }

/* Related cards */
.related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 1em 0 2em;
}
.related a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, transform .15s;
}
.related a:hover { border-color: var(--accent); transform: translateY(-1px); }
.related a strong { display: block; color: var(--accent-strong); margin-bottom: 4px; font-size: 0.98rem; font-weight: 700; }
.related a span { color: var(--fg-soft); font-size: 0.88rem; line-height: 1.5; display: block; }

/* Timeline for herkunft */
.timeline {
  list-style: none;
  padding: 0;
  margin: 1.5em 0 2em;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.timeline li {
  position: relative;
  padding: 0 0 20px 36px;
  margin: 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border: 3px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline .date {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
  font-weight: 700;
  margin-bottom: 2px;
}
.timeline .event { display: block; font-weight: 600; color: var(--fg); margin-bottom: 4px; }
.timeline .detail { color: var(--fg-soft); font-size: 0.94rem; margin: 0; }

/* Blockquote */
blockquote {
  border-left: 4px solid var(--accent);
  background: var(--card);
  padding: 16px 20px;
  margin: 1.5em 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic;
  color: var(--fg-soft);
  font-size: 0.97rem;
  line-height: 1.55;
}
blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px;
  margin-top: 40px;
  color: var(--muted);
  font-size: 0.88rem;
  background: var(--bg-elev);
}
.site-footer .inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent-strong); }

/* Utility */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
}

/* Mobile refinements */
@media (max-width: 520px) {
  .site-header .inner { padding: 10px 16px; gap: 8px; }
  nav.primary { gap: 0; }
  nav.primary a { padding: 6px 8px; font-size: 13px; }
  .container { padding: 16px 16px 40px; }
  .toc { padding: 14px 16px; }
  .quick-answer { padding: 14px 16px; }
  h1 { line-height: 1.15; }
  .compare thead th, .compare tbody th, .compare tbody td { padding: 10px 12px; font-size: 0.88rem; }
  .compare tbody th { width: 38%; }
  .brand-mark { width: 20px; height: 20px; font-size: 12px; }
}

/* Print */
@media print {
  .site-header, .site-footer, .toc, .related { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  a[href^="http"]:after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
