/* Kill Team: grimdarke Optik und gemeinsame Bausteine der Kill-Team-Seiten.
   Wird nach killteam.css (und ggf. teams.css) eingebunden. Nur Systemschriften. */
:root {
  --bg: #111110;
  --bg2: #181715;
  --panel: #1d1c19;
  --panel2: #282620;
  --line: #3a362c;
  --ink: #ece4d1;            /* Knochenweiß */
  --muted: #bcb3a1;
  --accent: #c9a557;         /* Messing */
  --accent-2: #e8cf8f;
  --brass-dk: #6b5222;
  --blood: #b23a2e;          /* Blutrot (Flächen) */
  --blood-ink: #ff9a86;      /* Blutrot (Text, AA auf dunkel) */
  --verd: #6cc3ad;           /* Grünspan */
  --verd-dk: #1f3a33;
  --ok: #7fc8a0;
  --crit: #f0c060;
  --parch: #ebdfc1;
  --parch-ink: #2b2014;
  --cut: 10px;
  --head-font: "Bahnschrift SemiCondensed", "Bahnschrift", "Roboto Condensed", "Arial Narrow", "Liberation Sans Narrow", "DejaVu Sans Condensed", "Nimbus Sans Narrow", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
}

body {
  background:
    radial-gradient(1100px 480px at 85% -8%, rgba(201,165,87,0.10), transparent 60%),
    radial-gradient(900px 420px at -10% 12%, rgba(178,58,46,0.10), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 4px),
    var(--bg);
}
a { color: var(--accent-2); }
a:hover { color: #fff0c8; }

/* ---------- Schrift ---------- */
h1, h2, h3, .kicker, .brand, .btn, .dc-name, .chap-btn, .quick-h, .part-k {
  font-family: var(--head-font); font-stretch: condensed;
}
h1, h2 { text-transform: uppercase; letter-spacing: 0.03em; font-weight: 800; }
h3 { letter-spacing: 0.01em; font-weight: 800; }
h3.sub, .sec > h3 { text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-2); font-size: 1.05rem; }
.hero h1 { letter-spacing: 0.01em; line-height: 1; font-weight: 900; }
.hero h1 span { color: var(--accent); }
.kicker { color: var(--accent); letter-spacing: 0.2em; }
.small, .fine, .act .no, .figure figcaption { font-size: max(0.88rem, 14px); }
.fine { font-size: 14px; }

/* ---------- Kopfzeile ---------- */
.top { background: rgba(14,13,12,0.92); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(201,165,87,0.18); }
.brand { letter-spacing: 0.06em; text-transform: uppercase; }
.toc a { border-radius: 0; }
.toc a:hover, .toc a.on, .toc a[aria-current="true"] { background: var(--panel2); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- Hero ---------- */
.hero {
  border-bottom: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0 2px, transparent 2px 4px),
    radial-gradient(600px 300px at 20% 0%, rgba(201,165,87,0.10), transparent 70%),
    linear-gradient(180deg, transparent, rgba(0,0,0,0.35));
  position: relative;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(-45deg, #c9a557 0 10px, #15130f 10px 20px); opacity: 0.55;
}
.facts li { border-radius: 0; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); background: linear-gradient(160deg, #24221d, #191815); border-color: #4a4434; }
.facts b { font-family: var(--mono); color: var(--accent); }

/* ---------- Abschnitte ---------- */
.sec > h2 {
  padding-bottom: 10px; border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--accent), rgba(201,165,87,0.25) 45%, transparent 80%) 1;
}
.num {
  border-radius: 0; font-family: var(--mono); font-weight: 800; min-width: 1.7em; width: auto; padding: 0 0.25em;
  background: linear-gradient(180deg, #e0c27a, #a9853c); color: #1b1408;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

/* abgeschrägte Platten */
.tile, .panel, .act, .order, .figure, .pipeline li, .list li, .wr-list > div, .steps-num li, .checklist li, .explain, .quick, .sim, .mode {
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.tile, .act, .list li, .wr-list > div, .steps-num li, .checklist li, .pipeline li {
  background: linear-gradient(180deg, #211f1b, #1b1a17); border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(201,165,87,0.22);
}
.tile .ic { color: var(--accent); }
.figure { background: linear-gradient(180deg, #1c1b18, #171613); }
.explain { border-color: #4a4434; }
.ex-k { font-family: var(--head-font); text-transform: uppercase; letter-spacing: 0.04em; }
.wr-list b { color: var(--accent-2); font-family: var(--mono); font-size: 0.95rem; }

/* Datenkarte als Leitmotiv: Panels tragen einen Kartenkopf */
.panel { background: linear-gradient(160deg, #26241f, #1a1916); border: 2px solid #4a4434; }
.panel > h3:first-child {
  margin: -18px -18px 12px; padding: 10px 18px;
  background: linear-gradient(90deg, #4f3512, #2a2117); border-bottom: 2px solid #4a4434;
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.02rem;
}
.datacard { border-radius: 0; clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.dc-name { font-size: 1.35rem; letter-spacing: 0.06em; }
.stat { border-radius: 0; }
.stat b, .dc-weap td, .ap { font-family: var(--mono); }
.dc-weap td:first-child { font-family: inherit; }

/* Würfel */
.d { border-radius: 6px; font-family: var(--mono); }
.d.ok { color: var(--ok); border-color: var(--ok); background: rgba(127,200,160,0.13); }
.d.crit { color: var(--crit); border-color: var(--crit); background: rgba(240,192,96,0.17); box-shadow: 0 0 12px rgba(240,192,96,0.30); }
.d.blk { opacity: 0.4; text-decoration: line-through; }

/* Schritte */
.steps-num li::before, .pipeline li > span {
  border-radius: 0; font-family: var(--mono);
  background: linear-gradient(180deg, #e0c27a, #a9853c);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
.ap i { background: var(--accent); border-radius: 0; transform: rotate(45deg) scale(0.8); }

/* Knöpfe */
.btn {
  border-radius: 0; text-transform: uppercase; letter-spacing: 0.06em;
  background: linear-gradient(180deg, #e0c27a, #b38e42); color: #1b1408;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.35);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn:active { box-shadow: inset 0 -1px 0 rgba(0,0,0,0.35); }
.btn.ghost { background: rgba(255,255,255,0.02); color: var(--ink); box-shadow: inset 0 0 0 2px #5a5140; }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.btn:focus-visible, .mode:focus-visible, .team-card:focus-visible { outline-offset: -4px; }
.tag { border-radius: 0; }

/* ---------- Hinweiskästen ---------- */
.note { border-radius: 0; border-left: 3px solid var(--accent); background: linear-gradient(90deg, rgba(201,165,87,0.07), var(--bg2) 40%); }
.callout {
  position: relative; border-radius: 0; padding: 14px 18px 14px 30px;
  background: rgba(178,58,46,0.13); border: 1px solid rgba(178,58,46,0.55);
}
.callout::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px;
  background: repeating-linear-gradient(-45deg, #d9a93c 0 7px, #1a1510 7px 14px);
}
.callout > b:first-child { color: var(--blood-ink); text-transform: uppercase; letter-spacing: 0.04em; font-family: var(--head-font); }
.callout.tip { background: rgba(108,195,173,0.09); border-color: rgba(108,195,173,0.45); }
.callout.tip::before { background: linear-gradient(180deg, var(--verd), #3b7e6d); }
.callout.tip > b:first-child { color: var(--verd); }

/* Merke: Pergament mit Siegel */
.merke {
  margin: 30px 0 10px; padding: 22px 56px 14px 18px; border-radius: 2px;
  background:
    radial-gradient(120px 60px at 92% 85%, rgba(120,80,30,0.16), transparent 70%),
    radial-gradient(160px 80px at 8% 10%, rgba(120,80,30,0.12), transparent 70%),
    linear-gradient(180deg, #efe4c8, #e2d2aa);
  color: var(--parch-ink); border: 1px solid #b89b62;
  box-shadow: 0 6px 18px -10px #000, inset 0 0 22px rgba(120,80,30,0.18);
}
.merke p, .merke li { color: var(--parch-ink); }
.merke a { color: #6a3410; }
.merke b, .merke > b:first-child { color: #5c1c12; }
.merke::before {
  content: "Merke"; top: -0.9em; left: 14px; border-radius: 0; padding: 3px 14px;
  background: linear-gradient(180deg, #9c2c22, #761c15); color: #f6ead2;
  font-family: var(--head-font); letter-spacing: 0.16em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%, 8px 50%);
  padding-inline: 18px;
}
.merke::after {
  content: ""; position: absolute; right: 12px; top: -14px; width: 40px; height: 40px; border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23f1d7b8' fill-opacity='.85' d='M16 3C9 3 4.5 7.6 4.5 14c0 3.7 1.6 6.4 4 8v4.2c0 1 .8 1.8 1.8 1.8h1.4v-3h2v3h4.6v-3h2v3h1.4c1 0 1.8-.8 1.8-1.8V22c2.4-1.6 4-4.3 4-8C27.5 7.6 23 3 16 3Zm-5 16.5a3.2 3.2 0 1 1 0-6.4 3.2 3.2 0 0 1 0 6.4Zm10 0a3.2 3.2 0 1 1 0-6.4 3.2 3.2 0 0 1 0 6.4ZM16 20l-1.6 2.6h3.2L16 20Z'/%3E%3C/svg%3E") center / 22px no-repeat,
    radial-gradient(circle at 38% 32%, #d04a3c, #8e241b 62%, #6a1912);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 0 0 3px rgba(0,0,0,0.12);
}

/* ---------- Aufklapper: eine Form für alle ---------- */
details.acc, details.pak, .faq details, details.faq-glossar {
  background: linear-gradient(180deg, #211f1b, #1b1a17); border: 1px solid var(--line); border-radius: 0;
  padding: 0 16px; margin: 8px 0;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
details.acc[open], details.pak[open], .faq details[open], details.faq-glossar[open] { padding-bottom: 14px; border-color: #5a5140; }
details.acc > summary, details.pak > summary, .faq details > summary, details.faq-glossar > summary {
  display: block; position: relative; list-style: none; cursor: pointer;
  margin: 0 -16px; padding: 14px 52px 14px 16px; font-weight: 800; font-size: 1.02rem; line-height: 1.35;
}
details.acc > summary::-webkit-details-marker, details.pak > summary::-webkit-details-marker,
.faq details > summary::-webkit-details-marker, details.faq-glossar > summary::-webkit-details-marker { display: none; }
details.pak > summary::before { content: none; }
details.acc > summary::after, details.pak > summary::after, .faq details > summary::after, .faq details[open] > summary::after, details.faq-glossar > summary::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 26px; height: 26px; margin-top: -13px;
  border: 1px solid #5a5140; background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%23e8cf8f' stroke-width='2.6'/%3E%3C/svg%3E") center / 16px no-repeat, #15140f;
  transition: transform 0.15s;
}
details.acc[open] > summary::after, details.pak[open] > summary::after, .faq details[open] > summary::after, details.faq-glossar[open] > summary::after { transform: rotate(180deg); }
details.acc > summary:hover, details.pak > summary:hover, .faq details > summary:hover, details.faq-glossar > summary:hover { background: rgba(201,165,87,0.07); }
details.acc[open] > summary, details.pak[open] > summary, .faq details[open] > summary, details.faq-glossar[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.acc-s { display: block; margin-top: 2px; font-weight: 500; font-size: 0.9rem; color: var(--muted); font-family: inherit; }
.faq details p { padding: 0; }
details.acc > :last-child, details.pak > :last-child { margin-bottom: 0; }
.acc-tools { display: flex; justify-content: flex-end; margin: 6px 0; }
.acc-all { padding: 7px 14px; font-size: 0.85rem; }
@media (prefers-reduced-motion: reduce) { details > summary::after { transition: none; } }

/* ---------- Schnellstart ---------- */
.quick {
  margin: 18px 0 22px; padding: 0 18px 16px; border: 2px solid #5a4a2a;
  background: linear-gradient(160deg, #27241d, #191814);
}
.quick-h {
  margin: 0 -18px 14px; padding: 10px 18px; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em;
  background: linear-gradient(90deg, #5a3c12, #2a2117); border-bottom: 2px solid #5a4a2a; color: #f3e3bd;
}
.quick-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: q; }
.quick-steps > li { counter-increment: q; position: relative; padding: 4px 0 0 44px; }
.quick-steps > li::before {
  content: counter(q); position: absolute; left: 0; top: 2px; width: 32px; height: 32px; display: grid; place-items: center;
  font: 800 1.05rem var(--mono); color: #1b1408; background: linear-gradient(180deg, #e0c27a, #a9853c);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.quick-steps > li > b:first-child { display: block; color: var(--accent-2); margin-bottom: 2px; }
.quick-steps p { margin: 0 0 4px; }
.quick .fine, .quick-foot { margin: 12px 0 0; }
@media (max-width: 760px) { .quick-steps { grid-template-columns: 1fr; } }

/* Sprungleiste innerhalb eines Abschnitts */
.jump { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 10px 0 16px; font-size: 0.92rem; }
.jump > b, .jump > span { color: var(--muted); font-weight: 700; margin-right: 2px; }
.jump a { text-decoration: none; padding: 4px 10px; border: 1px solid #4a4434; background: var(--bg2); color: var(--accent-2); }
.jump a:hover { border-color: var(--accent); }

/* Teil-Trenner (Kernpfad / Nachschlagen) */
.part { margin-top: 56px; padding: 18px 16px 4px; position: relative; }
.part::before {
  content: ""; display: block; height: 8px; margin-bottom: 18px; opacity: 0.6;
  background: repeating-linear-gradient(-45deg, #c9a557 0 10px, #15130f 10px 20px);
}
.part-k { display: block; color: var(--accent); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.85rem; font-weight: 800; }
.part h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 4px 0 8px; }
.part p { max-width: 72ch; }

/* ---------- Tabellen ---------- */
.tbl { border-radius: 0; }
.tbl thead th { color: var(--accent-2); background: linear-gradient(90deg, #3a2a12, #221d15); font-family: var(--head-font); letter-spacing: 0.08em; }
.tbl.num-t td, .tbl.num-t th { text-align: center; }
.tbl.num-t td:first-child, .tbl.num-t th:first-child { text-align: left; }
.tbl.num-t td { font-family: var(--mono); }
.tbl-wrap > .tbl.num-t { min-width: 0; }
@media (max-width: 600px) {
  .tbl.num-t th, .tbl.num-t td { padding: 8px 6px; }
  .tbl-wrap:has(> .tbl.stack) { overflow: visible; background: none; -webkit-mask-image: none; mask-image: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: auto; min-width: 0 !important; }
  .tbl-wrap > .tbl.stack { min-width: 0; }
  .tbl.stack thead { display: none; }
  .tbl.stack { background: none; border: 0; }
  .tbl.stack tr { background: linear-gradient(180deg, #211f1b, #1b1a17); border: 1px solid var(--line); border-top: 2px solid var(--accent); padding: 8px 0; margin-bottom: 10px; }
  .tbl.stack td { border-top: 0; padding: 4px 14px; }
  .tbl.stack td:first-child { font-weight: 800; color: var(--accent-2); font-size: 1.02rem; }
  .tbl.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
}

/* ---------- Schemata (Inline-SVG) ---------- */
.dg { display: block; width: 100%; height: auto; }
.dg text { font-family: ui-sans-serif, system-ui, sans-serif; }
.dg .bg { fill: var(--bg2); }
.dg .frame { fill: none; stroke: #5a5140; stroke-width: 2; }
.dg .gridl { stroke: var(--line); stroke-width: 1; }
.dg .mid { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 10 7; fill: none; }
.dg .zone-a { fill: rgba(75,155,224,0.16); stroke: var(--ally); stroke-width: 2; }
.dg .zone-b { fill: rgba(178,58,46,0.18); stroke: #e0675a; stroke-width: 2; }
.dg .obj { fill: #e0c27a; stroke: #1b1408; stroke-width: 2; }
.dg .heavy { fill: #6e6a63; stroke: #a39d92; stroke-width: 2; }
.dg .light { fill: #8c7a52; stroke: #c2a86e; stroke-width: 2; }
.dg .ground { fill: #2a2722; stroke: #5a5140; stroke-width: 2; }
.dg .dim { stroke: var(--accent-2); stroke-width: 2; fill: none; }
.dg .dim-r { stroke: var(--blood-ink); stroke-width: 2; fill: none; stroke-dasharray: 5 4; }
.dg .path { stroke: var(--verd); stroke-width: 3; fill: none; stroke-dasharray: 7 5; }
.dg .ally { fill: var(--ally); stroke: #fff; stroke-width: 2; }
.dg .foe { fill: var(--blood); stroke: #fff; stroke-width: 2; }
.dg .box { fill: var(--panel); stroke: #5a5140; stroke-width: 2; }
.dg .box-a { fill: rgba(201,165,87,0.12); stroke: var(--accent); stroke-width: 2; }
.dg .box-r { fill: rgba(178,58,46,0.16); stroke: #e0675a; stroke-width: 2; }
.dg .box-g { fill: rgba(108,195,173,0.12); stroke: var(--verd); stroke-width: 2; }
.dg .arrow { stroke: var(--accent); stroke-width: 2.5; fill: none; }
.dg .tx { fill: var(--ink); font-size: 15px; font-weight: 700; }
.dg .tx-b { fill: var(--ink); font-size: 17px; font-weight: 800; }
.dg .tx-m { fill: var(--muted); font-size: 13.5px; }
.dg .tx-a { fill: var(--accent-2); font-size: 15px; font-weight: 800; }
.dg .tx-r { fill: var(--blood-ink); font-size: 15px; font-weight: 800; }
.dg .tx-g { fill: var(--verd); font-size: 15px; font-weight: 800; }
.dg .c { text-anchor: middle; }
.dg .halo { paint-order: stroke; stroke: var(--bg2); stroke-width: 4px; stroke-linejoin: round; }
.fig-scroll { overflow-x: auto; }
@media (max-width: 600px) {
  .fig-scroll .dg { min-width: 600px; }
}

/* ---------- Kapitelmenü und Nach oben ---------- */
.chap-btn {
  display: none; margin-left: auto; align-items: center; gap: 8px; font: inherit; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink); background: var(--panel2); border: 1px solid #5a5140; padding: 8px 12px; cursor: pointer; min-height: 40px;
}
.chap-btn svg { width: 18px; height: 18px; color: var(--accent); }
.chap-btn[aria-expanded="true"] { border-color: var(--accent); }
.chap-panel {
  position: fixed; z-index: 30; top: 57px; left: 0; right: 0; max-height: calc(100vh - 57px); max-height: calc(100dvh - 57px); overflow-y: auto;
  background: #100f0d; border-bottom: 2px solid var(--accent); padding: 8px 16px 18px; box-shadow: 0 18px 30px -12px #000;
}
.chap-panel[hidden] { display: none; }
.chap-g { margin: 12px 0 4px; font: 800 0.8rem var(--head-font); text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); }
.chap-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.chap-list a { display: block; padding: 10px 12px; min-height: 44px; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); }
.chap-list a:hover, .chap-list a:focus-visible { border-color: var(--accent); color: var(--accent-2); }
@media (max-width: 820px) {
  .top .toc { display: none; }
  .chap-btn { display: inline-flex; }
}
.totop {
  position: fixed; z-index: 25; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px;
  display: grid; place-items: center; cursor: pointer; color: #1b1408; border: 0;
  background: linear-gradient(180deg, #e0c27a, #a9853c); box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.totop svg { width: 22px; height: 22px; }
/* Handy: kompakt, erscheint nur beim Hochscrollen (kt-ui.js); unten Platz lassen, damit am Seitenende nichts darunter liegt */
@media (max-width: 600px) {
  .totop { width: 40px; height: 40px; left: 8px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .totop svg { width: 20px; height: 20px; }
  .foot { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}
.totop[hidden] { display: none; }
.totop:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }

/* ---------- Hauptseite: Etappen, Schemata, Simulator ---------- */
.stage { margin: 0 0 6px; font: 800 0.8rem var(--head-font); text-transform: uppercase; letter-spacing: 0.2em; color: var(--verd); }
.figure svg.flow-v, svg.flow-v { display: none; }
.figure svg.dg-narrow { max-width: 660px; margin: 0 auto; }
@media (max-width: 600px) {
  .figure svg.flow-h, svg.flow-h { display: none; }
  .figure svg.flow-v, svg.flow-v { display: block; max-width: 420px; margin: 0 auto; }
}
.pipeline { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.merke-all { margin: 0; }
.merke-all dt { margin-top: 12px; font-weight: 800; }
.merke-all dt a { text-decoration: none; }
.merke-all dd { margin: 2px 0 0; color: var(--ink); }

.sim { margin: 26px 0; padding: 0 18px 18px; border: 2px solid #5a4a2a; background: linear-gradient(160deg, #24221c, #171612); }
.sim-h { margin: 0 -18px 12px; padding: 10px 18px; text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.1rem;
  background: linear-gradient(90deg, #5a3c12, #2a2117); border-bottom: 2px solid #5a4a2a; color: #f3e3bd; }
.sim-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sim-form fieldset { margin: 0; border: 1px solid var(--line); padding: 10px 12px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; min-width: 0; }
.sim-form legend { padding: 0 6px; font: 800 0.85rem var(--head-font); text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-2); }
.sim-form label { display: grid; gap: 4px; font-size: 0.88rem; color: var(--muted); font-weight: 700; }
.sim-form select { font: inherit; font-size: 1rem; font-family: var(--mono); color: var(--ink); background: var(--bg); border: 1px solid #5a5140; padding: 8px; min-height: 42px; border-radius: 0; }
.sim-form label.chk { display: flex; align-items: center; gap: 8px; color: var(--ink); min-height: 42px; align-self: end; }
.sim-form label.chk input { width: 20px; height: 20px; accent-color: var(--accent); }
.sim-btns { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sim-out:empty { display: none; }
.sim-steps { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 10px; }
.sim-steps > li { counter-increment: st; position: relative; padding: 10px 12px 10px 50px; background: rgba(0,0,0,0.25); border-left: 3px solid #5a5140; }
.sim-steps > li::before { content: counter(st); position: absolute; left: 12px; top: 10px; width: 26px; height: 26px; display: grid; place-items: center;
  font: 800 0.9rem var(--mono); color: #1b1408; background: linear-gradient(180deg, #e0c27a, #a9853c); }
.sim-steps > li:last-child { border-left-color: var(--blood); }
.sim-steps p { margin: 4px 0 0; }
.sim-blocks { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.sim-blocks li { line-height: 1.9; }
.sim-blocks .d, .sim-steps .dice .d { width: 34px; height: 34px; font-size: 1rem; }
.sim-blocks .d { display: inline-grid; vertical-align: middle; margin: 0 2px; width: 28px; height: 28px; font-size: 0.9rem; }
.sim-avg { margin: 14px 0 0; padding: 10px 12px; border: 1px dashed #5a5140; }
.sim-avg:empty { display: none; }
@media (max-width: 700px) { .sim-form { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .sim { padding: 0 12px 14px; }
  .sim-h { margin: 0 -12px 12px; padding: 10px 12px; }
  .sim-form fieldset { grid-template-columns: 1fr 1fr; }
  .sim-steps > li { padding-left: 46px; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .facts li { padding: 8px 8px; }
  .facts b { font-size: 1.15rem; }
  .facts span { font-size: 0.78rem; line-height: 1.25; display: block; }
  .hero { padding-top: 32px; }
}

/* ---------- Druck ---------- */
@media print {
  :root { --bg: #fff; --bg2: #f3f1ec; --panel: #fff; --panel2: #eceae4; --line: #bbb; --ink: #111; --muted: #444; --accent: #8a5a14; --accent-2: #6b4410; --miss: #666; --blood-ink: #8e241b; --verd: #1f6b58; }
  body { background: #fff !important; }
  .tile, .act, .list li, .wr-list > div, .steps-num li, .checklist li, .pipeline li, .panel, .figure, .quick, details.acc, details.pak, .faq details, details.faq-glossar, .facts li { background: #fff !important; box-shadow: none; }
  .tbl thead th { background: #eee; color: #111; }
  .chap-btn, .chap-panel, .totop, .acc-tools, .tbl-hint { display: none !important; }
  .hero::after, .part::before, .callout::before { display: none; }
  .tile, .panel, .act, .order, .figure, .pipeline li, .list li, .wr-list > div, .steps-num li, .checklist li, .explain, .quick, .sim, .datacard, details { clip-path: none !important; }
  .panel > h3:first-child { background: none; }
  .merke { background: #fff; box-shadow: none; }
  .merke::after { display: none; }
  details > summary::after { display: none; }
  .tbl.stack thead { display: table-header-group; }
}
