/* Santo City Regelwerk – Design
   Anthrazit / Graphit / Silber / Weiß. Keine externen Schriften oder Ressourcen. */
:root {
  --bg: #0d0f12;
  --bg-2: #12151a;
  --panel: #161a20;
  --panel-2: #1b2027;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #e8ebf0;
  --muted: #98a1ae;
  --silver: #c5ccd6;
  --white: #fff;
  --amber: #d9b873;
  --amber-bg: rgba(217, 184, 115, .10);
  --amber-line: rgba(217, 184, 115, .34);
  --green: #62c796;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --header-h: 68px;
  --font: "Segoe UI Variable Text", "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 18px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 1rem/1.7 var(--font); font-feature-settings: "kern", "liga";
  overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 480px at 78% -8%, rgba(190, 200, 215, .10), transparent 70%),
    radial-gradient(700px 420px at 4% 30%, rgba(120, 132, 150, .07), transparent 70%);
}
img, svg { max-width: 100%; }
a { color: var(--white); text-underline-offset: .2em; text-decoration-color: rgba(255, 255, 255, .35); }
a:hover { text-decoration-color: var(--white); }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(255, 255, 255, .22); }
.shell { width: min(1240px, 100% - 40px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--white); color: #000; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgba(13, 15, 18, .78); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border-bottom: 1px solid var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font: 700 .95rem/1 var(--font-display); letter-spacing: .06em; color: #0d0f12; background: linear-gradient(145deg, #fff, #aeb6c2); box-shadow: 0 6px 18px rgba(0, 0, 0, .5), inset 0 -2px 0 rgba(0, 0, 0, .12); }
.brand-text { display: grid; line-height: 1.1; }
.brand-text strong { font: 700 1rem/1.1 var(--font-display); letter-spacing: .16em; }
.brand-text small { margin-top: 4px; color: var(--muted); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { padding: 9px 15px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; transition: color .2s, background .2s; }
.main-nav a:hover { color: var(--white); background: rgba(255, 255, 255, .06); }
.main-nav a[aria-current="page"] { color: var(--white); background: rgba(255, 255, 255, .10); box-shadow: inset 0 0 0 1px var(--line); }
.draft-badge { padding: 5px 11px; border: 1px solid var(--amber-line); border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.menu-button { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); color: var(--white); cursor: pointer; }
.menu-button span, .menu-button span::before, .menu-button span::after { display: block; width: 18px; height: 2px; margin: auto; background: currentColor; border-radius: 2px; transition: transform .2s; }
.menu-button span { position: relative; }
.menu-button span::before, .menu-button span::after { content: ""; position: absolute; left: 0; }
.menu-button span::before { top: -6px; }
.menu-button span::after { top: 6px; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: 12px; font: 600 .95rem/1 var(--font); letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: linear-gradient(180deg, #fff, #cfd5de); color: #0d0f12; box-shadow: 0 10px 28px rgba(0, 0, 0, .4); }
.button-primary:hover { box-shadow: 0 14px 34px rgba(0, 0, 0, .5); }
.button-secondary { background: rgba(255, 255, 255, .05); border-color: var(--line-strong); color: var(--white); }
.button-secondary:hover { background: rgba(255, 255, 255, .10); }
.button-discord { background: #5865f2; color: #fff; box-shadow: 0 10px 28px rgba(88, 101, 242, .28); }
.button-discord:hover { background: #4752c4; }
.button[disabled] { opacity: .55; cursor: wait; transform: none; }
.small-button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255, 255, 255, .04); color: var(--text); font: 500 .85rem/1 var(--font); cursor: pointer; text-decoration: none; transition: background .2s; }
.small-button:hover { background: rgba(255, 255, 255, .10); }

/* Typography helpers */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--silver); font-size: .74rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--silver); opacity: .6; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.015em; line-height: 1.15; margin: 0; text-wrap: balance; }
.lead { color: var(--silver); font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.65; max-width: 62ch; text-wrap: pretty; }

/* Hero */
.hero { position: relative; padding: clamp(72px, 12vw, 150px) 0 clamp(64px, 10vw, 120px); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 20%, transparent 75%); opacity: .6; }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { margin: 22px 0 22px; font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 750; line-height: .98; letter-spacing: -.035em; }
.hero h1 span { background: linear-gradient(180deg, #fff 30%, #7e8795); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-card { position: relative; padding: 28px; border: 1px solid var(--line-strong); border-radius: 22px; background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero-card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, .25); }
.stat strong { display: block; font: 700 2rem/1 var(--font-display); letter-spacing: -.02em; }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: .82rem; }
.hero-note { margin: 18px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head h2 { margin: 14px 0 16px; font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 700; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--panel-2), var(--panel)); transition: transform .25s, border-color .25s, box-shadow .25s; }
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card-kicker { margin-bottom: 18px; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.card h3 { margin-bottom: 12px; font-size: 1.35rem; }
.card p { margin: 0 0 22px; color: var(--muted); }
.card-link { margin-top: auto; color: var(--white); font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.card-link::after { content: "→"; transition: transform .2s; }
.card:hover .card-link::after { transform: translateX(4px); }
.card-link::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 14px; color: var(--silver); font: 700 .8rem/1 var(--font-display); letter-spacing: .2em; opacity: .7; }
.steps h3 { font-size: 1.15rem; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); font-size: .96rem; }

/* Discord */
.discord-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 48px; align-items: center; }
.discord-panel { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--panel); box-shadow: var(--shadow); }
.discord-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #1c2128, #171b21); }
.discord-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #5865f2; flex: none; }
.discord-logo svg { width: 26px; height: 26px; fill: #fff; }
.discord-title { display: grid; min-width: 0; }
.discord-title strong { font-size: 1.05rem; }
.discord-title small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discord-online { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; background: rgba(98, 199, 150, .12); color: var(--green); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.discord-online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(98, 199, 150, .2); }
.discord-body { padding: 22px; min-height: 150px; }
.discord-body p { margin: 0 0 16px; color: var(--muted); font-size: .92rem; }
.discord-members { display: grid; gap: 4px; margin: 0 0 18px; padding: 0; list-style: none; max-height: 252px; overflow: auto; }
.discord-members li { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px; font-size: .92rem; }
.discord-members li:hover { background: rgba(255, 255, 255, .04); }
.discord-members img { width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); flex: none; }
.discord-members span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discord-state { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .2); }
.discord-state.error { border-color: var(--amber-line); background: var(--amber-bg); color: var(--text); }
.discord-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 22px 22px; }
.discord-actions .button { flex: 1 1 180px; min-height: 44px; }

/* Documents */
.doc-hero { padding: clamp(44px, 7vw, 84px) 0 clamp(32px, 5vw, 52px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent); }
.doc-hero h1 { margin: 16px 0 14px; font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 750; letter-spacing: -.03em; }
.doc-hero p { margin: 0; color: var(--muted); max-width: 64ch; font-size: 1.05rem; }
.crumbs { margin: 0 0 4px; color: var(--muted); font-size: .84rem; }
.crumbs a { color: var(--silver); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.doc-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 48px; padding: 36px 0 90px; align-items: start; }
.sidebar { position: sticky; top: calc(var(--header-h) + 18px); max-height: calc(100vh - var(--header-h) - 36px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: rgba(22, 26, 32, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; }
.sidebar-top { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.search-field { position: relative; display: block; }
.search-field svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-input { width: 100%; height: 46px; padding: 0 74px 0 42px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(0, 0, 0, .28); color: var(--white); font: 400 .95rem var(--font); }
.search-input::placeholder { color: var(--muted); }
.search-input:focus-visible { outline-offset: 0; border-color: transparent; }
.search-field kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); padding: 3px 7px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font: 600 .7rem var(--font); pointer-events: none; }
.search-clear { display: none; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.search-clear:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.has-query .search-clear { display: block; }
.has-query kbd { display: none; }
.sidebar-toggle { display: none; width: 100%; margin-top: 10px; justify-content: space-between; }
.toc { overflow: auto; padding: 8px 8px 12px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #3a4250 transparent; }
.toc-title { margin: 8px 10px; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc-chapter { margin-bottom: 2px; }
.toc-row { display: flex; align-items: stretch; border-radius: 10px; }
.toc-row:hover { background: rgba(255, 255, 255, .05); }
.toc-row > a { flex: 1; min-width: 0; padding: 9px 10px; color: var(--silver); font-size: .9rem; font-weight: 600; line-height: 1.35; text-decoration: none; }
.toc-row > a .num { display: inline-block; min-width: 2.2em; color: var(--muted); font-weight: 700; }
.toc-chapter.is-active > .toc-row { background: rgba(255, 255, 255, .08); }
.toc-chapter.is-active > .toc-row > a { color: var(--white); }
.toc-expand { width: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.toc-expand:hover { color: var(--white); }
.toc-expand svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.toc-expand[aria-expanded="true"] svg { transform: rotate(180deg); }
.toc-rules { display: none; margin: 2px 0 8px 14px; padding-left: 8px; border-left: 1px solid var(--line); }
.toc-chapter.is-open > .toc-rules { display: block; }
.toc-rules a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--muted); font-size: .84rem; line-height: 1.35; text-decoration: none; }
.toc-rules a:hover { color: var(--white); background: rgba(255, 255, 255, .05); }
.toc-rules a.sub { padding-left: 22px; font-size: .8rem; }
.toc-rules a[aria-current="location"] { color: var(--white); background: rgba(255, 255, 255, .09); }
.toc-rules a .num { display: inline-block; min-width: 3em; opacity: .75; font-variant-numeric: tabular-nums; }

.doc-main { min-width: 0; max-width: 860px; }
.notice { display: flex; gap: 14px; padding: 16px 18px; margin-bottom: 18px; border: 1px solid var(--amber-line); border-radius: 14px; background: var(--amber-bg); color: #ece0c4; font-size: .93rem; line-height: 1.55; }
.notice svg { flex: none; width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: var(--amber); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notice strong { color: var(--amber); }
.open-points { margin-bottom: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.open-points summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none; }
.open-points summary::-webkit-details-marker { display: none; }
.open-points summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .2s; }
.open-points[open] summary::after { transform: rotate(180deg); }
.open-points .count { padding: 2px 9px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: .8rem; }
.open-points ul { margin: 0; padding: 0 18px 16px; list-style: none; display: grid; gap: 4px; max-height: 360px; overflow: auto; }
.open-points li a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--silver); font-size: .9rem; text-decoration: none; }
.open-points li a:hover { background: rgba(255, 255, 255, .05); color: var(--white); }
.open-points li a b { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 6px; }
.open-points li a small { display: block; color: var(--muted); margin-top: 2px; }

.results-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.results-head h2 { font-size: 1.35rem; }
.results-count { color: var(--muted); font-size: .9rem; }
.result { display: block; padding: 18px 20px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); text-decoration: none; color: var(--text); transition: border-color .2s, background .2s; }
.result:hover, .result:focus-visible { border-color: var(--line-strong); background: var(--panel-2); }
.result-path { margin-bottom: 6px; color: var(--muted); font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.result h3 { margin-bottom: 6px; font-size: 1.08rem; }
.result p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.no-results { padding: 32px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); }
mark { padding: .05em .22em; border-radius: 4px; background: rgba(255, 224, 140, .88); color: #14161a; }
.marks-chip { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; }

.chapter { padding-top: 12px; margin-bottom: 64px; }
.chapter-head { padding-bottom: 20px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.chapter-kicker { margin-bottom: 8px; color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.chapter h2 { font-size: clamp(1.7rem, 3.6vw, 2.35rem); font-weight: 720; }
.chapter-intro { margin: 14px 0 0; color: var(--silver); font-size: 1.05rem; line-height: 1.65; max-width: 66ch; }
.rule { position: relative; padding: 22px 0 22px 0; border-bottom: 1px solid var(--line); }
.rule.sub { margin-left: 22px; padding-left: 22px; border-left: 2px solid var(--line-strong); border-bottom: 0; padding-top: 14px; }
.rule:target > .rule-head h3 { background: linear-gradient(90deg, rgba(255, 255, 255, .14), transparent); box-shadow: -14px 0 0 rgba(255, 255, 255, .14); }
.rule-head { display: flex; align-items: flex-start; gap: 10px; }
.rule h3 { flex: 1; min-width: 0; font-size: 1.14rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; border-radius: 6px; }
.rule.sub h3 { font-size: 1.02rem; }
.rule h3 .num { margin-right: .15em; color: var(--silver); font-variant-numeric: tabular-nums; font-weight: 700; }
.rule p { margin: 10px 0 0; color: #cfd5de; max-width: 68ch; text-wrap: pretty; }
.rule ul, .rule ol { margin: 12px 0 0; padding-left: 1.3em; color: #cfd5de; max-width: 68ch; }
.rule li { margin: 6px 0; padding-left: .2em; }
.rule ol { list-style: none; counter-reset: abs; padding-left: 0; }
.rule ol li { counter-increment: abs; position: relative; padding-left: 2.6em; }
.rule ol li::before { content: "(" counter(abs) ")"; position: absolute; left: 0; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.link-button { flex: none; width: 34px; height: 34px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.rule:hover > .rule-head .link-button, .link-button:focus-visible { opacity: 1; }
.link-button:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.link-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tag-open { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 12px; border: 1px solid var(--amber-line); border-radius: 10px; background: var(--amber-bg); color: #e6d4a6; font-size: .84rem; line-height: 1.4; }
.tag-open b { color: var(--amber); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; }
.chapter-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.pager-link { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); text-decoration: none; transition: border-color .2s, background .2s; }
.pager-link:hover { border-color: var(--line-strong); background: var(--panel-2); }
.pager-link small { display: block; margin-bottom: 4px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.pager-link.next { text-align: right; grid-column: 2; }
.doc-foot { margin-top: 20px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.noscript { padding: 20px; margin: 30px 0; border: 1px solid var(--amber-line); border-radius: 14px; background: var(--amber-bg); }

/* Footer */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px; padding: 38px 0; color: var(--muted); font-size: .9rem; }
.footer-brand { display: grid; gap: 6px; max-width: 420px; }
.footer-brand strong { color: var(--white); letter-spacing: .14em; font-family: var(--font-display); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: flex-start; }
.footer-links a { color: var(--silver); text-decoration: none; }
.footer-links a:hover { color: var(--white); text-decoration: underline; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; padding: 12px 20px; border: 1px solid var(--line-strong); border-radius: 12px; background: #20262f; color: var(--white); box-shadow: var(--shadow); font-size: .92rem; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 404 */
.not-found { display: grid; place-items: center; text-align: center; padding: 120px 0; }
.not-found h1 { font-size: clamp(4rem, 14vw, 9rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; background: linear-gradient(180deg, #fff, #5f6773); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found p { color: var(--muted); max-width: 46ch; margin: 18px auto 30px; }

/* Responsive */
@media (max-width: 1080px) {
  .doc-layout { grid-template-columns: 290px minmax(0, 1fr); gap: 32px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .discord-grid { grid-template-columns: 1fr; gap: 32px; }
  .card-grid, .steps { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .draft-badge { display: none; }
  .menu-button { display: block; }
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; margin: 0; padding: 12px 20px 20px; border-bottom: 1px solid var(--line-strong); background: rgba(13, 15, 18, .97); box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 16px; font-size: 1rem; border-radius: 12px; }
  .doc-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 22px; }
  .sidebar { position: static; max-height: none; }
  .sidebar-toggle { display: flex; }
  .search-field kbd { display: none; }
  .search-input { padding-right: 44px; }
  .toc { display: none; max-height: 56vh; }
  .sidebar.open .toc { display: block; }
  .link-button { opacity: 1; }
  .chapter { margin-bottom: 48px; }
}
@media (max-width: 520px) {
  .shell { width: min(1240px, 100% - 32px); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hero-card { padding: 20px; }
  .chapter-pager { grid-template-columns: 1fr; }
  .pager-link.next { grid-column: 1; text-align: left; }
  .rule.sub { margin-left: 8px; padding-left: 14px; }
  .brand-text small { display: none; }
  .hero-actions .button { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (forced-colors: active) {
  .button-primary, .brand-mark { forced-color-adjust: none; }
}

/* Druck */
@media print {
  :root { --bg: #fff; --text: #000; --muted: #444; --silver: #222; --line: #ccc; --line-strong: #999; --panel: #fff; --panel-2: #fff; --white: #000; }
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before, .site-header, .sidebar, .doc-actions, .link-button, .chapter-pager, .site-footer, .toast, .open-points, .skip-link, .marks-chip, #search-results { display: none !important; }
  .doc-layout { display: block; padding: 0; }
  .doc-main { max-width: none; }
  .doc-hero { border: 0; padding: 0 0 12pt; background: none; }
  .doc-hero h1 { font-size: 22pt; }
  .notice { border: 1px solid #000; background: none; color: #000; }
  .notice strong { color: #000; }
  .chapter { break-inside: auto; margin-bottom: 18pt; }
  .chapter h2 { break-after: avoid; font-size: 16pt; }
  .rule { break-inside: avoid; border-color: #ccc; padding: 8pt 0; }
  .rule p, .rule ul, .rule ol { color: #000; }
  .tag-open { border: 1px solid #666; background: none; color: #000; }
  .tag-open b { color: #000; }
  a { color: #000; text-decoration: none; }
  mark { background: none; color: inherit; }
}
