/* ============================================================================
   aidos — shared design system  (see STYLEGUIDE.md)
   Modern data-journalism: the credibility of NYT/Economist, the energy of
   The Pudding / Our World in Data / FiveThirtyEight. Data-forward, subtle motion,
   confident Bordeaux accent. Serif only for the big display headline; clean sans
   everywhere else. NO Google colours, NO Material elevation, NO emoji.
   Load AFTER fonts/fonts.css. One stylesheet for every page.
   ============================================================================ */

:root {
  /* — palette (cleaner, cooler than newsprint — reads "analysis", not "broadsheet") — */
  --ink:      #171719;   /* primary text */
  --ink-2:    #43444a;   /* secondary text (AA on paper) */
  --ink-3:    #676972;   /* muted / captions (AA ≥4.5:1 on paper) */
  --paper:    #fcfcfd;   /* page background */
  --surface:  #ffffff;   /* cards, raised areas */
  --fill:     #f3f4f6;   /* subtle fill (bands, zebra, bars track) */
  --rule:     #e6e7eb;   /* hairlines */
  --rule-2:   #d3d5db;   /* stronger rule */
  --accent:   #b31e26;   /* Bordeaux-red — links, key figures, primary series */
  --accent-d: #8c161d;   /* darker accent for hover */
  --accent-w: #fbecec;   /* wash behind active nav / tags */
  --data-blue:#2456a6;   /* the "original / unmanipulated rating" line — pairs with accent (removed) */
  --data-blue-lt:#7fa8e0;/* same, readable on the dark footer */
  --ink-grad: linear-gradient(180deg, #232427, #17181a);

  /* — type — */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* — metrics — */
  --wrap: 1120px;
  --wrap-narrow: 720px;
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --shadow: 0 1px 2px rgba(20,20,30,.04), 0 6px 20px rgba(20,20,30,.05);
  --shadow-h: 0 2px 6px rgba(20,20,30,.06), 0 12px 34px rgba(20,20,30,.09);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16.5px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--accent-d); }

/* — headings: big hero = serif (editorial anchor); the rest = modern sans — */
h1 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; line-height: 1.13; letter-spacing: -0.015em; font-size: clamp(31px, 4.6vw, 50px); }
h2 { font-family: var(--sans); font-weight: 700; color: var(--ink); margin: 0; line-height: 1.2; letter-spacing: -0.02em; font-size: clamp(22px, 2.8vw, 29px); }
h3 { font-family: var(--sans); font-weight: 600; color: var(--ink); margin: 0; line-height: 1.3; font-size: 19px; letter-spacing: -0.01em; }
h4 { font-family: var(--sans); font-weight: 600; color: var(--ink); margin: 0; font-size: 13px; }

/* — masthead — */
.masthead { border-bottom: 1px solid var(--rule); background: rgba(252,252,253,.85); backdrop-filter: saturate(1.4) blur(8px); position: sticky; top: 0; z-index: 30; }
.masthead-inner { max-width: var(--wrap); margin: 0 auto; padding: 13px 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 25px; letter-spacing: 0; color: var(--ink); display: inline-flex; align-items: center; gap: 9px; }
.wordmark:hover { color: var(--ink); }
.wordmark .glyph { width: 24px; height: 24px; }
.wordmark .tld { color: var(--accent); }
.tagline { font-family: var(--sans); font-size: 13px; color: var(--ink-3); margin-right: auto; align-self: center; }
.nav { display: flex; gap: 2px; align-self: center; flex-wrap: wrap; }
.nav a { padding: 7px 12px; font: 500 14px var(--sans); color: var(--ink-2); border-radius: var(--radius-sm); white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease); }
.nav a:hover { color: var(--ink); background: var(--fill); }
.nav a.on { color: var(--accent); background: var(--accent-w); }

/* — layout — */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 32px 24px 64px; }
.wrap.narrow { max-width: var(--wrap-narrow); }
section { padding: 34px 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }

/* — editorial furniture — */
.kicker { font: 600 12px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 13px; }
.deck { font-family: var(--serif); font-size: clamp(18px, 2.2vw, 22px); line-height: 1.5; color: var(--ink-2); margin: 15px 0 0; }
.byline { font: 400 13px var(--sans); color: var(--ink-3); margin-top: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.byline b { color: var(--ink-2); font-weight: 500; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.hint { font: 400 13px var(--sans); color: var(--ink-3); }
.sec-intro { font-size: 16px; color: var(--ink-2); max-width: 70ch; margin: 8px 0 22px; }

/* — the Δ / lead figure (moderate; only for a real Δ value, never giant placeholder text) — */
.lead-figure { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 4.5vw, 52px); line-height: 1.05; color: var(--accent); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lead-figure .unit { font-family: var(--sans); font-size: 15px; color: var(--ink-3); font-weight: 400; margin-left: 10px; letter-spacing: 0; }
/* baseline state (no Δ yet): a calm framed note, not a wall of red */
.baseline-note { border: 1px solid var(--rule); border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.baseline-note .big { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--ink); }
.baseline-note .small { font-size: 14px; color: var(--ink-2); }

/* — stat band — */
.band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 6px 0; }
.stat { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 22px; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.stat:hover { box-shadow: var(--shadow); }
.stat .v { font-family: var(--serif); font-weight: 600; font-size: 42px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .v.accent { color: var(--accent); }
.stat .l { font-size: 14px; color: var(--ink-2); margin-top: 9px; line-height: 1.45; }
.stat .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }

/* — ranking table — */
table.rank { width: 100%; border-collapse: collapse; font-size: 15px; }
table.rank .num { text-align: right; font-variant-numeric: tabular-nums; }
/* coverage box (Datenbasis section) */
.covbox { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: 18px 22px; }
.covbox .asof { margin: 12px 0 0; } .covbox .more { font: 500 13px var(--sans); color: var(--accent); white-space: nowrap; }
table.rank th { text-align: left; font: 600 11.5px var(--sans); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); padding: 0 12px 10px; border-bottom: 2px solid var(--ink); }
table.rank td { padding: 13px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.rank tbody tr { transition: background .12s var(--ease); }
table.rank tbody tr:hover, table.rank tr:hover { background: var(--fill); }
table.rank .num { text-align: right; font-variant-numeric: tabular-nums; }
table.rank a { color: var(--ink); font-weight: 500; }
table.rank a:hover { color: var(--accent); }
.rank-num { font-family: var(--serif); font-weight: 600; color: var(--ink-3); width: 1.6em; font-size: 17px; }

/* — index / score chip (statistical, neutral — always with its n via title) — */
.score { display: inline-flex; align-items: baseline; gap: 3px; font-variant-numeric: tabular-nums; }
.score .val { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--ink); }
.score .of { font-size: 12px; color: var(--ink-3); }
.bar { height: 6px; background: var(--fill); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; width: 0; transition: width 1s var(--ease); }

/* — inline data bar (animated fill). Value sits BESIDE the bar, never over the red
   (WCAG: dark text over a red fill fails contrast). Bar is purely visual. — */
.barwrap { display: flex; align-items: center; gap: 10px; }
.barwrap .dbar { flex: 1; }
.barwrap .barval { flex: 0 0 auto; font: 500 12.5px var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dbar { position: relative; background: var(--fill); height: 10px; border-radius: 5px; overflow: hidden; }
.dbar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); width: 0; border-radius: 5px; transition: width 1s var(--ease); }

/* — cards — border + soft hover lift (modern, restrained) — */
.card { border: 1px solid var(--rule); background: var(--surface); border-radius: var(--radius); padding: 20px 22px; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.card:hover { box-shadow: var(--shadow-h); transform: translateY(-2px); }
.card.static:hover { box-shadow: none; transform: none; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* — tag / pill — */
.tag { display: inline-block; font: 600 11px var(--sans); letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); background: var(--accent-w); padding: 3px 9px; border-radius: 20px; }

/* — buttons — */
.btn { display: inline-block; font: 500 15px var(--sans); padding: 11px 22px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; transition: all .15s var(--ease); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--rule-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* — search / lookup — */
.lookup-box { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--rule-2); background: var(--surface); padding: 12px 16px; border-radius: var(--radius); max-width: 540px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.lookup-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-w); }
.lookup-box svg { fill: var(--ink-3); flex: 0 0 auto; }
.lookup-box input { border: 0; outline: 0; font: 400 16px var(--sans); width: 100%; background: transparent; color: var(--ink); }

/* — provenance / notices — */
.asof { font: 400 12.5px var(--sans); color: var(--ink-3); }
.notice { border-left: 3px solid var(--accent); background: var(--accent-w); padding: 13px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; margin: 18px 0; }
.notice b { color: var(--ink); }

.crumbs { font: 400 13px var(--sans); color: var(--ink-3); margin-bottom: 16px; }
.crumbs a { color: var(--ink-2); }

/* — footer (dark / ink — the look you liked) — */
.site-foot { margin-top: 48px; background: var(--ink); color: #d9dade; }
.site-foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 34px 24px 46px; }
.site-foot .wordmark { color: #fff; margin-bottom: 14px; }
.site-foot .wordmark .tld { color: #e88a8f; } /* light accent — readable on dark */
.site-foot .wordmark .glyph rect:first-child { fill: #fff; }
.foot-nav { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.foot-nav a { font: 500 13.5px var(--sans); color: #d9dade; }
.foot-nav a:hover { color: #fff; }
.foot-legal { font-size: 12.5px; color: #9a9ba3; line-height: 1.6; max-width: 90ch; }
.foot-legal b { color: #d9dade; }
.foot-meta { font-size: 12px; color: #83848c; margin-top: 12px; }

/* — article tiles with auto data-viz covers (no photos → no rights issues) — */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile { border: 1px solid var(--rule); background: var(--surface); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.tile:hover { box-shadow: var(--shadow-h); transform: translateY(-2px); }
.tile .cover { height: 132px; background: linear-gradient(160deg, #201c1d, #17181a); position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 16px; }
.tile .cover .cbars { display: flex; align-items: flex-end; gap: 7px; height: 72px; width: 100%; }
.tile .cover .cbars > i { flex: 1; background: linear-gradient(180deg, #d1434a, var(--accent)); border-radius: 3px 3px 0 0; min-height: 6px; opacity: .92; }
.tile .cover .tag { position: absolute; top: 14px; left: 16px; background: rgba(255,255,255,.14); color: #fff; }
.tile .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile .body h3 { font-size: 17px; }
.tile .body p { font-size: 13.5px; color: var(--ink-2); margin: 0; line-height: 1.5; }
.tile .body .more { margin-top: auto; padding-top: 10px; font: 500 13px var(--sans); color: var(--accent); }
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr; } }

/* — long-form prose — */
.prose { font-size: 18px; line-height: 1.72; color: var(--ink); }
.prose p { margin: 0 0 18px; }
.prose h2 { margin: 36px 0 10px; }
.prose h3 { margin: 26px 0 8px; }
.prose ul { padding-left: 22px; } .prose li { margin: 7px 0; }

/* — static/legal page supplement (ueber-aidos, rechtslage, impressum, daten-melden) — */
.lead { font-family: var(--serif); font-size: clamp(18px, 2.2vw, 21px); line-height: 1.55; color: var(--ink-2); margin: 12px 0 24px; }
.card h2 { font-family: var(--sans); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin: 0 0 12px; }
.card h3 { margin: 0 0 8px; }
.card p { margin: 0 0 12px; } .card p:last-child { margin-bottom: 0; }
.card { margin: 16px 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two .card { margin: 0; }
.pill { display: inline-block; font: 600 11px var(--sans); letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); background: var(--accent-w); padding: 3px 10px; border-radius: 20px; }
.callout { border-left: 3px solid var(--data-blue); background: var(--surface); border: 1px solid var(--rule); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin: 18px 0; }
.steps { counter-reset: step; list-style: none; padding: 0; } .steps li { counter-increment: step; padding: 8px 0 8px 40px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 6px; width: 26px; height: 26px; background: var(--ink); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 600 13px var(--sans); }
.yes { color: #1a7f4b; font-weight: 700; } .no { color: var(--accent); font-weight: 700; }
.scorebox { display: flex; gap: 16px; align-items: center; }
.ring { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 50%; border: 4px solid var(--data-blue); color: var(--data-blue); display: flex; align-items: center; justify-content: center; font: 600 22px var(--serif); }
.note, .disclaimer { font-size: 13px; color: var(--ink-3); line-height: 1.55; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }

/* — line motif (echoes the logo glyph: one ink + one short accent line) — */
.motif { display: block; width: 46px; margin: 14px 0; }
.motif b { display: block; height: 3px; background: var(--data-blue); border-radius: 2px; } /* original rating */
.motif i { display: block; height: 3px; width: 60%; background: var(--accent); border-radius: 2px; margin-top: 4px; } /* removed part */

/* — utilities — */
.mono-num { font-variant-numeric: tabular-nums; }
.accent { color: var(--accent); }
.muted { color: var(--ink-3); }

/* — motion: reveal-on-scroll + count-up land here — */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}

/* — responsive — */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .band, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .masthead-inner { gap: 10px 16px; }
  .tagline { display: none; }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
