/* D-431 Praesentation (/praesentation): Aufbau wie ein Wiki – links feste Segment-Navigation, rechts Kapitel mit Ankern.
   Farben/Schrift aus site.css. Handy: Navigation als aufklappbare Leiste (Checkbox, ohne JavaScript); pres.js markiert nur den
   aktuellen Abschnitt und schliesst die Leiste nach einem Klick. Rechts-nach-links ueber logische Eigenschaften. */

.pres-banner { height: 240px; }
.pres-banner .banner-in { padding-bottom: 30px; }
.pres-banner h1 { margin-bottom: .2em; }

.pres { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 40px; align-items: start;
  width: 100%; max-width: 1320px; margin: 28px auto 64px; padding-inline: 24px; }

/* ------------------------------------------------------------- linke Navigation */
.pnav-box { align-self: stretch; min-width: 0; }
.pnav-t { position: absolute; opacity: 0; pointer-events: none; }
.pnav-b { display: none; }
.pnav { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding: 16px 10px 16px 14px;
  border: 1px solid var(--bronze-dim); border-radius: var(--r); background: linear-gradient(180deg, var(--win-top), var(--win-bot));
  scrollbar-width: thin; scrollbar-color: var(--bronze-dim) transparent; }
.pnav h2 { font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 2px 6px 10px; }
.pnav ol { list-style: none; margin: 0; padding: 0; }
.pnav > ol > li + li { margin-top: 2px; }
.pnav a { display: flex; gap: 10px; align-items: baseline; color: var(--text); border-radius: var(--r); text-decoration: none; }
.pnav .seg-a { padding: 7px 8px; font-weight: 650; font-size: .95rem; }
.pnav .seg-a span { flex: none; min-width: 1.6em; font: 700 .78rem/1 Georgia, "Times New Roman", serif; color: var(--gold); }
.pnav .sub { margin: 0 0 6px; padding-inline-start: 26px; border-inline-start: 1px solid var(--bronze-dim); margin-inline-start: 18px; }
.pnav .sub a { padding: 3px 8px; font-size: .86rem; color: var(--dim); }
.pnav a:hover { background: rgba(110, 26, 22, .28); color: var(--gold-hi); }
.pnav a.on { color: var(--gold-hi); background: rgba(110, 26, 22, .42); box-shadow: inset 2px 0 0 var(--gold); }
[dir="rtl"] .pnav a.on { box-shadow: inset -2px 0 0 var(--gold); }
.pnav .pnav-cta { display: grid; gap: 8px; margin: 14px 4px 2px; padding-top: 14px; border-top: 1px solid var(--bronze-dim); }
.pnav .pnav-cta .btn { width: 100%; }

/* ------------------------------------------------------------- Inhalt */
.pres-main { display: grid; gap: 64px; min-width: 0; }
.seg { scroll-margin-top: 84px; display: grid; gap: 22px; min-width: 0; }
.seg-head { display: flex; gap: 18px; align-items: flex-end; padding-bottom: 14px; border-bottom: 1px solid var(--bronze-dim); }
.seg-no { flex: none; font: 700 clamp(2.6rem, 5vw, 3.6rem)/.9 Georgia, "Times New Roman", serif; color: var(--gold);
  text-shadow: 0 0 24px rgba(142, 38, 32, .7), 0 2px 0 var(--lacquer-dk); }
.seg-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 .15em; }
.seg-head p { color: var(--dim); margin: 0; max-width: 70ch; }

/* Steckbrief */
.facts-wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; align-items: start; }
table.facts, table.ptab { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tab-box { border: 1px solid var(--bronze-dim); border-radius: var(--r); overflow: hidden; background: var(--inset); }
.tab-box.scroll { overflow-x: auto; }
table.facts th, table.facts td { padding: 10px 16px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--inset-line); }
table.facts tr:last-child th, table.facts tr:last-child td { border-bottom: 0; }
table.facts th { width: 38%; color: var(--dim); font-weight: 600; background: rgba(24, 25, 30, .7); }
table.facts td { color: var(--text); font-weight: 600; }
table.facts td b { color: var(--gold-hi); }
.facts-side { display: grid; gap: 16px; }
.facts-side .cd { display: block; margin: 0; }
.facts-side .cd-n span { min-width: 0; flex: 1; }
.facts-side .cd-n b { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.facts-side .cta { margin: 0; }
.facts-side .cta .btn { flex: 1; }

/* Tabellen (Dungeons, PvP-Plan, Gilde, Gratis/Premium) */
table.ptab th, table.ptab td { padding: 9px 14px; text-align: start; border-bottom: 1px solid var(--inset-line); white-space: nowrap; }
table.ptab td.wrap-ok { white-space: normal; }
table.ptab thead th { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
  background: rgba(24, 25, 30, .9); }
table.ptab tbody tr:nth-child(even) { background: rgba(255, 255, 255, .02); }
table.ptab tbody tr:last-child td { border-bottom: 0; }
table.ptab td:first-child { color: var(--gold-hi); font-weight: 650; }
table.ptab .ok { color: var(--good); font-weight: 700; }
table.ptab .pm { color: var(--gold); font-weight: 700; }
.tab-note { color: var(--dim); font-size: .85rem; margin: 8px 2px 0; }

/* Klassen */
ul.classes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
ul.classes li { display: flex; flex-direction: column; border: 1px solid var(--bronze-dim); border-radius: var(--r); overflow: hidden;
  background: linear-gradient(180deg, var(--win-top), var(--win-bot)); }
ul.classes img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 11; object-fit: cover; background: #14110d;
  border-bottom: 1px solid var(--bronze-dim); }
ul.classes .c-in { padding: 12px 12px 14px; display: grid; gap: 8px; }
ul.classes h3 { margin: 0; font-size: 1.1rem; }
ul.classes dl { margin: 0; display: grid; gap: 6px; }
ul.classes dt { color: var(--gold); font-weight: 700; font-size: .86rem; }
ul.classes dd { margin: 0; color: var(--dim); font-size: .82rem; line-height: 1.45; }

/* System-Block */
.sx { scroll-margin-top: 84px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 26px; align-items: center;
  padding: 22px 24px; border: 1px solid var(--bronze-dim); border-radius: var(--r);
  background: linear-gradient(180deg, var(--win-top), var(--win-bot)); }
.sx.wide { grid-template-columns: minmax(0, 1fr); }
.sx.flip .sx-media { order: -1; }
.sx-txt h3 { font-size: 1.35rem; margin: 0 0 .35em; }
.sx-txt h3 .badge { margin: 0 0 0 10px; vertical-align: 3px; }
[dir="rtl"] .sx-txt h3 .badge { margin: 0 10px 0 0; }
.sx-txt > p { color: var(--text); opacity: .9; margin: 0 0 12px; max-width: 72ch; }
.sx.wide .sx-txt { max-width: 80ch; }
.sx-media { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.sx-media > .shot { min-width: 0; }
.sx.wide .sx-media { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); align-items: start; }
.sx.wide .sx-media .shot.row { grid-column: 1 / -1; }
.sx-media .shot:not(.row) img { width: auto; max-width: 100%; margin-inline: auto; }
.sx-media .shot figcaption { font-weight: 600; }
.sx .also { margin-top: 2px; }
.sx-extra { grid-column: 1 / -1; min-width: 0; }

/* Statements kompakt */
.seg .st-grid { gap: 12px; }
.seg .st { padding: 16px 18px 14px; }

/* Abschluss */
.go-box { text-align: center; padding: 34px 24px; border: 1px solid var(--bronze); border-radius: var(--r);
  background: radial-gradient(ellipse at 50% 0%, rgba(142, 38, 32, .35), transparent 70%), linear-gradient(180deg, var(--win-top), var(--win-bot)); }
.go-box h3 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.go-box .cta { justify-content: center; margin: 18px 0 0; }
.seg .steps3 { margin-top: 4px; }

@media (max-width: 1180px) {
  ul.classes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .pres { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 0; padding-inline: 0; }
  .pres-main { padding: 22px 16px 0; gap: 48px; }
  .pnav-box { position: sticky; top: 64px; z-index: 15; align-self: start; }
  .pnav-b { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; cursor: pointer;
    font-weight: 700; color: var(--gold-hi); background: linear-gradient(180deg, rgba(24, 20, 20, .98), rgba(14, 13, 15, .98));
    border-bottom: 1px solid var(--bronze-dim); }
  .pnav-b small { color: var(--dim); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pnav-b::after { content: ""; flex: none; width: 9px; height: 9px; border: solid var(--gold); border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
  .pnav-t:checked + .pnav-b::after { transform: rotate(-135deg) translateY(-2px); }
  .pnav { display: none; position: absolute; inset-inline: 0; top: 100%; max-height: calc(100vh - 120px); border-radius: 0;
    border-width: 0 0 1px; box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }
  .pnav-t:checked ~ .pnav { display: block; }
  .pnav-t:focus-visible + .pnav-b { outline: 2px solid var(--gold); outline-offset: -2px; }
  .seg, .sx { scroll-margin-top: 120px; }
  .sx, .sx.flip { grid-template-columns: minmax(0, 1fr); }
  .sx.flip .sx-media { order: 0; }
}
@media (max-width: 760px) {
  .pres-banner { height: 190px; }
  .seg-head { gap: 12px; }
  .sx { padding: 16px 14px; gap: 16px; }
  .sx-txt h3 { font-size: 1.18rem; }
  .sx.wide .sx-media { grid-template-columns: minmax(0, 1fr); }
  ul.classes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  ul.classes .c-in { padding: 10px; }
  table.facts th, table.facts td { padding: 8px 12px; }
  table.facts th { width: 44%; }
  table.ptab th, table.ptab td { padding: 8px 10px; font-size: .88rem; white-space: normal; }
  table.ptab.dg td:not(:first-child) { white-space: nowrap; }
  table.ptab small.tag { display: inline-block; margin: 2px 0 0; }
  .facts-side .cta { flex-direction: column; }
}

/* Bloecke ohne System-Rahmen (Steckbrief, Klassen, Tabellen) */
.blk { scroll-margin-top: 84px; display: grid; gap: 12px; min-width: 0; }
.blk-h { font-size: 1.2rem; margin: 0; }
.blk-p { color: var(--dim); margin: -4px 0 4px; max-width: 72ch; }
table.ptab small.tag { margin-inline-start: 8px; padding: 1px 8px; font-size: .72rem; font-weight: 700; color: var(--dim);
  border: 1px solid var(--inset-line); border-radius: 999px; vertical-align: 1px; }
@media (max-width: 980px) { .blk { scroll-margin-top: 120px; } }

/* D-431 Nachtrag: Fenster 1:1 (nie hochskaliert), Fotos des Stakeholders in voller Breite */
.sx-media .shot:not(.row):not(.foto) img { image-rendering: auto; }
.sx-media .shot.foto { grid-column: 1 / -1; }
.sx-media .shot.foto img { width: 100%; max-width: 100%; border-radius: var(--r); }
.sx.wide .sx-media { grid-template-columns: minmax(0, 1fr); }
.sx.wide .sx-media .shot:not(.row):not(.foto) { justify-self: center; max-width: 100%; }

/* D-431 Nachtrag: Systeme ohne Bild – grosses Symbol links, Kennzahlen unter dem Text (gewollt, kein Platzhalter) */
.sx.kpi { grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 24px; }
.sx-ico { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%;
  border: 1px solid var(--bronze); background: radial-gradient(circle at 50% 38%, rgba(142, 38, 32, .45), rgba(9, 10, 13, .9) 70%);
  box-shadow: 0 0 0 6px rgba(9, 10, 13, .6), 0 0 34px rgba(142, 38, 32, .35); }
.sx-ico svg { width: 52px; height: 52px; fill: var(--gold); filter: drop-shadow(0 0 12px rgba(230, 200, 140, .35)); }
ul.kpis { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
ul.kpis li { padding: 12px 14px 10px; border: 1px solid var(--inset-line); border-top: 2px solid var(--gold); border-radius: var(--r);
  background: rgba(9, 10, 13, .55); }
ul.kpis b { display: block; font-size: clamp(1.35rem, 2.4vw, 1.8rem); font-weight: 750; line-height: 1.1; color: var(--gold-hi);
  text-shadow: 0 0 16px rgba(230, 200, 140, .25); font-variant-numeric: tabular-nums; }
ul.kpis span { display: block; margin-top: 4px; font-size: .84rem; color: var(--dim); line-height: 1.35; }
@media (max-width: 760px) {
  .sx.kpi { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .sx-ico { display: none; }                 /* Handy: Platz fuer den Text, die Kennzahlen tragen den Block */
  ul.kpis { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  ul.kpis li { display: flex; align-items: baseline; gap: 12px; padding: 10px 12px; }
  ul.kpis span { margin: 0; }
}

/* D-431 Feedback: Tabelle "Das hast du gratis" */
table.ptab.free td { white-space: normal; }
table.ptab.free td:first-child { white-space: nowrap; }
table.ptab.free td:first-child::before { content: "✓"; display: inline-block; width: 1.4em; color: var(--good); font-weight: 800; }
@media (max-width: 760px) { table.ptab.free td:first-child { white-space: normal; } }

/* D-438 Twink-Linien (Segment Ausruestung): echte Item-Icons, Grafik "eine Familie, drei Stufen, zwei Wege", Punkte,
   Galerie. Raster ueber Klassen (CSP ohne Inline-Styles). Farben der Zweige wie im Spiel: PvP warm, PvM gruen. */
.sx.tw { --tw-pvp: #ec9a6c; --tw-pvm: #6fcea8; gap: 24px; }
.tw-ic { display: grid; place-items: center; padding: 3px; border: 1px solid var(--inset-line); border-radius: 4px;
  background: radial-gradient(circle at 50% 42%, #251f19, #0a0a0c 78%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55); }
.tw-ic img { display: block; width: 96px; height: 96px; max-width: none; }
.tw-ic.pvp { border-color: rgba(236, 154, 108, .5); }
.tw-ic.pvm { border-color: rgba(111, 206, 168, .5); }

.tw-fork { margin: 0; display: grid; justify-items: center; gap: 14px; padding: 22px 20px 16px; border: 1px solid var(--inset-line);
  border-radius: var(--r); background: radial-gradient(ellipse at 50% 0%, rgba(142, 38, 32, .2), transparent 65%), var(--inset); }
.tw-fork-h { font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); text-align: center; }
.tw-grid { display: grid; grid-template-columns: auto 46px auto auto auto auto; grid-template-rows: auto auto auto;
  column-gap: 0; row-gap: 12px; align-items: center; }
.tw-grid .tw-c2, .tw-grid .tw-c3 { margin-inline-start: 26px; }
.tw-grid .tw-th { grid-row: 1; justify-self: center; font: 700 .9rem/1 Georgia, "Times New Roman", serif; color: var(--gold); letter-spacing: .06em; }
.tw-grid .tw-c1 { grid-column: 4; } .tw-grid .tw-c2 { grid-column: 5; } .tw-grid .tw-c3 { grid-column: 6; }
.tw-grid .tw-r1 { grid-row: 2; } .tw-grid .tw-r2 { grid-row: 3; }
.tw-start { grid-column: 1; grid-row: 2 / 4; display: grid; justify-items: center; gap: 8px; }
.tw-start b { font-size: .8rem; font-weight: 700; color: var(--gold-hi); text-align: center; max-width: 110px; line-height: 1.25; }
.tw-split { grid-column: 2; grid-row: 2 / 4; width: 100%; height: 100%; overflow: visible; }
.tw-split path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.tw-split .pvp { stroke: var(--tw-pvp); } .tw-split .pvm { stroke: var(--tw-pvm); }
[dir="rtl"] .tw-split { transform: scaleX(-1); }
.tw-grid .tw-path { grid-column: 3; margin-inline-end: 14px; }
.tw-path { justify-self: start; padding: 2px 9px; font-size: .74rem; font-weight: 800; font-style: normal; letter-spacing: .06em;
  border-radius: 999px; border: 1px solid currentColor; }
.tw-path.pvp { color: var(--tw-pvp); background: rgba(236, 154, 108, .1); }
.tw-path.pvm { color: var(--tw-pvm); background: rgba(111, 206, 168, .1); }
.tw-cell { position: relative; }
.tw-cell.tw-c2::before, .tw-cell.tw-c3::before { content: "›"; position: absolute; inset-inline-start: -19px; top: 50%;
  transform: translateY(-55%); font: 700 1.3rem/1 Georgia, serif; color: var(--bronze); }
[dir="rtl"] .tw-cell.tw-c2::before, [dir="rtl"] .tw-cell.tw-c3::before { content: "‹"; }
.tw-ex { margin: 0; color: var(--dim); font-size: .85rem; font-weight: 600; text-align: center; }

ul.tw-pts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
ul.tw-pts li { display: grid; align-content: start; gap: 6px; padding: 14px 14px 12px; border: 1px solid var(--inset-line);
  border-top: 2px solid var(--gold); border-radius: var(--r); background: rgba(9, 10, 13, .55); }
ul.tw-pts b { color: var(--gold-hi); font-weight: 700; line-height: 1.3; }
ul.tw-pts span { color: var(--dim); font-size: .88rem; line-height: 1.45; }

.tw-gal h4 { font-size: 1rem; margin: 0 0 10px; }

.tw-gal ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tw-gal li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 8px; align-items: start; padding: 12px;
  border: 1px solid var(--inset-line); border-radius: var(--r); background: rgba(9, 10, 13, .55); }
.tw-strip { grid-column: 1 / -1; display: flex; gap: 5px; justify-content: center; }
.tw-strip .tw-ic { flex: 1 1 0; min-width: 0; max-width: 54px; padding: 2px; }
.tw-strip .tw-ic img { width: 100%; height: auto; max-width: 48px; aspect-ratio: 1; }
.tw-cap { display: grid; gap: 1px; min-width: 0; }
.tw-cap b { color: var(--gold-hi); font-size: .92rem; font-weight: 700; line-height: 1.3; }
.tw-cap span { color: var(--dim); font-size: .8rem; }
.tw-gal .tw-path { font-size: .68rem; padding: 1px 7px; }

.tw-motto { margin: 0; padding-top: 18px; border-top: 1px solid var(--bronze-dim); text-align: center;
  font: 600 clamp(1.05rem, 2vw, 1.3rem)/1.45 Georgia, "Times New Roman", serif; color: var(--gold-hi);
  text-shadow: 0 0 24px rgba(142, 38, 32, .6); }

@media (max-width: 1180px) {
  ul.tw-pts, .tw-gal ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sx.tw { gap: 18px; }
  .tw-fork { padding: 16px 8px 12px; }
  .tw-grid { grid-template-columns: auto 24px auto auto auto auto; row-gap: 10px; }
  .tw-grid .tw-c2, .tw-grid .tw-c3 { margin-inline-start: 14px; }
  .tw-grid .tw-ic img { width: 48px; height: 48px; }
  .tw-grid .tw-path { margin-inline-end: 6px; padding: 1px 6px; font-size: .66rem; }
  .tw-cell.tw-c2::before, .tw-cell.tw-c3::before { inset-inline-start: -11px; font-size: 1rem; }
  .tw-start b { font-size: .72rem; max-width: 64px; }
  ul.tw-pts, .tw-gal ul { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tw-gal li { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 12px; padding: 10px; }
  .tw-strip { grid-column: 1; grid-row: 1 / 3; align-self: center; gap: 3px; }
  .tw-cap { align-self: end; }
  .tw-cap b { font-size: .86rem; overflow-wrap: break-word; hyphens: auto; }
  .tw-gal .tw-path { grid-column: 2; justify-self: start; align-self: start; }
  .tw-fork-h { font-size: .7rem; letter-spacing: .08em; }
  .tw-strip .tw-ic { flex: none; width: 38px; }
  .tw-strip .tw-ic img { width: 32px; height: 32px; }
}
