/* Hertzwerk — gemeinsame Gestaltung aller Werkzeuge.
   Nach der Überschall-Website (design-system/ueberschall-homepage-final.html): Void, Hairlines,
   Martian-Mono-Labels in Versalien, Solar als ein Akzent, Zahl in Inter 200. Keine Flächen, keine Schatten.
   Schriften selbst gehostet (offline, DSGVO). Entwurf: https://claude.ai/artifact/WbePTjEQi6RXMNFLCZAaao */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 200 600; font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 200 600; font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(fonts/martian-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(fonts/martian-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --void:     #0A0A0F;
  --surface:  #16161D;
  --elevated: #27272F;
  --bone:     #F4F4F5;
  --text2:    #D4D4D8;
  --muted:    #9CA3AF;
  --linie:    rgba(244, 244, 245, 0.12);
  --rand:     rgba(244, 244, 245, 0.25);
  --akzent:   #F2A03D;
  --akzent-flaeche: rgba(242, 160, 61, 0.10);
  --cyan: #3DBFEF; --coral: #E94B7C; --magenta: #A855C7;
  --verlauf: linear-gradient(90deg, #F2A03D, #E94B7C 40%, #A855C7 65%, #3DBFEF);
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: 'Martian Mono', ui-monospace, Menlo, monospace;
  /* Aliase für ältere Regeln */
  --bg: var(--void); --flaeche: var(--surface); --text: var(--bone); --text-leise: var(--muted);
  --akzent-tief: var(--akzent-flaeche);
  --tabs-hoehe: 0px; /* Tab-Leiste vorerst ausgebaut (Josua 27.10.2026); mit Leiste: 74px */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
body {
  min-height: 100dvh;
  padding: 0 env(safe-area-inset-right) calc(var(--tabs-hoehe) + env(safe-area-inset-bottom)) env(safe-area-inset-left);
}
a { color: inherit; text-decoration: none; }

/* Mono-Label: Martian Mono, Versalien, gesperrt */
.label, .kopf-titel, .zeile-kopf, .nebenzeile, .hinweis, .fuss, .abschnitt h2, .karte-nr, .tab span, .einheit-zeile, .mass span, .bald {
  font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; font-weight: 400;
}

/* ===== Tab-Leiste (alle Seiten) ===== */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  border-top: 0.5px solid var(--linie);
  background: rgba(10, 10, 15, 0.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  padding: 0 8px env(safe-area-inset-bottom);
}
.tabs-innen { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 0 12px; color: var(--muted); -webkit-tap-highlight-color: transparent;
}
.tab span { font-size: 8.5px; letter-spacing: .08em; }
.tab[aria-current="page"] { color: var(--akzent); }
.tab-bald { opacity: .4; }

/* ===== Startseite ===== */
.start { max-width: 640px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 24px 24px; }
.marke { display: flex; justify-content: space-between; align-items: flex-end; }
.marke-name { font-size: 14px; font-weight: 600; letter-spacing: .05em; }
.marke-sub { font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.sprache {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted);
  background: transparent; border: 0.5px solid var(--rand); border-radius: 6px; padding: 7px 10px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.verlauf-linie { height: 2px; margin-top: 18px; background: var(--verlauf); border-radius: 1px; }
.start h1 { margin: 36px 0 6px; font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.start-text { margin: 0 0 10px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.werkzeuge { display: flex; flex-direction: column; margin-top: 8px; border-top: 0.5px solid var(--linie); }
.karte {
  display: flex; align-items: center; gap: 16px; padding: 18px 0;
  border-bottom: 0.5px solid var(--linie); -webkit-tap-highlight-color: transparent;
}
.karte:active { background: var(--surface); }
.karte-nr { font-size: 10.5px; color: var(--akzent); width: 22px; flex: none; }
.karte-inhalt { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.karte-titel { font-size: 19px; font-weight: 500; letter-spacing: -.01em; }
.karte-text  { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.karte svg { flex: none; color: var(--muted); }
.karte-bald { opacity: .55; }
.karte-bald .karte-nr { color: var(--muted); }
.bald { font-size: 9px; color: var(--muted); border: 0.5px solid var(--rand); border-radius: 4px; padding: 4px 7px; flex: none; }
.fuss { margin-top: 36px; font-size: 9px; color: var(--muted); text-align: center; }

/* ===== Seite Mehr ===== */
.mehr-zeile { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 0.5px solid var(--linie); }
.mehr-zeile .karte-inhalt { flex: 1; }
.mehr-zeile .segment { width: 132px; flex: none; }
.mehr-text { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 14px 0 0; }
.mehr-text a { color: var(--akzent); font-weight: 600; }

/* ===== Werkzeug ===== */
.werkzeug { max-width: 640px; margin: 0 auto; padding-bottom: 24px; }

.kopf {
  position: sticky; top: 0; z-index: 2;
  padding: calc(14px + env(safe-area-inset-top)) 24px 14px;
  background: rgba(10, 10, 15, 0.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--linie);
}
.kopf-titel { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; color: var(--muted); }
.kopf-titel .name { color: var(--akzent); }
.zurueck {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-left: -4px;
  color: var(--muted); -webkit-tap-highlight-color: transparent;
}
.zurueck svg { flex: none; }

.eingabe-gross {
  display: block; width: 100%;
  background: none; border: 0; outline: none;
  color: var(--bone);
  font-family: var(--sans); font-size: clamp(64px, 24vw, 96px); font-weight: 200; letter-spacing: -.04em; line-height: 0.98;
  text-align: right; font-variant-numeric: tabular-nums;
  padding: 18px 0 0; margin: 0;
  -moz-appearance: textfield; appearance: textfield;
}
.eingabe-gross::-webkit-outer-spin-button, .eingabe-gross::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.eingabe-gross:focus { color: var(--akzent); }
.einheit-zeile { display: flex; justify-content: flex-end; gap: 8px; font-size: 10px; color: var(--muted); margin-top: 6px; }

.kopf-aktionen { display: grid; grid-template-columns: 56px 1fr 56px; gap: 10px; margin-top: 18px; }
.knopf {
  height: 48px; border-radius: 6px;
  border: 0.5px solid var(--rand); background: transparent; color: var(--bone);
  font: inherit; font-size: 22px; font-weight: 400;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: pointer;
}
.knopf:active { background: var(--elevated); }
.knopf-tap { border-color: var(--akzent); color: var(--akzent); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.knopf-tap.aktiv, .knopf-tap:active { background: var(--akzent-flaeche); }
.knopf-text { font-size: 14px; font-weight: 500; }
.knopf-text[aria-pressed="true"] { border-color: var(--akzent); color: var(--akzent); font-weight: 600; }

/* Umschalter (m | ms) und Chips (einzeln an/aus): gleiche Form, hairline, Elevated bei Auswahl */
.segment, .chips {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  border: 0.5px solid var(--rand); border-radius: 6px; overflow: hidden; background: transparent;
}
.segment { height: 48px; }
.chips { margin-top: 12px; }
.segment button, .chip {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: pointer;
}
.chip { height: 36px; }
.segment button + button, .chip + .chip { border-left: 0.5px solid var(--rand); }
.segment button[aria-pressed="true"], .chip[aria-pressed="true"] { background: var(--elevated); color: var(--bone); }

/* Nebenzeile im Kopf oder Abschnitt (z. B. Temperatur) */
.nebenzeile { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 9.5px; color: var(--muted); }
.nebenwert { min-width: 52px; text-align: center; color: var(--bone); font-family: var(--sans); font-size: 15px; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.nebenrechts { margin-left: auto; font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--text2); font-variant-numeric: tabular-nums; }
.knopf-klein { width: 36px; height: 32px; border-radius: 6px; font-size: 18px; }

/* --- Tabelle --- */
.tabelle { padding: 0 24px; }
.zeile {
  display: grid; grid-template-columns: 1fr 1.3fr 1fr; align-items: center; min-height: 50px;
  border-bottom: 0.5px solid var(--linie); font-variant-numeric: tabular-nums;
}
.zeile-2 { grid-template-columns: 1fr auto; }
.zeile > * { text-align: right; }
.zeile > :first-child { text-align: left; }
.zeile-kopf { min-height: 36px; margin-top: 10px; font-size: 9.5px; color: var(--muted); border-bottom: 0.5px solid var(--linie); }
.zeile-grund { background: none; }
.zeile-variante { color: var(--text2); }

.laenge { font-size: 17px; }
.laenge .variante { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; color: var(--muted); margin-left: 5px; vertical-align: 2px; }

.bez { font-size: 15px; line-height: 1.3; color: var(--text2); }
.bez small { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; color: var(--muted); margin-left: 6px; }

.wert {
  all: unset; display: block; width: 100%; box-sizing: border-box;
  text-align: right; padding: 14px 0 14px 8px; border-radius: 4px;
  font-size: 17px; cursor: pointer; -webkit-tap-highlight-color: transparent; font-variant-numeric: tabular-nums;
}
.wert:active, .wert.kopiert { color: var(--akzent); background: var(--akzent-flaeche); }
.wert small { color: var(--muted); font-size: 11px; margin-left: 4px; }
.wert small:empty { display: none; }

.hinweis { font-size: 9px; color: var(--muted); text-align: center; padding: 20px 24px 0; }

/* --- Toast --- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-hoehe) + 16px + env(safe-area-inset-bottom)); z-index: 6;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--elevated); color: var(--bone); border: 0.5px solid var(--rand);
  padding: 9px 16px; border-radius: 6px; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.sichtbar { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ===== Werkzeug Raum ===== */
.masse { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.mass { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mass input {
  width: 100%; background: none; border: 0; outline: none; padding: 0 0 6px; margin: 0;
  color: var(--bone); font-family: var(--sans); font-size: clamp(28px, 9.5vw, 40px); font-weight: 200; letter-spacing: -.03em;
  text-align: right; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
  border-bottom: 0.5px solid var(--rand);
}
.mass input::-webkit-outer-spin-button, .mass input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mass input:focus { color: var(--akzent); border-bottom-color: var(--akzent); }
.mass span { font-size: 9px; color: var(--muted); }

.abschnitt { padding: 22px 24px 6px; border-bottom: 0.5px solid var(--linie); }
.abschnitt h2 { margin: 0 0 12px; font-size: 9.5px; color: var(--muted); }
.abschnitt .tabelle { padding: 0; }

.platz { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.platz-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--akzent); display: block; margin-bottom: 4px; }
.platz-streuung .platz-label { color: var(--muted); }
.platz-wert { font-size: 40px; font-weight: 200; letter-spacing: -.03em; color: var(--bone); font-variant-numeric: tabular-nums; line-height: 1; }
.platz-streuung { text-align: right; }
.platz-text { color: var(--muted); font-size: 13px; margin-top: 4px; }

.regler { width: 100%; height: 44px; margin: 10px 0 2px; accent-color: var(--akzent); touch-action: pan-y; }
.knopfzeile { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.knopfzeile .knopf { height: 44px; }

/* Diagramme: eine Reihe im Akzent, Achsen in Mono */
.diagramm { margin: 26px 0 8px; }
.diagramm figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 15px; font-weight: 500; }
.diagramm figcaption small { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; text-align: right; max-width: 46%; line-height: 1.5; }
.diagramm-flaeche { position: relative; touch-action: pan-y; }
.diagramm-svg { display: block; width: 100%; height: auto; overflow: visible; font-variant-numeric: tabular-nums; }
.diagramm-svg .gitter { stroke: var(--linie); stroke-width: 1; }
.diagramm-svg .gitter-null { stroke: rgba(244, 244, 245, .22); stroke-dasharray: 3 3; }
.diagramm-svg .achse { fill: var(--muted); font-family: var(--mono); font-size: 9px; }
.diagramm-svg .referenz { stroke: rgba(244, 244, 245, .3); stroke-width: 1; stroke-dasharray: 4 4; }
.diagramm-svg .reihe { fill: none; stroke: var(--akzent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.diagramm-svg .marker { stroke: var(--void); stroke-width: 2; }
.diagramm-svg .marker-best { fill: var(--akzent); }
.diagramm-svg .marker-aktuell { fill: var(--bone); }
.diagramm-svg .marker-text { fill: var(--bone); font-family: var(--sans); font-size: 10px; font-weight: 600; }
.diagramm-svg .fadenkreuz { stroke: rgba(244, 244, 245, .45); stroke-width: 1; }
.diagramm-svg .fadenpunkt { fill: var(--bone); stroke: var(--void); stroke-width: 2; }
.diagramm-svg .trefferflaeche { fill: transparent; cursor: crosshair; }
.diagramm-svg .raum-umriss { fill: var(--surface); stroke: var(--rand); stroke-width: 1; }
.diagramm-svg .dreieck { fill: var(--akzent-flaeche); stroke: var(--akzent); stroke-width: 1; stroke-dasharray: 3 3; }
.diagramm-svg .box { fill: var(--akzent); stroke: var(--void); stroke-width: 2; }
#d-plan .diagramm-svg { cursor: pointer; }

.tooltip {
  position: absolute; top: -6px; pointer-events: none; transform: translateY(-100%);
  display: flex; flex-direction: column; align-items: center;
  background: var(--elevated); border: 0.5px solid var(--rand); border-radius: 6px;
  padding: 4px 9px; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.tooltip[hidden] { display: none; }
.tooltip strong { font-size: 14px; color: var(--bone); }
.tooltip span { color: var(--muted); }

.werte-tabelle { margin-top: 8px; }
.werte-tabelle summary { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); cursor: pointer; padding: 6px 0; }

.nebenzeile .neben-bez { min-width: 118px; }
.erklaerung { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 14px 0 14px; }

.zeile-moden { grid-template-columns: 1.2fr 1fr auto; }
.mode { display: flex; flex-direction: column; padding: 8px 0; }
.mode-n { font-size: 16px; }
.mode small { font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.am-platz { display: flex; flex-direction: column; align-items: flex-start !important; gap: 4px; text-align: left !important; }
.am-platz small { font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.balken { display: block; width: 100%; max-width: 90px; height: 4px; border-radius: 2px; background: var(--elevated); overflow: hidden; }
.balken i { display: block; height: 100%; border-radius: 2px; background: var(--akzent); }
.zeile-moden .wert { padding: 12px 0 12px 8px; }
.zeile-trenner {
  padding: 10px 0; font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); text-align: center; border-bottom: 0.5px solid var(--linie);
}

.bruecke {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin: 0 24px; padding: 18px 0 6px; border-top: 0.5px solid var(--linie);
  color: var(--muted); font-size: 13px; line-height: 1.4;
}
.bruecke a { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--akzent); font-weight: 600; }
