/* Jahresansicht im FLÖ-Design: violettes Band oben und im kritischen Teil, dazwischen die
   Visualisierungen auf hellem Grund. Farb-Tokens aus style.css, eigene Ergänzungen hier. */
.yv {
  --paper: var(--surface-1);
  --ground: var(--surface-0);
  --ink: var(--text-primary);
  --ink-2: var(--text-secondary);
  --ink-3: var(--text-muted);
  --rule: var(--border);
  --flag: var(--highlight);
  /* Beitragsaufteilung: Hochschulvertretung hell, Bundesvertretung FLÖ-Violett, Versicherung FLÖ-Orange */
  --fee-hv: #d9a9cd; --fee-bv: var(--series-3); --fee-ins: var(--series-5);
  /* Sammelkonto: einfarbige Abstufung in Violett, hell = kleiner Anteil (auf der weißen Karte) */
  --sk-lo: #d9a9cd; --sk-hi: #833572;
  --step--1: 0.875rem; --step-0: 1.0625rem; --step-1: 1.25rem; --step-2: 2rem; --step-3: 2.75rem; --step-4: 3.75rem;

  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 72px;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .yv { --fee-hv: #7d4a72; }
}
:root[data-theme="dark"] .yv { --fee-hv: #7d4a72; }

.yv h1, .yv h2, .yv h3, .yv h4 { line-height: 1.1; text-wrap: balance; margin: 0; font-weight: 800; }
.yv h2 { font-size: var(--step-2); color: var(--accent); letter-spacing: -0.01em; }
.yv h3 { font-size: var(--step-1); }
.yv p { margin: 0; max-width: 68ch; }
.yv .muted { color: var(--ink-2); }
.yv .small { font-size: var(--step--1); }
.yv .num { font-variant-numeric: tabular-nums; }
.yv .sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; transform: translateY(2px); flex: none; }
.yv [hidden] { display: none !important; }
/* Kategoriefarben mit höherer Spezifität als die Button-Rücksetzung */
.yv .c0 { background: var(--series-1); }
.yv .c1 { background: var(--series-2); }
.yv .c2 { background: var(--series-3); }
.yv .c3 { background: var(--series-4); }
.yv .c4 { background: var(--series-5); }
.yv .c5 { background: var(--series-6); }
.yv .c6 { background: var(--series-7); }
.yv .c7 { background: var(--series-8); }
.yv button { font: inherit; padding: 0; border: 0; background: none; color: inherit; border-radius: 0; max-width: none; }

/* Violettes Band über die ganze Fensterbreite, ohne horizontales Scrollen */
.yv .band { color: var(--band-ink); border-image: conic-gradient(var(--band) 0 0) fill 0 // 0 100vmax; }

/* Einstieg */
.yv .hero { display: flex; flex-direction: column; gap: 28px; padding: 52px 0 56px; }
.yv .hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem); line-height: 1.04; letter-spacing: -0.02em; max-width: 20ch; }
.yv .hero-figures { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 0; margin: 0; }
.yv .hero-figures .fig { display: flex; flex-direction: column; gap: 6px; padding: 0 24px; border-left: 1px solid rgba(255, 255, 255, 0.3); }
.yv .hero-figures .fig:first-child { padding-left: 0; border-left: 0; padding-right: 48px; }
.yv .hero-figures dt { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--band-soft); }
.yv .hero-figures dd { margin: 0; font-weight: 800; font-size: var(--step-2); line-height: 1; white-space: nowrap; }
.yv .hero-figures .main dd { font-size: clamp(3rem, 2rem + 4.4vw, 5.25rem); letter-spacing: -0.02em; color: var(--highlight); }
.yv .hero .lead { font-size: 1.1875rem; font-weight: 300; line-height: 1.55; max-width: 62ch; color: inherit; margin: 0; }
.yv .credit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 8px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.22); color: inherit; text-decoration: none; }
.yv .credit span { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--band-soft); }
.yv .credit img { height: 40px; width: auto; display: block; }
.yv .credit:focus-visible { outline: 3px solid var(--highlight); outline-offset: 4px; }

/* Abschnitte ohne Rahmen, getrennt durch Abstand */
.yv .block { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 16px; }
.yv .block-head { display: flex; flex-direction: column; gap: 10px; }
.yv .block-head > p { font-size: var(--step-0); }

/* Umschalter Universität / FH, PH, Privatuni */
.yv .switch { display: inline-flex; align-self: flex-start; flex-wrap: wrap; padding: 4px; gap: 4px; border-radius: 999px; background: var(--grid); }
.yv .switch button { min-height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 0.9375rem; color: var(--ink-2); cursor: pointer; }
.yv .switch button[aria-pressed="true"] { background: var(--accent); color: var(--paper); }
.yv .switch button:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }

/* Woher und 100 Euro: gleiche Proportionen (300 px Grafik, Liste daneben) */
.yv .fee, .yv .hundred { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px 56px; align-items: center; }
.yv .donut { width: 100%; max-width: 300px; aspect-ratio: 1; display: block; }
.yv .donut .center-big { font-weight: 800; font-size: 30px; fill: var(--ink); }
.yv .donut .center-small { font-size: 12px; fill: var(--ink-2); }
.yv .donut .center-inst { font-size: 12px; font-weight: 700; fill: var(--accent); }
.yv .seg-hv { stroke: var(--fee-hv); } .yv .seg-bg-hv { background: var(--fee-hv); }
.yv .seg-bv { stroke: var(--fee-bv); } .yv .seg-bg-bv { background: var(--fee-bv); }
.yv .seg-ins { stroke: var(--fee-ins); } .yv .seg-bg-ins { background: var(--fee-ins); }
.yv .fee-list, .yv .legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.yv .fee-list li, .yv .legend-list li { display: grid; grid-template-columns: 14px 4.8em minmax(0, 1fr); gap: 12px; align-items: baseline; }
.yv .fee-list .amt, .yv .legend-list .eur { font-weight: 800; font-size: var(--step-1); text-align: right; white-space: nowrap; }
.yv .fee-list .txt, .yv .legend-list .what { display: flex; flex-direction: column; gap: 2px; }
.yv .fee-list .txt span, .yv .legend-list .what > span { color: var(--ink-2); font-size: var(--step--1); }
.yv .fee-list li.highlight .amt, .yv .fee-list li.highlight strong { color: var(--accent); }
.yv .fee-flat { display: none; }
.yv .waffle { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; width: 100%; max-width: 300px; }
.yv .waffle span { aspect-ratio: 1; border-radius: 3px; display: block; }

/* Bereiche */
.yv .drill-bar { display: flex; height: 52px; border-radius: 10px; overflow: hidden; gap: 3px; }
.yv .drill-bar button { cursor: pointer; min-width: 6px; color: #fff; font-weight: 800; font-size: 0.9375rem; }
/* helle Bereichsfarben (Teal, Orange, Orchidee) mit dunkler Schrift */
.yv .drill-bar .c0, .yv .drill-bar .c4, .yv .drill-bar .c5 { color: #111111; }
.yv .drill-bar button[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--ink); }
.yv .drill-bar button:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
.yv .drill-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.yv .drill-tabs button { min-height: 40px; font-size: var(--step--1); font-weight: 700; background: var(--grid); border-radius: 999px; padding: 0 14px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.yv .drill-tabs button .sw { transform: none; width: 12px; height: 12px; }
.yv .drill-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.yv .drill-tabs button:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
.yv .detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; border-top: 4px solid var(--rule); padding-top: 20px; }
.yv .detail-c0 { border-top-color: var(--series-1); } .yv .detail-c1 { border-top-color: var(--series-2); }
.yv .detail-c2 { border-top-color: var(--series-3); } .yv .detail-c3 { border-top-color: var(--series-4); }
.yv .detail-c4 { border-top-color: var(--series-5); } .yv .detail-c5 { border-top-color: var(--series-6); }
.yv .detail-intro { display: flex; flex-direction: column; gap: 10px; }
.yv .detail-intro h3 { font-size: 1.5rem; }
.yv .detail-intro .amount { font-weight: 800; font-size: 2.125rem; line-height: 1; color: var(--accent); }
.yv .items { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.yv .items .grp { font-size: 0.9375rem; font-weight: 700; color: var(--ink-2); padding-top: 8px; display: flex; justify-content: space-between; gap: 12px; }
.yv .rank-row { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 6.5em; gap: 12px; align-items: center; }
.yv .rank-row .label { font-size: 0.9375rem; line-height: 1.3; }
.yv .rank-row .bar { height: 14px; border-radius: 0 4px 4px 0; min-width: 2px; }
.yv .rank-row .val { text-align: right; font-size: 0.9375rem; }
.yv .items .rank-row.in-group .label { padding-left: 14px; }
/* Erste Ebene (Gruppen und Posten ohne Gruppe) einheitlich wie Gruppenüberschriften */
.yv .items > .rank-row:not(.in-group) { padding-top: 8px; }
.yv .items > .rank-row:not(.in-group) .label, .yv .items > .rank-row:not(.in-group) .val { font-weight: 700; color: var(--ink-2); }

.yv .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.yv .chips button { min-height: 40px; font-size: var(--step--1); font-weight: 700; background: var(--tile-bg, var(--grid)); border-radius: 999px; padding: 0 14px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.yv .chips button i { color: var(--tile-c); }
.yv .chips button[aria-pressed="true"] { background: var(--tile-ink, var(--accent)); color: var(--paper); }
.yv .chips button[aria-pressed="true"] i { color: inherit; }
.yv .chips button:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
.yv .mosaic { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-flow: dense; gap: 14px; }
.yv .tile { border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; background: var(--tile-bg, var(--grid)); min-width: 0; }
.yv .tile.big { grid-column: span 2; }
.yv .tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.yv .tile .big-ic { font-size: 2rem; color: var(--tile-c); flex: none; }
.yv .tile.big .big-ic { font-size: 2.75rem; }
.yv .tile-head { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.yv .tile .theme { display: block; line-height: 1.3; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tile-ink); }
.yv .tile .t-amount { font-weight: 800; font-size: 1.375rem; line-height: 1.05; }
.yv .tile.big .t-amount { font-size: 1.875rem; }
.yv .tile strong { font-size: 1.0625rem; line-height: 1.25; overflow-wrap: break-word; }
.yv .tile p { font-size: var(--step--1); color: var(--ink-2); }
/* Kacheln führen zur Projektseite */
.yv a.tile-link { color: inherit; text-decoration: none; transition: transform 0.12s, box-shadow 0.12s; }
.yv a.tile-link:hover { box-shadow: 0 0 0 2px var(--tile-c, var(--accent)); }
.yv a.tile-link:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .yv a.tile-link:hover { transform: translateY(-2px); } }

/* Projektseite */
.yv .project-kicker { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 0.875rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--band-soft); }
.yv .project-kicker svg, .yv .project-kicker i { font-size: 1.5rem; color: var(--highlight); }
.yv.project-page .hero h1 { max-width: 22ch; }
.yv .project-ended { margin-left: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #ffffff; letter-spacing: 0.08em; }
.yv .project-body p { font-size: 1.125rem; line-height: 1.65; max-width: 68ch; }
.yv .project-years td.muted { color: var(--ink-2); }
.yv.cmp .trend-opt-plain { cursor: default; }
.yv.cmp .trend-opt-plain:hover { background: none; }

/* Teil 2: kritischer Blick im violetten Band */
.yv .critical { position: relative; display: flex; flex-direction: column; gap: 28px; padding: 64px 0; scroll-margin-top: 0; }
/* Markierung wie beim aktuellen Jahr und geschwungener Pfeil zum „ohne Erklärung“ */
.yv .ranking .rank-row.flag .bar { outline: 3px solid var(--highlight); outline-offset: 3px; }
.yv .critical mark { position: relative; z-index: 3; }
.yv .flow-arrow { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; display: none; }
.yv .flow-arrow.ready { display: block; }
.yv .flow-arrow path { fill: none; stroke: var(--highlight); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .yv .flow-arrow .line { stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); }
  .yv .flow-arrow .head { opacity: 0; }
  .yv .flow-arrow.drawn .line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s cubic-bezier(.45, 0, .2, 1); }
  .yv .flow-arrow.drawn .head { opacity: 1; transition: opacity .25s ease 1s; }
}
.yv .critical h2 { color: inherit; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); line-height: 1.08; }
.yv .critical .block-head > p { font-size: 1.125rem; line-height: 1.6; max-width: 64ch; }
.yv .critical b { color: inherit; }
.yv .kicker { font-size: 0.875rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--highlight); }
.yv .critical mark { background: var(--highlight); color: #fff; padding: 0 10px; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.yv .sammelkonto { display: flex; flex-direction: column; gap: 22px; scroll-margin-top: 16px; }
/* Weiße Karten im Band, auch im dunklen Modus hell, damit die Fraktionslogos lesbar bleiben */
.yv .critical .card {
  --ink: #111111; --ink-2: #4b3a47; --ink-3: #7a6574; --rule: #ead9e5; --grid: #f1e6ee; --paper: #ffffff;
  background: #ffffff; color: #111111; border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px;
}
.yv .critical .card h3 { color: #833572; }
.yv .ranking { display: flex; flex-direction: column; gap: 8px; }
.yv .ranking .rank-row .bar { height: 18px; }

/* Zeilen über alle Jahre ausgerichtet: Balken, Jahr, Exekutive beim Jahresabschluss. Spaltenzahl setzt das Template. */
.yv .sk-chart { display: grid; grid-template-rows: repeat(3, auto); column-gap: 10px; }
.yv .sk-col { display: grid; grid-row: 1 / span 3; grid-template-rows: subgrid; justify-items: center; row-gap: 6px; min-width: 0; }
.yv .sk-col .plot { grid-row: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; width: 100%; height: 200px; }
.yv .sk-col .yr { grid-row: 2; font-size: 0.8125rem; color: var(--ink-3); text-decoration: none; border-top: 1px solid var(--rule); width: 100%; text-align: center; padding-top: 6px; }
.yv .sk-col .pct { font-size: var(--step--1); font-weight: 800; white-space: nowrap; }
.yv .sk-col .bar { --t: 100%; background: color-mix(in oklab, var(--sk-hi) var(--t), var(--sk-lo)); width: 100%; max-width: 60px; border-radius: 6px 6px 0 0; }
.yv .sk-col .bar.offen { background: transparent; border: 2px dashed var(--ink-3); }
.yv .sk-col .bar.current { outline: 3px solid var(--highlight); outline-offset: 3px; }
.yv .sk-col .coalition { grid-row: 3; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
/* Logos mit gleicher Fläche statt gleicher Höhe (aus dem gezeichneten Teil berechnet: Höhe = √(650 px² / Seitenverhältnis)),
   jedes in einem gleich hohen Platz, damit die Zeilen über alle Jahre auf einer Linie liegen */
.yv .sk-col .coalition { --slot: 28px; --k: 1; gap: 4px; }
.yv .sk-col .coalition img { display: block; width: auto; max-width: none; height: calc(var(--h, 16px) * var(--k)); margin: calc((var(--slot) - var(--h, 16px) * var(--k)) / 2) 0; }
.yv .sk-col .coalition img.f-vsstoe { --h: 15.6px; }
.yv .sk-col .coalition img.f-gras { --h: 14px; }
.yv .sk-col .coalition img.f-ag { --h: 18px; }
.yv .sk-col .coalition img.f-floe { --h: 19px; }
.yv .sk-col .coalition img.f-junos { --h: 15.2px; }
.yv .sk-col .coalition img.f-ksvlili { --h: 24.8px; }
.yv .sk-col .coalition img.f-fest { --h: 25.5px; border-radius: 50%; }
.yv .sk-col .coalition .wordmark { height: 16px; line-height: 14px; padding: 0 4px; border: 1.5px solid currentColor; border-radius: 3px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em; color: var(--ink-2); max-width: 100%; overflow: hidden; }
.yv .sk-col .coalition .none { height: 16px; line-height: 16px; color: var(--ink-3); font-size: 0.75rem; }
.yv .sk-legend { opacity: 0.88; max-width: none; }
.yv .sk-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.yv .sk-example table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.yv .sk-example td { padding: 4px 0; border-bottom: 1px solid var(--grid); text-align: left; }
.yv .sk-example td:last-child { text-align: right; }
.yv .sk-example tr.big td { font-weight: 700; }
.yv .sk-example tr.sum td { border-top: 2px solid var(--ink-3); border-bottom: 0; font-weight: 700; }
.yv .critical .note { color: inherit; font-size: inherit; background: rgba(255, 255, 255, 0.12); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.yv .demands { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.yv .demands li { background: rgba(255, 255, 255, 0.12); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.yv .demands .kicker { font-size: 0.8125rem; }

.yv .yv-footer { color: var(--ink-2); font-size: var(--step--1); line-height: 1.6; display: flex; flex-direction: column; gap: 8px; margin-top: -16px; }
.yv .yv-footer .small-heading { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.yv .yv-footer p { max-width: 80ch; }
.yv .yv-footer a { color: var(--accent); font-weight: 700; text-underline-offset: 2px; }

/* Vergleichsseite: Diagramme direkt auf dem Grund, Bedienelemente als Pillen wie auf der Jahresseite */
.yv.cmp .panel-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin: 0; }
/* Abschnitte dürfen schmaler werden als ihr breitester Inhalt (lange Postennamen in der Auswahl, Tabellen) */
.yv .block, .yv.cmp .panel-header > *, .yv.cmp .controls, .yv.cmp .controls label { min-width: 0; max-width: 100%; }
.yv.cmp select { max-width: 100%; width: 100%; }

.yv.cmp .chart { height: 440px; width: 100%; min-width: 0; }
.yv.cmp .controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.yv.cmp .controls label { display: flex; flex-direction: column; gap: 6px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.yv.cmp select { min-height: 44px; padding: 0 40px 0 16px; border: 0; border-radius: 999px; background-color: var(--grid); color: var(--ink); font: 700 0.9375rem var(--font); text-transform: none; letter-spacing: 0; cursor: pointer;
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23833572' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.yv.cmp select:focus-visible, .yv.cmp .primary:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
.yv.cmp .primary { min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--paper); font-weight: 700; cursor: pointer; }
.yv.cmp .primary:hover { filter: brightness(1.1); }
.yv.cmp details summary { font-weight: 700; color: var(--accent); }
.yv.cmp details[open] summary { margin-bottom: 12px; }
.yv.cmp table { font-size: 0.9375rem; }
.yv.cmp th { color: var(--ink-2); font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 2px solid var(--rule); }
.yv.cmp td { border-bottom: 1px solid var(--grid); }
.yv.cmp tr.group td { background: transparent; border-top: 0; padding-top: 18px; color: var(--accent); font-size: 1rem; }
.yv.cmp tr.total td { border-top: 2px solid var(--ink); font-size: 1rem; }
.yv.cmp .swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 8px; vertical-align: -1px; }
.yv.cmp .change-up { color: #b03655; }
.yv.cmp .change-down { color: #05726d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .yv.cmp .change-up { color: #df7390; }
  :root:not([data-theme="light"]) .yv.cmp .change-down { color: #2fb0aa; }
}
:root[data-theme="dark"] .yv.cmp .change-up { color: #df7390; }
:root[data-theme="dark"] .yv.cmp .change-down { color: #2fb0aa; }
.yv.cmp .empty { color: var(--ink-2); }
/* Unsichere Werte (Näherung, unklare Zuordnung): kleines Warndreieck vor dem Betrag, Tabellenzeile leicht gelb;
   auf farbigen Flächen (Kopf, Kacheln) in deren Schriftfarbe */
.yv .uncertain { color: var(--uncertain-ink); margin-right: 0.3em; font-size: 0.8em; cursor: help; }
.yv .hero .uncertain, .yv .tile .uncertain { color: inherit; opacity: 0.85; }
.yv .project-years tr.is-uncertain td { background: var(--uncertain-bg); }
/* In der Tabelle ohne eigene Breite links neben dem Betrag, damit die Beträge bündig bleiben */
.yv .project-years td.unsure { color: var(--uncertain-ink); }
.yv .project-years td .uncertain { position: absolute; transform: translateX(calc(-100% - 0.3em)); margin-right: 0; font-size: inherit; line-height: inherit; }
/* Platz links in den Betragsspalten, damit das Dreieck nicht an die Spalte davor stößt */
.yv .project-years th.num, .yv .project-years td.num { padding-left: 2em; }
.yv .project-years td .uncertain svg { font-size: 0.8em; vertical-align: -0.05em; }
.yv.cmp #diff-result[aria-busy="true"] { opacity: 0.55; transition: opacity 0.15s; }
/* Verlauf: gewählte Reihen als Chips (zugleich Legende) und Menü zum Hinzufügen */
.yv .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.yv.cmp .trend-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.yv.cmp .trend-chips { display: contents; list-style: none; margin: 0; padding: 0; }
.yv.cmp .trend-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--grid); font-weight: 700; font-size: 0.875rem; }
.yv.cmp .trend-chip svg { width: 28px; height: 10px; flex: none; }
.yv.cmp .trend-remove { width: 30px; height: 30px; border-radius: 50%; font-size: 1.125rem; line-height: 1; color: var(--ink-2); cursor: pointer; display: inline-grid; place-items: center; }
.yv.cmp .trend-remove:hover { background: var(--rule); color: var(--ink); }
.yv.cmp .trend-remove:focus-visible { outline: 3px solid var(--highlight); outline-offset: 1px; }
.yv.cmp .trend-controls { position: relative; }
.yv.cmp .trend-view { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.yv.cmp .trend-view .switch { align-self: auto; }
.yv.cmp .trend-view-note { margin: 0; max-width: 60ch; }
.yv.cmp .trend-range { display: flex; align-items: center; gap: 8px; }
.yv.cmp .trend-range label { display: flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 700; color: var(--ink-2); }
.yv.cmp .trend-range select { width: auto; min-height: 40px; padding: 0 34px 0 14px; background-position: right 12px center; }
.yv.cmp .trend-view-note { flex-basis: 100%; }
/* Menü „Darstellung“: drei gleich gestaltete Umschalter */
.yv.cmp .trend-settings { position: relative; }
.yv.cmp .trend-settings-open { min-height: 40px; padding: 0 36px 0 16px; border-radius: 999px; background-color: var(--grid); color: var(--ink-2); font-weight: 700; font-size: 0.9375rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23833572' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.yv.cmp .trend-settings-open span { color: var(--ink); }
.yv.cmp .trend-settings-open[aria-expanded="true"] { background-color: var(--accent); color: var(--paper); background-image: none; padding-right: 16px; }
.yv.cmp .trend-settings-open[aria-expanded="true"] span { color: inherit; }
.yv.cmp .trend-settings-open:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
.yv.cmp .trend-settings-panel { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); }
.yv.cmp .trend-settings-panel[hidden] { display: none; }
.yv.cmp .setting { display: flex; flex-direction: column; gap: 6px; }
.yv.cmp .setting-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.yv.cmp .setting .switch { align-self: flex-start; flex-wrap: nowrap; }
.yv.cmp .setting .switch button { white-space: nowrap; }
.yv.cmp .trend-add { position: static; }
.yv.cmp .trend-open { min-height: 40px; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); font-weight: 700; font-size: 0.9375rem; cursor: pointer; }
.yv.cmp .trend-open[aria-expanded="true"] { background: var(--accent); color: var(--paper); }
.yv.cmp .trend-open:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
/* Auswahlfeld: bleibt offen, Mehrfachauswahl per Kästchen */
.yv.cmp .trend-panel { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: min(420px, calc(100vw - 32px)); max-height: min(70vh, 560px); display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); overflow: hidden; }
.yv.cmp .trend-panel[hidden] { display: none; }
.yv.cmp .trend-panel-head { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid var(--rule); }
.yv.cmp .trend-search { flex: 1; min-width: 0; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--grid); color: var(--ink); font: inherit; font-size: 0.9375rem; }
.yv.cmp .trend-search:focus-visible { outline: 2px solid var(--accent); }
.yv.cmp .trend-done { min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--accent); color: var(--paper); font-weight: 700; cursor: pointer; }
.yv.cmp .trend-limit { margin: 0; padding: 8px 14px; background: var(--grid); color: var(--ink-2); }
.yv.cmp .trend-options { overflow-y: auto; padding: 6px 6px 10px; overscroll-behavior: contain; }
.yv.cmp .trend-group { border: 0; margin: 6px 0 0; padding: 0; }
.yv.cmp .trend-group legend { padding: 0; width: 100%; }
.yv.cmp .trend-opt { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 4px 10px; border-radius: 8px; cursor: pointer; font-size: 0.9375rem; line-height: 1.3; }
.yv.cmp .trend-opt:hover { background: var(--grid); }
.yv.cmp .trend-opt[hidden] { display: none; }
.yv.cmp .trend-opt input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--accent); cursor: pointer; }
.yv.cmp .trend-opt input:disabled + span { opacity: 0.45; }
.yv.cmp .trend-opt-total, .yv.cmp .trend-opt-cat { font-weight: 800; }
/* Kopf je Bereich: Kästchen = eine Linie für den Bereich, Knopf = alle Posten einzeln */
.yv.cmp .trend-group legend { display: flex; align-items: center; gap: 8px; position: sticky; top: -6px; background: var(--paper); z-index: 1; padding-right: 6px; }
.yv.cmp .trend-opt-cat { flex: 1; min-width: 0; }
.yv.cmp .trend-opt-cat .swatch { margin: 0; }
.yv.cmp .trend-all { flex: none; min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--grid); color: var(--ink-2); font-size: 0.8125rem; font-weight: 700; cursor: pointer; }
.yv.cmp .trend-all:hover { color: var(--ink); }
.yv.cmp .trend-all.partial { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.yv.cmp .trend-all[aria-pressed="true"] { background: var(--accent); color: var(--paper); }
.yv.cmp .trend-all:disabled { opacity: 0.45; cursor: not-allowed; }
.yv.cmp .trend-all:focus-visible { outline: 3px solid var(--highlight); outline-offset: 1px; }
.yv.cmp .trend-clear { min-height: 40px; padding: 0 14px; border-radius: 999px; color: var(--ink-2); font-weight: 700; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.yv.cmp .trend-clear:hover { color: var(--ink); }
.yv.cmp .trend-clear:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
.yv.cmp .trend-group > .trend-opt { padding-left: 38px; }
.yv.cmp .amt-short { display: none; }

/* Große Anzeigezahlen mit proportionalen Ziffern, sonst wirkt eine führende 1 eingerückt */
.yv .hero-figures dd.num, .yv .detail-intro .amount, .yv .tile .t-amount { font-variant-numeric: proportional-nums; }

@media (max-width: 680px) {
  .yv { gap: 56px; }
  .yv .hero-figures .fig:first-child { flex-basis: 100%; padding-right: 0; }
  .yv .hero-figures .fig:nth-child(2) { padding-left: 0; border-left: 0; }
  .yv .fee, .yv .hundred, .yv .detail { grid-template-columns: minmax(0, 1fr); }
  .yv .donut { max-width: 240px; margin: 0 auto; }
  .yv .waffle { margin: 0 auto; }

  /* Beitrag: flacher Balken statt Donut */
  .yv .fee { gap: 20px; }
  .yv .fee .donut { display: none; }
  .yv .fee-flat { display: flex; flex-direction: column; gap: 8px; }
  .yv .fee-flat-cap { font-size: 0.9375rem; color: var(--ink-2); }
  .yv .fee-flat-cap b { color: var(--ink); font-size: 1.125rem; }
  .yv .fee-bar { display: flex; gap: 3px; height: 40px; border-radius: 8px; overflow: hidden; }
  .yv .fee-bar span { min-width: 4px; }

  /* Listen kompakt: Farbfeld, Betrag und Bezeichnung in einer Zeile, Erklärung darunter */
  .yv .fee-list, .yv .legend-list { gap: 12px; }
  .yv .fee-list li, .yv .legend-list li { grid-template-columns: 12px 3.6em minmax(0, 1fr); column-gap: 8px; row-gap: 1px; align-items: baseline; }
  .yv .legend-list li { grid-template-columns: 12px 2.4em minmax(0, 1fr); }
  .yv .fee-list .sw, .yv .legend-list .sw { width: 12px; height: 12px; transform: none; align-self: center; }
  .yv .fee-list .amt, .yv .legend-list .eur { font-size: 1rem; text-align: right; }
  .yv .fee-list .txt, .yv .legend-list .what { display: contents; }
  .yv .fee-list .txt strong, .yv .legend-list .what strong { grid-column: 3; font-size: 1rem; line-height: 1.3; }
  .yv .fee-list .txt span, .yv .legend-list .what > span { grid-column: 3; font-size: 0.8125rem; line-height: 1.4; }

  /* Balkenlisten: Bezeichnung und Betrag in einer Zeile, Balken direkt darunter, Abstand zwischen den Einträgen */
  .yv .rank-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 5px; }
  .yv .rank-row .bar { grid-column: 1 / -1; grid-row: 2; height: 8px; }
  .yv .items { gap: 12px; }
  .yv .items > .rank-row:not(.in-group), .yv .items .grp { padding-top: 6px; }
  .yv .items .rank-row.in-group .bar { margin-left: 14px; }
  .yv .ranking { gap: 14px; }
  .yv .ranking .rank-row .bar { height: 10px; }

  .yv .drill-bar button { font-size: 0; }

  /* Themenfilter umbrechend, mit kompakteren Knöpfen */
  .yv .chips { gap: 6px; }
  .yv .chips button { min-height: 36px; padding: 0 12px; gap: 6px; font-size: 0.8125rem; }

  /* Angebote zweispaltig, große Beträge über die ganze Breite */
  .yv .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .yv .tile { padding: 14px; gap: 4px; }
  .yv .tile.big { grid-column: span 2; }
  .yv .tile .theme { font-size: 0.625rem; letter-spacing: 0.06em; }
  .yv .tile .t-amount { font-size: 1.125rem; }
  .yv .tile.big .t-amount { font-size: 1.625rem; }
  .yv .tile .big-ic { font-size: 1.375rem; }
  .yv .tile.big .big-ic { font-size: 2.25rem; }
  .yv .tile { padding: 12px; }
  .yv .tile strong { font-size: 0.875rem; hyphens: auto; -webkit-hyphens: auto; }
  .yv .tile.big { padding: 16px; }
  .yv .tile.big strong { font-size: 1rem; }
  .yv .tile p { font-size: 0.8125rem; hyphens: auto; }

  .yv.cmp .chart { height: 360px; }
  /* Projektseite: je Jahr zwei Zeilen (Jahr und Budgetzeile, darunter Soll, Ist, Abweichung) */
  .yv .project-years, .yv .project-years tbody { display: block; }
  .yv .project-years thead { display: none; }
  .yv .project-years tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 8px; row-gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--grid); }
  .yv .project-years td { padding: 0; border: 0; font-size: 0.875rem; }
  .yv .project-years td:nth-child(1) { grid-column: 1; font-weight: 700; }
  .yv .project-years td:nth-child(2) { grid-column: 2 / -1; text-align: right; font-size: 0.8125rem; }
  .yv .project-years td.num { text-align: left; padding-left: 0; }
  /* Gelb auf der ganzen Zeile statt je Zelle (Lücken im Raster), etwas eingerückt */
  .yv .project-years tr.is-uncertain { background: var(--uncertain-bg); margin: 0 -8px; padding: 10px 8px; }
  .yv .project-years tr.is-uncertain td { background: none; }
  /* Linksbündig: Dreieck im Textfluss vor dem Betrag */
  .yv .project-years td .uncertain { position: static; transform: none; margin-right: 0.3em; }
  .yv .project-years td.num::before { display: block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
  .yv .project-years td:nth-child(3)::before { content: "Soll"; }
  .yv .project-years td:nth-child(4)::before { content: "Ist"; }
  .yv .project-years td:nth-child(5)::before { content: "Abweichung"; }
  .yv.cmp .trend-add { flex: 1 1 100%; }
  .yv.cmp .trend-open { width: 100%; }
  .yv.cmp .trend-settings-panel { position: fixed; inset: auto 8px 8px 8px; top: auto; }
  .yv.cmp .setting .switch { align-self: stretch; }
  .yv.cmp .setting .switch button { flex: 1; padding: 0 8px; }
  .yv.cmp .trend-panel { position: fixed; inset: auto 8px 8px 8px; top: auto; width: auto; max-height: 75vh; }
  .yv.cmp .trend-chip { font-size: 0.8125rem; min-height: 36px; padding-left: 12px; }
  .yv.cmp .trend-chip span { line-height: 1.25; padding: 6px 0; }
  /* Gegenüberstellung: je Posten zwei Zeilen (Name, darunter beide Jahre und Veränderung);
     die Differenz in Euro entfällt, die Veränderung in Prozent bleibt */
  .yv.cmp .col-diff { display: none; }
  .yv.cmp .diff-table th .amt-full { display: none; }
  .yv.cmp .diff-table th .amt-short { display: inline; }
  .yv.cmp .diff-table abbr { text-decoration: none; }
  .yv.cmp .diff-table, .yv.cmp .diff-table thead, .yv.cmp .diff-table tbody { display: block; }
  .yv.cmp .diff-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 4.5em; column-gap: 10px; row-gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--grid); }
  .yv.cmp .diff-table th, .yv.cmp .diff-table td { padding: 0; border: 0; }
  .yv.cmp .diff-table td:first-child { grid-column: 1 / -1; }
  .yv.cmp .diff-table thead th:first-child { display: none; }
  .yv.cmp .diff-table thead tr { border-bottom: 2px solid var(--rule); }
  .yv.cmp .diff-table td.indent { padding-left: 0; color: var(--ink-2); }
  .yv.cmp .diff-table tr.group { padding-top: 18px; border-bottom: 1px solid var(--rule); }
  .yv.cmp .diff-table tr.total { border-top: 2px solid var(--ink); border-bottom: 0; }
  .yv.cmp .diff-table tr.total td { border: 0; }
  .yv.cmp .diff-table .change-up::before, .yv.cmp .diff-table .change-down::before { content: none; }
  .yv .critical { padding: 48px 0; }
  .yv .critical .card { padding: 18px 16px; }

  /* Sammelkonto: ein waagrechter Balken je Jahr, Logos darunter in lesbarer Größe */
  .yv .sk-chart { display: flex; flex-direction: column; gap: 14px; }
  .yv .sk-col { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 6px; align-items: center; justify-items: stretch; }
  .yv .sk-col .yr { grid-column: 1; grid-row: 1; align-self: center; border-top: 0; padding: 0; text-align: left; font-size: 0.8125rem; line-height: 18px; }
  .yv .sk-col .yr .century { display: none; }
  .yv .sk-col .plot { grid-column: 2; grid-row: 1; flex-direction: row; justify-content: flex-start; align-items: center; height: auto; gap: 8px; }
  .yv .sk-col .pct { order: 2; font-size: 0.8125rem; }
  .yv .sk-col .bar { height: 18px !important; width: calc(var(--t) * 0.78); max-width: none; flex: none; border-radius: 0 6px 6px 0; }
  .yv .sk-col .bar.current { outline-offset: 2px; }
  .yv .sk-col .coalition { grid-column: 2; grid-row: 2; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 0 12px; }
  .yv .sk-col .coalition { --slot: 24px; --k: 0.85; align-items: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .yv .drill-bar button:hover { filter: brightness(1.08); }
}
