/* app.css part 8/8: paper skin, save/follow action row, saved & followed modal, accessibility. Split from app.css 10.11.2026; the parts load in this order [see css_parts.py], one cascade. */
/* ── Paper fibre (paper skin only) ────────────────────────────────────────────
   Fine procedural texture via SVG feTurbulence as a data URI -- no asset, no
   request, GDPR-neutral. Fixed overlay in the viewport (calm while scrolling),
   behind the content, pointer-events:none. Very low opacity: meant to be
   felt, not seen. Can be switched off entirely by removing this block.
   Light: dark fibre (multiply); dark: light fibre (screen). */
/* Paper fibre as part of the body background (paper only). The texture sits
   ABOVE the --bg colour in the same background stack -> it is page ground, not an
   overlay. No z-index, no blend -> header/nav/day nav stay untouched
   (they carry their own opaque var(--bg)). Dark mode: light fibre.
   Opacity is baked into the SVG alpha (light 0.06 black / dark
   0.08 white). Can be switched off entirely by removing this block. */
[data-skin="paper"] body {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22180%22%20height%3D%22180%22%3E%3Cfilter%20id%3D%22p%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%220.9%22%20numOctaves%3D%222%22%20stitchTiles%3D%22stitch%22%2F%3E%3CfeColorMatrix%20type%3D%22matrix%22%20values%3D%220%200%200%200%200%20%200%200%200%200%200%20%200%200%200%200%200%20%200%200%200%200.06%200%22%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url(%23p)%22%2F%3E%3C%2Fsvg%3E");
  background-size: 180px 180px;
  background-attachment: fixed;
}
[data-skin="paper"][data-theme="dark"] body {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22180%22%20height%3D%22180%22%3E%3Cfilter%20id%3D%22p%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%220.9%22%20numOctaves%3D%222%22%20stitchTiles%3D%22stitch%22%2F%3E%3CfeColorMatrix%20type%3D%22matrix%22%20values%3D%221%200%200%200%200%20%200%201%200%200%200%20%200%200%201%200%200%20%200%200%200%200.08%200%22%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url(%23p)%22%2F%3E%3C%2Fsvg%3E");
}
@media (prefers-color-scheme: dark) {
  [data-skin="paper"]:not([data-theme]) body {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22180%22%20height%3D%22180%22%3E%3Cfilter%20id%3D%22p%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%220.9%22%20numOctaves%3D%222%22%20stitchTiles%3D%22stitch%22%2F%3E%3CfeColorMatrix%20type%3D%22matrix%22%20values%3D%221%200%200%200%200%20%200%201%200%200%200%20%200%200%201%200%200%20%200%200%200%200.08%200%22%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url(%23p)%22%2F%3E%3C%2Fsvg%3E");
  }
}/* Fibre ALSO on the opaque bars (topbar/feedtools/dayhead), otherwise they look
   smoother/lighter than the textured feed. Same texture = same tone.
   background-attachment:fixed -> the fibre lines up exactly with the body ground. */
[data-skin="paper"] .topbar,
[data-skin="paper"] .feedtools {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22180%22%20height%3D%22180%22%3E%3Cfilter%20id%3D%22p%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%220.9%22%20numOctaves%3D%222%22%20stitchTiles%3D%22stitch%22%2F%3E%3CfeColorMatrix%20type%3D%22matrix%22%20values%3D%220%200%200%200%200%20%200%200%200%200%200%20%200%200%200%200%200%20%200%200%200%200.06%200%22%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url(%23p)%22%2F%3E%3C%2Fsvg%3E");
  background-size: 180px 180px;
  background-attachment: fixed;
}[data-skin="paper"][data-theme="dark"] .topbar,
[data-skin="paper"][data-theme="dark"] .feedtools {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22180%22%20height%3D%22180%22%3E%3Cfilter%20id%3D%22p%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%220.9%22%20numOctaves%3D%222%22%20stitchTiles%3D%22stitch%22%2F%3E%3CfeColorMatrix%20type%3D%22matrix%22%20values%3D%221%200%200%200%200%20%200%201%200%200%200%20%200%200%201%200%200%20%200%200%200%200.08%200%22%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url(%23p)%22%2F%3E%3C%2Fsvg%3E");
}
@media (prefers-color-scheme: dark) {[data-skin="paper"]:not([data-theme]) .topbar,
[data-skin="paper"]:not([data-theme]) .feedtools {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22180%22%20height%3D%22180%22%3E%3Cfilter%20id%3D%22p%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%220.9%22%20numOctaves%3D%222%22%20stitchTiles%3D%22stitch%22%2F%3E%3CfeColorMatrix%20type%3D%22matrix%22%20values%3D%221%200%200%200%200%20%200%201%200%200%200%20%200%200%201%200%200%20%200%200%200%200.08%200%22%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url(%23p)%22%2F%3E%3C%2Fsvg%3E");
  }
}
@keyframes pblip-paper {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 55%, transparent); }
  70% { box-shadow: 0 0 0 12px color-mix(in oklab, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 0%, transparent); }
}

/* Skin toggle: text buttons (wider than the glyph buttons) */
.skin-toggle button {
  width: auto; padding: 0 .7rem; font-family: var(--sans);
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
}


/* ── Save/Follow: modal action row (step 2) ── */
.sv-actions { margin-top: 1.25rem; display: flex; }
.sv-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--sans); font-size: .875rem; font-weight: 600;
  padding: .55rem 1rem; border-radius: 999px;
  border: var(--rule-w) solid var(--rule); background: transparent;
  color: var(--fg); cursor: pointer;
  transition: border-color .15s, transform .1s, background .15s, color .15s;
}
.sv-btn:hover { border-color: var(--accent-solid); transform: translateY(-1px); }
.sv-btn.is-active { background: var(--accent-solid); border-color: var(--accent-solid); color: #fff; }
.sv-btn.is-active .sv-btn-label::before { content: "\2713\00a0"; font-weight: 700; }


/* ── "Merken & Gefolgt" [Saved & Followed; UI text]: content in the info modal (#modal-saved) ── */
.saved-body { padding-top: .25rem; }
.saved-section { margin-bottom: 1.75rem; }
.saved-h {
  font: 600 var(--t-s)/1.4 var(--sans); text-transform: none; letter-spacing: 0; color: var(--fg-mid);
  margin: 0 0 var(--sp-2); display: flex; align-items: center; gap: var(--sp-2);
}
.saved-count {
  font: 600 var(--t-xs)/1 var(--sans); background: var(--bg-tint); color: var(--fg-mid);
  border-radius: 999px; padding: 3px 8px;
}
/* Entries as cards like in the feed [06.11.] */
.saved-section .related-links { display: flex; flex-direction: column; gap: var(--sp-2); }
.saved-item { background: var(--bg-tint); border-radius: var(--r-m); padding: var(--sp-3) var(--sp-4) !important; border: 0 !important; }
.saved-item .related-title { font: 500 1.0625rem/1.35 var(--display); color: var(--fg); }
.saved-item .related-meta { margin-top: 6px; }
/* Saved list as a sheet from the bottom [mobile]: handle, title, cards; the bottom bar is dropped, the cross sits in the sheet */
.saved-grip { display: none; }
@media (max-width: 760px) {
  .info-modal.open { align-items: flex-end; padding: 0; background: var(--scrim); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .info-modal .modal-content {
    margin: 0; max-width: none; width: 100%; height: auto; min-height: 0; border-radius: 22px 22px 0 0; border: 0;
    border-top: var(--rule-w) solid var(--rule); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); box-shadow: none;
    position: relative; overflow: hidden; padding-bottom: 0; animation: sheetup .22s cubic-bezier(.2,.8,.3,1);
  }
  .info-modal .saved-grip { display: block; height: 28px; position: relative; cursor: grab; }
  .info-modal .modal-header { padding: 0 var(--sp-4) var(--sp-2); background: var(--bg-soft); border: 0; }
  .info-modal .modal-header::before { display: none; }
  .info-modal .modal-header h2 { font: 600 1.25rem/1.2 var(--display); margin: 0; letter-spacing: 0; }
  .info-modal .modal-scroll { max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); }
  #modal-saved .saved-body { padding: var(--sp-1) var(--sp-4) calc(var(--sp-5) + env(safe-area-inset-bottom, 0px)); }
  body.saved-nav .info-modal .modal-content { padding-bottom: 0; }
}
.saved-tools { display: flex; gap: .5rem; margin: 0 0 .9rem; flex-wrap: wrap; }
.saved-filter, .saved-sort {
  font: inherit; font-size: .875rem; color: inherit; background: transparent; min-height: 2.5rem;
  border: 1px solid var(--border, rgba(127,127,127,.4)); border-radius: 9px; padding: .45rem .7rem;
}
.saved-filter { flex: 1 1 11rem; min-width: 0; }
.saved-sort { flex: 0 0 auto; }
.saved-grp { margin: 0 0 var(--sp-4); }
.saved-grp[hidden] { display: none; }
.saved-grp-h { font: 600 var(--t-xs)/1.4 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--fg-dim); margin: var(--sp-3) 0 var(--sp-2); display: flex; align-items: center; gap: var(--sp-2); }
.saved-item[hidden], .saved-nohit[hidden] { display: none !important; }   /* filter: .related-item sets its own display */
.saved-nohit { font-size: .875rem; color: var(--fg-dim); margin: .2rem 0 1rem; }
.saved-empty { font-size: .875rem; color: var(--fg-dim); margin: 0; line-height: 1.5; }
.saved-newsflag {
  font-family: var(--sans); font-size: .75rem; font-weight: 700;
  background: var(--accent-solid); color: #fff; border-radius: 999px;
  padding: .05rem .45rem; margin-left: .4rem;
}
.saved-pending .related-title { color: var(--fg-dim); font-style: italic; }
.saved-stale { opacity: .55; pointer-events: none; }

/* Save/Follow: action row next to the original-article link */
.article-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1.1rem 0 0; }
.article-actions .source-link { margin: 0; }
.article-actions .sv-actions { margin: 0; }

/* Save as a plain bookmark icon (in .article-actions next to the original link) */
.sv-btn.sv-icon { padding: 0; width: 40px; height: 40px; justify-content: center; }
.sv-btn.sv-icon .sv-bm { width: 18px; height: 18px; display: block; }
.sv-btn.sv-icon.is-active { background: var(--accent-solid); border-color: var(--accent-solid); color: #fff; }
.sv-btn.sv-icon.is-active .sv-bm { fill: currentColor; }

/* Put the saved modal behind the secondary stack while an entry is open
   (secondary modal z-index 1300; info modal otherwise 1400). */
.info-modal.saved-behind { z-index: 1200; }

/* ── Accessibility (2026-11-05) ── */
/* Readable for screen readers, visually hidden (e.g. the h1 of the start page). */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
/* Skip link: visible only on keyboard focus (WCAG 2.4.1 Bypass Blocks). */
.skip-link {
  position: absolute; left: .75rem; top: -4rem; z-index: 3000;
  background: var(--accent-solid); color: var(--accent-fg);
  padding: .6rem 1rem; border-radius: var(--radius-sm);
  font-family: var(--sans); font-weight: 600; font-size: .9rem; text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: .75rem; outline: 3px solid var(--fg); outline-offset: 2px; }
/* Target of the skip link: no focus ring around the whole content. */
#main:focus { outline: none; }
