/* QO-100 auf afu.tools (QO1-9): Infoseite /qo100 (qi-) und Bedienseite /qo100/app (qa-).
   Baut auf style.css auf und ändert dessen Klassen nicht. Farben nur aus den Tokens. */

:root {
  --qa-an: #34c46a; --qa-an-schrift: #0a0e1f; --qa-tx: #f08a24; --qa-gelb: #d6a10b; --qa-rot: #e5484d;
  --qa-gitter: rgba(138, 147, 179, 0.16); --qa-flaeche: rgba(106, 166, 255, 0.18); --qa-linie: #6aa6ff;
  --qa-grund: #060a1e;
  --qa-txsoll: #ff5a4f; --qa-echo: #ffc23f;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --qa-gelb: #9a6f00; --qa-tx: #c25e00; --qa-an: #1f9a4d; --qa-an-schrift: #fff;
    --qa-gitter: rgba(91, 100, 120, 0.16); --qa-flaeche: rgba(47, 111, 237, 0.14); --qa-linie: #2f6fed; }
}
:root[data-theme="light"] { --qa-gelb: #9a6f00; --qa-tx: #c25e00; --qa-an: #1f9a4d; --qa-an-schrift: #fff;
  --qa-gitter: rgba(91, 100, 120, 0.16); --qa-flaeche: rgba(47, 111, 237, 0.14); --qa-linie: #2f6fed; }

.mono { font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
.qa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================================================================ Bedienseite */

.qa-wrap { padding: 8px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.qa-wrap > .note { margin: 0; }
.qa-hinweis.qa-blink { animation: qa-blink 0.9s ease 2; }
@keyframes qa-blink { 50% { border-left-color: var(--qa-gelb); background: color-mix(in srgb, var(--qa-gelb) 14%, transparent); } }

.qa-app { container: qa / inline-size; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: 8px; min-height: 0; font-size: 15px; line-height: 1.4; }
.qa-box, .qa-leiste, .qa-grafik, .qa-ablage, .qa-dock { background: var(--bg2); border: 1px solid var(--border); border-radius: 9px; min-width: 0; }

/* Knöpfe 24 px, Gruppen ohne Abstand */
.qa-seg { display: inline-flex; }
.qa-seg > button, .qa-chip, .qa-dockzu {
  height: 24px; padding: 0 9px; font: inherit; font-size: 12px; line-height: 1; color: var(--fg); background: transparent;
  border: 1px solid var(--border); margin-left: -1px; cursor: pointer; white-space: nowrap;
}
.qa-seg > button:first-child { border-radius: 5px 0 0 5px; margin-left: 0; }
.qa-seg > button:last-child { border-radius: 0 5px 5px 0; }
.qa-seg > button:only-child { border-radius: 5px; }
.qa-seg > button:hover:not(:disabled):not([aria-pressed="true"]):not([aria-checked="true"]), .qa-chip:hover:not(:disabled) { background: var(--card-hover); }
.qa-seg > button[aria-pressed="true"], .qa-seg > button[aria-checked="true"] { background: var(--qa-an); color: var(--qa-an-schrift); border-color: var(--qa-an); font-weight: 600; }
.qa-seg > button:disabled, .qa-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.qa-chip { border-radius: 8px; margin-left: auto; }
.qa-chip b { font-weight: 700; }
.qa-chip[aria-pressed="true"] { border-color: var(--qa-tx); color: var(--qa-tx); }
.qa-app :focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.qa-klein { color: var(--muted); font-size: 11.5px; }
.qa-luft { flex: 1 1 auto; }

/* Menüleiste */
.qa-leiste { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px 9px; font-size: 12px; }
.qa-station { font-weight: 600; font-size: 13px; }
.qa-stationwahl { height: 24px; font: inherit; font-size: 12px; color: var(--fg); background: var(--bg2); border: 1px solid var(--border); border-radius: 5px; }
.qa-gw, .qa-zustand { color: var(--muted); }
.qa-lampe { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.qa-lampe.an { background: var(--qa-an); box-shadow: 0 0 6px var(--qa-an); }
.qa-lampe.halb { background: var(--qa-gelb); }
.qa-marke { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.qa-marke.rx { background: color-mix(in srgb, var(--qa-an) 22%, transparent); color: var(--qa-an); }
.qa-marke.lock { background: color-mix(in srgb, var(--qa-an) 22%, transparent); color: var(--qa-an); }
.qa-marke.such { background: color-mix(in srgb, var(--qa-gelb) 20%, transparent); color: var(--qa-gelb); }
.qa-marke.aus { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.qa-uhr { font-size: 14px; } .qa-uhr small { color: var(--muted); font-size: 11px; margin-left: 4px; }
.qa-streifen { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 0 0 9px 9px; background: linear-gradient(90deg, var(--accent), var(--accent2)); opacity: 0.35; }

/* Front */
.qa-front { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px; }
.qa-box { padding: 8px 12px; }
.qa-box h3 { margin: 0 0 4px; font-size: 0.76rem; font-variant: small-caps; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.qa-freq { font-size: 30px; font-weight: 600; color: var(--qa-an); letter-spacing: 0.01em; line-height: 1.15; cursor: text; white-space: nowrap; overflow: hidden; text-overflow: clip; border-radius: 4px; }
.qa-freq .klein { font-size: 20px; opacity: 0.85; }
.qa-freq.tx { color: var(--qa-tx); font-size: 22px; cursor: ns-resize; }
.qa-txbox[data-split="false"] .qa-freq.tx { opacity: 0.6; cursor: default; }
.qa-freq-eingabe { width: 100%; font-size: 24px; font-weight: 600; color: var(--qa-an); background: var(--bg); border: 1px solid var(--accent); border-radius: 6px; padding: 2px 6px; }
.qa-neben { color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.qa-neben b { color: var(--fg); font-weight: 500; }
.qa-neben .warn { color: var(--qa-gelb); font-weight: 600; }
.qa-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; font-size: 12px; }
.qa-zeile > .name { color: var(--muted); min-width: 58px; }
.qa-seghint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.qa-seghint .pille { display: inline-block; padding: 0 6px; border-radius: 4px; color: #fff; font-weight: 600; font-size: 11px; }
.qa-regel { display: grid; grid-template-columns: 64px 1fr 92px; align-items: center; gap: 8px; font-size: 12px; margin-top: 6px; }
.qa-regel .name { color: var(--muted); }
.qa-regel input[type="range"] { width: 100%; accent-color: var(--accent); height: 6px; margin: 0; }
.qa-regel .wert { text-align: right; white-space: nowrap; }
.qa-meter-spur { background: color-mix(in srgb, var(--border) 60%, transparent); border-radius: 4px; }
.qa-meter { height: 12px; border-radius: 4px; --rest: 100%;
  background: repeating-linear-gradient(90deg, transparent 0 5px, rgba(0, 0, 0, 0.35) 5px 6px), linear-gradient(90deg, var(--accent), var(--accent2) 60%, var(--qa-gelb));
  clip-path: inset(0 var(--rest) 0 0 round 4px); transition: clip-path 0.12s linear; }
.qa-meter.ueber { outline: 1px solid var(--qa-rot); }
.qa-tx-aus { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.qa-gesperrt .qa-freq:not(.tx) { cursor: not-allowed; }

/* Mitte: Grafik ‖ Ablage */
.qa-mitte { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 8px; min-height: 0; }
.qa-grafik { position: relative; display: flex; flex-direction: column; overflow: hidden; min-height: 420px; }
.qa-grafik-kopf { min-height: 2.3rem; flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 4px 0.6rem; border-bottom: 1px solid var(--border); font-size: 12px; }
.qa-grafik-kopf .titel { font-size: 0.76rem; font-variant: small-caps; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.qa-ueber { position: relative; height: 92px; flex: none; cursor: crosshair; touch-action: pan-y; }
.qa-bandplan { position: relative; height: 18px; flex: none; font-size: 10px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }
.qa-bandplan > div { position: absolute; top: 0; bottom: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; font-weight: 600; padding: 2px 3px 0; border-right: 1px solid rgba(0, 0, 0, 0.35); cursor: help; line-height: 1.2; }
.qa-bp-cw { background: color-mix(in srgb, var(--bp-cw) 75%, #000); }
.qa-bp-digital { background: color-mix(in srgb, var(--bp-digital) 70%, #000); }
.qa-bp-phone { background: color-mix(in srgb, var(--bp-phone) 70%, #000); }
.qa-bp-contest { background: color-mix(in srgb, var(--bp-phone) 55%, #000); box-shadow: inset 0 3px 0 var(--accent2); }
.qa-bp-sonder { background: color-mix(in srgb, var(--bp-sonder) 70%, #000); }
.qa-bp-bake { background: repeating-linear-gradient(135deg, #555b70 0 4px, #3a3f52 4px 8px); }
.qa-bp-not { background: repeating-linear-gradient(135deg, var(--bp-sonder) 0 5px, color-mix(in srgb, var(--bp-sonder) 45%, #000) 5px 10px); }
.qa-zoom { position: relative; flex: 0 0 130px; cursor: crosshair; touch-action: pan-y; }
.qa-skala { height: 20px; flex: none; position: relative; font-size: 10.5px; color: var(--muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }
.qa-skala span { position: absolute; top: 3px; transform: translateX(-50%); white-space: nowrap; }
.qa-wf { position: relative; flex: 1 1 8rem; cursor: crosshair; background: var(--qa-grund); touch-action: pan-y; }
.qa-ueber, .qa-zoom, .qa-wf { min-height: 0; }
.qa-grafik canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.qa-fenster { position: absolute; top: 0; bottom: 0; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); pointer-events: none; }
.qa-vfo { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--qa-an); pointer-events: none; }
.qa-pass { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--qa-an) 16%, transparent); border-left: 2px solid var(--qa-an); pointer-events: none; }
.qa-txmark { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--qa-tx); pointer-events: none; }
.qa-txmark span { position: absolute; top: 2px; left: 3px; font-size: 10px; color: var(--qa-tx); font-weight: 700; }
/* Eigenes Signal beim Senden (QO1-12): Soll rot, gemessenes Echo gelb, TX-Spalte im Wasserfall getönt */
.qa-soll { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--qa-txsoll); pointer-events: none; }
.qa-echo { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--qa-echo); pointer-events: none; }
.qa-soll span, .qa-echo span { position: absolute; bottom: 2px; left: 3px; font-size: 10px; font-weight: 700; }
.qa-soll span { color: var(--qa-txsoll); } .qa-echo span { color: var(--qa-echo); top: 2px; bottom: auto; }
.qa-txspalte { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--qa-txsoll) 14%, transparent); pointer-events: none; }
.qa-sperren { position: absolute; inset: 0; pointer-events: none; }
.qa-sperren > div { position: absolute; top: 0; bottom: 0; pointer-events: auto; cursor: crosshair;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--muted) 22%, transparent) 0 3px, transparent 3px 8px); }
.qa-sperren > div.notfunk { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--bp-sonder) 30%, transparent) 0 3px, transparent 3px 8px); }
.qa-grob { position: absolute; right: 6px; top: 4px; font-size: 10.5px; color: var(--muted); background: color-mix(in srgb, var(--bg2) 80%, transparent); padding: 0 5px; border-radius: 4px; pointer-events: none; }
.qa-tip { position: absolute; pointer-events: none; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 3px 7px; font-size: 11.5px; white-space: nowrap; display: none; z-index: 3; }

/* Ablage rechts */
.qa-ablage { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.qa-reiter { display: flex; align-items: flex-end; border-bottom: 1px solid var(--border); padding: 0 6px; flex: none; gap: 2px; }
.qa-reiter [role="tab"] { font: inherit; font-size: 12.5px; padding: 0.45rem 0.8rem; margin-bottom: -1px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); cursor: pointer; }
.qa-reiter [role="tab"]:hover { color: var(--fg); }
.qa-reiter [role="tab"][aria-selected="true"] { color: var(--fg); font-weight: 600; background: var(--bg2); border-color: var(--border); border-bottom: 1px solid var(--bg2); }
.qa-reiterseite { padding: 8px 10px; overflow-y: auto; font-size: 12.5px; flex: 1 1 auto; min-height: 0; }
table.data.qa-bptab { font-size: 12px; }
table.data.qa-bptab { table-layout: fixed; }
table.data.qa-bptab td, table.data.qa-bptab th { padding: 4px 5px; white-space: normal; }
table.data.qa-bptab th:first-child { width: 5.6rem; }
table.data.qa-bptab td:first-child { white-space: nowrap; }
.qa-bptab tr[data-i] { cursor: pointer; }
.qa-bptab tr[data-i]:hover td { background: var(--card-hover); }
.qa-bptab .pkt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.qa-quelle { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.qa-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; margin: 0; font-size: 12px; }
.qa-kv dt { color: var(--muted); } .qa-kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

/* Dock unten: weitere Kästen als Reiter, eingeklappt nur die Leiste */
.qa-dock { overflow: hidden; display: flex; flex-direction: column; }
.qa-dock .qa-reiter { border-bottom-color: transparent; padding-top: 3px; align-items: center; }
.qa-dock[data-offen="true"] .qa-reiter { border-bottom-color: var(--border); }
.qa-dock .qa-reiter [role="tab"] { margin-bottom: 0; }
.qa-dock[data-offen="true"] .qa-reiter [role="tab"] { margin-bottom: -1px; }
.qa-dockzu { border-radius: 5px; margin: 0 0 2px; }
.qa-dockseite { padding: 8px; overflow: auto; height: min(46vh, 30rem); }

.qa-schnell { display: none; position: sticky; bottom: 0; z-index: 4; gap: 6px; padding: 6px; background: var(--bg); border-top: 1px solid var(--border); }
.qa-schnell button { flex: 1; height: 40px; font: inherit; font-size: 15px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: var(--fg); cursor: pointer; }
.qa-schnell button:disabled { opacity: 0.45; }

/* Einstellungen */
.qa-dialog { width: min(34rem, calc(100vw - 32px)); max-height: min(44rem, calc(100dvh - 32px)); padding: 0; background: var(--bg2); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); }
.qa-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.qa-dialog-kopf { display: flex; align-items: center; gap: 8px; padding: 10px 14px 6px; }
.qa-dialog-kopf h2 { margin: 0; font-size: 1.05rem; flex: 1; }
.qa-einstseite { padding: 12px 14px 16px; display: grid; gap: 12px; }
.qa-einstseite .field select, .qa-einstseite .field input { min-width: 0; width: 100%; }
.qa-zweier { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa-schalter { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; }
.qa-einstseite .qa-kv { font-size: 12px; }

/* Ganze Höhe, sobald der Container breiter als 1100 px ist (Fenster minus 2,5rem Rand der .wrap): Seite so hoch wie das Fenster, kein Seitenfuß */
@media (min-width: 1141px) {
  body.qa-seite .footer { display: none; }
  body.qa-seite .qa-wrap { height: calc(100dvh - var(--kopf-hoehe) - 1px); }
  body.qa-seite .qa-app:not([hidden]) { flex: 1 1 auto; }
  /* Offener Dock: die Seite darf länger werden, sonst schiebt sich die Grafik (min. 420 px) über den Dock */
  body.qa-seite .qa-wrap:has(.qa-dock[data-offen="true"]) { height: auto; }
}

/* Tablet */
@container qa (max-width: 1100px) {
  .qa-front { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .qa-front .qa-regler { grid-column: 1 / -1; }
  .qa-mitte { grid-template-columns: minmax(0, 1fr); }
  .qa-grafik { height: 420px; min-height: 0; }
  .qa-ablage { height: 300px; }
}
/* Telefon */
@container qa (max-width: 700px) {
  .qa-front { grid-template-columns: minmax(0, 1fr); }
  .qa-freq { font-size: 26px; } .qa-freq .klein { font-size: 18px; }
  .qa-seg > button, .qa-chip, .qa-dockzu, .qa-stationwahl { height: 32px; font-size: 13px; }
  .qa-seg.voll { display: flex; width: 100%; } .qa-seg.voll > button { flex: 1; padding: 0 4px; }
  .qa-zeile > .name { min-width: 100%; }
  .qa-leiste .nur-breit { display: none; }
  .qa-ueber { height: 70px; } .qa-zoom { flex-basis: 90px; } .qa-grafik { height: auto; } .qa-wf { flex-basis: 14rem; }
  .qa-txbox[data-split="false"] { display: none; }
  .qa-schnell { display: flex; }
  .qa-reiter [role="tab"] { padding: 0.6rem 0.7rem; }
  .qa-dockseite { height: auto; max-height: 80vh; }
}
@media (max-width: 700px) {
  .qa-wrap { width: calc(100% - 12px); padding-top: 6px; }
  .qa-app { gap: 6px; }
}

/* ================================================================ Infoseite */

.qi-hero { padding-bottom: clamp(1rem, 2.5vw, 1.8rem); }
.qi-hero .lead { max-width: 44rem; }
.qi-zahlen .kennzahl-wert { font-size: clamp(1.3rem, 2.4vw, 1.7rem); white-space: nowrap; }
.qi-zahlen { margin-bottom: 0.6rem; }

/* Zeichnungen: nur Tokens, damit hell und dunkel stimmen */
.qi-bild svg, .qi-kompass, .qi-kette svg, .qi-tx-pfad svg { overflow: visible; }
.qi-t { font: 12px/1 system-ui, sans-serif; fill: var(--fg); }
.qi-klein { font-size: 10.5px; fill: var(--muted); }
.qi-fett { font-weight: 700; font-size: 13px; }
.qi-erde-hell { stop-color: color-mix(in srgb, var(--accent) 55%, var(--bg2)); }
.qi-erde-dunkel { stop-color: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.qi-land { fill: color-mix(in srgb, var(--bp-digital) 55%, var(--bg2)); opacity: 0.85; }
.qi-bahn { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 5; opacity: 0.8; }
.qi-sat-koerper { fill: color-mix(in srgb, var(--fg) 75%, var(--bg)); }
.qi-sat-panel { fill: color-mix(in srgb, var(--accent) 60%, var(--bg)); stroke: var(--border); }
.qi-panel-strich { stroke: var(--bg); stroke-width: 1; }
.qi-schuessel { fill: color-mix(in srgb, var(--fg) 70%, var(--bg)); }
.qi-schuessel-f { fill: color-mix(in srgb, var(--fg) 18%, var(--bg2)); stroke: var(--muted); stroke-width: 1.5; }
.qi-linie, .qi-k-boden { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.qi-uplink, .qi-downlink { fill: none; stroke-width: 2.4; stroke-dasharray: 7 5; }
.qi-uplink { stroke: var(--bp-phone); }
.qi-downlink { stroke: var(--bp-cw); }
.qi-uplink-f { fill: var(--bp-phone); }
.qi-downlink-f { fill: var(--bp-cw); }
.qi-hilfslinie { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 3; }
.qi-bauteil { fill: var(--bg2); stroke: var(--muted); stroke-width: 1.5; }
.qi-bildschirm { fill: var(--bg); }
.qi-wf-linie { fill: none; stroke: var(--bp-digital); stroke-width: 1.6; }
.qi-led { fill: var(--bp-digital); }

/* Sprungleiste: klebt unter dem Kopf, schmal rollt sie seitlich in ihrem Kasten.
   AFU-346: deckend statt weichgezeichnet (backdrop-filter zeichnet beim Scrollen jedes Bild darunter neu),
   Lage aus der gemessenen Kopfhöhe (--qi-kopf, setzt qo100.js). Sprungziele landen unter Kopf und Leiste. */
.qi-sprung {
  position: sticky; top: calc(var(--qi-kopf, var(--kopf-hoehe)) + 8px); z-index: 5;
  display: flex; gap: 0.2rem; overflow-x: auto; scrollbar-width: none;
  margin-top: 0.4rem; padding: 0.3rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg);
}
html.qi-sprungziele { scroll-padding-top: calc(var(--qi-kopf, var(--kopf-hoehe)) + 8px + var(--qi-sprung-h, 0px) + 14px); }
.qi-sprung::-webkit-scrollbar { display: none; }
.qi-sprung a {
  flex: none; padding: 0.35rem 0.85rem; border-radius: 999px; font-size: 0.88rem;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.qi-sprung a:hover { color: var(--fg); background: var(--card-hover); }
.qi-sprung a.an { color: var(--fg); background: var(--card-hover); box-shadow: inset 0 0 0 1px var(--accent); }
.qi-teil { padding: clamp(1.6rem, 3.5vw, 2.6rem) 0 0; }
.qi-teil:last-of-type { padding-bottom: clamp(2rem, 4vw, 3rem); }

/* Klappen: breit nur Überschrift, schmal aufklappbar */
.qi-klappe > summary { list-style: none; cursor: default; }
.qi-klappe > summary::-webkit-details-marker { display: none; }
.qi-klappe > summary h2 { display: inline-block; }
/* Worum geht es: drei kurze Karten und das Foto in einer Reihe */
.qi-worum { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr); align-items: stretch; }
.qi-worum .card:hover { transform: none; border-color: var(--border); box-shadow: none; }
.qi-worum .card p:last-child { margin-bottom: 0; }
.qi-worum .qi-foto { margin: 0; }
.qi-worum .qi-foto img { aspect-ratio: 3 / 2; object-fit: cover; }

/* Zwei Karten nebeneinander (Hören/Senden, Transponder/Baken) */
.qi-zwei { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1rem; }
.qi-zwei h3 { margin: 0 0 0.5rem; }
.qi-liste-karte:hover { transform: none; border-color: var(--border); box-shadow: none; }
.qi-liste-karte ul { margin: 0; padding-left: 1.1rem; }
.qi-liste-karte li { margin-bottom: 0.25rem; }
.qi-nebentext { font-size: 0.82rem; color: var(--muted); }

/* Rechner als abgesetzter Werkzeugblock */
.qi-werkzeug {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg2));
  padding: clamp(0.8rem, 2vw, 1.4rem); display: grid; gap: clamp(1.2rem, 2.5vw, 1.8rem);
}
.qi-werkzeug-titel { margin: 0 0 0.7rem; font-size: 1.12rem; display: flex; align-items: center; gap: 0.5rem; }
.qi-werkzeug-teil + .qi-werkzeug-teil { border-top: 1px solid var(--border); padding-top: clamp(1rem, 2vw, 1.4rem); }
.qi-werkzeug .calc { background: var(--bg); }

/* Bedienung: Karten als Verweise */
.qi-bedien { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qi-bedien-karte { display: flex; flex-direction: column; gap: 0.35rem; color: var(--fg); text-decoration: none; }
.qi-bedien-karte .icon { font-size: 1.4rem; }
.qi-bedien-karte b { font-size: 1.05rem; }
.qi-bedien-karte span:not(.icon):not(.qi-pfeil) { color: var(--muted); font-size: 0.92rem; flex: 1; }
.qi-pfeil { color: var(--accent); font-weight: 600; font-size: 0.92rem; }

/* Gut zu wissen: kurze Liste */
.qi-wissen { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.5rem 2.4rem; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 100%; }
.qi-wissen b { color: var(--fg); }

/* Ausrichtrechner */
.qi-karte-teil { margin-top: clamp(1rem, 2vw, 1.4rem); }
.qi-karte-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.qi-karte-kopf h3 { margin: 0; }
.qi-karte-art { display: flex; gap: 0.35rem; }
.qi-karte { height: clamp(300px, 46vh, 480px); border: 1px solid var(--border); border-radius: var(--radius); margin: 0.6rem 0 0.4rem; background: var(--bg2); }
.qi-karte-punkt { border-radius: 50%; background: #1e56b5; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.4); box-sizing: border-box; }
.qi-karte-strahl { stroke: #e8590c; }
.qi-kompass { width: 100%; max-height: 240px; display: block; margin: auto 0; }
.qi-kompass-karte { justify-content: flex-start; }
.qi-k-ring { fill: var(--bg2); stroke: var(--border); stroke-width: 1.5; }
.qi-k-strich line { stroke: var(--muted); stroke-width: 1; }
.qi-k-nadel { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
#qi-k-nadel, #qi-k-lnb { transition: transform 0.4s ease; }
.qi-k-spitze { fill: var(--accent); }
.qi-k-mitte { fill: var(--fg); }
.qi-k-bogen { fill: none; stroke: var(--accent2); stroke-width: 1.5; }
.qi-k-lnb { fill: var(--bg2); stroke: var(--accent); stroke-width: 2; }
.qi-luft-oben { margin-top: 0.8rem; }

/* Stationsaufbau als Bildfolge */
.qi-kette { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; grid-template-columns: repeat(5, minmax(0, 1fr)); counter-reset: qi-k; }
.qi-kette li {
  position: relative; counter-increment: qi-k;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg);
  padding: 0.8rem 0.9rem 0.9rem; display: flex; flex-direction: column; gap: 0.3rem;
}
.qi-kette li::before { content: counter(qi-k); position: absolute; top: 0.5rem; left: 0.7rem; font-size: 0.75rem; color: var(--muted); }
.qi-kette li:not(:last-child)::after {
  content: "→"; position: absolute; right: -0.72rem; top: 2.4rem; z-index: 1;
  color: var(--accent); font-weight: 700;
}
.qi-kette svg { width: 100%; max-width: 130px; height: 72px; align-self: center; }
.qi-kette b { font-size: 0.98rem; }
.qi-kette span { font-size: 0.86rem; color: var(--muted); }
.qi-tx-pfad { margin-top: 0.9rem; }
.qi-tx-pfad svg { width: 100%; max-width: 760px; height: auto; display: block; }
.qi-tx-pfad .field-hint { margin: 0.3rem 0 0; max-width: 52rem; }
.qi-foto { margin: 0; }
.qi-foto img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.qi-foto figcaption { font-size: 0.84rem; color: var(--muted); margin-top: 0.4rem; }

/* Bandplan-Leiste */
.qi-bp { position: relative; height: 34px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg2); }
.qi-bp-seg { position: absolute; top: 0; bottom: 0; border-right: 1px solid var(--bg); display: flex; align-items: center; overflow: hidden; }
.qi-bp-seg span { padding: 0 0.4rem; font-size: 0.74rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
.qi-bp-seg.cw { background: var(--bp-cw); }
.qi-bp-seg.digital { background: var(--bp-digital); }
.qi-bp-seg.phone { background: var(--bp-phone); }
.qi-bp-seg.sonder { background: var(--bp-sonder); }
.qi-bp-seg.bake, .qi-punkt-bake {
  background: repeating-linear-gradient(135deg, var(--muted) 0 3px, transparent 3px 6px);
}
.qi-punkt-bake { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 3px; border: 1px solid var(--muted); vertical-align: -0.05rem; }
.qi-bp-legende .qi-punkt-bake { margin-right: 0.35rem; }
.qi-bp-skala { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); margin: 0.3rem 0 0.6rem; }
.qi-bp-legende { margin-bottom: 1rem; }
#qi-bp-tabelle td.qi-hinweis { white-space: normal; color: var(--muted); font-size: 0.9rem; min-width: 14rem; }
#qi-bp-tabelle tr.qi-bake td { color: var(--muted); }
.qi-unter { margin-top: 2rem; }
#q-band .qi-band-hinweis { margin: 0.35rem 0 0; }

.qi-nachweis { margin: 1.4rem 0 0; color: var(--muted); font-size: 0.82rem; }

@media (max-width: 1100px) {
  .qi-worum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qi-worum .qi-foto { grid-column: 1 / -1; max-width: 640px; }
  .qi-zwei { grid-template-columns: minmax(0, 1fr); }
  .qi-bedien { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qi-wissen { grid-template-columns: minmax(0, 1fr); }
  .qi-kette { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
  .qi-kette li::after { display: none; }
}
@media (max-width: 700px) {
  .qi-zahlen { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .qi-zahlen .kennzahl { padding: 0.6rem 0.7rem; }
  .qi-zahlen .kennzahl-wert { font-size: 1.15rem; white-space: normal; }
  .qi-zahlen .kennzahl-name { font-size: 0.7rem; }
  .qi-hero .hero-art { order: -1; }
  .qi-hero .hero-art svg { max-height: 200px; }
  .qi-teil { padding-top: 0.6rem; }
  .qi-klappe { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); }
  .qi-klappe > summary { cursor: pointer; padding: 0.7rem 0.9rem; display: flex; align-items: center; gap: 0.6rem; }
  .qi-klappe > summary h2 { margin: 0; font-size: 1.15rem; flex: 1; }
  .qi-klappe > summary::after { content: "▸"; color: var(--muted); }
  .qi-klappe[open] > summary::after { content: "▾"; }
  .qi-klappe > :not(summary) { margin-left: 0.9rem; margin-right: 0.9rem; }
  .qi-klappe > :last-child { margin-bottom: 0.9rem; }
  .qi-kette { grid-template-columns: 1fr; }
  .qi-worum, .qi-bedien { grid-template-columns: minmax(0, 1fr); }
  .qi-werkzeug { padding: 0.6rem; }
  .qi-kette li { display: grid; grid-template-columns: 5.5rem 1fr; column-gap: 0.7rem; }
  .qi-kette svg { grid-row: span 2; height: 56px; }
  .qi-bp-seg span { display: none; }
  .qi-bp-skala span:nth-child(even) { display: none; }
}

/* Anleitung und Fragen */
.qi-folgt { color: var(--muted); font-style: italic; margin: 0; }
.qi-schritte { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.qi-schritt:hover { transform: none; border-color: var(--border); box-shadow: none; }
.qi-schritt h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.qi-schritt p { margin: 0 0 0.5rem; }
.qi-paflash { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; max-width: 760px; }
.qi-paflash > p { margin: 0 0 0.7rem; }
.qi-paflash .qi-fehler { color: var(--qa-rot); }
.qi-paflash-knoepfe { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.qi-paflash progress { width: 100%; height: 0.6rem; }
.qi-paflash-log { max-height: 14rem; overflow: auto; margin: 0.7rem 0 0; white-space: pre-wrap; word-break: break-all; }
.qi-paflash-log:empty { display: none; }
.qi-fragen { padding-bottom: clamp(2rem, 4vw, 3rem); }
.qi-frage { margin: 0.6rem 0 0; }
.qi-frage > p { margin: 0; padding: 0 1rem 0.9rem; max-width: 52rem; color: color-mix(in srgb, var(--fg) 86%, var(--muted)); }
/* Transponder und Baken: breite Tabellen, untereinander */
.qi-zwei.qi-unter { grid-template-columns: minmax(0, 1fr); }

/* Anleitung (AFU-347, Inhalt aus qo1 QO1-20/21): je Gruppe die Schritte untereinander, ganze Breite */
.qi-inhalt { margin: 0 0 1rem; color: var(--muted); font-size: 0.92rem; }
.qi-abschnitt { padding-top: 1.4rem; }
.qi-abschnitt + .qi-abschnitt { border-top: 1px solid var(--border); margin-top: 1.6rem; }
.qi-abschnitt > h3 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.qi-unterzeile { margin: 0 0 0.9rem; color: var(--muted); }
.qi-abschnitt h4 { margin: 1.3rem 0 0.4rem; font-size: 1.05rem; }
.qi-abschnitt .qi-foto { margin: 1.4rem 0 0; max-width: 760px; }
.qi-abschnitt .qi-nachweis { margin: 0; padding-left: 1.2rem; font-size: 0.92rem; }
.qi-abschnitt .qi-nachweis li { margin-bottom: 0.3rem; }

/* Endstufe flashen (Web Serial) */
.qi-paflash { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; max-width: 760px; }
.qi-paflash > p { margin: 0 0 0.7rem; }
.qi-paflash .qi-fehler { color: var(--qa-rot); }
.qi-paflash-knoepfe { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.qi-paflash progress { width: 100%; height: 0.6rem; }
.qi-paflash-log { max-height: 14rem; overflow: auto; margin: 0.7rem 0 0; white-space: pre-wrap; word-break: break-all; }
.qi-paflash-log:empty { display: none; }

/* Meine QO-100-Stationen (AFU-347, /qo100/stationen) */
.qs-dialog { width: min(40rem, 94vw); max-height: 90vh; overflow-y: auto; background: var(--bg2); }
.qs-zeile { display: flex; gap: 0.5rem; align-items: center; }
.qs-zeile input { flex: 1; min-width: 0; font-family: var(--mono, monospace); }
.qs-zustand { font-weight: 600; }
.qs-zustand.an { color: var(--qa-an); }
.qs-zustand.aus { color: var(--muted); font-weight: 400; }
.qs-knoepfe { display: flex; gap: 0.35rem; justify-content: flex-end; align-items: center; white-space: nowrap; }
.qs-knoepfe .icon-btn svg { width: 1.05rem; height: 1.05rem; }
.qs-knoepfe .icon-btn.gefahr { color: var(--qa-rot); }
