/* selbstausgebaut.de
   Schriften: Barlow Semi Condensed und Source Serif 4, beide SIL Open Font License 1.1 */

@font-face { font-family: "Barlow SC"; src: url("fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow SC"; src: url("fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --grund: #FAF6EE;
  --bambus: #D8C69A;
  --holz: #E9D8B8;
  --holz-dunkel: #5A4632;
  --linie: #3B3125;
  --kopf-schrift: "Barlow SC", "Arial Narrow", Arial, sans-serif;
  --text-schrift: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #FAF6EE;
  background: var(--grund, #FAF6EE);
  color: #3B3125;
  color: var(--linie, #3B3125);
  font-family: Georgia, serif;
  font-family: var(--text-schrift, Georgia, serif);
  font-size: 1.125rem;
  line-height: 1.7;
}
img, svg { max-width: 100%; height: auto; }
a { color: #5A4632; color: var(--holz-dunkel, #5A4632); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #5A4632; outline: 3px solid var(--holz-dunkel, #5A4632); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; background: #5A4632; color: #FAF6EE; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

h1, h2, h3 {
  font-family: Arial, sans-serif;
  font-family: var(--kopf-schrift, Arial, sans-serif);
  color: #3B3125;
  color: var(--linie, #3B3125);
  line-height: 1.12;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 700; margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); font-weight: 700; margin: 3.25rem 0 .9rem; }
h3 { font-size: 1.3rem; font-weight: 600; margin: 2rem 0 .5rem; }
p { margin: 0 0 1.1rem; }

/* Kopf */
.kopf { background: #E9D8B8; background: var(--holz, #E9D8B8); border-bottom: 6px solid #D8C69A; border-bottom: 6px solid var(--bambus, #D8C69A); }
.kopf-innen { max-width: 72rem; margin: 0 auto; padding: .9rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.marke { font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 700; font-size: 1.45rem; color: #3B3125; text-decoration: none; letter-spacing: -0.01em; }
.marke span { color: #5A4632; font-weight: 600; }
.navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem .25rem; }
.navigation a { display: block; padding: .35rem .6rem; font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 600; font-size: 1.02rem; color: #3B3125; text-decoration: none; border-radius: 3px; }
.navigation a:hover { background: #D8C69A; }
.navigation a[aria-current="page"] { background: #5A4632; color: #FAF6EE; }
.menue-knopf { display: none; font: inherit; font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 600; background: #FAF6EE; color: #3B3125; border: 2px solid #5A4632; border-radius: 3px; padding: .35rem .9rem; cursor: pointer; }

/* Brotkruemel */
.kruemel { max-width: 72rem; margin: 0 auto; padding: .7rem 1.25rem 0; font-size: .95rem; }
.kruemel ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.kruemel li + li::before { content: "/"; margin-right: .4rem; color: #5A4632; }

/* Inhalt */
main { display: block; }
.buehne { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1.25rem 1rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2.5rem; align-items: center; }
.buehne-text p { font-size: 1.22rem; max-width: 34rem; }
.plan { margin: 0; background: #E9D8B8; border: 2px solid #3B3125; border-radius: 4px; padding: 1.1rem 1.1rem .8rem;
        background-image: repeating-linear-gradient(90deg, rgba(90,70,50,.06) 0 2px, transparent 2px 42px); }
.plan-bild { overflow-x: auto; }
.plan img { display: block; width: 100%; }
.plan figcaption { font-size: .92rem; margin-top: .55rem; color: #5A4632; }

.text { max-width: 44rem; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.text ul, .text ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.text li { margin-bottom: .45rem; }

.wegweiser { list-style: none; padding: 0 !important; margin: 1.5rem 0 1rem !important; border-top: 2px solid #3B3125; }
.wegweiser li { margin: 0 !important; border-bottom: 1px solid #D8C69A; }
.wegweiser a { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; padding: .9rem 0; text-decoration: none; color: #3B3125; }
.wegweiser a:hover .weg-name { text-decoration: underline; }
.weg-name { font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 700; font-size: 1.15rem; color: #5A4632; }

.merke { background: #E9D8B8; border-left: 6px solid #5A4632; padding: 1rem 1.2rem; margin: 1.5rem 0; border-radius: 0; }
.merke p:last-child { margin-bottom: 0; }

.faq dt { font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 700; font-size: 1.2rem; margin-top: 1.5rem; }
.faq dd { margin: .35rem 0 0; }

.vergleich { overflow-x: auto; margin: 1.5rem 0; }
.vergleich table { border-collapse: collapse; width: 100%; font-size: 1rem; min-width: 32rem; }
.vergleich th, .vergleich td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid #D8C69A; vertical-align: top; }
.vergleich thead th { font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-size: 1.1rem; border-bottom: 2px solid #3B3125; }
.vergleich tbody th { font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 600; min-width: 8rem; }

.vergleich td:last-child { white-space: nowrap; }
.vergleich-text td:last-child { white-space: normal; }
.vergleich caption { caption-side: bottom; text-align: left; font-size: .9rem; color: #5A4632; padding-top: .45rem; }
.quellen { font-size: .95rem; color: #5A4632; border-top: 1px solid #D8C69A; padding-top: 1rem; margin-top: 2.5rem; }

/* Varianten der Buehne: Zeichnung links oder ueber volle Breite */
.buehne-umgekehrt { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.buehne-umgekehrt .plan { order: -1; }
.buehne-breit { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
.buehne-breit .plan { order: -1; max-width: 46rem; }
.buehne-breit .buehne-text { max-width: 46rem; }
.buehne-breit .buehne-text p { max-width: none; }

/* Schriftfeld wie auf einer technischen Zeichnung */
.schriftfeld { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid #3B3125; margin: 1.75rem 0 2rem; background: #FFFDF8; }
.schriftfeld div { padding: .6rem .85rem; border-right: 1px solid #3B3125; border-bottom: 1px solid #3B3125; }
.schriftfeld div:nth-child(3n) { border-right: 0; }
.schriftfeld div:nth-last-child(-n+3) { border-bottom: 0; }
.schriftfeld dt { font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 600; font-size: .85rem; color: #5A4632; }
.schriftfeld dd { margin: .15rem 0 0; font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 700; font-size: 1.3rem; color: #3B3125; }

/* Passungsmatrix */
.matrix td { text-align: center; }
.matrix td.passt { font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 700; color: #3B3125; background: #E9D8B8; }
.matrix td.leer { color: #5A4632; }

/* Zeitleiste fuer Fahrzeuggenerationen */
.zeitleiste { list-style: none; padding: 0 !important; margin: 1.5rem 0 2rem !important; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.zeitleiste li { margin: 0 !important; border-top: 6px solid #D8C69A; padding-top: .6rem; }
.zeitleiste li.aktuell { border-top-color: #5A4632; }
.zeit-jahr { display: block; font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 700; font-size: 1.35rem; color: #3B3125; }
.zeit-name { display: block; font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 600; color: #5A4632; margin-bottom: .3rem; }
.zeitleiste p { font-size: 1rem; margin: 0; }

/* Stueckliste mit Summe */
.stueckliste table { min-width: 0; }
.stueckliste tfoot th, .stueckliste tfoot td { border-top: 3px double #3B3125; border-bottom: 0; font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 700; font-size: 1.1rem; }
.stueckliste td:last-child, .stueckliste tfoot th:last-child, .stueckliste thead th:last-child { text-align: right; }
.stueckliste caption { caption-side: top; font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 700; font-size: 1.15rem; color: #3B3125; padding: 0 0 .4rem; }

/* Fotos im Text */
.foto { margin: 2rem 0 2.25rem; }
.foto img { display: block; width: 100%; height: auto; border-radius: 4px; border: 2px solid #3B3125; background: #E9D8B8; }
.foto figcaption { font-size: .95rem; color: #5A4632; margin-top: .55rem; }

/* Hinweisleiste am unteren Rand, klebt beim Scrollen, verdeckt am Seitenende nichts */
.hinweis { position: sticky; bottom: 0; z-index: 50; background: #5A4632; background: var(--holz-dunkel, #5A4632); color: #FAF6EE; border-top: 3px solid #D8C69A; box-shadow: 0 -4px 14px rgba(59, 49, 37, .25); }
.hinweis-innen { max-width: 72rem; margin: 0 auto; padding: .9rem 1.25rem calc(.9rem + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; }
.hinweis-text { max-height: 34vh; overflow-y: auto; font-size: .92rem; line-height: 1.5; padding-right: .5rem; }
.hinweis-text p { margin: 0 0 .5rem; max-width: none; }
.hinweis-text p:last-child { margin-bottom: 0; }
.hinweis-titel { font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-size: 1.15rem; }
.hinweis-cookie { color: #E9D8B8; }
.hinweis-knopf { font: inherit; font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 700; font-size: 1.05rem; background: #D8C69A; color: #3B3125; border: 2px solid #D8C69A; border-radius: 4px; padding: .7rem 1.2rem; cursor: pointer; white-space: nowrap; }
.hinweis-knopf:hover { background: #E9D8B8; border-color: #E9D8B8; }
.hinweis-knopf:focus-visible { outline: 3px solid #FAF6EE; outline-offset: 2px; }
@media (max-width: 720px) {
  .hinweis-innen { grid-template-columns: minmax(0, 1fr); gap: .75rem; padding-top: .75rem; }
  .hinweis-text { max-height: 28vh; }
  .hinweis-knopf { width: 100%; }
}

/* Fuss */
.fuss { background: #3B3125; color: #E9D8B8; margin-top: 2rem; }
.fuss a { color: #FAF6EE; }
.fuss-innen { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1.25rem 1.5rem; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin: .3rem 0; font-size: 1rem; }
.fuss-themen ul { columns: 2; column-gap: 2rem; }
.fuss-titel { font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 700; font-size: 1.1rem; color: #D8C69A; margin-bottom: .6rem; }
.fuss-zeile { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem 2rem; font-size: .92rem; color: #D8C69A; }

/* Fehlerseite */
.fehler { max-width: 44rem; margin: 0 auto; padding: 3rem 1.25rem; }

@media (max-width: 860px) {
  .buehne-umgekehrt .plan { order: 0; }
  .buehne { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; padding-top: 1.75rem; }
  .fuss-innen { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .zeitleiste { grid-template-columns: minmax(0, 1fr); }
  .schriftfeld { grid-template-columns: minmax(0, 1fr); }
  .schriftfeld div { border-right: 0; border-bottom: 1px solid #3B3125; }
  .schriftfeld div:nth-last-child(-n+3) { border-bottom: 1px solid #3B3125; }
  .schriftfeld div:last-child { border-bottom: 0; }
  .plan img { width: 640px; max-width: none; }
  .js .menue-knopf { display: inline-block; }
  .js .navigation { display: none; width: 100%; }
  .js .navigation.offen { display: block; }
  .navigation ul { flex-direction: column; }
  .navigation a { padding: .6rem .5rem; font-size: 1.1rem; }
  .wegweiser a { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  body { font-size: 1.06rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Admin */
.adm-inhalt { max-width: 60rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.adm-inhalt h1 { font-size: 2.2rem; }
.adm-abmelden { margin: 0; }
.adm-knopf { font: inherit; font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); font-weight: 600; background: #5A4632; color: #FAF6EE; border: 0; border-radius: 3px; padding: .55rem 1.1rem; cursor: pointer; margin-top: .8rem; }
.adm-knopf-hell { background: #FAF6EE; color: #3B3125; border: 2px solid #5A4632; margin-top: 0; padding: .3rem .9rem; }
.adm-form { max-width: 26rem; }
.adm-form label { display: block; margin: .8rem 0 0; font-size: 1rem; }
.adm-form input { display: block; width: 100%; margin-top: .25rem; font: inherit; padding: .5rem .6rem; border: 2px solid #D8C69A; border-radius: 3px; background: #FFFDF8; color: #3B3125; }
.adm-form input:focus { border-color: #5A4632; outline: none; }
.adm-meldung { padding: .7rem 1rem; border-left: 6px solid #5A4632; background: #E9D8B8; }
.adm-err { border-left-color: #9B2C1C; }
.adm-hinweis { font-size: .98rem; color: #5A4632; }
.adm-tabelle { overflow-x: auto; }
.adm table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.adm th, .adm td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid #D8C69A; vertical-align: top; white-space: nowrap; }
.adm th { font-family: Arial, sans-serif; font-family: var(--kopf-schrift, Arial, sans-serif); border-bottom: 2px solid #3B3125; }
.adm td:first-child { white-space: normal; min-width: 12rem; }
.adm tr[aria-current="true"] td { background: #E9D8B8; }
.adm-summe td { font-weight: 600; }
.adm-zahl { font-variant-numeric: tabular-nums; }
.adm-klein { font-size: .85rem; color: #5A4632; }
.adm-verlauf { margin: 0; background: #FFFDF8; border: 2px solid #D8C69A; border-radius: 4px; padding: 1rem; }
.adm-verlauf figcaption { font-size: .9rem; margin-top: .4rem; }
.adm-legende { display: inline-block; width: .9rem; height: .9rem; vertical-align: -1px; margin: 0 .3rem 0 .8rem; }
.adm-legende-hell { background: #D8C69A; margin-left: 0; }
.adm-legende-dunkel { background: #5A4632; }
.adm-herkunft { max-width: 32rem; }
