/* app.css part 3/8: saved overlay and navbar, report box, sources modal, related topics, chronological link. Split from app.css 10.11.2026; the parts load in this order [see css_parts.py], one cascade. */
/* ── Saved overlay (1b): navbar visible ABOVE the overlay, close on the right. ── */
.sec-navbar .nb-saved-close { display: none; }
body.saved-nav .sec-navbar { display: flex; z-index: 1500; }
body.saved-nav .nb-saved-close { display: inline-flex; }
body.saved-nav .nb-top,
body.saved-nav .sec-nav-back,
body.saved-nav .sec-nav-home,
body.saved-nav .sec-nav-close { display: none; }
body.saved-nav #modal-saved .modal-content { padding-bottom: 4.5rem; }
body.saved-nav #modal-saved .info-close { display: none; }
@media (min-width: 761px) {
  /* On desktop show the left zone in the saved-nav state (otherwise globally hidden). */
  body.saved-nav .navbar-left { display: inline-flex; }
}
/* nb buttons (search/saved/back-to-top): square, like head icons. */
.nb-btn {
  appearance: none; cursor: pointer; padding: 0;
  width: 40px; min-height: 40px; border-radius: 999px;
  color: var(--fg); background: transparent;
  border: var(--rule-w) solid var(--rule);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}
.nb-btn svg { width: 19px; height: 19px; display: block; }
/* Labelled bar targets (2026-11-05): icon + small text instead of a circle. */
.nb-btn.nb-lab { flex-direction: column; width: auto; min-width: 58px; padding: .3rem .55rem; gap: .14rem; border-radius: 14px; border-color: transparent; }
.nb-btn.nb-lab .nb-label { font-family: var(--sans); font-size: .75rem; font-weight: 600; line-height: 1; letter-spacing: .01em; }
.nb-btn.is-marked { color: var(--accent-strong); }
@media (hover: hover) {
  .nb-btn:hover { color: var(--accent-fg); background: var(--accent-solid); border-color: var(--accent-solid); transform: translateY(-1px); }
}
.nb-btn:active { color: var(--accent-fg); background: var(--accent-solid); border-color: var(--accent-solid); }
.sec-nav-btn {
  appearance: none; cursor: pointer;
  font-family: var(--sans); font-size: .875rem; font-weight: 600;
  color: var(--fg); background: transparent;
  border: var(--rule-w) solid var(--rule); border-radius: 999px;
  padding: 0; min-width: 40px; min-height: 40px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}
@media (hover: hover) {
  .sec-nav-btn:hover { color: var(--accent-fg); background: var(--accent-solid); border-color: var(--accent-solid); transform: translateY(-1px); }
}
/* Touch: short tap feedback instead of sticky :hover (which otherwise stays filled after a tap). */
.sec-nav-btn:active { color: var(--accent-fg); background: var(--accent-solid); border-color: var(--accent-solid); }
.sec-nav-btn[hidden] { display: none; }
/* Uniform SVG icons: fixed 20x20 size, currentColor inherits the button
   colour. All pills equally tall (min-height + centred content), so the
   glyph size no longer influences the pill height. */
.sec-nav-svg { width: 20px; height: 20px; display: block; flex: 0 0 auto; }
/* Close button (✕) set apart from the back/origin-topic group: fixed
   spacing instead of auto margin, so the group as a whole stays centred. */
/* Spacing only when a visible navigation button (back/origin topic) precedes
   it. On level 1 both are hidden -> ✕ is the only child and stays centred thanks to
   justify-content:center; the general-sibling selector then does not match. */
.sec-nav-btn:not([hidden]) ~ .sec-nav-close { margin-left: 1.6rem; }
.sec-nav-count { font-variant-numeric: tabular-nums; opacity: .8; }
/* Back button with a visible counter may widen into a short pill. */
.sec-nav-back.has-count { padding: 0 .7rem; }
.modal-content {
  background: var(--bg-soft); border: var(--rule-w) solid var(--rule);
  border-radius: 22px; width: 100%; max-width: 740px; position: relative; margin: 0 auto;
  box-shadow: var(--shadow-lg); overflow: hidden;
  display: flex; flex-direction: column;
  animation: pop .22s cubic-bezier(.2,.8,.3,1);
}
.modal-scroll { overflow-y: auto; flex: 1; max-height: calc(100vh - 5rem); max-height: calc(100dvh - 5rem); }
.modal-header {
  padding: 1.7rem 2.4rem 1.2rem;
  background: var(--bg-soft);  /* no topic gradient: neutral surface, only the 3px stripe carries the topic colour */
  border-bottom: var(--rule-w) solid var(--rule);
  position: relative;
}
.modal-header::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: var(--card-accent, var(--accent));
}
.modal-header h2 { margin: 0 0 .7rem; font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1.2; letter-spacing: -.015em; }
.modal-header .meta {
  font-family: var(--sans); font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--fg-mid);
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 .6rem;
}
.modal-header .meta .sep { opacity: .4; }
.modal-header .meta-src { margin: .7rem 0 0; }
.modal-header .meta-tags { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.modal-header .meta-tags .tag { color: var(--accent-strong); background: var(--accent-soft); text-decoration: none; padding: .14rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.modal-main { padding: 1.8rem 2.4rem 2.4rem; }
.modal-admin-block {
  margin: 0 2.4rem 2.4rem;
  padding: 1rem 1.2rem;
  border: var(--rule-w) solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-family: var(--sans); font-size: .875rem;
}
.modal-admin-title {
  font-weight: 700; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: .75rem;
}
.modal-admin-section {
  font-weight: 600; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg-dim); margin: .75rem 0 .3rem;
}
.modal-admin-actions { margin-top: .75rem; }
.modal-main .summary { font-family: var(--sans); font-size: 1rem; line-height: 1.75; color: var(--fg); }
.modal-main .summary p { margin: 0 0 .8rem; }
.modal-main .summary p:last-child { margin: 0; }
.modal-header .summary-note {
  margin: 1.6rem 0 .4rem;
  font-size: .75rem;
}
.summary-note {
  font-family: var(--sans); font-size: .75rem; color: var(--fg-mid);
  margin: 1.2rem 0 0; padding: .7rem .9rem;
  background: var(--bg-tint); border-radius: 4px;
  border: 0; border-left: 3px solid var(--accent);
  line-height: 1.55;
}
.summary-note .ai-badge { font-weight: 700; color: var(--fg); }
.summary-note .ratio { display: block; margin-top: .3rem; font-variant-numeric: tabular-nums; color: var(--fg-dim); }
.modal-src-link { color: var(--accent); text-decoration: none; font-weight: 500; }
.modal-src-link:hover { text-decoration: underline; }
.source-link {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  width: fit-content; margin: 1.8rem auto 0;
  appearance: none; background: var(--accent-solid); color: var(--accent-fg);
  border: 0; padding: .7rem 1.3rem; border-radius: 999px;
  font-family: var(--sans); font-size: .875rem; font-weight: 600;
  text-decoration: none; box-shadow: var(--shadow-sm);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.source-link:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.source-link::after { content: ""; }
.char-ratio {
  margin: 1.2rem 0 0; font-family: var(--sans); font-size: .75rem;
  color: var(--fg-dim); font-variant-numeric: tabular-nums; text-align: center;
}
/* Report box (reader reports a faulty summary) */
.report-box { margin-top: 1.5rem; padding-top: 1.1rem; border-top: var(--rule-w) solid var(--rule-soft); }
.report-trigger {
  appearance: none; background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: .875rem; font-weight: 500; color: var(--fg-dim);
  padding: 0; transition: color .15s ease;
}
.report-trigger:hover { color: var(--accent-strong); }
.report-panel { margin-top: .85rem; }
.report-q { font-family: var(--sans); font-size: .875rem; font-weight: 600; color: var(--fg-mid); margin-bottom: .6rem; }
.report-reasons { display: flex; flex-wrap: wrap; gap: .5rem; }
.report-reason {
  appearance: none; cursor: pointer;
  font-family: var(--sans); font-size: .75rem; font-weight: 500; color: var(--fg-mid);
  background: var(--bg-soft); border: var(--rule-w) solid var(--rule); border-radius: 999px;
  padding: .4rem .9rem; transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.report-reason:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.report-reason:disabled { opacity: .5; cursor: default; }
.report-done {
  font-family: var(--sans); font-size: .875rem; font-weight: 500; color: var(--accent-strong);
  padding: .2rem 0;
}
.report-done.report-fail { color: #b91c1c; }
.info-text { font-family: var(--sans); font-size: .875rem; line-height: 1.65; color: var(--fg-mid); }
.info-text p { margin: 0 0 .9rem; }
.info-text p:last-child { margin: 0; }
.info-text strong { color: var(--fg); font-weight: 600; }
/* Sources modal: row with a rectangular SVG flag */
#sources-content .src-row { display: flex; gap: .85rem; padding: .95rem 0; border-bottom: var(--rule-w) solid var(--rule-soft); }
#sources-content .src-row:last-child { border-bottom: none; }
#sources-content .source-flag { flex-shrink: 0; width: 28px; height: 18.6px; border-radius: 0; overflow: hidden; box-shadow: 0 0 0 .5px rgba(0,0,0,.08); margin-top: .15rem; }
#sources-content .source-flag svg { display: block; width: 100%; height: 100%; }
#sources-content .src-body { flex: 1; min-width: 0; }
#sources-content .src-name { font-weight: 700; color: var(--fg); text-decoration: none; font-size: 1rem; }
#sources-content .src-name:hover { color: var(--accent); }
#sources-content .src-meta { font-size: .75rem; color: var(--fg-dim); margin: .2rem 0 .35rem; }
#sources-content .src-desc { font-size: .875rem; line-height: 1.6; color: var(--fg-mid); margin: 0; }
.info-close {
  position: absolute; top: 1.1rem; right: 1.1rem;
  appearance: none; background: var(--bg-soft); border: var(--rule-w) solid var(--rule);
  width: 34px; height: 34px; border-radius: 50%; font-size: 1.2rem; line-height: 1;
  color: var(--fg-mid); cursor: pointer; z-index: 5;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s ease, background .15s ease, transform .18s ease;
}
.info-close:hover { color: var(--accent-fg); background: var(--accent-solid); border-color: var(--accent-solid); transform: rotate(90deg); }
.also-sources {
  margin-top: 1.75rem; padding-top: 1.1rem;
  border-top: var(--rule-w) solid var(--rule);
  display: flex; flex-direction: column; gap: .6rem;
}
.updated-note {
  display: flex; gap: .7rem; align-items: flex-start;
  margin: 0 0 1.25rem; padding: .75rem .9rem;
  background: var(--tint, rgba(0,0,0,.03));
  border: var(--rule-w) solid var(--rule); border-radius: 6px;
  font-family: var(--sans); font-size: .875rem; line-height: 1.5;
}
.updated-note .upd-badge {
  flex: none; font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: .2rem .5rem; border-radius: 4px;
  background: var(--fg); color: var(--bg); margin-top: .1rem;
}
.updated-note .upd-old { margin-top: .4rem; color: var(--fg-dim); font-style: italic; }
.updated-note .upd-link {
  display: inline-block; margin-top: .5rem; font-weight: 600; color: inherit;
  text-decoration: underline; text-underline-offset: 2px;
}
.also-sources .also-label {
  display: block;
  font-family: var(--sans); font-size: .875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--fg);
  padding-bottom: .5rem; margin-bottom: .8rem;
  border-bottom: var(--rule-w) solid var(--rule);
}
/* Collapsible source list from 6 sources (ADR 0035, quick-nav fix):
   a large cluster starts collapsed so that related topics below are reachable
   without a long scroll. The source count stays visible. The inner
   .also-label (in the body) is suppressed in the folded state -- the summary
   already carries the label. */
details.also-fold { display: flex; flex-direction: column; }
details.also-fold > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-size: .875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--fg);
  padding-bottom: .5rem; border-bottom: var(--rule-w) solid var(--rule);
}
details.also-fold > summary::-webkit-details-marker { display: none; }
details.also-fold > summary::marker { content: ""; }
.also-fold-chev { color: var(--fg-dim); transition: transform .2s ease; font-weight: 400; }
details.also-fold[open] > summary .also-fold-chev { transform: rotate(90deg); }
.also-fold-count {
  color: var(--fg-dim); font-weight: 400; text-transform: none; letter-spacing: 0;
}
.also-fold-body { padding-top: .9rem; }
/* in the folded container hide the redundant inner main heading
   (the summary already carries it); the sub-heading "Folge & Einordnung" [UI text] stays.
   :not(.also-label-folge) protects the edge case "follow-up articles only", where the
   follow-up label would be the first child and the only heading. */
.also-fold-body > .also-label:not(.also-label-folge) { display: none; }
/* if the follow-up label then comes first, drop the top spacing. */
.also-fold-body > .also-label-folge:first-child { margin-top: 0; }
.also-sources .also-label-folge { margin-top: 1.6rem; }
.also-links {
  display: flex; flex-direction: column; gap: .75rem;
}
.also-daygroup {
  display: flex; flex-direction: column; gap: .75rem;
}
.also-daygroup + .also-daygroup { margin-top: 1rem; }
.also-dayhead {
  font-family: var(--sans); font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  color: var(--fg-dim); font-variant-numeric: tabular-nums;
  padding-bottom: .3rem; border-bottom: var(--rule-w) dashed var(--rule);
}
.also-item {
  display: flex; flex-direction: column; gap: .3rem;
}
.also-item .also-head {
  display: flex; flex-direction: row; align-items: center; gap: .75rem;
}
.also-item .also-title {
  font-family: var(--sans); font-size: .875rem; line-height: 1.35;
  color: var(--fg-mid); text-decoration: none; display: block;
  margin-top: .15rem;
}
.also-item .also-title:hover { color: var(--accent); }
.also-item .also-date {
  font-family: var(--sans); font-size: .75rem; color: var(--fg-dim);
  white-space: nowrap; min-width: 6rem;
}
.also-item .also-src-link {
  font-family: var(--sans); font-size: .875rem; font-weight: 600;
  color: var(--accent-strong); text-decoration: none;
  transition: color .15s ease;
}
.also-item .also-src-link:hover { color: var(--accent); text-decoration: underline; }

/* Related topics (ADR 0035) -- related OTHER clusters, lazy-loaded.
   Sits as a sibling NEXT TO .modal-main, so it does not inherit its padding ->
   set the horizontal padding itself so that it lines up with the
   modal content and does not run to the edge on mobile. */
.related-wrap, .cont-wrap {
  margin-top: 0; padding: 1.6rem 2.4rem 2.4rem;
  border-top: var(--rule-w) solid var(--rule);
  display: flex; flex-direction: column; gap: .6rem;
}
/* Chronological link (ADR 0047) -- inherits the related look but stands out
   through a subtle accent bar (directed sequence relation,
   not merely topical proximity). Label + items use the .related-* styles. */
.cont-wrap .related-links {
  border-left: 2px solid var(--accent); padding-left: 1rem; margin-left: .1rem;
}
.related-wrap .related-label, .cont-wrap .related-label {
  display: block; margin: 0 0 .4rem;
  font-family: var(--sans); font-size: .875rem; font-weight: 700; line-height: 1.4;
  text-transform: uppercase; letter-spacing: .08em; color: var(--fg);
}
.related-links { display: flex; flex-direction: column; }
.related-item {
  display: flex; flex-direction: column; gap: .25rem;
  text-decoration: none;
  padding: .7rem 0;
  border-top: var(--rule-w) solid var(--rule);
}
.related-item:first-child { border-top: 0; padding-top: .2rem; }
.related-item .related-cat {
  display: inline-flex; align-items: baseline; gap: .35rem;
}
.related-item .related-cat .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  flex: 0 0 auto; align-self: center;
}
/* Separator dot before every meta part except the first (consistent with age). */
.related-item .related-meta > * + *::before { content: "·"; margin-right: .5rem; }
.related-item .related-title {
  font-family: var(--sans); font-size: .875rem; line-height: 1.35;
  color: var(--fg-mid); transition: color .15s ease;
  display: inline-flex; align-items: flex-start; gap: .4rem;
}
.related-item .related-ico {
  flex: 0 0 auto; display: inline-flex; margin-top: .06rem;
  color: var(--fg-dim); transition: color .15s ease;
}
.related-item .related-ico svg { width: 15px; height: 15px; display: block; }
.related-item:hover .related-ico { color: var(--accent); }
.related-item:hover .related-title { color: var(--accent); }
.related-item .related-meta {
  font-family: var(--sans); font-size: .75rem; color: var(--fg-dim);
  display: flex; gap: .5rem; align-items: baseline;
}
.related-item .related-age {
  font-variant-numeric: tabular-nums;
}
.modal-footer { padding: 1.2rem 2.4rem; border-top: var(--rule-w) solid var(--rule); text-align: right; font-family: var(--sans); font-size: .875rem; background: var(--bg-tint); }
.modal-footer a { color: var(--fg-mid); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: .3rem; transition: color .15s ease; }
.modal-footer a:hover { color: var(--accent-strong); }

@media (max-width: 760px) {
  .container { padding: 0 1rem 4rem; }
  .hero { padding: 1rem 1.5rem .8rem; }
  .hero .eyebrow { margin: 0 0 .5rem; font-size: .75rem; }
  .hero h1 { font-size: 1.6rem; margin: 0; max-width: none; }
  .modal { padding: 0; }
  .modal-content { max-width: 100%; min-height: 100vh; min-height: 100dvh; border-radius: 0; border: 0; }
  .modal-header { padding: 1.1rem 1.4rem .9rem; }
  .modal-header h2 { font-size: 1.4rem; line-height: 1.18; margin: 0 0 .55rem; }
  .modal-header .meta { margin: 0 0 .45rem; }
  .modal-header .summary-note { margin: 1.7rem 0 .3rem; }
  .modal-main { padding: 1.4rem; }
  .related-wrap { padding: 1.4rem; }
  .modal-footer { padding: 1.1rem 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { *, .modal.open, .modal-content { animation: none !important; transition: none !important; } }

/* Phone bottom bar must never run out of the screen [20.11.: with the Admin entry the bar needs 396 px; open article = ‹ Back + ✕ on top of four labelled entries].
   Tighter gaps and padding on phones; when the bar also carries the home button [topic depth 2+] and the width is small, the labelled entries shrink to icons. */
@media (max-width: 760px) {
  .sec-navbar { gap: .25rem; }
  .navbar-left { gap: .1rem; min-width: 0; }
  .navbar-right { gap: .35rem; }
  .nb-btn.nb-lab { min-width: 50px; padding: .3rem .4rem; }
  .sec-nav-btn:not([hidden]) ~ .sec-nav-close { margin-left: .5rem; }
}
@media (max-width: 430px) {
  .sec-navbar:has(.sec-nav-home:not([hidden])) .nb-btn.nb-lab { min-width: 40px; }
  .sec-navbar:has(.sec-nav-home:not([hidden])) .nb-btn.nb-lab .nb-label { display: none; }
}
