/* Mobile first. Colours and fonts from the design draft (see projekt.md). */

/* Self-hosted fonts, see /assets/fonts/README.md for source and licence. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-variable.woff2") format("woff2");
}

@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("../fonts/space-grotesk-variable.woff2") format("woff2");
}

:root {
    --color-background: #f4f6fb;
    --color-text: #14213d;
    --color-accent: #1d4ed8;
    --color-accent-2: #c2410c;
    --color-card: #ffffff;
    --color-border: #d9dfec;
    --color-muted: #3b4763;
    --color-on-dark: #ffffff;
    --color-on-dark-muted: #c7d2e8;
    --color-dark-tile: #22335c;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-heading: "Space Grotesk", "Inter", system-ui, sans-serif;
    --focus-ring: 3px solid var(--color-accent-2);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 72.5rem;
    margin: 0 auto;
    padding: 0 1rem;
}

h1,
h2,
h3,
.site-name {
    font-family: var(--font-heading);
}

h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    line-height: 1.2;
    margin: 1.5rem 0 1rem;
}

/* Long German compounds (law titles) are hyphenated by the browser (lang="de") instead of being cut anywhere. */
h1,
h2,
h3,
h4,
.card {
    -webkit-hyphens: auto;
    hyphens: auto;
}

a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

main:focus {
    outline: none;
}

/* Skip link: hidden until focused, then clearly visible. */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -10rem;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 1rem;
    background: var(--color-card);
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
    font-weight: 600;
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    background: var(--color-card);
    border-bottom: 1px solid var(--color-border);
}

.site-name {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 0;
    color: var(--color-text);
    font-size: 1.375rem;
    font-weight: 700;
    text-decoration: none;
}

.site-logo {
    flex: none;
    stroke: var(--color-accent);
}

.site-header .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.site-nav {
    flex: 1 1 auto;
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.75rem;
    border-radius: 10px;
    color: var(--color-text);
    font-weight: 600;
    text-decoration: none;
}

.site-nav a:hover {
    background: var(--color-background);
    text-decoration: underline;
}

/* Shown by contrast.js only; the pressed state is said in words and by the filled look. */
.contrast-toggle {
    min-height: 44px;
    min-width: 44px;
    margin: 0.25rem 0;
    padding: 0.5rem 0.875rem;
    background: var(--color-card);
    color: var(--color-text);
    border: 2px solid var(--color-text);
    border-radius: 22px;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

.contrast-toggle[aria-pressed="true"] {
    background: var(--color-text);
    color: var(--color-card);
}

.contrast-toggle[aria-pressed="true"]::after {
    content: ": an";
    content: ": an" / "";
}

.contrast-toggle[aria-pressed="false"]::after {
    content: ": aus";
    content: ": aus" / "";
}

.contrast-toggle[hidden] {
    display: none;
}

.lead {
    font-size: 1.1875rem;
}

h2 {
    font-size: 1.375rem;
    line-height: 1.3;
    margin: 1.75rem 0 0.75rem;
}

/* Cards: one law procedure each. */
.cards {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.card {
    margin: 0 0 1rem;
    padding: 1rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    overflow-wrap: anywhere;
}

.card h2 {
    margin-top: 0;
    font-size: 1.1875rem;
}

.card h2 a,
.card h4 a {
    display: inline-block;
    min-height: 44px;
    padding: 0.25rem 0;
}

.facts {
    display: grid;
    gap: 0.25rem 1rem;
    margin: 0.75rem 0;
}

.facts div {
    display: grid;
    gap: 0 1rem;
}

.facts dt {
    font-weight: 600;
}

.facts dd {
    margin: 0;
}

/* Status as published in DIP; the colour only repeats the words. */
.status {
    display: inline-block;
    padding: 0.125rem 0.75rem;
    background: #e0e7ff;
    color: #1e3a8a;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
}

.source,
.hint {
    margin: 0.75rem 0 0;
    color: var(--color-muted);
    font-size: 0.9375rem;
}

.source a {
    display: inline-block;
    min-height: 44px;
    padding: 0.5rem 0;
}

.breadcrumb a,
.pagination a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
}

.pagination ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

/* Links to the official agendas: large enough to tap. */
.agenda-links a {
    display: inline-block;
    min-height: 44px;
    padding: 0.5rem 0;
}

/* Debt page: key figures, calculation, data table. */
.debt-figures {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}

.debt-figures div {
    padding: 1rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.debt-figures dt {
    font-weight: 600;
}

.debt-figures dd {
    margin: 0.25rem 0 0;
    font-family: var(--font-heading);
    /* The full amount (e.g. 1.907.079.000.000 Euro) must fit on a 320 px screen without breaking. */
    font-size: clamp(1.25rem, 6.5vw, 2.25rem);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.debt-figures .debt-figures-detail {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.calculation {
    margin: 0.75rem 0;
}

.calculation summary {
    min-height: 44px;
    padding: 0.5rem 0;
    cursor: pointer;
    font-weight: 600;
}

.table-scroll {
    overflow-x: auto;
    margin: 0 0 1rem;
}

.table-scroll:focus-visible {
    outline: var(--focus-ring);
}

table {
    border-collapse: collapse;
    min-width: 34rem;
    width: 100%;
    background: var(--color-card);
}

caption {
    text-align: left;
    font-weight: 600;
    padding: 0 0 0.5rem;
}

th,
td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* The six zeros added to amounts published in millions: smaller, same colour (contrast unchanged). */
.zeros {
    font-size: 0.75em;
}

th:first-child,
thead th:first-child {
    text-align: left;
}

/* Budget laws per year. */
.budget-laws {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.budget-laws li {
    padding: 0.5rem 0 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

/* Composition of the debt: thin segmented bar plus a list with swatch, name, amount and share.
   Palette validated with the dataviz validator (light surface): all checks pass; the third hue has
   2.74:1 against the surface, so every value is also given as text in the list and the table. */
.composition {
    margin: 1rem 0 1.5rem;
}

.composition figcaption {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.composition-bar {
    display: block;
    width: 100%;
    height: 1.5rem;
}

.series-1 {
    fill: #2a78d6;
}

.series-2 {
    fill: #eb6834;
}

.series-3 {
    fill: #1baf7a;
}

.composition-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.composition-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
    padding: 0.25rem 0;
}

.swatch {
    width: 0.75rem;
    height: 0.75rem;
    flex: none;
}

.composition-label {
    font-weight: 600;
}

.composition-value {
    font-variant-numeric: tabular-nums;
}

/* Week overview: summary per chamber. */
.week-summary {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    font-weight: 600;
}

.card h4 {
    font-size: 1.0625rem;
    line-height: 1.35;
    margin: 0 0 0.375rem;
}

/* Bill cost sections: original text with the line layout of the source (tables). */
.drafts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.draft {
    margin: 0 0 1.25rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--color-border);
}

.draft h3 {
    font-size: 1.125rem;
    line-height: 1.35;
    margin: 1rem 0 0.5rem;
}

.draft h4 {
    font-size: 1rem;
    margin: 1rem 0 0.25rem;
}

.original-text {
    margin: 0 0 0.5rem;
    white-space: pre-line;
}

/* AI summary: the notice is text, the border only repeats it. */
.ai-notice {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    background: #fff7ed;
    border-left: 4px solid var(--color-accent-2);
}

.ai-changes {
    margin: 0 0 0.5rem;
    padding-left: 1.25rem;
}

.ai-changes li {
    margin: 0 0 0.5rem;
}

.provision {
    color: var(--color-muted);
}

/* Sources and explanations of the system: closed by default, opened on demand (works without JavaScript). */
.notes {
    margin: 0.5rem 0;
    color: var(--color-muted);
    font-size: 0.875rem;
}

.notes > summary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    cursor: pointer;
    font-weight: 600;
}

.notes .hint,
.notes .source {
    margin: 0 0 0.5rem;
}

/* Subject areas from DIP: neutral labels, all the same colour (no ranking). */
.subject-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0.375rem 0 0;
    padding: 0;
    list-style: none;
}

.subject-areas li {
    padding: 0.125rem 0.625rem;
    background: var(--color-card);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.8125rem;
}

/* Filter by subject area on the law list. */
.area-filter ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.area-filter a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.75rem;
    background: var(--color-card);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.875rem;
    text-decoration: none;
}

.area-filter a:hover {
    text-decoration: underline;
}

.area-filter a[aria-current="page"] {
    background: var(--color-text);
    color: var(--color-card);
    border-color: var(--color-text);
    font-weight: 700;
}

.area-count {
    margin-left: 0.25rem;
    opacity: 0.85;
}

/* Footer links and the operator's address. */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.5rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.footer-links a {
    display: inline-block;
    padding: 0.625rem 0;
    font-weight: 600;
}

.operator {
    margin: 0 0 1rem;
    font-style: normal;
}

.missing {
    padding: 0 0.375rem;
    background: #fff7ed;
    border: 1px dashed var(--color-accent-2);
    font-weight: 600;
}

/* Week tiles: what happened, in everyday words, before the procedural record. */
.outcomes {
    margin: 0.25rem 0 0.5rem;
    padding-left: 1.25rem;
    font-weight: 600;
}

.outcomes li {
    margin: 0 0 0.25rem;
}

.outcome-plain {
    margin: 0 0 0.25rem;
    font-size: 1.0625rem;
    font-weight: 700;
}

.tenor-label {
    color: var(--color-muted);
    font-weight: 400;
}

/* Kind of a change in a bill: a neutral label, the same look for every kind (no colour code). */
.change-kind {
    display: inline-block;
    margin-right: 0.25rem;
    padding: 0 0.5rem;
    background: var(--color-background);
    color: var(--color-text);
    border: 1px solid var(--color-text);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
}

.change-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

/* One-sentence summary in a tile: the first thing to read. */
.teaser {
    margin: 0.5rem 0 0.75rem;
    padding: 0.5rem 0 0.5rem 0.875rem;
    border-left: 4px solid var(--color-accent);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.45;
}

.ai-tag {
    display: inline-block;
    margin-left: 0.25rem;
    color: var(--color-muted);
    font-size: 0.8125rem;
    font-weight: 400;
}

.source-compact {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
}

.source-compact a {
    min-height: 0;
    padding: 0.625rem 0;
}

/* "Auf den Punkt": the AI summary as a box above the long text. */
.on-point {
    margin: 1.25rem 0 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-card);
    border: 2px solid var(--color-accent);
    border-radius: 18px;
}

.on-point h2,
.on-point h3 {
    margin: 0 0 0.75rem;
}

.on-point > p:last-child {
    margin-bottom: 0;
}

.on-point-list {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 0.5rem;
}

.on-point-list dt {
    font-weight: 700;
}

.on-point-list dd {
    margin: 0;
}

/* Audit reports: numbered results and verbatim text of the Bundesrechnungshof. */
.audit-findings {
    display: grid;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.audit-findings li {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.audit-findings a {
    display: inline-block;
    padding: 0.25rem 0;
    font-weight: 600;
}

.audit-number,
.audit-ministry {
    color: var(--color-muted);
    font-size: 0.9375rem;
}

.original-paragraphs {
    max-width: 45rem;
    padding: 0.25rem 0 0.25rem 1rem;
    border-left: 4px solid var(--color-border);
}

.original-paragraphs p {
    margin: 0 0 0.75rem;
}

/* Plenary decisions on the law detail page. Results are text, never colour alone. */
.decisions {
    list-style: none;
    margin: 0;
    padding: 0;
}

.decision {
    margin: 0 0 1.25rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--color-border);
}

.decision h3 {
    font-size: 1.125rem;
    line-height: 1.35;
    margin: 1rem 0 0.5rem;
}

.resolution + .resolution {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--color-border);
}

.tenor {
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.votes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
}

.votes div {
    min-width: 6.5rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.votes dt {
    font-size: 0.875rem;
}

.votes dd {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.notice {
    padding: 1rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
}

.site-footer {
    margin-top: 3rem;
    padding: 2rem 0;
    background: var(--color-card);
    border-top: 1px solid var(--color-border);
    font-size: 0.9375rem;
}

.site-footer h2 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
}

.site-footer p {
    max-width: 45rem;
    margin: 0;
    color: var(--color-muted);
}

.status-done {
    background: var(--color-text);
    color: var(--color-card);
}

/* Start page, after the design draft. */
.home {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    padding: 1.5rem 0 1rem;
}

.home > section > h2,
.section-head h2 {
    margin: 0 0 1rem;
    font-size: 1.75rem;
}

.hero {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: stretch;
}

.hero-text {
    flex: 999 1 28.75rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.125rem, 5vw, 3.5rem);
    line-height: 1.08;
}

.hero-lead {
    margin: 0;
    max-width: 35rem;
    color: var(--color-muted);
    font-size: 1.25rem;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.quick-links a {
    display: inline-flex;
    align-items: center;
    min-height: 3.25rem;
    padding: 0 1.5rem;
    background: var(--color-card);
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
}

.quick-links li:first-child a {
    background: var(--color-accent);
    color: var(--color-card);
}

.quick-links a:hover {
    text-decoration: underline;
}

.debt-box {
    flex: 1 1 23.75rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.75rem;
    background: var(--color-text);
    color: var(--color-on-dark);
    border-radius: 24px;
}

.home .debt-box h2 {
    margin: 0;
    color: var(--color-on-dark-muted);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.debt-box-total {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.375rem, 3.2vw, 2.25rem);
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

/* Numbers are not broken inside; the line may break before the unit. */
.nowrap {
    white-space: nowrap;
}

.debt-box-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
}

.debt-box-tiles div {
    flex: 1 1 8.75rem;
    padding: 0.875rem;
    background: var(--color-dark-tile);
    border-radius: 14px;
}

.debt-box-tiles dt {
    color: var(--color-on-dark-muted);
    font-size: 0.875rem;
}

.debt-box-tiles dd {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.debt-box-note {
    margin: 0;
    color: var(--color-on-dark-muted);
    font-size: 0.875rem;
}

.debt-box-note a {
    display: inline-block;
    padding: 0.625rem 0;
    color: var(--color-on-dark);
    font-weight: 600;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0 1.5rem;
}

.section-head a,
.more-link a {
    display: inline-block;
    padding: 0.625rem 0;
    font-weight: 600;
}

.more-link {
    margin: 0.5rem 0 0;
}

.stat-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stat-tiles li {
    flex: 1 1 6rem;
    display: flex;
    flex-direction: column;
    padding: 0.875rem 1rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 18px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(1.625rem, 6vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    color: var(--color-muted);
}

.law-cards {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.law-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    -webkit-hyphens: auto;
    hyphens: auto;
    overflow-wrap: anywhere;
}

.law-card h3 {
    margin: 0;
    font-size: 1.3125rem;
    line-height: 1.3;
}

.law-card h3 a {
    display: inline-block;
    padding: 0.25rem 0;
}

.law-card p {
    margin: 0;
}

.law-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-muted);
    font-size: 0.9375rem;
}

.law-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9375rem;
}

.law-card-foot a {
    display: inline-block;
    padding: 0.625rem 0;
    font-weight: 600;
}

.ai-chip {
    padding: 0.25rem 0.625rem;
    background: var(--color-background);
    color: var(--color-muted);
    border-radius: 8px;
}

.money {
    padding: 1.75rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 24px;
}

.money p {
    margin: 0 0 1rem;
}

.money-bars {
    display: grid;
    gap: 0.875rem;
    margin: 0 0 0.5rem;
}

.money-bars div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 1rem;
}

.money-bars dt,
.money-bars dd {
    font-weight: 600;
}

.money-bars dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.money-bars .money-bar {
    grid-column: 1 / -1;
}

.money-bar svg {
    display: block;
    width: 100%;
    height: 1rem;
}

.bar-track {
    fill: #e6eaf4;
}

.bar-revenue {
    fill: var(--color-accent);
}

.bar-spending {
    fill: var(--color-accent-2);
}

@media (min-width: 48rem) {
    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .home {
        padding: 2.5rem 0 1rem;
    }

    .card {
        padding: 1.25rem 1.5rem;
    }

    .facts div {
        grid-template-columns: 12rem 1fr;
    }
}

/*
 * High contrast. The same rules twice: by the system setting (unless the visitor switched it off
 * with the button) and by the button. tests/Unit/View/StylesheetTest.php checks that both blocks
 * stay identical.
 */
@media (prefers-contrast: more) {
    :root:not(.contrast-normal) {
        --color-background: #ffffff;
        --color-text: #000000;
        --color-accent: #0b2a8a;
        --color-border: #000000;
        --color-muted: #000000;
    }

    :root:not(.contrast-normal) .status {
        background: #ffffff;
        color: #000000;
        border-color: #000000;
    }

    :root:not(.contrast-normal) .status-done,
    :root:not(.contrast-normal) .quick-links li:first-child a {
        background: #000000;
        color: #ffffff;
    }

    :root:not(.contrast-normal) .money-bar rect,
    :root:not(.contrast-normal) .composition-bar rect {
        stroke: #000000;
        stroke-width: 2;
        vector-effect: non-scaling-stroke;
    }

    :root:not(.contrast-normal) .source,
    :root:not(.contrast-normal) .hint,
    :root:not(.contrast-normal) .provision {
        color: var(--color-text);
    }

    :root:not(.contrast-normal) .ai-notice {
        background: #ffffff;
        border: 2px solid #000000;
    }

    :root:not(.contrast-normal) .swatch rect {
        stroke: #000000;
        stroke-width: 2;
    }
}

@media all {
    :root.contrast-more {
        --color-background: #ffffff;
        --color-text: #000000;
        --color-accent: #0b2a8a;
        --color-border: #000000;
        --color-muted: #000000;
    }

    :root.contrast-more .status {
        background: #ffffff;
        color: #000000;
        border-color: #000000;
    }

    :root.contrast-more .status-done,
    :root.contrast-more .quick-links li:first-child a {
        background: #000000;
        color: #ffffff;
    }

    :root.contrast-more .money-bar rect,
    :root.contrast-more .composition-bar rect {
        stroke: #000000;
        stroke-width: 2;
        vector-effect: non-scaling-stroke;
    }

    :root.contrast-more .source,
    :root.contrast-more .hint,
    :root.contrast-more .provision {
        color: var(--color-text);
    }

    :root.contrast-more .ai-notice {
        background: #ffffff;
        border: 2px solid #000000;
    }

    :root.contrast-more .swatch rect {
        stroke: #000000;
        stroke-width: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
