@import url("https://fonts.googleapis.com/css2?family=Noto+Sans&family=Noto+Sans+Mono&display=swap");

:root {
  --GroundC: #e6efec;
  --FontC: #333333;

  --BlackC: black;
  --WhiteC: white;

  --MC0: #0f4336;
  --MC1: #386054;
  --MC2: #5e7d73;
  --MC3: #849c94;
  --MC4: #acbcb6;
  --MC5: #d5ddda;

  --AC0: #430f1c;
  --AC1: #62343c;
  --AC2: #81595f;
  --AC3: #a08084;
  --AC4: #bfa9ab;
  --AC5: #dfd3d4;

  --EX1: #3d9980;
  /* Gedämpftes Türkisgrün */
  --EX2: #b5960a;
  /* Gedämpftes Senfgelb */
  --EX3: #cc5b5b;
  /* Gedämpftes Rot */
  --EX4: #2f78a3;
  /* Gedämpftes Blau */
  --EX5: #a8b836;
  /* Gedämpftes Olivgold */
  --EX6: #7e4ea5;
  /* Gedämpftes Violett */

  /* Semantische Status-Farben (abgeleitet aus Palette) */
  --Status-Ok-bg:   var(--MC5);      /* Helles Grün-Grau  → #d5ddda */
  --Status-Ok-fg:   var(--MC0);      /* Dunkelgrün        → #0f4336 */
  --Status-Warn-bg: var(--AC5);      /* Helles Rosa-Neutral → #dfd3d4 */
  --Status-Warn-fg: var(--EX2);      /* Senfgelb            → #b5960a */
  --Status-Info-bg: var(--GroundC);  /* Seitengrundfarbe    → #e6efec */
  --Status-Info-fg: var(--EX4);      /* Gedämpftes Blau    → #2f78a3 */
}

* {
  box-sizing: border-box;
  padding: 0px;
  margin: 0px;
  font-size: 1em;
  scroll-snap-type: none;
}

html {
  overflow-x: hidden;

}

/* Hauptelemente */
body {

  display: grid;
  grid-template-rows: 1fr auto;
  font-family: "Noto Sans Mono", sans-serif;
  color: var(--FontC);
  background-color: var(--GroundC);
  line-height: 1.3;
  margin: 50px;
  counter-reset: chapter 0 eq 0;
}


/* 3. INHALTS-BEREICH (GRID FÜR IHREN CODE) */
.main-content {

  padding-left: 100px;

  height: 100%;
}


/*Fließtext*/
p {
  max-width: 60em;
  padding-bottom: 0.6em;
}

/*Hervorhebung */
p.fett {
  font-weight: 700;
  /* 700 entspricht „bold“ */
  color: var(--MC0);
}

/*Icon */
.icon {
  height: 1.1em;
  width: auto;
  vertical-align: middle;
  font-weight: 700;
  /* 700 entspricht „bold“ */
  font-size: 1.5em;
}

/*Überschriften */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  /* 700 entspricht „bold“ */
  color: var(--MC0);
  font-size: 1.1em;
  padding-bottom: 0.6em;
  margin-top: 2rem;
}

h1:first-of-type {
  margin-top: 0;
}

h1 {
  font-size: 1.4em;
  counter-increment: chapter;
  counter-reset: eq;
}

h2 {
  counter-increment: chapter;
  counter-reset: eq;
}

sup,
sub {
  font-size: 0.7em;
}



summary,
a {
  color: var(--AC0);
  /* Dezente Farbwahl, nicht zu grell */
  text-decoration: none;
  /* Entfernt die Unterstreichung */
  transition: color 0.3s ease-in-out;
  /* Sanfter Farbwechsel */
}

a:hover {
  color: var(--AC2);
  /* Etwas dunkler beim Überfahren mit der Maus */
  font-weight: 700;
  /* 700 entspricht „bold“ */
}


summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-left: 1.8em;
  /* Platz für Dreieck */
}

ul {
  /* Quadratische Aufzählungszeichen */
  list-style-type: square;

  /* Entfernt das Standard-Padding, damit die Quadrate 
     linksbündig mit dem restlichen Inhalt abschließen */
  padding-left: 1.2rem;
  margin-left: 0;
}

li {
  /* Sorgt für einen sauberen Abstand zwischen den Zeilen */
  margin-bottom: 0.25rem;
  padding-left: 0.2rem;
}

/* Basis-Klasse für die verschachtelte Liste */
.nested-list,
.nested-list .nested-list {
  counter-reset: list-counter;
  list-style-type: none;
  padding-left: 0 !important;
  margin-left: 0 !important;
  margin-top: 0;
  margin-bottom: 0;
}

/* Listeneintrag als Grid-System formatieren */
.nested-list .list-item {
  counter-increment: list-counter;
  display: grid;
  grid-template-columns: 65px 1fr;
  align-items: start;
  margin: 0 !important;
  padding-left: 0 !important;
}

/* Formatierung der generierten Nummern */
.nested-list .list-item::before {
  content: counters(list-counter, ".") " ";
  font-weight: bold;
  grid-column: 1;
  text-align: left;
}

/* Unterliste komplett ohne Einrückung in das Grid einfügen */
.nested-list .list-item > .nested-list {
  grid-column: 1 / -1;
  padding-left: 0 !important;
  margin-left: 0 !important;
}


/* Die feste Fußzeile */
.legal-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: var(--GroundC);
  border-top: 1px solid var(--MC3);
  /* Dezente Trennlinie */
  padding: 12px 0;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  /* Leichter Schatten nach oben */
  z-index: 9999;
  /* Bleibt immer im Vordergrund */
}

/* Erweiterung für Wärmedurchgang */
.container {
  max-width: 1320px;
  width: 96%;
  margin: 0 auto;
  background-color: var(--WhiteC);
  padding: clamp(16px, 3vw, 32px);
  border-radius: 8px;
  border: 1px solid var(--MC4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.section {
  background-color: var(--MC5);
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--MC4);
}

.section h3 {
  margin-top: 0;
  color: var(--MC0);
  border-bottom: 2px solid var(--MC3);
  padding-bottom: 4px;
  margin-bottom: 12px;
}

.input-group {
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.input-group label {
  font-weight: 500;
  font-size: 0.9em;
  color: var(--FontC);
}

.input-group input {
  width: 100px;
  padding: 6px 10px;
  border: 1px solid var(--MC3);
  border-radius: 4px;
  text-align: right;
  background-color: var(--WhiteC);
  color: var(--FontC);
  font-family: inherit;
}

.input-group input:focus {
  outline: none;
  border-color: var(--MC0);
  box-shadow: 0 0 0 2px var(--MC4);
}

button {
  background-color: var(--MC0);
  color: var(--WhiteC);
  border: none;
  padding: 12px 24px;
  font-size: 1em;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s ease-in-out;
  font-family: inherit;
}

button:hover {
  background-color: var(--MC1);
}

/* Details & Referenztabelle */
details {
  background-color: var(--MC5);
  border: 1px solid var(--MC3);
  border-radius: 8px;
  margin-bottom: 25px;
  padding: 12px 16px;
}

details summary {
  cursor: pointer;
  font-weight: bold;
  color: var(--MC0);
  padding: 4px 0;
}

.table-responsive {
  margin-top: 15px;
  overflow-x: auto;
}

/* Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background-color: var(--WhiteC);
  font-size: 0.9em;
}

th, td {
  border: 1px solid var(--MC4);
  padding: 10px;
  text-align: left;
}

th {
  background-color: var(--MC0);
  color: var(--WhiteC);
  font-weight: 700;
}

/* Leere Tabellenkopfzeilen oder leere Zeilen/Zellen automatisch ausblenden */
thead:empty,
thead:has(tr:empty),
tr:empty {
  display: none !important;
}

.highlight {
  font-weight: bold;
  background-color: var(--MC5);
}

.category-header {
  font-weight: bold;
  color: var(--MC1);
  background-color: var(--MC5);
}

.table-note, .subtext {
  font-size: 0.85em;
  margin-top: 10px;
  color: var(--MC2);
}

/* Formeln & Ausgaben */
.formula-box {
  background-color: var(--MC5);
  border-left: 4px solid var(--MC0);
  padding: 15px;
  margin: 15px 0 25px 0;
  border-radius: 0 8px 8px 0;
}

.formula-item {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.formula-label {
  font-weight: 600;
  min-width: 280px;
  color: var(--FontC);
}

math {
  font-size: 1.1em;
  font-family: "Latin Modern Math", "Cambria Math", serif;
  color: var(--FontC);
}

.chart-container {
  background-color: var(--WhiteC);
  padding: 15px;
  border: 1px solid var(--MC4);
  border-radius: 8px;
  margin-bottom: 25px;
  position: relative;
  height: 350px;
  width: 100%;
}

.chart-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.output-section {
  margin-top: 30px;
  display: none;
}

/* Schutzabstand für den Hauptbereich zwischen fixierter Kopf- und Fußzeile */
body {
  padding-top: 70px;
  padding-bottom: 80px;
}

/* Die feste Kopfzeile (analog zur Fußzeile) */
.page-header {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  background-color: var(--GroundC);
  border-bottom: 1px solid var(--MC3);
  padding: 12px 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 9999;
}

.page-header a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  color: var(--MC0);
}

.page-header a:hover {
  color: var(--AC2);
}

.header-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

.page-header h1 {
  margin: 0;
  padding: 0;
  font-size: 1.1em;
  font-weight: 700;
  color: var(--MC0);
  display: inline;
}

/* Erweitertes Formular- und Navigationsdesign für Helferchen-Rechner (z.B. KvGas) */
fieldset {
  border: 1px solid var(--MC4);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  background-color: var(--MC5);
}

legend {
  font-weight: 700;
  color: var(--MC0);
  padding: 0 8px;
  font-size: 0.95em;
}

label.help-link,
.help-link {
  cursor: pointer;
  color: var(--FontC);
  transition: color 0.2s ease-in-out;
}

label.help-link:hover,
.help-link:hover {
  color: var(--AC0);
  text-decoration: underline;
}

.input-control {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 250px;
  flex-shrink: 0;
  justify-content: flex-start;
}

.input-control input[type="number"],
.input-control input[type="text"],
.input-control select {
  width: 140px;
  height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--MC3);
  border-radius: 4px;
  background-color: var(--WhiteC);
  color: var(--FontC);
  font-family: inherit;
  font-size: 0.9em;
  box-sizing: border-box;
  flex-shrink: 0;
}

.input-control input[readonly] {
  background-color: #e2ebe8;
  border-color: var(--MC3);
  color: var(--FontC);
}

.unit {
  font-size: 0.85em;
  color: var(--MC1);
  width: 100px;
  white-space: nowrap;
  font-weight: 500;
  flex-shrink: 0;
}

.radio-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 250px;
  flex-shrink: 0;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.radio-row input[type="radio"] {
  cursor: pointer;
  width: auto;
}

.radio-row label {
  cursor: pointer;
  font-size: 0.9em;
  font-weight: normal;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--MC3);
  padding-bottom: 10px;
}

.form-header h2 {
  margin: 0;
  padding: 0;
  border: none;
}

.nav-box {
  background-color: var(--MC5);
  border: 1px solid var(--MC4);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 25px;
}

.nav-box h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--MC0);
  border-bottom: none;
  padding-bottom: 0;
}

.top-link {
  float: right;
  font-size: 0.85em;
  color: var(--MC2);
  text-decoration: none;
}

.top-link:hover {
  color: var(--AC0);
  text-decoration: underline;
}

.legend-box {
  background-color: var(--MC5);
  border: 1px solid var(--MC4);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 20px;
}

.legend-box h3 {
  margin-top: 10px;
  margin-bottom: 8px;
  color: var(--MC0);
  border-bottom: 1px solid var(--MC3);
  padding-bottom: 4px;
}

.legend-box h3:first-child {
  margin-top: 0;
}

select {
  padding: 6px 10px;
  border: 1px solid var(--MC3);
  border-radius: 4px;
  background-color: var(--WhiteC);
  color: var(--FontC);
  font-family: inherit;
  font-size: 0.9em;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: var(--MC0);
  box-shadow: 0 0 0 2px var(--MC4);
}

/* Navigation tabs in modules */
.sidebar-nav {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--MC4);
  padding-bottom: 10px;
}

.sidebar-nav a {
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  color: var(--MC1);
  background-color: var(--MC5);
  transition: all 0.2s ease-in-out;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  background-color: var(--MC0);
  color: var(--WhiteC);
}

/* Grid layout for calculation forms */
.grid-container {
  display: grid;
  grid-template-columns: 2fr 0.6fr 1.2fr 0.8fr;
  gap: 10px 15px;
  align-items: center;
  margin-bottom: 15px;
}

.grid-item.description {
  font-weight: 500;
  font-size: 0.92em;
}

.grid-item.Symbol {
  font-weight: bold;
  color: var(--MC0);
  text-align: center;
}

.grid-item.input input,
.grid-item.input select,
.grid-item.output input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--MC3);
  border-radius: 4px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.95em;
}

.grid-item.output input {
  background-color: #eaf1ee;
  font-weight: bold;
  color: var(--MC0);
}

.grid-item.unit {
  font-size: 0.85em;
  color: var(--MC1);
}

.btn-calc {
  background-color: var(--MC0);
  color: var(--WhiteC);
  border: none;
  padding: 10px 20px;
  font-size: 0.95em;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  margin-top: 10px;
}

.btn-calc:hover {
  background-color: var(--MC1);
}

.verdict-box {
  padding: 12px 18px;
  border-radius: 6px;
  margin-top: 15px;
  font-weight: bold;
  font-size: 0.95em;
}

.verdict-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.verdict-warning {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.wrapper {
  margin-top: 20px;
  background-color: var(--WhiteC);
  border: 1px solid var(--MC4);
  border-radius: 8px;
  padding: 15px;
}

svg#bl_plot {
  width: 100%;
  height: auto;
  display: block;
}

.note {
  padding: 15px 0;
  margin: 20px 0;
}

/* Erweitertes Layout, Gleichungen & Styling (integriert aus Lochflaeche) */
a.active {
  font-weight: 700;
  color: var(--MC0);
}

tr:nth-child(even) {
  background-color: var(--MC5);
}

tr:nth-child(odd) {
  background-color: var(--GroundC);
}

pre {
  font-family: inherit;
  background-color: var(--MC5);
  padding: 8px 12px;
  margin-bottom: 1em;
  border-radius: 4px;
  max-width: 60em;
}

code {
  background-color: var(--MC5);
  padding: 2px 4px;
  border-radius: 3px;
}

/* Gleichungen */
.equation,
.formula-box:not(:has(.formula-item)),
.formula-item {
  margin-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  max-width: 60rem;
  font-size: 1.3em;
}

/* ==========================================================================
   Rohr-Rechner & Wirksame Rohrlänge Modul-Styles
   ========================================================================== */

:root {
  --paper: var(--WhiteC);
  --paper-2: var(--GroundC);
  --ink: var(--FontC);
  --ink-soft: var(--MC1);
  --line: var(--MC3);
  --blue-steel: var(--MC0);
  --rust: var(--EX3);
  --olive: var(--EX5);
  --accent: var(--EX2);
  --radial: var(--EX3);
  --tangential: var(--EX4);
  --axial: var(--EX1);
  --temp: var(--EX6);
  --vonmises: var(--EX2);
}

.mono {
  font-family: "IBM Plex Mono", "SFMono-Regular", "Consolas", monospace;
  font-variant-numeric: tabular-nums;
}

.nav-back-wrap {
  margin-bottom: 0.6rem;
}

.nav-back-link {
  color: var(--MC0);
  text-decoration: none;
  font-size: 0.88rem;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-back-link:hover {
  text-decoration: underline;
}

.layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.8rem;
  align-items: start;
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
}

.panel {
  padding: 0;
  border-right: none;
}

.field-group {
  background-color: var(--MC5);
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid var(--MC4);
  margin-bottom: 1.2rem;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.field-group h2 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--MC0);
  margin: 0 0 0.8rem;
  font-family: inherit;
  border-bottom: 2px solid var(--MC3);
  padding-bottom: 0.35rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
  position: relative;
  transition: background-color 0.25s ease, border-color 0.25s ease;
  border-radius: 4px;
}
.field.field-active {
  background-color: var(--GroundC);
  padding: 0.4rem 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  border-left: 3px solid var(--MC0);
}
.field.field-active label {
  color: var(--MC0);
  font-weight: 700;
}
.field.field-active input, .field.field-active select {
  border-color: var(--MC0);
  background-color: var(--WhiteC);
  box-shadow: 0 0 0 2px var(--MC4);
}

.field label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--FontC);
}
.field-input {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.field .unit {
  font-size: 0.82rem;
  color: var(--FontC);
  width: 3.2rem;
  text-align: left;
  flex-shrink: 0;
}
.field input, .field select {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--MC3);
  background: var(--WhiteC);
  border-radius: 4px;
  font-size: 0.92rem;
  color: var(--FontC);
  font-family: "IBM Plex Mono", "Consolas", monospace;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--MC0);
  box-shadow: 0 0 0 2px var(--MC4);
}

.warn {
  font-size: 0.82rem;
  color: var(--EX4);
  margin-top: 0.4rem;
  min-height: 1.1em;
}

.hyp-toggle {
  display: flex;
  border: 1px solid var(--MC3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.6rem;
  transition: background-color 0.25s ease;
}
.hyp-toggle.field-active {
  background-color: var(--GroundC);
  padding: 0.3rem 0.4rem;
  margin-left: -0.4rem;
  margin-right: -0.4rem;
  border-left: 3px solid var(--MC0);
  border-color: var(--MC2);
}
.hyp-option {
  flex: 1;
  position: relative;
  cursor: pointer;
}
.hyp-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.hyp-option span {
  display: block;
  text-align: center;
  padding: 0.45rem 0.3rem;
  font-size: 0.82rem;
  color: var(--FontC);
  border-left: 1px solid var(--MC3);
  transition: background 0.12s, color 0.12s;
}
.hyp-option:first-child span { border-left: none; }
.hyp-option input:checked + span {
  background: var(--MC0);
  color: var(--WhiteC);
  font-weight: 600;
}
.hyp-option:hover input:not(:checked) + span {
  background: var(--MC4);
}
.hyp-hint {
  font-size: 0.78rem;
  color: var(--FontC);
  line-height: 1.4;
  margin: 0;
}

#gasdichteBtn {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
#gasdichteBtn.field-active {
  background-color: var(--GroundC);
  border-color: var(--MC0);
  color: var(--MC0);
  font-weight: 600;
}

.results {
  padding: 0;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 2px solid var(--MC3);
  margin-bottom: 1.6rem;
}
.tab-btn {
  width: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--FontC);
  background: var(--MC5);
  border: 1px solid var(--MC4);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  margin-bottom: -2px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.tab-btn:hover:not(.active) {
  background: var(--MC4);
  color: var(--MC0);
}
.tab-btn.active {
  color: var(--WhiteC);
  background: var(--MC0);
  border-color: var(--MC0);
  font-weight: 700;
}
.tab-panel.hidden { display: none; }
.tab-placeholder {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-style: italic;
  padding: 2rem 0;
}

.kr-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 800px) {
  .kr-layout { grid-template-columns: 1fr; }
}
.kr-sketch-wrap {
  border: 1px solid var(--line);
  background: #fffdf8;
  padding: 1rem;
}
.kr-sketch-wrap svg { display: block; width: 100%; height: auto; }

.kr-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px dotted var(--line);
  cursor: default;
  border-radius: 2px;
  transition: background 0.12s;
}
.kr-row:hover { background: var(--paper-2); }
.kr-row .kr-label { font-size: 0.9rem; color: var(--ink); }
.kr-row .kr-sub { font-size: 0.76rem; color: var(--ink-soft); display: block; }
.kr-row .kr-value {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  white-space: nowrap;
}
.kr-row-flat {
  border-bottom: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.unit-sqrt {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.unit-sqrt-inner {
  text-decoration: overline;
  padding: 0 1px;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 1.8rem;
}
@media (max-width: 640px) {
  .result-cards { grid-template-columns: 1fr; }
}
.rcard {
  background: var(--paper);
  padding: 0.9rem 1rem 1rem;
}
.rcard .label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", "Consolas", monospace;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 1px;
}
.swatch-radial { background: var(--radial); }
.swatch-tangential { background: var(--tangential); }
.swatch-axial { background: var(--axial); }
.swatch-vonmises { background: var(--vonmises); }
.swatch-temp { background: var(--temp); }
.swatch-zul { background: var(--EX5); opacity: 0.5; }

.swatch-dashed {
  background-image: linear-gradient(90deg, var(--temp) 60%, transparent 60%);
  background-size: 6px 2px;
  background-repeat: repeat-x;
  background-color: transparent !important;
  height: 2px;
  align-self: center;
}
.rcard .row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 0.15rem 0;
  border-top: 1px dotted var(--line);
}
.rcard .row:first-of-type { border-top: none; }
.rcard .row span:last-child { font-weight: 600; }

.plotwrap {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1rem 0.6rem 0.4rem;
}

.vm-card {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
}
.vm-card .vm-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.vm-card .vm-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--vonmises);
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.vm-card .vm-loc {
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.vm-card-over { border-color: var(--rust); }
.vm-card-over .vm-value { color: var(--rust); }

.vm-warn {
  font-size: 0.83rem;
  color: var(--rust);
  background: #fbeee8;
  border: 1px solid var(--rust);
  border-top: none;
  padding: 0.5rem 1.1rem;
  margin: -1.4rem 0 1.4rem;
}

.kessel-card {
  border: 1px solid var(--line);
  background: #fffdf8;
  padding: 0.9rem 1.1rem 1rem;
  margin-bottom: 1.4rem;
}
.kessel-card .kessel-title {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", "Consolas", monospace;
  margin-bottom: 0.6rem;
}
.kessel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.kessel-table th, .kessel-table td {
  text-align: right;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px dotted var(--line);
}
.kessel-table th:first-child, .kessel-table td:first-child {
  text-align: left;
}
.kessel-table th {
  color: var(--MC0);
  background-color: var(--MC5);
  font-weight: 700;
  font-size: 0.8rem;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.kessel-table td.mono, .kessel-table th.mono {
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.kessel-table td a {
  color: var(--blue-steel);
  text-decoration: none;
  border-bottom: 1px dotted var(--blue-steel);
}
.kessel-table td a:hover {
  text-decoration: none;
  border-bottom-style: solid;
}
.kessel-table-wrap-full {
  max-width: none !important;
  overflow-x: auto;
}
.kessel-table-max {
  max-width: 100%;
}
.rohr-table {
  max-width: 100%;
  width: 100%;
}
.rohr-table td {
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
}
.rohr-table td.rohr-label-cell {
  text-align: left;
  white-space: nowrap;
}

.kessel-hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
  line-height: 1.5;
}
.kessel-hint.ok { color: var(--olive); }
.kessel-hint.bad { color: var(--rust); }

.hover-overlay-rect { cursor: crosshair; }
.legend {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin: 0.9rem 0 0.2rem;
  font-size: 0.85rem;
}
.legend .item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-soft);
}

.eq {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.8rem;
  background: var(--paper-2);
  padding: 0.15rem 0.35rem;
  border-radius: 2px;
}
.eq-section {
  padding: 1.4rem clamp(1.2rem, 4vw, 3.2rem) 0.6rem;
  border-top: 1px solid var(--line);
}
.section-border-top {
  border-top: 1px solid var(--line);
}
.eq-section > * {
  max-width: 78ch;
  margin-left: 0;
  margin-right: auto;
}
.eq-section > hr.eq-divider {
  max-width: 78ch;
}
.eq-section h2 {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin: 0 0 0.9rem;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.eq-block {
  background: var(--paper-2);
  border-left: 3px solid var(--blue-steel);
  padding: 0.55rem 1.1rem;
  margin: 0;
  overflow-x: auto;
  text-align: left;
}
.eq-block math {
  text-align: left;
  font-size: 1.05rem;
}
.eq-item { margin-bottom: 1.9rem; }
.eq-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--MC0);
  margin: 0 0 0.5rem;
}
.eq-explain {
  font-size: 0.87rem;
  color: var(--ink-soft);
  line-height: 1.62;
  max-width: 76ch;
  margin: 0.6rem 0 0;
}
.eq-explain ul {
  margin: 0.45rem 0 0.3rem;
  padding-left: 1.25rem;
}
.eq-explain li { margin-bottom: 0.3rem; }
.eq-divider {
  border: none;
  border-top: 1px dashed var(--line);
  margin: 1.9rem 0;
}
.eq-subheading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--MC0);
  margin: 1.5rem 0 0.8rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed var(--MC3);
  display: inline-block;
}
.eq-note {
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 80ch;
  margin-top: 0.8rem;
}

.help-container {
  padding: 0;
  width: 100%;
  margin: 1.8rem auto 0;
}
.help-details {
  border: 1px solid var(--MC4);
  border-radius: 8px;
  background: var(--MC5);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}
.help-details:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.help-summary {
  padding: 1rem 1.4rem;
  background: var(--MC5);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--MC0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none;
  border-bottom: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.help-summary::-webkit-details-marker { display: none; }
.help-summary:hover {
  background: #e5ecee;
  color: var(--blue-steel);
}
.help-details[open] .help-summary {
  border-bottom-color: var(--line);
  background: #e0e8ea;
}
.help-summary-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.help-summary-badge {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: #fff;
  padding: 0.25rem 0.65rem;
  border-radius: 3px;
  border: 1px solid var(--line);
}
.help-content {
  padding: 1.2rem clamp(1rem, 3vw, 2rem) 2rem;
}

.chapter-section {
  padding: 1.4rem clamp(1.2rem, 4vw, 3.2rem) 2.6rem;
  border-top: 1px solid var(--line);
}
.chapter-top-flat {
  border-top: none !important;
  padding-top: 0.4rem !important;
}
.chapter-section > .eq-item {
  max-width: 78ch;
  margin-left: 0;
  margin-right: auto;
}
.chapter-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
  color: var(--MC0);
  border-bottom: 2px solid var(--MC3);
  padding-bottom: 0.4rem;
}
.chapter-intro {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 78ch;
  margin: 0 0 1.6rem;
}
.sketch-wrap {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1rem;
  margin-bottom: 1.6rem;
  max-width: 78ch;
}
.sketch-wrap svg { display: block; width: 100%; height: auto; }

.bend-results {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 1.6rem;
}
@media (max-width: 900px) {
  .bend-results { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .bend-results { grid-template-columns: repeat(2, 1fr); }
}
.bend-results .bcell {
  background: var(--paper);
  padding: 0.8rem 0.9rem;
}
.bend-results .bcell .blabel {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", "Consolas", monospace;
  margin-bottom: 0.35rem;
}
.bend-results .bcell .bvalue {
  font-size: 1.15rem;
  font-weight: 600;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  color: var(--ink);
}
.bend-results .bcell .bvalue-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-wirksam {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: var(--WhiteC);
  color: var(--blue-steel);
  border: 1px solid var(--blue-steel);
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.btn-wirksam:hover {
  background: var(--blue-steel);
  color: var(--WhiteC);
}

.bend-table-wrap {
  max-width: 100%;
  margin-bottom: 1.2rem;
  overflow-x: auto;
}
.bend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.bend-table th, .bend-table td {
  text-align: right;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px dotted var(--line);
}
.bend-table th:first-child, .bend-table td:first-child {
  text-align: left;
}
.bend-table th {
  color: var(--MC0);
  background-color: var(--MC5);
  font-weight: 700;
  font-size: 0.8rem;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.bend-table td.mono {
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.bend-table td.over {
  color: var(--rust);
  font-weight: 700;
}

.bend-plotwrap {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1rem 0.6rem 0.4rem;
  max-width: 78ch;
}
.bend-plotwrap svg { display: block; width: 100%; height: auto; }

.btn-secondary, .btn-primary {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid var(--line);
}
.btn-secondary {
  background: var(--WhiteC);
  color: var(--ink);
}
.btn-secondary:hover {
  background: var(--paper-2);
}
.btn-primary {
  background: var(--blue-steel);
  color: var(--WhiteC);
  border-color: var(--blue-steel);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--MC0);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 42, 48, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 10px 32px rgba(30, 42, 48, 0.28);
  padding: 1.6rem 1.6rem 1.3rem;
  width: 320px;
  max-width: 90vw;
}
.modal-box h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  color: var(--ink);
}
.modal-sub {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.4;
  margin: 0 0 1.1rem;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
}

.chart-tooltip {
  position: fixed;
  display: none;
  background: #fffdf8;
  border: 1px solid var(--ink);
  padding: 0.5rem 0.7rem;
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(30, 42, 48, 0.18);
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
  border-radius: 2px;
}
.chart-tooltip .tt-title {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2rem;
}
.chart-tooltip .tt-row { display: flex; gap: 0.6rem; justify-content: space-between; }
.chart-tooltip .tt-swatch { display: inline-block; width: 8px; height: 8px; margin-right: 0.35rem; border-radius: 1px; }

svg .hover-guide { pointer-events: none; }
.bend-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue-steel);
  margin: 0.4rem 0 0.9rem;
}
.fig-caption {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.5rem;
  max-width: 78ch;
}
.fig-caption .fig-num { color: var(--blue-steel); }

p.desc {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 0.8rem;
}
.math-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue-steel);
  padding: 1rem 1.4rem;
  margin: 1.2rem 0 1.6rem;
  border-radius: 2px;
  overflow-x: auto;
}
.section-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 600px) {
  .section-grid { grid-template-columns: 1fr; }
}
table.inputs-table {
  width: 100%;
  border-collapse: collapse;
}
table.inputs-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px dotted var(--line);
  font-size: 0.9rem;
}
table.inputs-table td:first-child {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  color: var(--ink-soft);
  width: 90px;
}
.result-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.2rem 1.4rem;
  margin-top: 1rem;
}
.result-card .res-title {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", "Consolas", monospace;
  margin-bottom: 0.5rem;
  text-transform: none;
}
.result-card .res-value {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue-steel);
}
.result-card .res-sub {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

.mb-field { margin-bottom: 0.85rem !important; }
.mb-btn { margin-bottom: 0.6rem !important; }
.mb-note { margin-bottom: 1.6rem !important; }
.mt-note { margin-top: 0.9rem !important; }
.mt-wrap { margin-top: 1.6rem !important; }
.mt-eq { margin-top: 0.4rem !important; }
.mb-explain-sm { margin-bottom: 0.5rem !important; }
.mb-explain-md { margin-bottom: 1.4rem !important; }
.mb-explain-lg { margin-bottom: 1.6rem !important; }
.material-select {
  width: 100%;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 2px;
  font-size: 0.9rem;
  color: var(--ink);
}

/* Landing Page (index.html) 2-Spalten-Layout */
.landing-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 3.5rem;
  max-width: 1100px;
  margin: 1.5rem 0;
}

.landing-graphic {
  flex: 0 0 350px;
  max-width: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0.5rem;
}

.landing-graphic img {
  width: 100%;
  height: auto;
  max-width: 400px;
  display: block;
  object-fit: contain;
}

.landing-toc {
  flex: 1;
  min-width: 320px;
}

.landing-toc h1 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

@media (max-width: 850px) {
  .landing-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .landing-graphic {
    flex: none;
    width: 100%;
    max-width: 300px;
  }
}

/* SVG Diagram Styles */
.grid line {
  stroke: var(--MC4, #cbd5e1);
  stroke-width: 1;
  stroke-dasharray: 4,4;
  opacity: 0.75;
}

.axis line {
  stroke: var(--FontC, #1e293b);
  stroke-width: 1.5;
}

.origin-axis {
  stroke: var(--MC0, #0f172a);
  stroke-width: 2;
}

.curve {
  fill: none;
  stroke: var(--EX1, #0284c7);
  stroke-width: 3;
}

.tick {
  fill: var(--FontC, #334155);
  font-size: 12px;
  font-family: system-ui, -apple-system, Roboto, sans-serif;
}

.subtitle {
  fill: var(--FontC, #1e293b);
  font-size: 13px;
  font-weight: 600;
  font-family: system-ui, -apple-system, Roboto, sans-serif;
}


/* ===== Kv-Rechner: Strömungszustand Flüssigkeit (Re-Zahl) ===== */
#StroemungsZustandFL {
  text-align: center;
  font-weight: bold;
  border-radius: 4px;
}
#StroemungsZustandFL.laminar {
  background-color: var(--Status-Ok-bg);
  color: var(--Status-Ok-fg);
}
#StroemungsZustandFL.turbulent {
  background-color: var(--Status-Warn-bg);
  color: var(--Status-Warn-fg);
}
#StroemungsZustandFL.unkritisch {
  background-color: var(--Status-Info-bg);
  color: var(--Status-Info-fg);
}

/* ==========================================================================
   Balgkompensator: Wirksame Druckfläche (Rechner & Theorie-Herleitung)
   ========================================================================== */

/* Header & Navigation */
.rechner-header-bar,
.theory-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.rechner-title-wrap {
  flex: 1 1 300px;
}

.rechner-title-wrap h1 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--MC0);
}

.rechner-subtitle,
.theory-nav-subtitle {
  font-size: 0.92rem;
  color: var(--MC1);
}

.btn-help {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--WhiteC);
  color: var(--MC0);
  border: 1.5px solid var(--MC0);
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.btn-help:hover {
  background: var(--MC0);
  color: var(--WhiteC);
  box-shadow: 0 4px 10px rgba(15, 67, 54, 0.25);
  transform: translateY(-1px);
}

.btn-back-calc {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--MC0);
  color: var(--WhiteC);
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(15, 67, 54, 0.2);
}

.btn-back-calc:hover {
  background: var(--MC1);
  color: var(--WhiteC);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 67, 54, 0.3);
}

/* Info- und Hinweisboxen */
.intro-box {
  background: var(--WhiteC);
  border-left: 4px solid var(--MC0);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  line-height: 1.6;
}

.notice-split-banner {
  background: var(--GroundC);
  border: 1.5px solid var(--MC0);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.notice-split-btn-group {
  display: flex;
  gap: 0.6rem;
}

.notice-btn-primary {
  background: var(--MC0);
  color: var(--WhiteC);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
}

.notice-btn-secondary {
  background: var(--WhiteC);
  color: var(--MC0);
  border: 1px solid var(--MC0);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Haupt-Rechnerkarte & Eingaben */
.calc-card-main {
  background: var(--WhiteC);
  border: 1px solid var(--MC4);
  border-radius: 8px;
  padding: 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.input-section-title {
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--MC0);
  margin-top: 0;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calc-grid-rechner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.calc-input-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--MC1);
}

.calc-input-group input,
.calc-input-group select {
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--MC4);
  border-radius: 6px;
  font-size: 1.05rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background-color: var(--WhiteC);
  color: var(--FontC);
}

.calc-input-group input:focus,
.calc-input-group select:focus {
  outline: none;
  border-color: var(--MC0);
  box-shadow: 0 0 0 3px rgba(15, 67, 54, 0.15);
}

.input-unit-hint {
  font-size: 0.78rem;
  color: var(--MC2);
}

/* Geometrie Chips */
.geometry-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 0.8rem;
  background: #f8faf9;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8e5;
}

.geom-chip {
  font-size: 0.88rem;
  color: var(--MC1);
}

.geom-chip strong {
  color: var(--MC0);
}

/* Vergleichsspalten */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.comparison-col {
  border: 1.5px solid var(--MC5);
  border-radius: 8px;
  padding: 1.1rem;
  background: #fafcfb;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.comparison-col.highlight-stat {
  border-color: var(--MC0);
  background: #f4f8f6;
}

.comparison-col.highlight-ejma {
  border-color: #b9d8e8;
  background: #f5f9fc;
}

.col-header {
  font-size: 1.05rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.col-header-stat {
  color: var(--MC0);
}

.col-header-ejma {
  color: var(--EX4);
}

.col-subtitle {
  font-size: 0.82rem;
  color: var(--MC2);
  margin-bottom: 0.9rem;
}

.res-metric {
  margin-bottom: 0.75rem;
}

.res-metric-divider-stat {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--MC4);
}

.res-metric-divider-ejma {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed #b9d8e8;
}

.res-metric-lbl {
  font-size: 0.82rem;
  color: var(--MC2);
  display: block;
}

.res-metric-val {
  font-size: 1.35rem;
  font-weight: bold;
  color: var(--MC0);
}

.res-metric-val.ejma-val {
  color: var(--EX4);
}

.res-metric-val.val-sm {
  font-size: 1.15rem;
}

.res-metric-sub {
  font-size: 0.85rem;
  color: var(--MC1);
}

/* Differenzkarte */
.diff-card {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.diff-title {
  font-weight: bold;
  font-size: 1rem;
  color: #166534;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.diff-table td {
  padding: 0.4rem 0;
}

.diff-table td:last-child {
  text-align: right;
  font-weight: bold;
}

/* Teaser & Banner */
.teaser-theory-card {
  background: var(--WhiteC);
  border: 1px solid var(--MC4);
  border-radius: 8px;
  padding: 1.3rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.teaser-text {
  flex: 1 1 400px;
}

.teaser-text h3 {
  margin: 0 0 0.4rem 0;
  color: var(--MC0);
}

.teaser-text p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--FontC);
}

.btn-theory-primary {
  background: var(--MC0);
  color: var(--WhiteC);
  padding: 0.75rem 1.3rem;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 67, 54, 0.25);
}

.btn-theory-primary:hover {
  background: var(--MC1);
  color: var(--WhiteC);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 67, 54, 0.35);
}

.cta-calc-banner {
  background: linear-gradient(135deg, var(--MC0) 0%, var(--MC1) 100%);
  color: var(--WhiteC);
  border-radius: 8px;
  padding: 1.8rem;
  margin: 2.5rem 0 1.5rem 0;
  text-align: center;
  box-shadow: 0 4px 12px rgba(15, 67, 54, 0.25);
}

.cta-calc-banner h3 {
  color: var(--WhiteC);
  margin-top: 0;
  font-size: 1.4rem;
}

.cta-calc-banner p {
  max-width: 650px;
  margin: 0.5rem auto 1.3rem auto;
  line-height: 1.6;
  color: var(--GroundC);
}

.btn-calc-cta {
  display: inline-block;
  background: var(--WhiteC);
  color: var(--MC0);
  font-weight: bold;
  padding: 0.75rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1.05rem;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-calc-cta:hover {
  background: #f0fdf4;
  color: var(--MC0);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

/* SVG Diagram Card & Preview */
.svg-diagram-card {
  background: var(--WhiteC);
  border: 1px solid var(--MC4);
  border-radius: 8px;
  padding: 1.2rem;
  margin: 1.5rem 0;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.svg-diagram-card svg,
.svg-diagram-card img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.diagram-caption {
  font-size: 0.88rem;
  color: var(--MC1);
  margin-top: 0.8rem;
  font-style: italic;
}

.diagram-thumb-wrap {
  text-align: center;
  margin-bottom: 2rem;
}

.diagram-thumb {
  max-width: 720px;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--MC5);
  display: inline-block;
}

/* Tabellen & Hervorhebungen in Theorie */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--WhiteC);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.comparison-table th,
.comparison-table td {
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--MC5);
  text-align: left;
}

.comparison-table th {
  background: var(--MC0);
  color: var(--WhiteC);
}

.comparison-table tr:nth-child(even) {
  background: #f8faf9;
}

.highlight-card {
  background: #f8faf9;
  border-left: 4px solid var(--MC0);
  padding: 1.2rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.highlight-card.result-highlight {
  background: #eaf4f0;
  border-left-color: var(--MC0);
}

.highlight-card.proof-highlight {
  background: #f0fdf4;
  border-left-color: #166534;
}

.proof-formula-result {
  margin-top: 0.5rem;
  font-weight: bold;
  color: #166534;
}

.feature-list {
  margin: 1rem 0;
  padding-left: 1.5rem;
  line-height: 1.65;
}

.feature-list li {
  margin-bottom: 0.6rem;
}

.feature-list ul,
.sub-feature-list {
  margin: 0.4rem 0 0 1.2rem;
}

.highlight-card h3 {
  margin-top: 0;
  color: var(--MC0);
}

.math-card math + math,
.highlight-card math {
  margin-top: 0.8rem;
}

.highlight {
  background: var(--WhiteC);
  border: 1px solid var(--MC4);
  border-left: 4px solid var(--MC0);
  padding: 1.2rem 1.5rem;
  margin: 1.4rem 0;
  border-radius: 6px;
  overflow-x: auto;
}

.highlight math {
  font-size: 1.22rem;
  font-weight: 600;
}

.merksatz {
  background: var(--WhiteC);
  border: 1px solid var(--MC4);
  border-left: 4px solid var(--EX1);
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  border-radius: 4px;
}

.calc-card {
  background: var(--WhiteC);
  border: 1px solid var(--MC4);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.calc-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--MC0);
}

.calc-field input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--MC3);
  border-radius: 4px;
  font-size: 1rem;
  background: #fafafa;
}

.calc-results {
  border-top: 1px solid var(--MC4);
  padding-top: 1rem;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--MC4);
  font-size: 0.95rem;
}

.calc-result-row.total {
  font-weight: bold;
  font-size: 1.05rem;
  border-bottom: 2px solid var(--MC0);
  color: var(--MC0);
  padding-top: 0.7rem;
}

.calc-badge {
  background: var(--MC5);
  color: var(--MC0);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-family: monospace;
}

.calc-card h3,
.calc-card-title {
  margin-top: 0;
  color: var(--MC0);
}

.calc-card-desc {
  font-size: 0.9rem;
  color: var(--MC1);
  margin-bottom: 1rem;
}

.calc-badge.badge-diff-ok {
  background: #eef7ee;
  color: #227744;
}

/* ==========================================================================
   Balgkompensator: Kräfte auf den Festpunkt
   ========================================================================== */

.force-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.force-card {
  background: var(--WhiteC);
  border: 1.5px solid var(--MC5);
  border-radius: 8px;
  padding: 1.2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.force-card.card-fp {
  border-left: 4px solid var(--EX4);
  background: #f7fafc;
}

.force-card.card-fb {
  border-left: 4px solid var(--EX2);
  background: #fdfcf7;
}

.force-card.card-fr {
  border-left: 4px solid var(--MC1);
  background: #f8faf9;
}

.force-card.card-total {
  border: 2px solid var(--MC0);
  background: var(--GroundC);
}

.force-card-header {
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--MC0);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.force-card-subtitle {
  font-size: 0.82rem;
  color: var(--MC2);
  margin-bottom: 0.8rem;
}

.force-val-display {
  font-size: 1.45rem;
  font-weight: bold;
  color: var(--MC0);
  margin-top: 0.4rem;
}

.force-val-display.val-blue {
  color: var(--EX4);
}

.force-val-display.val-amber {
  color: var(--EX2);
}

.force-val-sub {
  font-size: 0.85rem;
  color: var(--MC1);
}

.link-card-ref {
  background: #f0f7fb;
  border: 1.5px solid #b9d8e8;
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin: 1.2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.link-card-ref-text {
  flex: 1 1 320px;
}

.link-card-ref-text h4 {
  margin: 0 0 0.3rem 0;
  color: var(--EX4);
  font-size: 1.05rem;
}

.link-card-ref-text p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--FontC);
  line-height: 1.5;
}

.btn-ref-action {
  background: var(--EX4);
  color: var(--WhiteC);
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-ref-action:hover {
  background: #245e80;
  color: var(--WhiteC);
  transform: translateY(-1px);
}

.summary-formula-box {
  background: var(--WhiteC);
  border: 2px solid var(--MC0);
  border-radius: 8px;
  padding: 1.3rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 10px rgba(15, 67, 54, 0.08);
}

.col-header-fb {
  color: var(--EX2);
}

.metric-sub-divider {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--MC4);
}

.header-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Gliederung der Eingabewerte nach Kräften */
.calc-force-sections {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  margin-bottom: 1.5rem;
}

.calc-force-block {
  background: var(--WhiteC);
  border: 1px solid var(--MC5);
  border-radius: 8px;
  padding: 1.2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.calc-force-block.block-fp {
  border-left: 5px solid var(--EX4);
  background: #f8fbfe;
}

.calc-force-block.block-fb {
  border-left: 5px solid var(--EX2);
  background: #fdfdf9;
}

.calc-force-block.block-fr {
  border-left: 5px solid var(--MC1);
  background: #f7faf9;
}

.calc-force-block-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--MC5);
}

.block-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--WhiteC);
  flex-shrink: 0;
}

.badge-fp {
  background: var(--EX4);
}

.badge-fb {
  background: var(--EX2);
}

.badge-fr {
  background: var(--MC1);
}

.calc-force-block-header h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--MC0);
}

.block-subtitle {
  font-size: 0.82rem;
  color: var(--MC2);
}

.calc-grid-sub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
}

.res-metric-kgf {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--MC1);
  margin-top: 0.15rem;
}



