:root {
  --bg: #faf8f4;
  --bg-soft: #f2ede4;
  --ink: #1c1a17;
  --ink-soft: #4a463f;
  --muted: #847d72;
  --line: #e3dccf;
  --gold: #b8860b;
  --gold-deep: #8a6608;
  --accent: #1f4e46;
  --accent-soft: #e7efed;
  --max: 720px;
  --wide: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.content { max-width: var(--max); }

a { color: var(--accent); text-underline-offset: 2px; }

/* Scroll progress bar */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  z-index: 100; transition: width .08s linear;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand {
  font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 22px;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.brand-dot { color: var(--gold); }
.top-nav { display: flex; gap: 26px; }
.top-nav a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft); text-decoration: none;
  transition: color .15s;
}
.top-nav a:hover { color: var(--gold-deep); }
.top-nav a.active { color: var(--gold-deep); font-weight: 600; }

.header-inner { gap: 18px; }
.lang-switch { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg-soft); flex-shrink: 0; }
.lang-switch a {
  font-size: 13px; font-weight: 600; color: var(--ink-soft); text-decoration: none;
  padding: 4px 11px; border-radius: 999px; transition: all .15s; line-height: 1.4;
}
.lang-switch a:hover { color: var(--gold-deep); }
.lang-switch a.active { background: var(--ink); color: #fff; }

/* Hero */
.hero {
  padding: 84px 0 56px;
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(184,134,11,0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 12.5px; font-weight: 600;
  color: var(--gold-deep); margin: 0 0 18px;
}
.hero h1 {
  font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 18px; max-width: 16ch;
}
.subtitle {
  font-family: "Fraunces", Georgia, serif; font-weight: 400; font-style: italic;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem); color: var(--ink-soft); line-height: 1.4;
  margin: 0 0 28px; max-width: 38ch;
}
.standnote {
  font-size: 14px; color: var(--muted); line-height: 1.6;
  max-width: 60ch; border-left: 3px solid var(--gold); padding-left: 16px;
}
.standnote a { color: var(--gold-deep); }

/* Content sections */
.article .content { padding-top: 8px; padding-bottom: 40px; }
section { padding: 44px 0; border-top: 1px solid var(--line); position: relative; }
section:first-of-type { border-top: none; }
.section-num {
  display: inline-block; font-family: "Fraunces", serif; font-weight: 600;
  font-size: 14px; color: var(--gold-deep);
  background: var(--accent-soft); border: 1px solid var(--line);
  width: 40px; height: 40px; line-height: 38px; text-align: center; border-radius: 50%;
  margin-bottom: 18px;
}
h2 {
  font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.1rem); line-height: 1.15; letter-spacing: -0.015em;
  margin: 0 0 20px;
}
.h2-sub { font-weight: 400; font-style: italic; color: var(--muted); font-size: 0.7em; }
h3 { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.2rem; margin: 0 0 16px; }
p { margin: 0 0 20px; color: var(--ink-soft); }
p strong, li strong { color: var(--ink); font-weight: 600; }

/* Pull quote */
.pull {
  margin: 32px 0 8px; padding: 24px 28px;
  font-family: "Fraunces", serif; font-size: 1.4rem; line-height: 1.4; font-weight: 500;
  color: var(--ink);
  border-left: 4px solid var(--gold);
  background: linear-gradient(90deg, rgba(184,134,11,0.06), transparent);
  border-radius: 0 10px 10px 0;
}

/* Compare grid */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 8px 0 28px; }
.compare-col {
  border: 1px solid var(--line); border-radius: 14px; padding: 24px;
  background: #fff;
}
.compare-col.handwerk { background: linear-gradient(180deg, #fffdf7, #fff); border-color: #ecdfbf; }
.compare-col.studium { background: linear-gradient(180deg, #f7fbfa, #fff); border-color: #d6e6e2; }
.compare-col h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; color: var(--muted); font-family: "Inter", sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.tag {
  font-family: "Inter", sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 0;
  text-transform: none; color: #fff; background: var(--gold-deep);
  padding: 3px 10px; border-radius: 999px;
}
.tag-alt { background: var(--accent); }
.compare-col dl { margin: 0; }
.compare-col dt { font-weight: 700; color: var(--ink); font-size: 15px; margin-top: 16px; }
.compare-col dd { margin: 4px 0 0; font-size: 15px; color: var(--ink-soft); line-height: 1.55; }

/* Callout */
.callout {
  margin: 8px 0; padding: 22px 24px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid #cfe0dc;
}
.callout p { margin: 0; color: var(--ink); }

/* Stats */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.stat {
  border: 1px solid var(--line); border-radius: 12px; padding: 22px 18px; text-align: center;
  background: #fff;
}
.stat-num {
  display: block; font-family: "Fraunces", serif; font-weight: 700;
  font-size: 1.9rem; color: var(--gold-deep); line-height: 1.1; margin-bottom: 8px;
}
.stat-label { font-size: 13.5px; color: var(--muted); line-height: 1.4; }

/* Lists */
.lede-list, .check-list { list-style: none; padding: 0; margin: 0 0 20px; }
.lede-list li, .check-list li {
  position: relative; padding-left: 30px; margin-bottom: 16px; color: var(--ink-soft);
}
.lede-list li::before {
  content: ""; position: absolute; left: 6px; top: 12px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
}
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}

/* Sources */
.sources ol { padding-left: 22px; }
.sources li { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 12px; line-height: 1.55; }
.sources a { word-break: break-word; }

/* ============ Interaktive Visualisierungen ============ */
.viz {
  margin: 32px 0; padding: 24px; border: 1px solid var(--line); border-radius: 16px;
  background: #fff;
}
.viz-cap { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.viz-title { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.25rem; color: var(--ink); }
.viz-sub { font-size: 14px; color: var(--muted); }
.viz-note { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 16px 0 0; }
.viz-note em { color: var(--ink-soft); font-style: normal; font-weight: 600; }

.viz-controls { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 18px; background: var(--bg-soft); }
.seg {
  border: none; background: transparent; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink-soft); padding: 6px 16px; border-radius: 999px; transition: all .15s;
}
.seg.active { background: var(--ink); color: #fff; }

.viz-legend { display: flex; gap: 22px; margin-top: 16px; font-size: 14px; color: var(--ink-soft); }
.lg { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sw-h { background: var(--gold-deep); }
.sw-s { background: var(--accent); }

/* Bar chart */
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row {
  position: relative; display: grid; grid-template-columns: 200px 1fr auto; align-items: center; gap: 14px;
  background: transparent; border: none; padding: 4px 2px; cursor: pointer; font: inherit; text-align: left;
  border-radius: 8px;
}
.bar-row:hover, .bar-row:focus-visible { background: var(--bg-soft); outline: none; }
.bar-label { font-size: 13.5px; color: var(--ink-soft); font-weight: 500; }
.bar-track { height: 22px; background: var(--bg-soft); border-radius: 6px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 6px; transition: width .9s cubic-bezier(.22,.61,.36,1); }
.bar-h .bar-fill { background: linear-gradient(90deg, #d8a526, var(--gold-deep)); }
.bar-s .bar-fill { background: linear-gradient(90deg, #2f6a5f, var(--accent)); }
.bar-val { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; color: var(--ink); min-width: 84px; text-align: right; }
.bar-src {
  position: absolute; left: 200px; bottom: calc(100% - 2px); z-index: 5;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 500; padding: 6px 10px; border-radius: 8px;
  white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .15s, transform .15s;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.bar-row:hover .bar-src, .bar-row:focus-visible .bar-src { opacity: 1; transform: translateY(0); }

/* Line chart */
.line-chart svg { width: 100%; height: auto; display: block; }
.line-chart .grid { stroke: var(--line); stroke-width: 1; }
.line-chart .axis-base { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.line-chart .axis-y, .line-chart .axis-x { fill: var(--muted); font-size: 11px; font-family: "Inter", sans-serif; }
.line-chart .axis-y { text-anchor: end; }
.line-chart .axis-x { text-anchor: middle; }
.line-chart .axis-title-x { fill: var(--muted); font-size: 12px; text-anchor: middle; }
.line-chart .line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.line-chart .line-h { stroke: var(--gold-deep); stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s ease forwards; }
.line-chart .line-s { stroke: var(--accent); stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s ease .2s forwards; }
.line-chart .area { opacity: .10; }
.line-chart .area-h { fill: var(--gold-deep); }
.line-chart .area-s { fill: var(--accent); }
.line-chart .cross-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.line-chart .cross-dot { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.line-chart .cross-text { fill: var(--ink-soft); font-size: 12px; font-weight: 600; text-anchor: middle; }
.line-chart .end-label { font-size: 13px; font-weight: 700; text-anchor: end; }
.line-chart .end-h { fill: var(--gold-deep); }
.line-chart .end-s { fill: var(--accent); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Calculator */
.calc {
  margin: 32px 0; padding: 26px; border-radius: 16px;
  background: linear-gradient(180deg, var(--accent-soft), #fff); border: 1px solid #cfe0dc;
}
.calc-head { margin-bottom: 20px; }
.calc-title { display: block; font-family: "Fraunces", serif; font-weight: 600; font-size: 1.25rem; }
.calc-sub { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }
.calc-row { margin-bottom: 18px; }
.calc-row > label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 10px; }
.calc-input { display: flex; align-items: center; gap: 16px; }
.calc-input output { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold-deep); min-width: 96px; text-align: right; }
.calc input[type="range"] {
  -webkit-appearance: none; appearance: none; flex: 1; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) var(--p, 50%), var(--line) var(--p, 50%));
  cursor: pointer;
}
.calc input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold-deep); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: pointer;
}
.calc input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--gold-deep); border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: pointer; border-color: #fff;
}
.calc-result {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 22px; padding: 18px 22px; background: var(--ink); color: #fff; border-radius: 12px;
}
.calc-result-label { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.8); }
.calc-result-val { font-family: "Fraunces", serif; font-weight: 700; font-size: 1.8rem; color: #f3d27a; font-variant-numeric: tabular-nums; }

/* Counter grid */
.counter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 28px; }
.counter { border: 1px solid var(--line); border-radius: 14px; padding: 22px 18px; background: linear-gradient(180deg, #fffdf7, #fff); }
.counter-num { display: block; font-family: "Fraunces", serif; font-weight: 700; font-size: 2.1rem; color: var(--gold-deep); line-height: 1.05; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.counter-label { font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }
.counter-label em { font-style: normal; color: var(--muted); }

@media (max-width: 760px) {
  .counter-grid { grid-template-columns: 1fr 1fr; }
  .bar-row { grid-template-columns: 116px 1fr auto; gap: 8px; }
  .bar-label { font-size: 11.5px; }
  .bar-val { min-width: 64px; font-size: 12.5px; }
  .bar-src { left: 0; font-size: 11px; white-space: normal; max-width: 90%; }
  .calc-result-val { font-size: 1.4rem; }
  .viz { padding: 18px; }
}

/* Note */
.note {
  margin: 24px 0 8px; padding: 20px 22px; font-size: 14.5px; color: var(--muted);
  background: var(--bg-soft); border-radius: 12px; border: 1px dashed var(--line);
}
.note strong { color: var(--ink-soft); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  padding: 40px 0; margin-top: 20px;
}
.site-footer p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.site-footer .muted { color: var(--muted); margin-top: 4px; }

/* Back to top */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; text-decoration: none;
  background: var(--ink); color: #fff; font-size: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Responsive */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .top-nav { display: none; }
  .compare, .stat-row { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
  .pull { font-size: 1.2rem; padding: 20px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140f; --bg-soft: #1e1b15; --ink: #f3efe6; --ink-soft: #d3cbbd;
    --muted: #9b9385; --line: #322d24; --accent: #6fae9f; --accent-soft: #1d2a27;
    --gold: #d9a830; --gold-deep: #e8bb52;
  }
  .compare-col, .stat, .viz { background: #1c1913; }
  .counter { background: linear-gradient(180deg, #211c12, #1c1913); border-color: #3a3320; }
  .calc { background: linear-gradient(180deg, #142020, #1c1913); border-color: #25342f; }
  .calc-result { background: #0f0d09; }
  .bar-track, .viz-controls, .lang-switch { background: #14110c; }
  .line-chart .cross-dot { fill: #1c1913; stroke: var(--gold); }
  .seg.active, .lang-switch a.active { background: var(--gold-deep); color: #16140f; }
  .bar-src { background: #000; }
  .compare-col.handwerk { background: linear-gradient(180deg, #211c12, #1c1913); border-color: #3a3320; }
  .compare-col.studium { background: linear-gradient(180deg, #142020, #1c1913); border-color: #25342f; }
  .site-header { background: rgba(22,20,15,0.85); }
  .tag { color: #16140f; }
  .to-top { background: var(--gold); color: #16140f; }
}
