/* Grow-Journal: Journalpapier, Waldgrün und lesbare Messwerte. */
:root {
  --bg: #f5f5ef;
  --bg-2: #fffefa;
  --bg-3: #eaf0e6;
  --line: #cbd4c7;
  --text: #192e24;
  --muted: #52645a;
  --accent: #265e44;
  --accent-2: #81530b;
  --danger: #a03437;
  --on-accent: #fff;
  --border-field: #849689;
  --radius: 12px;
  --gap: 0.75rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121c17; --bg-2: #19271f; --bg-3: #243629; --line: #3e5143;
    --text: #eef3e8; --muted: #b1c0b3; --accent: #a4d7a7; --accent-2: #efc773;
    --danger: #ff999c; --on-accent: #122a1b; --border-field: #738979; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 1rem 0 0.5rem; }
h1, h2 { font-family: Georgia, Cambria, serif; font-weight: 500; letter-spacing: -.025em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); overflow-wrap: anywhere; }
h2 { font-size: clamp(1.3rem, 2vw, 1.65rem); }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: .55rem max(1rem, calc((100% - 1120px) / 2));
  background: #18372b; color: #f4f7eb;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: .55rem; color: inherit; font-weight: 650; white-space: nowrap; }
.brand img { border-radius: 8px; }
.mainnav a { display: inline-flex; align-items: center; min-height: 42px; padding-inline: .35rem; color: #e1eadf; }
.mainnav a[aria-current] { box-shadow: inset 0 -2px #d0e8a8; color: white; }
.mainnav { display: flex; gap: 1rem; flex-wrap: wrap; }
.mainnav a, .topbar .quick { white-space: nowrap; }
/* Schmale Handys: Kopfzeile einzeilig halten ("Grows" führt ebenfalls zur Startseite) */
@media (max-width: 520px) {
  .topbar { gap: 0.75rem; padding: 0.5rem 0.75rem; }
  .brand { display: none; }
  .mainnav { gap: 0.75rem; }
}
@media (max-width: 380px) {
  .topbar, .topbar .quick { font-size: 0.9rem; }
  .topbar { gap: 0.5rem; }
  .mainnav { gap: 0.55rem; }
  .topbar .quick { padding: 0 0.55rem; }
}
.container { width: min(100%, 1152px); margin: 0 auto; padding: clamp(1rem, 3vw, 2rem) 1rem 3rem; }

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0 0 var(--gap);
}
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }

.btn, button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-3); color: var(--text);
  font: inherit; font-weight: 550; cursor: pointer;
}
.btn:hover, button:hover { border-color: var(--accent); text-decoration: none; }
.btn-primary, button.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 650; }
.btn-danger, button.danger { border-color: var(--danger); color: var(--danger); }

label { display: block; margin: 0.6rem 0 0.25rem; color: var(--muted); font-size: 0.9rem; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 0.5rem 0.65rem;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border-field); border-radius: 8px;
  font: inherit;
}
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
textarea { min-height: 5rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 0.85rem; }

.badge {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--line); font-size: 0.8rem;
}
.flash { padding: 0.6rem 0.9rem; border-radius: var(--radius); background: var(--bg-3); border-left: 3px solid var(--accent); margin-bottom: var(--gap); }
.flash.error { border-left-color: var(--danger); }

/* Formulare und Tabellen */
.cols { display: grid; gap: 0 var(--gap); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.actions { margin-top: 1rem; }
.form-inline > * { flex: 1 1 140px; }
.form-inline button { flex: 0 0 auto; }
.danger-zone { margin-top: 2rem; }
.table-wrap { overflow-x: auto; }
tr.inactive td { color: var(--muted); }
td.right { text-align: right; }
td form { margin: 0; }
button.link { min-height: 0; padding: 0; border: 0; background: none; color: var(--accent); }
button.link.danger { color: var(--danger); }
.prewrap { white-space: pre-wrap; }
.card-link { display: block; color: var(--text); }
.card-link:hover { border-color: var(--accent); text-decoration: none; }
.badge-stage { background: var(--bg-3); color: var(--accent); border-color: var(--line); font-weight: 650; }

.topbar .quick { margin-left: auto; min-height: 42px; padding: 0 .8rem; background: #d1e9af; color: #193321; border-color: transparent; }
/* zurückgenommen, solange die Einrichtung aussteht oder kein aktiver Grow existiert (REVIEW29 R29-1) */
.topbar .quick.nebenrang { background: transparent; color: #f4f7eb; border-color: rgba(209, 233, 175, .55); font-weight: 500; }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }

/* Schnell-Erfassung */
.quick-form { max-width: 640px; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; border: 0; padding: 0; margin: 0.5rem 0 0.75rem; }
.chip { margin: 0; color: var(--text); font-size: 0.95rem; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; }
.chip input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.plant-head { margin-top: 0.5rem; }
.small-btn { min-height: 34px; padding: 0 0.7rem; font-size: 0.9rem; }
.plant-picks { display: grid; gap: 0.4rem; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); margin: 0.4rem 0; }
.pick { margin: 0; color: var(--text); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: block; padding: 0.55rem 0.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); text-align: center; font-size: 0.85rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick input:checked + span { border-color: var(--accent); background: rgba(108, 194, 138, 0.18); }
.pick input:focus-visible + span { outline: 2px solid var(--accent); }
button.big { width: 100%; min-height: 52px; margin-top: 1rem; font-size: 1.05rem; }

/* Zeitstrahl */
.tl-item { border-left: 3px solid var(--line); padding: 0.45rem 0 0.45rem 0.75rem; margin-bottom: 0.4rem; background: var(--bg-2); border-radius: 0 var(--radius) var(--radius) 0; padding-right: 0.75rem; }
.tl-watering { border-left-color: #6aaed6; }
.tl-feeding { border-left-color: var(--accent); }
.tl-training { border-left-color: var(--accent-2); }
.tl-repotting { border-left-color: #b28a5c; }
.tl-pest_problem { border-left-color: var(--danger); }
.edit-links a { margin-right: 0.4rem; }
table.mini td { padding: 0.15rem 0.3rem; font-size: 0.85rem; border: 0; }

/* Fotos */
.upload-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 1rem; }
.big-label { min-height: 64px; margin: 0; color: inherit; font-size: 1.05rem; cursor: pointer; }
.btn-primary.big-label { color: var(--on-accent); }
label.btn.disabled { opacity: 0.5; pointer-events: none; }
.gallery { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.gallery-strip { grid-auto-flow: column; grid-auto-columns: 140px; grid-template-columns: none; overflow-x: auto; padding-bottom: 0.3rem; }
.thumb { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--bg-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.2rem 0.4rem; font-size: 0.75rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); }
.photo-full { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: var(--radius); }
.filter-row { margin: 0.5rem 0 0.75rem; }

/* Sensoren */
.dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-right: 0.3rem; vertical-align: middle; }
.dot.ok { background: var(--accent); }
.dot.bad { background: var(--danger); }
.error-text { color: var(--danger); }
.ok-text { color: var(--accent); }
label.check { display: flex; gap: 0.5rem; align-items: center; color: var(--text); margin-top: 1rem; }
.sensor-form:has(#source option[value="manual"]:checked) .mqtt-only { display: none; }
.path-test { margin-top: 0.75rem; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.85em; background: var(--bg-3); padding: 0 0.25rem; border-radius: 4px; overflow-wrap: anywhere; }

/* Dashboard: aktuelle Werte */
.tiles { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.75rem; }
.tile-label { color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-value { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile-unit { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.tile-age { font-size: 0.75rem; color: var(--muted); }
.tile.stale .tile-value { color: var(--muted); }

/* Dashboard: Charts */
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.segmented button { min-height: 36px; border: 0; border-radius: 0; background: var(--bg-2); padding: 0 0.9rem; }
.segmented button[aria-pressed="true"] { background: var(--bg-3); color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.chart-panels { width: 100%; }
.chart-panel { margin: 0 0 0.5rem; padding: 0.5rem 0.25rem 0.25rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.chart-panel figcaption { font-size: 0.85rem; padding: 0 0.5rem 0.25rem; display: flex; align-items: center; gap: 0.4rem; }
.chart-plot { position: relative; }
.swatch { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.swatch-temperature { background: #d95926; }
.swatch-humidity { background: #3987e5; }
.swatch-vpd { background: #199e70; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 0.3rem 0.5rem; font-size: 0.8rem; white-space: nowrap; }
.chart-table { font-size: 0.8rem; }
.chart-table-wrap .table-wrap { max-height: 320px; overflow-y: auto; }
.uplot, .uplot * { font-family: system-ui, sans-serif; }

/* Zeitstrahl nach Tagen */
.tl-day { margin-bottom: 1rem; }
.tl-day-head { display: flex; gap: 0.5rem; align-items: center; margin: 0.5rem 0; position: sticky; top: 52px; background: var(--bg); padding: 0.25rem 0; z-index: 2; }
.tl-day .gallery-strip { margin-bottom: 0.4rem; }
.tl-more { text-align: center; margin: 1rem 0; }

/* Phasenbalken */
.phasebar { display: flex; height: 28px; border-radius: var(--radius); overflow: hidden; margin: 0.75rem 0; border: 1px solid var(--line); }
.phase { display: flex; align-items: center; padding: 0 0.4rem; min-width: 4px; overflow: hidden; white-space: nowrap; font-size: 0.75rem; color: #0d1410; flex-basis: 0; }
.phase span { overflow: hidden; text-overflow: ellipsis; }
.phase.current { box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.6); }
.phase-germination { background: #a8b8a0; }
.phase-seedling { background: #9fd3a8; }
.phase-vegetative { background: #5fbf74; }
.phase-flowering { background: #d59bd8; }
.phase-flush { background: #7fc2d9; }
.phase-drying { background: #d8b36a; }
.phase-curing { background: #b28a5c; }

/* Einrichtung (T1) */
.stack { display: flex; flex-direction: column; gap: 0.6rem; }
.stack label { display: flex; flex-direction: column; gap: 0.25rem; }
.setup-steps { list-style: none; padding: 0; margin: 0 0 var(--gap); display: flex; flex-direction: column; gap: var(--gap); }
.setup-steps > li h2 { margin-top: 0; }
.setup-qr { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.setup-qr .qr { width: 220px; max-width: 100%; background: #fff; border-radius: var(--radius); padding: 4px; }
.setup-qr .qr svg { display: block; width: 100%; height: auto; }
.fingerprint { display: inline-block; font-size: 0.75rem; word-break: break-all; }
.ok-text { color: var(--accent); }
.device-choice { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.device { display: flex !important; flex-direction: row !important; gap: 0.6rem; align-items: flex-start; padding: 0.4rem; border-radius: var(--radius); cursor: pointer; }
.device:has(input:checked) { background: var(--bg-3); outline: 1px solid var(--accent); }
.device input { margin-top: 0.3rem; }
.device-help { display: none; margin-top: 0.25rem; }
.device:has(input:checked) .device-help { display: block; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; }
.check-icon { width: 1.6rem; height: 1.6rem; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--bg-3); }
.check-ok .check-icon { background: var(--accent); color: var(--on-accent); }
.check-fehler .check-icon { background: var(--danger); color: var(--on-accent); }
.check-warten .check-icon { border: 1px dashed var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.phone-steps li { margin-bottom: 0.4rem; }
.setup-banner { border-left: 3px solid var(--accent); }
.check-info .check-icon { border: 1px solid var(--muted); font-style: italic; }

/* Mobile Erfassung (T2) */
.capture-grow h1 { margin: 0.5rem 0; }
.capture-photos { border: 0; padding: 0; margin: 0.75rem 0 0; min-width: 0; }
.capture-photos legend { color: var(--muted); font-size: 0.9rem; padding: 0; }
.capture-photos .upload-buttons { margin-top: 0.4rem; }
.photo-list { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.photo-item { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.photo-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--bg-2); }
.photo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.photo-item .small-btn { min-height: 44px; }
.capture-saved { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.capture-saved .small-btn, .capture-status .small-btn, #erfassen-fehler .small-btn { min-height: 44px; }
.inline-form { display: inline; margin: 0; }
.capture-file-inputs input[type=file] { min-height: 44px; }
/* Erfassung: Bedienelemente mindestens 44 px hoch (Touch) */
.capture-form .chip span { min-height: 44px; }
.capture-form .pick span { min-height: 44px; padding: 0.75rem 0.5rem; }
.capture-form .small-btn { min-height: 44px; }

/* Warteschlange ohne Verbindung (T3) */
.warteschlange-anzeige { display: inline-block; white-space: nowrap; padding: 0.15rem 0.45rem; border-radius: 999px;
  border: 1px solid var(--accent-2); color: var(--text); font-size: 0.85rem; }
.warteschlange-anzeige.fehler { border-color: var(--danger); }
.capture-queued { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; border-left-color: var(--accent-2); }
.capture-status .capture-queued a, .capture-queued .small-btn { min-height: 44px; display: inline-flex; align-items: center; }
.warteschlange { margin-top: 1rem; max-width: 640px; }
.warteschlange h2 { margin-top: 0; }
.warteschlange-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.warteschlange-eintrag { padding: 0.5rem 0.6rem; border-left: 3px solid var(--accent-2); background: var(--bg-3);
  border-radius: var(--radius); overflow-wrap: anywhere; }
.warteschlange-eintrag.status-uebertragen { border-left-color: var(--accent); }
.warteschlange-eintrag.status-fehler { border-left-color: var(--danger); }
.warteschlange-aktionen { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.35rem; align-items: center; }
.warteschlange .small-btn, .warteschlange-aktionen a { min-height: 44px; }
/* Bearbeiten mit Versionsprüfung (E4): beide Fassungen */
.konflikt { border-left: 3px solid var(--accent-2); }
.konflikt dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 0.75rem; margin: 0.5rem 0; }
.konflikt dt { color: var(--muted); }
.konflikt dd { margin: 0; overflow-wrap: anywhere; }

/* Statusleiste (T4): eine Zeile unter der Kopfzeile, Details aufklappbar; Zustand nie nur über die Farbe (Symbol + Text) */
.statusleiste-rahmen { border-bottom: 1px solid var(--line); background: var(--bg); }
.statusleiste { max-width: 1100px; margin: 0 auto; padding: 0 1rem; font-size: 0.85rem; }
.statusleiste > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.35rem; min-height: 32px;
  padding: 0.2rem 0; cursor: pointer; list-style: none; color: var(--muted); overflow-wrap: anywhere; }
.statusleiste > summary::-webkit-details-marker { display: none; }
.status-symbol { display: inline-flex; justify-content: center; align-items: center; width: 1.2rem; height: 1.2rem;
  border-radius: 999px; font-size: 0.75rem; font-weight: 700; color: #0d1410; background: var(--accent); flex: none; }
.status-titel { color: var(--text); }
.status-mehr { margin-left: auto; color: var(--accent); }
.statusleiste[open] .status-mehr { visibility: hidden; }
.stufe-hinweis .status-symbol { background: var(--accent-2); }
.stufe-stoerung .status-symbol { background: var(--danger); }
.stufe-aus .status-symbol { background: var(--line); color: var(--text); }
.statusleiste-rahmen:has(.stufe-stoerung) { background: color-mix(in srgb, var(--danger) 9%, var(--bg)); border-bottom-color: var(--danger); }
.statusleiste-rahmen:has(.stufe-hinweis) { background: color-mix(in srgb, var(--accent-2) 9%, var(--bg)); border-bottom-color: var(--accent-2); }
.statusleiste-rahmen.nicht-erreichbar .status-titel { color: var(--muted); }
.statusleiste-abruf { color: var(--accent-2); }
.status-inhalt { padding: 0.25rem 0 0.75rem; }
.status-schritt, .status-weitere { margin: 0.25rem 0 0.5rem; }
.status-zahlen { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 0.75rem; margin: 0.5rem 0; }
.status-zahlen dt { color: var(--muted); }
.status-zahlen dd { margin: 0; overflow-wrap: anywhere; }
.status-h { font-size: 0.9rem; margin: 0.75rem 0 0.25rem; }
.status-protokoll { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
.status-protokoll li { padding-left: 0.5rem; border-left: 3px solid var(--line); overflow-wrap: anywhere; }
.status-protokoll li.offen, .status-tabelle tr.offen td:first-child { border-left: 3px solid var(--danger); }
@media (max-width: 420px) {
  .statusleiste { padding: 0 0.75rem; }
  .status-zahlen { grid-template-columns: 1fr; }
  .status-zahlen dd { margin-bottom: 0.3rem; }
}
/* Herkunft der Messwerte (T4) */
.tile-herkunft { font-size: 0.75rem; margin-top: 0.15rem; }
.tile-herkunft > summary { cursor: pointer; color: var(--muted); }
.tile-herkunft dl { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0.3rem 0 0; }
.tile-herkunft dt { color: var(--muted); margin-top: 0.2rem; }
.tile-herkunft dd { margin: 0; overflow-wrap: anywhere; }
.tile-herkunft ul { margin: 0; padding-left: 1rem; }
.herkunft-berechnet > summary, .herkunft-manuell > summary, .herkunft-beispiel > summary { color: var(--accent-2); }
.herkunft-unbekannt > summary { color: var(--muted); font-style: italic; }
/* Fußbereich: Suche und Sicherung (Kopfzeile bleibt auf Handys einzeilig) */
.fussnav { display: flex; gap: 1.2rem; justify-content: center; padding: 1.2rem 1rem 2rem; border-top: 1px solid var(--line, #2a332e); margin-top: 2rem; }
.suche-start { display: flex; gap: .5rem; margin: .5rem 0 1rem; }
.suche-start input { flex: 1; min-width: 0; }
/* Suche (T7) */
.suche-filter { margin: 8px 0; }
.suche-treffer { list-style: none; padding: 0; margin: 12px 0; }
.suche-treffer li { border-bottom: 1px solid var(--line, #2a332e); }
.suche-treffer a { display: block; padding: 10px 2px; color: inherit; text-decoration: none; }
.suche-treffer a:hover, .suche-treffer a:focus-visible { background: rgba(255, 255, 255, .04); }
.suche-kopf { display: block; margin-bottom: 3px; }
.suche-ausschnitt { display: block; overflow-wrap: anywhere; }
.badge-entwurf { background: var(--accent-2); color: #111; font-weight: 700; letter-spacing: .04em; }
.entwurf { border: 2px dashed var(--accent-2); }
.entwurf-aussagen { padding-left: 1.1em; }
.entwurf-aussagen li { margin: 3px 0; }
.entwurf-aussagen .aussage-luecke a, .entwurf-aussagen .aussage-stoerung a, .entwurf-aussagen .aussage-zuordnung a {
  color: var(--accent-2); }
.tagebuch-liste { list-style: none; padding: 0; }
.tagebuch-liste li { padding: 8px 0; border-bottom: 1px solid var(--line, #2a332e); }
.suche-ausschnitt mark { background: var(--accent-2); color: #111; border-radius: 2px; padding: 0 1px; }
.chart-herkunft { margin: 0 0 0.25rem; overflow-wrap: anywhere; }

.skip-nav { position: fixed; z-index: 20; inset: .5rem auto auto .5rem; transform: translateY(-180%); padding: .65rem 1rem; background: var(--bg-2); }
.skip-nav:focus { transform: none; }
.queue-notice:empty { display: none; }
.queue-notice:not(:empty) { padding: .4rem max(1rem, calc((100% - 1120px) / 2)); background: var(--bg-3); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.topbar :focus-visible { outline-color: #d1e9af; }
[hidden] { display: none !important; }
.statusleiste { max-width: 1152px; }
.status-symbol, .badge-entwurf, .suche-ausschnitt mark { color: var(--on-accent); }
.stufe-aus .status-symbol { color: var(--text); }
.journal-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; padding: clamp(.5rem, 1.6vw, 1.25rem) 0 clamp(1.25rem, 3vw, 2rem); border-bottom: 1px solid var(--line); }
.journal-heading h1 { font-size: clamp(2rem, 4.4vw, 3.7rem); margin: 0; line-height: 1.08; }
.journal-heading p { color: var(--muted); margin: .6rem 0 0; }
.journal-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem); margin: 1.9rem 0; }
.journal-grows h2, .tool-panel h2 { margin: 0 0 1rem; }
.item-count { font: 600 .85rem/1 system-ui, sans-serif; color: var(--muted); vertical-align: middle; margin-left: .45rem; }
.grow-entry { padding: 0; }
.grow-open, .tool-panel { padding: clamp(1rem, 2vw, 1.5rem); }
.grow-open { border-radius: var(--radius); }
.grow-open:hover { background: var(--bg-3); }
.grow-open .spread { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
.grow-open h3 { margin: 0; font: 500 clamp(1.35rem, 2.2vw, 1.8rem)/1.2 Georgia, serif; overflow-wrap: anywhere; }
.open-arrow { color: var(--accent); font-size: 1.4rem; }
.grow-meta { margin: .5rem 0; color: var(--muted); font-size: .9rem; }
.grow-badges:not(:empty) { margin-top: .8rem; }
.entry-links { display: flex; flex-wrap: wrap; gap: 0 1.3rem; padding: .1rem 1.25rem; border-top: 1px solid var(--line); }
.entry-links a, .back-link, .fussnav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .9rem; }
.tool-panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .9rem; }
.tool-panel .suche-start { margin: 0; }
.tool-panel p { color: var(--muted); }
.tool-panel.setup-banner { background: var(--bg-3); }
.back-link { margin-bottom: .2rem; }
.grow-manage { margin: .5rem 0 1.4rem; }
.grow-manage summary { padding: .6rem 0; color: var(--accent); cursor: pointer; width: fit-content; }
.container > section[id]:not(.warteschlange) { margin-top: 1.6rem; }
.tile { padding: 1rem; }
.tile-value { font-size: 1.7rem; }
.capture-form, .report-options { max-width: 760px; padding: clamp(1rem, 3vw, 2rem); background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; }
.capture-form legend { font-weight: 600; }
.capture-form .chips, .capture-form .capture-photos { padding-block: .5rem .9rem; margin-top: 1rem; }
.report-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.report-intro { color: var(--muted); max-width: 62ch; margin: 0 0 1.5rem; }
.report-options h2 { margin-top: 0; }
.report-options .cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.report-files { padding-left: 1.25rem; }
.report-files li { margin: .6rem 0; }
.fussnav a { text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 720px) {
  .statusleiste > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .1rem .45rem; }
  .status-mehr { grid-column: 3; grid-row: 1; }
  .status-zusatz, .statusleiste-abruf { grid-column: 2 / -1; }
  .journal-layout, .report-layout { grid-template-columns: 1fr; }
  .mainnav a { padding-inline: 0; }
}
@media (max-width: 380px) {
  .container { padding-inline: .75rem; }
  .topbar { gap: .35rem; }
  .mainnav { gap: .5rem; }
  .topbar .quick { padding-inline: .45rem; }
}
/* Mehrere Konten (docs/ausbau/MEHRBENUTZER.md): Fußzeile mit Konto und Abmelden, Anmeldeseiten, Kontoseite */
.fussnav { flex-wrap: wrap; row-gap: .2rem; }
.fussnav .abmelden { display: inline-flex; margin: 0; }
button.linkartig { background: none; border: 0; padding: 0; min-height: 44px; color: var(--accent); font-weight: 600;
  font-size: .9rem; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.konto-karte { max-width: 30rem; margin: 1rem auto; }
.kennzahlen { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem 1rem; margin: .5rem 0; }
.kennzahlen dt { color: var(--muted); }
.kennzahlen dd { margin: 0; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code.copy { overflow-wrap: anywhere; }
.konto-veraltet { margin: 1rem; }
