/* Lineare Optimierung – Layout für iPad/Beamer, ergänzt ../style.css */

:root {
  --region: #ffe14d;
  --region-edge: #c9a400;
  --opt: #d62828;
  --cur: #c1121f;
  --level: #e85d04;
  --path: #1d3557;
  --sel: #2a9d8f;
  --rec: #e9c46a;
  --line: #ccc;
  --bg2: #f4f6f8;
}

html, body { height: 100%; }
body {
  max-width: none;
  width: 100%;
  margin: 0;
  /* sicherer Bereich: Statusleiste/Ränder des iPad als installierte App freihalten */
  padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px))
    env(safe-area-inset-bottom, 0px) max(12px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

/* Kopfzeile auf allen Seiten gleich: links der Ukraine-Ticker (kompakt, gut lesbar),
   daneben das Inhaltsverzeichnis (nav.js), rechts oben ⚙ (settings.js) */
header.site { flex: none; }
header.site .tt_text { font-size: 1.15rem; line-height: 1.2; }
header.site .timer__items { font-size: 1rem; }
header.site .timer__item { min-width: 44px; margin: 0 6px; padding-bottom: 13px; }
header.site .timer__item:first-child { margin-left: 0; }
header.site .timer__item::before { font-size: 11px; }
header.site .timer__item:not(:last-child)::after { right: -10px; }
.crumbs { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.crumbs .toc { font: inherit; font-size: 1rem; min-height: 40px; padding: 4px 8px; border: 1px solid #1d3557; border-radius: 8px;
  background: #fff; color: #111; flex: 0 1 auto; min-width: 0; max-width: 520px; text-overflow: ellipsis; }
.crumbs a.navbtn[hidden] { display: none; }
.crumbs a.alt { margin-left: 6px; font-size: 0.9rem; color: #1d3557; }
body.work .app { padding-top: 8px; }
.workbar { justify-content: space-between; margin-top: 0; }
.work-title { font-weight: bold; font-size: 1.05rem; flex: 1; text-align: center; }
.titlebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.titlebar h1 { margin: 0; font-size: 1.5rem; }
.modes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.modes button.on { background: #1d3557; color: #fff; border-color: #1d3557; }
.demo-link { margin-left: 8px; font-size: 0.9rem; }

button {
  font: inherit;
  font-size: 1rem;
  min-height: 40px;
  padding: 4px 12px;
  border: 1px solid #999;
  border-radius: 8px;
  background: #fff;
  color: #111;
  cursor: pointer;
  touch-action: manipulation;
}
button:active { background: #e6e6e6; }
button.primary { background: #1d3557; color: #fff; border-color: #1d3557; }
button:disabled { opacity: 0.4; cursor: default; }

/* Hauptbereich */
.app {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 12px;
  padding: 6px 0 8px;
  grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr);
  grid-template-rows: minmax(0, 1fr);
}
.app.mode-model #panel-simplex { display: none; }
.app.mode-work #panel-model { display: none; }

@media (max-width: 700px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(300px, 1.2fr) minmax(0, 1fr); }
}

.plotpane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
#plot { flex: 1 1 auto; width: 100%; min-height: 0; display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; touch-action: none; user-select: none; -webkit-user-select: none; }
.plotbar { display: flex; align-items: center; gap: 10px; padding-top: 6px; flex-wrap: wrap; }
.plotbar input[type=range] { flex: 1 1 160px; min-width: 120px; height: 36px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 1rem; white-space: nowrap; }
.check input { width: 22px; height: 22px; }
.status { min-height: 1.4em; padding: 4px 2px; font-size: 1.05rem; line-height: 1.4; }
.status .bad { color: var(--opt); }
.status .good { color: #2b7a0b; }

.panel { overflow-y: auto; min-height: 0; padding-right: 4px; -webkit-overflow-scrolling: touch; }
.row { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.buttons { flex-wrap: wrap; }
.lbl { display: block; font-weight: bold; margin: 10px 0 2px; }
.hint { font-weight: normal; color: #555; font-size: 0.9rem; }

/* Beispiele */
.examples { display: flex; flex-direction: column; gap: 4px; }
.examples .group { font-weight: bold; font-size: 0.95rem; margin-top: 4px; }
.examples .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.examples button { font-size: 0.95rem; min-height: 36px; padding: 2px 10px; }
.examples button.on { background: var(--rec); border-color: #b08900; }

/* Eingabe */
input.expr {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.2rem;
  padding: 6px 8px;
  border: 1px solid #999;
  border-radius: 6px;
  font-family: inherit;
}
input.expr.err { border-color: var(--opt); background: #fff3f3; }
input.expr:focus { outline: 2px solid var(--sel); }
.con-row .gname { width: 2.2em; font-weight: bold; }
.con-row button.del { min-width: 40px; }
.feedback { font-size: 0.95rem; color: #333; margin: 0 0 4px 2.6em; min-height: 1.2em; }
#obj-msg { margin-left: 0; }
.feedback.err { color: var(--opt); }
.c0 { color: #1f77b4; } .c1 { color: #2ca02c; } .c2 { color: #9467bd; }
.c3 { color: #17becf; } .c4 { color: #8c564b; } .c5 { color: #e377c2; }

.keypad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin: 8px 0; }
.keypad button { min-height: 46px; font-size: 1.25rem; padding: 0; }
.keypad button.op { background: var(--bg2); }

.vertex-list { font-size: 1rem; margin: 8px 0; line-height: 1.6; }

/* Brüche */
.fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.05; font-size: 0.85em; margin: 0 1px; }
.fr > span:first-child { border-bottom: 1px solid currentColor; padding: 0 2px; }

/* Tableau */
.tableau-wrap { overflow-x: auto; }
table.tableau { border-collapse: collapse; padding: 0; border-spacing: 0; margin: 2px 0; font-size: 1.2rem; }
table.tableau tr:nth-child(even), table.tableau tr:nth-child(odd) { background: none; }
table.tableau th, table.tableau td { padding: 3px 10px; text-align: center; vertical-align: middle; min-width: 2.6em; height: 2.1em; }
table.tableau th { font-weight: normal; font-style: italic; }
table.tableau th.corner { font-style: normal; font-weight: bold; color: var(--cur); border-right: 1px solid #333; border-bottom: 1px solid #333; }
table.tableau thead th { border-bottom: 1px solid #333; }
table.tableau tbody th { border-right: 1px solid #333; }
table.tableau td.bl, table.tableau th.bl { border-left: 1px solid #333; }
table.tableau td.q, table.tableau th.q { color: #555; font-size: 0.9em; border-left: 1px dashed #999; }
table.tableau tr.zrow > * { border-top: 2px solid #333; }
table.tableau td.cell { cursor: pointer; border-radius: 6px; }
table.tableau th.colhead { cursor: pointer; }
table.tableau .pcol { background: #e8f4f2; }
table.tableau .prow { background: #e8f4f2; }
table.tableau td.cand { box-shadow: inset 0 0 0 2px var(--rec); }
table.tableau td.rec { box-shadow: inset 0 0 0 3px #b08900; }
table.tableau td.pivot { background: var(--sel); color: #fff; box-shadow: none; }
table.tableau td.qmin { color: #000; font-weight: bold; }
table.tableau td.neg { color: var(--opt); }
table.tableau.small { font-size: 0.95rem; cursor: pointer; }
table.tableau.small th, table.tableau.small td { padding: 2px 6px; height: 1.8em; min-width: 2em; }
table.tableau.small td.used { outline: 2px solid var(--sel); outline-offset: -3px; border-radius: 50%; }

.simplexbar button { min-width: 48px; }
/* Einstellungen ⚙ rechts oben (settings.js), auf allen Seiten, auch im Arbeitsmodus */
.gear { position: fixed; z-index: 8; top: calc(env(safe-area-inset-top, 0px) + 6px); right: max(8px, env(safe-area-inset-right, 0px));
  width: 40px; padding: 0; font-size: 1.4rem; line-height: 1; border-color: #ccc; color: #555; }
.gear[aria-expanded="true"] { background: #eef2f7; border-color: #1d3557; color: #1d3557; }
header.site { padding-right: 96px; }
/* Zeichenschicht (ink.js): SVG in der Seite (scrollt und zoomt mit), ✎ zeigt das Werkzeug und klappt die Leiste auf */
.ink { position: absolute; left: 0; top: 0; z-index: 7; pointer-events: none; overflow: visible; }
.gear.inkbtn { right: calc(max(8px, env(safe-area-inset-right, 0px)) + 48px); }
.gear.inkbtn.on { background: #1d3557; border-color: #1d3557; color: #fff; }
body.inking { -webkit-user-select: none; user-select: none; }
body.inking-touch { touch-action: none; }
body.inking main, body.inking main * { cursor: crosshair; }
.inkbar { position: fixed; z-index: 9; top: calc(env(safe-area-inset-top, 0px) + 52px); right: max(8px, env(safe-area-inset-right, 0px));
  display: flex; gap: 4px; padding: 6px; background: #fff; border: 1px solid #888; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.inkbar[hidden], body.settings-open .inkbar { display: none; }
.inkbar button { min-width: 44px; padding: 0 8px; font-size: 1.2rem; }
.inkbar button.on { background: #eef2f7; border-color: #1d3557; box-shadow: inset 0 0 0 2px #1d3557; }
.inkbar .dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; }
.inkbar .dot[data-c="rot"] { background: #d62828; }
.inkbar .dot[data-c="blau"] { background: #1d4ed8; }
.inkbar .dot[data-c="schwarz"] { background: #111; }
.inkbtn .dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; }
.inkbtn .dot[data-c="rot"] { background: #d62828; } .inkbtn .dot[data-c="blau"] { background: #1d4ed8; } .inkbtn .dot[data-c="schwarz"] { background: #111; box-shadow: 0 0 0 2px #fff; }
.inkbar .dot[data-c="pointer"], .inkbtn .dot[data-c="pointer"] { background: #ff2a2a; width: 12px; height: 12px; box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(255, 42, 42, .3); }
.inkbar .dot[data-c="laser"], .inkbtn .dot[data-c="laser"] { background: #ff2a2a; width: 12px; height: 12px; box-shadow: 0 0 6px 3px rgba(255, 42, 42, .55); }
.inkbar .dot[data-c="marker"], .inkbtn .dot[data-c="marker"] { background: #ffd400; border-radius: 3px; width: 22px; height: 12px; opacity: .7; }
.settings { position: fixed; z-index: 9; top: calc(env(safe-area-inset-top, 0px) + 52px); right: max(8px, env(safe-area-inset-right, 0px));
  background: #fff; border: 1px solid #888; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.2); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.settings[hidden] { display: none; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-hint { color: #777; font-size: 0.85rem; }
.set-wide { width: 100%; margin-top: 4px; }
button.numfmt { padding: 0; display: inline-flex; overflow: hidden; }
.numfmt span { padding: 8px 12px; }
.numfmt:not(.on) span:first-child, .numfmt.on span:last-child { background: #1d3557; color: #fff; }
.hist { margin: 6px 0; }
.hist .steps { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hist .step { display: inline-block; }
.hist .step.future { opacity: 0.45; }
.hist .step.now table { outline: 2px solid var(--cur); }
.hist .step .cap { font-size: 0.85rem; color: #555; }

.logbox { margin-top: 8px; }
.logbox summary { cursor: pointer; font-weight: bold; padding: 4px 0; }
.logbox pre { font-size: 13px; background: var(--bg2); padding: 8px; overflow-x: auto; max-height: 40vh; }

/* SVG */
#plot .grid { stroke: #eee; stroke-width: 1; }
#plot .tick { font-size: 13px; fill: #555; }
#plot .axis { stroke: #222; stroke-width: 1.5; }
#plot .axis.active { stroke: var(--cur); stroke-width: 4; }
#plot .axishead { fill: #222; }
#plot .axislabel { font-size: 18px; font-style: italic; }
#plot .region { fill: var(--region); fill-opacity: 0.6; stroke: none; }
#plot .region-edge { stroke: var(--region-edge); stroke-width: 2; }
#plot .region-open { stroke: var(--region); stroke-width: 2; stroke-dasharray: 2 6; }
#plot .unb { font-size: 15px; fill: #8a7000; font-style: italic; }
#plot .con { stroke-width: 1.8; }
#plot .con.active { stroke-width: 4.5; }
#plot .conlabel { font-size: 16px; font-weight: bold; }
#plot .c0 { stroke: #1f77b4; fill: #1f77b4; }
#plot .c1 { stroke: #2ca02c; fill: #2ca02c; }
#plot .c2 { stroke: #9467bd; fill: #9467bd; }
#plot .c3 { stroke: #17becf; fill: #17becf; }
#plot .c4 { stroke: #8c564b; fill: #8c564b; }
#plot .c5 { stroke: #e377c2; fill: #e377c2; }
#plot text.conlabel { stroke: none; }
#plot .level { stroke: var(--level); stroke-width: 1.8; stroke-dasharray: 8 6; }
#plot .level-in { stroke: var(--level); stroke-width: 4; }
#plot .levellabel { font-size: 15px; fill: var(--level); font-weight: bold; }
#plot .optset { stroke: var(--opt); stroke-width: 8; stroke-linecap: round; stroke-opacity: 0.75; }
#plot .optpoint { fill: none; stroke: var(--opt); stroke-width: 3; }
#plot .dir { stroke: var(--opt); stroke-width: 3.5; }
#plot .arrowhead { fill: var(--opt); }
#plot .dirlabel { font-size: 15px; fill: var(--opt); font-weight: bold; }
#plot .vhit { fill: transparent; cursor: pointer; }
#plot .vdot { fill: #222; }
#plot .vlabel { font-size: 18px; font-weight: bold; fill: #222; }
#plot .vertex:hover .vdot { fill: var(--sel); }
#plot .simplexpath { stroke: var(--path); stroke-width: 3; }
#plot .pathhead { fill: var(--path); }
#plot .preview { stroke: var(--sel); stroke-width: 3; stroke-dasharray: 6 5; }
#plot .previewpt { fill: none; stroke: var(--sel); stroke-width: 3; }
#plot .cur { fill: var(--cur); stroke: #fff; stroke-width: 2.5; }
#plot .cur.infeasible { fill: #fff; stroke: var(--cur); stroke-width: 3.5; }
#plot .msg { font-size: 18px; fill: #777; }
#plot .frame { fill: none; stroke: #bbb; stroke-width: 1; }
.plotbar button { min-width: 44px; }
.prev .tableau { opacity: 0.85; font-size: 0.95rem; }
.prev .tableau th, .prev .tableau td { height: 1.7em; padding: 1px 8px; }
.prev .tableau td.used { background: var(--sel); color: #fff; border-radius: 50%; opacity: 1; }
.transition { font-size: 1.05rem; margin: 2px 0 2px 1em; color: #1d3557; }
.chipsteps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chipsteps button { min-height: 36px; padding: 2px 10px; }
.chipsteps button.now { background: var(--cur); border-color: var(--cur); color: #fff; }
.modes button.on, .keypad + .row button.on, #btn-keypad.on { background: #1d3557; color: #fff; border-color: #1d3557; }
.keypad[hidden] { display: none; }
.tableaus { display: flex; flex-direction: column; gap: 2px; }
.tableaus .prev:empty { display: none; }
/* Konvexkombination */
.backlink { font-size: 1rem; }
.pointgrid { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 6px 10px; align-items: center; margin: 8px 0; }
.pointgrid label { font-weight: bold; font-size: 1.1rem; }
#plot .tri { fill: none; stroke: var(--region-edge); stroke-width: 2.5; }
#plot .sub { fill-opacity: 0.35; stroke: none; }
#plot .sub.s0, #plot .alpha.s0 { fill: #1f77b4; }
#plot .sub.s1, #plot .alpha.s1 { fill: #2ca02c; }
#plot .sub.s2, #plot .alpha.s2 { fill: #9467bd; }
#plot .alpha { font-size: 15px; font-weight: bold; fill-opacity: 1; }
#plot .spoke { stroke: #555; stroke-width: 1.2; stroke-dasharray: 4 4; }
#plot .levelhit { stroke: transparent; stroke-width: 28; pointer-events: stroke; cursor: grab; }
#plot .levelgrip { fill: #fff; stroke: var(--level); stroke-width: 3; cursor: grab; }
.plotbar .hint { flex: 1; }
.exbox summary { cursor: pointer; font-size: 0.95rem; color: #444; padding: 4px 0; }
/* nur Grafik, ohne Tableau */
.app.mode-work.notab { grid-template-columns: minmax(0, 1fr); }
.app.notab #panel-simplex { display: none; }
.app.mode-model #btn-tab { display: none; }
#btn-tab.on { background: #1d3557; color: #fff; border-color: #1d3557; }
.only-notab { display: none; }
.app.mode-work.notab .only-notab { display: inline-block; }
/* QR-Code bildschirmfüllend */
.qr-overlay { position: fixed; inset: 0; z-index: 10; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: pointer; }
.qr-overlay[hidden] { display: none; }
.qr-svg svg { width: min(92vw, 80vh); height: min(92vw, 80vh); display: block; }
.qr-url { font-size: clamp(1rem, 2.4vw, 1.8rem); font-weight: bold; word-break: break-all; text-align: center; padding: 0 16px; }
.qr-hint { color: #777; font-size: 0.95rem; }
/* eine Leiste: Ukraine-Uhr links, Navigation rechts daneben */
header.site { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 4px 0 2px; border-bottom: 1px solid #ccc; }
header.site .ukr { display: flex; flex-direction: column; }
header.site .tt_text { padding-top: 0; }
/* Schild beim Antippen einer Geraden */
.plotpane { position: relative; }
.line-pop { position: absolute; z-index: 5; background: #fff; border: 1px solid #888; border-radius: 8px; padding: 6px 10px; font-size: 1.05rem; box-shadow: 0 2px 8px rgba(0,0,0,.2); pointer-events: none; white-space: nowrap; }
.line-pop[hidden] { display: none; }
#plot .conhit { stroke: transparent; stroke-width: 24; pointer-events: stroke; cursor: pointer; }
/* iPad als installierte App: iPadOS verwischt einen Streifen unter der Statusleiste,
   der höher ist als safe-area-inset-top; Inhalt dort nicht hinlegen. */
@media (display-mode: standalone) and (min-width: 700px) {
  body { padding-top: 40px; }
  .gear { top: 42px; }
  .settings, .inkbar { top: 88px; }
}
/* Verzweigung auf der Startseite und Links als Knöpfe */
a.navbtn { display: inline-flex; align-items: center; min-height: 40px; box-sizing: border-box; padding: 4px 12px; border: 1px solid #999; border-radius: 8px; background: #fff; color: #111; text-decoration: none; font-size: 1rem; }
a.navbtn:active { background: #e6e6e6; }
.branch { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 4px 0 10px; }
.branch > * { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 1px solid #999; border-radius: 8px; text-align: left; color: #111; text-decoration: none; background: #fff; font-size: 1rem; line-height: 1.3; }
.branch > .on { border: 2px solid #1d3557; background: #eef2f7; }
.branch small { color: #555; font-size: 0.85rem; }
/* Simplex ohne Grafik (tableau.html) */
/* links Eingabe (Text), rechts Tableau zum Antippen */
.tabapp { flex: 1 1 auto; min-height: 0; display: grid; gap: 16px; padding: 8px 0; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); }
.tabapp > section { overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
@media (max-width: 800px) { .tabapp { grid-template-columns: minmax(0, 1fr); } .tabapp > section { overflow: visible; } }
.navtitle { font-weight: bold; padding: 0 6px; }
select.exsel { font: inherit; font-size: 1rem; min-height: 40px; width: 100%; padding: 4px 8px; border: 1px solid #999; border-radius: 8px; background: #fff; color: #111; }
#panel-model select.exsel { margin: 4px 0 6px; }
textarea.lop { width: 100%; box-sizing: border-box; font: inherit; font-size: 1.1rem; line-height: 1.45; padding: 6px 8px; border: 1px solid #999; border-radius: 6px; resize: vertical; }
textarea.lop:focus { outline: 2px solid var(--sel); }
textarea.lop.err { border-color: var(--opt); background: #fff3f3; }
#lop-msg, #ineq-msg, #tp-msg { margin-left: 0; }
.sidehint { margin-top: 12px; line-height: 1.45; }
.runpane.stale .tableaus { opacity: 0.45; }
/* Tableau schlank: dünne Linien, Brüche gut lesbar */
.tabapp table.tableau { font-size: 1.3rem; }
.tabapp table.tableau th, .tabapp table.tableau td { padding: 2px 9px; height: 2em; }
.tabapp table.tableau thead th { border-bottom: 1px solid #555; }
.tabapp table.tableau tbody th { border-right: 1px solid #555; }
.tabapp table.tableau td.bl, .tabapp table.tableau th.bl { border-left: 1px solid #555; }
.tabapp table.tableau tr.zrow > * { border-top: 1px solid #555; }
.tabapp table.tableau tr.zhrow > * { color: #6a4c93; }
.tabapp table.tableau tr.zhrow + tr > * { border-top: 1px dotted #555; }
.tabapp table.tableau tr.artrow > th { color: #6a4c93; text-decoration: underline dotted; }
.tabapp table.tableau tr.negrow > th { color: var(--opt); }
.tabapp table.tableau td.zero { font-weight: bold; }
.tabapp table.tableau th.corner { color: #888; font-weight: normal; font-size: 0.8em; }
.tabapp table.tableau th.q { font-size: 0.75em; white-space: nowrap; }
.tabapp table.tableau td.q { white-space: nowrap; text-align: left; }
.tabapp table.tableau td.q .qcalc { color: #777; font-size: 0.85em; }
.tabapp table.tableau td.qmin { background: #fff4d6; }
.solution { font-size: 1.05rem; line-height: 1.55; }
.solution .lbl { margin-top: 6px; }
.solution .good { color: #2b7a0b; }
.solution .bad { color: var(--opt); }
.dualprob { padding-left: 1em; }
#btn-art[hidden], #btn-drop[hidden] { display: none; }
/* Navigation über Geradenpaare: Auswahlpunkte ①/② in Grafik und Tableau */
#plot .choiceline { stroke: var(--sel); stroke-width: 2.5; stroke-dasharray: 5 5; }
#plot .choicehit { fill: transparent; cursor: pointer; }
#plot .choicept { fill: #fff; stroke: var(--sel); stroke-width: 3.5; }
#plot .choice.infeasible .choicept { stroke: var(--opt); stroke-dasharray: 4 3; }
#plot .choicelabel { font-size: 17px; font-weight: bold; fill: var(--sel); pointer-events: none; }
#plot .choice.infeasible .choicelabel { fill: var(--opt); }
table.tableau td.choice { box-shadow: inset 0 0 0 3px var(--sel); background: #e8f4f2; }
table.tableau td .cmark { font-size: 0.7em; color: var(--sel); font-weight: bold; margin-left: 3px; vertical-align: super; }
/* Feuerwerk beim sauber erreichten Optimum (fireworks.js) */
.fw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }
.fw-banner { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); z-index: 7; pointer-events: none;
  background: rgba(255,255,255,0.92); border: 2px solid #2b7a0b; color: #2b7a0b; border-radius: 10px;
  padding: 8px 18px; font-size: 1.35rem; font-weight: bold; white-space: nowrap;
  animation: fw-banner 3.2s ease-in-out forwards; }
@keyframes fw-banner { 0% { opacity: 0; transform: translate(-50%, 10px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fw-banner { animation: none; } }
/* Kapitel-Navigation */
.chapters a.navbtn.on { background: #1d3557; color: #fff; border-color: #1d3557; }
/* Transport/Zuordnung (transport.html): Mengen- und Kostentableau nebeneinander */
.tpgrid { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-start; }
.tpgrid .cap { font-size: 0.95rem; color: #444; margin-bottom: 2px; }
.tabapp table.tableau.tp { font-size: 1.15rem; }
.tabapp table.tableau.tp th, .tabapp table.tableau.tp td { padding: 2px 7px; min-width: 2.4em; height: 2.3em; font-style: normal; }
.tabapp table.tableau.tp thead th { font-size: 0.85em; }
table.tableau.tp td.basic { font-weight: bold; }
table.tableau.tp td.nonbasic { color: #666; }
table.tableau.tp td.fict { background: #f3f3f3; }
table.tableau.tp td .c { display: block; }
table.tableau.tp td .delta { display: block; font-size: 0.7em; color: #2b7a0b; line-height: 1; }
table.tableau.tp td .delta.neg { color: var(--opt); font-weight: bold; }
table.tableau.tp td .pm { font-size: 0.7em; margin-left: 2px; font-weight: bold; }
table.tableau.tp td.plus { background: #e3f4e1; }
table.tableau.tp td.minus { background: #fbe3e3; }
table.tableau.tp td.pivot .delta { color: #fff; }
/* Zeichenfläche (ink.js): Die App ist genau eine Bildschirmhöhe hoch (body, weiß); rechts und
   darunter Punktpapier (html), die Seite wächst dort beim Schreiben. Innere Bereiche scrollen für
   sich, ohne die Seite mitzunehmen. */
/* Papier wie in GoodNotes: leicht grau, feine Punkte auf quadratischem Raster (nur Eckpunkte, keine Linien) */
html { background-color: #f1f2f4; background-image: radial-gradient(circle at 1px 1px, #a9afb9 1px, transparent 1.4px);
  background-size: 28px 28px; }
body { position: relative; background: #fff; box-shadow: 0 0 0 1px #ccc; }
.inkpad-label { position: absolute; left: 14px; top: calc(100% + 8px); color: #999; font-size: 0.85rem; pointer-events: none; }
.panel, .tabapp > section, .tableau-wrap, .logbox pre { overscroll-behavior: contain; }
/* Eingabe fest (lock.js): schreibgeschützt, Bearbeiten-Knöpfe weg, „✎ Ändern“ da */
.lockable:not(.locked) .when-locked, .lockable.locked .edit-only { display: none; }
.locked input.expr, .locked textarea.lop { background: var(--bg2); border-color: #ccc; color: #111; -webkit-user-select: none; user-select: none; }
.locked input.expr:focus, .locked textarea.lop:focus { outline: none; }
/* Version (Git) im Menü ⚙ */
.set-version { color: #999; font-size: 0.75rem; text-align: right; }
/* Sitzung als PDF (session.js): nur beim Drucken sichtbar, je Ansicht eine Seite A4 quer */
#print-session { display: none; }
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  html, body { height: auto !important; background: #fff !important; }
  body.printing { display: block; padding: 0 !important; box-shadow: none; }
  body.printing > :not(#print-session) { display: none !important; }
  body.printing #print-session { display: block; }
  .snap-page { break-after: page; page-break-after: always; }
  .snap-page:last-child { break-after: auto; page-break-after: auto; }
  .snap-cap { font-size: 11pt; color: #555; margin: 0 0 4px; }
  .snap { position: relative; overflow: hidden; background: #fff; }
  .snap-body { display: flex; flex-direction: column; box-sizing: border-box; }
  .snap-body .app { flex: 1 1 auto; min-height: 0; }
  .snap .ink { position: absolute; left: 0; top: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Hilfe „Als App installieren“ (iPad) */
.install-box { max-width: 560px; padding: 16px 20px; font-size: 1.15rem; line-height: 1.5; text-align: left; }
.install-box ol { padding-left: 1.3em; }
