/* Rahmen der Planung (R3 Etappe 1, Epic #43): Toolbar oben (.site-head) und Fuß. Die Toolbar ist auf iPad und Desktop die
   eine feste Leiste (klebt oben), am iPhone scrollt sie mit; dort ist die Tab-Leiste unten die feste Leiste (navigation.css).
   Inhalt der Toolbar: Marke bzw. Vereinsname, Titel der Planung (iPad, Desktop), „Für Vereine“ (nur Desktop), dann
   „Aa“ (Schrift und Design), „Datei“ und „Drucken“. Vereinsfarbe nur hier: Linie oben und Vereinsname (--marke).
   Farben nur über Tokens (tokens.css). */

/* ---------- Toolbar ---------- */
.site-head { position: relative; z-index: 900; background: var(--t-bar); border-bottom: 1px solid var(--t-bar-edge); font-family: var(--font); }
@media (min-width: 768px) { .site-head { position: sticky; top: 0; } }
.site-head__inner { position: relative; margin: 0; padding: 0 var(--gutter); padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
  min-height: var(--toolbar-h); display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 12px; }
.site-head__logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--marke-fg); min-height: 44px; min-width: 0; flex: 0 1 auto; margin-right: auto; }
.site-head__logo svg { width: 22px; height: 22px; flex: none; }
.site-head__logo b { font: 600 calc(var(--schrift-abschnitt, 17px) * var(--fs, 1))/1.1 var(--font); letter-spacing: -0.01em; color: var(--t-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-head__logo b i { font-style: normal; color: var(--marke-fg); }
.site-head__nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px 18px; }
.site-head__nav a { color: var(--t-label-2); text-decoration: none; font-size: calc(var(--schrift-neben, 14px) * var(--fs, 1)); display: inline-flex; align-items: center; min-height: 44px; }
.site-head__nav a:hover { color: var(--t-accent); }
.site-head__meta { margin: 0; font-size: calc(var(--schrift-neben, 13px) * var(--fs, 1)); color: var(--t-label-2); white-space: nowrap; }
.site-head__meta a { color: var(--t-label-2); }
.site-head__meta a:hover { color: var(--t-accent); }
/* Vereinsinstanz: Vereinsname statt Wortmarke, „bereitgestellt von VFRplan“ nur breit; Vereinsfarbe als Linie oben */
.site-head--verein { box-shadow: inset 0 3px 0 var(--marke); }
.site-head--verein .site-head__logo b { font-size: calc(var(--schrift-text, 16px) * var(--fs, 1)); }
.site-head--verein .site-head__nav { display: none; }
@media (max-width: 1099px) { .site-head__meta { display: none !important; } }

/* Titel der Planung: „EDRH–EDFV–EDRH“, darunter Flugzeug und Startzeit (ui-rahmen.js); nur iPad und Desktop */
.kopf-titel { display: none; margin: 0 0 0 4px; min-width: 0; padding-left: 14px; border-left: 1px solid var(--t-sep); line-height: 1.25; }
.kopf-titel b { display: block; font: 600 calc(var(--schrift-text, 15px) * var(--fs, 1))/1.25 var(--font); color: var(--t-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf-titel span { display: block; font-size: calc(var(--schrift-neben, 13px) * var(--fs, 1)); color: var(--t-label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Der Titel wächst und schiebt damit die Knöpfe nach rechts; ohne Titel tut das der Rand rechts der Marke */
@media (min-width: 768px) { .kopf-titel:not([hidden]) { display: block; flex: 1 1 auto; } }
@media (max-width: 1199px), (pointer: coarse) { .site-head__nav { display: none; } }
.kopf-knoepfe { display: flex; align-items: center; gap: 6px; flex: none; }

/* Knöpfe der Toolbar: ohne Rahmen, Akzentfarbe, 44 px Trefferfläche bei Touch; „Drucken“ getönt mit Druckersymbol */
.kopf-knoepfe > button, .kopf-knoepfe > details > summary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 0; border-radius: var(--r-pill); background: var(--t-fill); color: var(--t-label); box-shadow: none;
  font: 600 calc(var(--schrift-neben, 14px) * var(--fs, 1))/1 var(--font); letter-spacing: 0; text-transform: none; white-space: nowrap; cursor: pointer; list-style: none; }
.kopf-knoepfe > details > summary::-webkit-details-marker { display: none; }
:is(.kopf-knoepfe > button, .kopf-knoepfe > details > summary):hover:not(:disabled) { background: var(--t-fill-strong); color: var(--t-label); border: 0; }
/* „Drucken“ nicht gefüllt: die gefüllte Aktion gehört dem offenen Schritt in „Vor dem Flug“ (R2-Befund 1, Slop-Audit R3-1) */
.kopf-knoepfe .kopf-drucken { background: var(--t-fill); color: var(--t-accent-knopf); }
.kopf-knoepfe .kopf-drucken:hover:not(:disabled) { background: var(--t-fill-strong); color: var(--t-accent-knopf); }
.kopf-drucken::before, .kopf-datei::before { content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: var(--sym-bild) center / contain no-repeat; mask: var(--sym-bild) center / contain no-repeat; }
.kopf-drucken { --sym-bild: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M7 9V3.5h10V9M7 17H4.5A1.5 1.5 0 0 1 3 15.5v-5A1.5 1.5 0 0 1 4.5 9h15a1.5 1.5 0 0 1 1.5 1.5v5a1.5 1.5 0 0 1-1.5 1.5H17'/%3E%3Cpath d='M7 14h10v6.5H7z'/%3E%3C/svg%3E"); }
.kopf-datei { --sym-bild: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 6.5A1.5 1.5 0 0 1 4.5 5h4.6l2 2.2h8.4A1.5 1.5 0 0 1 21 8.7v9.8a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 18.5z'/%3E%3C/svg%3E"); }
@media (pointer: coarse) { .kopf-knoepfe > button, .kopf-knoepfe > details > summary { min-height: 44px; } }
/* iPhone: nur Symbole (Text für Screenreader bleibt), runde 44-px-Knöpfe */
@media (max-width: 767px) {
  .site-head__inner { gap: 8px; }
  .site-head__logo { flex: 1 1 auto; margin-right: 0; }
  .site-head__meta { display: none; }
  .kopf-knoepfe :is(.kopf-drucken, .kopf-datei) { width: 44px; height: 44px; padding: 0; font-size: 0; gap: 0; }
  .kopf-knoepfe .kopf-knopf-text { display: none; }
  .kopf-knoepfe > :is(.aa-menue, .hilfe-menue) > summary { width: 44px; height: 44px; padding: 0; }
  .kopf-knoepfe .aa-glyph { display: inline; font: 600 calc(var(--schrift-abschnitt, 17px) * var(--fs, 1))/1 var(--font); }
  .kopf-knoepfe .hm-glyph { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1.8px solid currentColor; border-radius: 50%; font: 700 14px/1 var(--font); }
  .kopf-knoepfe :is(.kopf-drucken, .kopf-datei)::before { width: 22px; height: 22px; }
  /* Menüs am rechten Rand der Toolbar ausrichten, nicht am Knopf (bei 320 px ragten sie sonst links hinaus) */
  .kopf-knoepfe > :is(.aa-menue, .hilfe-menue) { position: static; }
  .kopf-knoepfe :is(.aa-liste, .hilfe-liste) { right: var(--gutter); top: calc(100% - 2px); }
  /* Symbolknöpfe ohne Fläche in Akzentfarbe, wie in einer iOS-Navigationsleiste */
  .kopf-knoepfe > button, .kopf-knoepfe > details > summary, .kopf-knoepfe .kopf-drucken { background: none; color: var(--t-accent); }
  :is(.kopf-knoepfe > button, .kopf-knoepfe > details > summary):hover:not(:disabled), .kopf-knoepfe > details[open] > summary { background: var(--t-fill); color: var(--t-accent); }
}

/* Aufklappmenüs der Toolbar (Ansicht, Hilfe; Datei ist seit R3-6 ein Sheet, ausdruck.css): schwebende Gruppe mit Haarlinien, Schatten nur hier */
.aa-menue, .hilfe-menue { position: relative; }
/* „Ansicht“ und „Hilfe“ (R3-6): ab 768 px als Wort, am iPhone als Zeichen „Aa“ bzw. „?“ im Kreis */
.aa-glyph, .hm-glyph { display: none; }
.hilfe-liste a { text-decoration: none; }
.hilfe-liste .hm-text { display: grid; gap: 1px; }
.hilfe-liste .hm-text small { font-size: calc(var(--schrift-neben, 13px) * var(--fs, 1)); color: var(--t-label-2); }
.hilfe-liste .hm-neu { flex: none; color: var(--t-label-3); }
.hilfe-liste button { display: flex; align-items: center; width: auto; min-height: 44px; padding: 8px 10px; border: 0; border-radius: var(--r-control); background: none;
  color: var(--t-label); text-align: left; font: 400 calc(var(--schrift-text, 15px) * var(--fs, 1))/1.3 var(--font); letter-spacing: 0; text-transform: none; }
.hilfe-liste button:hover:not(:disabled) { background: var(--t-fill); color: var(--t-label); border: 0; }
/* Ansichten im Menü: Übungsmodus als Schalterzeile (aria-pressed), ohne die gelbe Fläche der Übersicht; leer ohne Kopf */
.aa-liste .uebung-knopf[aria-pressed="true"], .aa-liste .uebung-knopf[aria-pressed="true"]:hover:not(:disabled) { background: none; color: var(--t-label); }
.ansicht-gruppe { display: grid; }
.ansicht-gruppe > button { margin: 0 6px; }
.ansicht-gruppe:not(:has(> button:not(.ps-aus):not([hidden]))) { display: none; }
/* Briefing-Ansicht nicht am iPhone (ausbildung.css), auch im Menü (dort ist .aa-liste button spezifischer) */
@media (max-width: 767px) { .aa-liste .briefing-knopf { display: none; } .ansicht-gruppe:not(:has(> .uebung-knopf:not(.ps-aus):not([hidden]))) { display: none; } }
.aa-liste, .hilfe-liste { position: absolute; right: 0; top: calc(100% + 8px); z-index: 950; display: grid; min-width: 16rem; max-width: calc(100vw - 24px);
  padding: 6px 0; border: 0; border-radius: var(--r-group); background: var(--t-surface); box-shadow: var(--shadow-float), 0 0 0 1px var(--t-bar-edge); }
.aa-liste > *, .hilfe-liste > *, .aa-liste .theme-switch > button { margin: 0 6px; }
.aa-liste .theme-switch { display: contents; }   /* Schalter „Dunkles Design“ als Zeile wie „Große Schrift“ */
.aa-liste :is(button), .hilfe-liste a { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: auto; min-height: 44px; padding: 8px 10px;
  border: 0; border-radius: var(--r-control); background: none; color: var(--t-label); box-shadow: none; text-align: left; white-space: normal;
  font: 400 calc(var(--schrift-text, 15px) * var(--fs, 1))/1.3 var(--font); letter-spacing: 0; text-transform: none; }
.aa-liste button:hover:not(:disabled), .hilfe-liste a:hover { background: var(--t-fill); color: var(--t-label); border: 0; }
:is(.aa-liste, .hilfe-liste) hr { height: 0; margin: 6px 16px; border: 0; border-top: 1px solid var(--t-sep); }
.aa-kopf, .hilfe-kopf { margin: 4px 16px 2px; font-size: calc(var(--schrift-neben, 13px) * var(--fs, 1)); color: var(--t-label-2); }
/* Schalter in den Zeilen „Große Schrift“ und „Dunkles Design“: Spur in Akzentfarbe, Aus-Spur mit sichtbarem Rand */
.aa-liste :is(.schrift-icon, .theme-icon) { display: none; }
.aa-liste :is(.schrift-text, .theme-text) { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
.aa-liste [aria-pressed]::after { content: ""; flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--t-fill-strong);
  box-shadow: inset 0 0 0 1.5px var(--t-label-3); background-image: radial-gradient(circle at 13px 13px, #fff 10px, transparent 10.5px); }   /* Aus-Spur mit Rand ≥ 3:1 */
.aa-liste [aria-pressed="true"]::after { background-color: var(--t-accent-fill); box-shadow: none; background-image: radial-gradient(circle at 31px 13px, #fff 10.5px, transparent 11px); }

/* Seitenleiste ein/aus (iPad hoch und schmale Fenster, ui-rahmen.js) */
.seitenleiste-knopf { display: none; }
@media (min-width: 768px) and (max-width: 1099px) {
  .seitenleiste-knopf { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; margin-left: -10px;
    border: 0; border-radius: var(--r-pill); background: none; color: var(--t-accent); flex: none; }
  .seitenleiste-knopf:hover:not(:disabled) { background: var(--t-fill); color: var(--t-accent); border: 0; }
  .seitenleiste-knopf svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  html[data-planstand="leer"] .seitenleiste-knopf { display: none; }
}

/* ---------- Fuß ---------- */
footer.site-foot { max-width: none; margin: 0; padding: 24px 0 32px; border-top: 1px solid var(--t-sep); background: var(--t-bg); color: var(--t-label-2); font: 400 calc(var(--schrift-neben, 13px) * var(--fs, 1))/1.55 var(--font); }
.site-foot__inner { max-width: 80rem; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 10px; }
.site-foot__inner > p { margin: 0; max-width: 90ch; }
.site-foot a { color: var(--t-label-2); }
.site-foot a:hover { color: var(--t-accent); }
.site-foot__haftung { color: var(--t-label-1); }
/* „Für Vereine“ (aus dem Kopf in den Fuß, R3) nur in der freien Planung, wie bisher im Kopf */
body:has(.site-head--verein) .footer-legal a[href$="vereine.html"] { display: none; }
.site-foot .footer-bottom { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--t-sep); }
/* Hinweis zum gesperrten Druck aus der Toolbar (ui-kurz.js pdfHinweis): schwebt unter der Toolbar */
.pdf-hinweis.pdf-hinweis-schwebend { position: fixed; z-index: 1100; top: calc(var(--toolbar-h) + 8px); right: var(--gutter); max-width: min(420px, calc(100vw - 2 * var(--gutter)));
  margin: 0; padding: 10px 14px; border-radius: var(--r-group); background: var(--t-surface); color: var(--t-label); box-shadow: var(--shadow-float), 0 0 0 1px var(--t-bar-edge);
  text-align: left; font: 400 calc(var(--schrift-text, 15px) * var(--fs, 1))/1.35 var(--font); }
.pdf-hinweis.pdf-hinweis-schwebend:empty { display: none; }
@media print { .site-head, .mobil-leiste, .pdf-hinweis { display: none !important; } }

/* R5-3b: Marke bleibt lesbar. iPad: der Titel schrumpft, nicht die Marke; iPhone: die Marke wächst nicht mit „Aa“ mit, bei
   320 px weicht das Symbol (Platz für „VFRplan“) */
@media (min-width: 768px) { .site-head__logo { flex: 0 0 auto; max-width: 45%; } }
@media (max-width: 767px) { .site-head__logo b { font-size: 17px; } }
@media (max-width: 359px) {
  .site-head__inner { gap: 4px; }
  .site-head__logo svg { display: none; }
  .kopf-knoepfe { gap: 2px; }
}
