/*
  Ferienradar – Papier (Programmheft, Teilnehmerliste, AV-Vertrag)
  Handgeschriebenes CSS, kein Build-Schritt. Gilt nur für booking/templates/print/**.

  Regeln: wird schwarz-weiß kopiert. Keine Flächen, keine Farbe, keine Icons.
  Hierarchie nur über Schriftgrad, Schnitt, Abstand und schwarze Haarlinien (≥ 0.5pt).
  Seitenformat und Kopf-/Fußzeilen (@page) stehen im jeweiligen Template,
  weil sie Mandantentexte enthalten.
*/

:root {
  --serif: "Charter", "Bitstream Charter", "Iowan Old Style", Cambria, "Sitka Text", Georgia, serif;
  /* Cambria vor Sitka: Sitka ist eine variable Schrift und landet im PDF als Type3 (Text nicht kopierbar). */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --ink: #000;
  --ink-2: #444;          /* Sekundärtext: bleibt beim Kopieren lesbar */
  --rule: 0.5pt solid #000;
  --rule-strong: 1pt solid #000;
  --paper-bg: #e7e6e2;    /* nur Bildschirm */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: var(--serif);
  font-size: 10.5pt;
  line-height: 1.45;
  font-kerning: normal;
  font-variant-numeric: lining-nums;
  hyphenate-limit-chars: 7 3 3;  /* keine Trennung kurzer Wörter und Abkürzungen (DSGVO) */
  -webkit-print-color-adjust: economy;
  print-color-adjust: economy;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3, h4 { font-weight: 700; text-wrap: balance; }
p, li, dd { text-wrap: pretty; orphans: 3; widows: 3; }
a { color: inherit; text-decoration: none; }
strong, b { font-weight: 700; }
table { border-collapse: collapse; }
thead { display: table-header-group; }
tfoot { display: table-footer-group; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- Bildschirm */

.toolbar {
  position: sticky; top: 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--paper-bg);
  font: 500 14px/1.2 var(--sans);
}
.toolbar a, .toolbar button {
  appearance: none; border: 1px solid #000; background: #fff; color: #000;
  font: inherit; padding: 7px 14px; border-radius: 4px; cursor: pointer;
}
.toolbar button { background: #000; color: #fff; }
.toolbar a:focus-visible, .toolbar button:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.toolbar__hint { color: #555; font-weight: 400; font-size: 13px; }

@media screen {
  html { background: var(--paper-bg); }
  body { background: var(--paper-bg); }
  .sheet {
    width: 210mm; max-width: calc(100% - 32px); min-height: 297mm;
    margin: 8px auto 48px; padding: 18mm 18mm 22mm;
    background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .18);
  }
  .doc--list .sheet { padding: 13mm 12mm 16mm; }
  .doc--contract .sheet { padding: 22mm 24mm 24mm; }
  .page-break { border-top: 1px dashed #999; margin: 18mm -24mm 18mm; }
}
@media screen and (max-width: 700px) {
  .sheet { padding: 20px 16px; }
  .doc--list .sheet, .doc--contract .sheet { padding: 20px 16px; }
  .doc--list .sheet { overflow-x: auto; }
  .doc--contract .sheet { overflow-wrap: break-word; hyphens: auto; }
  .page-break { margin-inline: -16px; }
  .toolbar__hint { display: none; }
}

@media print {
  html, body { background: #fff; }
  .toolbar, .screen-only { display: none !important; }
  .sheet { width: auto; margin: 0; padding: 0; box-shadow: none; }
  .page-break { break-before: page; height: 0; border: 0; margin: 0; }
}

/* ============================================================ Programmheft */
/*
  Für Schulranzen und Mitteilungsblatt: freundlich, aber gesetzt.
  Poppins (lokal) für Überschriften, Zeiten und Altersmarken; Serif für Fließtext.
  --accent (Gemeindefarbe) nur für Formen, Linien und Zeiten – nie informationstragend;
  --accent-ink ist die für Text abgedunkelte Variante (Kontrast ≥ 4,5:1).
  Farbe nur über color/border/SVG – kein background, damit nichts von „Hintergrundgrafiken“ abhängt.
*/
@font-face { font-display: swap; font-family: "Poppins"; font-weight: 400; src: url("../fonts/poppins-v24-latin-regular.woff2") format("woff2"); }
@font-face { font-display: swap; font-family: "Poppins"; font-weight: 500; src: url("../fonts/poppins-v24-latin-500.woff2") format("woff2"); }
@font-face { font-display: swap; font-family: "Poppins"; font-weight: 600; src: url("../fonts/poppins-v24-latin-600.woff2") format("woff2"); }
@font-face { font-display: swap; font-family: "Poppins"; font-weight: 700; src: url("../fonts/poppins-v24-latin-700.woff2") format("woff2"); }

.doc--programme {
  --round: "Poppins", var(--sans);
  --accent: #0071e3; --accent-ink: #0071e3;
  font-size: 10.5pt; line-height: 1.45;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.doc--programme .shape { color: var(--accent); }

/* Titelbereich */
.cover { position: relative; padding-right: 40mm; }
.cover__sun { position: absolute; top: -6mm; right: -4mm; width: 40mm; height: 40mm; }
.cover__org { display: flex; align-items: center; gap: 4mm; min-height: 14mm; }
.cover__logo { display: block; max-height: 20mm; max-width: 30mm; width: auto; height: auto; object-fit: contain; }
.cover__orgname { font-family: var(--round); font-size: 11pt; font-weight: 600; line-height: 1.25; }
.cover__title {
  margin-top: 5mm; font-family: var(--round); font-weight: 700;
  font-size: 29pt; line-height: 1.08; letter-spacing: -.015em;
}
.cover__period { margin-top: 2.5mm; font-family: var(--round); font-size: 12pt; font-weight: 500; }
.cover__period .count { color: var(--accent-ink); font-weight: 600; }
.cover__intro { margin-top: 5mm; max-width: 128mm; font-size: 11pt; line-height: 1.5; white-space: pre-line; }
.cover__waves { display: block; width: calc(100% + 40mm); height: 6mm; margin-top: 5mm; }

/* Anmeldung */
.prog-book {
  display: grid; grid-template-columns: 1fr auto; gap: 8mm; align-items: center;
  padding: 4.5mm 0 5mm; border-bottom: 0.75pt solid #000;
}
.prog-book h2 { font-family: var(--round); font-size: 13pt; font-weight: 700; line-height: 1.2; }
.prog-book .url { margin-top: 1mm; font-family: var(--round); font-weight: 600; font-size: 11pt; color: var(--accent-ink); word-break: break-all; }
.prog-book p { margin-top: 1.5mm; max-width: 120mm; font-size: 10pt; }
.prog-qr { display: flex; flex-direction: column; align-items: center; }
.prog-qr svg { display: block; width: 28mm; height: 28mm; shape-rendering: crispEdges; }
.prog-qr figcaption { margin-top: 1mm; font-family: var(--round); font-size: 7.5pt; font-weight: 500; white-space: nowrap; }

/* Tage */
.prog-day { margin-top: 5.5mm; }
.prog-day__title {
  display: flex; align-items: center; gap: 2.6mm;
  font-family: var(--round); font-size: 12.5pt; font-weight: 700; line-height: 1.2;
  padding-bottom: 1.6mm; border-bottom: 1.6pt solid var(--accent);
  break-after: avoid; page-break-after: avoid;
}
.prog-day__title::before {
  content: ""; flex: none; width: 0; height: 0; border-radius: 50%;
  border: 1.8mm solid var(--accent);
}
.prog-day__title .date { font-weight: 500; }

/* Veranstaltung */
.prog-event {
  display: grid; grid-template-columns: 21mm 1fr 17mm; column-gap: 4.5mm;
  padding: 3.2mm 0 3.4mm;
  border-bottom: 0.75pt dotted #000;
  break-inside: avoid; page-break-inside: avoid;
}
.prog-event:last-child { border-bottom: 0; }
.prog-event__time {
  font-family: var(--round); font-size: 12pt; font-weight: 600; line-height: 1.2; color: var(--accent-ink);
  font-variant-numeric: tabular-nums lining-nums;
}
.prog-event__time .until { display: block; margin-top: .6mm; font-size: 8.5pt; font-weight: 400; color: #000; }
.prog-event__title { font-family: var(--round); font-size: 12.5pt; line-height: 1.22; font-weight: 600; }
.prog-event__facts { margin-top: 1mm; font-family: var(--sans); font-size: 9pt; line-height: 1.4; }
.prog-event__facts span + span::before { content: " · "; padding: 0 .1em; font-weight: 400; }
.prog-event__facts .price { font-weight: 700; }
.prog-event__text { margin-top: 1.4mm; max-width: 128mm; hyphens: auto; }
.prog-event__meta { margin-top: 1.2mm; font-family: var(--sans); font-size: 8.4pt; line-height: 1.4; color: var(--ink-2); }
.prog-event__meta p { display: inline; }
.prog-event__meta .rich p + p::before { content: " · "; }

/* Altersmarke: Kreis mit Rand in Akzentfarbe, Zahl in Schwarz */
.age {
  justify-self: end; align-self: start;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 16mm; height: 16mm; border-radius: 50%; border: 1.2pt solid var(--accent);
  font-family: var(--round); text-align: center; line-height: 1;
}
.age b { font-size: 11.5pt; font-weight: 700; letter-spacing: -.02em; }
.age small { margin-top: .8mm; font-size: 6.6pt; font-weight: 500; }
.age.is-long b { font-size: 9pt; }

/* Quill-Inhalt lesbar halten (nur p, br, strong, em, u, a, ul, ol, li, span erlaubt) */
.rich p + p { margin-top: .45em; }
.rich ul, .rich ol { padding-left: 1.2em; margin: .3em 0; }
.rich li + li { margin-top: .1em; }
.rich a { text-decoration: underline; text-decoration-thickness: .5pt; text-underline-offset: 1.5pt; }
.rich p:empty { display: none; }

.prog-empty { margin-top: 10mm; font-style: italic; }

/* ========================================================== Teilnehmerliste */

.doc--list { font-family: var(--sans); font-size: 9pt; line-height: 1.3; }

.list-head {
  display: grid; grid-template-columns: 1fr auto; gap: 10mm; align-items: end;
  padding-bottom: 3mm; border-bottom: var(--rule-strong);
}
.list-head__kicker { font-size: 8.5pt; }
.list-head__title { margin-top: 1mm; font-size: 17pt; line-height: 1.12; letter-spacing: -.01em; }
.list-head__when { margin-top: 1mm; font-size: 10.5pt; font-weight: 600; }
.list-tally { display: flex; gap: 7mm; text-align: right; }
.list-tally div { min-width: 16mm; }
.list-tally dt { font-size: 7.5pt; }
.list-tally dd { font-size: 17pt; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.list-tally dd small { font-size: 9pt; font-weight: 400; }

.list-facts {
  display: flex; flex-wrap: wrap; column-gap: 8mm; row-gap: .8mm;
  padding: 2.4mm 0 0; font-size: 8.5pt;
}
.list-facts dt { font-weight: 400; color: var(--ink-2); display: inline; }
.list-facts dt::after { content: " "; }
.list-facts dd { display: inline; font-weight: 600; }

.list-section { margin-top: 5mm; }
.list-section__title {
  display: flex; align-items: baseline; gap: 3mm;
  font-size: 10.5pt; margin-bottom: 1.5mm; break-after: avoid;
}
.list-section__title small { font-size: 8.5pt; font-weight: 400; }

.roster { width: 100%; table-layout: fixed; font-size: 9pt; }
.roster th {
  text-align: left; vertical-align: bottom; font-size: 7.6pt; font-weight: 700; line-height: 1.2;
  padding: 0 1.8mm 1.2mm; border-bottom: var(--rule-strong);
}
.roster th small { display: block; font-weight: 400; }
.roster td {
  vertical-align: top; padding: 1.8mm 1.8mm; height: 12mm;
  border-bottom: var(--rule);
}
.roster tr { break-inside: avoid; page-break-inside: avoid; }
.roster th:first-child, .roster td:first-child { padding-left: 0; }
.roster th:last-child, .roster td:last-child { padding-right: 0; }
.roster .c-nr { width: 7mm; font-variant-numeric: tabular-nums; }
.roster .c-name { width: 52mm; }
.roster .c-parent { width: 44mm; }
.roster .c-note { width: auto; }
.roster .c-paid { width: 13mm; }
.roster .c-here { width: 15mm; }
.roster .c-paid, .roster .c-here { text-align: center; }
.roster td.c-name strong { display: block; font-size: 9.8pt; line-height: 1.25; }
.roster td .sub { display: block; margin-top: .5mm; font-size: 8pt; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.roster td .sub.phone { color: #000; font-weight: 600; font-size: 8.6pt; }
.roster td.c-name, .roster td.c-parent { overflow-wrap: anywhere; }
.roster td.c-paid small { display: block; white-space: nowrap; font-size: 7.4pt; color: var(--ink-2); }
.roster td.c-note { font-size: 8.4pt; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }
.roster .empty td { height: auto; font-style: italic; }

.box {
  display: inline-block; position: relative; vertical-align: -1pt;
  width: 3.6mm; height: 3.6mm; border: 0.8pt solid #000;
}
.c-here .box { width: 5mm; height: 5mm; margin-top: .5mm; }
.box.is-checked::after {
  content: ""; position: absolute; left: 1.05mm; top: .1mm;
  width: 1.1mm; height: 2.2mm;
  border: solid #000; border-width: 0 1.1pt 1.1pt 0; transform: rotate(45deg);
}
.roster .free { color: var(--ink-2); }

.list-blank { margin-top: 5mm; font-size: 8.5pt; color: var(--ink-2); }

/* ================================================================ AV-Vertrag */

.doc--contract { font-size: 11pt; line-height: 1.48; hyphens: auto; }
.doc--contract .sheet > * { max-width: 146mm; }
.doc--contract .sheet > .wide { max-width: none; }

.c-title { font-size: 19pt; line-height: 1.15; letter-spacing: -.005em; }
.c-subtitle { margin-top: 1.5mm; font-size: 11pt; hyphens: manual; text-wrap: balance; }
.c-meta { margin-top: 1mm; font-size: 9pt; color: var(--ink-2); }

.c-parties { margin-top: 9mm; }
.c-parties .between { font-style: italic; margin: 4mm 0 2mm; }
.c-party { padding-left: 10mm; }
.c-party__name { font-weight: 700; }
.c-party__role { margin-top: 1mm; font-style: italic; }
.c-fill {
  display: inline-block; min-width: min(70mm, 100%); border-bottom: 0.5pt solid #000;
  height: 1.15em; vertical-align: -0.25em;
}

.c-section { margin-top: 7mm; }
.c-section > h2 {
  display: grid; grid-template-columns: 10mm 1fr;
  font-size: 11pt; line-height: 1.3; margin-bottom: 2mm;
  break-after: avoid; page-break-after: avoid;
}
.c-section > h2 .no { font-variant-numeric: lining-nums tabular-nums; }

.c-clauses { list-style: none; padding: 0; counter-reset: clause; }
.c-clauses > li {
  counter-increment: clause;
  display: grid; grid-template-columns: 10mm 1fr; margin-top: 1.6mm;
}
.c-clauses > li::before { content: "(" counter(clause) ")"; font-variant-numeric: lining-nums; }
.c-clauses > li > div > p + p { margin-top: 1.4mm; }
.c-plain { padding-left: 10mm; }

.c-list { list-style: none; padding: 0; margin: 1mm 0 0; }
.c-list > li { display: grid; grid-template-columns: 6mm 1fr; }
.c-list.alpha { counter-reset: alpha; }
.c-list.alpha > li { counter-increment: alpha; }
.c-list.alpha > li::before { content: counter(alpha, lower-alpha) ")"; }
.c-list.dash > li::before { content: "–"; }

.c-closing { break-inside: avoid; page-break-inside: avoid; }
.c-closing > .c-section { max-width: 146mm; }
.c-signatures {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 14mm;
  margin-top: 12mm; break-inside: avoid; page-break-inside: avoid;
}
.c-sign h3 { font-size: 10.5pt; margin-bottom: 9mm; }
.c-sign .line { border-top: 0.6pt solid #000; padding-top: 1mm; font-size: 8.5pt; color: var(--ink-2); }
.c-sign .line + .gap { height: 15mm; }
.c-sign .prefilled { font-size: 10pt; line-height: 1.2; height: 5mm; }
.c-sign .seal { height: 30mm; padding-top: 7mm; font-size: 8.5pt; color: var(--ink-2); }

.c-annex { break-before: page; page-break-before: always; }
.c-annex > h2 { font-size: 15pt; line-height: 1.2; }
.c-annex > h2 small { display: block; font-size: 10.5pt; font-weight: 400; margin-top: 1mm; }
.c-annex > .lead { margin-top: 3mm; }
.c-annex h3 { font-size: 10.5pt; margin-top: 6mm; margin-bottom: 1mm; break-after: avoid; page-break-after: avoid; }
.c-annex h3 + .c-list { margin-top: 0; }
.c-annex .c-list > li { margin-top: .6mm; }

.c-table { width: 100%; margin-top: 4mm; font-size: 9.2pt; line-height: 1.38; }
.c-table th {
  text-align: left; vertical-align: bottom; font-weight: 700;
  padding: 0 3mm 1.4mm 0; border-bottom: var(--rule-strong);
}
.c-table td { vertical-align: top; padding: 2mm 3mm 2.2mm 0; border-bottom: var(--rule); }
.c-table tr { break-inside: avoid; page-break-inside: avoid; }
.c-table td:last-child, .c-table th:last-child { padding-right: 0; }
.c-table .note { display: block; margin-top: 1mm; font-style: italic; }
.c-table .pending { font-style: italic; }

.c-footnote { margin-top: 4mm; font-size: 9pt; }
