/* Feiertage-Übersicht – „Das Kalenderblatt“: Ziffern in Big Shoulders, Text in Commissioner, Feiertage in Kalenderrot,
   Brückentage als gelbe Markierung. Hell und dunkel über Variablen. */
@font-face { font-family: "Big Shoulders"; src: url("/fonts/big-shoulders-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url("/fonts/commissioner-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --grund: #f5f6f8; --papier: #ffffff; --tinte: #1b1d22; --leise: #5c6270; --linie: #e2e4e9; --linie-stark: #c9ccd3;
  --rot: #c8102e; --rot-text: #b00d27; --rot-hell: #fdebed; --gelb: #ffd23f; --gelb-text: #1b1d22; --link: #1f4fbf;
  --accent: #1b1d22; --on-accent: #ffffff; --logo-flame: #e5383b; --auf-rot: #ffffff; --schraffur: rgba(27, 29, 34, .30);
  --anzeige: "Big Shoulders", "Arial Narrow", sans-serif; --text: "Commissioner", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --grund: #121317; --papier: #1b1c22; --tinte: #eceef2; --leise: #a3a9b5; --linie: #2c2f37; --linie-stark: #3d414b;
    --rot: #ff5c6c; --rot-text: #ff8a95; --rot-hell: #3a1b21; --gelb: #e9bd2a; --gelb-text: #16171b; --link: #8fb2ff;
    --accent: #eceef2; --on-accent: #121317; --logo-flame: #ff5c6c; --auf-rot: #16171b; --schraffur: rgba(236, 238, 242, .30); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: clip; }   /* nie seitlich aus der Seite scrollen; breite Inhalte scrollen in ihrem eigenen Rahmen */
body { margin: 0; background: var(--grund); color: var(--tinte); font: 400 1.0625rem/1.62 var(--text); font-variant-numeric: tabular-nums; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--rot); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: 74rem; margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--tinte); color: var(--papier); padding: .6rem 1rem; z-index: 9; }
.skip:focus { left: 1rem; top: .6rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Kopf */
header.site { background: var(--papier); border-bottom: 1px solid var(--linie); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 2rem; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--tinte); text-decoration: none; }
.logo { width: 2.1rem; height: 2.1rem; flex: none; }
.wordmark { font: 800 1.55rem/1 var(--anzeige); letter-spacing: .01em; text-transform: none; }
.wordmark .jahr { color: var(--rot-text); }
nav.main ul { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; list-style: none; margin: 0; padding: 0; }
nav.main a { color: var(--tinte); text-decoration: none; font-weight: 550; padding: .3rem 0; display: inline-block; border-bottom: 2px solid transparent; }
nav.main a[aria-current] { border-bottom-color: var(--rot); }
nav.main a:hover { border-bottom-color: var(--linie-stark); }

/* Text */
main { padding-bottom: 3rem; }
h1, h2, h3, h4 { font-family: var(--anzeige); line-height: 1.05; letter-spacing: .005em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 800; margin: 1.6rem 0 .8rem; }
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 750; margin: 2.8rem 0 .8rem; }
h3 { font-size: 1.45rem; font-weight: 700; margin: 1.6rem 0 .5rem; }
h4 { font-size: 1.2rem; font-weight: 700; margin: 1rem 0 .4rem; }
p, ul, ol { max-width: 68ch; }
.lead { font-size: 1.2rem; line-height: 1.55; }
.klein, .stand { font-size: .92rem; color: var(--leise); }
.stand { margin-top: 3rem; border-top: 1px solid var(--linie); padding-top: 1rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: 1.2rem 0 0; font-size: .9rem; color: var(--leise); }
.breadcrumb li + li::before { content: "›"; margin-right: .3rem; }
.breadcrumb a { color: var(--leise); }

.knopf { display: inline-block; background: var(--tinte); color: var(--papier); font-weight: 650; text-decoration: none; padding: .7rem 1.15rem;
  border-radius: .4rem; border: 2px solid var(--tinte); margin: .2rem .4rem .2rem 0; font-family: inherit; font-size: 1rem; cursor: pointer; }
.knopf:hover { background: transparent; color: var(--tinte); }
.knopf.zweit { background: transparent; color: var(--tinte); }
.knopf.zweit:hover { background: var(--tinte); color: var(--papier); }

/* Startseite: Kalenderblatt als Blickfang */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 3rem; align-items: center; padding: 1.2rem 0 .5rem; }
.hero h1 { margin-top: .2rem; font-size: clamp(3.2rem, 10vw, 6.5rem); line-height: .92; }
.ueber { margin: 1.4rem 0 0; color: var(--leise); font-weight: 550; }
.hero-blatt { text-align: center; }
.hb-titel { margin: 0 0 .6rem; font-size: .95rem; color: var(--leise); font-weight: 550; }
.hb-rest { margin: .7rem 0 0; font-weight: 600; min-height: 1.6em; }
@media (max-width: 46rem) { .hero { grid-template-columns: 1fr; } .hero-blatt { justify-self: start; text-align: left; } }

.blatt { display: inline-grid; grid-template-rows: auto auto auto auto; width: 13.5rem; background: var(--papier); border-radius: .5rem;
  box-shadow: 0 1px 0 var(--linie-stark), 0 10px 0 -6px var(--papier), 0 11px 0 -6px var(--linie-stark), 0 20px 0 -12px var(--papier),
  0 21px 0 -12px var(--linie-stark); position: relative; overflow: hidden; text-align: center; }
.blatt::before { /* Perforation der Abreißkante */
  content: ""; position: absolute; inset: 2.35rem 0 auto; height: 6px;
  background: radial-gradient(circle, var(--grund) 1.6px, transparent 2px) 0 0 / 10px 6px repeat-x; }
.b-monat { background: var(--rot); color: var(--auf-rot); font: 700 1.15rem/1 var(--anzeige); letter-spacing: .06em; padding: .65rem 0 .85rem; }
.b-tag { font: 800 7.5rem/0.95 var(--anzeige); color: var(--rot-text); padding-top: .9rem; }
.b-wt { font-weight: 650; font-size: 1.05rem; }
.b-name { font-size: .95rem; color: var(--leise); padding: .2rem .8rem 1.1rem; }

/* Tabellen */
.table-wrapper { overflow-x: auto; margin: 1rem 0; background: var(--papier); border: 1px solid var(--linie); border-radius: .5rem; }
.table-wrapper:focus-visible { outline-offset: 0; }
table { border-collapse: collapse; width: 100%; font-size: .98rem; }
caption { text-align: left; padding: .8rem 1rem .2rem; color: var(--leise); font-size: .9rem; }
th, td { padding: .6rem 1rem; text-align: left; border-bottom: 1px solid var(--linie); vertical-align: top; }
thead th { font-size: .85rem; color: var(--leise); font-weight: 600; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; }
td.datum { white-space: nowrap; font-weight: 600; }
td.we { color: var(--leise); }
td.we::after { content: " · Wochenende"; font-size: .85rem; }
tr.naechster > * { background: var(--rot-hell); }
tr.naechster > th::before { content: "Nächster: "; color: var(--rot-text); font-weight: 700; }

.matrix th, .matrix td { padding: .45rem .5rem; text-align: center; font-size: .9rem; }
.matrix th:first-child, .matrix tbody th { text-align: left; white-space: nowrap; }
.matrix td.ja { color: var(--rot); font-size: 1.05rem; }
.matrix td.teil { color: var(--rot); font-size: 1.05rem; }
.matrix tr.summe > * { font-weight: 750; border-top: 2px solid var(--linie-stark); }
.matrix abbr { text-decoration: none; }

/* Bundesländer */
.laender { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); gap: .6rem; max-width: none; }
.laender a { display: grid; grid-template-columns: 1fr auto; gap: .1rem .6rem; align-items: baseline; background: var(--papier); border: 1px solid var(--linie);
  border-radius: .5rem; padding: .8rem 1rem; text-decoration: none; color: var(--tinte); }
.laender a:hover { border-color: var(--rot); }
.l-name { font-weight: 650; }
.l-zahl { font: 800 1.9rem/1 var(--anzeige); color: var(--rot-text); grid-row: span 2; text-align: right; }
.l-zahl small { display: block; font: 500 .75rem/1.2 var(--text); color: var(--leise); }
.l-werk { font-size: .85rem; color: var(--leise); }

/* Brückentage */
.bruecken { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: .8rem; margin: 1rem 0; }
.bruecke { background: var(--papier); border: 1px solid var(--linie); border-radius: .5rem; padding: .2rem 1.1rem .9rem; }
.bruecke h3, .bruecke h4 { margin: .8rem 0 .5rem; font-size: 1.3rem; }
.bruecke .am { font: 500 .9rem var(--text); color: var(--leise); white-space: nowrap; }
.bruecke ul { list-style: none; padding: 0; margin: 0; }
.bruecke li { display: grid; padding: .5rem 0; border-top: 1px solid var(--linie); }
.bruecke li:first-child { border-top: 0; }
.bruecke li b { font-weight: 700; }
.bruecke li b::before { content: ""; display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; background: var(--gelb); margin-right: .45rem; }
.bruecke li span { font-size: .93rem; }
.bruecke li .u { color: var(--leise); }
.top li { margin: .35rem 0; }
.sprung ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; max-width: none; }
.sprung a { display: inline-block; padding: .3rem .7rem; border: 1px solid var(--linie-stark); border-radius: 2rem; text-decoration: none; color: var(--tinte); font-size: .92rem; background: var(--papier); }
.sprung a:hover { border-color: var(--rot); }
.bt-land { scroll-margin-top: 1rem; }

/* Jahreskalender */
.jahr-kal { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1rem 1.2rem; margin: 1rem 0; }
.monat { background: var(--papier); border: 1px solid var(--linie); border-radius: .5rem; padding: .3rem .7rem .7rem; break-inside: avoid; }
.monat h3 { margin: .5rem 0 .3rem; font-size: 1.35rem; }
table.roh { font-size: .88rem; }
table.roh th, table.roh td { padding: .22rem 0; text-align: center; border: 0; width: 12.5%; }
table.roh thead th { color: var(--leise); font-size: .75rem; font-weight: 600; }
table.roh .kw { color: var(--leise); font-size: .72rem; font-weight: 500; border-right: 1px solid var(--linie); }
table.roh td.we { color: var(--leise); }
table.roh td.we::after { content: none; }
table.roh td span { display: inline-block; min-width: 1.75em; padding: .1em 0; border-radius: 3px; }
table.roh td.ft span { background: var(--rot); color: var(--auf-rot); font-weight: 700; }
table.roh td.ft-reg span { box-shadow: inset 0 0 0 2px var(--rot); color: var(--rot-text); font-weight: 700; }
table.roh td.bt span { background: var(--gelb); color: var(--gelb-text); font-weight: 650; }
/* Heute (heute.js): vergangene Tage schraffiert, heutiger Tag mit Linie am linken Rand */
table.roh td.vorbei { background-image: repeating-linear-gradient(135deg, var(--schraffur) 0 1.4px, transparent 1.4px 5px); color: var(--leise); }
table.roh td.heute { box-shadow: inset 3px 0 0 var(--rot); font-weight: 800; color: var(--tinte); }
.l-vorbei { background-image: repeating-linear-gradient(135deg, var(--schraffur) 0 1.4px, transparent 1.4px 4.5px);
  box-shadow: inset 0 0 0 1px var(--linie-stark); }
.legende .l-heute { width: 3px; background: var(--rot); border-radius: 1px; }
/* Durchgehender Kalender der Startseite */
.jahr-kal.band { display: flex; gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  padding: .2rem .1rem .8rem; cursor: grab; position: relative; }
.jahr-kal.band.zieht { cursor: grabbing; user-select: none; scroll-snap-type: none; }
.jahr-kal.band .monat { flex: 0 0 15.5rem; scroll-snap-align: start; }
.kal-steuer { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: .8rem 0 .2rem; }
.kal-steuer[hidden] { display: none; }
.kal-steuer label { font-weight: 650; }
.kal-steuer select, .kal-steuer button { font: 600 .95rem var(--text); padding: .45rem .8rem; border-radius: 2rem;
  border: 1px solid var(--linie-stark); background: var(--papier); color: var(--tinte); cursor: pointer; }
.kal-steuer select { border-radius: .4rem; margin-right: .6rem; }
.kal-steuer button:hover, .kal-steuer select:hover { border-color: var(--rot); }
table.naechste td { white-space: normal; }
.jahre a::before { content: none; }
.legende { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; list-style: none; padding: 0; font-size: .9rem; max-width: none; }
.legende span { display: inline-block; width: 1rem; height: 1rem; border-radius: 3px; vertical-align: -.15rem; margin-right: .4rem; }
.l-ft { background: var(--rot); } .l-reg { box-shadow: inset 0 0 0 2px var(--rot); } .l-bt { background: var(--gelb); } .l-we { background: var(--linie); }

.downloads { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; max-width: none; }
.downloads a { display: inline-block; padding: .5rem .9rem; border: 1px solid var(--linie-stark); border-radius: .4rem; background: var(--papier);
  text-decoration: none; color: var(--tinte); font-weight: 550; }
.downloads a::before { content: "↓ "; color: var(--rot-text); font-weight: 800; }
.downloads a:hover { border-color: var(--rot); }

/* Häufige Fragen */
details { background: var(--papier); border: 1px solid var(--linie); border-radius: .5rem; margin: .5rem 0; max-width: 72ch; }
summary { cursor: pointer; padding: .8rem 1rem; font-weight: 650; }
details > :not(summary) { padding: 0 1rem; }
details[open] summary { border-bottom: 1px solid var(--linie); margin-bottom: .2rem; }
.sources li { margin: .4rem 0; }
.note { background: var(--rot-hell); padding: .7rem 1rem; border-radius: .4rem; }

/* Fuß */
footer.site { border-top: 1px solid var(--linie); background: var(--papier); font-size: .92rem; color: var(--leise); }
footer.site .wrap { padding-block: 1.4rem 2rem; }
footer.site ul { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; list-style: none; padding: 0; margin: .6rem 0 0; }
footer.site a { color: var(--leise); }

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  th, td { padding: .5rem .65rem; }
  td.we::after { content: none; }
  .blatt { width: 11.5rem; } .b-tag { font-size: 6rem; }
  nav.main ul { gap: .1rem .9rem; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Druck: Kalender auf einer Seite */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  header.site, footer.site, .breadcrumb, .nicht-drucken, .stand, body.druckbar main h2, body.druckbar main h2 ~ * { display: none !important; }
  body { background: #fff; color: #000; font-size: 9pt; }
  body.druckbar h1 { font-size: 20pt; margin: 0 0 2mm; }
  body.druckbar .lead { font-size: 8pt; margin: 0 0 2mm; max-width: none; }
  .jahr-kal { grid-template-columns: repeat(4, 1fr); gap: 3mm; }
  .monat { border: .3pt solid #999; padding: 1mm 2mm; }
  .monat h3 { font-size: 11pt; margin: 0; }
  table.roh { font-size: 7.5pt; }
  table.roh td.ft span { background: #c8102e !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.roh td.ft-reg span { box-shadow: inset 0 0 0 1.2pt #c8102e; }
  .legende { font-size: 7.5pt; margin: 0 0 2mm; }
  .l-ft, .l-reg, .l-we { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Tooltips für Diagramme (tooltip.js) */
.tip { position: fixed; z-index: 50; max-width: min(18rem, calc(100vw - 16px)); padding: .4rem .65rem; border-radius: .4rem;
  background: var(--tinte); color: var(--papier); font: 600 .86rem/1.35 var(--text); pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22); }
.tip[hidden] { display: none; }
[data-tip] { cursor: pointer; }
rect.tip-aktiv { stroke: var(--tinte); stroke-width: 2.5; }
span.tip-aktiv { outline: 2px solid var(--tinte); outline-offset: 1px; }

/* Überschrift der Tabelle „nächste …“ wiederholt die Zwischenüberschrift: nur für Vorlesehilfen */
table.naechste caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
