/* Kayser BCN – Datenbankwerkzeug für den Schadenfall.
   Aufbau: Die Navigation liegt auf einem kühlen Grund, der Inhalt auf einem erhabenen Blatt mit runden Ecken.
   Bedienelemente sind gefüllte Flächen statt Linienkästen; Tiefe entsteht in drei Stufen (Bedienelement, Karte, Fenster).
   Blickfang ist die Karte, weil Entfernung im Schaden entscheidet: Sie trägt die Übersicht und das Matching-Ergebnis.
   Geist für die Oberfläche, Archivo schmal nur für große Modellnamen (wie auf Typenschildern).
   Kupfer aus der Marke sv-kayser.de nur für Auswahl und Hauptaktion.

   Größen nach aktuellen Vorgaben, alles in rem, damit die Schriftgröße des Browsers mitwirkt:
   - Text in Tabellen 15 px: Oberkante zwischen Carbon und Fluent (14 px) und Lesetext (16 px, U.S. Web Design System).
   - Lesetext und Eingabefelder 16 px, Nebenangaben 14 px; 13 px nur für Tastenhinweise.
   - Schaltflächen und Filter 40 px, klein 32 px, groß 48 px (Carbon md, sm, lg); Tabellenzeilen mindestens 48 px.
   - Überschriften 28 und 20 px (Carbon heading-04 und heading-03, Fluent Title 2 und Subtitle 1).
   - Klickziele mindestens 24 px (WCAG 2.2, 2.5.8 AA), auf Touchgeräten 44 px (WCAG 2.5.5 AAA, Apple).
   Alle Farben als Tokens; Textkontraste mindestens 4,5:1 (WCAG AA), der Dunkelmodus hat eigene Werte. */

:root {
  --ground: #eceef1;
  --paper: #ffffff;
  --fill: #f1f3f5;
  --fill-2: #e6e9ed;
  --ink: #101418;
  --ink-2: #454f5a;
  --ink-3: #5c6672;
  --line: #e9ecef;
  --line-2: #d6dae0;
  --hover: #f6f7f9;
  --accent: #c3520d;
  --accent-fill: #c3520d;
  --accent-fill-hover: #a94608;
  --accent-ink: #a24305;
  --accent-soft: #fcf1e9;
  --accent-line: #eec9ae;
  --accent-glow: rgba(195, 82, 13, 0.18);
  --lvl-a: #17663f;
  --lvl-a-bg: #e2f4ea;
  --lvl-b: #2b4c94;
  --lvl-b-bg: #e7edfb;
  --lvl-c: #7d4f00;
  --lvl-c-bg: #fbefd8;
  --ok: #1f7a4d;
  --warn: #8a5800;
  --danger: #c0352d;
  --danger-fill: #c0352d;
  --danger-fill-hover: #a32a23;
  --bar: #5b6b7c;
  --bar-hover: #c3520d;
  --bar-track: #eceef1;
  --fam-cnc: #2f6fcb;
  --fam-saege: #c3520d;
  --fam-flaeche: #17876f;
  --fam-massiv: #8a55c9;
  --fam-bau: #a8810a;
  --tiles: saturate(0.25) contrast(0.94) brightness(1.04);
  --shadow-control: 0 0 0 1px rgba(16, 20, 24, 0.1), 0 1px 2px rgba(16, 20, 24, 0.06);
  --shadow-control-hover: 0 0 0 1px rgba(16, 20, 24, 0.24), 0 2px 4px rgba(16, 20, 24, 0.08);
  --shadow-card: 0 0 0 1px rgba(16, 20, 24, 0.07), 0 1px 2px rgba(16, 20, 24, 0.04);
  --shadow-sheet: 0 0 0 1px rgba(16, 20, 24, 0.05), 0 1px 3px rgba(16, 20, 24, 0.05), 0 16px 40px -28px rgba(16, 20, 24, 0.18);
  --shadow-panel: 0 0 0 1px rgba(16, 20, 24, 0.07), 0 2px 4px rgba(16, 20, 24, 0.04), 0 12px 28px -16px rgba(16, 20, 24, 0.16);
  --pop: 0 16px 40px -12px rgba(16, 20, 24, 0.24), 0 4px 12px -4px rgba(16, 20, 24, 0.08), 0 0 0 1px rgba(16, 20, 24, 0.07);
  --press-primary: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 1px #a94608, 0 1px 2px rgba(124, 52, 8, 0.35);

  /* Schrift */
  --t-hint: 0.8125rem;  /* 13 px: nur Tastenhinweise und Kartennachweis */
  --t-small: 0.875rem;  /* 14 px: Nebenangaben, Tabellenköpfe, kleine Schaltflächen */
  --t-ui: 0.9375rem;    /* 15 px: Tabellen, Navigation, Schaltflächen */
  --t-read: 1rem;       /* 16 px: Lesetext, Eingabefelder */
  --t-h2: 1.25rem;      /* 20 px */
  --t-h1: 1.75rem;      /* 28 px */
  /* Höhen */
  --h-small: 2rem;      /* 32 px */
  --h-control: 2.5rem;  /* 40 px */
  --h-large: 3rem;      /* 48 px */
  --h-row: 3.25rem;     /* 52 px */
  /* Ecken nach Rangfolge: Blatt, Karte, Kachel, Bedienelement */
  --r-sheet: 1rem;
  --r-card: 0.875rem;
  --r-tile: 0.75rem;
  --r-control: 0.625rem;
  --r-s: 0.4375rem;
  --gutter: 2rem;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-model: "Archivo", "Geist", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0c0e11; --paper: #15181c; --fill: #1f2328; --fill-2: #2a2f35; --ink: #eef0f2; --ink-2: #bcc3cb; --ink-3: #959ea9;
    --line: #24282e; --line-2: #383e46; --hover: #1a1e22; --accent: #e07a32; --accent-fill: #b5561a; --accent-fill-hover: #a34c15;
    --accent-ink: #f09a5c; --accent-soft: #2e2118; --accent-line: #5c3a22; --accent-glow: rgba(224, 122, 50, 0.22);
    --lvl-a: #6fd8a4; --lvl-a-bg: #12301f; --lvl-b: #a9c3ff; --lvl-b-bg: #1b2640; --lvl-c: #eab95c; --lvl-c-bg: #33270f;
    --ok: #4cc38a; --warn: #e0a93f; --danger: #f0776f; --danger-fill: #b3362e; --danger-fill-hover: #982c25;
    --bar: #8fa0b3; --bar-hover: #e07a32; --bar-track: #262b31;
    --fam-cnc: #4f88d9; --fam-saege: #d66c28; --fam-flaeche: #249a7e; --fam-massiv: #9670da; --fam-bau: #ab8a1f;
    --tiles: invert(1) hue-rotate(180deg) saturate(0.15) brightness(0.92) contrast(0.85);
    --shadow-control: 0 0 0 1px rgba(255, 255, 255, 0.11), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-control-hover: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-sheet: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-panel: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 12px 28px -16px rgba(0, 0, 0, 0.7);
    --pop: 0 16px 40px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.09);
    --press-primary: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px #8f430f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0c0e11; --paper: #15181c; --fill: #1f2328; --fill-2: #2a2f35; --ink: #eef0f2; --ink-2: #bcc3cb; --ink-3: #959ea9;
  --line: #24282e; --line-2: #383e46; --hover: #1a1e22; --accent: #e07a32; --accent-fill: #b5561a; --accent-fill-hover: #a34c15;
  --accent-ink: #f09a5c; --accent-soft: #2e2118; --accent-line: #5c3a22; --accent-glow: rgba(224, 122, 50, 0.22);
  --lvl-a: #6fd8a4; --lvl-a-bg: #12301f; --lvl-b: #a9c3ff; --lvl-b-bg: #1b2640; --lvl-c: #eab95c; --lvl-c-bg: #33270f;
  --ok: #4cc38a; --warn: #e0a93f; --danger: #f0776f; --danger-fill: #b3362e; --danger-fill-hover: #982c25;
  --bar: #8fa0b3; --bar-hover: #e07a32; --bar-track: #262b31;
  --fam-cnc: #4f88d9; --fam-saege: #d66c28; --fam-flaeche: #249a7e; --fam-massiv: #9670da; --fam-bau: #ab8a1f;
  --tiles: invert(1) hue-rotate(180deg) saturate(0.15) brightness(0.92) contrast(0.85);
  --shadow-control: 0 0 0 1px rgba(255, 255, 255, 0.11), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-control-hover: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-sheet: 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-panel: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 12px 28px -16px rgba(0, 0, 0, 0.7);
  --pop: 0 16px 40px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.09);
  --press-primary: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px #8f430f;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.14s; }
.rail { view-transition-name: rail; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; scroll-padding-top: 3.25rem; }
body { margin: 0; height: 100%; background: var(--ground); color: var(--ink); font: 400 var(--t-ui)/1.5 var(--font);
  letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4, p, dl, dd, ol, ul { margin: 0; }
a { color: inherit; text-underline-offset: 2px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { font: inherit; font-size: var(--t-hint); line-height: 1.4; color: var(--ink-3); background: var(--fill); border-radius: 5px; padding: 0 0.3125rem; }
svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ico { flex: none; width: 1rem; height: 1rem; }
.stage { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* Grundgerüst --------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); height: 100vh; padding: 0.5rem 0.5rem 0.5rem 0; }
.stage { overflow-y: auto; min-width: 0; background: var(--paper); border-radius: var(--r-sheet); box-shadow: var(--shadow-sheet); }
.stage.fill { display: flex; flex-direction: column; overflow: hidden; }
.stage.fill .live { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.stage.fill .grid-wrap { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.progress { position: fixed; z-index: 90; inset: 0 0 auto 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; opacity: 0; pointer-events: none; }
.progress.on { opacity: 1; transform: scaleX(0.7); transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.live[aria-busy] .grid-wrap { opacity: 0.55; transition: opacity 0.12s 0.1s; }

.rail { padding: 1.125rem 0.75rem 0.5rem; display: flex; flex-direction: column; gap: 1rem; }
.brand { padding: 0 0.625rem; font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.02em; text-decoration: none; }
.rail-search { display: flex; align-items: center; gap: 0.5rem; width: 100%; height: var(--h-control); padding: 0 0.5rem 0 0.75rem; background: var(--paper); border: 0; border-radius: var(--r-control); box-shadow: var(--shadow-control); color: var(--ink-3); cursor: pointer; text-align: left; transition: box-shadow 0.1s; }
.rail-search:hover { box-shadow: var(--shadow-control-hover); color: var(--ink-2); }
.rail-search span { flex: 1; }
.rail svg, .search svg, .ask-search svg, .palette-field svg { width: 1.125rem; height: 1.125rem; flex: none; }
.rail-nav { display: flex; flex-direction: column; gap: 0.125rem; flex: 1; }
.rail-nav a { display: flex; align-items: center; gap: 0.6875rem; height: var(--h-control); padding: 0 0.75rem; border-radius: var(--r-control); color: var(--ink-2); text-decoration: none; font-weight: 500; transition: background 0.1s, color 0.1s; }
.rail-nav a:hover { background: var(--fill-2); color: var(--ink); }
.rail-nav a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-card); font-weight: 600; }
.rail-nav a[aria-current="page"] svg { color: var(--accent); }
.rail-theme { display: flex; align-items: center; gap: 0.6875rem; height: var(--h-control); padding: 0 0.75rem; background: none; border: 0; border-radius: var(--r-control); color: var(--ink-2); font-size: var(--t-small); cursor: pointer; text-align: left; }
.rail-theme:hover { background: var(--fill-2); color: var(--ink); }

/* Kopf ---------------------------------------------------------------- */
.head { padding: 1.5rem var(--gutter) 1rem; display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.head h1 { font-size: var(--t-h1); line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; }
.head .sub { color: var(--ink-3); margin-top: 0.25rem; }
.page { padding: 1.5rem var(--gutter) 4rem; max-width: 100rem; }
.page-tight { padding-top: 0.5rem; }
.page > .head { padding: 0 0 1rem; }
.head-detail { justify-content: space-between; align-items: flex-start; gap: 1rem; }
.head-actions, .hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.legal { color: var(--ink-3); font-weight: 400; font-size: 0.7em; }
.flag { margin-top: 0.625rem; display: inline-block; width: fit-content; font-size: var(--t-small); font-weight: 500; color: var(--accent-ink); background: var(--accent-soft); padding: 0.1875rem 0.75rem; border-radius: 99px; }
.crumbs { font-size: var(--t-small); color: var(--ink-3); margin-bottom: 0.75rem; }

/* Kernkompetenz: gefüllte Marke, die gesuchte Kategorie in Kupfer ------- */
.core { display: inline-block; font-size: var(--t-small); font-weight: 500; line-height: 1.5; color: var(--ink); background: var(--fill-2); padding: 0 0.5625rem; border-radius: var(--r-s); text-decoration: none; white-space: nowrap; }
.core-also { font-size: var(--t-small); color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.core-cell { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.125rem 0.5rem; }
.core-line { display: block; margin-top: 0.25rem; }
.core.is-match { color: var(--accent-ink); background: var(--accent-soft); }
.core-also.is-match { color: var(--accent-ink); font-weight: 500; }
.core-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.75rem; margin-top: 0.75rem; }
.core-row .core { font-size: var(--t-ui); padding: 0.1875rem 0.75rem; }
.core-row .core:hover { box-shadow: var(--shadow-control-hover); }
.core-row .core-also { font-size: var(--t-ui); color: var(--ink-2); }
.core-row .core-also:hover { color: var(--ink); text-decoration: underline; }
.grid tbody tr.row-group td, .grid tbody tr.row-group:hover td { background: var(--fill); font-size: var(--t-small); font-weight: 600; color: var(--ink-2); padding-block: 0.5rem; }
.reason-core { color: var(--accent-ink); font-weight: 500; margin-bottom: 0.5rem; }
.builder-core .pick { width: 100%; max-width: none; }
.builder-core .block-note { display: block; margin-top: 0.375rem; }
.pop-core { font-weight: 500; margin-top: 0.125rem; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* Schaltflächen ------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4375rem; height: var(--h-control); padding: 0 0.9375rem; font-size: var(--t-ui); font-weight: 500; color: var(--ink); background: var(--paper); border: 0; border-radius: var(--r-control); box-shadow: var(--shadow-control); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.1s, box-shadow 0.1s, transform 0.06s; }
.btn:hover { box-shadow: var(--shadow-control-hover); }
.btn:active { transform: translateY(0.5px); }
.btn-primary { background: var(--accent-fill); color: #fff; box-shadow: var(--press-primary); font-weight: 550; }
.btn-primary:hover { background: var(--accent-fill-hover); box-shadow: var(--press-primary); }
.btn-primary[disabled] { background: var(--fill); color: var(--ink-3); box-shadow: none; cursor: not-allowed; transition: none; }
.btn-lg { height: var(--h-large); padding: 0 1.375rem; font-size: var(--t-read); border-radius: var(--r-tile); }
.btn-small { height: var(--h-small); padding: 0 0.6875rem; font-size: var(--t-small); border-radius: var(--r-s); }
.btn-block { width: 100%; }
.btn-on { color: var(--accent-ink); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-line); }
.btn-on:hover { box-shadow: 0 0 0 1px var(--accent); }
.btn-danger { background: var(--danger-fill); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 0 1px var(--danger-fill-hover); }
.btn-danger:hover { background: var(--danger-fill-hover); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 0 1px var(--danger-fill-hover); }
.btn-quiet-danger:hover { color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: var(--h-small); height: var(--h-small); padding: 0; color: var(--ink-3); background: none; border: 0; border-radius: var(--r-s); cursor: pointer; transition: background 0.1s, color 0.1s; }
.icon-btn:hover { color: var(--ink); background: var(--fill-2); }
.icon-btn-danger:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, transparent); }
.inline-form { display: inline-flex; margin: 0; }

/* Eingaben ------------------------------------------------------------ */
input[type="search"], input[type="text"], input[type="number"], input[type="date"] {
  height: var(--h-control); padding: 0 0.75rem; font-size: var(--t-read); background: var(--fill); border: 0; border-radius: var(--r-control); outline: none; transition: background 0.1s, box-shadow 0.1s; }
input::placeholder { color: var(--ink-3); opacity: 1; }
input[type="search"]:hover, input[type="text"]:hover, input[type="number"]:hover { background: var(--fill-2); }
input[type="search"]:focus, input[type="text"]:focus, input[type="number"]:focus { background: var(--paper); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-glow); }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
select { height: var(--h-control); padding: 0 2rem 0 0.75rem; font-size: var(--t-ui); background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235c6672' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E") right 0.5rem center / 1rem no-repeat; border: 0; border-radius: var(--r-control); appearance: none; cursor: pointer; }
.lbl { display: block; margin-bottom: 0.375rem; font-size: var(--t-small); font-weight: 500; color: var(--ink-2); }

/* Filterleiste -------------------------------------------------------- */
.bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0 var(--gutter) 0.875rem; }
.bar-inline { padding: 1rem 0 0.25rem; }
.search { position: relative; display: inline-flex; align-items: center; flex: 0 1 21rem; min-width: 13rem; color: var(--ink-3); }
.search svg { position: absolute; left: 0.75rem; pointer-events: none; z-index: 1; }
.search input { width: 100%; padding-left: 2.375rem; color: var(--ink); }
.search-short { flex-basis: 17rem; }
.pick { max-width: 12rem; }
.pick-native { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.pickr { position: relative; display: inline-block; min-width: 0; }
.pickr-wide { display: block; }
.pickr-btn { display: inline-flex; align-items: center; gap: 0.375rem; max-width: 18rem; height: var(--h-control); padding: 0 0.625rem 0 0.8125rem; font-size: var(--t-ui); font-weight: 500; color: var(--ink-2); background: var(--fill); border: 0; border-radius: var(--r-control); cursor: pointer; white-space: nowrap; transition: background 0.1s, color 0.1s; }
.pickr-wide .pickr-btn { width: 100%; max-width: none; justify-content: space-between; }
.pickr-btn:hover, .pickr.is-open .pickr-btn { background: var(--fill-2); color: var(--ink); }
.pickr-btn > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.pickr-btn svg { width: 1rem; height: 1rem; flex: none; color: var(--ink-3); }
.pickr.is-set .pickr-btn { color: var(--accent-ink); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-line); }
.pickr-x { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-right: -0.25rem; border-radius: 5px; font-size: 1.125rem; line-height: 1; }
.pickr-x:hover { background: var(--accent-line); }
.pickr-pop { position: absolute; z-index: 50; top: calc(100% + 0.375rem); left: 0; width: 20rem; max-height: 24rem; display: flex; flex-direction: column; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--pop); overflow: hidden; animation: pop-in 0.1s ease-out; }
.pickr-pop[hidden] { display: none; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.99); } }
.pickr-search { flex: none; width: 100%; height: 2.75rem !important; padding: 0 0.875rem !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.pickr-list { overflow-y: auto; padding: 0.3125rem; outline: none; }
.pickr-group { padding: 0.625rem 0.625rem 0.25rem; font-size: var(--t-small); color: var(--ink-3); }
.pickr-opt { display: block; width: 100%; min-height: 2.25rem; padding: 0.375rem 0.625rem; font-size: var(--t-ui); text-align: left; background: none; border: 0; border-radius: var(--r-s); cursor: pointer; color: var(--ink); }
.pickr-opt.is-sub { padding-left: 1.5rem; }
.pickr-opt.is-active { background: var(--fill); }
.pickr-opt[aria-selected="true"] { color: var(--accent-ink); font-weight: 600; }
.pickr-none { padding: 0.75rem 0.625rem; color: var(--ink-3); }
.bar details.more { position: relative; }
.bar details.more > summary { list-style: none; display: inline-flex; align-items: center; gap: 0.5rem; height: var(--h-control); padding: 0 0.8125rem; font-size: var(--t-ui); font-weight: 500; color: var(--ink-2); border-radius: var(--r-control); cursor: pointer; background: var(--fill); transition: background 0.1s; }
.bar details.more > summary::-webkit-details-marker { display: none; }
.bar details.more > summary:hover, .bar details.more[open] > summary { background: var(--fill-2); color: var(--ink); }
.more-count { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3125rem; font-size: var(--t-hint); font-weight: 600; color: #fff; background: var(--accent-fill); border-radius: 99px; }
.more-count[hidden] { display: none; }
.more-body { position: absolute; z-index: 40; top: calc(100% + 0.375rem); left: 0; width: 22rem; padding: 1rem; display: grid; gap: 0.25rem; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--pop); }
.more-body .lbl { margin: 0.625rem 0 0.125rem; }
.more-body .lbl:first-child { margin-top: 0; }
.more-body select, .more-body input[type="text"] { width: 100%; }
.triple { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.375rem; }
.triple input { width: 100%; }
.check { display: flex; gap: 0.625rem; align-items: center; min-height: 2rem; margin-top: 0.25rem; cursor: pointer; }
.check input { accent-color: var(--accent); width: 1.125rem; height: 1.125rem; margin: 0; }

/* Zeile über der Tabelle ---------------------------------------------- */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0 var(--gutter) 0.75rem; min-height: 2.5rem; }
.page .meta { padding: 0.875rem 0 0.75rem; }
.meta-count { font-weight: 600; }
.spacer { flex: 1; }
.tool { display: inline-flex; align-items: center; gap: 0.375rem; height: var(--h-small); color: var(--ink-2); text-decoration: none; padding: 0 0.625rem; border-radius: var(--r-s); font-size: var(--t-small); font-weight: 500; transition: background 0.1s, color 0.1s; }
.tool:hover { background: var(--fill); color: var(--ink); }
.tool.is-on { color: var(--accent-ink); background: var(--accent-soft); }
.tool .ico { color: var(--ink-3); }
.segments { display: inline-flex; background: var(--fill); border-radius: var(--r-control); padding: 0.1875rem; gap: 0.125rem; }
.segments a, .segments label > span { display: flex; align-items: center; justify-content: center; min-height: 2.125rem; padding: 0 0.75rem; border-radius: var(--r-s); text-decoration: none; color: var(--ink-2); font-size: var(--t-small); font-weight: 500; white-space: nowrap; cursor: pointer; transition: color 0.1s; }
.segments a:hover, .segments label:hover > span { color: var(--ink); }
.segments a[aria-current], .segments input:checked + span { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-control); }
.segments input { position: absolute; opacity: 0; width: 0; height: 0; }
.segments input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.count { color: var(--ink-3); font-weight: 400; margin-left: 0.25rem; font-variant-numeric: tabular-nums; }
.filter-toggle { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.5rem; padding: 0 0.75rem 0 0.625rem; border-radius: var(--r-control); background: var(--fill); color: var(--ink-2); font-size: var(--t-small); font-weight: 500; text-decoration: none; white-space: nowrap; }
.filter-toggle:hover { color: var(--ink); }
.filter-box { display: inline-grid; place-items: center; width: 1rem; height: 1rem; border-radius: 0.25rem; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.filter-box svg { width: 0.75rem; height: 0.75rem; opacity: 0; }
.filter-toggle[aria-checked="true"] { color: var(--ink); font-weight: 600; }
.filter-toggle[aria-checked="true"] .filter-box { background: var(--accent-fill); box-shadow: none; color: #fff; }
.filter-toggle[aria-checked="true"] .filter-box svg { opacity: 1; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 0.375rem; align-items: center; }
.chip { display: inline-flex; gap: 0.375rem; align-items: center; height: var(--h-small); padding: 0 0.75rem; font-size: var(--t-small); font-weight: 500; color: var(--accent-ink); background: var(--accent-soft); border-radius: 99px; text-decoration: none; }
.chip span { color: var(--ink-2); font-weight: 400; }
.chip i { font-style: normal; }
.chip:hover { box-shadow: 0 0 0 1px var(--accent-line); }
.chip-reset { font-size: var(--t-small); color: var(--ink-3); margin-left: 0.25rem; }
.note, .note-inline { color: var(--warn); }
.note { padding: 0 var(--gutter) 0.5rem; }
.page .note { padding: 0.375rem 0; }
.more-line { padding: 0.875rem 0.5rem; color: var(--ink-3); }

/* Tabelle ------------------------------------------------------------- */
.grid-wrap { overflow-x: auto; }
.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-ui); font-variant-numeric: tabular-nums; }
.grid th { position: sticky; top: 0; z-index: 3; height: 2.75rem; background: var(--fill-2); text-align: left; font-weight: 600; font-size: var(--t-small); color: var(--ink); padding: 0 0.875rem; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.grid th:not(:last-child) { box-shadow: 1px 0 0 var(--fill-2); }  /* keine hellen Haarlinien bei krummen Spaltenbreiten */
.grid td { height: var(--h-row); padding: 0.5rem 0.875rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tbody tr:last-child td { border-bottom-color: transparent; }
.grid .num { text-align: right; }
.grid th.num .th-sort { flex-direction: row-reverse; }
.grid tbody tr[data-href] { cursor: pointer; }
.grid tbody tr td { transition: background 0.06s; }
.grid tbody tr:hover td { background: var(--hover); }
.grid tbody tr.is-cursor td { background: var(--accent-soft); }
.grid tr.is-dim td { color: var(--ink-3); }
.grid tr.is-marked td { background: var(--accent-soft); }
.grid b { font-weight: 600; }
.stage.fill .grid th:first-child, .stage.fill .grid td:first-child { padding-left: var(--gutter); }
.stage.fill .grid th:last-child, .stage.fill .grid td:last-child { padding-right: var(--gutter); }
.page .grid th { border-bottom: 0; }
.page .grid th:first-child { border-radius: var(--r-s) 0 0 var(--r-s); }
.page .grid th:last-child { border-radius: 0 var(--r-s) var(--r-s) 0; }
.page .grid th:first-child, .page .grid td:first-child { padding-left: 0.625rem; }
.page .grid th:last-child, .page .grid td:last-child { padding-right: 0.625rem; }
.page .grid td:first-child { border-radius: var(--r-s) 0 0 var(--r-s); }
.page .grid td:last-child { border-radius: 0 var(--r-s) var(--r-s) 0; }
.th-sort { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 1.75rem; color: inherit; text-decoration: none; }
.th-sort:hover { text-decoration: underline; }
.th-ind { font-size: var(--t-small); opacity: 0; }
th:hover .th-ind { opacity: 0.55; }
th[aria-sort] .th-sort { color: var(--accent-ink); }
th[aria-sort] .th-ind { opacity: 1; color: var(--accent-ink); }
.cell-main a, .cell-link { font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.cell-main a:hover, .cell-link:hover { text-decoration: underline; text-decoration-color: currentColor; }
.cell-clip { width: 40%; max-width: 0; min-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.cell-wide { min-width: 15rem; }
.cell-action { width: 1%; white-space: nowrap; text-align: right; }
.nowrap { white-space: nowrap; }
.sub-line { display: block; font-size: var(--t-small); color: var(--ink-3); }
.grid-dense th, .grid-dense td { padding-inline: 0.625rem; }
.row-top td { vertical-align: top; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.grid .mdl { white-space: nowrap; }
.grid .mdl a.mdl-none { font-weight: 400; color: var(--ink-3); }
.stage.fill .grid .kind { white-space: nowrap; }
.stage.fill .grid .cell-main { min-width: 16rem; }
.stage.fill .grid .mdl.cell-main { min-width: 0; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.5rem var(--gutter); border-top: 1px solid var(--line); font-size: var(--t-small); color: var(--ink-3); background: var(--paper); }
.pager-nav { display: inline-flex; align-items: center; gap: 0.625rem; }
.pager-nav a, .pager-nav .is-off { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--r-s); color: var(--ink); }
.pager-nav a { box-shadow: var(--shadow-control); background: var(--paper); }
.pager-nav a:hover { box-shadow: var(--shadow-control-hover); }
.pager-nav svg { width: 1rem; height: 1rem; }
.pager-nav .is-off { opacity: 0.3; }
.empty { padding: 3.5rem var(--gutter); color: var(--ink-2); text-align: center; }
.page .empty { padding: 2.5rem 0; }
.empty strong { display: block; color: var(--ink); font-weight: 600; font-size: var(--t-read); margin-bottom: 0.25rem; }

/* Bausteine in Zeilen ------------------------------------------------- */
.maker { color: var(--ink-2); }
.mc-text { display: block; min-width: 9rem; white-space: normal; }  /* übliche Modellnamen bleiben auf einer Zeile */
.mc-text .sub-line { font-weight: 400; }
.kind { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink-2); }
.kind::before { content: ""; flex: none; width: 0.5625rem; height: 0.5625rem; border-radius: 50%; background: var(--line-2); }
.fam-cnc::before { background: var(--fam-cnc); }
.fam-saege::before { background: var(--fam-saege); }
.fam-flaeche::before { background: var(--fam-flaeche); }
.fam-massiv::before { background: var(--fam-massiv); }
.fam-bau::before { background: var(--fam-bau); }
.cnt { display: inline-flex; align-items: center; gap: 0.625rem; }
.cnt b { min-width: 1.75rem; text-align: right; }
.cnt-track { display: inline-block; width: 3.5rem; height: 6px; background: var(--bar-track); border-radius: 99px; overflow: hidden; }
.cnt-track i { display: block; height: 100%; min-width: 3px; background: var(--bar); border-radius: 99px; }
.state { font-size: var(--t-small); color: var(--ink-2); white-space: nowrap; }
.state::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.5rem; background: var(--ink-3); vertical-align: 1px; }
.state.ok::before { background: var(--ok); }
.state.warn::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--warn); }
.state.warn { color: var(--warn); }
.state.dim::before { background: var(--line-2); }
.state.danger { color: var(--danger); }
.state.danger::before { background: var(--danger); border-radius: 1px; }
.stamp { display: inline-flex; align-items: center; gap: 0.3125rem; min-height: 1.625rem; padding: 0 0.625rem 0 0.5rem; font-size: var(--t-small); font-weight: 500; white-space: nowrap; border-radius: 99px; }
.stamp b { font-weight: 700; font-size: var(--t-small); }
.stamp-compact { padding: 0; width: 1.625rem; justify-content: center; }
.stamp.lvl-A { background: var(--lvl-a-bg); color: var(--lvl-a); }
.stamp.lvl-B { background: var(--lvl-b-bg); color: var(--lvl-b); }
.stamp.lvl-C { background: var(--lvl-c-bg); color: var(--lvl-c); }
.spec-mark { display: inline-grid; place-items: center; width: 1.125rem; height: 1.125rem; margin-left: 0.375rem; font-size: 0.6875rem; font-weight: 600; color: var(--ink-2); background: var(--fill-2); border-radius: 50%; cursor: help; vertical-align: 1px; }
details.pop { position: relative; display: inline-block; }
details.pop > summary { display: inline-flex; align-items: center; min-height: 1.75rem; list-style: none; cursor: pointer; border-radius: 99px; transition: box-shadow 0.1s; }
details.pop > summary::-webkit-details-marker { display: none; }
details.pop > summary:hover .stamp { box-shadow: 0 0 0 1px currentColor; }
.pop-body { position: fixed; z-index: 45; width: 27rem; max-height: 24rem; overflow: auto; padding: 0.25rem 1rem; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--pop); cursor: auto; white-space: normal; text-align: left; animation: pop-in 0.1s ease-out; }
.pop-item { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.pop-item:last-child { border-bottom: 0; }
.pop-src { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 500; }
.pop-src a { min-height: 1.5rem; }
.pop-quote { color: var(--ink-2); margin-top: 0.375rem; }
.pop-meta { color: var(--ink-3); font-size: var(--t-small); margin-top: 0.25rem; }
.match { display: inline-flex; align-items: center; gap: 0.625rem; }
.match-bar { display: inline-block; width: 4.5rem; height: 6px; background: var(--bar-track); border-radius: 99px; overflow: hidden; }
.match-bar i { display: block; height: 100%; background: var(--bar); border-radius: 99px; }

/* Kopfbereich der Maschinen- und Unternehmensseite -------------------- */
.hero-maker { font-size: var(--t-read); font-weight: 500; }
.hero-maker .muted { font-weight: 400; }
.hero-model { font-family: var(--font-model); font-stretch: 80%; font-size: 3.25rem; line-height: 1.04; font-weight: 700; letter-spacing: -0.01em; margin: 0.5rem 0 0.375rem; overflow-wrap: anywhere; }
.hero-model-long { font-size: 2.25rem; line-height: 1.12; text-wrap: balance; }
.hero-kind { font-size: var(--t-read); margin-bottom: 1.25rem; }
.hero-title { font-size: 2rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.028em; margin-bottom: 0.5rem; }
.hero-sub { display: flex; flex-wrap: wrap; gap: 0.125rem 1rem; color: var(--ink-3); font-size: var(--t-read); }
.hero-actions { margin-top: auto; padding-top: 1.25rem; }
.series-line { margin-top: 0.875rem; color: var(--ink-3); }
.series-line a { color: var(--ink); font-weight: 500; }
.map-box { position: relative; z-index: 0; border-radius: var(--r-card); overflow: hidden; background: var(--fill); box-shadow: var(--shadow-card); }
.leaflet-tile-pane { filter: var(--tiles); }
.leaflet-container { font: inherit; background: var(--fill); }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow-panel) !important; border-radius: var(--r-control) !important; overflow: hidden; }
.leaflet-control-zoom a { width: 2rem !important; height: 2rem !important; line-height: 2rem !important; background: var(--paper) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: color-mix(in srgb, var(--paper) 75%, transparent) !important; color: var(--ink-3) !important; font-size: 0.6875rem; border-radius: 6px 0 0 0; }
.leaflet-control-attribution a { color: inherit !important; }
.leaflet-popup-content-wrapper { background: var(--paper); color: var(--ink); border-radius: var(--r-card); box-shadow: var(--pop); }
.leaflet-popup-tip { background: var(--paper); }
.leaflet-popup-content { font-size: var(--t-ui); line-height: 1.45; margin: 0.75rem 1rem; }
.pop-title { font-weight: 600; color: var(--ink) !important; text-decoration: none; }
.pop-title:hover { text-decoration: underline; }
.pop-sub { color: var(--ink-3); }
.pop-row { display: flex; flex-wrap: wrap; gap: 0.25rem 0.625rem; align-items: center; margin-top: 0.375rem; color: var(--ink-2); }
.pin { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, 0.35); }
.pin-on { background: #14191f; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent), 0 1px 3px rgba(0, 0, 0, 0.35); }
.pin-origin { display: block; width: 18px; height: 18px; border-radius: 50%; background: #14191f; border: 4px solid #fff; box-shadow: 0 0 0 1px rgba(20, 25, 31, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4); }
.cl { display: grid; place-items: center; font-size: var(--t-hint); font-weight: 600; color: #fff; background: var(--accent-fill); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent), 0 2px 6px rgba(0, 0, 0, 0.2); font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); }
.tabs a { display: flex; align-items: center; min-height: var(--h-control); font-weight: 500; font-size: var(--t-read); color: var(--ink-3); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.1s; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
/* Passt die Tabelle in die Seite, bleibt der Kopf beim Scrollen stehen. Sonst scrollt sie in sich. */
.grid-page.is-fit { overflow: visible; }

/* Spalten und Karten -------------------------------------------------- */
/* Detailseiten (Betrieb, Maschine) ohne Seitenspalte: Kopf, darunter ein Band mit den wichtigsten Angaben und kleiner Karte, dann die Tabellen über die volle Breite */
.page-detail { padding-top: 1.25rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
.detail-head { display: flex; flex-direction: column; }
.detail-head .hero-kind { margin-bottom: 0; }
.facts .fact-big { font-size: var(--t-h2); line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
.detail-facts { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 1.5rem; padding: 1.25rem 1.25rem 1.25rem 1.5rem; border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1.125rem 1.75rem; align-content: start; }
.facts dt { color: var(--ink-3); font-size: var(--t-small); margin-bottom: 0.125rem; }
.facts dd { overflow-wrap: anywhere; }
.facts-map { min-height: 10rem; max-height: 16rem; box-shadow: none; }
.detail-source .block-note { font-size: var(--t-small); overflow-wrap: anywhere; }
.detail-head .core-row .flag { margin: 0; }
.detail-lead { margin-top: 0.875rem; max-width: 72ch; color: var(--ink-2); font-size: var(--t-read); line-height: 1.5; }
.card { padding: 1.25rem 1.25rem 1rem; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow-card); min-width: 0; }
.block h2, .block-head h2 { font-size: var(--t-h2); line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.625rem; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 2rem; margin-bottom: 0.625rem; }
.block-head h2 { margin: 0; }
.block-head-gap { margin-top: 1.75rem; }
.block-note { color: var(--ink-3); margin-bottom: 0.625rem; max-width: 72ch; }

/* Übersicht: Karte als Kopf ------------------------------------------- */
.home-hero { position: relative; }
.home-hero-map { height: max(37rem, 60vh); border-radius: 0; box-shadow: none; }
.home-open { position: absolute; z-index: 5; top: 1rem; right: 1rem; }
.ask { position: absolute; z-index: 5; top: 1.5rem; left: 1.5rem; width: 27rem; padding: 1.5rem; background: var(--paper); border-radius: var(--r-sheet); box-shadow: var(--pop); }
.ask h1 { font-size: 2rem; line-height: 1.12; font-weight: 600; letter-spacing: -0.032em; margin-bottom: 1.125rem; text-wrap: balance; }
.ask-row { display: grid; gap: 0.5rem; }
.ask-search { display: flex; align-items: center; gap: 0.625rem; width: 100%; height: var(--h-large); padding: 0 0.625rem 0 0.875rem; font-size: var(--t-read); color: var(--ink-3); text-align: left; background: var(--fill); border: 0; border-radius: var(--r-tile); cursor: pointer; transition: background 0.1s; }
.ask-search:hover { background: var(--fill-2); color: var(--ink-2); }
.ask-search span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-search kbd { background: var(--paper); }
.ask-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 1rem; margin-top: 1.125rem; color: var(--ink-3); }
.ask-stats a, .ask-stats span { display: block; padding: 0.125rem 0; text-decoration: none; }
.ask-stats a:hover { color: var(--ink); }
.ask-stats b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.page-home { max-width: 92rem; padding-top: 1.5rem; }
.home-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1rem; align-items: start; }
.home-col { display: grid; gap: 1rem; min-width: 0; }
.home-models { padding-bottom: 0.25rem; }
.home-models .grid th:first-child, .home-models .grid td:first-child { padding-left: 0.5rem; }
.home-models .grid th:last-child, .home-models .grid td:last-child { padding-right: 0.5rem; }
.bars { list-style: none; padding: 0; font-variant-numeric: tabular-nums; }
.bars a { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 3rem; gap: 0.625rem; align-items: center; min-height: 2.125rem; padding: 0.125rem 0.5rem; margin: 0 -0.5rem; border-radius: var(--r-s); text-decoration: none; transition: background 0.08s; }
.bars a:hover { background: var(--hover); }
.bars a:hover .bars-track i { background: var(--bar-hover); }
.bars-kind a { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 2.5rem; }
.bars-tight a { min-height: 1.875rem; }
.bars-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bars-track { display: block; height: 8px; background: var(--bar-track); border-radius: 99px; overflow: hidden; }
.bars-track i { display: block; height: 100%; min-width: 3px; background: var(--bar); border-radius: 99px; transition: background 0.08s; }
.bars-value { text-align: right; color: var(--ink-2); font-weight: 500; }

/* Kartenseite --------------------------------------------------------- */
.map-page { position: relative; }
.map-page #map { flex: 1; min-height: 20rem; z-index: 0; }
.map-float { position: absolute; z-index: 5; top: 0.875rem; left: 0.875rem; right: 0.875rem; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.map-float > * { pointer-events: auto; width: fit-content; max-width: 100%; }
.map-float-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.125rem 0.75rem; padding: 0.5rem 1rem; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--pop); }
.map-float-head h1 { font-size: var(--t-h2); font-weight: 600; letter-spacing: -0.02em; }
.map-float-head .sub { color: var(--ink-3); }
.map-float .search { flex: 0 0 auto; width: 16rem; }
.map-float .bar { padding: 0.5rem; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--pop); }
.map-float .chips { padding: 0.375rem; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--pop); }

/* Aufklappbare Zeilen: Winkel statt Browser-Dreieck ------------------- */
.builder-more > summary, details.why > summary { display: flex; align-items: center; gap: 0.25rem; list-style: none; width: fit-content; }
.builder-more > summary::-webkit-details-marker, details.why > summary::-webkit-details-marker { display: none; }
.builder-more > summary::before, details.why > summary::before { content: ""; flex: none; width: 1rem; height: 1rem; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 4.5 3.5 3.5-3.5 3.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 4.5 3.5 3.5-3.5 3.5'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 0.12s; }
.builder-more[open] > summary::before, details.why[open] > summary::before { transform: rotate(90deg); }

/* Matching: Suchaufbau ------------------------------------------------ */
.page-builder { max-width: 90rem; }
.builder { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.builder-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.head-plain { padding: 0 !important; }
.head-plain h1 { font-size: 2rem; letter-spacing: -0.03em; line-height: 1.15; }
.kinds { margin: 0; padding: 0; border: 0; min-width: 0; }
.kinds legend { padding: 0; margin-bottom: 0.625rem; font-weight: 600; color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.5rem; }
.tile { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; min-height: 4rem; padding: 0.6875rem 0.6875rem 0.6875rem 0.875rem; background: var(--paper); border-radius: var(--r-tile); box-shadow: var(--shadow-control); cursor: pointer; transition: background 0.08s, box-shadow 0.08s; }
.tile input { position: absolute; opacity: 0; width: 0; height: 0; }
.tile:hover { box-shadow: var(--shadow-control-hover); }
.tile-body { min-width: 0; }
.tile-name { display: block; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: break-word; hyphens: auto; }
.tile-count { display: block; margin-top: 0.125rem; font-size: var(--t-small); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tile-check { flex: none; display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; color: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background 0.08s, box-shadow 0.08s; }
.tile-check svg { width: 0.8125rem; height: 0.8125rem; stroke-width: 2.2; }
.tile:hover .tile-check { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.tile:has(input:checked) { background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent); }
.tile input:checked ~ .tile-check { background: var(--accent-fill); color: #fff; box-shadow: none; }
.tile input:checked ~ .tile-body .tile-count { color: var(--accent-ink); }
.tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.builder-more { padding-top: 0.125rem; }
.builder-more > summary { min-height: 1.75rem; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.builder-more > summary:hover { color: var(--ink); }
.builder-more[open] > summary { margin-bottom: 0.75rem; }
.builder-panel { display: grid; gap: 1.25rem; padding: 1.25rem 1.5rem; background: var(--paper); border-radius: var(--r-sheet); box-shadow: var(--shadow-panel); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: var(--t-h2); font-weight: 600; letter-spacing: -0.02em; }
.panel-count { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.375rem; font-size: var(--t-small); font-weight: 600; color: #fff; background: var(--accent-fill); border-radius: 99px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.panel-count:empty { display: none; }
.builder-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; min-height: 2.25rem; }
.picked { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.picked:empty { display: none; }
.picked li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 2.25rem; padding: 0.125rem 0.1875rem 0.125rem 0.625rem; color: var(--ink); background: var(--fill); border-radius: var(--r-s); animation: pop-in 0.1s ease-out; }
.picked li > span { flex: 1; min-width: 0; line-height: 1.25; }
.picked .icon-btn { width: 1.75rem; height: 1.75rem; }
.picked-empty { margin: 0; color: var(--ink-3); }
.picked-empty[hidden] { display: none; }
.builder-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem 1.25rem; align-items: start; }
.builder-foot { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.builder-foot > .builder-size { flex: 1 1 24rem; min-width: 0; }
.builder-foot > .btn { flex: none; }
.builder-where { display: block; }
.builder-where .search { display: flex; flex: none; min-width: 0; }
.builder-radius { margin: 0; padding: 0; border: 0; min-width: 0; }
.builder-radius legend { padding: 0; }
.builder-radius .segments { display: flex; }
.builder-radius .segments label { flex: 1; }
.builder-radius .segments label > span { padding: 0 0.25rem; }
.builder-size > summary { font-size: var(--t-ui); }
.builder-size .block-note { font-size: var(--t-small); }
.builder-dims { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.625rem; max-width: 44rem; }
.builder-dims input { width: 100%; }
.recent { margin-top: 2.5rem; }
.errors { margin: 0; padding: 0.625rem 0.875rem; list-style: none; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--paper)); border-radius: var(--r-control); }

/* Matching: Ergebnis mit Karte ---------------------------------------- */
.page-result { max-width: none; padding-bottom: 2rem; }
.result-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 36%); gap: 1.5rem; align-items: start; }
.result-split .cell-wide { min-width: 12rem; }
.result-list { min-width: 0; }
.result-list .meta { padding-top: 0; }
.result-map { position: sticky; top: 1rem; height: calc(100vh - 3rem); }
.result-map .map-box { height: 100%; }
.req-kinds { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 0.375rem; font-size: 1.375rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.req-kind { display: inline-flex; align-items: center; gap: 0.5rem; }
.req-kind .kind { color: var(--ink); }
.req-no { display: inline-grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; font-size: var(--t-hint); font-weight: 600; letter-spacing: 0; color: var(--ink-2); background: var(--fill); border-radius: 50%; }
.marks { display: flex; gap: 0.25rem; }
.mark { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; font-size: var(--t-hint); font-weight: 600; color: var(--ink-3); background: var(--fill); border-radius: 50%; }
.mark.hit { background: var(--lvl-a-bg); color: var(--lvl-a); }
.mark.part { background: var(--lvl-c-bg); color: var(--lvl-c); }
details.why { margin-top: 0.125rem; font-size: var(--t-small); }
details.why > summary { min-height: 1.5rem; cursor: pointer; color: var(--ink-3); }
details.why > summary:hover { color: var(--ink); }
.reasons { display: grid; gap: 0.125rem; margin-top: 0.5rem; padding: 0.625rem 0.875rem; background: var(--fill); border-radius: var(--r-control); }
.reason { display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr); gap: 0.75rem; padding: 0.25rem 0; }
.reason-missing { color: var(--ink-3); }
.reason-idx { display: inline-block; min-width: 1.25rem; color: var(--ink-3); }
.reason-what { margin-left: 0.375rem; }
.reason-note { color: var(--ink-3); margin-top: 0.0625rem; }
.reason-flag { color: var(--warn); margin-top: 0.25rem; }
.note-form { display: flex; gap: 0.375rem; align-items: center; margin-top: 0.5rem; max-width: 24rem; }
.note-form input { flex: 1; min-width: 0; height: var(--h-small); font-size: var(--t-small); background: var(--paper); box-shadow: var(--shadow-control); }
.steps-line { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin-bottom: 0.5rem; }
.steps-line li { display: flex; gap: 0.5rem; max-width: 24rem; }
.steps-line b { font-weight: 600; }
.step-no { display: inline-grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; font-size: var(--t-hint); font-weight: 600; color: var(--ink-2); background: var(--fill); border-radius: 50%; }

/* Rückfrage ------------------------------------------------------------ */
.confirm { width: min(27rem, calc(100vw - 2rem)); padding: 1.375rem 1.375rem 1.125rem; color: var(--ink); background: var(--paper); border: 0; border-radius: var(--r-sheet); box-shadow: var(--pop); }
.confirm[open] { animation: pop-in 0.12s ease-out; }
.confirm::backdrop { background: rgba(12, 14, 17, 0.36); backdrop-filter: blur(3px); }
.confirm h2 { font-size: var(--t-h2); line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.confirm p { margin-top: 0.5rem; color: var(--ink-2); font-size: var(--t-read); overflow-wrap: anywhere; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.25rem; }

/* Hinweis, Tooltip, Suche --------------------------------------------- */
.toast { position: fixed; z-index: 60; left: 50%; bottom: 1.5rem; transform: translateX(-50%); padding: 0.625rem 1.125rem; font-weight: 500; color: var(--paper); background: var(--ink); border-radius: 99px; box-shadow: var(--pop); animation: toast-out 0.25s ease 4s forwards; }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }
.tip { position: absolute; z-index: 70; max-width: 21rem; padding: 0.5rem 0.75rem; font-size: var(--t-small); line-height: 1.4; color: var(--paper); background: var(--ink); border-radius: var(--r-s); pointer-events: none; }
[data-tip] { cursor: help; }
a[data-tip], th[data-tip] a { cursor: pointer; }
.palette { width: min(44rem, calc(100vw - 1.5rem)); max-height: 72vh; margin: 11vh auto auto; padding: 0; border: 0; border-radius: var(--r-sheet); background: var(--paper); color: var(--ink); box-shadow: var(--pop); overflow: hidden; }
.palette[open] { animation: pop-in 0.12s ease-out; }
.palette::backdrop { background: rgba(12, 14, 17, 0.36); backdrop-filter: blur(3px); }
.palette-box { display: flex; flex-direction: column; max-height: 72vh; }
.palette-field { display: flex; align-items: center; gap: 0.75rem; padding: 0 1.125rem; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.palette-input { flex: 1; height: 3.5rem !important; padding: 0 !important; font-size: 1.0625rem !important; color: var(--ink); background: transparent !important; border-radius: 0 !important; box-shadow: none !important; }
.palette-results { overflow-y: auto; padding: 0.375rem; }
.palette-group { padding: 0.625rem 0.75rem 0.25rem; font-size: var(--t-small); color: var(--ink-3); }
.palette-item { display: flex; align-items: center; gap: 0.75rem; min-height: 2.5rem; padding: 0.25rem 0.75rem; border-radius: var(--r-control); text-decoration: none; }
.palette-item b { font-weight: 600; white-space: nowrap; }
.palette-item span { color: var(--ink-3); font-size: var(--t-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item em { margin-left: auto; font-style: normal; color: var(--ink-3); font-size: var(--t-small); font-variant-numeric: tabular-nums; white-space: nowrap; }
.palette-item[aria-selected="true"] { background: var(--fill); }
.palette-all { color: var(--ink-2); }
.palette-empty { padding: 1.25rem 0.75rem; color: var(--ink-3); }
.palette-hint { display: flex; gap: 1rem; padding: 0.625rem 1.125rem; font-size: var(--t-hint); color: var(--ink-3); border-top: 1px solid var(--line); }

/* Finger statt Maus: Klickziele 44 px (WCAG 2.5.5, Apple) ------------- */
@media (pointer: coarse) {
  :root { --h-control: 2.75rem; --h-small: 2.75rem; }
  .pickr-opt { min-height: 2.75rem; }
  .pager-nav a, .pager-nav .is-off { width: 2.75rem; height: 2.75rem; }
  .pickr-x, .picked .icon-btn { width: 2.25rem; height: 2.25rem; }
  .segments a, .segments label > span { min-height: 2.5rem; }
  details.why > summary, .builder-more > summary, .th-sort, details.pop > summary { min-height: 2.75rem; display: flex; align-items: center; }
}

/* Schmale Bildschirme ------------------------------------------------- */
@media (max-width: 1399px) {
  :root { --gutter: 1.5rem; }
  .grid th, .grid td { padding-inline: 0.5rem; }
  .cnt-track, .match-bar { display: none; }
  .cell-clip { min-width: 6rem; }
  .stage.fill .grid .cell-main { min-width: 13rem; }
  .stage.fill .grid .kind { white-space: normal; }
}
@media (max-width: 1599px) {
  .col-products { display: none; }  /* Die Kernkompetenz sagt das Wesentliche, der Platz reicht hier nicht für beides */
}
@media (max-width: 1199px) {
  .result-split { grid-template-columns: minmax(0, 1fr); }
  .result-map { position: static; order: -1; height: 18rem; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 999px) {
  .detail-facts { grid-template-columns: minmax(0, 1fr); }
  .facts-map { height: 11rem; }
  .pop-body { left: 0.5rem; right: 0.5rem; top: auto; bottom: 0.5rem; width: auto; max-height: 50vh; }
}
@media (max-width: 760px) {
  :root { --gutter: 1rem; }
  body { height: auto; background: var(--paper); }
  .shell { display: block; height: auto; padding: 0; }
  .stage { border-radius: 0; box-shadow: none; }
  .rail { position: sticky; top: 0; z-index: 40; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; padding: 0.5rem 1rem; background: var(--ground); }
  .brand { padding: 0; }
  .rail-search { width: auto; margin-left: auto; }
  .rail-search kbd, .rail-theme span { display: none; }
  .rail-theme { padding: 0 0.625rem; order: 2; }
  .rail-nav { order: 3; width: 100%; flex: none; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .rail-nav::-webkit-scrollbar { display: none; }
  .rail-nav a { padding: 0 0.625rem; white-space: nowrap; }
  .rail-nav svg { display: none; }
  .stage, .stage.fill { display: block; overflow: visible; }
  .stage.fill .grid-wrap { overflow-x: auto; }
  .stage.fill .grid .cell-main { min-width: 11rem; }
  .map-page #map { height: 72vh; }
  .map-float { position: static; padding: 0.625rem 1rem; }
  .map-float-head, .map-float .bar, .map-float .chips { box-shadow: none; padding: 0; }
  .map-float .search { width: 100%; }
  .search, .search-short { flex: 1 1 100%; }
  .pickr { flex: 1 1 calc(50% - 0.25rem); }
  .pickr-btn { width: 100%; max-width: none; justify-content: space-between; }
  .pickr-pop { width: min(20rem, calc(100vw - 2rem)); }
  .more-body { width: min(22rem, calc(100vw - 2rem)); }
  .hero-model { font-size: 2.5rem; }
  .ask { position: static; width: auto; padding: 1.25rem 1rem; border-radius: 0; box-shadow: none; }
  .ask h1 { font-size: 1.75rem; }
  .home-hero-map { height: 18rem; }
  .home-open { top: 0.75rem; right: auto; left: 0.75rem; }
  .head-plain h1 { font-size: var(--t-h1); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bars-kind a { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 2.5rem; }
  .reason { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .result-map { height: 15rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
@media (max-width: 699px) {
  .builder-foot > .btn { flex: 1 1 100%; }
}
