:root {
  --bg: #ffffff;
  --panel: #f4f5f7;
  --ink: #1b1d22;
  --muted: #6b7280;
  --line: #d9dce1;
  --grey: #9aa1ab;        /* base colour for charts */
  --accent: #c2410c;      /* single accent (warm) */
  --accent-2: #0369a1;    /* media accent */
  --accent-3: #15803d;    /* attention accent */
  --warn-bg: #fef3c7;
  --warn-ink: #92400e;
  --maxw: 1040px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
a:hover { text-decoration: underline; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }

.site-header { border-bottom: 1px solid var(--line); background: var(--panel); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 10px 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--ink); }
.brand-mark { display: block; border-radius: 6px; }
.site-header nav ul { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 0; padding: 0; }
.site-header nav a { color: var(--ink); text-decoration: none; padding: 4px 2px; }
.site-header nav a[aria-current="page"] { border-bottom: 2px solid var(--accent); }

h1 { font-size: 1.7rem; margin: 1.2rem 0 0.4rem; }
h2 { font-size: 1.25rem; margin: 1.8rem 0 0.6rem; }
.lead { color: var(--muted); font-size: 1.05rem; }
.crumbs { color: var(--muted); font-size: .9rem; margin-top: 1rem; }
section { margin: 1.4rem 0; }

.note {
  background: var(--panel); border: 1px solid var(--line);
  padding: 10px 14px; border-radius: 8px; color: var(--muted);
}

.chart { margin: 0 0 1rem; }
.chart-title { font-weight: 600; margin-bottom: 6px; }
.chart-canvas { width: 100%; height: 340px; }
.grid-2 .chart-canvas { height: 240px; }
.source { color: var(--muted); font-size: .85rem; margin: 4px 0 0; }
.chart-alt { margin-top: 6px; font-size: .9rem; }
.chart-alt summary { cursor: pointer; color: var(--accent-2); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

table { border-collapse: collapse; width: 100%; font-size: .9rem; }
/* A wide table must scroll inside its own box, not push the page sideways.
   The wrapper keeps the table element a real table, so its semantics stay
   intact for screen readers - "display: block" would take that away. */
.table-scroll { overflow-x: auto; }
.chart-alt { overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 4px 8px; text-align: right; }
th[scope="row"], thead th:first-child { text-align: left; }
thead th { background: var(--panel); }

.kpis { display: flex; flex-wrap: wrap; gap: 16px; margin: 1rem 0; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; min-width: 120px; }
.kpi-label { display: block; color: var(--muted); font-size: .8rem; }
.kpi-value { font-size: 1.5rem; font-weight: 700; }
.kpi-note { display: block; color: var(--muted); font-size: .8rem; }

/* Utility classes instead of style attributes: the CSP sets style-src
   'self' without 'unsafe-inline', which blocks inline style attributes
   too and reports each one as a violation. */
.left { text-align: left; }
.inline { display: inline; }

.badge { display: inline-block; background: var(--ink); color: #fff; border-radius: 999px; padding: 1px 10px; font-size: .8rem; }
.badge.muted { background: var(--grey); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.trend.up { color: var(--accent); }
.trend.down { color: var(--accent-3); }
.phase { color: var(--muted); }

ul.movers, ul.masche-list, ul.rank { list-style: none; padding: 0; }
ul.movers li, ul.masche-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.rank li { padding: 4px 0; }

/* Sparkline next to a mover. Inline SVG using currentColor, so it follows
   the text colour in both schemes; the grey keeps it from competing with
   the index number beside it. */
.spark { color: var(--grey); flex: 0 0 auto; vertical-align: middle; }
ul.movers li a:hover ~ .spark, ul.movers li:hover .spark { color: var(--accent); }

.formula { background: var(--panel); border: 1px solid var(--line); padding: 12px; border-radius: 8px; overflow-x: auto; }

.site-footer { border-top: 1px solid var(--line); background: var(--panel); margin-top: 2rem; }
.site-footer .wrap { padding: 16px; color: var(--muted); font-size: .9rem; }

body.embed { background: #fff; }
body.embed main { padding: 10px; }
.embed-credit { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }

/* ---------------------------------------------------------------------------
   Headline band, phase pills, masche cards and explainers.
   Added 2026-10-09: the page was correct but read as a raw report. No dark
   scheme by the owner's decision.
   --------------------------------------------------------------------------- */

:root {
  --phase-rising: #c2410c;     /* steigend  - the accent, this is the alarm */
  --phase-peak: #b45309;       /* Höhepunkt */
  --phase-falling: #0369a1;    /* abklingend */
  --phase-resting: #6b7280;    /* ruhend */
  --radius: 10px;
  --shadow: 0 1px 2px rgba(27, 29, 34, .06), 0 1px 8px rgba(27, 29, 34, .04);
}

/* --- Headline band ------------------------------------------------------- */

.headline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 1.2rem 0 1.6rem;
}
.headline-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.headline-item.lead-item { border-left: 4px solid var(--accent); }
.headline-label { display: block; color: var(--muted); font-size: .8rem; letter-spacing: .01em; }
.headline-value { display: block; font-size: 2rem; line-height: 1.15; font-weight: 700; margin-top: 2px; }
.headline-value.small { font-size: 1.15rem; line-height: 1.3; }
.headline-note { display: block; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.headline-item a { color: inherit; text-decoration: none; }
.headline-item a:hover { text-decoration: underline; }

/* --- Phase pills --------------------------------------------------------- */

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid currentColor;
  background: #fff;
}
.pill-steigend   { color: var(--phase-rising); }
.pill-hoehepunkt { color: var(--phase-peak); }
.pill-abklingend { color: var(--phase-falling); }
.pill-ruhend     { color: var(--phase-resting); }
.pill-unbekannt  { color: var(--grey); }

/* --- Masche cards -------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card:hover { border-color: var(--grey); }
.card-title { font-weight: 600; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-index { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.card-index.none { font-size: 1rem; font-weight: 400; color: var(--muted); }
.card .spark { color: var(--grey); margin-left: auto; }
.card-meta { color: var(--muted); font-size: .85rem; }
.card-channels { display: flex; gap: 6px; flex-wrap: wrap; }
.chan {
  font-size: .72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 6px;
  background: var(--panel);
}

/* --- Explainers ---------------------------------------------------------- */

.explain {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin: 8px 0 0;
  font-size: .92rem;
}
.explain > summary {
  cursor: pointer;
  padding: 8px 14px;
  font-weight: 600;
  color: var(--accent-2);
  list-style-position: inside;
}
.explain[open] > summary { border-bottom: 1px solid var(--line); }
.explain .explain-body { padding: 10px 14px; color: var(--ink); }
.explain .explain-body > :first-child { margin-top: 0; }
.explain .explain-body > :last-child { margin-bottom: 0; }

/* --- Articles ------------------------------------------------------------ */

.article { max-width: 70ch; }
.article h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
.article p { margin: .6rem 0; }
.article ul { margin: .6rem 0; padding-left: 1.3rem; }
.article li { margin: .25rem 0; }
.article .draft {
  border-left: 3px solid var(--warn-ink);
  background: var(--warn-bg);
  color: var(--warn-ink);
  padding: 8px 12px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .88rem;
}

/* --- Charts: roomier ----------------------------------------------------- */

.chart-canvas { height: 380px; }
#overviewHeat { height: 440px; }
/* Horizontal bars need a row per category, and the category labels need
   room on the left - on a phone that room comes out of the bars. */
#mediaRecent, #brandPerMasche { height: 420px; }
@media (max-width: 720px) {
  .chart-canvas { height: 300px; }
  #overviewHeat { height: 380px; }
  #mediaRecent, #brandPerMasche { height: 400px; }
  table { font-size: .82rem; }
  .headline-value { font-size: 1.6rem; }
}

/* --- Steckbrief ---------------------------------------------------------- */

.steckbrief {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

/* Glossary: a definition list that reads like a reference, not a form. */
.glossary { margin: 1.2rem 0; }
.glossary dt { font-weight: 600; margin-top: 1rem; }
.glossary dd { margin: .2rem 0 0; padding-left: 0; color: var(--ink); max-width: 70ch; }
