/* SLLR Global · Publikationen (Ausbau 22) – Artikeltypografie, Übersichtskarten, Druck.
   Ergänzt css/site.css (Tokens --ink, --line, --wood … kommen von dort); nur für Seiten unter /publikationen/. */

.pub-page :target, .pub-page h2[id], .pub-page li[id], .pub-page .pub-key { scroll-margin-top: 92px; }

/* ---------------------------------------------------------------- Kopf */
.pub-head { padding: 132px 0 56px; }
.pub-head h1 { font-size: clamp(32px, 4.6vw, 60px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.08; max-width: 21ch; margin-top: 16px; text-wrap: balance; }
.pub-head .lead { max-width: 64ch; }
.pub-head .label b { color: var(--wood); }
.pub-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.pub-crumbs a { color: var(--ink-2); border-bottom: 1px solid transparent; }
.pub-crumbs a:hover { color: var(--ink); border-color: var(--ink); }
.pub-crumbs span[aria-hidden] { color: var(--ink-3); }
.pub-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--ink-2); }
.pub-meta span { position: relative; }
.pub-meta span + span::before { content: ''; position: absolute; left: -12px; top: 50%; width: 3px; height: 3px; background: var(--wood); transform: translateY(-50%); }
.pub-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* ---------------------------------------------------------------- Layout: Inhaltsverzeichnis + Artikel */
.pub-layout { display: grid; grid-template-columns: 250px minmax(0, 760px); gap: clamp(36px, 6vw, 96px); padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 110px); align-items: start; }
.pub-toc { position: sticky; top: 92px; max-height: calc(100vh - 120px); overflow: auto; padding-right: 6px; }
.pub-toc .label { margin-bottom: 14px; }
.pub-toc nav { display: grid; gap: 2px; border-left: 1px solid var(--line-2); margin-bottom: 22px; }
.pub-toc nav a { font-size: 13px; line-height: 1.4; color: var(--ink-3); padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.pub-toc nav a:hover, .pub-toc nav a.on { color: var(--ink); border-left-color: var(--wood); }
.pub-toc .btn { font-size: 12.5px; }
.pub-toc-m { display: none; border: 1px solid var(--line-2); background: var(--bg-2); margin-bottom: 28px; }
.pub-toc-m summary { cursor: pointer; padding: 14px 16px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.pub-toc-m summary::-webkit-details-marker { display: none; }
.pub-toc-m summary::after { content: '+'; font-size: 16px; color: var(--wood); }
.pub-toc-m[open] summary::after { content: '–'; }
.pub-toc-m nav { display: grid; padding: 0 16px 12px; }
.pub-toc-m nav a { padding: 10px 0; font-size: 15px; color: var(--ink-2); border-top: 1px solid var(--line-2); }

/* ---------------------------------------------------------------- Artikeltext */
.pub-body { min-width: 0; font-size: 17px; line-height: 1.72; color: #2b323c; }
.pub-body p { margin: 0 0 1.1em; }
.pub-body b { color: var(--ink); font-weight: 500; }
.pub-body h2 { font-size: clamp(24px, 2.8vw, 32px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.18; color: var(--ink); margin: 0 0 20px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.pub-body h3 { font-size: 18px; font-weight: 500; letter-spacing: -0.005em; line-height: 1.3; color: var(--ink); margin: 30px 0 10px; }
.pub-sec { margin-top: 52px; }
.pub-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pub-body a:hover { text-decoration-color: var(--wood); }
.pub-body a.btn { text-decoration: none; }
.pub-body a.btn.cta { color: var(--wood-ink); }
.pub-body a.ref { font-family: var(--mono); font-size: 0.72em; color: var(--wood); text-decoration: none; vertical-align: 0.35em; letter-spacing: 0; padding: 0 1px; white-space: nowrap; }
.pub-body a.ref:hover { color: var(--wood-2); text-decoration: underline; }
.pub-body .refs { white-space: nowrap; margin-left: 2px; }
.pub-table td > .refs:first-child, .pub-table th > .refs:first-child { margin-left: 0; }
.pub-body ul { margin: 0 0 1.2em; padding: 0; list-style: none; display: grid; gap: 10px; }
.pub-body ul li { position: relative; padding-left: 26px; }
.pub-body ul li::before { content: ''; position: absolute; left: 0; top: 0.82em; width: 12px; height: 1px; background: var(--wood); }
.pub-body ul.pub-check li { padding-left: 32px; }
.pub-body ul.pub-check li::before { top: 0.36em; width: 14px; height: 14px; background: none; border: 1px solid var(--wood); border-radius: 2px; }

.pub-key { border: 1px solid var(--line); border-top: 2px solid var(--wood); background: var(--bg-2); padding: 26px 28px 22px; margin-bottom: 24px; }
.pub-key .label { color: var(--wood); margin-bottom: 16px; }
.pub-key ul { margin: 0; gap: 12px; }
.pub-key li { font-size: 16px; line-height: 1.6; }
.pub-legal { font-size: 14px; line-height: 1.6; color: var(--ink-2); border-left: 2px solid var(--warn); padding: 4px 0 4px 16px; }
.pub-callout { margin: 26px 0; padding: 20px 24px; border-left: 2px solid var(--wood); background: var(--bg-2); }
.pub-callout p { margin: 0; color: var(--ink); font-size: 17.5px; line-height: 1.6; }
.pub-note { font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.pub-limits p { font-size: 15px; color: var(--ink-2); }

/* Tabellen: am Handy als gestapelte Zeilen (data-label), breite Zahlentabellen horizontal rollbar */
.pub-table { margin: 26px 0 30px; }
.pub-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line); }
.pub-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.pub-table th, .pub-table td { text-align: left; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; color: var(--ink-2); }
.pub-table th { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; white-space: normal; }
.pub-table td:first-child { color: var(--ink); }
.pub-table:not(.wide) td:first-child { min-width: 118px; }
.pub-table th:last-child, .pub-table td:last-child { padding-right: 0; }
.pub-table figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--ink-3); }

.pub-sources { margin: 0 0 24px; padding: 0 0 0 0; list-style: none; counter-reset: q; display: grid; gap: 14px; }
.pub-sources li { counter-increment: q; position: relative; padding-left: 44px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.pub-sources li::before { content: '[' counter(q) ']'; position: absolute; left: 0; top: 0.1em; font-family: var(--mono); font-size: 12px; color: var(--wood); }
.pub-sources li:target { background: rgba(227, 165, 92, 0.14); outline: 1px solid rgba(154, 90, 34, 0.35); outline-offset: 6px; }
.pub-sources a { font-size: 13px; color: var(--ink-2); }
.pub-cite { font-size: 13.5px; line-height: 1.6; color: var(--ink-3); border: 1px solid var(--line-2); padding: 16px 18px; overflow-wrap: anywhere; }
.pub-cite .label { display: block; margin-bottom: 8px; }
.pub-end { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line-2); }

/* ---------------------------------------------------------------- Karten (Übersicht, „Weitere Publikationen“) */
.pub-more { border-top: 1px solid var(--line-2); background: var(--bg-2); }
.pub-more > .wrap > .label { margin-bottom: 24px; }
.pub-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pub-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pub-card { display: flex; flex-direction: column; border: 1px solid var(--line-2); background: var(--bg); border-radius: 16px; overflow: hidden; transition: border-color 0.3s, transform 0.3s var(--ease); }
.pub-card:hover { border-color: var(--line); transform: translateY(-2px); }
.pub-card-img { display: block; aspect-ratio: 16 / 7; overflow: hidden; background: var(--bg-3); }
.pub-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.pub-card:hover .pub-card-img img { transform: scale(1.03); }
.pub-card-body { display: flex; flex-direction: column; gap: 12px; padding: 24px 24px 24px; flex: 1; }
.pub-card .label b { color: var(--wood); }
.pub-card h3 { font-size: clamp(20px, 2vw, 25px); font-weight: 400; letter-spacing: -0.015em; line-height: 1.22; }
.pub-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--wood); text-underline-offset: 4px; }
.pub-card-body > p:not(.label) { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.pub-card-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); margin-top: auto; padding-top: 6px; }
.pub-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.pub-cards.three .pub-card h3 { font-size: 19px; }
.pub-cards.three .pub-card-body > p:not(.label) { font-size: 14px; }
.pub-access { max-width: none; }
.pub-index-head h1 { max-width: 18ch; }

/* ---------------------------------------------------------------- Tablet und Handy */
@media (max-width: 1100px) {
  .pub-cards.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-cards.three .pub-card:nth-child(3) { display: none; }
}
@media (max-width: 1000px) {
  .pub-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pub-toc { display: none; }
  .pub-toc-m { display: block; }
  .pub-body { max-width: 760px; margin: 0 auto; width: 100%; }
}
@media (max-width: 760px) {
  .pub-head { padding: 104px 0 40px; }
  .pub-head h1 { font-size: clamp(28px, 7.6vw, 38px); max-width: none; }
  .pub-head .lead { font-size: 17px; }
  .pub-meta { margin-top: 20px; flex-direction: column; gap: 4px; }
  .pub-meta span + span::before { display: none; }
  .pub-head .label { line-height: 1.7; }
  .pub-actions { margin-top: 22px; }
  .pub-actions .btn, .pub-end .btn { flex: 1 1 auto; justify-content: center; }
  .pub-body { font-size: 16px; line-height: 1.68; }
  .pub-sec { margin-top: 40px; }
  .pub-body h2 { padding-top: 22px; margin-bottom: 16px; }
  .pub-key { padding: 20px 18px 16px; }
  .pub-key li { font-size: 15.5px; }
  .pub-callout { padding: 16px 18px; }
  .pub-callout p { font-size: 16.5px; }
  .pub-cards, .pub-cards.three { grid-template-columns: minmax(0, 1fr); }
  .pub-cards.three .pub-card:nth-child(3) { display: flex; }
  .pub-card-body { padding: 20px 18px; }
  .pub-card-actions .btn { flex: 1 1 0; justify-content: center; }
  .pub-sources li { padding-left: 36px; }

  /* Texttabellen: jede Zeile als Block mit Spaltenname davor */
  .pub-table:not(.wide) .pub-table-scroll { overflow: visible; }
  .pub-table:not(.wide) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pub-table:not(.wide) tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
  .pub-table:not(.wide) td { display: block; padding: 0 0 8px; border: 0; }
  .pub-table:not(.wide) td:last-child { padding-bottom: 0; }
  .pub-table:not(.wide) td::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
  .pub-table:not(.wide) td:first-child { font-weight: 500; font-size: 15.5px; }
  .pub-table:not(.wide) td:first-child::before { display: none; }
  /* Zahlentabellen: rollbar, Mindestbreite, Hinweis durch Schattenkante */
  .pub-table.wide table { font-size: 13.5px; }
  .pub-table.wide th, .pub-table.wide td { padding-right: 12px; }
  .pub-table.wide th { font-size: 9.5px; letter-spacing: 0.08em; }
  .pub-table.cols-5 table { min-width: 520px; }
  .pub-table.cols-6 table { min-width: 620px; }
  .pub-table.cols-5 .pub-table-scroll, .pub-table.cols-6 .pub-table-scroll { margin-right: calc(var(--pad) * -1); padding-right: var(--pad); background: linear-gradient(to left, rgba(18, 24, 38, 0.06), transparent 28px) no-repeat right / 28px 100%; }
}

/* ---------------------------------------------------------------- Druck: helles, sparsames Blatt */
@media print {
  :root { --ink: #000; --ink-2: #222; --ink-3: #555; --line: #bbb; --line-2: #ddd; --bg: #fff; --bg-2: #fff; --bg-3: #fff; --wood: #8a5a22; }
  body.pub-page { background: #fff; color: #000; }
  .pub-page .grid-bg, .pub-page .noise, .pub-page .nav, .pub-page footer, .pub-page .pub-toc, .pub-page .pub-toc-m, .pub-page .pub-actions, .pub-page .pub-end, .pub-page .pub-more, .pub-page .cc, .pub-page .pub-crumbs, .pub-page .pub-head > img { display: none !important; }
  .pub-page .page-head.has-img::after { display: none; }
  .pub-head { padding: 0 0 18px; border-bottom: 1px solid #bbb; }
  .pub-head h1 { font-size: 26pt; max-width: none; }
  .pub-head .lead, .pub-meta, .pub-head .label { color: #333 !important; }
  .pub-layout { display: block; padding: 18px 0 0; }
  .pub-body { font-size: 10.5pt; line-height: 1.5; color: #111; max-width: none; }
  .pub-body h2 { font-size: 15pt; break-after: avoid; }
  .pub-body h3 { break-after: avoid; }
  .pub-key, .pub-callout, .pub-table, .pub-sources li { break-inside: avoid; }
  .pub-key, .pub-callout { background: #f6f3ee; }
  .pub-body a.ref { color: #8a5a22; }
  .pub-table table { font-size: 9pt; }
}

/* ---------------------------------------------------------------- Navigation mit sechstem Eintrag „Publikationen“:
   zwischen Burger-Umbruch (1040 px) und voller Breite enger setzen, Marke nicht umbrechen */
.pub-page .brand { white-space: nowrap; flex-shrink: 0; }
.pub-page .brand .mark { flex: none; }
@media (min-width: 1041px) and (max-width: 1260px) {
  .pub-page .nav-links { gap: 18px; }
  .pub-page .brand span.wordmark { font-size: 15px; }
}

/* Ausbau 22 – Responsive: Fließtext ≥ 16 px auf dem Handy (Zitierhinweis und Rechtshinweis bleiben Kleingedrucktes) */
@media (max-width: 600px) {
  .pub-key li, .pub-limits p, .pub-card-body > p:not(.label), .pub-cards.three .pub-card-body > p:not(.label) { font-size: 16px; }
  .pub-key { padding: 20px 18px 16px; }
}
