/* Grundrisssammlung · Prof. Dr. Reinhard König in Zusammenarbeit mit Claude von Anthropic · CC BY 4.0
   Farben und Schrift wie die Konzeptstudie Zweispänner (grundriss-4zi.html), Lab-Stil: dunkel, Geist, Lab-Blau. */
:root {
  --paper: #f3f4f3; --sheet: #ffffff; --ink: #17191b; --line: #2a2d30; --muted: #5d636a; --rule: #d6d9db;
  --tone: #eceeef; --accent: #275d92; --accent-soft: rgba(39, 93, 146, .13); --karte: #e4e5e3;
  --f-display: "Geist", "Arial Narrow", "Helvetica Neue", sans-serif;
  --f-body: "Geist", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1112; --sheet: #16191b; --ink: #e7e8e6; --line: #c9ccca; --muted: #9aa0a6; --rule: #2c3135;
    --tone: #1f2326; --accent: #86b6e6; --accent-soft: rgba(134, 182, 230, .16); --karte: #111111; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1112; --sheet: #16191b; --ink: #e7e8e6; --line: #c9ccca; --muted: #9aa0a6; --rule: #2c3135;
  --tone: #1f2326; --accent: #86b6e6; --accent-soft: rgba(134, 182, 230, .16); --karte: #111111; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.55; }
a { color: var(--accent); }
.wrap { max-width: 1440px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 20px; }

.head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: end; border-bottom: 1.5px solid var(--ink); padding-bottom: 18px; }
.eyebrow { font-family: var(--f-display); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(28px, 4vw, 42px); line-height: 1.05; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.lead { margin: 10px 0 0; max-width: 78ch; color: var(--muted); }
.facts { display: grid; grid-auto-flow: column; margin: 0; font-family: var(--f-display); }
.facts div { padding: 0 18px; border-left: 1px solid var(--rule); }
.facts div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Tabzeile wie in der App; die Sammlung steht abgesetzt hinter „||“ */
.tabzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.tabs-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.viewswitch { display: inline-flex; border: 1px solid var(--ink); }
.viewswitch a, .viewswitch button { font-family: var(--f-display); font-size: 15px; color: var(--ink); background: transparent; border: 0; padding: 7px 18px; cursor: pointer; text-decoration: none; line-height: 1.55; }
.viewswitch > a + a, .viewswitch > button + button { border-left: 1px solid var(--ink); }
.viewswitch [aria-current="page"], .viewswitch [aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.tab-trenner { font-family: var(--f-display); font-size: 22px; letter-spacing: -.02em; color: var(--muted); user-select: none; }
.tabzeile-rechts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.sprachwahl button, .themawahl { font: inherit; letter-spacing: inherit; text-transform: inherit; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; }
.sprachwahl button[aria-pressed="true"] { color: var(--ink); }
.doku-knopf { --ef-blau: #9ea0f3; display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border: 1px solid var(--ef-blau); border-radius: 999px; background: transparent; color: var(--ef-blau); text-decoration: none; font: 500 14px/1.2 var(--f-body); letter-spacing: 0; text-transform: none; }
:root[data-theme="light"] .doku-knopf { --ef-blau: #4649e1; }
.doku-knopf svg { width: 15px; height: 15px; flex: none; }
.doku-knopf:hover { background: var(--ef-blau); color: var(--paper); }

/* Werkzeugleiste */
.leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-family: var(--f-display); }
.gruppe { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gruppe .label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.chip { font: 14px/1.2 var(--f-display); border: 1px solid var(--rule); background: transparent; color: var(--ink); padding: 5px 11px; border-radius: 999px; cursor: pointer; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--sheet); }
.knopf { font: 14px/1.2 var(--f-display); border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 5px 12px; cursor: pointer; text-decoration: none; }
.knopf:hover { background: var(--tone); }
.leise { color: var(--muted); }

/* Karte */
.karte { position: relative; height: calc(100vh - 250px); min-height: 420px; background: var(--karte); border: 1px solid var(--rule); overflow: hidden; touch-action: none; cursor: grab; }
.karte.zieht { cursor: grabbing; }
.karte canvas { display: block; width: 100%; height: 100%; }
.info { min-height: 1.6em; font-family: var(--f-display); font-variant-numeric: tabular-nums; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 14px; height: 10px; display: inline-block; border: 1px solid rgba(0,0,0,.25); }

/* Einzelansicht */
.einzel { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.blatt { position: relative; background: #f6f5f0; border: 1px solid var(--rule); height: calc(100vh - 230px); min-height: 460px; overflow: hidden; touch-action: none; }
.blatt svg { width: 100%; height: 100%; display: block; cursor: grab; }
.seite { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; display: grid; gap: 18px; padding-right: 4px; }
.seite h2 { font-family: var(--f-display); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; font-weight: 500; }
.ebenen label { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.ebenen input { accent-color: var(--accent); }
.ebenen .muster { width: 18px; height: 10px; border: 1px solid rgba(0,0,0,.3); flex: none; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 14px; }
td, th { text-align: left; padding: 3px 6px 3px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
td.z { text-align: right; white-space: nowrap; }
.zitat { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.geschosse button { font: 14px var(--f-display); }
.fuss { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 14px; }
.fuss p { margin: 0; max-width: 110ch; }
@media (max-width: 960px) {
  .einzel { grid-template-columns: minmax(0, 1fr); }
  .seite { position: static; max-height: none; overflow: visible; }
  .head { grid-template-columns: minmax(0, 1fr); }
  .blatt { height: 70vh; }
}
