/* Start page "/" as a saga in five chapters (public/vam.html, src/saga.js, js/saga.js). Only this page; own names start with sg-.
   Tokens come from site.css, buttons and folded lists from seite2.css. Signature "The Hundred Embers": .sg-f (one ember per level in
   every figure), .sg-flug (canvas). End state first; every motion sits in the no-preference block at the end. */

.sg {
  --sg-ziel: 44px; --sg-kopf: 61px; --sg-fluss: rgba(150, 200, 230, .55); --sg-nacht-0: rgba(11, 21, 32, 0); --sg-hell: #dce6ed;
  --sg-kurz: 150ms; --sg-luecke: 12px;
  font-variant-numeric: lining-nums;
}
.sg-nacht { position: relative; isolation: isolate; overflow-x: clip; background: var(--grund); color: var(--text-2); }

/* ---------- small shared pieces ---------- */
.sg-nacht b, .sg-weg b { color: var(--text-1); font-weight: 700; }
.sg-link { display: inline-flex; align-items: center; gap: 6px; min-width: var(--sg-ziel); min-height: var(--sg-ziel); font-weight: 700; color: var(--akzent-hell); text-decoration-color: color-mix(in srgb, var(--akzent) 45%, transparent); text-underline-offset: 4px; }
.sg-quelle { font-size: .9375rem; line-height: 1.4; color: var(--text-2); }
.sg-reihe { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 12px 0 0; }
.sg-tat { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.sg-tat > .s2-knopf { min-height: 52px; padding-inline: 20px; font-size: 1.0625rem; }
.sg-punkte { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; }
.sg-punkte > li { position: relative; padding-left: 24px; }
.sg-punkte > li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 8px; height: 8px; background: var(--bronze); transform: rotate(45deg); }
.sg-medaille { width: var(--m, 44px); height: var(--m, 44px); border-radius: 50%; flex: none; }
.sg-bildart { display: inline-block; padding: 2px 9px; border-radius: 3px; background: var(--karte); color: var(--text-2); font: 400 .875rem/1.3 var(--f-ui); text-shadow: none; }
.sg-ampel { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text-1); }
.sg-ampel::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--gut); flex: none; }
.sg-ampel--achtung::before { background: var(--warn); border-radius: 3px; transform: rotate(45deg); }
.sg-karte { display: grid; gap: 14px; align-content: start; min-width: 0; padding: 16px; border: 1px solid var(--linie); border-radius: var(--r-karte); background: var(--karte); }

/* ---------- first screen ---------- */
.sg-titel { position: relative; }
.sg-titel__art { position: absolute; z-index: 1; top: 10px; right: calc(max(0px, (100% - var(--breite)) / 2) + var(--rand)); }
.sg-titel__bild { position: absolute; z-index: -1; inset: 0 0 auto 0; display: block; aspect-ratio: 860 / 900; overflow: hidden; background: #0b1520; }
.sg-titel__bild > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
/* the first layer keeps the name readable where the aurora is brightest */
.sg-titel__bild::after { content: ""; position: absolute; inset: 0; background: radial-gradient(68% 25% at 27% 40%, rgba(11, 21, 32, .74) 0, rgba(11, 21, 32, .66) 48%, var(--sg-nacht-0) 100%), linear-gradient(180deg, var(--sg-nacht-0) 44%, rgba(11, 21, 32, .78) 58%, #0b1520 84%); }
.sg-titel__text { position: relative; z-index: 2; padding-bottom: 6px; }
.sg-titel__text > h1 { width: fit-content; font-size: clamp(2.875rem, 12vw, 5.75rem); line-height: 1; letter-spacing: .01em; margin: 0 0 8px; text-shadow: 0 2px 24px var(--grund); }
.sg-unter { font: 600 1rem/1.3 var(--f-ui); color: var(--bronze-hell); text-shadow: 0 1px 10px #0b1520; margin: 0 0 8px; max-width: 34em; }
.sg-lead { font-size: 1.0625rem; line-height: 1.42; color: var(--text-1); max-width: 34em; text-shadow: 0 1px 10px #0b1520; }
.sg-titel__text > .sg-tat { margin-top: 16px; }
.sg-titel__text > .sg-tat > .sg-link { text-decoration: none; }
.sg-titel__text > .sg-tat > .sg-link::after { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--s2-pfeil-u) center / 16px no-repeat; mask: var(--s2-pfeil-u) center / 16px no-repeat; }
.sg-titel__text > .sg-tat > .sg-link:hover { color: var(--text-1); text-decoration: underline; }
.sg-beleg { margin-top: 14px; }
.sg-zahlen { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px clamp(12px, 5.2vw, 22px); }
.sg-zahlen:empty { display: none; }
.sg-zahlen > li { font-size: 1rem; line-height: 1.25; color: var(--sg-hell); }
.sg-zahlen strong { display: block; font: 700 1.4375rem/1.15 var(--f-ui); white-space: nowrap; font-variant-numeric: lining-nums; }
/* languages that name the thing before the number: one line each */
:root:is(:lang(ja), :lang(ko), :lang(pl), :lang(ru), :lang(zh)) :is(.sg-zahlen, .sg-fakten) strong { display: inline; }
.sg-status { margin-top: 12px; }
.sg-status > .s2-vorlauf { margin-top: 8px; }
.sg-mehr { display: flex; flex-wrap: wrap; gap: 0 clamp(12px, 3.6vw, 20px); margin-top: 4px; }
/* Phones: the frame's bar takes the lowest 60 px of the window. Everything down to the status chip sits 64 px higher than on the page
   before the frame (36vw, compact 15vw), so the chip ends above the bar wherever it ended in the window then (review 26.11.: below
   the bar in 125 of 960 sizes 360-412 x 560-940 in 12 languages; seiten_pruefen.mjs --hoehen) */
@media (max-width: 719.98px) {
  /* picture, name, sentence, ways, numbers; the five numerals look in from below */
  .sg-titel__text { padding-top: calc(36vw - 64px); }
  .sg-titel__text > .sg-tat > .s2-knopf { flex: 1 1 auto; padding-inline: 10px; font-size: 1rem; }
  .sg-titel__text > .sg-tat > .sg-link { flex-basis: 100%; margin-block: -6px -8px; }
}
/* the compact first screen where less than 720 px stay above the phone bar (was: a screen below 720 px). 15vw above the name are 54-62 px,
   so the rest of the 64 px comes from a smaller name and closer steps; the buttons keep 48 px */
@media (max-width: 719.98px) and (max-height: 779.98px) {
  .sg-titel__bild { aspect-ratio: 860 / 640; }
  .sg-titel__bild::after { background: linear-gradient(180deg, var(--sg-nacht-0) 8%, rgba(11, 21, 32, .5) 32%, rgba(11, 21, 32, .84) 48%, rgba(11, 21, 32, .95) 70%, #0b1520 94%); }
  .sg-titel__text { padding-top: 8px; }
  .sg-titel__text > h1 { font-size: 2.25rem; margin-bottom: 6px; }
  .sg-lead { font-size: 1rem; line-height: 1.38; }
  .sg-titel__text > .sg-tat { margin-top: 10px; }
  .sg-titel__text > .sg-tat > .s2-knopf { min-height: 48px; }
  .sg-beleg { margin-top: 8px; }
  .sg-status { margin-top: 8px; }
}
@media (min-width: 720px) {
  .sg-titel__bild { aspect-ratio: auto; height: 620px; }
  .sg-titel__bild > img { object-position: 78% 0; }
  .sg-titel__bild::after { background: linear-gradient(90deg, rgba(11, 21, 32, .8) 0, rgba(11, 21, 32, .78) 340px, rgba(11, 21, 32, .66) 490px, rgba(11, 21, 32, .16) 580px, var(--sg-nacht-0) 660px), linear-gradient(0deg, #0b1520 2%, rgba(11, 21, 32, .55) 18%, var(--sg-nacht-0) 42%); }
  .sg-titel__text { min-height: 540px; padding-block: 40px 24px; display: grid; align-content: center; justify-items: start; }
  .sg-unter { font-size: 1.125rem; }
  .sg-lead { font-size: 1.1875rem; max-width: 24em; }
}
/* tablets: beside the two buttons the link would stand on the light part of the painting (3 : 1 in ru at 768 px), so it takes
   its own line on the dark side, as on phones */
@media (min-width: 720px) and (max-width: 959.98px) { .sg-titel__text > .sg-tat > .sg-link { flex-basis: 100%; margin-block: -4px -6px; } }
@media (min-width: 960px) {
  .sg-titel__bild { left: auto; width: min(100%, 1920px); height: min(42.42vw, 815px); }
  .sg-titel__bild > img { object-position: 50% 0; }
  /* dark only as far as the text reaches */
  .sg-titel__bild::after { --kante: calc(max(0px, (100% - var(--breite)) / 2) + var(--rand) + 570px); background: linear-gradient(90deg, rgba(11, 21, 32, .5) 0, rgba(11, 21, 32, .64) calc(var(--kante) - 420px), rgba(11, 21, 32, .64) calc(var(--kante) - 110px), rgba(11, 21, 32, .5) calc(var(--kante) - 20px), var(--sg-nacht-0) calc(var(--kante) + 110px)), linear-gradient(0deg, #0b1520 0, rgba(11, 21, 32, .78) 9%, var(--sg-nacht-0) 30%); }
  /* the first screen: 61 px header row and 45 px shelf row of the frame (css/rahmen.css) above it */
  .sg-titel__text { min-height: max(34vw, calc(100svh - 106px - 175px)); padding-block: 34px 16px; }
  .sg-unter { max-width: 28em; }
  .sg-lead { max-width: 28.5em; }
  .sg-titel__text > h1 { margin: 0 0 14px; }
  .sg-titel__text > .sg-tat { margin-top: 26px; gap: 10px 14px; }
  .sg-titel__text > .sg-tat > .sg-link { margin-left: 10px; }
  .sg-beleg { margin-top: 28px; }
  .sg-zahlen { gap: 4px 34px; }
  .sg-zahlen strong { font-size: 1.75rem; }
}

/* ---------- gates and ten lines ---------- */
/* clear margin inside each numeral picture, in heights: taken off, so the gap to the text is the same from I to V */
.sg-z-i { --zl: .0792; --zr: .0667; } .sg-z-ii { --zl: .075; --zr: .0667; } .sg-z-iii { --zl: .0667; --zr: .0417; } .sg-z-iv { --zl: .0375; --zr: .0333; } .sg-z-v { --zl: .0333; --zr: .0875; }
.sg-zehn { padding-block: 10px 8px; position: relative; }
.sg-zehn__h { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 700 1.125rem/1.3 var(--f-ui); letter-spacing: 0; color: var(--text-1); }
.sg-zehn__h > small { font-size: 1rem; font-weight: 400; color: var(--text-2); }
.sg-zehn__h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(207, 167, 94, .6), transparent); }
@media (max-width: 719.98px) { .sg-zehn__h > small { display: none; } }
.sg-zehn__ol, .sg-sys { list-style: none; margin: 0; padding: 0; }
.sg-zehn__ol { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; }
.sg-zeile { display: contents; }
.sg-tor { grid-row: 1; display: grid; justify-items: center; align-content: start; gap: 8px; min-width: 44px; min-height: 72px; padding-bottom: 8px; color: var(--text-1); text-decoration: none; border-radius: var(--r-klein); }
.sg-zif { --zh: 60px; position: relative; display: block; height: var(--zh); }
.sg-zif::before { content: ""; position: absolute; inset: -10px -12px; background: radial-gradient(closest-side, rgba(111, 214, 192, .16), rgba(111, 214, 192, .06) 52%, rgba(111, 214, 192, 0)); }
.sg-zif__bild { position: relative; height: var(--zh); width: auto; max-width: none; margin-inline: calc(var(--zl) * var(--zh) * -1) calc(var(--zr) * var(--zh) * -1); }
.sg-glut { position: absolute; z-index: 1; left: calc(50% + (var(--zr) - var(--zl)) / 2 * var(--zh)); top: 50%; height: 190%; width: auto; max-width: none; translate: -50% -50%; aspect-ratio: 160 / 190; overflow: visible; pointer-events: none; }
.sg-tor__wort { position: relative; z-index: 2; display: grid; }
.sg-tor__wort > b { font: 600 .9375rem/1.2 var(--f-ui); }
.sg-tor__wort > small { display: none; font-size: 1rem; line-height: 1.25; color: var(--bronze-hell); }
.sg-tor:hover b { color: var(--akzent-hell); }
.sg-block { grid-column: 1 / -1; contain: inline-size; position: relative; z-index: 2; padding: 8px 0 8px 34px; border-top: 1px solid var(--linie); }
.sg-block::before { content: ""; position: absolute; left: 0; top: 8px; width: 26px; height: 30px; background: var(--zif) 0 0 / auto 30px no-repeat; }
.sg-zeile--1 { --zif: url(/img/saga/ziffer-i-80.webp); } .sg-zeile--2 { --zif: url(/img/saga/ziffer-ii-80.webp); } .sg-zeile--3 { --zif: url(/img/saga/ziffer-iii-80.webp); } .sg-zeile--4 { --zif: url(/img/saga/ziffer-iv-80.webp); } .sg-zeile--5 { --zif: url(/img/saga/ziffer-v-80.webp); }
/* phones: the gates carry only the names, so what a name stands for is the first line of its two systems (from 960 px it stands in the gate) */
.sg-sinn { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-height: 30px; padding-top: 2px; line-height: 1.3; color: var(--bronze-hell); }
.sg-sys { display: grid; gap: 4px; }
.sg-sys > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 10px; align-items: center; min-height: 44px; line-height: 1.32; color: var(--text-2); }
.sg-sys .sg-medaille { --m: 40px; justify-self: center; }
.sg-sys b { display: block; }
.sg-stand { position: relative; z-index: 2; display: grid; gap: 2px 28px; padding-block: 12px 2px; border-top: 1px solid var(--linie); line-height: 1.4; color: var(--text-2); }
.sg-stand > .sg-reihe { margin: 0; }
.sg-stand > p:not(.sg-reihe) > a { color: inherit; padding-block: 0; }
@media (max-width: 339.98px) { .sg-tor__wort > b { font-size: .875rem; } }
@media (min-width: 560px) and (max-width: 959.98px) { .sg-sys { grid-template-columns: 1fr 1fr; gap: 4px 20px; } .sg-zif { --zh: 78px; } .sg-tor__wort > b { font-size: 1.125rem; } .sg-block { padding-left: 46px; } .sg-block::before { height: 36px; background-size: auto 36px; } .sg-sinn { min-height: 34px; } }
@media (min-width: 960px) {
  .sg-zehn { padding-block: 8px 16px; }
  .sg-zehn__h { margin-bottom: 20px; }
  .sg-zehn__ol { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 14px; justify-content: stretch; }
  .sg-zeile { display: grid; align-content: start; }
  .sg-tor { grid-row: auto; display: flex; align-items: center; justify-content: start; gap: 12px; min-height: 100px; padding: 0; }
  .sg-zif { --zh: 72px; flex: none; }
  .sg-tor__wort > b { font: 700 1.125rem/1.2 var(--f-titel); letter-spacing: .02em; }
  .sg-tor__wort > small { display: block; font-size: .9375rem; }
  .sg-block { contain: none; padding: 28px 0 18px; }
  .sg-block::before { content: none; }
  .sg-sinn { display: none; }
  .sg-sys { gap: 16px; }
  .sg-sys > li { grid-template-columns: 46px minmax(0, 1fr); gap: 0 10px; align-items: start; min-height: 0; line-height: 1.34; }
  .sg-sys .sg-medaille { --m: 44px; }
  .sg-stand { grid-template-columns: auto auto 1fr; align-items: center; padding-block: 8px 0; }
  .sg-stand > .sg-reihe { justify-content: end; }
}
@media (min-width: 1200px) {
  .sg-zehn__ol { gap: 0 20px; }
  .sg-tor { gap: 16px; }
  .sg-zif { --zh: 90px; }
  .sg-tor__wort > b { font-size: 1.4375rem; }
  .sg-tor__wort > small { font-size: 1rem; }
  .sg-sys > li { grid-template-columns: 54px minmax(0, 1fr); gap: 0 12px; padding-right: 6px; }
  .sg-sys .sg-medaille { --m: 50px; }
}

/* ---------- what brings you here ---------- */
.sg-frage { padding-block: 14px 30px; position: relative; }
.sg-frage__ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sg-weg { position: relative; z-index: 2; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 2px 14px; align-items: center; height: 100%; min-height: 76px; padding: 10px 14px; border: 1px solid var(--linie-stark); border-radius: var(--r-karte); background: var(--karte); color: var(--text-2); text-decoration: none; line-height: 1.34; }
.sg-weg > .sg-medaille { --m: 52px; }
.sg-weg b { display: block; font-size: 1.0625rem; line-height: 1.25; }
.sg-weg:hover { border-color: var(--akzent); background: var(--karte-2); color: var(--text-2); }
@media (min-width: 640px) { .sg-frage__ul { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .sg-frage__ul { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; } .sg-frage__ul .sg-weg { grid-template-columns: 46px minmax(0, 1fr); padding: 12px 10px; gap: 2px 10px; } .sg-frage__ul .sg-medaille { --m: 46px; } .sg-frage__ul .sg-weg b { font-size: 1rem; } }

/* ---------- embers ---------- */
.sg-f { fill: var(--akzent); }
.sg-f > .sg-b { fill: var(--bronze-hell); }
.sg-f > .sg-d { fill: var(--text-3); opacity: .55; }
.sg-funken .sg-f > circle { opacity: .22; }
.sg-funken .sg-f > .sg-d { opacity: .18; }
.sg-flug { position: absolute; left: 0; top: 0; z-index: 1; max-width: none; pointer-events: none; }

/* ---------- chapter bar ---------- */
.sg-leiste { position: sticky; top: var(--sg-kopf); z-index: 20; background: #0b1520; border-block: 1px solid var(--linie); }
.sg-leiste__in { display: flex; justify-content: space-between; align-items: stretch; min-height: 60px; gap: 2px; padding-inline: max(8px, calc(var(--rand) - 6px)); }
.sg-leiste__in > a { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 44px; min-height: 44px; padding: 5px 3px; color: var(--text-2); text-decoration: none; border-radius: var(--r-klein); }
.sg-leiste__zif { --zh: 26px; height: var(--zh); width: auto; max-width: none; margin-inline: calc(var(--zl) * var(--zh) * -1) calc(var(--zr) * var(--zh) * -1); opacity: .85; }
.sg-leiste__wort > b { display: block; font: 600 .875rem/1.15 var(--f-ui); color: inherit; }
.sg-leiste__wort > small { display: none; }
.sg-leiste__in > a:hover, .sg-leiste__in > a[aria-current] { color: var(--text-1); }
.sg-leiste__in > a[aria-current] > .sg-leiste__zif { opacity: 1; }
.sg-leiste__in > a[aria-current]::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 1px; height: 2px; border-radius: 2px; background: var(--bronze); }
.sg-leiste__raus > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* phones: the arrow alone, the words stay for screen readers */
.sg-leiste__raus::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--s2-pfeil-u) center / 18px no-repeat; mask: var(--s2-pfeil-u) center / 18px no-repeat; }
.sg-leiste__lauf { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--akzent), var(--bronze)); transform-origin: 0 50%; opacity: 0; }
@media (min-width: 720px) {
  .sg-leiste__in { padding-inline: var(--rand); }
  .sg-leiste__in > a { grid-template-columns: auto auto; gap: 10px; padding: 6px 8px; align-items: center; }
  .sg-leiste__zif { --zh: 38px; }
  .sg-leiste__wort > b { font-size: 1rem; }
}
@media (min-width: 1100px) {
  .sg-leiste__in > a { justify-content: start; margin-left: -8px; }
  .sg-leiste__wort > small { display: block; font-size: .875rem; line-height: 1.15; color: var(--text-2); white-space: nowrap; }
  .sg-leiste__in > a[aria-current] small { color: var(--bronze-hell); }
  .sg-leiste__in > .sg-leiste__raus { margin: 0 -8px 0 0; font: 600 .9375rem/1 var(--f-ui); }
  .sg-leiste__raus > span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}

/* ---------- chapters ---------- */
.sg-kap { position: relative; padding-block: 0 34px; scroll-margin-top: 46px; }
.sg-kap__bild { position: relative; z-index: -1; display: block; height: 252px; overflow: hidden; }
.sg-kap__bild > img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.sg-kap__bild::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #0b1520 2%, rgba(11, 21, 32, .84) 22%, rgba(11, 21, 32, .6) 33%, var(--sg-nacht-0) 56%), linear-gradient(180deg, #0b1520, var(--sg-nacht-0) 16%); }
.sg-kap__gitter { margin-top: -66px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.sg-kap__text, .sg-kap__sys, .sg-fig > * { position: relative; z-index: 2; }
.sg-kap__kopf { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: end; }
.sg-kap__zif { --zh: 104px; height: var(--zh); width: auto; max-width: none; margin-inline: calc(var(--zl) * var(--zh) * -1) calc(var(--zr) * var(--zh) * -1); filter: drop-shadow(0 4px 14px #0b1520); }
.sg-kap__nr { font: 700 1rem/1.2 var(--f-ui); color: var(--bronze-hell); letter-spacing: .02em; text-shadow: 0 1px 8px #0b1520; }
.sg-kap__nr > .sg-bildart { margin-left: 6px; }
.sg-kap h2 { font-size: clamp(2.5rem, 10.5vw, 4.5rem); line-height: 1.02; letter-spacing: .02em; padding-bottom: .16em; text-shadow: 0 2px 18px #0b1520; }
.sg-kap__sinn { font-size: var(--fs-lead); line-height: 1.3; color: var(--bronze-hell); text-shadow: 0 1px 8px #0b1520; }
.sg-kap__nr, .sg-kap__sinn, .sg-kap h2 { width: fit-content; max-width: 100%; }
.sg-kap__erz { margin-top: 12px; font-size: 1.0625rem; line-height: 1.5; color: var(--text-1); max-width: 36em; }
.sg-fig { margin: 0; container-type: inline-size; padding: 14px 14px 12px; border: 1px solid var(--linie-stark); border-radius: var(--r-karte); background: rgba(13, 24, 34, .9); }
.sg-fig__titel { font: 700 1.125rem/1.3 var(--f-ui); color: var(--text-1); text-wrap: balance; }
.sg-fig__rahmen { display: grid; margin: 8px -4px 0; }
.sg-fig__rahmen > * { grid-area: 1 / 1; width: 100%; height: auto; }
.sg-fig__karte { aspect-ratio: 560 / 318; }
.sg-fig__bild { overflow: visible; display: block; }
.sg-fig__bild text { font: 600 16.5px/1 var(--f-ui); color: var(--text-2); fill: currentColor; font-variant-numeric: lining-nums; }
.sg-fig__bild .sg-n { font-size: 24px; font-weight: 700; color: var(--text-1); }
.sg-fig__bild .sg-m { text-anchor: middle; }
.sg-fig__bild .sg-r { text-anchor: end; }
.sg-achse > path, .sg-saeule { stroke: var(--linie-stark); stroke-width: 1; }
.sg-kurve { fill: none; stroke: var(--akzent); stroke-width: 2; stroke-linejoin: round; opacity: .55; }
.sg-lot { stroke: var(--bronze); stroke-width: 1.5; fill: none; }
.sg-lot__ring { fill: none; stroke: var(--bronze-hell); stroke-width: 2; }
.sg-grenze { stroke: var(--bronze); stroke-width: 1.5; }
.sg-boden { stroke: var(--sg-fluss); stroke-width: 1.5; fill: none; }
.sg-ring { fill: none; stroke: #6a5127; stroke-width: 1.5; }
@container (max-width: 520px) { .sg-fig__bild text { font-size: 19px; } .sg-fig__bild .sg-n { font-size: 27px; } }
@container (max-width: 440px) { .sg-fig__bild text { font-size: 22px; } .sg-fig__bild .sg-n { font-size: 30px; } .sg-fig__bild .sg-u { transform: translateY(25px); } }
@container (max-width: 360px) { .sg-fig__bild text { font-size: 24px; } }
@container (max-width: 320px) { .sg-fig__bild text { font-size: 30px; } .sg-fig__bild .sg-u { transform: translateY(29px); } }
.sg-fig > figcaption { display: grid; gap: 4px; margin-top: 10px; }
.sg-legende { font-size: .9375rem; line-height: 1.4; color: var(--text-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; }
.sg-fig .sg-quelle { color: var(--text-3); }
.sg-pkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); margin: 0 6px 1px 0; }
.sg-pkt--b { background: var(--bronze-hell); width: 11px; height: 11px; margin-bottom: 0; vertical-align: -1px; }
.sg-feld { display: inline-block; width: 16px; height: 12px; border: 1px solid var(--sg-fluss); background: rgba(160, 143, 245, .3); margin: 0 6px 0 0; vertical-align: -1px; }
.sg-regler { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 12px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--linie); }
.sg-regler > label { font-weight: 700; color: var(--text-1); display: inline-flex; align-items: center; min-height: 44px; }
.sg-regler > input { width: 100%; min-height: 44px; margin: 0; padding: 0; accent-color: #cfa75e; cursor: pointer; background: none; border: 0; }
.sg-regler > output { grid-column: 1 / -1; color: var(--text-1); min-height: 1.5em; font-variant-numeric: lining-nums tabular-nums; }
.sg-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 14px; }
.sg-tab[open] { flex-basis: 100%; }
.sg-tab > summary { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 4px; font-weight: 600; font-size: .9375rem; color: var(--akzent-hell); list-style: none; cursor: pointer; border-radius: var(--r-klein); }
.sg-tab > summary::-webkit-details-marker { display: none; }
.sg-tab > summary::after { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--s2-pfeil-u) center / 16px no-repeat; mask: var(--s2-pfeil-u) center / 16px no-repeat; }
.sg-tab[open] > summary::after { transform: rotate(180deg); }
.sg-tab > div { display: grid; gap: 6px; padding: 0 0 8px; }
.sg-tab table { width: 100%; font-size: .9375rem; border-collapse: collapse; }
.sg-tab :is(th, td) { padding: 5px 6px; text-align: right; border-top: 1px solid var(--linie); font-weight: 400; font-variant-numeric: lining-nums tabular-nums; }
.sg-tab thead th { color: var(--text-2); border-top: 0; vertical-align: bottom; font-weight: 600; }
.sg-tab tbody th { color: var(--text-1); text-align: left; }
.sg-tab thead th:first-child { text-align: left; }
.sg-kap__sys { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linie-stark); border-radius: var(--r-karte); background: rgba(13, 24, 34, .9); overflow: hidden; }
.sg-kap__sys > li + li { border-top: 1px solid var(--linie); }
.sg-kap__sys > li > a { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; padding: 8px 14px; text-decoration: none; color: var(--text-2); line-height: 1.3; }
.sg-kap__sys > li > a::after { content: ""; width: 18px; height: 18px; background: var(--akzent); -webkit-mask: var(--s2-pfeil-r) center / 18px no-repeat; mask: var(--s2-pfeil-r) center / 18px no-repeat; }
.sg-kap__txt { display: grid; }
.sg-kap__sys > li > a:hover { background: var(--karte-hover); color: var(--text-2); }
.sg-kap__sys > li > a:focus-visible { outline-offset: -3px; }
@media (min-width: 720px) and (max-width: 1023.98px) {
  .sg-kap__bild { height: 400px; }
  .sg-kap__bild > img { object-position: 100% 40%; }
  .sg-kap__gitter { margin-top: -120px; }
  .sg-fig__rahmen { max-width: 600px; margin-inline: auto; }
  .sg-kap__zif { --zh: 128px; }
}
@media (min-width: 1024px) {
  .sg-regler { grid-template-columns: auto minmax(110px, 1fr) auto; }
  .sg-regler > output { grid-column: auto; min-height: 0; }
  .sg-kap { min-height: calc(100svh - var(--sg-kopf) - 62px); display: grid; align-items: center; padding-block: 20px 22px; }
  .sg-kap__bild { position: absolute; inset: 0 0 64px 0; height: auto; }
  .sg-kap__bild > img { object-position: 100% 45%; }
  .sg-kap--2 > .sg-kap__bild > img { object-position: 88% 45%; }
  .sg-kap--3 > .sg-kap__bild > img { object-position: 70% 45%; }
  .sg-kap__bild::after { --kante: calc(max(var(--rand), (100% - var(--breite)) / 2) + 568px); background: linear-gradient(90deg, #0b1520 0, #0b1520 calc(var(--kante) - 300px), rgba(11, 21, 32, .9) calc(var(--kante) - 120px), rgba(11, 21, 32, .66) var(--kante), rgba(11, 21, 32, .16) calc(var(--kante) + 150px), var(--sg-nacht-0) calc(var(--kante) + 290px)), linear-gradient(0deg, #0b1520 0, rgba(11, 21, 32, .5) 16%, var(--sg-nacht-0) 34%), linear-gradient(180deg, #0b1520 0, var(--sg-nacht-0) 18%); }
  /* the card ends where the mockup's did (its content was 1160 px wide, .wrap here is 1160 px with the margins): it may not
     cover the heartstone in chapter I or the bull in chapter III; --kante above follows the same edge */
  .sg-kap__gitter { margin-top: 0; grid-template-columns: minmax(0, calc(568px - clamp(0px, (100vw - var(--breite)) / 2, var(--rand)))) minmax(0, 1fr); gap: 12px 48px; }
  .sg-kap__text { grid-area: 1 / 1; }
  .sg-fig { grid-area: 2 / 1; padding: 14px 18px; }
  .sg-fig__rahmen { max-width: 452px; margin-inline: auto; }
  .sg-fig__bild text { font-size: 17.6px; }
  .sg-fig__bild .sg-n { font-size: 25px; }
  .sg-kap__sys { grid-area: 3 / 1 / 4 / 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sg-kap__sys > li + li { border-top: 0; border-left: 1px solid var(--linie); }
  .sg-kap__sys > li > a { height: 100%; }
  .sg-kap__zif { --zh: 122px; }
  .sg-kap__kopf { gap: 22px; align-items: center; }
  .sg-kap h2 { font-size: clamp(3.5rem, 5.2vw, 4.75rem); }
}
@media (min-width: 1760px) { .sg-kap__bild { max-width: 2100px; margin-left: auto; } }

/* ---------- call to action ---------- */
.sg-ende { border-top: 1px solid var(--linie); background: radial-gradient(60% 120% at 50% 0%, rgba(207, 167, 94, .16), transparent 70%); scroll-margin-top: 46px; }
.sg-ende__in { position: relative; z-index: 2; padding-block: 48px; display: grid; justify-items: center; text-align: center; gap: 18px; }
.sg-ende__in > h2 { font-size: var(--fs-h1); }
.sg-ende__bild { position: relative; width: min(100%, 560px); height: auto; overflow: visible; }
.sg-ende__l { font-size: var(--fs-lead); color: var(--bronze-hell); }
.sg-schritte { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px 28px; text-align: left; counter-reset: s; }
.sg-schritte > li { counter-increment: s; display: flex; gap: 10px; align-items: center; }
.sg-schritte > li::before { content: counter(s); flex: none; width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--bronze); color: var(--bronze-hell); font-weight: 700; line-height: 1; }
.sg-ende__in > .sg-tat { justify-content: center; }
@media (min-width: 720px) { .sg-schritte { grid-auto-flow: column; } .sg-ende__in { padding-block: 64px; } }

/* ---------- fit, facts ---------- */
.sg-passt, .sg-tatsachen, .sg-paarung { border-top: 0; }
.sg-tatsachen, .sg-paarung { padding-top: 0; }
.sg-antwort { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linie); border-radius: var(--r-karte); background: var(--karte); }
.sg-antwort > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 10px 16px 12px; }
.sg-antwort > li + li { border-top: 1px solid var(--linie); }
.sg-antwort__f { font-weight: 700; color: var(--text-1); }
.sg-antwort__n { grid-column: 1 / -1; }
.sg-antwort__n > a { font-weight: 600; }
.sg-weg--breit { margin-top: 12px; height: auto; }
.sg-weg--breit > span > b { margin-right: 8px; display: inline; }
.sg-weg--breit .sg-ampel { vertical-align: baseline; }
.sg-weg__n { display: block; }
.sg-weg--breit > .sg-link { grid-column: 2; text-decoration: underline; min-height: 32px; }
@media (min-width: 720px) {
  .sg-antwort > li { grid-template-columns: minmax(0, 15rem) minmax(0, 9.5rem) minmax(0, 1fr); gap: 2px 20px; align-items: baseline; padding: 14px 20px; }
  .sg-antwort__n { grid-column: auto; }
  .sg-weg--breit { grid-template-columns: 52px minmax(0, 1fr) auto; padding: 14px 20px; }
  .sg-weg--breit > .sg-link { grid-column: 3; }
}
.sg-fakten { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: var(--sg-luecke); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sg-fakten > li { padding: 16px; border: 1px solid var(--linie); border-radius: var(--r-karte); background: var(--karte); line-height: 1.34; }
.sg-fakten > li:last-child { grid-column: 1 / -1; }
.sg-fakten strong { display: block; font: 800 1.75rem/1.2 var(--f-ui); font-variant-numeric: lining-nums; }
@media (min-width: 960px) { .sg-fakten { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .sg-fakten > li:last-child { grid-column: auto; } }
.sg-sprachen { display: grid; gap: 8px; margin-top: 18px; }
.sg-sprachen > h3 { font: 700 1.125rem/1.25 var(--f-ui); }
.sg-sprachen__l { display: flex; flex-wrap: wrap; gap: 2px 18px; color: var(--text-1); font-weight: 600; }
:root:not(:lang(ru)) .sg-sprachen__l > :lang(ru) { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }   /* one word is no reason to load the Cyrillic file */

/* ---------- news, admins, the sections from before ---------- */
.sg-paar { display: grid; gap: var(--sg-luecke); grid-template-columns: minmax(0, 1fr); }
.sg-karte > h2 { font-size: var(--fs-h2); }
.sg-karte > .sg-reihe { margin: 0; }
.sg-nummer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0; }
.sg-nummer > code { font: 700 1.375rem/1 var(--f-mono); color: var(--text-1); padding: 13px 18px; background: var(--slot); border: 1px solid var(--linie-feld); border-radius: var(--r-knopf); user-select: all; }
@media (min-width: 960px) { .sg-paar { grid-template-columns: 1.15fr 1fr; } .sg-karte { padding: 28px; } }
.sg-ruhig__in { display: grid; gap: var(--luecke); grid-template-columns: minmax(0, 1fr); }
.sg-ruhig__in > .s2-kopfzeile { margin-bottom: 4px; }
.sg-ruhig__h { margin-top: 20px; font: 700 1.375rem/1.25 var(--f-ui); }
.sg-ruhig__in > .raute { max-width: 68ch; }
.sg-ruhig__in .s2-zeile > img[src*="/img/saga/"] { width: 48px; height: 48px; border-radius: 50%; background: none; object-fit: contain; }

/* ---------- phone: the same content in less height ---------- */
@media (max-width: 719.98px) {
  .sg-frage { padding-block: 10px 18px; }
  .sg-frage__ul { gap: 0; border: 1px solid var(--linie-stark); border-radius: var(--r-karte); background: var(--karte); overflow: hidden; }
  .sg-frage__ul > li + li { border-top: 1px solid var(--linie); }
  .sg-frage__ul .sg-weg { grid-template-columns: 42px minmax(0, 1fr); min-height: 58px; padding: 7px 14px; border: 0; border-radius: 0; background: none; line-height: 1.28; }
  .sg-frage__ul .sg-medaille { --m: 42px; }
  .sg-frage__ul .sg-weg:hover { background: var(--karte-2); }
  .sg-frage__ul .sg-weg:focus-visible { outline-offset: -3px; }
  .sg-kap { padding-bottom: 14px; }
  .sg-kap__bild { height: 216px; }
  .sg-kap__bild::after { background: linear-gradient(0deg, #0b1520 2%, rgba(11, 21, 32, .86) 24%, rgba(11, 21, 32, .72) 39%, var(--sg-nacht-0) 62%), linear-gradient(180deg, #0b1520, var(--sg-nacht-0) 16%); }
  .sg-kap__gitter { margin-top: -82px; gap: 10px; }
  .sg-kap__zif { --zh: 90px; }
  .sg-kap h2 { font-size: clamp(2.25rem, 9.8vw, 3.5rem); padding-bottom: .08em; }
  .sg-kap__sinn { font-size: 1.0625rem; }
  .sg-kap__erz { margin-top: 9px; font-size: 1rem; line-height: 1.43; }
  .sg-fig { padding: 11px 12px 9px; }
  .sg-fig__titel { line-height: 1.25; }
  .sg-fig__rahmen { margin: 6px -2px 0; }
  .sg-fig > figcaption { margin-top: 6px; gap: 2px; }
  .sg-legende { line-height: 1.34; }
  .sg-fig .sg-quelle { font-size: .875rem; line-height: 1.34; }
  .sg-kap__sys > li > a { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; min-height: 52px; padding: 6px 12px; line-height: 1.26; }
  .sg-kap__sys .sg-medaille { --m: 38px; }
  .sg-kap__txt > span { font-size: .9375rem; }
  .sg-ende__in { padding-block: 24px 26px; gap: 12px; }
  .sg-ende__in > .sg-tat { gap: 8px; }
  .sg-ende__in > .sg-tat > .s2-knopf { padding-inline: 12px; font-size: 1rem; }
  .sg-antwort > li { padding: 6px 14px 7px; gap: 0 12px; }
  .sg-antwort__n { font-size: .9375rem; line-height: 1.4; }
  .sg-weg--breit { padding: 9px 14px; line-height: 1.3; margin-top: 10px; }
  .sg-fakten { gap: 8px; }
  .sg-fakten > li { padding: 9px 13px; line-height: 1.28; }
  .sg-fakten strong { font-size: 1.5rem; }
  .sg-nummer > code { font-size: 1.1875rem; padding: 12px; }
}

/* ---------- aurora over the painted sky (js/saga-nl.js; stays away without script) ---------- */
.sg-nl { position: absolute; inset: 0 0 auto 0; z-index: -1; width: 100%; max-width: none; height: 210px; opacity: 0; pointer-events: none; mix-blend-mode: screen; -webkit-mask-image: linear-gradient(#000 0 40%, transparent 92%), linear-gradient(90deg, transparent 22%, #000 58%); mask-image: linear-gradient(#000 0 40%, transparent 92%), linear-gradient(90deg, transparent 22%, #000 58%); -webkit-mask-composite: source-in; mask-composite: intersect; }
.sg-nl.sg-da { opacity: .34; }
@media (max-width: 719.98px) { .sg-nl { display: none; } }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .sg-nl { transition: opacity .8s ease-out; }
  .sg-weg, .sg-kap__sys > li > a, .sg-tor b, .sg-leiste__zif { transition: background-color var(--sg-kurz), border-color var(--sg-kurz), color var(--sg-kurz), opacity var(--sg-kurz); }
  .sg-tab > summary::after { transition: transform var(--sg-kurz) ease-out; }
  /* one pass of ice light over a chapter name */
  .sg-glanz.sg-da { background: linear-gradient(100deg, var(--text-1) 42%, var(--akzent-hell) 48%, #fff 50%, var(--bronze-hell) 54%, var(--text-1) 60%) 100% 0 / 260% 100% no-repeat; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; animation: sg-glanz 1.4s ease-out both; }
  @supports (animation-timeline: view()) {
    @media screen {
      /* the road under the chapter bar grows with the saga */
      .sg-saga { view-timeline: --sg-saga block; }
      .sg-leiste__lauf { animation: sg-lauf linear both; animation-timeline: --sg-saga; animation-range: contain 0% contain 100%; }
      /* the curve draws itself */
      .sg-kurve { stroke-dasharray: 1; animation: sg-zeichnen linear both; animation-timeline: view(); animation-range: entry 20% cover 42%; }
      /* each picture clears and settles while its chapter comes in */
      .sg-kap__bild > img { animation: sg-klar linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
      .sg-nl.sg-da { animation: sg-drift linear both; animation-timeline: scroll(root block); animation-range: 0 100vh; }
    }
  }
}
@keyframes sg-glanz { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes sg-lauf { from { transform: scaleX(0); opacity: .8; } to { transform: scaleX(1); opacity: .8; } }
@keyframes sg-zeichnen { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes sg-klar { from { opacity: .2; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes sg-drift { to { transform: translate3d(0, 34px, 0) scale(1.06); opacity: .12; } }

@media (forced-colors: active) { .sg-f, .sg-f > .sg-b { fill: CanvasText; } .sg-nl, .sg-flug { display: none; } .sg-funken .sg-f > circle { opacity: 1; } }
@media (prefers-contrast: more) { .sg-nl { display: none; } }
@media print { .sg-nl, .sg-flug, .sg-leiste { display: none; } .sg-funken .sg-f > circle { opacity: 1; } }
