/* tokens.css — the colour and spacing vocabulary. Loaded first; nothing
   else in css/ may hardcode a UI colour.

   Single dark theme (design 3a): dark architect millimetre paper, iOS-style
   glass panels, one orange accent. The light/dark toggle is gone -- the
   glass, the paper grid and every accent tint are calibrated for #0e0f10,
   and a light counterpart would be a second design, not a variable swap.
   The print document (#print-doc) is deliberately NOT themed: it is a
   document meant to be read on paper, always light. */

:root {
  /* ---- the accent, in ONE place ----------------------------------------
     Everything orange in the UI -- including SVG fills and strokes, which
     use style="fill:var(--acc)" rather than the fill attribute so this
     cascade reaches them -- resolves to these two. Alternates that were
     designed alongside: #ffb700/#ffd257, #ff7a1a/#ff9f5c, #f2542d/#f78a63,
     #d9a021/#eec25a. Change the pair, the whole tool follows. */
  --acc: #ff9d2e;
  --acc2: #ffbe63;

  /* ---- grounds ---------------------------------------------------------
     --canvas is the millimetre paper. --draw is opaque, for panels holding
     a drawing: glass behind a map or a 3D scene turns to mud. */
  --canvas: #0e0f10;
  --draw: #141516;
  /* Glas, durchgehend und durchscheinend. Die Werte lagen bei .72/.74/.62 --
     praktisch undurchsichtig; vom Millimeterpapier darunter war nie etwas zu
     sehen.

     Entscheidend war nicht nur die Deckung, sondern die FARBE: ein dunkler
     Anflug auf fast schwarzem Grund (#0e0f10) bleibt unsichtbar, auch bei
     20 % Deckung -- rechnerisch durchscheinend, sichtbar unveraendert. Glas
     liest sich auf dunklem Grund erst, wenn die Scheibe HELLER ist als das,
     worauf sie liegt. Deshalb jetzt ein heller Anflug bei ~8 % Deckung: die
     Flaeche hebt sich als Scheibe ab, und das Raster darunter scheint durch.

     Lesbar bleibt es durch --blur-glass: der Backdrop-Blur nimmt dem
     Untergrund den Kontrast, bevor Text darauf liegt. Ohne den Blur waere
     diese Deckung unbenutzbar. */
  --glass: rgba(255, 255, 255, .045);
  --bar-glass: rgba(255, 255, 255, .06);
  --status-glass: rgba(255, 255, 255, .04);
  --overlay-box: rgba(28, 28, 28, .5);

  /* ---- text, five steps ------------------------------------------------ */
  --txt: #eceae8;
  --txt2: #a9a7a4;
  --txt3: #8c8a88;
  --lbl: #6e6c6a;
  --faint: #5a5856;

  /* ---- semantic --------------------------------------------------------
     ok green and assumption amber. Both are readable on --glass at 11px,
     which is the smallest they are ever set. */
  --ok: #9ec98c;
  --assume: #e9c78d;
  --log-ok: #d2ded0;
  --log-cite: #ffd3a1;
  --log-warn: #f0dcc0;

  /* ---- lines ----------------------------------------------------------- */
  --hair: rgba(255, 255, 255, .09);
  --hair-soft: rgba(255, 255, 255, .07);
  --row-rule: rgba(255, 255, 255, .045);

  /* ---- geometry -------------------------------------------------------- */
  --r-frame: 24px;
  --r-panel: 18px;
  --r-inner: 17px;
  --r-overlay: 16px;
  --r-brand: 12px;
  --r-row: 10px;
  --gutter: 12px;
  --pad-canvas: 14px;

  --shadow-frame: 0 24px 60px rgba(0, 0, 0, .55);
  --shadow-panel: 0 12px 34px rgba(0, 0, 0, .55);
  /* Mehr Unschaerfe, weniger Saettigung: der Untergrund wird ruhiger, statt
     dass die Scheibe selbst auffaellt. Zurueckgenommen am 30.8.2026 -- der
     Effekt stand vor dem Inhalt. */
  --blur-glass: blur(24px) saturate(115%);
  --blur-overlay: blur(20px);

  /* ---- type ------------------------------------------------------------
     Eine Schrift fuer die ganze Oberflaeche: Menlo. Vorher standen hier
     zwei (Archivo fuer Beschriftungen, IBM Plex Mono fuer Zahlen); beide
     Tokens zeigen jetzt auf dieselbe Familie, damit die Trennung an EINER
     Stelle wieder aufgemacht werden kann, statt sie durch 1300 Zeilen CSS
     zurueckzusuchen.

     Menlo liegt auf jedem Mac bereit und wird NICHT mitgeliefert -- der
     Verdrahtungstest besteht darauf, dass die App ohne fremde Hosts laeuft,
     und eine Systemschrift verletzt das nicht. Die Kette dahinter faengt
     Windows und Linux ab, wo es Menlo nicht gibt.

     Das Exportdokument ist davon unberuehrt: css/print.css setzt seine
     Schriften selbst (Archivo/IBM Plex Mono) und liest diese Tokens nicht --
     Papier ist ein anderes Medium als der Bildschirm. */
  --font-ui: Menlo, ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'DejaVu Sans Mono', monospace;
  --font-num: Menlo, ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'DejaVu Sans Mono', monospace;

  /* ---- legacy token names ----------------------------------------------
     css/components.css, css/print.css and the evidence overlay were written
     against the old two-theme vocabulary. Rather than rewrite 400 lines of
     working component CSS for a rename, the old names are kept and pointed
     at the palette above. Nothing new should use them -- but nothing is
     served by breaking the Zonen-Steckbrief, the Prüfliste, the Grundbuch
     form or the § evidence viewer to prove a point about naming. */
  --bg: var(--canvas);
  --bg-pane: var(--glass);
  --bg-raised: rgba(255, 255, 255, .04);
  --bg-sunken: rgba(0, 0, 0, .25);
  --text: var(--txt);
  --text-muted: var(--txt2);
  --text-faint: var(--txt3);
  --border: var(--hair);
  --border-soft: var(--row-rule);
  --accent: var(--acc);
  --accent-soft: color-mix(in srgb, var(--acc) 14%, transparent);
  --accent-text: #0c0c0c;
  --pass-bg: color-mix(in srgb, var(--ok) 12%, transparent);
  --pass-badge: var(--ok);
  --flag-bg: rgba(198, 40, 40, .16);
  --flag-badge: #e57373;
  --review-bg: color-mix(in srgb, var(--assume) 12%, transparent);
  --review-badge: var(--assume);
  --warn-bg: color-mix(in srgb, var(--assume) 10%, transparent);
  --warn-border: color-mix(in srgb, var(--assume) 30%, transparent);
  --warn-text: var(--log-warn);
  --shadow: rgba(0, 0, 0, .5);

  /* Inverts the raster cadastral tiles into a dark, low-glare basemap.
     invert(0.92), not 1: a full invert makes tiny antialiasing differences
     between two independently-rasterised adjacent WMTS tiles swing all the
     way to near-black vs near-white, which reads as a seam along the tile
     edge. A partial invert plus a touch of blur damps that swing. */
  /* grayscale VOR dem Invertieren: die Katasterkacheln (rosa Gebäude,
     blaues Wasser, grüner Wald) werden zu reinem Grau/Weiss — Farbe auf der
     Karte gehört allein den Orange-Overlays der gewählten Parzellen. */
  --map-filter: grayscale(1) invert(0.92) brightness(0.9) contrast(0.85);
}
