/* fahrtenbuch.css — „Logbuch und Straße“: heller Betongrund, Asphalt-Anthrazit und Signalgelb.
   Nur für die Fahrtenbuch-Auswertung. Die Seite ist bewusst auf den hellen Modus festgelegt
   (data-theme="light" am html-Element), der Kopf ist ein eigener dunkler Asphalt-Bereich. */

@font-face { font-family: "Archivo"; src: url("../../schrift/archivo-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Big Shoulders Display"; src: url("../../schrift/big-shoulders-display-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root, :root[data-theme="light"] {
  color-scheme: light;
  --asphalt: #1c1f23; --asphalt-2: #2a2e34; --asphalt-3: #3c4149;
  --gelb: #f7bd00; --gelb-tief: #d79f00;
  --flaeche-0: #ecebe6; --flaeche-1: #fbfbf8; --flaeche-2: #e2e1da;
  --linie: #c9c7bf; --raster: #e2e0d9;
  --text-1: #16181b; --text-2: #474b52; --text-3: #696d74;
  --akzent: #1c1f23; --akzent-text: #16181b;
  /* Art der Fahrt: fest auf der ganzen Seite. Dunkel, Blau und Orange unterscheiden sich auch bei Farbfehlsichtigkeit. */
  --art-d: #2b3037; --art-a: #3a84d8; --art-p: #e8720c; --art-o: #a8a69e;
  --fb-neutral: #868a90;
  --s1: #2b3037; --s2: #e8720c; --s3: #3a84d8; --s4: #f7bd00;
  --q1: #e7e6e0; --q2: #cdcecb; --q3: #adb1b3; --q4: #8a8f95; --q5: #666c74; --q6: #424850; --q7: #1e2226;
  --schatten: 0 1px 0 rgb(0 0 0 / .05), 0 10px 22px -16px rgb(0 0 0 / .35);
  --schau: "Big Shoulders Display", "Archivo", system-ui, sans-serif;
}

html, body { overflow-x: clip; }
html { overflow-x: clip; }
body { font-family: "Archivo", system-ui, sans-serif; font-size: 16px; }
a { text-underline-offset: 3px; }

/* Tastatur: zweifarbiger Rahmen, auf hellem und dunklem Grund sichtbar */
:focus-visible { outline: 2px solid var(--asphalt); outline-offset: 2px; box-shadow: 0 0 0 2px var(--gelb); border-radius: 3px; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, .knopf:focus-visible { outline: 2px solid var(--asphalt); outline-offset: 2px; box-shadow: 0 0 0 2px var(--gelb); }
.knopf:has(input:focus-visible), .fb-haken:has(input:focus-visible) { outline: 2px solid var(--asphalt); outline-offset: 2px; box-shadow: 0 0 0 2px var(--gelb); }
.fb-kopf :focus-visible { outline-color: var(--gelb); box-shadow: 0 0 0 2px var(--asphalt); }

/* ---------- Kopf: Asphalt mit Kilometerzähler ---------- */
.fb-kopf { background: var(--asphalt); color: #f4f3ee; position: relative; }
.fb-leiste { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; border-bottom: 1px solid rgb(255 255 255 / .14); }
.fb-kopf .a-zurueck { color: #c9cbce; }
.fb-kopf .a-zurueck:hover { color: #fff; }
.fb-marke { margin: 0; font-family: var(--schau); font-weight: 800; font-size: 21px; color: var(--asphalt); background: var(--gelb); padding: 3px 12px 2px; border-radius: 2px; }
.fb-buehne { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px 56px; align-items: end; padding: 44px 0 36px; }
.fb-wort h1 { margin: 0 0 16px; font-family: var(--schau); font-weight: 800; font-size: clamp(42px, 5.6vw, 88px); line-height: 1.02; text-transform: uppercase; max-width: 16ch; text-wrap: balance; }
.fb-wort h1 span { color: var(--gelb); display: block; }
.fb-wort > p { margin: 0; max-width: 46ch; font-size: 18px; color: #d2d4d7; }
.fb-kopf .a-quelle { margin-top: 22px; color: #b9bcc0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.fb-kopf .a-schild { background: rgb(255 255 255 / .1); color: #fff; border-radius: 2px; padding: 5px 10px; }
.fb-kopf .a-schild i { background: var(--gelb); border-radius: 0; transform: rotate(45deg); }
.fb-kopf .a-schild.eigen i { background: #5fd35f; }

.fb-zaehler { justify-self: end; max-width: 100%; }
.fb-zaehler-name { margin: 0 0 10px; font-size: 14px; color: #b9bcc0; }
.fb-ziffern { margin: 0; display: flex; align-items: flex-end; gap: clamp(3px, .45vw, 6px); font-family: var(--schau); font-weight: 800; font-size: clamp(54px, 7.4vw, 112px); line-height: 1; }
.fb-ziffern span { display: grid; place-items: center; width: .66em; height: 1.16em; border-radius: 4px; color: var(--asphalt);
  background: linear-gradient(180deg, #b9b8b1 0, #f3f2ec 22%, #fbfbf8 50%, #f3f2ec 78%, #b9b8b1 100%); }
.fb-ziffern span.leer { color: rgb(28 31 35 / .28); }
.fb-ziffern span.letzte { background: linear-gradient(180deg, #b98a00 0, #f7bd00 22%, #ffd033 50%, #f7bd00 78%, #b98a00 100%); }
.fb-ziffern em { font-style: normal; font-size: .3em; font-weight: 700; color: #b9bcc0; margin: 0 0 .5em .25em; }
.fb-anteil { margin-top: 18px; }
.fb-spur { display: flex; height: 22px; gap: 2px; padding: 4px; background: #f3f2ec; border-radius: 2px; }
.fb-spur i { display: block; min-width: 2px; }
.fb-spur-legende { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: #d2d4d7; }
.fb-spur-legende li { display: inline-flex; align-items: center; gap: 7px; }
.fb-spur-legende i { width: 11px; height: 11px; outline: 1px solid rgb(255 255 255 / .55); outline-offset: -1px; }
.fb-spur-legende b { color: #fff; font-weight: 650; }

/* Logbuchzeile: Spalten mit senkrechten Linien statt Kacheln */
.fb-zeile { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid rgb(255 255 255 / .14); }
.fb-zeile > div { padding: 16px 20px 22px 0; margin-right: 20px; border-right: 1px solid rgb(255 255 255 / .14); min-width: 0; }
.fb-zeile > div:last-child { border-right: 0; margin-right: 0; }
.fb-zeile dt { font-size: 13px; color: #b9bcc0; }
.fb-zeile dd { margin: 4px 0 0; font-family: var(--schau); font-weight: 700; font-size: 32px; line-height: 1.05; letter-spacing: .01em; color: #fff; overflow-wrap: anywhere; }
.fb-zeile dd small { display: block; margin-top: 5px; font-family: "Archivo", system-ui, sans-serif; font-weight: 400; font-size: 13px; line-height: 1.35; letter-spacing: 0; color: #b9bcc0; }
.fb-mittelstreifen { height: 18px; background: var(--asphalt-2) repeating-linear-gradient(90deg, var(--gelb) 0 54px, transparent 54px 96px) 0 50% / auto 4px no-repeat; }

@media (max-width: 900px) {
  .fb-buehne { grid-template-columns: 1fr; padding: 30px 0 28px; }
  .fb-zaehler { justify-self: start; }
  .fb-zeile { grid-template-columns: 1fr 1fr; }
  .fb-zeile > div { border-right: 0; margin-right: 0; padding: 12px 12px 14px 0; border-bottom: 1px solid rgb(255 255 255 / .14); }
  .fb-zeile > div:last-child { border-bottom: 0; }
  .fb-zeile dd { font-size: 26px; }
}
@media (max-width: 480px) {
  .fb-wort h1 { font-size: 44px; }
  .fb-wort > p { font-size: 16px; }
  .fb-ziffern { font-size: 15.5vw; }
}

/* ---------- Ablage, Knöpfe, Einstellleiste ---------- */
.ablage { margin: 28px 0 20px; border-radius: 3px; border: 2px dashed var(--asphalt-3); }
.ablage svg { color: var(--asphalt); }
.knopf { border-radius: 3px; background: var(--gelb); color: var(--asphalt); font-weight: 700; white-space: nowrap; }
.knopf:hover { filter: none; background: #ffd033; }
.knopf.leise { background: var(--flaeche-1); border-color: var(--asphalt-3); }
.knopf.leise:hover { background: var(--flaeche-2); }
.knopf:active, .tabelle-knopf:active, .fb-pz:active { transform: translateY(1px); }
.fb-hinweis { margin: -6px 0 20px; font-size: 14px; color: var(--text-2); max-width: 100ch; border-left: 4px solid var(--gelb); padding-left: 12px; }

.fb-stell { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; padding: 16px 18px; background: var(--flaeche-1); border: 1px solid var(--linie); border-left: 6px solid var(--asphalt); border-radius: 3px; }
.fb-feld { display: grid; gap: 5px; font-size: 13px; color: var(--text-2); }
.fb-feld select.feld { border-radius: 3px; border-color: var(--asphalt-3); max-width: 240px; }
.fb-eingabe { display: inline-flex; align-items: center; border: 1px solid var(--asphalt-3); border-radius: 3px; background: #fff; }
.fb-eingabe input { width: 74px; min-height: 42px; padding: 0 6px 0 10px; border: 0; background: transparent; color: var(--text-1); font: inherit; font-size: 15px; font-weight: 600; text-align: right; border-radius: 3px; }
.fb-eingabe i { font-style: normal; padding: 0 10px 0 2px; color: var(--text-3); font-size: 14px; }
.fb-haken { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--text-1); cursor: pointer; }
.fb-haken input { width: 20px; height: 20px; accent-color: var(--asphalt); }
.fb-stell-text { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--text-3); }
button:disabled, input:disabled, select:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Abschnitte und Karten: kantig, mit Asphaltkante oben ---------- */
.abschnitt { margin-top: 52px; }
.abschnitt > h2 { font-family: var(--schau); font-weight: 800; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.04; letter-spacing: .01em; text-transform: uppercase; text-wrap: balance; margin: 0 0 8px; padding-left: 16px; border-left: 8px solid var(--gelb); }
.abschnitt > p.unter { margin-bottom: 18px; font-size: 16px; }
.gitter { gap: 16px; }
.karte { border-radius: 3px; border: 1px solid var(--linie); border-top: 4px solid var(--asphalt); padding: 18px 20px 16px; box-shadow: var(--schatten); }
.karte-kopf h2 { font-size: 17px; font-weight: 700; }
.karte-kopf .tabelle-knopf, .tabelle-knopf { border-radius: 3px; border: 1px solid var(--asphalt-3); color: var(--text-1); min-height: 34px; background: transparent; font: inherit; font-size: 12px; padding: 0 10px; cursor: pointer; }
.karte-kopf .tabelle-knopf:hover, .tabelle-knopf:hover { background: var(--flaeche-2); }
.gitter > .allein { grid-column: 1 / -1; }
.fb-stapel { grid-column: span 6; display: grid; gap: 16px; align-content: start; min-width: 0; }
.fb-stapel .karte { grid-column: auto; }
@media (max-width: 1020px) { .fb-stapel { grid-column: 1 / -1; } }
.einsicht { font-size: 15px; }
.legende i { border-radius: 0; }
.tabelle-huelle { border-radius: 3px; border-color: var(--linie); }
table.daten th { background: var(--asphalt); color: #f4f3ee; }
table.daten tr:hover td { background: rgb(247 189 0 / .14); }
.als-tabelle, .fb-tabelle { max-width: 100%; min-width: 0; }
.tipp { border-radius: 3px; border-color: var(--asphalt-3); }
.fb-tipp-bef { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--raster); font-size: 12px; color: var(--text-2); max-width: 250px; }

/* ---------- Jahresband ---------- */
.fb-bandkarte { padding-bottom: 18px; }
.fb-legende { margin-bottom: 12px; gap: 6px 18px; }
.fb-legende .fb-frei { background: #d5d3ca; }
.fb-legende .fb-kerbe { background: var(--art-d); clip-path: polygon(0 100%, 0 35%, 50% 0, 100% 35%, 100% 100%); }
.fb-raute { width: 13px; height: 13px; fill: var(--gelb); stroke: var(--asphalt); stroke-width: 1.4; }
.fb-raute.dunkel { fill: var(--asphalt); stroke: var(--gelb-tief); }
#d-band .fb-fach { fill: #e9e8e2; }
#d-band .fb-fach.frei { fill: #d5d3ca; }
#d-band .fb-monat { font-family: var(--schau); font-weight: 700; font-size: 17px; fill: var(--text-1); letter-spacing: .02em; }
#d-band .fb-monat-km { font-size: 12px; font-weight: 600; fill: var(--text-2); }
#d-band .fb-kerbe-linie { fill: none; stroke: #fff; stroke-width: 1.6; pointer-events: none; }
#d-band .fb-marke-raute { fill: var(--gelb); stroke: var(--asphalt); stroke-width: 1.4; pointer-events: none; }
#d-band .fb-marke-raute.dunkel { fill: var(--asphalt); stroke: var(--gelb-tief); }
#d-band .fb-treffer { cursor: pointer; }
#d-band .fb-treffer:hover { fill: rgb(247 189 0 / .28); }
#d-band .fb-treffer.gewaehlt { fill: rgb(247 189 0 / .2); stroke: var(--asphalt); stroke-width: 1.5; }
@media (max-width: 560px) { #d-band .fb-monat { font-size: 14px; } }

.fb-tag { margin-top: 14px; padding: 14px 16px; background: var(--flaeche-0); border-left: 6px solid var(--gelb); max-width: 100%; min-width: 0; }
.fb-tag-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.fb-tag-kopf h3 { margin: 0; font-family: var(--schau); font-weight: 700; font-size: 22px; }
.fb-tag-kopf p { margin: 0; font-size: 14px; color: var(--text-2); }
.fb-tag-kopf button { margin-left: auto; }
.fb-tag-bef { margin: 0 0 10px; padding-left: 18px; font-size: 14px; color: var(--text-1); }

/* ---------- Prüfungen ---------- */
.fb-pruef { display: grid; }
.fb-pz { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(92px, auto); gap: 4px 12px; align-items: center; width: 100%; min-height: 48px; padding: 8px 10px 8px 12px; border: 0; border-top: 1px solid var(--raster); border-left: 4px solid transparent;
  background: transparent; color: var(--text-1); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.fb-pz:first-child { border-top: 0; }
.fb-pz:hover { background: var(--flaeche-0); }
.fb-pz[aria-pressed="true"] { background: var(--flaeche-2); border-left-color: var(--gelb); }
.fb-pz.alle { grid-template-columns: minmax(0, 1fr) auto; font-weight: 650; }
.fb-pz-name small { display: block; font-size: 12px; color: var(--text-3); font-weight: 400; }
.fb-pz b { font-family: var(--schau); font-size: 24px; font-weight: 700; line-height: 1; text-align: right; min-width: 2ch; }
.fb-pz .status { justify-self: start; }
.fb-tabelle .tabelle-huelle { max-height: 520px; }
.fb-tabelle table.daten td:last-child, .fb-tabelle table.daten th:last-child { white-space: normal; min-width: 300px; }
.fb-tabelle table.daten td:nth-child(2) { white-space: normal; min-width: 170px; }
.fb-wisch { display: none; margin: 0 0 6px; font-size: 12px; color: var(--text-3); }
@media (max-width: 900px) { .fb-wisch { display: block; } .fb-tabelle table.daten td:last-child, .fb-tabelle table.daten th:last-child { min-width: 240px; } }

/* ---------- Balkenliste mit Stapel, Spanne und Marke ---------- */
.fb-liste { display: grid; }
.fb-lz { display: grid; grid-template-columns: minmax(0, var(--nb, 230px)) minmax(40px, 1fr) minmax(96px, auto); gap: 2px 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--raster); }
.fb-lz:first-child { border-top: 0; }
.fb-lz-name { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.fb-lz-name small { display: block; font-size: 12px; color: var(--text-3); }
.fb-lz-spur { position: relative; display: flex; gap: 2px; height: 18px; min-width: 0; border-left: 2px solid var(--asphalt); }
.fb-lz-spur i { display: block; height: 100%; min-width: 2px; transform-origin: 0 50%; animation: fb-wachsen .8s cubic-bezier(.2,.7,.2,1) both; }
.fb-lz-wert { font-size: 14px; font-weight: 650; text-align: right; white-space: nowrap; }
.fb-lz-wert small { display: block; font-size: 12px; font-weight: 400; color: var(--text-3); }
.fb-spanne { position: absolute; top: 5px; height: 8px; background: var(--q3); }
.fb-median { position: absolute; top: 0; width: 3px; height: 18px; margin-left: -1.5px; background: var(--asphalt); }
.fb-punkt { position: absolute; top: 3.5px; width: 11px; height: 11px; margin-left: -5.5px; background: var(--gelb); border: 1.5px solid var(--asphalt); transform: rotate(45deg); }
.fb-leer { margin: 6px 0; font-size: 14px; color: var(--text-3); }
@keyframes fb-wachsen { from { transform: scaleX(0); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .fb-lz-spur i { animation: none; } }
@media (max-width: 620px) {
  .fb-lz { grid-template-columns: minmax(0, 1fr) auto; }
  .fb-lz-name { grid-column: 1 / -1; }
  .fb-lz-wert { white-space: normal; max-width: 44vw; }
}

/* ---------- Rechnung ---------- */
.fb-posten { display: grid; }
.fb-po { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--raster); font-size: 14px; }
.fb-po:first-child { border-top: 0; }
.fb-po small { display: block; font-size: 12px; color: var(--text-3); }
.fb-po b { font-family: var(--schau); font-weight: 700; font-size: 24px; line-height: 1; white-space: nowrap; }
.fb-po.summe { margin-top: 4px; padding: 12px 12px; border-top: 3px solid var(--asphalt); background: var(--gelb); color: var(--asphalt); font-weight: 650; }
.fb-po.summe b { font-size: 30px; }

/* ---------- Fuß ---------- */
.a-fuss { border-top: 4px solid var(--asphalt); }
.zeichen-link { border-radius: 3px; }

/* ---------- Excel-Vorlage: dritter Knopf im Ablagefeld und neben dem CSV-Knopf ---------- */
@media (min-width: 721px) and (max-width: 1100px) { .ablage .knoepfe { max-width: 330px; } }
#vorlage, #vorlage ~ a.knopf { margin-block: 4px; }

/* Druck: der dunkle Kopf wird hell, Gelb bleibt als Kennfarbe */
html.druckt .fb-kopf { background: #fff !important; color: #16181b !important; border-bottom: 1.5px solid #16181b; }
html.druckt .fb-buehne { padding: 0 0 16px !important; grid-template-columns: 1fr !important; gap: 16px !important; }
html.druckt .fb-wort h1 { font-size: 34px !important; }
html.druckt .fb-wort > p, html.druckt .fb-kopf .a-quelle, html.druckt .fb-zaehler-name, html.druckt .fb-ziffern em,
html.druckt .fb-zeile dt, html.druckt .fb-zeile dd small { color: #474b52 !important; }
html.druckt .fb-kopf .a-schild { background: #e2e1da !important; color: #16181b !important; }
html.druckt .fb-zaehler { justify-self: start !important; }
html.druckt .fb-ziffern { font-size: 54px !important; }
html.druckt .fb-ziffern span { border: 1px solid #c9c7bf; }
html.druckt .fb-zeile { border-top-color: #c9c7bf !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
html.druckt .fb-zeile > div { border-color: #c9c7bf !important; }
html.druckt .fb-zeile dd { color: #16181b !important; font-size: 26px !important; }
html.druckt .fb-mittelstreifen, html.druckt .fb-leiste { display: none !important; }
html.druckt .fb-wort h1 span { color: #8a6800 !important; }

/* Verweis auf „Datei erkennen lassen“ */
.erkennen-satz { display: block; margin-top: 6px; font-size: 14px; color: var(--text-2); }
.erkennen-satz a { color: var(--akzent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
