/* Fonts, stored locally (SIL Open Font License; see public/fonts/):
   Inter for everything, Montserrat only for the NEWSDECK wordmark, Source
   Serif 4 only inside the briefing (so it's only downloaded there). */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/fonts/source-serif-4-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-wght-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/montserrat-800-latin.woff2') format('woff2');
}

/* ---------- Scrolling stays where you scroll ---------- */
/* A popup, menu or sheet is open (app.js syncScrollLock): the page behind
   it doesn't scroll. The scrollbar's room stays reserved, so nothing shifts
   sideways when it goes away. */
html {
  scrollbar-gutter: stable;
}
/* A popup open: the page behind it doesn't scroll. Only on html: hidden
   overflow on body as well made body its own scroll box, so the sticky
   header no longer stuck to the window and scrolled away with the page; a
   story folder opened further down showed no header behind its blur. */
html.overlay-open {
  overflow: hidden;
}
/* Every scroll area keeps its scrolling to itself: reaching the end of a
   popup, the Laatste nieuws sidebar or an Uitkijk list doesn't carry on into
   the page (or the page into them). */
.sidebar,
.latest-list,
.modal-body,
.info-body,
.reader-scroll,
.import-names,
.groupm-list,
.m-more,
.brief-scroll,
.alarmd-panel,
.uitkijk .notif-list,
.uitkijk .alarm-list,
.search-results,
.lightbox {
  overscroll-behavior: contain;
}

/* ---------- Theme tokens ---------- */
/* The maps (radar, alarmering): their controls and backgrounds follow the
   theme; dark here, white in light mode. */
:root {
  --map-ctrl-bg: rgba(34, 37, 44, 0.94);
  --map-ctrl-ink: #e7e9ee;
  --map-ctrl-muted: #aab0ba;
  --map-ctrl-off: #626874;
  --map-ctrl-edge: rgba(0, 0, 0, 0.55);
  --map-ctrl-line: rgba(255, 255, 255, 0.12);
  --map-attr-bg: rgba(20, 22, 27, 0.72);
  --map-attr-ink: #b9bec7;
  --map-sea: #252b33;
  --map-land: #2b2e33;
}
html[data-theme='light'] {
  --map-ctrl-bg: rgba(255, 255, 255, 0.94);
  --map-ctrl-ink: #1b1d22;
  --map-ctrl-muted: #4a515c;
  --map-ctrl-off: #9aa1ab;
  --map-ctrl-edge: rgba(0, 0, 0, 0.18);
  --map-ctrl-line: rgba(0, 0, 0, 0.12);
  --map-attr-bg: rgba(255, 255, 255, 0.8);
  --map-attr-ink: #3a4250;
  --map-sea: #d5dfe7;
  --map-land: #e6eaef;
}
:root {
  --bg: #16171b;
  --bg-grad: radial-gradient(1200px 600px at 80% -10%, #24262c 0%, transparent 60%),
    radial-gradient(900px 500px at 0% 0%, #1c1e23 0%, transparent 55%);
  --panel: #1d1f24;
  --panel-2: #25272d;
  --panel-hover: #2f323a;
  --border: #3a3d45;
  --border-soft: #2b2e35;
  --text: #ededef;
  --muted: #a8aab1;
  --muted-2: #8c8f97;
  --accent: #e5322d; /* the red of NEWS in the logo */
  --accent-2: #b81f1b;
  --gold: #f5c518;
  --regional: #9b6bff;
  --brain: #f08fb6; /* brain notifications (Slimme modus) */
  --ok: #35c46a;
  --favorite: #f472b6; /* per-feed priority bonus (wheel + popup) */
  --pref-more: #3a8ee6; /* the user's preference: wheel + "Mijn voorkeuren" */
  --pref-less: #ee5a5a;
  --danger: #ff6b6b;
  /* Edits view: one colour per edit for added words (never red: red is
     for removed words). */
  --rev-1: #4cc9d0;
  --rev-2: #b28dff;
  --rev-3: #f2b84b;
  --rev-4: #5fd38d;
  --rev-5: #6aa8ff;
  --rev-6: #f08fd6;
  --revision: var(--rev-1);
  --revision-del: #ff6464;
  --radius: 6px;
  --radius-sm: 4px;
  --page-w: 1600px;
  /* Popups: one look for every overlay (settings, reader, score, groups, …). */
  --overlay-bg: rgba(15, 16, 20, 0.66);
  --overlay-blur: blur(4px);
  --panel-radius: 14px;
  --panel-title: 18px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.34);
  color-scheme: dark; /* native controls, scrollbars, file pickers */
}

html[data-theme='light'] {
  color-scheme: light;
  --favorite: #d0458f;
  --pref-more: #1f6fd1;
  --pref-less: #c93636;
  --bg: #f4f6fa;
  --bg-grad: radial-gradient(1200px 600px at 80% -10%, #e4ecfb 0%, transparent 60%);
  --panel: #ffffff;
  --panel-2: #f0f3f8;
  --panel-hover: #eef2f8;
  --border: #dde4ee;
  --border-soft: #e7ecf3;
  --text: #131a24;
  --muted: #5b6b80;
  --muted-2: #66758a;
  --shadow: 0 14px 40px rgba(30, 45, 70, 0.16);
  --shadow-sm: 0 6px 18px rgba(30, 45, 70, 0.12);
  /* Deeper accents: the dark-theme ones are too pale as text on white. */
  --accent: #e5322d;
  --accent-2: #b81f1b;
  --gold: #a76b00;
  --ok: #1d8a4a;
  --danger: #c93636;
  --rev-1: #08747c;
  --rev-2: #6a3fd0;
  --rev-3: #935c00;
  --rev-4: #1b7a42;
  --rev-5: #1d5fc2;
  --rev-6: #a3318f;
  --revision: var(--rev-1);
  --revision-del: #c41e1e;
  --regional: #7442e0;
  --brain: #d6457f; /* brain notifications (Slimme modus) */
}

/* ---------- Light theme fixes ---------- */
html[data-theme='light'] .topbar {
  background: var(--bg);
}
/* Cards are dark (photo scrim or feed tint) in both themes: keep the bright
   accents. The mobile list rows sit on the page instead; see the 720px block. */
html[data-theme='light'] .card {
  --gold: #f5c518;
  --accent: #e5322d;
  --ok: #35c46a;
}
html[data-theme='light'] .rating-pill {
  background: var(--panel);
  border-color: var(--border);
  color: var(--text);
}
html[data-theme='light'] .rating-pill--compact {
  background: var(--panel-2);
}
html[data-theme='light'] .notice {
  color: #7a4d00;
  background: #fff6dc;
  border-color: #f0d48a;
}
html[data-theme='light'] .form-error {
  color: #9f1f1f;
  background: #fdecec;
  border-color: #f3b4b4;
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* The page gradient stays put on its own layer while the page scrolls over it
   (background-attachment: fixed would repaint the whole screen every frame). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--bg-grad);
  pointer-events: none;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-optical-sizing: auto;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 24px;
}
/* Form controls don't inherit the page font by default. */
button,
input,
select,
textarea {
  font-family: inherit;
}

a {
  color: inherit;
}

.svg {
  display: inline-flex;
  align-items: center;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1px 5px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

/* ---------- Top bar: masthead + section bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg); /* solid: a blur here re-filtered the page under it every scroll frame */
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow 0.2s ease;
}
.topbar.is-scrolled {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 10px 22px 8px;
}
.topbar-start {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0;
}
.topbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* Logo + wordmark. On load "NEWSDECK" slides out from behind the logo (the
   text column clips it at the logo's edge), then the tagline drops down out
   of the wordmark and fades in. */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}
html[data-theme='light'] .brand-logo {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  padding: 2px 2px 2px 0;
}
.brand-name {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  animation: brand-slide-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
}
.brand-news {
  color: #e5322d;
}
.brand-deck {
  color: #fff;
}
html[data-theme='light'] .brand-deck {
  color: #16171b;
}
.brand-tagline {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0.01em;
  animation: brand-drop-in 0.5s ease-out 0.75s both;
}
@keyframes brand-slide-in {
  from {
    transform: translateX(-105%);
  }
}
@keyframes brand-drop-in {
  from {
    opacity: 0;
    transform: translateY(-9px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-text,
  .brand-name,
  .brand-tagline {
    animation: none !important;
  }
}

/* Row 2: sections (tags) on the left, ordering + toggles on the right. */
.sectionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 22px;
}
.sections {
  display: flex;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.sections::-webkit-scrollbar {
  display: none;
}
.section {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 10px 12px 11px;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.14s ease;
}
.section::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  transition: background 0.14s ease;
}
.section:hover {
  color: var(--text);
}
.section:hover::after {
  background: var(--border);
}
.section.is-active {
  color: var(--text);
}
.section.is-active::after {
  height: 3.5px;
  background: var(--cat, var(--accent));
}
/* Category icon: muted at rest, the category's own colour when selected. */
.section-icon {
  display: inline-flex;
  color: var(--muted-2);
  transition: color 0.14s ease;
}
.section:hover .section-icon {
  color: var(--muted);
}
.section.is-active .section-icon {
  color: var(--cat, var(--accent));
}
.section-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 6px 0;
}
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}
.seg-btn {
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
}
.seg-btn:hover {
  color: var(--text);
}
.seg-btn.is-active {
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
/* Voorpagina / Laatste: the same 38px height and corners as the header
   buttons, each with a small icon. */
.view-switch {
  height: 38px;
  padding: 3px;
  border-radius: 10px;
}
.view-switch .seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 7px;
}

/* Photo cards always have a dark scrim behind their footer, so their rating
   pill keeps dark-theme colours in light mode too (it was near-invisible). */
html[data-theme='light'] .card .rating-pill {
  background: rgba(20, 21, 26, 0.72);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ededef;
}
/* Gold "NEW" on white is hard to read; a deeper amber in light mode. */
html[data-theme='light'] .news-new,
html[data-theme='light'] .latest-fresh {
  color: #b7791f;
}

/* Buttons with their own display value would otherwise ignore `hidden`
   (e.g. the search box's ✕ showed even with nothing typed). */
.icon-btn[hidden],
.btn[hidden] {
  display: none;
}

/* One focus style for every control. */
.btn:focus-visible,
.icon-btn:focus-visible,
.section:focus-visible,
.seg-btn:focus-visible,
.info-tab:focus-visible,
.rating-pill:focus-visible,
.rating-sum-more:focus-visible,
.rating-calc-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Search box */
.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 260px;
  max-width: 420px;
  min-width: 140px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
}
.search-box:focus-within {
  border-color: var(--muted-2);
}
.search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
}
.search-input::placeholder {
  color: var(--muted-2);
}
.search-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: dd-spin 0.7s linear infinite;
  flex: 0 0 auto;
}
@keyframes dd-spin {
  to {
    transform: rotate(360deg);
  }
}
.search-box-clear {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
}

/* Search results bar: static flow (pushes content down), light-gray via the
   existing --panel-2 token in both themes. */
/* A dropdown under the search box, fixed under the (sticky) top bar: it
   stays in view however far the page is scrolled, and a long list scrolls
   inside it (app.js placeSearchResults sets --search-left). */
.search-results {
  position: fixed;
  top: calc(var(--topbar-h, 64px) + 6px);
  left: var(--search-left, 16px);
  z-index: 45;
  width: min(720px, calc(100vw - var(--search-left, 16px) - 16px));
  max-height: calc(100vh - var(--topbar-h, 64px) - 24px);
  overflow-y: auto;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius, 12px);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.45);
  scrollbar-width: thin;
}
.search-results[hidden] {
  display: none;
}
.search-results-inner {
  padding: 12px 16px;
}
.search-results-head {
  position: sticky;
  top: -12px;
  z-index: 1;
  margin: -12px -16px 8px;
  padding: 8px 10px 8px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border-soft);
}
/* Phones: the full width under the top bar, down to the bottom bar. */
@media (max-width: 720px) {
  .search-results {
    left: 0;
    right: 0;
    width: auto;
    top: var(--topbar-h, 56px);
    max-height: calc(100dvh - var(--topbar-h, 56px) - var(--m-nav-h, 58px));
    border-width: 0 0 1px;
    border-radius: 0;
  }
  .search-results-head {
    top: -10px;
    margin: -10px -14px 8px;
    padding-left: 14px;
  }
}
.search-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.search-result-row:hover {
  background: var(--panel-hover);
}
.search-result-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--feed, var(--muted-2));
  flex: 0 0 auto;
}
.search-result-main {
  min-width: 0;
}
.search-result-title {
  color: var(--text);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
}
.search-result-title:hover {
  text-decoration: underline;
}
.search-result-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.search-highlight {
  background: var(--gold);
  color: #1a1a1a;
  border-radius: 2px;
  padding: 0 1px;
}
.search-results-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.search-page-info {
  color: var(--muted);
  font-size: 12.5px;
}
.search-results-empty {
  color: var(--muted);
  padding: 8px 10px;
}

/* Registered so the countdown fill below can be animated by CSS alone. */
@property --p {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

/* Refresh button carries the auto-refresh countdown as a status-coloured ring
   that fills clockwise around the button and completes exactly when the next
   (randomly timed) refresh fires. */
.refresh-btn {
  position: relative;
  --ring: var(--ok);
}
.refresh-ring {
  position: absolute;
  inset: -1px;
  border-radius: inherit; /* follows the round button */
  padding: 1px;
  pointer-events: none;
  background: conic-gradient(from calc(var(--a, 0) * 1turn), var(--ring) calc(var(--p, 0) * 1turn), transparent 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.refresh-btn.is-counting {
  animation: ring-fill var(--ring-ms, 20s) steps(var(--ring-steps, 80), end) forwards;
}
@keyframes ring-fill {
  from {
    --p: 0;
  }
  to {
    --p: 1;
  }
}
/* Busy: a neutral grey arc running round the button's edge (red looked
   like an error; a real failure keeps its red ring, .is-error). The arc's
   start angle (--a) moves, not the ring itself: rotating the ring swung the
   rounded square's corners out of line. */
@property --a {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}
.refresh-btn.is-syncing {
  --ring: var(--muted);
  --p: 0.3;
  animation: none;
}
.refresh-btn.is-syncing .refresh-ring {
  animation: ring-run 0.9s linear infinite;
}
@keyframes ring-run {
  to {
    --a: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .refresh-btn.is-syncing .refresh-ring {
    animation: ring-pulse 1.6s ease-in-out infinite;
  }
}
.refresh-btn.is-error {
  --ring: var(--danger);
}
@keyframes ring-pulse {
  50% {
    opacity: 0.3;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}
.btn:hover {
  background: var(--panel-hover);
  border-color: var(--muted-2);
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.btn-primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px rgba(229, 50, 45, 0.28);
}
.btn-primary:hover {
  /* .btn:hover would put the light hover colour behind the white text
     (white on white in light mode): keep the red, a touch brighter. */
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  filter: brightness(1.08);
}
.btn-block {
  width: 100%;
  justify-content: center;
  padding: 11px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.14s ease;
}
.icon-btn:hover {
  color: var(--text);
  background: var(--panel-hover);
}
/* Header buttons (refresh, Instellingen): one 38px rounded square, like the
   Voorpagina / Laatste switch. */
.topbar .icon-btn.refresh-btn,
.topbar .icon-btn.settings-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--panel-2);
}
.icon-btn.danger:hover {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

/* ---------- Notice ---------- */
.notice {
  margin: 14px 22px 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #ffd7a1;
  background: rgba(224, 168, 0, 0.12);
  border: 1px solid rgba(224, 168, 0, 0.35);
}

/* ---------- Layout: content left, latest right ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
  padding: 22px;
  max-width: var(--page-w);
  margin: 0 auto;
}

/* Space between the deck's rows and columns (reading comfort). */
.content {
  --deck-gap: 26px;
  display: flex;
  flex-direction: column;
  gap: var(--deck-gap);
  min-width: 0;
}

.hero-zone {
  display: flex;
  flex-direction: column;
  gap: var(--deck-gap);
}

.row-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--deck-gap);
}
.row-quad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--deck-gap);
}
/* The rows of four come in several grids with the bands between them (see
   deckSegment in app.js), spaced like the rows inside one grid. */
.deck-rows {
  display: flex;
  flex-direction: column;
  gap: var(--deck-gap);
}
/* Stand-in for a part of the deck that is far off-screen (hollowUnit). */
.deck-hollow {
  flex: none;
}
/* No hover effects while the page scrolls under a resting cursor. */
.content.is-scrolling {
  pointer-events: none;
}
/* Sentinel under the deck: reaching it renders the next page of cards. */
/* Sentinel + loader under the deck: reaching it renders the next page. It
   normally triggers 1200px early, so it's only seen when scrolling fast. */
.deck-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 0 28px;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.deck-more[hidden] {
  display: none;
}
.deck-more-dots {
  display: flex;
  gap: 7px;
}
.deck-more-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.35;
  animation: deck-dot 1s ease-in-out infinite;
}
.deck-more-dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.deck-more-dots i:nth-child(3) {
  animation-delay: 0.3s;
}
.deck-more.is-loading .deck-more-dots i {
  animation-duration: 0.6s;
}
@keyframes deck-dot {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0) scale(0.85);
  }
  40% {
    opacity: 1;
    transform: translateY(-5px) scale(1);
  }
}
/* First load: placeholder cards in the feeds' colours + a progress bar
   (startSkeleton in app.js). A feed's cards shimmer until it is in. */
.skeleton {
  display: grid;
  gap: 14px;
  margin-bottom: var(--deck-gap);
}
.load-progress {
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.load-progress-bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--border-soft);
  overflow: hidden;
}
.load-progress-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}
.skeleton-deck {
  display: flex;
  flex-direction: column;
  gap: var(--deck-gap);
}
/* Placeholders are real cards and list rows (startSkeleton), blank: the
   feed's colour washes the photo area and fills the badge, and the text is
   bars sized by the card's own type, so a lead card gets big title bars. */
.skeleton-card {
  cursor: default;
  transition: opacity 0.3s ease;
}
.card.skeleton-card .card-media {
  background: linear-gradient(160deg, color-mix(in srgb, var(--feed) 26%, var(--panel-2)), var(--panel-2) 75%);
}
.skeleton-card .source-badge {
  background: color-mix(in srgb, var(--feed) 60%, rgba(14, 16, 22, 0.55));
}
.skeleton-card .card-summary {
  display: block;
}
.skeleton-line {
  display: block;
  height: 0.78em;
  margin: 0.28em 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
}
.skeleton-line.is-short {
  width: 62%;
}
.skeleton-line.is-meta {
  width: 96px;
  height: 10px;
  margin: 0;
}
.skeleton-line.is-chip {
  width: 64px;
  height: 18px;
  margin: 2px 0 0;
  border-radius: 999px;
}
.news-row.skeleton-card .news-main {
  flex: 1;
  min-width: 0;
}
.news-row.skeleton-card .skeleton-line {
  height: 12px;
  margin: 7px 0 0;
  background: var(--panel-2);
}
.news-row.skeleton-card .skeleton-line.is-meta {
  margin: 0;
  background: color-mix(in srgb, var(--feed) 45%, var(--panel-2));
}
.news-row.skeleton-card .news-thumb {
  background: linear-gradient(135deg, color-mix(in srgb, var(--feed) 30%, var(--panel-2)), var(--border-soft));
}
/* Still waiting for this feed: dimmed, with a sweep of light. */
.skeleton-card.is-pending {
  opacity: 0.6;
}
.skeleton-card.is-pending .card-media::after,
.skeleton-card.is-pending .news-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.09) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s linear infinite;
}
.news-row.skeleton-card .news-thumb {
  position: relative;
}
@keyframes skeleton-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-card.is-pending .card-media::after,
  .skeleton-card.is-pending .news-thumb::after {
    animation: none;
  }
  .load-progress-bar i {
    transition: none;
  }
}
/* Far off-screen cards: skipped by layout/paint, size kept (see watchFar). */
.is-far {
  content-visibility: auto; /* its exact size is set inline (watchFar) */
}
.row-trio:empty {
  display: none;
}

/* Gold (discovery) / purple (regional) row: a full-width row among the rows
   of four, with the same cards. No box of its own: just a solid line in its
   colour in the page margin to its left, and a coloured title. */
.band {
  --band: var(--gold);
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.band::before {
  content: '';
  position: absolute;
  top: 2px;
  bottom: 0;
  left: -14px;
  width: 4px;
  border-radius: 2px;
  background: var(--band);
}
.band--regional {
  --band: var(--regional);
}
.band-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.band-nav {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}
.band--fits .band-nav {
  display: none;
}
.icon-btn.band-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 19px;
  line-height: 1;
  color: var(--band);
  border-color: color-mix(in srgb, var(--band) 45%, transparent);
  background: color-mix(in srgb, var(--band) 10%, var(--panel));
}
.icon-btn.band-arrow:hover:not(:disabled) {
  background: color-mix(in srgb, var(--band) 22%, var(--panel));
}
.icon-btn.band-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
.band-mark {
  color: var(--band);
  font-size: 15px;
}
.band-title {
  color: var(--band);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.band-sub {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--muted);
}
/* A strip of cards, four in view; the arrows (or a swipe) page through it.
   Same gap as the grid, so the cards line up with the rows around it. */
.band-cards {
  --band-visible: 4;
  --band-gap: var(--deck-gap);
  display: flex;
  gap: var(--band-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.band-cards::-webkit-scrollbar {
  display: none;
}
.band-cards > .card {
  flex: 0 0 calc((100% - (var(--band-visible) - 1) * var(--band-gap)) / var(--band-visible));
  scroll-snap-align: start;
}

/* ---------- Cards ---------- */
/* The image IS the whole card; text sits on a black fade near the bottom. */
.card {
  --feed: var(--muted-2);
  --cat: var(--accent);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 355px;
  background: linear-gradient(165deg, #26282e, #1b1d22 70%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: visible;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.card--new {
  animation: card-in 0.32s ease both;
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.card:hover {
  z-index: 5; /* float the favicon popup above neighbouring cards */
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-sm);
}

/* Photo layer — covers the whole card (rounded + clipped to the card corners) */
.card-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--panel-2), var(--border-soft));
}
.card-media img,
.card-media canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.card:hover .card-media img,
.card:hover .card-media canvas {
  transform: scale(1.06);
}

/* No photo: the feed's favicon, enlarged, centred in the space between the
   header and the text box (on the card's own tint). */
.card-media--icon {
  position: relative;
  inset: auto;
  order: 1;
  flex: 1 1 auto;
  min-height: 0;
  /* Centres the favicon itself: a height: 100% child of a flex-sized box
     doesn't resolve in every browser (Firefox left it at the top). */
  display: grid;
  place-items: center;
  background: none;
}
.card-media--icon > .media-icon {
  width: auto;
  height: auto;
}
/* The favicon grows with the card. */
.card--hero .media-icon {
  --icon-size: 104px;
}
.card--trio .media-icon,
.card--lead .media-icon {
  --icon-size: 72px;
}
.card--quad .media-icon,
.card--band .media-icon,
.card--compact .media-icon {
  --icon-size: 46px;
}
.card--no-media .card-box {
  order: 2;
}

/* Favicon standing in for a missing photo, centred in its box. */
.media-icon {
  --icon-size: 56px;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.media-icon img,
.media-icon .svg svg {
  width: var(--icon-size);
  height: var(--icon-size);
}
.media-icon img {
  object-fit: contain;
  border-radius: 22%;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}
.media-icon .svg {
  display: none;
  color: rgba(255, 255, 255, 0.55);
}
.media-icon.no-icon img {
  display: none;
}
.media-icon.no-icon .svg {
  display: inline-flex;
}
.news-thumb .media-icon,
.groupm-thumb .media-icon {
  --icon-size: 30px;
}
/* The favicon keeps its own size: .news-thumb img (a photo) would stretch
   and crop it to the whole thumbnail. */
.news-thumb .media-icon img,
.groupm-thumb .media-icon img {
  width: var(--icon-size);
  height: var(--icon-size);
  object-fit: contain;
}
.news-thumb .media-icon .svg,
.groupm-thumb .media-icon .svg {
  color: var(--muted-2);
}

/* No photo: tint the card with the feed's colour (as the mobile list does),
   dark enough that the white text stays readable. The light theme gets a
   light tint, with the photo cards' dark text box on it. */
.card--no-media {
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--feed) 34%, #26282e),
    color-mix(in srgb, var(--feed) 14%, #1b1d22) 70%
  );
}
html[data-theme='light'] .card--no-media {
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--feed) 30%, #ffffff),
    color-mix(in srgb, var(--feed) 12%, #f4f6fa) 70%
  );
  border-color: color-mix(in srgb, var(--feed) 22%, var(--border));
}
html[data-theme='light'] .card--no-media .card-box {
  background: rgba(14, 16, 22, 0.78);
}
html[data-theme='light'] .card--no-media .media-icon img {
  filter: drop-shadow(0 3px 10px rgba(30, 45, 70, 0.22));
}

/* Discovery pick — a warm gold-grey wash so a story in the gold row reads as
   different from the importance-ranked cards. Matches the gold "Discovery"
   badge and the gold pie segment. This is a separate overlay because
   background-image / gradients cannot be CSS-transitioned — only its
   opacity fades, which is what lets the read-state below animate smoothly
   instead of snapping instantly. */
.card-discovery-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 2s ease;
}
.card--discovery .card-discovery-tint {
  opacity: 1;
  background: linear-gradient(to top, rgba(74, 62, 28, 0.55) 0%, rgba(52, 53, 61, 0.28) 55%, rgba(52, 53, 61, 0) 90%);
}
.card--discovery.card--no-media .card-discovery-tint {
  background: linear-gradient(165deg, rgba(46, 48, 56, 0.55), rgba(33, 35, 41, 0.35) 70%);
}
.card--discovery {
  border-color: color-mix(in srgb, var(--gold) 34%, var(--border-soft));
  transition: border-color 2s ease;
}
.card--discovery:hover {
  border-color: color-mix(in srgb, var(--gold) 58%, transparent);
}

/* Read (but not yet expired) — the gold "you haven't seen this yet" look
   fades out to the plain card look underneath (the tint overlay above simply
   fades to 0 opacity, revealing the card's own background, which
   were never changed), as a quieter "already read" cue than waiting for the
   full fade-and-replace at the end of the window. A fresh pick landing in
   the same slot later gets the gold treatment again (this class is only
   ever applied to the currently-read occupant). */
.card--discovery.card--discovery-read {
  border-color: var(--border-soft);
}
.card--discovery.card--discovery-read:hover {
  border-color: rgba(255, 255, 255, 0.16);
}
.card--discovery.card--discovery-read .card-discovery-tint {
  opacity: 0;
}
/* The badge stays put and legible — it just loses its gold colouring, same
   as the border/tint — rather than disappearing. */
.card--discovery.card--discovery-read .discovery-badge {
  background: color-mix(in srgb, var(--muted-2) 22%, rgba(26, 27, 32, 0.68));
  border-color: color-mix(in srgb, var(--muted-2) 58%, transparent);
  color: var(--muted);
}

/* "Discovery" badge — top-right of a lifted-in card */
.discovery-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 22%, rgba(26, 27, 32, 0.86));
  border: 1px solid color-mix(in srgb, var(--gold) 58%, transparent);
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 2s ease, border-color 2s ease, color 2s ease;
  flex: 0 0 auto;
}
.discovery-badge .svg {
  display: inline-flex;
}

/* Hidden until the card is hovered/focused, so it doesn't clutter the badge
   at rest — click fast-forwards this pick's visibility countdown to expired. */
.discovery-ignore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--gold) 58%, transparent);
  background: color-mix(in srgb, var(--gold) 22%, rgba(26, 27, 32, 0.86));
  color: var(--gold);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  pointer-events: none;
}
.card--discovery:hover .discovery-ignore-btn,
.discovery-ignore-btn:focus-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.discovery-ignore-btn:hover {
  background: var(--gold);
  color: #1a1a1a;
}

/* Card header: favicon + feed name + age, top-left over the photo. */
.card-head {
  position: relative;
  z-index: 3; /* above .card-box (2), so the favicon popup isn't covered by the title */
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 12px 0;
  min-width: 0;
}
.card-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(14, 16, 22, 0.72);
  font-size: 13px;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}
.card-src {
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-time {
  flex: 0 0 auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

/* Source badge — reads well on top of any photo */
.source-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(14, 16, 22, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: default;
  flex: 0 0 auto;
}
.source-badge .favicon {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  object-fit: contain;
}
.source-badge .favicon-fallback {
  display: none;
  color: var(--accent);
}
.source-icon {
  display: inline-grid;
  place-items: center;
}
.source-icon.no-icon .favicon {
  display: none;
}
.source-icon.no-icon .favicon-fallback {
  display: inline-flex;
}
/* Merged story (e.g. AD + Tubantia): one icon per source, side by side. */
.source-badge.is-multi {
  display: inline-flex;
  gap: 5px;
  width: auto;
  padding: 0 7px;
}
/* Smaller cards give the badge a fixed square width (.card--trio,
   .card--compact); a merged one still needs room for both icons, or the
   second covers the name ("ᗡD + Tubantia"). */
.card .card-head .source-badge.is-multi {
  width: auto;
  flex: 0 0 auto;
}

.popup {
  position: absolute;
  top: calc(100% + 8px);
  left: -4px;
  z-index: 60;
  min-width: 180px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 7px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
  pointer-events: none;
}
.source-badge:hover .popup,
.source-badge:focus-visible .popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.popup-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}
.popup-sub {
  font-size: 11.5px;
  color: var(--muted);
}
.popup-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--feed);
}

/* Text box: title, summary, tags and rating on a rounded, darkened panel
   near the bottom of the photo. No backdrop-filter on card parts: each blur is
   its own compositor layer, and hundreds of them made scrolling stutter. */
.card-box {
  position: relative;
  z-index: 2;
  margin: auto 10px 10px;
  padding: 13px 14px 11px;
  border-radius: 12px;
  background: rgba(14, 16, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.card--no-media .card-box {
  background: rgba(14, 16, 22, 0.4);
}
.card-h {
  margin: 0;
  font-size: 16px;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-title {
  text-decoration: none;
  color: #fff;
}
.card-title:hover {
  text-decoration: none;
}
/* Hovering the card underlines the headline instead of lifting the card */
.card:hover .card-title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.72);
}
.card-summary {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Box footer: tag pills on the left, rating on the right. */
.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: #fff;
}
.card-rating-slot {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.card-foot .card-tags {
  flex-wrap: wrap;
  justify-content: flex-start;
  min-width: 0;
}
.card-foot .tag-chip {
  color: #fff;
  background: color-mix(in srgb, var(--cat) 30%, rgba(26, 27, 32, 0.55));
  border-color: color-mix(in srgb, var(--cat) 55%, transparent);
}
.card-foot .tag-chip.more {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Row 1: hero */
.card--hero {
  min-height: 520px;
}
.card--hero .card-head {
  padding: 16px 16px 0;
}
.card--hero .card-box {
  margin: auto 16px 16px;
  max-width: 760px;
  padding: 18px 20px 14px;
  border-radius: 14px;
}
.card--hero .card-h {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.2;
}
.card--hero .card-summary {
  font-size: 15px;
}

/* Row 2: three cards */
.card--trio {
  min-height: 380px;
}
.card--trio .card-h {
  font-size: 18px;
}

/* Row 3 onwards: four compact cards per row, built like the bigger ones —
   the photo fills the card, feed + age top-left, and only the title (with
   category and rating) in the blurred box at the bottom. Wider than tall.
   Cards in a gold / purple row look exactly the same. */
.card--quad,
.card--band {
  min-height: 215px;
}
.card--quad .card-head,
.card--band .card-head {
  gap: 7px;
  padding: 9px 9px 0;
}
.card--quad .source-badge,
.card--band .source-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.card--quad .source-badge .favicon,
.card--band .source-badge .favicon {
  width: 18px;
  height: 18px;
}
.card--quad .source-badge.is-multi,
.card--band .source-badge.is-multi {
  width: auto;
  padding: 0 6px;
  gap: 4px;
}
.card--quad .card-meta,
.card--band .card-meta {
  padding: 4px 9px;
  font-size: 11.5px;
}
.card--quad .card-box,
.card--band .card-box {
  margin: auto 8px 8px;
  padding: 9px 11px 8px;
  border-radius: 10px;
}
.card--quad .card-h,
.card--band .card-h {
  font-size: 14.5px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card--quad .card-summary,
.card--band .card-summary {
  display: none;
}
.card--quad .card-foot,
.card--band .card-foot {
  margin-top: 7px;
}
/* One category (icon + name) next to the rating; a long name is cut off
   rather than pushing the rating out. */
.card--quad .card-tags,
.card--band .card-tags {
  flex-wrap: nowrap;
  overflow: hidden;
}
.card--quad .card-tags > :nth-child(n + 2),
.card--band .card-tags > :nth-child(n + 2) {
  display: none;
}
.card--quad .card-foot .tag-chip,
.card--band .card-foot .tag-chip {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Group label: may wrap onto two lines; the count sits on the folder. */
.card--quad.card--group .card-meta,
.card--band.card--group .card-meta {
  white-space: normal;
  line-height: 1.2;
  border-radius: 9px;
}

/* The row's own header already says "Ontdekken". */
.card--band .discovery-badge {
  display: none;
}
.card--band .discovery-ignore-btn {
  margin-left: auto;
}

/* ---------- Weather (the Uitkijk's Weer tab): report, hours, radar ---------- */
.weather {
  --sky: #8fa3b8;
  display: grid;
  grid-template-areas: 'now' 'radar';
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background:
    radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--sky) 26%, transparent), transparent 70%),
    var(--panel-2);
}
.weather[hidden] {
  display: none;
}
/* The sky behind the report follows the weather (app.js skyOf). */
.weather[data-sky='clear'] {
  --sky: #f5b83d;
}
.weather[data-sky='cloud'] {
  --sky: #8fa3b8;
}
.weather[data-sky='rain'] {
  --sky: #3f86e0;
}
.weather[data-sky='storm'] {
  --sky: #7a63d8;
}
.weather[data-sky='snow'] {
  --sky: #a9cdf0;
}
.weather[data-sky='fog'] {
  --sky: #a3a9b2;
}
.weather[data-sky='night'] {
  --sky: #5867c4;
}
.weather-now {
  grid-area: now;
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}
.weather-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.weather-loc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.weather-loc::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.weather-change {
  margin-left: auto;
  padding: 3px 9px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.weather-change:hover {
  border-color: var(--border);
  color: var(--text);
}
.weather-main {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.wx-ic {
  display: inline-grid;
  color: var(--muted);
}
.wx-ic[data-kind='sun'] {
  color: #f0a71f;
}
.wx-ic[data-kind='part'] {
  color: color-mix(in srgb, #f0a71f 55%, var(--muted));
}
.wx-ic[data-kind='rain'] {
  color: #3f86e0;
}
.wx-ic[data-kind='storm'] {
  color: #7a63d8;
}
.wx-ic[data-kind='snow'] {
  color: #7fb2e5;
}
.wx-ic[data-kind='moon'] {
  color: #8b93e6;
}
.weather-icon {
  display: inline-grid;
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--sky) 45%, transparent));
}
.weather-temp {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.weather-sum {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.weather-desc {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.weather-stats {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
}
/* The coming hours, in a row. */
.weather-hours {
  display: grid;
  grid-template-columns: repeat(var(--wh-cols, 8), minmax(0, 1fr));
  margin: 0;
  padding: 8px 4px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  border: 1px solid var(--border-soft);
  list-style: none;
}
.weather-hours[hidden] {
  display: none;
}
/* The hours and the days with an arrow on each side (app.js weatherPage):
   a page further ahead, up to a week. */
.wx-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}
.wx-strip[hidden] {
  display: none;
}
.wx-strip:not(.has-pages) .wx-page {
  visibility: hidden;
}
.wx-page {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.wx-page:hover:not(:disabled) {
  background: var(--panel-hover);
  color: var(--text);
}
.wx-page:disabled {
  opacity: 0.3;
  cursor: default;
}
.wx-page:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
/* An hour on a later day: its weekday in front ("ma 14u"). */
.wh.has-day .wh-time {
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.wh {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
}
.wh-time {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted-2);
}
.wh:first-child .wh-time {
  color: var(--text);
}
.wh-ic {
  font-size: 16px;
  line-height: 1.2;
}
.wh-temp {
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.wh-rain {
  display: none;
  font-size: 9.5px;
  font-weight: 700;
  color: color-mix(in srgb, #3f86e0 70%, var(--muted));
  font-variant-numeric: tabular-nums;
}
.has-rain .wh-rain {
  display: block;
  min-height: 12px;
}
.wh-rain.is-wet {
  color: #3f86e0;
}
.weather-days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.weather-days[hidden] {
  display: none;
}
.weather-day {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  gap: 2px 7px;
  padding: 7px 4px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  font-size: 12px;
}
.weather-day .wd-name {
  grid-column: 1 / -1;
  justify-self: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: capitalize;
}
.weather-day .wd-ic {
  font-size: 15px;
  line-height: 1;
}
.weather-day .wd-temp {
  display: inline-flex;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.weather-day .wd-max {
  font-weight: 700;
}
.weather-day .wd-min {
  color: var(--muted-2);
}

/* The Weer tab fills the part's height. Next to the news (and on a phone)
   the card flips between the report and the radar; the list view keeps
   them side by side. */
.uitkijk .weather {
  flex: 1 0 auto;
  margin: 0;
}
.weather-flipbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border-soft));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.weather-flipbtn:hover {
  background: color-mix(in srgb, var(--accent) 18%, var(--panel));
}
.weather-change + .weather-flipbtn {
  margin-left: -4px;
}
/* Next to the latest news: the Buienradar button slides the radar up from
   below over the forecast, under the card's head (--radar-top, app.js
   setRadarOpen); the expand button opens it large (.radarm). */
.layout:not(.content--list) .weather {
  --wx-pad: 14px;
  position: relative;
  overflow: hidden;
  grid-template-areas: 'now';
  transition: min-height 0.3s ease;
}
.layout:not(.content--list) .weather.is-radar {
  min-height: calc(var(--radar-top, 40px) + 230px);
}
.layout:not(.content--list) .weather-radar:not(.is-popup) {
  position: absolute;
  inset: var(--radar-top, 40px) var(--wx-pad) var(--wx-pad);
  height: auto;
  margin: 0;
  border-radius: 10px;
  transform: translateY(calc(100% + 30px));
  visibility: hidden;
  transition: transform 0.38s cubic-bezier(0.3, 0.1, 0.2, 1), visibility 0s linear 0.38s;
}
.layout:not(.content--list) .weather.is-radar .weather-radar:not(.is-popup) {
  transform: none;
  visibility: visible;
  transition: transform 0.38s cubic-bezier(0.3, 0.1, 0.2, 1), visibility 0s;
}
/* The button that opens it: a clear "Buienradar" pill, filled while open. */
.weather-flipbtn[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.weather-flipbtn[aria-pressed='true']:hover {
  background: var(--accent);
}
.content--list .weather-flipbtn {
  display: none;
}
.content--list .sidebar .weather {
  min-height: 100%;
}

/* --- Radar: drag the map, pinch or +/- to zoom, drag the timeline --- */
.weather-radar {
  grid-area: radar;
  position: relative;
  height: 250px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--map-sea); /* the sea, like RADAR_SEA in app.js (inverted in dark mode) */
  cursor: grab;
  touch-action: none; /* the map takes drags and pinches */
  user-select: none;
  -webkit-user-select: none;
}
.weather-radar.is-panning {
  cursor: grabbing;
}
#radarCanvas {
  display: block;
  width: 100%;
  height: 100%;
}
.radar-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  z-index: 2;
}
.weather-radar-note {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 8px;
  font-size: 11px;
  text-align: center;
  color: #3a4250;
  pointer-events: none;
}
.weather-radar-note[hidden] {
  display: none;
}
.radar-topleft {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: flex;
  gap: 6px;
}
/* The radar's controls look like the alarmering map's (.alarmd-map-ctrl):
   white map buttons with a hairline and a soft shadow, the accent for play
   and the timeline. */
.radar-side {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.radar-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--map-ctrl-edge);
  border-radius: 8px;
  background: var(--map-ctrl-bg);
  color: var(--map-ctrl-ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.radar-btn:hover {
  background: color-mix(in srgb, var(--map-ctrl-ink) 10%, var(--map-ctrl-bg));
}
.radar-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.radar-ic-shrink,
.weather-radar.is-popup .radar-ic-expand {
  display: none;
}
.weather-radar.is-popup .radar-ic-shrink {
  display: block;
}
.radar-time {
  padding: 5px 10px;
  border: 1px solid var(--map-ctrl-edge);
  border-radius: 999px;
  background: var(--map-ctrl-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  color: var(--map-ctrl-ink);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.radar-time[hidden] {
  display: none;
}
.radar-zoom {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--map-ctrl-edge);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.radar-zoom button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: var(--map-ctrl-bg);
  color: var(--map-ctrl-ink);
  cursor: pointer;
}
.radar-zoom button + button {
  border-top: 1px solid var(--map-ctrl-line);
}
.radar-zoom button[hidden] {
  display: none;
}
.radar-zoom button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--map-ctrl-ink) 10%, var(--map-ctrl-bg));
}
.radar-zoom button:disabled {
  color: var(--map-ctrl-off);
  cursor: default;
}
.radar-zoom button:focus-visible,
.radar-play:focus-visible,
.radar-scrub:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.weather-radar-attr {
  position: absolute;
  right: 8px;
  bottom: 50px;
  z-index: 2;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 8.5px;
  letter-spacing: 0.02em;
  color: var(--map-attr-ink);
  background: var(--map-attr-bg);
  pointer-events: none;
}
.radar-player {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 12px 3px 3px;
  border: 1px solid var(--map-ctrl-edge);
  border-radius: 999px;
  background: var(--map-ctrl-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  color: var(--map-ctrl-ink);
  cursor: default;
}
.radar-player[hidden] {
  display: none;
}
.radar-play {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.radar-play:hover {
  background: color-mix(in srgb, var(--accent) 85%, #fff);
}
.radar-ic-play,
.weather-radar.is-paused .radar-ic-pause {
  display: none;
}
.weather-radar.is-paused .radar-ic-play {
  display: block;
  margin-left: 2px;
}
.radar-scrub {
  position: relative;
  flex: 1 1 auto;
  height: 28px;
  cursor: pointer;
  touch-action: none;
  border-radius: 4px;
}
.radar-scrub-bar {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--map-ctrl-line);
}
.radar-scrub-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--accent);
}
.radar-scrub-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.12s ease;
}
.radar-scrub:hover .radar-scrub-knob,
.radar-scrub.is-dragging .radar-scrub-knob {
  transform: scale(1.2);
}
.radar-track-label {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--map-ctrl-muted);
}

/* ---------- The radar, large (app.js openRadarPopup) ---------- */
.radarm {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: 20px;
}
.radarm[hidden] {
  display: none;
}
.radarm-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: var(--overlay-blur);
  -webkit-backdrop-filter: var(--overlay-blur);
  animation: reader-fade 0.2s ease both;
}
.radarm-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1040px, 100%);
  height: min(82vh, 760px);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow);
  animation: reader-in 0.22s ease both;
}
.radarm-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.radarm-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.radarm-loc {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.radarm-head .icon-btn {
  margin-left: auto;
}
.radarm-body {
  flex: 1 1 auto;
  min-height: 0;
}
.weather-radar.is-popup {
  height: 100%;
  border-radius: 0;
}
@media (max-width: 720px) {
  .radarm {
    padding: 0;
  }
  .radarm-panel {
    width: 100%;
  }
}

/* ---------- Right: latest news ---------- */
.sidebar {
  position: sticky;
  top: calc(var(--topbar-h, 104px) + 14px);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 15px;
  max-height: calc(100vh - var(--topbar-h, 104px) - 28px);
  overflow-y: auto;
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-soft);
}
.sidebar-head h2 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.latest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* A timeline (app.js renderLatest), as on nu.nl and NOS: one dotted line
   down the left, a dot on it per article (red while new), and the rows'
   hairline starting right of it. */
.latest-item {
  --tl-pad: 11px;
  position: relative;
  display: flex;
  padding: 0 0 0 26px;
}
.latest-item::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  border-left: 2px dotted var(--border);
}
/* The line starts at the first dot and ends at the last. */
.latest-item:first-child::before {
  top: calc(var(--tl-pad) + 6px);
}
.latest-item:last-child::before {
  bottom: auto;
  height: calc(var(--tl-pad) + 6px);
}
.latest-item:only-child::before {
  display: none;
}
.latest-dot {
  position: absolute;
  /* 6px in: the new dot's 5px ring must stay inside the scrolling list,
     which clips anything left of it. */
  left: 6px;
  top: calc(var(--tl-pad) + 2px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 3px var(--tl-bg, var(--panel));
}
.latest-item.is-read .latest-dot {
  background: var(--border);
}
.latest-item.is-new .latest-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--tl-bg, var(--panel)), 0 0 0 5px color-mix(in srgb, var(--danger) 30%, transparent);
}
.latest-item .latest-body {
  flex: 1;
  padding: var(--tl-pad) 0;
  border-bottom: 1px solid var(--border-soft);
}
.latest-item:last-child .latest-body {
  border-bottom: 0;
}
/* "NIEUW:" in red on the line above a new article's title. */
.latest-new {
  display: none;
}
.latest-item.is-new .latest-new {
  display: block;
  margin-bottom: 1px;
  color: var(--danger);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.latest-body {
  min-width: 0;
}
/* Feed favicon before a source name; the feed's colour dot without one. */
.feed-icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: var(--size, 14px);
  height: var(--size, 14px);
  border-radius: 3px;
  overflow: hidden;
}
.feed-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.feed-icon.is-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--feed);
}
.latest-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  color: var(--text);
}
.latest-title:hover {
  color: var(--accent);
}
.latest-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted-2);
}
.latest-meta .feed-icon {
  margin-right: -1px;
}
.latest-meta .latest-src {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.latest-fresh {
  color: var(--gold);
  font-weight: 700;
}
.sidebar-empty {
  padding: 14px 2px;
  font-size: 13px;
  color: var(--muted-2);
}

/* ---------- Latest-news list view (shown when Rate-based is off) ---------- */
.news-list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.content--list .hero-zone,
.content--list .deck-rows {
  display: none;
}
.content--list .news-list {
  display: block;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}
/* Match the weather bar: let the content span the full page width so both are
   centred on the same axis. */
.content--list .content {
  grid-column: 1 / -1;
}
/* List view (Rate-based off): the list IS the latest feed, so the sidebar goes
   away and the weather widget becomes a centred top bar spanning the page. */
.content--list .sidebar {
  grid-column: 1 / -1;
  order: -1;
  position: static;
  max-height: none;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.content--list .sidebar .uitkijk {
  margin: 0 auto;
  max-width: 800px;
}
/* The report and the radar side by side. */
.content--list .sidebar .weather {
  grid-template-areas: 'now radar';
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 16px;
}
.content--list .sidebar .weather-radar {
  height: auto;
}
.content--list .sidebar-head,
.content--list .latest-list {
  display: none;
}
.news-row {
  --feed: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.14s ease;
}
.news-row:last-child {
  border-bottom: none;
}
/* The clock time: only Laatste's Krant and Koppen styles show it. */
.news-clock {
  display: none;
}
.news-row:hover {
  background: var(--panel-2);
}
.news-row:hover .news-title {
  color: var(--accent);
}
.news-thumb {
  flex: 0 0 auto;
  width: 108px;
  height: 68px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, var(--panel-2), var(--border-soft));
}
.news-thumb img,
.news-thumb canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* No-image placeholder: same footprint, the feed's colour (as on the
   cards), the favicon centred; keeps rows aligned. */
.news-thumb--empty {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--feed) 26%, var(--panel-2)), color-mix(in srgb, var(--feed) 12%, var(--panel-2)));
  border: 1px solid var(--border-soft);
}
.news-main {
  flex: 1 1 auto;
  min-width: 0;
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  font-size: 11.5px;
  color: var(--muted-2);
}
.news-src {
  color: var(--muted);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 45%;
}
.news-new {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.06em;
}
.news-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
}
.news-summary {
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted); /* body text: the stronger grey (was --muted-2, too faint to read) */
}
.news-labels {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: 30%;
}
.news-label-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.news-labels .card-rating-slot {
  display: inline-flex;
  align-items: center;
}

/* ---------- Empty state ---------- */
.empty {
  max-width: 560px;
  margin: 8vh auto;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.empty .empty-action {
  display: block;
  margin: 14px auto 0;
}
.empty strong {
  color: var(--text);
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] {
  display: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: var(--overlay-blur);
  animation: fade-in 0.16s ease;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
.modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  /* clip: like hidden, but focus/scrollIntoView can't scroll the panel itself
     (only .modal-body should scroll). */
  overflow: clip;
  animation: panel-in 0.2s ease;
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}
.modal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-title,
.modal-head h2 {
  margin: 0;
  margin-right: auto;
  font-size: var(--panel-title);
  font-weight: 700;
}
.modal-body {
  padding: 18px;
  overflow-y: auto;
}

/* ---------- Score-info modal (the "i" in the rating popup) ---------- */
.info-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  justify-content: flex-end;
}
.info-modal[hidden] {
  display: none;
}
.info-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: var(--overlay-blur);
  animation: fade-in 0.16s ease;
}
/* The score side panel: slides in from the right, full height. */
.info-panel {
  position: relative;
  width: min(460px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  outline: none;
  animation: drawer-in 0.22s ease;
}
@keyframes drawer-in {
  from {
    transform: translateX(32px);
    opacity: 0;
  }
}
.info-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border-soft);
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}
.info-head-text {
  min-width: 0;
}
.info-kicker {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.info-head h2 {
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
}
.info-body {
  padding: 14px 18px 20px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
}
/* Tabs in the score popup: Uitleg | Dit artikel */
.info-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 18px 0;
  border-bottom: 1px solid var(--border-soft);
}
.info-tab {
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px 8px;
  margin-bottom: -1px;
  cursor: pointer;
}
.info-tab:hover {
  color: var(--text);
}
.info-tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.info-tab[hidden] {
  display: none;
}
.info-body[hidden] {
  display: none;
}

/* Tab 2: which words triggered which score groups */
.explain-loading {
  min-height: 160px;
}
.explain-meta {
  margin: 0 0 6px;
  color: var(--muted-2);
  font-size: 12px;
}
.explain-note {
  color: var(--muted);
  font-size: 12px;
}
.explain-group {
  margin: 6px 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--panel-2);
}
.explain-group.is-muted {
  opacity: 0.6;
}
.explain-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.explain-group-label {
  font-weight: 700;
}
.explain-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--border);
}
.explain-badge.is-main {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 50%, transparent);
}
.explain-badge.is-second {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.explain-group-pts {
  margin-left: auto;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.explain-group-pts.is-zero {
  color: var(--muted-2);
}
.explain-term {
  padding: 5px 0;
  border-top: 1px dashed var(--border-soft);
}
.explain-term:first-of-type {
  border-top: none;
}
.explain-term-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.explain-match {
  font-weight: 700;
}
.explain-rule {
  color: var(--muted-2);
  font-size: 11.5px;
}
.explain-where {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.explain-where--head {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, transparent);
}
.explain-where--body {
  color: var(--muted);
  background: color-mix(in srgb, var(--muted-2) 18%, transparent);
}
.explain-ctx {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.explain-ctx mark {
  color: var(--text);
  background: color-mix(in srgb, var(--gold) 30%, transparent);
  border-radius: 2px;
  padding: 0 1px;
}
.explain-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12.5px;
}
.explain-inline-pts {
  color: var(--gold);
}
.rating-calc-link {
  display: block;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.rating-calc-link:hover {
  text-decoration: underline;
}

.info-body h3 {
  margin: 18px 0 6px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.info-body p {
  margin: 6px 0;
}
.info-body ul {
  margin: 6px 0;
  padding-left: 18px;
}
.info-body li {
  margin: 4px 0;
}
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.info-table td {
  padding: 5px 8px;
  border-top: 1px solid var(--border-soft);
  vertical-align: top;
}
.info-table td:first-child {
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}
.info-table td:last-child {
  color: var(--muted-2);
}

.add-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--panel-2);
}
.add-form h3,
.list-title {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 5px;
}
.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hint-inline {
  font-weight: 400;
  color: var(--muted-2);
  font-size: 11px;
}
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.check-line input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}
.form-actions {
  display: flex;
  gap: 10px;
}
.form-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
  padding: 11px;
}
.form-actions .btn[hidden] {
  display: none;
}
.add-form input[type='text'],
.add-form input[type='url'],
.add-form input:not([type]),
.add-form input[type='password'] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
#f-url,
#f-title,
#f-priority,
#refreshMode {
  width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
#f-url:focus,
#f-title:focus,
#f-priority:focus,
#refreshMode:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.18);
}

.color-control {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--panel);
}
input[type='color'] {
  width: 40px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: none;
  cursor: pointer;
}
input[type='color']::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type='color']::-webkit-color-swatch {
  border: 1px solid var(--border);
  border-radius: 5px;
}
.color-hex {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--muted);
  text-transform: uppercase;
}

.form-error {
  font-size: 13px;
  color: #ffb3b3;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: 6px;
  padding: 8px 11px;
}

.list-title {
  margin: 22px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.hint {
  font-size: 12.5px;
  color: var(--muted-2);
  margin: 6px 0 12px;
}

.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.feed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--panel-2);
}
.feed-fav {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  flex: 0 0 auto;
}
.feed-fav img {
  width: 17px;
  height: 17px;
  border-radius: 3px;
  object-fit: contain;
}
.feed-info {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
}
.feed-name {
  font-weight: 600;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-url {
  font-size: 11.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-auto {
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 999px;
  padding: 2px 7px;
}
.feed-priority {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.05em;
}
.feed-row.is-editing {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}
.feed-colors {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.swatch {
  display: flex;
  align-items: center;
  gap: 4px;
}
.swatch input[type='color'] {
  width: 26px;
  height: 26px;
  border-radius: 5px;
}
.swatch-label {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.feed-cat {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--cat, var(--muted));
  background: color-mix(in srgb, var(--cat, var(--panel)) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat, var(--border)) 42%, transparent);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Tags ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.tab-panel[hidden] {
  display: none;
}

.tag-chip {
  --cat: var(--accent);
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cat);
  background: color-mix(in srgb, var(--cat) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat) 42%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.tag-chip .cat-icon {
  flex: 0 0 auto;
  margin-right: 4px;
}
.tag-chip.more {
  color: var(--muted);
  background: var(--panel-2);
  border-color: var(--border-soft);
}

.card-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow: hidden;
  justify-content: flex-end;
  min-width: 0;
}

/* ---------- Automatic importance stars ---------- */
.card-head-side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
/* Rating pie — a three-segment donut: green = importance, gold = discovery,
   grey = unmatched capacity. Segment lengths are normalised in ranking.js so
   the three always sum to the full ring. */
.rating-pie {
  flex: 0 0 auto;
  display: block;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
.rating-pie circle {
  fill: none;
  stroke-width: 4.2;
  stroke-linecap: butt;
}
.pie-neutral {
  stroke: color-mix(in srgb, var(--muted-2) 32%, transparent);
}
.pie-importance {
  stroke: var(--ok);
}
.pie-favorite {
  stroke: var(--favorite);
}
/* Points lost to age: the importance colour, faded. */
.pie-aged {
  stroke: color-mix(in srgb, var(--ok) 40%, transparent);
}
.pie-pref {
  stroke: var(--pref-more);
}
/* Points a disliked topic took away: the "less" colour, faded. */
.pie-less {
  stroke: color-mix(in srgb, var(--pref-less) 45%, transparent);
}
/* Clickable rating pill (a tag-like pill behind the pie) */
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel-hover) 55%, rgba(26, 27, 32, 0.8));
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.rating-pill:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
}
.rating-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.rating-pill-score {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rating-pill-num {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rating-pill--compact {
  gap: 4px;
  margin-left: auto;
  align-self: center;
  padding: 1px 6px;
  background: color-mix(in srgb, var(--panel-hover) 70%, transparent);
  border-color: color-mix(in srgb, var(--muted-2) 30%, transparent);
}
.rating-pill--compact:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
}

/* Rating breakdown popup (opened by clicking the stars) */
.rating-pop {
  position: fixed;
  z-index: 120;
  width: min(280px, calc(100vw - 16px));
  padding: 12px 13px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.45;
}
.rating-pop-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
}
.rating-pop-score {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.rating-pop-score strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.rating-legend-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.rating-legend-swatch.sw-importance {
  background: var(--ok);
}
.rating-legend-swatch.sw-favorite {
  background: var(--favorite);
}
.rating-legend-swatch.sw-aged {
  background: color-mix(in srgb, var(--ok) 40%, transparent);
}
.rating-legend-swatch.sw-pref {
  background: var(--pref-more);
}
.rating-legend-swatch.sw-less {
  background: color-mix(in srgb, var(--pref-less) 45%, transparent);
}
.rating-legend-swatch.is-blank {
  background: none;
}
/* The wheel's parts as rows: colour · what · points, then the score. */
.wheel-rows {
  display: grid;
  gap: 3px;
  margin: 10px 0 4px;
  font-size: 12.5px;
}
.wheel-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.wheel-row-label {
  color: var(--muted);
}
.wheel-row-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.wheel-row.is-loss .wheel-row-val {
  color: var(--muted);
  font-weight: 600;
}
.wheel-row.is-total {
  margin-top: 3px;
  padding-top: 5px;
  border-top: 1px solid var(--border-soft);
}
.wheel-row.is-total .wheel-row-label {
  color: var(--text);
  font-weight: 700;
}
.wheel-scale-note {
  font-size: 11.5px;
  color: var(--muted-2);
  padding-left: 16px;
}
.rating-sum-sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted-2);
}
.rating-legend-swatch.sw-neutral {
  background: color-mix(in srgb, var(--muted-2) 32%, transparent);
}
.rating-pop-sub {
  color: var(--muted);
  margin-bottom: 8px;
}
.rating-pop-title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted-2);
  margin: 9px 0 5px;
}
.rating-pop-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rating-pop-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.rating-pop-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rating-pop-pts {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.rating-pop-pts.is-neg {
  color: var(--danger);
}
.rating-pop-pts--regional {
  color: var(--regional);
}
.rating-pop-pts--regional.is-neg {
  color: var(--danger);
}
.rating-pop-none {
  color: var(--muted);
}
.rating-pop-miss {
  padding: 8px 9px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel-hover) 70%, transparent);
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.55;
}

/* Rating summary popover (click a ring) */
.rating-sum-head {
  display: flex;
  align-items: center;
  gap: 11px;
}
.rating-sum-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rating-sum-score {
  color: var(--muted);
  font-size: 12.5px;
}
.rating-sum-score strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rating-sum-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.rating-sum-chip {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 11.5px;
  font-weight: 600;
}
.rating-sum-chip.is-priority {
  color: var(--favorite);
  border-color: color-mix(in srgb, var(--favorite) 50%, transparent);
}
.rating-sum-none,
.rating-sum-age {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.rating-sum-more {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.rating-sum-more:hover {
  background: var(--panel-hover);
}

/* Discovery / regional bonuses: bars beside (not inside) the importance ring */
.rating-bonuses {
  display: grid;
  gap: 4px;
  margin: 2px 0 6px;
}
.rating-bonus {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}
.rating-bonus-label {
  color: var(--muted);
}
.rating-bonus-track {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted-2) 25%, transparent);
  overflow: hidden;
}
.rating-bonus-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.rating-bonus.is-discovery .rating-bonus-fill {
  background: var(--gold);
}
.rating-bonus.is-regional .rating-bonus-fill {
  background: var(--regional);
}
.rating-bonus-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rating-bonus.is-discovery .rating-bonus-val {
  color: var(--gold);
}
.rating-bonus.is-regional .rating-bonus-val {
  color: var(--regional);
}

/* Score calculation: signals at publication, × recency weight, = importance */
.rating-calc-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.rating-calc-hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.rating-pop-row.is-priority .rating-pop-label,
.rating-pop-row.is-priority .rating-pop-pts {
  color: var(--favorite);
}
.rating-calc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}
.rating-calc-row.is-subtotal {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
}
.rating-calc-row.is-recency .rating-calc-val {
  color: color-mix(in srgb, var(--ok) 55%, var(--muted));
}
.rating-calc-row.is-total {
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px solid var(--border);
  font-weight: 800;
}
.rating-calc-row.is-total .rating-calc-val {
  color: var(--ok);
}
.rating-calc-val {
  flex: 0 0 auto;
  font-weight: 700;
}
.rating-calc-age {
  color: var(--muted-2);
  font-weight: 400;
}
.rating-calc-note {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11px;
}
.rating-curve-wrap {
  margin: 4px 0 2px;
}
.rating-curve {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.rating-curve-fill {
  fill: color-mix(in srgb, var(--ok) 12%, transparent);
}
.rating-curve-line {
  fill: none;
  stroke: color-mix(in srgb, var(--ok) 70%, transparent);
  stroke-width: 1.5;
}
.rating-curve-axis {
  stroke: var(--border);
  stroke-width: 1;
}
.rating-curve-tick {
  font-size: 8px;
  fill: var(--muted-2);
}
.rating-curve-drop {
  stroke: var(--ok);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
.rating-curve-dot {
  fill: var(--ok);
  stroke: var(--panel);
  stroke-width: 1.5;
}

/* Checkbox tag picker (in the Add feed form) */
.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  min-height: 44px;
}
.tag-check {
  --cat: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--panel-2);
  cursor: pointer;
  transition: all 0.12s ease;
}
.tag-check:hover {
  border-color: var(--muted-2);
}
.tag-check:has(input:checked) {
  border-color: color-mix(in srgb, var(--cat) 60%, transparent);
  background: color-mix(in srgb, var(--cat) 16%, transparent);
}
.tag-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--cat);
}
.tag-check span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

/* Tag manager (Tags tab) */
.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--panel-2);
}
.tag-row input[type='color'] {
  width: 30px;
  height: 30px;
}
/* The category's icon, in its colour; click to open the icon picker. */
.tag-icon-btn {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--cat, var(--accent)) 45%, transparent);
  background: color-mix(in srgb, var(--cat, var(--accent)) 14%, transparent);
  color: var(--cat, var(--accent));
  cursor: pointer;
}
/* A guest's category icon is only a picture (app.js renderIntroCategories). */
.tag-icon-static {
  cursor: default;
}
.tag-icon-btn:not(.tag-icon-static):hover,
.tag-icon-btn[aria-expanded='true'] {
  background: color-mix(in srgb, var(--cat, var(--accent)) 26%, transparent);
}
.icon-current {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-current-preview {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--cat, var(--accent));
  border: 1px solid color-mix(in srgb, var(--cat, var(--accent)) 60%, transparent);
  background: color-mix(in srgb, var(--cat, var(--accent)) 16%, transparent);
}
.icon-current-name {
  flex: 1;
  color: var(--muted);
}
.icon-current + .icon-grid {
  margin-top: 8px;
}
.icon-grid[hidden] {
  display: none;
}
.tag-icon-row {
  padding: 2px 0 6px;
}
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--panel);
}
.icon-choice {
  display: grid;
  place-items: center;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.icon-choice:hover {
  color: var(--text);
  background: var(--panel-2);
}
.icon-choice.is-on {
  color: var(--cat, var(--accent));
  border-color: color-mix(in srgb, var(--cat, var(--accent)) 60%, transparent);
  background: color-mix(in srgb, var(--cat, var(--accent)) 16%, transparent);
}
.icon-choice:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.tag-name-input {
  /* Grows into the free room instead of starting at an input's built-in
     width (~20 characters), which pushed Categorieën wider than a phone. */
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}
.tag-name-input:hover {
  border-color: var(--border-soft);
}
.tag-name-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.16);
}
.tag-feedcount {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--muted-2);
  white-space: nowrap;
}

/* Feed subscription row tag chips */
.feed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  max-width: 210px;
  flex: 0 0 auto;
}

/* ---------- Article reader ---------- */
.reader {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 24px;
}
.reader[hidden] {
  display: none;
}
body.reader-open {
  overflow: hidden;
}
.reader-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: var(--overlay-blur);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  animation: reader-fade 0.2s ease both;
}
@keyframes reader-fade {
  from {
    opacity: 0;
  }
}
.reader-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1220px, 100%);
  max-height: min(90vh, 1000px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: reader-in 0.22s ease both;
}
@keyframes reader-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}
.reader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.reader-source {
  --feed: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--feed);
}
.reader-scroll {
  overflow-y: auto;
  padding: 26px 34px 34px;
  overscroll-behavior: contain;
}
.reader-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.015em;
}
/* One readable column (~70 characters a line) in the wide reader: title,
   meta and text line up, left-aligned. */
.reader-scroll > .reader-title,
.reader-scroll > .reader-meta,
.reader-scroll > .reader-revision-bar,
.reader-scroll > .reader-body {
  max-width: 740px;
  margin-left: auto;
  margin-right: auto;
}
.reader-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  font-size: 12.5px;
  color: var(--muted-2);
}
.reader-body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  overflow-wrap: break-word;
}
.reader-body img,
.reader-body video,
.reader-body iframe {
  display: block;
  float: none;
  max-width: 100%;
  height: auto;
  border-radius: 0; /* article photos stay unrounded */
  margin: 14px auto; /* centred */
}
.reader-body figure {
  margin: 16px 0;
}
.reader-body figcaption {
  font-size: 12.5px;
  color: var(--muted-2);
  text-align: center;
}
/* Lead photo: a fixed 16:9 frame (never taller than 420px), cropped to fill.
   Small or portrait photos (.is-fit) are shown whole on a blurred, enlarged
   copy of themselves instead of being stretched. */
.reader-scroll > .reader-hero,
.reader-scroll > .reader-media {
  max-width: 740px;
  margin-left: auto;
  margin-right: auto;
}
.reader-hero {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 420px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--panel-2);
  cursor: zoom-in;
}
.reader-hero[hidden] {
  display: none;
}
.reader-hero > img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reader-hero-bg {
  display: none;
}
.reader-hero.is-fit .reader-hero-bg {
  display: block;
  position: absolute;
  inset: -30px;
  background: var(--hero) center / cover no-repeat;
  filter: blur(26px) brightness(0.65) saturate(1.1);
}
.reader-hero.is-fit > img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
/* Strip of the article's photos and videos, right under the lead photo. */
.reader-media {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.reader-media[hidden] {
  display: none;
}
.reader-media-count {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 600;
}
.reader-media-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.reader-thumb {
  position: relative;
  flex: none;
  width: 92px;
  height: 62px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-2);
  cursor: pointer;
}
.reader-thumb:hover,
.reader-thumb:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.reader-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reader-thumb--video {
  background: #15171b;
}
.reader-thumb .media-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
}
/* A play button: dark disc with a white triangle. */
.media-play {
  position: relative;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.media-play::after {
  content: '';
  position: absolute;
  left: 54%;
  top: 50%;
  border-style: solid;
  border-width: 0.3em 0 0.3em 0.5em;
  border-color: transparent transparent transparent #fff;
  transform: translate(-50%, -50%);
}
.reader-thumb .media-play::after {
  font-size: 11px;
}
.media-play {
  font-size: 24px;
}
/* Click-to-load player: nothing comes from the video site until clicked. */
.media-embed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 16px 0;
  padding: 16px;
  border: 0;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 40%, #2b2f38, #121418);
  color: #fff;
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.media-embed:hover .media-play,
.media-embed:focus-visible .media-play {
  background: var(--accent);
}
.media-embed-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.media-embed-text strong {
  font-size: 15px;
}
.media-embed-text span {
  font-size: 12px;
  opacity: 0.7;
}
.media-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 16px 0;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}
.reader-body .media-frame iframe {
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
}
.reader-body video {
  width: 100%;
  border-radius: 8px;
  background: #000;
}
/* A video or social post we can only link to (NOS, Instagram, …). */
.media-link {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
}
.reader-body a.media-link {
  color: var(--text);
  text-decoration: none;
}
.media-link:hover {
  border-color: var(--accent);
}
.media-link-thumb {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 150px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #15171b;
}
.reader-body .media-link-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}
.media-link .media-play {
  width: 40px;
  height: 40px;
  font-size: 17px;
}
.media-link-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  line-height: 1.35;
}
.media-link-text strong {
  font-size: 14.5px;
}
.media-link-text span {
  color: var(--muted);
  font-size: 12.5px;
}
@media (max-width: 720px) {
  .reader-hero {
    max-height: 240px;
    border-radius: 0;
  }
  .media-link-thumb {
    width: 104px;
  }
}

/* Photo viewer. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(8, 9, 11, 0.94);
  /* Pinch, pan and swipe are handled by app.js (wireLightbox). */
  touch-action: none;
}
.lightbox[hidden] {
  display: none;
}
.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0;
  max-width: 92vw;
}
.lightbox-figure img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
  transform-origin: center;
  will-change: transform;
}
.lightbox.is-zoomed .lightbox-figure img {
  cursor: grab;
}
.lightbox.is-zoomed .lightbox-figure img:active {
  cursor: grabbing;
}
/* Zoomed in: the caption and arrows make room for the photo. */
.lightbox.is-zoomed .lightbox-figure figcaption,
.lightbox.is-zoomed .lightbox-nav {
  opacity: 0;
  pointer-events: none;
}
.lightbox-zoom {
  position: absolute;
  right: 16px;
  bottom: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(20, 22, 26, 0.72);
}
.lightbox-zoom button {
  height: 32px;
  min-width: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-zoom .lightbox-zoom-level {
  min-width: 56px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #d6d8dd;
}
.lightbox-zoom button:hover {
  background: rgba(255, 255, 255, 0.14);
}
/* A photo in an article opens the viewer. */
.reader-body img[data-zoomable] {
  cursor: zoom-in;
}
.lightbox-figure figcaption {
  max-width: 760px;
  color: #d6d8dd;
  font-size: 13.5px;
  text-align: center;
}
.lightbox-figure figcaption:empty {
  display: none;
}
.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-nav[hidden] {
  display: none;
}
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}
.lightbox-prev {
  left: 16px;
}
.lightbox-next {
  right: 16px;
}
.lightbox-count {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: #c4c7cd;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .lightbox-nav {
    display: none;
  }
}

/* Revised since first seen: a pencil and a count. A button: clicking it
   shows the edits (see renderReaderRevisions in app.js). */
.revision-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 1px 3px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  color: inherit;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.revision-badge:hover {
  opacity: 1;
  color: var(--revision);
}
.revision-badge:focus-visible {
  outline: 2px solid var(--revision);
  outline-offset: 1px;
}
.revision-badge .svg {
  display: inline-flex;
}

/* The edits view (pencil → #revView): the full current article with every
   edit marked. Added words in the edit's own colour, italic and underlined;
   removed words always red and struck through. */
.revview {
  z-index: 90; /* over the reader it may be opened from */
}
.revview-label {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.rev-ins,
.rev-c1 { --rev-c: var(--rev-1); }
.rev-c2 { --rev-c: var(--rev-2); }
.rev-c3 { --rev-c: var(--rev-3); }
.rev-c4 { --rev-c: var(--rev-4); }
.rev-c5 { --rev-c: var(--rev-5); }
.rev-c6 { --rev-c: var(--rev-6); }
.rev-ins {
  color: var(--rev-c);
  font-style: italic;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--rev-c);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  background: color-mix(in srgb, var(--rev-c) 16%, transparent);
  border-radius: 3px;
  padding: 0 2px;
  cursor: help;
}
.rev-del {
  color: var(--revision-del);
  text-decoration: line-through;
  text-decoration-color: var(--revision-del);
  text-decoration-thickness: 2px;
  cursor: help;
}
/* A removal directly against what replaced it ("nee" → "ja" in quotes):
   a hairline gap so the two don't read as one word. */
.rev-del + .rev-ins {
  margin-left: 0.15em;
}
.reader-body .rev-del-block {
  padding-left: 12px;
  border-left: 3px solid var(--revision-del);
}
/* An edit switched off: its added words read as plain text, its removals hide. */
.rev-ins.rev-off {
  color: inherit;
  font-style: inherit;
  font-weight: inherit;
  text-decoration: none;
  background: none;
  padding: 0;
  cursor: auto;
}
.rev-del.rev-off,
.rev-del-block:has(> .rev-off),
.reader-body .rev-photo.rev-off {
  display: none;
}
/* The change ↑/↓ jumped to. */
.rev-current {
  outline: 2px solid var(--rev-c, var(--revision-del));
  outline-offset: 3px;
  border-radius: 3px;
}
.rev-del.rev-current {
  outline-color: var(--revision-del);
}
/* A changed photo: was → became, at the top of the text. */
.reader-body .rev-photo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 20px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--rev-c) 50%, var(--border));
  border-left: 4px solid var(--rev-c);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: help;
}
.rev-photo-pic {
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}
.reader-body .rev-photo img,
.rev-photo-none {
  display: grid;
  place-items: center;
  width: 120px;
  height: 80px;
  margin: 0;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.reader-body .rev-photo-pic:first-child img {
  opacity: 0.65;
  outline: 2px solid var(--revision-del);
}
.rev-photo-arrow {
  font-size: 18px;
  color: var(--muted);
}
.reader-body .rev-photo figcaption {
  flex: 1 1 160px;
  margin: 0;
  font-weight: 600;
  color: var(--rev-c);
}

/* The bar on top of the edits view; stays in view while scrolling. */
.reader-revision-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  gap: 9px;
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--text);
}
.reader-revision-bar p {
  margin: 0;
}
.rev-bar-title {
  font-weight: 700;
  line-height: 1.4;
}
.rev-bar-note {
  font-size: 11.5px;
  color: var(--muted-2);
}
.rev-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rev-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px 4px 10px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  background: color-mix(in srgb, var(--rev-c) 14%, var(--panel));
  border: 1.5px solid var(--rev-c);
  border-radius: 999px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.rev-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rev-c);
}
.rev-chip-when {
  font-weight: 500;
  color: var(--muted);
}
.rev-chip-n {
  min-width: 20px;
  padding: 1px 6px;
  font-size: 11px;
  text-align: center;
  border-radius: 999px;
  color: var(--panel);
  background: var(--rev-c);
}
/* Switched off: hollow, its colour gone. */
.rev-chip[aria-pressed='false'] {
  background: none;
  border-color: var(--border);
  border-style: dashed;
  color: var(--muted-2);
}
.rev-chip[aria-pressed='false'] .rev-chip-dot {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--muted-2);
}
.rev-chip[aria-pressed='false'] .rev-chip-n {
  color: var(--muted-2);
  background: var(--panel);
}
.rev-bar-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}
.rev-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: 12.5px;
}
.rev-legend .rev-ins,
.rev-legend .rev-del {
  cursor: auto;
}
.rev-legend-hint {
  font-size: 11.5px;
  color: var(--muted-2);
}
.rev-bar-walk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  white-space: nowrap;
}
.rev-pos {
  margin-right: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rev-bar-btn {
  min-width: 34px;
  padding: 4px 10px;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.rev-bar-btn:hover {
  border-color: var(--muted);
}
.rev-chip:focus-visible,
.rev-bar-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* "Verwijderde tekst tonen" off: removed words and paragraphs hide, so the
   current text reads normally with only the additions coloured. */
.rev-hide-deleted .rev-del,
.rev-hide-deleted .rev-del-block {
  display: none;
}
.rev-legend .rev-del {
  display: inline;
}
.rev-hide-deleted .rev-legend .rev-del {
  opacity: 0.4;
}
.switch-line.rev-del-switch {
  --switch-on: var(--revision-del);
  align-items: center;
  gap: 8px;
  padding: 0;
  font-size: 12.5px;
}
.rev-del-switch .switch {
  margin-top: 0;
}
.rev-full-note {
  font-size: 12.5px;
  color: var(--muted);
  font-style: italic;
}
.reader-body .rev-hero {
  margin: 0 0 18px;
}
.reader-body .rev-hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* The edits view's sections: the current version (open by default), then
   each earlier version in full, folded away under an arrow. */
.reader-scroll > .rev-section,
.reader-scroll > .rev-older {
  max-width: 740px;
  margin-left: auto;
  margin-right: auto;
}
.rev-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-sm);
}
.rev-section-head::-webkit-details-marker {
  display: none;
}
.rev-section-head:hover {
  background: var(--panel-2);
}
.rev-section-head:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.rev-section-arrow {
  width: 8px;
  height: 8px;
  margin: 0 4px 0 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.rev-section[open] > .rev-section-head .rev-section-arrow {
  transform: rotate(45deg);
}
.rev-section-when {
  font-weight: 500;
  font-size: 12.5px;
  color: var(--muted);
}
#revCurrentBox > .rev-section-head {
  margin-bottom: 8px;
  color: var(--muted);
}
.rev-older {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.rev-older-head {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}
.rev-section--old {
  border-bottom: 1px solid var(--border-soft);
}
.rev-section--old[open] {
  padding-bottom: 18px;
}
.rev-old-content {
  padding-left: 14px;
  border-left: 3px solid var(--rev-c, var(--border));
}
.rev-old-title {
  margin-top: 8px;
  padding-top: 2px;
  font-size: clamp(19px, 2.4vw, 24px);
}
.rev-old-photo {
  margin: 0 0 14px;
}
.rev-old-photo img {
  max-width: 100%;
  max-height: 280px;
  border-radius: var(--radius);
  object-fit: cover;
}

/* Hover (or tap) on a change: which edit, and when. */
.rev-tip {
  position: fixed;
  z-index: 1000;
  max-width: min(340px, calc(100vw - 16px));
  padding: 6px 9px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}
@media (max-width: 720px) {
  .rev-legend-hint {
    display: none;
  }
}

.reader-body p {
  margin: 0 0 15px;
}
.reader-body a {
  color: var(--accent);
}
/* The same sizes in every article, whatever the feed used. */
.reader-body h1,
.reader-body h2,
.reader-body h3,
.reader-body h4,
.reader-body h5,
.reader-body h6 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 24px 0 8px;
}
.reader-body h1,
.reader-body h2 {
  font-size: 19px;
}
.reader-body small,
.reader-body sub,
.reader-body sup {
  font-size: 0.8em;
}
.reader-body big,
.reader-body font {
  font-size: inherit;
}
.reader-body table {
  max-width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.reader-body td,
.reader-body th {
  padding: 4px 8px;
  border: 1px solid var(--border-soft);
  vertical-align: top;
}
.reader-body ul,
.reader-body ol {
  margin: 0 0 15px;
  padding-left: 22px;
}
.reader-body li {
  margin-bottom: 6px;
}
.reader-body blockquote {
  margin: 18px 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--border);
  color: var(--muted);
}
.reader-body pre {
  overflow-x: auto;
  padding: 12px 14px;
  border-radius: 7px;
  background: var(--panel-2);
  font-size: 13px;
}
.reader-body code {
  font-size: 0.92em;
}
.reader-empty {
  color: var(--muted);
}
/* Scraped full text replaces the feed's teaser and reads like any other
   article body. */
.reader-scrape-body {
  font: inherit;
  color: inherit;
}
/* Shown in place of the article while its page is being scraped. */
.reader-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 240px;
  font-size: 13.5px;
  color: var(--muted);
}
.reader-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: dd-spin 0.7s linear infinite;
}
.reader-head-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
}
/* Is the whole text here? A quiet ✓ / – / ✕ and a word; a click says why. */
.reader-status-wrap {
  position: relative;
  display: inline-flex;
}
.reader-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 4px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-2);
  cursor: pointer;
}
.reader-status[hidden],
.reader-status-why[hidden] {
  display: none;
}
.reader-status:hover,
.reader-status[aria-expanded='true'] {
  color: var(--text);
  background: var(--border-soft);
}
.reader-status .svg {
  display: inline-flex;
}
.reader-status[data-kind='ok'] .reader-status-icon {
  color: var(--ok);
}
.reader-status[data-kind='fail'] .reader-status-icon {
  color: var(--danger);
}
.reader-status[data-kind='busy'] .reader-status-icon svg {
  animation: reader-status-spin 0.9s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .reader-status[data-kind='busy'] .reader-status-icon svg {
    animation: none;
  }
}
@keyframes reader-status-spin {
  to {
    transform: rotate(360deg);
  }
}
.reader-status-why {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: max-content;
  max-width: min(300px, 80vw);
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
}
.reader-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
}
/* `.btn` sets display:inline-flex, which would otherwise beat the `hidden`
   attribute; the scrape button must really disappear for long/link-less items. */
#readerScrape[hidden] {
  display: none;
}
#readerScrape.is-busy {
  opacity: 0.65;
}
.reader-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--panel-2);
}
.reader-rating {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}
.reader-foot .btn {
  text-decoration: none;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%) translateY(10px);
  z-index: 200; /* above every overlay, so "Ongedaan maken" stays clickable */
  padding: 10px 16px;
  border-radius: 7px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast[hidden] {
  display: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
}
.toast-action {
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}
.toast-action:hover {
  text-decoration: underline;
}

/* ---------- Krant front page (app.js renderFront) ----------
   The top news as a block (hero, three, compact cards), then a newspaper
   section per theme: a lead story beside a few headlines (on a phone,
   stacked: see the end of this block). Only in .content.is-front
   (Belangrijkst in the Krant style); otherwise these stay hidden. */
.front-top,
.front-top-more,
.front-sections {
  display: none;
}
.content.is-front #grid {
  display: none;
}
.content.is-front .front-top:not(:empty) {
  display: grid;
}
.content.is-front .front-top-more:not([hidden]) {
  display: inline-flex;
  align-self: center;
}
.content.is-front .front-sections {
  display: flex;
  flex-direction: column;
  gap: 44px;
  margin-top: 22px;
}

/* Compact card: half text (source · age, headline, tags) on a plain panel,
   half photo; no summary. */
.card--compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 170px;
  background: var(--panel);
}
.card--compact .card-media {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1 / -1;
  height: 100%;
  border-radius: 0 var(--radius) var(--radius) 0;
}
/* No photo: the card's plain panel (above) overrides .card--no-media's
   tint, so the photo half gets the feed's colour itself, behind the favicon. */
.card--compact .card-media--icon {
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--feed) 34%, var(--panel-2)),
    color-mix(in srgb, var(--feed) 14%, var(--panel-2)) 70%
  );
}
.card--compact .card-head {
  grid-column: 1;
  grid-row: 1;
}
.card--compact .card-meta {
  padding: 0;
  background: none;
  color: var(--muted);
}
.card--compact .card-time {
  color: var(--muted-2);
  flex: 0 1 auto; /* may shrink here, ending in "…" rather than cut off */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Half a tile (~150px on a computer beside Actueel): a smaller favicon and
   age so "23 min geleden" fits instead of being cut off. */
.card--compact .card-head {
  gap: 7px;
}
.card--compact .card-head .source-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.card--compact .card-meta {
  font-size: 12px;
}
/* Half a card is too narrow for the site's name: its icon says it. */
.card--compact .card-src {
  display: none;
}
.card--compact .card-box {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 6px 12px 12px;
  background: none;
  border: 0;
  border-radius: 0;
}
.card--compact .card-h {
  font-size: 15.5px;
  /* Long Dutch words ("onderzoeksjournalist") break with a hyphen instead
     of running under the photo half and being cut off mid-word. */
  hyphens: auto;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card--compact .card-title {
  color: var(--text);
}
.card--compact .card-summary {
  display: none;
}
.card--compact .card-foot {
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
}
.card--compact .card-tags {
  justify-content: flex-start;
}
.card--compact .card-tags > :nth-child(n + 2) {
  display: none;
}

/* A section: a rule with the theme's name, then the lead story beside the
   headlines. */
.front-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.front-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 2px solid var(--border-soft);
}
.front-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.front-icon {
  display: inline-flex;
  color: var(--accent);
}
.front-section--discovery .front-icon {
  color: var(--gold);
}
.front-section--regional .front-icon {
  color: var(--regional);
}
.front-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.card--lead {
  min-height: 320px;
}
.card--lead .card-h {
  font-size: 19px;
}
.front-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.front-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}
.front-line {
  padding: 11px 0;
  border-top: 1px solid var(--border-soft);
  cursor: pointer;
}
.front-line:first-child {
  border-top: 0;
  padding-top: 2px;
}
.front-line-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
}
.front-line:hover .front-line-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.front-line.is-read .front-line-title {
  color: var(--muted);
}
.front-line-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted-2);
}
.front-line-meta .card-rating-slot {
  margin-left: auto;
}
.front-line-group {
  color: var(--muted);
  font-weight: 600;
}
.front-more.btn {
  margin-top: 6px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 650;
}
.front-more.btn:hover {
  background: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 1180px) {
  .front-body {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Krant on a phone: the hero and the row of three as in Klassiek, the
   compact cards as a list (headline beside a small photo), then each theme
   as a ruled section: a smaller lead card and its headlines. */
@media (max-width: 920px) {
  .content.is-front .front-sections {
    gap: 30px;
    margin-top: 18px;
  }
  .front-section {
    gap: 10px;
  }
  .card--lead {
    min-height: 250px;
  }
}
/* Krant on a smaller computer (beside Actueel): half a tile left ~70-150px
   for the headline, so words and the age were cut off. The text gets 3/5,
   and below 1180px two tiles share a row instead of three. */
@media (min-width: 921px) and (max-width: 1500px) {
  .content.is-front #topRows > .card--compact {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}
@media (min-width: 921px) and (max-width: 1180px) {
  .content.is-front #topRows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .content.is-front #topRows {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 4px;
  }
  .content.is-front #topRows > .card--compact {
    grid-template-columns: minmax(0, 1fr) 112px;
    min-height: 0;
    padding: 12px 0;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--border-soft);
    border-radius: 0;
    box-shadow: none;
  }
  .content.is-front #topRows > .card--compact .card-media {
    align-self: center;
    height: 76px;
    border-radius: 6px;
  }
  /* No photo: the favicon on the feed's tint, as in Klassiek's list. */
  .content.is-front #topRows > .card--compact .card-media--icon {
    background: color-mix(in srgb, var(--feed) 24%, var(--panel-2));
  }
  .content.is-front #topRows > .card--compact .media-icon {
    --icon-size: 34px;
  }
  .content.is-front #topRows > .card--compact .card-head {
    padding: 0 12px 0 0;
  }
  .content.is-front #topRows > .card--compact .card-box {
    padding: 4px 12px 0 0;
  }
  .content.is-front #topRows > .card--compact .card-h {
    font-size: 15px;
    -webkit-line-clamp: 3;
  }
  .content.is-front #topRows > .card--compact .card-foot {
    padding-top: 6px;
  }
  .front-head {
    padding-bottom: 7px;
  }
  .front-title {
    font-size: 17px;
  }
  .card--lead {
    min-height: 230px;
  }
  .card--lead .card-h {
    font-size: 17px;
  }
  .front-line {
    padding: 10px 0;
  }
}

/* ---------- Rustig (Instellingen → Stijl) ----------
   The deck as one calm column: large headlines with a small photo and
   source · age, the top story with a big photo and its summary. No tags,
   no scores, nothing written over a photo. The sidebar stays. */
.content.is-easy .hero-zone,
.content.is-easy .deck-rows,
.content.is-easy .front-sections {
  display: none;
}
.content.is-easy .news-list {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  background: none;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.content.is-easy .news-row {
  align-items: flex-start;
  gap: 18px;
  padding: 18px 4px;
}
.content.is-easy .news-row:hover {
  background: none;
}
.content.is-easy .news-thumb {
  width: 128px;
  height: 84px;
  border-radius: 10px;
}
.content.is-easy .news-meta {
  margin-bottom: 6px;
  font-size: 13px;
}
.content.is-easy .news-title {
  -webkit-line-clamp: 3;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}
.content.is-easy .news-labels,
.content.is-easy .news-summary {
  display: none;
}
.content.is-easy .news-row--lead {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding-top: 0;
}
.content.is-easy .news-row--lead .news-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}
.content.is-easy .news-row--lead .media-icon {
  --icon-size: 76px;
}
.content.is-easy .news-row--lead .news-title {
  font-size: 27px;
  line-height: 1.25;
}
.content.is-easy .news-row--lead .news-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.5;
}
@media (max-width: 720px) {
  .content.is-easy .news-row {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas: 'thumb main';
    column-gap: 14px;
    padding: 16px 2px;
  }
  .content.is-easy .news-thumb {
    width: 96px;
    height: 64px;
  }
  .content.is-easy .news-title {
    font-size: 17px;
  }
  .content.is-easy .news-row--lead {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'thumb' 'main';
    row-gap: 12px;
  }
  .content.is-easy .news-row--lead .news-thumb {
    width: 100%;
    height: auto;
  }
  .content.is-easy .news-row--lead .news-title {
    font-size: 22px;
  }
}

/* ---------- Koppen (Instellingen → Stijl) ----------
   Only headlines: Rustig's list without photos or summaries, numbered,
   tight, so a screen holds many stories. The score shows when Nieuwsscores
   is on (html.hide-scores hides it otherwise). Builds on .is-easy. */
.content.is-headlines .news-list {
  counter-reset: kop;
}
.content.is-headlines .news-row {
  gap: 12px;
  padding: 10px 4px;
}
.content.is-headlines .news-row::before {
  counter-increment: kop;
  content: counter(kop);
  flex: 0 0 26px;
  align-self: flex-start;
  padding-top: 19px;
  font-size: 13px;
  font-weight: 750;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.content.is-headlines .news-thumb {
  display: none;
}
.content.is-headlines .news-meta {
  margin-bottom: 3px;
  font-size: 12px;
}
.content.is-headlines .news-title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
}
.content.is-headlines .news-labels {
  display: flex;
  align-self: center;
}
.content.is-headlines .news-label-tags {
  display: none;
}
@media (max-width: 720px) {
  .content.is-headlines .news-row {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    grid-template-areas: 'num main labels';
    column-gap: 10px;
    padding: 11px 2px;
  }
  .content.is-headlines .news-row::before {
    grid-area: num;
    padding-top: 18px;
    font-size: 12px;
  }
  .content.is-headlines .news-title {
    font-size: 15.5px;
    -webkit-line-clamp: 3;
  }
}

/* ---------- Laatste per article style ----------
   The newest-first list (Belangrijkst off) shows the same rows in every
   style, dressed to match it (app.js sets .latest--<style>):
   Klassiek  the boxed list with photos (the default rules above)
   Krant     a timeline: clock time, a line with a dot in the feed's colour,
             a large headline with its summary, the photo on the right
   Rustig    one calm column: large headlines, a small photo, no labels
   Koppen    a tight list of times and headlines, no photos */

/* Krant: a timeline. */
.content.latest--paper .news-list,
.content.latest--easy .news-list,
.content.latest--headlines .news-list {
  max-width: 780px;
  background: none;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.content.latest--paper .news-row {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  grid-template-areas:
    'clock main thumb'
    'clock labels thumb';
  align-items: start;
  column-gap: 22px;
  row-gap: 6px;
  padding: 14px 0 18px;
  border-bottom: 0;
}
.content.latest--paper .news-row:hover {
  background: none;
}
/* The line, and on it a dot in the feed's colour. */
.content.latest--paper .news-row::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 64px;
  width: 2px;
  background: var(--border-soft);
}
.content.latest--paper .news-row:first-child::before {
  top: 20px;
}
.content.latest--paper .news-row::after {
  content: '';
  position: absolute;
  top: 17px;
  left: 59px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--feed);
  box-shadow: 0 0 0 3px var(--bg);
}
.content.latest--paper .news-clock {
  grid-area: clock;
  display: block;
  padding-top: 0; /* level with the dot and the source line */
  line-height: 20px;
  font-size: 15px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.content.latest--paper .news-main {
  grid-area: main;
}
.content.latest--paper .news-time {
  display: none; /* the clock says it */
}
.content.latest--paper .news-sep {
  display: none;
}
.content.latest--paper .news-meta {
  margin-bottom: 5px;
}
.content.latest--paper .news-title {
  font-size: 18px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.content.latest--paper .news-summary {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.5;
}
.content.latest--paper .news-thumb {
  grid-area: thumb;
  width: 132px;
  height: 88px;
  border-radius: 10px;
}
.content.latest--paper .news-labels {
  grid-area: labels;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  max-width: none;
}

/* Rustig: the homepage's calm column. */
.content.latest--easy .news-row {
  align-items: flex-start;
  gap: 18px;
  padding: 18px 4px;
}
.content.latest--easy .news-row:hover {
  background: none;
}
.content.latest--easy .news-thumb {
  width: 128px;
  height: 84px;
  border-radius: 10px;
}
.content.latest--easy .news-meta {
  margin-bottom: 6px;
  font-size: 13px;
}
.content.latest--easy .news-title {
  -webkit-line-clamp: 3;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}
.content.latest--easy .news-labels,
.content.latest--easy .news-summary {
  display: none;
}

/* Koppen: time, then source and headline, tight. */
.content.latest--headlines .news-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  grid-template-areas: 'clock main labels';
  align-items: start;
  column-gap: 14px;
  padding: 10px 4px;
}
.content.latest--headlines .news-clock {
  grid-area: clock;
  display: block;
  padding-top: 2px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.content.latest--headlines .news-main {
  grid-area: main;
}
.content.latest--headlines .news-thumb,
.content.latest--headlines .news-summary,
.content.latest--headlines .news-label-tags,
.content.latest--headlines .news-time,
.content.latest--headlines .news-sep {
  display: none;
}
.content.latest--headlines .news-meta {
  margin-bottom: 2px;
  font-size: 11.5px;
}
.content.latest--headlines .news-title {
  font-size: 15.5px;
  font-weight: 650;
}
.content.latest--headlines .news-labels {
  grid-area: labels;
  align-self: center;
}

@media (max-width: 720px) {
  .content.latest--paper .news-row {
    grid-template-columns: 44px minmax(0, 1fr) 84px;
    column-gap: 16px;
    padding: 12px 0 16px;
  }
  .content.latest--paper .news-row::before {
    left: 51px;
  }
  .content.latest--paper .news-row::after {
    top: 15px;
    left: 46px;
  }
  .content.latest--paper .news-clock {
    font-size: 13px;
  }
  .content.latest--paper .news-title {
    -webkit-line-clamp: 3;
    font-size: 16px;
  }
  .content.latest--paper .news-summary {
    display: none;
  }
  .content.latest--paper .news-thumb {
    width: 84px;
    height: 58px;
    border-radius: 8px;
  }
  .content.latest--easy .news-row {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas: 'thumb main';
    column-gap: 14px;
    padding: 16px 2px;
  }
  .content.latest--easy .news-thumb {
    width: 96px;
    height: 64px;
  }
  .content.latest--easy .news-title {
    font-size: 17px;
  }
  .content.latest--headlines .news-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    column-gap: 10px;
    padding: 10px 2px;
  }
  .content.latest--headlines .news-clock {
    font-size: 12px;
  }
  .content.latest--headlines .news-title {
    -webkit-line-clamp: 3;
  }
}

/* The article styles in Instellingen → Stijl, once for the computer and
   once for the phone, each with a tiny drawing of its layout (the phone
   ones in a phone outline). The group this screen uses is marked. */
.style-group {
  margin-top: 14px;
}
.style-group-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 750;
  color: var(--muted);
}
.style-now {
  display: none;
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.style-group.is-current .style-now {
  display: inline-block;
}
.style-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.style-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.style-card:hover {
  border-color: var(--muted-2);
}
.style-card[aria-checked='true'] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.style-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.style-name {
  font-weight: 750;
  font-size: 14px;
}
.style-text {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}
/* The drawings: i = a card, u = a headline, b.m-rule = a section rule,
   s = a list row (small photo + text). */
.style-mock {
  display: grid;
  align-content: start;
  width: 100%;
  height: 74px;
  gap: 3px;
  padding: 6px;
  margin-bottom: 4px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--panel-2);
}
.style-mock i,
.style-mock u,
.style-mock b,
.style-mock s {
  display: block;
  border-radius: 2px;
  background: var(--border);
}
.style-mock i {
  height: 12px;
}
.style-mock s {
  height: 9px;
  background: linear-gradient(90deg, var(--border) 0 30%, transparent 30% 38%, var(--border) 38%);
}
.style-mock .m-hero {
  height: 20px;
  background: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.style-mock--classic {
  grid-template-columns: repeat(4, 1fr);
}
.style-mock--classic .m-hero {
  grid-column: 1 / -1;
}
.style-mock--paper {
  grid-template-columns: 1.2fr 1fr 1fr;
}
.style-mock--paper .m-hero,
.style-mock--paper .m-rule {
  grid-column: 1 / -1;
}
.style-mock--paper .m-rule {
  height: 2px;
  margin: 2px 0;
}
.style-mock--paper .m-lead {
  grid-row: span 3;
  height: auto;
}
.style-mock--paper u {
  grid-column: 2 / -1;
  height: 4px;
}
.style-mock--easy {
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 6px 16px;
}
.style-mock--headlines {
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 8px 14px;
}
.style-mock--headlines u {
  height: 4px;
}
.style-mock--headlines u:nth-child(3n + 2) {
  width: 78%;
}
.style-mock--headlines u:nth-child(3n) {
  width: 88%;
}

/* Phone drawings: a narrow screen in a phone outline. */
.style-phone {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 4px;
  padding: 6px 0;
  border-radius: 6px;
  background: var(--panel-2);
}
.style-phone .style-mock {
  width: 46px;
  height: 74px;
  margin: 0;
  padding: 4px 3px;
  gap: 2px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
}
.style-phone .style-mock i {
  height: 8px;
}
.style-phone .style-mock .m-hero {
  height: 16px;
}
.style-phone .style-mock s {
  height: 6px;
}
.style-phone .style-mock u {
  height: 3px;
}
.style-phone .style-mock .m-rule {
  height: 1.5px;
  margin: 1px 0;
}
.style-mock--m-classic {
  grid-template-columns: 1fr 1fr;
}
.style-mock--m-classic .m-hero,
.style-mock--m-classic s {
  grid-column: 1 / -1;
}
.style-mock--m-paper,
.style-mock--m-easy {
  grid-template-columns: 1fr;
}
.style-phone .style-mock--m-paper .m-lead {
  height: 11px;
}
.style-phone .style-mock--m-easy .m-hero {
  height: 20px;
}
.style-phone .style-mock--m-easy .m-head {
  width: 85%;
  margin-bottom: 2px;
}
.style-phone .style-mock--m-easy s {
  height: 8px;
}
.style-phone .style-mock--headlines {
  gap: 4px;
  padding: 5px 4px;
}
@media (max-width: 720px) {
  .style-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .row-quad {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .band-cards {
    --band-visible: 3;
  }
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .row-quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .band-cards {
    --band-visible: 2;
  }
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }
  .sidebar {
    position: static;
    max-height: none;
    order: -1;
  }
}

@media (max-width: 920px) {
  /* Sections get the full width; ordering + toggles move to their own row. */
  .sectionbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .view-controls {
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: none;
  }
}

@media (max-width: 720px) {
  .masthead {
    flex-wrap: wrap;
    padding: 10px 14px 6px;
    gap: 10px;
  }
  .sectionbar {
    padding: 0 14px;
  }
  .topbar-start {
    display: contents;
  }
  .brand {
    order: 1;
  }
  /* Phones: the wordmark is there at first, then fades out and slides back
     into the logo, leaving just the logo in the header. */
  .brand-logo {
    width: 34px;
    height: 34px;
  }
  .brand {
    gap: 0;
  }
  .brand-text {
    margin-left: 9px;
    max-width: 180px;
    animation: brand-fold 0.6s ease-in 2.4s both;
  }
  .brand-name {
    font-size: 19px;
    animation: none;
  }
  .brand-tagline {
    font-size: 10.5px;
    animation: none;
  }
  @keyframes brand-fold {
    to {
      opacity: 0;
      transform: translateX(-40px);
      max-width: 0;
      margin-left: 0;
    }
  }
  .topbar-end {
    order: 2;
    margin-left: auto;
  }
  .search-box {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  .btn-label {
    display: none;
  }
  .search-results-inner {
    padding: 10px 14px;
  }
  .layout {
    padding: 12px;
    gap: 14px;
  }
  .news-thumb {
    width: 84px;
    height: 56px;
  }
  /* Narrow screens: stack the report above the radar. */
  .content--list .sidebar .weather {
    grid-template-areas: 'now' 'radar';
    grid-template-columns: minmax(0, 1fr);
  }
  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  /* The refresh countdown is information, not decoration: keep its timing. */
  .refresh-btn.is-counting {
    animation-duration: var(--ring-ms, 20s) !important;
  }
}

/* ---------- Share tab (export / import config) ---------- */
.share-text {
  margin: 0;
  font-size: 12.5px;
}
a.btn-block {
  text-decoration: none;
}
.share-import {
  margin-top: 16px;
}
.share-import input[type='file'] {
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  max-width: 100%;
}
.import-preview {
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.import-names {
  margin: 8px 0 0;
  padding-left: 18px;
  max-height: 160px;
  overflow-y: auto;
  color: var(--muted);
  font-size: 12.5px;
}
.import-mode {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.import-mode legend {
  padding: 0;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.import-mode .hint-inline {
  margin: 0 0 6px 24px;
}
.share-import .btn-block:disabled {
  opacity: 0.5;
  cursor: default;
  filter: none;
}

/* ---------- Footer: credit + disclaimer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 12px;
  padding: 16px 22px 8px;
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  max-width: var(--page-w);
  margin: 0 auto;
}
.site-footer-credit {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.site-footer-link {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.site-footer-link:hover {
  color: var(--text);
}
.site-footer-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
@media (max-width: 720px) {
  .site-footer {
    padding: 16px 16px 8px;
  }
}
.import-mode[hidden] {
  display: none;
}

/* ---------- Login / create account ---------- */
.auth-page {
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.auth-wrap {
  width: 100%;
  max-width: 380px;
  display: grid;
  gap: 18px;
}
.auth-brand {
  justify-content: center;
}
.auth-brand .brand-logo {
  width: 48px;
  height: 48px;
}
.auth-brand .brand-name {
  font-size: 26px;
}
.auth-brand .brand-text,
.auth-brand .brand-name,
.auth-brand .brand-tagline {
  animation: none !important; /* no slide-in, and no folding away on phones */
}
.auth-brand.brand {
  gap: 10px;
}
.auth-brand .brand-text {
  margin-left: 0;
  max-width: none;
}
.auth-card {
  padding: 22px;
  gap: 14px;
}
.auth-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.auth-lead {
  margin: -6px 0 2px;
  font-size: 13px;
}
.auth-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.18);
}
.auth-card .field[hidden] {
  display: none;
}
.auth-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.auth-note--warn {
  color: var(--danger);
}
.auth-switch {
  justify-self: center;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
}
.auth-switch:hover {
  text-decoration: underline;
}
.auth-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Top right: person button + account menu ---------- */
.theme-seg {
  display: flex;
  max-width: 360px;
}
.theme-seg .seg-btn {
  flex: 1 1 0;
  padding: 5px 8px;
}

/* ---------- Read articles: dimmer titles ---------- */
/* Dimmed from the title's own colour, not set to a fixed one: the text box
   is dark over a photo but light in Krant's tiles and the phone list, and a
   fixed white made read titles white on white in light mode. */
.card.is-read .card-title,
.card.is-read .card-summary {
  opacity: 0.62;
}
.latest-item.is-read .latest-title,
.news-row.is-read .news-title,
.groupm-item.is-read .groupm-title {
  color: var(--muted-2);
}

/* ---------- Guests (no account) ---------- */
/* app.js shows .guest-only / hides .member-only for guests via [hidden];
   classes like .btn set a display that would otherwise win. */
.guest-only[hidden],
.member-only[hidden] {
  display: none !important;
}
/* Header: "Inloggen" + "Account maken" in place of the person button. */
.guest-login,
.guest-signup {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
/* The refresh button only refreshes automatically for guests. */
.is-guest .refresh-btn {
  cursor: help;
}
.guest-banner {
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border-soft));
  background: color-mix(in srgb, var(--accent) 9%, var(--bg));
}
.guest-banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 9px 22px;
}
.guest-banner-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
}
.guest-banner .btn {
  flex: 0 0 auto;
  text-decoration: none;
}
.guest-banner-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
/* Sidebar card in the weather card's spot. */
.guest-promo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border-soft));
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel) 70%);
}
.guest-promo[hidden] {
  display: none;
}
.guest-promo h2 {
  margin: 0;
  font-size: 16px;
}
.guest-promo-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}
.guest-promo-list li {
  display: flex;
  gap: 8px;
}
.guest-promo-list li::before {
  content: '✓';
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--accent);
}
.guest-promo .btn {
  text-decoration: none;
}
.guest-promo-pick {
  align-self: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.guest-promo-pick:hover {
  color: var(--text);
}
/* Reader: instead of "Tekst ophalen". */
.reader-guest-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.reader-guest-note[hidden] {
  display: none;
}
.reader-guest-note a {
  margin-left: 6px;
  font-weight: 700;
  color: var(--accent);
}
/* Picker limit and the notification's action. */
.tag-check.is-disabled {
  opacity: 0.45;
}
.intro-guest-hint {
  margin-top: 10px;
}
.notif-action {
  align-self: flex-start;
  margin-top: 8px;
  padding: 5px 12px;
  font-size: 12.5px;
  text-decoration: none;
}
.m-more .m-more-item.m-more-item--primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
a.m-more-item {
  text-decoration: none;
}
@media (max-width: 720px) {
  .guest-login,
  .guest-signup {
    display: none;
  }
  .guest-banner-inner {
    padding: 8px 14px;
    gap: 10px;
  }
  .guest-banner-text {
    font-size: 12.5px;
  }
  .guest-banner .btn {
    display: none; /* the Account tab in the bottom bar has it */
  }

}

/* ---------- Story groups ---------- */
/* A group card looks like a small stack: two offset "sheets" behind it. */
.card--group {
  box-shadow:
    5px -5px 0 -1px color-mix(in srgb, var(--panel-2) 85%, var(--border)),
    10px -10px 0 -2px color-mix(in srgb, var(--panel-2) 60%, var(--border-soft));
}
/* Group cards: a folder in the source-icon spot, in the accent colour. */
.source-badge.group-folder {
  color: #fff;
  background: color-mix(in srgb, var(--accent) 45%, rgba(14, 16, 22, 0.6));
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
}
/* On the narrow cards the article count moves onto the folder, so the label
   itself fits. */
.group-folder-count {
  display: none;
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.card--quad .group-folder-count,
.card--band .group-folder-count {
  display: block;
}
.card--quad.card--group .card-time,
.card--band.card--group .card-time {
  display: none;
}
.card--quad.card--group .card-head,
.card--band.card--group .card-head {
  gap: 7px;
}
.card--band .source-badge.group-folder {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.card--band.card--group .card-meta {
  padding: 4px 8px;
  font-size: 11.5px;
}
.groupm {
  position: fixed;
  inset: 0;
  z-index: 84;
  display: grid;
  place-items: center;
  padding: 20px;
}
.groupm[hidden] {
  display: none;
}
.groupm-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: var(--overlay-blur);
  animation: fade-in 0.16s ease;
}
.groupm-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.groupm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.groupm-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.groupm-count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.groupm-head h2 {
  margin: 0;
  font-size: var(--panel-title);
  line-height: 1.3;
}
.groupm-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
}
.groupm-list > li {
  position: relative;
}
.groupm-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  padding: 10px 70px 10px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.groupm-item:hover,
.groupm-item:focus-visible {
  outline: none;
  background: var(--panel-2);
  border-color: var(--border-soft);
}
.groupm-thumb {
  display: block;
  width: 132px;
  height: 84px;
  overflow: hidden;
  border-radius: 8px;
  background: color-mix(in srgb, var(--feed, var(--muted-2)) 24%, var(--panel-2));
}
.groupm-thumb img,
.groupm-thumb canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.groupm-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.groupm-meta {
  display: flex;
  flex-wrap: wrap; /* on a phone the badge moves to its own line */
  align-items: center;
  gap: 3px 6px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}
/* Name, age and badge stay whole ("NOS · 22 min geleden"), rather than the
   name shrinking to "N…" and the age breaking over two lines. */
.groupm-meta > span {
  white-space: nowrap;
}
.groupm-meta strong {
  flex: 0 1 auto;
}
.groupm-meta .favicon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}
.groupm-meta strong {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.groupm-lead {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  white-space: nowrap;
}
.groupm-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.groupm-summary {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.groupm-rating {
  position: absolute;
  top: 18px;
  right: 18px;
}
@media (max-width: 720px) {
  .groupm {
    padding: 0;
  }
  .groupm-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  .groupm-item {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding-right: 10px;
  }
  .groupm-thumb {
    width: 92px;
    height: 62px;
  }
  .groupm-summary {
    display: none;
  }
  .groupm-rating {
    position: static;
    display: flex;
    justify-content: flex-end;
    padding: 0 10px 6px;
  }
  /* In the compact list the stack shadow would clash with the row lines. */
  .row-quad > .card--group {
    box-shadow: none;
  }
  /* The list hides favicons, but the folder is what marks a group. */
  .row-quad > .card--group .source-badge.group-folder {
    display: none;
  }
  .row-quad > .card--group .card-src {
    color: var(--accent);
  }
  .row-quad > .card--group .card-time {
    display: inline;
  }
  /* The two small cards next to each other: the label may wrap, the count
     sits on the folder. */
  .card--trio.card--group .group-folder-count {
    display: block;
  }
  .card--trio.card--group .card-meta {
    white-space: normal;
    border-radius: 9px;
    line-height: 1.25;
  }
}

/* ---------- Content voorkeuren ---------- */
.switch-line {
  --switch-on: var(--gold);
  /* Anchors the hidden checkbox (.switch-input) inside the line. Without it
     the checkbox sits against .modal-panel (overflow: hidden), and focusing it
     on a toggle scrolls that panel, shifting Instellingen up into blank space. */
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
}
.switch-line + .switch-line {
  border-top: 1px solid var(--border-soft);
}
.switch-line--regional {
  --switch-on: var(--regional);
}
.switch-line--group {
  --switch-on: var(--accent);
}
.switch-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  margin-top: 1px;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.15s ease;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}
.switch-input:checked + .switch {
  background: var(--switch-on);
}
.switch-input:checked + .switch::after {
  transform: translateX(18px);
}
.switch-input:focus-visible + .switch {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.switch-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
/* "Mijn voorkeuren" chart: diverging bars around the standard. Blue = more,
   red = less (validated pair per theme); bar side and the signed value carry
   the direction too, so it never relies on colour alone. */
.pref-profile {
  --pref-read: #22a085;
}
html[data-theme='light'] .pref-profile {
  --pref-read: #0f8a74;
}
.pref-chart {
  margin: 4px 0 0;
}
/* "Nieuws of interesses?" */
.balance-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 2px 0 14px;
}
.balance-seg {
  align-self: flex-start;
  flex-wrap: wrap;
}
.pref-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 10px 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.pref-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pref-chart-note {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.pref-sub-title {
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.pref-chart > .pref-sub-title:first-child {
  margin-top: 4px;
}
/* "Jouw voorpagina": cards per theme among the top 24, standard (grey dot)
   against yours (blue: more, red: less). The value column says it in
   numbers too, so it never relies on colour. */
.mix-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mix-row {
  display: grid;
  grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 64px;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  border-radius: 4px;
}
.mix-row:hover {
  background: var(--panel-2);
}
.mix-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.mix-name > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.mix-name .cat-icon {
  flex: 0 0 auto;
  color: var(--muted);
}
.mix-track {
  position: relative;
  height: 12px;
  margin: 0 6px;
}
/* The baseline: recessive. */
.mix-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border-soft);
}
.mix-span {
  position: absolute;
  top: calc(50% - 1px);
  height: 2px;
  border-radius: 1px;
  background: var(--border);
}
.mix-dot {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--muted-2);
  box-shadow: 0 0 0 2px var(--panel); /* surface ring where dots overlap */
}
.mix-row.is-more .mix-dot.is-mine,
.mix-dot.is-key.is-more {
  background: var(--pref-more);
}
.mix-row.is-less .mix-dot.is-mine,
.mix-dot.is-key.is-less {
  background: var(--pref-less);
}
.mix-dot.is-key {
  position: static;
  display: inline-block;
  transform: none;
  box-shadow: none;
}
.mix-value {
  justify-self: end;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}
.mix-row.is-more .mix-value,
.mix-row.is-less .mix-value {
  color: var(--text);
  font-weight: 700;
}
/* The profile: chips per theme, filled to how strongly it is liked. */
.pref-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.pref-chip-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.pref-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
/* The strength: a fill along the bottom edge. */
.pref-chip::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: calc(var(--fill, 0) * 100%);
  background: var(--chip-color, var(--muted-2));
}
.pref-chip.is-more {
  --chip-color: var(--pref-more);
  border-color: color-mix(in srgb, var(--pref-more) 55%, var(--border));
}
.pref-chip.is-less {
  --chip-color: var(--pref-less);
  border-color: color-mix(in srgb, var(--pref-less) 55%, var(--border));
}
.pref-chip .cat-icon {
  color: var(--chip-color, var(--muted));
}
.pref-chip.is-open {
  background: var(--panel-hover);
}
.pref-chip:focus-visible,
.pref-neutral-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pref-chip-value {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 700;
}
.pref-chip-read {
  font-size: 12px;
  font-weight: 600;
  color: var(--pref-read);
}
.pref-subchips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-left: 14px;
}
.pref-subchip {
  display: inline-flex;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px dashed var(--border);
  font-size: 12px;
  color: var(--muted);
}
.pref-neutral {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.pref-neutral-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}
.pref-neutral-link:hover {
  color: var(--text);
}
.pref-chip-editor {
  margin-top: 10px;
}
@media (max-width: 560px) {
  .mix-row {
    grid-template-columns: minmax(0, 112px) minmax(0, 1fr) 52px;
    gap: 8px;
  }
}
.pref-status {
  margin: 10px 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.pref-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* "Nieuwsscores tonen" off (the default): no score circles anywhere. */
html.hide-scores .rating-pill,
html.hide-scores .reader-rating {
  display: none;
}

/* ---------- Slimme modus ---------- */
.brain-paused {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.brain-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.brain-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 64px;
  align-items: center;
  gap: 4px 12px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
}
.brain-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  min-width: 0;
}
.brain-counts {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.brain-level {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.brain-row.is-more .brain-level {
  color: var(--accent);
}
.brain-row.is-less .brain-level {
  color: var(--danger);
}
.brain-subs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-left: 22px;
}
@media (max-width: 560px) {
  .brain-row {
    grid-template-columns: minmax(0, 1fr) 56px;
  }
  .brain-counts {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-left: 22px;
  }
}

/* A destructive action that shouldn't compete with the main buttons. */
.btn.btn-link-danger {
  margin-left: auto;
  border-color: transparent;
  background: none;
  color: var(--danger);
}
.btn.btn-link-danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}
.btn.btn-link-danger:disabled {
  color: var(--muted-2);
}
.pref-advanced > summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}
.pref-advanced > summary::-webkit-details-marker {
  display: none;
}
.pref-advanced > summary::before {
  content: '▸';
  color: var(--muted);
  transition: transform 0.15s ease;
}
.pref-advanced[open] > summary::before {
  transform: rotate(90deg);
}
.pref-advanced-title {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pref-advanced-body h4 {
  margin: 18px 0 4px;
  font-size: 14px;
}
.auth-wrap .auth-brand {
  order: 0;
}

/* ---------- Meldingen (shown in the Uitkijk) ---------- */
.notif-list {
  list-style: none;
  margin: 0;
  padding: 6px;
}
.notif-item {
  display: flex;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
}
.notif-item + .notif-item {
  border-top: 1px solid var(--border-soft);
}
.notif-item.is-new {
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}
.notif-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--feed, var(--danger));
}
.notif-text {
  min-width: 0;
}
.notif-text strong {
  font-size: 13.5px;
}
.notif-text p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.notif-text .notif-meta {
  font-size: 11.5px;
  color: var(--muted-2);
  overflow-wrap: anywhere;
}
/* A brain notification: the brain instead of a dot, and the profile it can
   open to (app.js brainNoticeText / brainProfileNode). */
.notif-icon {
  flex: 0 0 auto;
  display: inline-flex;
  margin-top: 1px;
  color: var(--brain);
}
/* A patch note (src/patchnotes.js): the Newsdeck logo, blue. */
.notif-logo {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 4px;
}
.notif-item--patch {
  --patch: #3b82f6;
  background: color-mix(in srgb, var(--patch) 7%, transparent);
}
.notif-item--patch.is-new {
  background: color-mix(in srgb, var(--patch) 15%, transparent);
}
.notif-item--patch .notif-text .notif-link {
  color: var(--patch);
}
html[data-theme='light'] .notif-item--patch {
  --patch: #1f6fd1;
}
/* A new device logged in (app.js notifications, kind 'login'): amber. */
.notif-item--login {
  --login: #d97706;
  background: color-mix(in srgb, var(--login) 7%, transparent);
}
.notif-item--login.is-new {
  background: color-mix(in srgb, var(--login) 15%, transparent);
}
.notif-icon--login {
  color: var(--login);
}
.notif-item--login .notif-text .notif-link {
  color: var(--login);
}
html[data-theme='light'] .notif-item--login {
  --login: #b45309;
}
/* Brain-pink, also once seen (a light tint) so it reads as the brain's. */
.notif-item--brain {
  background: color-mix(in srgb, var(--brain) 7%, transparent);
}
.notif-item--brain.is-new {
  background: color-mix(in srgb, var(--brain) 15%, transparent);
}
.notif-text .notif-link {
  margin-top: 4px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--brain);
  font-size: 12.5px;
  font-weight: 650;
}
.notif-text .notif-link:hover {
  background: none;
  text-decoration: underline;
}
.notif-more {
  margin-top: 8px;
}
.notif-more[hidden] {
  display: none;
}
.brain-profile {
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 13px;
  line-height: 1.5;
}
.brain-profile p {
  margin: 4px 0 0;
  color: var(--text);
}
.notif-text .brain-profile p {
  font-size: 12.5px;
  color: var(--text);
}
.brain-profile-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}
.brain-profile-icon {
  display: inline-flex;
  color: var(--brain);
}
.notif-item--brain .brain-profile {
  background: color-mix(in srgb, var(--brain) 10%, var(--panel));
}
.brain-profile .brain-profile-note {
  font-size: 11.5px;
  color: var(--muted-2);
}
.notif-empty {
  padding: 14px 8px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Location tab ---------- */
.city-current {
  margin: 0;
  font-size: 13.5px;
}
.city-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.city-results[hidden],
#cityReset[hidden] {
  display: none;
}
.city-option {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.city-option:hover,
.city-option:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.city-none {
  font-size: 13px;
  color: var(--muted-2);
}
#citySearch:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.18);
}



/* ---------- Introduction (new account) ----------
   Built from the Instellingen pieces (modal head/body, .add-form sections,
   .tag-picker/.tag-check chips, .feed-row rows); only layout glue here. */
.intro {
  z-index: 90;
}
.intro-panel {
  width: min(640px, 100%);
}
.intro-stepnote {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted-2);
}
.intro-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.intro-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.intro-step[hidden] {
  display: none;
}
.intro-lead {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}
.intro-option {
  width: 100%;
  justify-content: space-between;
  padding: 13px 14px;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.intro-option:hover,
.intro-option:focus-visible {
  border-color: var(--muted-2);
  background: var(--panel-hover);
  outline: none;
}
.intro-option-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.intro-option-text strong {
  font-size: 14px;
}
.intro-option-text .hint-inline {
  font-size: 12px;
}
.intro-option-arrow {
  font-size: 20px;
  line-height: 1;
  color: var(--muted-2);
}
/* New account: the look and settings steps. */
.intro-step .segmented {
  flex-wrap: wrap;
  justify-self: start;
}
.intro-step .add-form > .hint-inline {
  margin: 0;
}
@media (max-width: 600px) {
  .intro-style-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.intro-categories {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.intro-cat {
  gap: 10px;
}
.intro-cat h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.intro-cat h3 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.intro-cat .icon-grid {
  margin-bottom: 10px;
}
.intro-cat .tag-picker {
  background: none;
  border: 0;
  padding: 0;
  min-height: 0;
}
/* The Steam option looks like the other chips but opens a popup. */
.tag-check.intro-steam {
  font: inherit;
  padding: 4px 11px;
}
.tag-check.intro-steam.is-on {
  border-color: color-mix(in srgb, var(--cat) 60%, transparent);
  background: color-mix(in srgb, var(--cat) 16%, transparent);
}
.intro .field input[type='file'] {
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  max-width: 100%;
}
.intro-scrape-text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.intro-scrape-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.intro-scrape-list .feed-row {
  cursor: pointer;
}
.intro-scrape-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
}
.feed-color-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #66c0f4;
}

/* Footer bar shared by the intro and the Steam popup. */
.intro-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-soft);
}
.intro-foot-actions {
  display: flex;
  gap: 8px;
}
.intro-foot .btn[hidden] {
  display: none;
}
.intro-skip {
  background: none;
  border-color: transparent;
  color: var(--muted);
}
.intro-skip:hover {
  background: var(--panel-2);
  border-color: var(--border-soft);
  color: var(--text);
}

/* Steam popup (above the intro). */
.steam-modal {
  z-index: 95;
}
.steam-panel {
  width: min(520px, 100%);
}
.steam-row {
  display: flex;
  gap: 8px;
}
.steam-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.steam-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.18);
}
.steam-games .feed-row {
  padding: 6px 6px 6px 12px;
}
.steam-game-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
}
.steam-games .icon-btn {
  width: 28px;
  height: 28px;
  font-size: 13px;
}
#steamEmpty[hidden] {
  display: none;
}

.refresh-setting {
  margin-bottom: 16px;
}

/* =====================================================================
   Phone layout (≤ 720px): latest-news ticker on top with the category
   strip under it, search button top right, Belangrijkst as 1 big + 2 side
   by side + a compact image/title list, and a bottom bar: Voorpagina /
   Laatste switch views, Weer and Meer open bottom sheets (the sidebar and
   the "Meer" menu).
   ===================================================================== */
.m-ticker,
.m-sections,
.m-search-btn,
.m-nav,
.m-backdrop,
.m-more,
.m-sheet-head {
  display: none;
}

@keyframes m-sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}
@keyframes m-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  :root {
    --m-nav-h: calc(58px + env(safe-area-inset-bottom));
  }
  body {
    padding-bottom: calc(var(--m-nav-h) + 8px);
  }

  /* Solid top bar: backdrop-filter would turn it into the containing block
     for the fixed bottom sheets that live inside it. */
  .topbar {
    z-index: 55;
    background: var(--bg);
    backdrop-filter: none;
  }

  /* --- Latest-news ticker --- */
  .m-ticker:not([hidden]) {
    display: block;
    margin-bottom: 6px;
    background: var(--panel);
    border-bottom: 1px solid var(--border-soft);
  }
  .m-ticker-label {
    padding: 7px 12px 0;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .m-ticker-track {
    display: flex;
    margin: 0;
    padding: 0 12px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 12px;
    scrollbar-width: none;
  }
  .m-ticker-track::-webkit-scrollbar {
    display: none;
  }
  .m-ticker-item {
    flex: 0 0 auto;
    max-width: 80vw;
    scroll-snap-align: start;
  }
  /* A dotted line between the headlines. */
  .m-ticker-item + .m-ticker-item {
    border-left: 1px dotted var(--muted-2);
  }
  .m-ticker-link {
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 8px 12px;
    border: 0;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }
  .m-ticker-item:first-child .m-ticker-link {
    padding-left: 0;
  }
  .m-ticker-icon {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    color: var(--muted-2);
  }
  .m-ticker-icon img {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    object-fit: contain;
  }
  .m-ticker-icon svg {
    display: none;
  }
  .m-ticker-icon.no-icon img {
    display: none;
  }
  .m-ticker-icon.no-icon svg {
    display: block;
  }
  .m-ticker-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* --- Header: logo left, search button right --- */
  .masthead {
    padding: 8px 12px;
    gap: 8px;
  }
  .m-search-btn {
    display: grid;
    order: 2;
    margin-left: auto;
    width: 38px;
    height: 38px;
  }
  .topbar.m-search-open .m-search-btn {
    color: var(--accent);
    border-color: var(--accent);
  }
  /* Refresh, account and log-in move to the bottom bar and its sheets. */
  .topbar-end {
    display: none;
  }
  .search-box {
    display: none;
  }
  .topbar.m-search-open .search-box {
    display: flex;
  }

  /* --- Bottom bar --- */
  /* As many columns as buttons: Briefing and Alarmeringen only when on. */
  .m-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 52;
    height: var(--m-nav-h);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--panel);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.18);
  }
  .m-nav-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    padding: 0 1px;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .m-nav-btn > span:not(.notif-count) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .m-nav-btn[aria-expanded='true'],
  .m-nav-btn[aria-pressed='true'] {
    color: var(--accent);
  }
  .m-nav-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
    border-radius: 8px;
  }
  .m-nav-btn.is-syncing svg {
    animation: m-spin 0.8s linear infinite;
  }

  /* --- Bottom sheets --- */
  .m-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(10, 11, 14, 0.5);
    animation: fade-in 0.16s ease;
  }
  .m-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 14px 0 10px;
    background: var(--panel);
  }
  .m-sheet-head h2 {
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .m-sheet-head .icon-btn {
    width: 32px;
    height: 32px;
  }
  body.m-sheet-weather .sidebar,
  .m-more:not([hidden]) {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: var(--m-nav-h);
    z-index: 56;
    max-width: none;
    max-height: 78vh;
    margin: 0;
    padding: 0 16px 16px;
    overflow-y: auto;
    background: var(--panel);
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    box-shadow: var(--shadow);
    animation: m-sheet-in 0.2s ease;
  }

  /* The section bar is replaced by the category strip under the ticker and
     the Voorpagina / Laatste buttons in the bottom bar. */
  .sectionbar {
    display: none;
  }
  .m-sections {
    position: relative;
    display: flex;
    gap: 6px;
    padding: 2px 12px 10px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
  }
  .m-sections::-webkit-scrollbar {
    display: none;
  }
  .m-sections .section {
    flex: 0 0 auto;
    gap: 5px;
    padding: 4px 10px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel);
  }
  .m-sections .section::after {
    display: none;
  }
  .m-sections .section.is-active {
    border-color: var(--cat, var(--accent));
    background: color-mix(in srgb, var(--cat, var(--accent)) 16%, var(--panel));
  }

  /* Weather sheet = the sidebar, minus the latest list (that's the ticker). */
  .sidebar {
    display: none;
  }
  .sidebar .sidebar-head,
  .sidebar .latest-list {
    display: none;
  }
  .sidebar .weather {
    margin-bottom: 0;
  }

  /* "Meer" menu */
  .m-more:not([hidden]) {
    display: grid;
    gap: 8px;
  }
  .m-more-item {
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--panel-2);
    color: var(--text);
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
  }

  .toast {
    bottom: calc(var(--m-nav-h) + 12px);
  }

  /* --- Belangrijkst: 1 big, two side by side under it (app.js trioSize), then the
     rows of four become a compact list; gold/purple rows swipe sideways --- */
  .layout {
    padding: 12px;
  }
  .hero-zone {
    gap: 10px;
  }
  .card--hero {
    min-height: 330px;
  }
  .card--hero .card-head {
    padding: 10px 10px 0;
  }
  .card--hero .card-box {
    margin: auto 10px 10px;
    padding: 12px 13px 10px;
  }
  .card--hero .card-h {
    font-size: 21px;
  }
  .card--hero .card-summary {
    font-size: 13.5px;
  }

  .row-trio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  /* Two cards side by side under the big story (app.js trioSize). */
  .card--trio {
    min-height: 220px;
  }
  .card--trio .card-head {
    padding: 8px 8px 0;
    gap: 6px;
  }
  .card--trio .source-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
  .card--trio .source-badge .favicon {
    width: 18px;
    height: 18px;
  }
  .card--trio .card-meta {
    padding: 4px 8px;
    font-size: 11.5px;
  }
  .card--trio .card-time,
  .card--trio .card-summary {
    display: none;
  }
  .card--trio .media-icon {
    --icon-size: 52px;
  }
  .card--hero .media-icon,
  .card--lead .media-icon {
    --icon-size: 72px;
  }
  .card--trio .card-box {
    margin: auto 6px 6px;
    padding: 9px 10px 8px;
    border-radius: 10px;
  }
  .card--trio .card-h {
    font-size: 14.5px;
    line-height: 1.25;
  }
  .card--trio .card-foot {
    margin-top: 7px;
  }
  .card--trio .card-foot .tag-chip {
    padding: 1px 6px;
    font-size: 9.5px;
  }

  /* Rows of four: a compact list (thumbnail, feed + age, title, tags). The
     text box dissolves (display: contents) so its parts join the row grid. */
  .row-quad {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .deck-rows {
    gap: 0;
  }
  .row-quad > .card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-areas:
      'media head'
      'media title'
      'media foot';
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    row-gap: 3px;
    align-content: center;
    min-height: 0;
    padding: 12px 0;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--border-soft);
    border-radius: 0;
    box-shadow: none;
  }
  .row-quad > .card .card-media {
    position: relative;
    inset: auto;
    grid-area: media;
    width: 104px;
    height: 70px;
    border-radius: 6px;
  }
  .row-quad > .card .card-media--icon {
    flex: none;
    background: color-mix(in srgb, var(--feed) 24%, var(--panel-2));
  }
  .row-quad > .card .media-icon {
    --icon-size: 30px;
  }
  .row-quad > .card .card-box {
    display: contents;
  }
  .row-quad > .card .card-discovery-tint,
  .row-quad > .card .card-summary,
  .row-quad > .card .source-badge {
    display: none;
  }
  .row-quad > .card .card-head {
    grid-area: head;
    padding: 0;
  }
  .row-quad > .card .card-meta {
    padding: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-size: 11.5px;
    color: var(--muted);
  }
  .row-quad > .card .card-time {
    color: var(--muted-2);
  }
  /* The list has room for feed + age on one line and the category's name. */
  .row-quad > .card .card-meta {
    flex-direction: row;
    align-items: baseline;
    gap: 7px;
    border-radius: 0; /* no padding here, so a pill's round ends would clip */
  }
  .row-quad > .card .card-foot .tag-chip {
    padding: 2px 8px;
    font-size: 10.5px;
  }
  .row-quad > .card .card-foot .tag-chip .cat-icon {
    margin-right: 4px;
  }
  .row-quad > .card .card-h {
    grid-area: title;
    font-size: 15px;
    line-height: 1.3;
  }
  .row-quad > .card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
  }
  .row-quad > .card:hover .card-title {
    text-decoration: none;
  }
  .row-quad > .card .card-foot {
    grid-area: foot;
    margin: 0;
    font-size: 11.5px;
    color: var(--muted);
  }
  /* No photo behind the list rows: tags and the score ring use their plain
     (non-overlay) colours. */
  .row-quad > .card .card-foot .tag-chip {
    color: var(--cat);
    background: color-mix(in srgb, var(--cat) 15%, transparent);
    border-color: color-mix(in srgb, var(--cat) 42%, transparent);
  }
  .row-quad > .card .card-foot .tag-chip.more {
    color: var(--muted);
    background: var(--panel-2);
    border-color: var(--border-soft);
  }
  html[data-theme='light'] .row-quad > .card .rating-pill {
    background: var(--panel-2);
    border-color: var(--border);
    color: var(--text);
  }
  html[data-theme='light'] .row-quad > .card {
    --gold: #a76b00;
    --accent: #e5322d;
    --ok: #1d8a4a;
  }

  /* Gold / purple rows: a strip of cards to swipe through. */
  .band {
    margin: 12px 0;
  }
  .band::before {
    left: -8px;
    width: 3px;
  }
  .band-sub {
    display: none;
  }
  .band-cards {
    --band-gap: 10px;
  }
  .band-cards > .card {
    flex-basis: 72%;
  }
  .card--band {
    min-height: 230px;
  }
  /* Phones swipe; no arrows. */
  .band-nav {
    display: none;
  }
  /* No hover on touch screens: keep "negeren" visible. */
  .card--band .discovery-ignore-btn {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  /* Article reader: full screen; the footer wraps instead of overlapping. */
  .reader {
    padding: 0;
    place-items: stretch;
  }
  .reader-panel {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .reader-scroll {
    flex: 1 1 auto;
    padding: 20px 16px 28px;
  }
  .reader-foot {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .reader-actions {
    flex: 1 1 auto;
  }
  .reader-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    white-space: nowrap;
  }

  /* Nieuwste: same compact rows, with tags + score under the headline. */
  .news-summary {
    display: none;
  }
  .news-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    grid-template-areas:
      'thumb main'
      'thumb labels';
    align-items: start;
    column-gap: 12px;
    row-gap: 6px;
    padding: 12px;
  }
  .news-thumb {
    grid-area: thumb;
  }
  .news-main {
    grid-area: main;
  }
  .news-labels {
    grid-area: labels;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    max-width: none;
  }
  .news-label-tags {
    justify-content: flex-start;
    min-width: 0;
  }

  /* The feed badge's hover popup has no hover to trigger it on touch, and its
     off-card box would widen the page. */
  .source-badge .popup {
    display: none;
  }
}

/* ---------- "Over Newsdeck en disclaimer" popup (legal.js) ---------- */
/* "Wat is er nieuw?": the patch notes (legal.js, src/patchnotes.js). */
.legal-news {
  margin: 4px 0 18px;
  font-weight: 650;
}
.patch-intro {
  color: var(--muted);
}
/* Under "Nieuw sinds je laatste bezoek": the way to the full archive. */
.patch-all {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-weight: 600;
}
.patch-note {
  border-top: 1px solid var(--border-soft);
  scroll-margin-top: 8px;
}
/* Collapsed notes (src/patchnotes.js archiveHtml): the head is the button,
   with a chevron that turns when the note is open. */
.patch-head {
  position: relative;
  display: block;
  padding: 14px 28px 10px 0;
  cursor: pointer;
  list-style: none;
}
.patch-head::-webkit-details-marker {
  display: none;
}
.patch-head::after {
  content: '';
  position: absolute;
  top: 20px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted-2);
  border-bottom: 2px solid var(--muted-2);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.patch-note[open] > .patch-head::after {
  top: 24px;
  transform: rotate(-135deg);
}
.patch-head:hover h3 {
  color: var(--accent);
}
.patch-head:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.patch-head .patch-summary {
  margin: 0;
}
.patch-body {
  padding: 0 0 10px;
}
.legal .patch-note h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
}
.legal .patch-note h4,
.legal .patch-note h5 {
  margin: 16px 0 4px;
  font-size: 14.5px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.patch-note ul,
.patch-note ol {
  margin: 4px 0 8px;
}
.patch-note hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--border-soft);
}
.patch-date {
  margin: 2px 0 8px;
  color: var(--muted-2);
  font-size: 12.5px;
}
.patch-summary {
  font-weight: 600;
}
.patch-note.is-target {
  margin: 0 -10px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, #3b82f6 8%, transparent);
}
.patch-note code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--panel-2);
  font-size: 0.92em;
}
.legal-modal {
  z-index: 100;
}
.legal-panel {
  width: min(680px, 100%);
}
.legal-body:focus {
  outline: none;
}
.legal {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}
.legal-lead {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--muted);
}
.legal h3 {
  margin: 18px 0 6px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.legal ul {
  margin: 0;
  padding-left: 18px;
}
.legal li + li {
  margin-top: 6px;
}
.legal p {
  margin: 0;
}
.legal ol.legal-summary {
  margin: 0 0 8px;
  padding-left: 20px;
}
.legal-summary li + li {
  margin-top: 4px;
}
.legal details {
  border-top: 1px solid var(--border-soft);
}
.legal details:last-of-type {
  border-bottom: 1px solid var(--border-soft);
}
.legal details:first-of-type {
  margin-top: 12px;
}
.legal summary {
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
}
.legal summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.legal details[open] > summary {
  color: var(--text);
}
.legal details > ul,
.legal details > p {
  margin-bottom: 12px;
}
.legal-meta {
  margin-top: 18px !important;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--muted-2);
}
.legal-progress {
  font-size: 12px;
}

/* Create account: read + accept the disclaimer. */
.terms-block {
  display: grid;
  gap: 8px;
}
.terms-block[hidden] {
  display: none;
}
.terms-check input:disabled + span {
  color: var(--muted-2);
}
.terms-check input:disabled {
  cursor: not-allowed;
}
.terms-block .hint-inline {
  margin: 0;
}

/* ---------- Login steps, sign-up methods, authenticator & recovery ---------- */
.auth-body,
.auth-form {
  display: grid;
  gap: 12px;
}
.auth-form input:not([type='checkbox']):not([type='radio']),
.account-panel input[type='text'],
.account-panel input[type='password'],
.account-work input[type='text'],
.account-work input[type='password'],
.totp-setup input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.auth-form input:focus,
.account-panel input:focus,
.account-work input:focus,
.totp-setup input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.18);
}
.code-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  letter-spacing: 0.12em;
}
.field-label {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
}
.who-line {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.who-line strong {
  color: var(--text);
}
.auth-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--muted-2);
  font-size: 12.5px;
}
.help-inline-link {
  font-size: inherit;
  padding: 0;
}
.method-group {
  display: grid;
  gap: 8px;
}
.method-option {
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.method-option input {
  margin: 3px 0 0;
  accent-color: var(--accent);
}
.method-option:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel-2));
}
.method-option.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.method-text {
  display: grid;
  gap: 3px;
}
.method-text strong {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
}
.method-badge {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
}
.method-fields {
  display: grid;
  gap: 12px;
}
.method-fields[hidden] {
  display: none;
}
.totp-setup {
  display: grid;
  gap: 10px;
}
.totp-setup .auth-note {
  margin: 0;
}
.qr-box {
  justify-self: center;
  padding: 10px;
  border-radius: 8px;
  background: #fff; /* scanners need a light background in both themes */
  line-height: 0;
}
.manual-key summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
}
.secret-text,
.recovery-code {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px dashed var(--border);
  background: var(--panel);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.08em;
  word-break: break-all;
  user-select: all;
}
.recovery-panel {
  display: grid;
  gap: 12px;
}
.recovery-panel .auth-note {
  margin: 0;
}
.recovery-code {
  margin: 0;
  font-size: 17px;
  text-align: center;
}
.recovery-actions,
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.legal-callout {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border));
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  font-size: 13.5px;
}
.legal-callout strong {
  display: block;
  margin-bottom: 4px;
}

/* Account & inloggen */
.account-panel,
.account-work {
  display: grid;
  gap: 14px;
}
.account-work:empty {
  display: none;
}
.account-work {
  margin-top: 14px;
}
.account-panel > .hint {
  margin: 0;
}
.pk-row {
  gap: 10px;
}
.pk-icon {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.pk-text {
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
.pk-text strong {
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pk-row .icon-btn {
  width: 30px;
  height: 30px;
}
.pk-row .icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pk-add,
.reauth-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pw-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.pw-form .btn {
  justify-self: start;
}
.pk-add input,
.reauth-form input {
  flex: 1 1 180px;
  min-width: 0;
}
.pw-form[hidden] {
  display: none;
}
.btn-danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}
.btn-danger:hover {
  background: color-mix(in srgb, var(--danger) 10%, var(--panel));
}
.recovery-code {
  word-break: normal; /* wrap at the dashes, never inside a group */
}
@media (max-width: 420px) {
  .recovery-code {
    font-size: 14px;
    letter-spacing: 0.03em;
  }
}
.terms-link {
  font: inherit;
  text-decoration: underline;
}
.hint-warn {
  color: var(--danger);
}
.hint-warn[hidden] {
  display: none;
}
.reader-also {
  color: var(--muted);
}
.reader-also a {
  color: var(--accent);
}

/* Dismiss button on notices in the notifications panel. */
.notif-dismiss {
  flex: 0 0 auto;
  align-self: flex-start;
  width: 26px;
  height: 26px;
  margin-left: auto;
  font-size: 12px;
}

/* Login: method icons, passkey-first layout */
.auth-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  line-height: 0;
}
.auth-method-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.auth-section {
  display: grid;
  gap: 8px;
}
.auth-center {
  margin: 0;
  text-align: center;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted-2);
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1 1 auto;
  border-top: 1px solid var(--border-soft);
}
.method-option .auth-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  color: var(--muted);
}
.method-option:has(input:checked) .auth-icon {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border-soft));
}

/* Uitkijk pane actions ("Alles wissen", "Filters") */
.notif-clear {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.notif-clear:hover {
  color: var(--text);
  background: var(--panel-2);
}
.notif-clear[hidden] {
  display: none;
}

/* Account → Ingelogde apparaten */
.session-row .btn-small {
  flex: 0 0 auto;
  padding: 5px 11px;
  font-size: 12.5px;
}
.session-row .pk-text strong {
  white-space: normal;
}
.session-row .pk-text .hint-inline {
  overflow-wrap: anywhere;
}
.session-row {
  transition: box-shadow 0.3s, border-color 0.3s;
}
.session-row.is-flagged {
  border-color: #d97706;
  box-shadow: 0 0 0 3px color-mix(in srgb, #d97706 30%, transparent);
}
.session-badge {
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  vertical-align: 1px;
}

/* Passkeys without PRF ("standaardversleuteling") */
.pk-badge {
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  vertical-align: 1px;
}
.account-protection {
  margin: 0;
}
.account-protection p {
  margin: 4px 0 0;
  font-size: 13px;
}
.choose-modal {
  z-index: 110;
}
.choose-panel {
  width: min(520px, 100%);
}
/* "Are you sure?" (confirmDialog in app.js): above every other overlay. */
.confirm-modal {
  z-index: 150;
}
.confirm-panel {
  width: min(440px, 100%);
}
.confirm-text {
  margin: 0;
  line-height: 1.55;
}
.confirm-foot {
  justify-content: flex-end;
  gap: 8px;
}
.confirm-foot .btn-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}
.confirm-foot .btn-danger:hover {
  background: color-mix(in srgb, var(--danger) 85%, #000);
}
/* Phones: every popup is full screen (like the reader); small "are you
   sure?" dialogs stay a card. */
@media (max-width: 720px) {
  .modal:not(.confirm-modal):not(.choose-modal) {
    padding: 0;
    place-items: stretch;
    /* One row exactly the screen's height: with an auto row the panel's
       height: 100% grew with a long panel past the screen, so its body
       never had anything to scroll. */
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: minmax(0, 1fr);
  }
  .modal:not(.confirm-modal):not(.choose-modal) > .modal-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
}
.choose-panel .modal-body p + p {
  margin-top: 10px;
}

/* ---------- Topic weights (Instellingen → Voorkeuren, "Minder zoals dit") ---------- */
.weight-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.weight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.weight-name {
  font-size: 13px;
  font-weight: 600;
}
.weight-row:not(.is-changed) .weight-name {
  color: var(--muted);
}
.weight-seg .seg-btn {
  font-size: 12px;
  padding: 4px 8px;
}
@media (max-width: 560px) {
  .weight-seg {
    width: 100%;
  }
  .weight-seg .seg-btn {
    flex: 1 1 0;
    padding: 4px 2px;
  }
}
/* "Onderwerpen" (Instellingen → Interesses): a tile per topic with its
   level and − / +. A topic set away from Normaal is tinted. */
.topic-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.topic-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--panel);
}
.topic-tile.is-more {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border-soft));
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}
.topic-tile.is-less {
  background: var(--panel-2);
}
.topic-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.topic-main > svg {
  flex: none;
  color: var(--muted-2);
}
.topic-tile.is-more .topic-main > svg {
  color: var(--accent);
}
.topic-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topic-name {
  font-size: 13.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-level {
  font-size: 12px;
  color: var(--muted);
}
.topic-tile.is-more .topic-level {
  color: var(--accent);
  font-weight: 650;
}
.topic-brain {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brain);
}
.topic-steps {
  display: flex;
  gap: 4px;
  flex: none;
}
.topic-step {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.topic-step:hover:not(:disabled) {
  border-color: var(--muted-2);
}
.topic-step:disabled {
  opacity: 0.35;
  cursor: default;
}
.topic-step:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.pref-reset.btn {
  justify-self: start;
  margin-top: 10px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
}
.pref-reset.btn:hover {
  background: none;
  color: var(--danger);
}
.pref-mix {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}
.pref-mix > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.pref-mix[open] > summary {
  margin-bottom: 10px;
}
@media (max-width: 560px) {
  .topic-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.add-form.pref-brain[hidden] {
  display: none;
}

#weightsResetNote {
  margin-top: 6px;
}
.less-like {
  margin-top: 14px;
}
.less-like-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.less-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.less-like-level {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Briefing (a small newspaper; see openBriefing in app.js) ---------- */
.brief {
  --paper: #1c1b18;
  --ink: #ece6da;
  --ink-2: #a39c8e;
  --rule: rgba(236, 230, 218, 0.16);
  --rule-strong: rgba(236, 230, 218, 0.42);
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  position: fixed;
  inset: 0;
  z-index: 84; /* under the reader, which opens on top of it */
  display: grid;
  place-items: center;
  padding: 24px;
}
html[data-theme='light'] .brief {
  --paper: #fbf8f1;
  --ink: #1d1b17;
  --ink-2: #6b645a;
  --rule: rgba(29, 27, 23, 0.14);
  --rule-strong: rgba(29, 27, 23, 0.5);
}

/* Each edition has its own light: app.js sets data-slot on .brief. The tint
   colours the wash behind the masthead, the emblem, the rules, the active tab
   and the hover; --tint-ink is a readable version for text (mixed toward the
   ink, so darker on light paper and lighter on dark). */
.brief {
  --tint: #c9a77c;
  --tint-ink: color-mix(in srgb, var(--tint) 62%, var(--ink));
  --rule-strong: color-mix(in srgb, var(--tint) 45%, rgba(236, 230, 218, 0.3));
}
html[data-theme='light'] .brief {
  --rule-strong: color-mix(in srgb, var(--tint) 45%, rgba(29, 27, 23, 0.4));
}
/* Ochtend: warm cream, soft apricot, gentler contrast (reading in bed). */
.brief[data-slot='ochtend'] {
  --tint: #e8a77c;
  --paper: #1f1c18;
  --ink: #e6dccb;
  --ink-2: #a09482;
}
html[data-theme='light'] .brief[data-slot='ochtend'] {
  --paper: #fbf3e8;
  --ink: #2b2620;
  --ink-2: #7a6e60;
}
/* Middag: clean daylight, fresh sky blue. */
.brief[data-slot='middag'] {
  --tint: #6fb3dc;
  --paper: #1b1c1c;
}
html[data-theme='light'] .brief[data-slot='middag'] {
  --paper: #fcfbf7;
}
/* Avond: rosy paper, sunset coral. */
.brief[data-slot='avond'] {
  --tint: #e5866b;
  --paper: #201a19;
}
html[data-theme='light'] .brief[data-slot='avond'] {
  --paper: #fbf2ee;
}
/* Nacht: cool and dimmed, calm indigo. */
.brief[data-slot='nacht'] {
  --tint: #9a9be6;
  --paper: #17181f;
  --ink: #dcdde6;
  --ink-2: #8f91a3;
}
html[data-theme='light'] .brief[data-slot='nacht'] {
  --paper: #f3f3f8;
  --ink: #1d1e29;
  --ink-2: #636679;
}

.brief[hidden] {
  display: none;
}
body.brief-open {
  overflow: hidden;
}
.brief-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: var(--overlay-blur);
  -webkit-backdrop-filter: var(--overlay-blur);
  animation: reader-fade 0.2s ease both;
}
.brief-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1080px, 100%);
  max-height: min(92vh, 1100px);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--panel-radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: reader-in 0.22s ease both;
  transition: background-color 0.4s ease, color 0.4s ease;
}
.brief-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--rule);
}
.brief-bar .icon-btn {
  margin-left: auto;
  flex: none;
}
/* The day's four editions; the one on screen in the accent colour. */
.brief-slots {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.brief-slot {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: none;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.brief-slot:hover:not(:disabled):not(.is-active) {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.brief-slot-label {
  font-weight: 650;
}
.brief-slot-time {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.brief-slot.is-active {
  background: color-mix(in srgb, var(--tint) 24%, var(--paper));
  border-color: color-mix(in srgb, var(--tint) 60%, transparent);
  color: var(--ink);
}
.brief-slot.is-active .brief-slot-time {
  color: var(--tint-ink);
}
.brief-slot:disabled {
  opacity: 0.38;
  cursor: default;
}
/* Ready but not read yet. */
.brief-slot.is-new::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.brief-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--rule-strong) transparent;
}
.brief-paper {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 40px 32px;
}
.brief-paper .reader-loading {
  color: var(--ink-2);
}
.brief-masthead {
  text-align: center;
  padding-bottom: 14px;
  border-bottom: 3px double var(--rule-strong);
}
/* A soft wash of the edition's light behind the masthead. */
.brief-paper {
  background: radial-gradient(ellipse 70% 220px at 50% 0, color-mix(in srgb, var(--tint) 16%, transparent), transparent);
}
.brief-masthead .brief-kicker {
  color: var(--tint-ink);
}
/* Emblem: sunrise, sun, sunset, moon. */
/* The edition's icon (the same as in the Uitkijk), in its tint. */
.brief-emblem {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tint) 18%, transparent);
  color: var(--tint-ink);
}
.brief-kicker {
  margin: 0;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brief-title {
  margin: 4px 0 6px;
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.brief-dateline {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
}
.brief-dateline::first-letter {
  text-transform: uppercase;
}
.brief-window::before {
  content: ' · ';
}
.brief-note {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 12.5px;
  font-style: italic;
}
.brief-front {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 28px;
}
.brief-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.brief-side:empty {
  display: none;
}
/* Story buttons read as plain newspaper text. */
.brief-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.brief-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}
.brief-headline {
  font-family: var(--serif);
  font-weight: 680;
  line-height: 1.2;
  text-wrap: balance;
  transition: color 0.15s ease;
}
.brief-item:hover .brief-headline {
  color: var(--tint-ink);
}
.brief-item.is-read .brief-headline {
  color: var(--ink-2);
}
.brief-summary {
  color: color-mix(in srgb, var(--ink) 82%, var(--paper));
  font-size: 14.5px;
  line-height: 1.55;
}
.brief-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--ink-2);
  font-size: 12px;
}
.brief-meta .favicon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}
.brief-meta strong {
  color: var(--ink);
  font-weight: 650;
}
.brief-more {
  padding: 1px 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.brief-item--lead .brief-headline {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 750;
}
.brief-item--lead .brief-summary {
  font-size: 16px;
}
.brief-photo {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 8%, var(--paper));
}
.brief-photo img,
.brief-photo canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brief-weather {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--tint) 30%, var(--rule));
  border-radius: 6px;
  background: color-mix(in srgb, var(--tint) 8%, var(--paper));
}
.brief-weather-where {
  margin: -6px 0 0;
  color: var(--ink-2);
  font-size: 12.5px;
}
.brief-weather-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brief-weather-icon {
  font-size: 38px;
  line-height: 1;
}
.brief-weather-temps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--ink-2);
}
.brief-weather-temps strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}
.brief-hours {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 10px 0 0;
  list-style: none;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 12px;
}
.brief-hours li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.brief-hour,
.brief-rain {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.brief-rain {
  color: color-mix(in srgb, #3a8ee6 70%, var(--ink));
  min-height: 1em;
}
.brief-hour-icon {
  font-size: 18px;
}
.brief-stories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 28px;
}
.brief-item--story {
  padding-top: 14px;
  border-top: 1px solid var(--rule-strong);
}
.brief-item--story .brief-headline {
  font-size: 19px;
}
.brief-item--side {
  padding-top: 14px;
  border-top: 1px solid var(--rule-strong);
}
.brief-item--side .brief-headline {
  font-size: 18px;
}
.brief-item--story .brief-summary,
.brief-item--side .brief-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.brief-item--side .brief-summary {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.brief-shorts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.brief-rule {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brief-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule-strong);
}
.brief-shorts-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
}
.brief-item--short {
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.brief-item--short .brief-headline {
  font-size: 16px;
  font-weight: 620;
}
.brief-empty {
  margin: 0;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}
.brief-paper > .brief-empty {
  padding: 40px 0;
  text-align: center;
}
.brief-colophon {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  text-align: center;
}


@media (max-width: 920px) {
  .brief-front {
    grid-template-columns: minmax(0, 1fr);
  }
  .brief-stories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .brief {
    padding: 0;
  }
  .brief-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .brief-paper {
    gap: 22px;
    padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
  }
  .brief-stories,
  .brief-shorts-list {
    grid-template-columns: minmax(0, 1fr);
  }
  /* All four editions fit: label over time. */
  .brief-bar {
    padding: 8px 8px 8px 10px;
  }
  .brief-slots {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .brief-slot {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 5px 0;
    border-radius: 10px;
    font-size: 12.5px;
  }
  .brief-window {
    display: block;
  }
  .brief-window::before {
    content: none;
  }
}

/* ---------- Alarmeringen (the hub's tab + its settings; see app.js) ---------- */
/* --svc is the service colour (fire red, ambulance yellow, police blue…).
   Text uses it mixed toward the text colour, so yellow stays readable on
   white and on dark. */
@keyframes alarm-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--svc) 0%, transparent);
  }
  50% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--svc) 38%, transparent);
  }
}
.alarm-setup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.alarm-setup-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.alarm-setup[hidden] {
  display: none;
}
.alarm-svc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.6;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.alarm-svc.is-on {
  border-color: color-mix(in srgb, var(--svc) 60%, var(--border));
  background: color-mix(in srgb, var(--svc) 16%, var(--panel));
  color: var(--text);
  opacity: 1;
}
.alarm-planned {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
}
.alarm-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 8px;
  list-style: none;
}
.alarm-item {
  display: flex;
  gap: 10px;
  padding: 9px 10px;
  border-left: 3px solid var(--svc);
  border-radius: var(--radius-sm);
  background: transparent;
}
/* Not seen yet: the service's tint. Once the row has been on screen
   (app.js watchAlarmRows) it fades out and only the line remains. */
.alarm-item.is-new {
  background: color-mix(in srgb, var(--svc) 20%, transparent);
}
.alarm-item.is-new.is-seen {
  background: transparent;
  transition: background 1.6s ease;
}
.alarm-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.alarm-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}
.alarm-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 11.5px;
}
.alarm-badge {
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.alarm-prio {
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
}
@media (max-width: 920px) {
  .alarm-empty.uk-empty .svg {
    display: none;
  }
}
.alarm-empty,
.alarm-covered {
  padding: 16px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.alarm-earlier {
  padding: 12px 10px 4px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.alarm-covered {
  padding: 6px 10px 2px;
  font-size: 11.5px;
  color: var(--muted-2);
}
.alarm-foot {
  position: sticky;
  bottom: 0;
  margin: 0;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border-soft);
  background: var(--panel);
  color: var(--muted-2);
  font-size: 11.5px;
}
.alarm-foot a {
  color: var(--muted);
}
.alarm-services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* Which places (from Locaties en gebruik), with a link to change them. */
.alarm-places {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 12.5px;
}
.alarm-places-text {
  color: var(--text);
  font-weight: 600;
}
.alarm-manage {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.alarm-manage:hover {
  text-decoration: underline;
}
.alarm-unknown {
  flex-basis: 100%;
  color: var(--muted-2);
  font-size: 11.5px;
}
.alarm-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--svc);
}
/* Rows open the detail popup. */
.alarm-item {
  cursor: pointer;
  transition: background 0.15s ease;
}
.alarm-item:hover,
.alarm-item.is-new.is-seen:hover {
  background: color-mix(in srgb, var(--svc) 10%, transparent);
}
.alarm-item.is-new:not(.is-seen):hover {
  background: color-mix(in srgb, var(--svc) 26%, transparent);
}
.alarm-item:focus-visible {
  outline: 2px solid var(--svc);
  outline-offset: 1px;
}

/* ---------- One alarmering, as a short article ---------- */
.alarmd {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: 20px;
}
.alarmd[hidden] {
  display: none;
}
.alarmd-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: var(--overlay-blur);
  -webkit-backdrop-filter: var(--overlay-blur);
  animation: reader-fade 0.2s ease both;
}
.alarmd-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 4px solid var(--svc);
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow);
  animation: reader-in 0.22s ease both;
}
.alarmd-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.alarmd-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 24px 20px;
}
.alarmd-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: color-mix(in srgb, var(--svc) 70%, var(--text));
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.alarmd-title {
  margin: 0;
  padding-right: 36px;
  font-size: 23px;
  line-height: 1.25;
  text-wrap: balance;
}
.alarmd-when {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.alarmd-when::first-letter {
  text-transform: uppercase;
}
.alarmd-text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
}
.alarmd-map {
  position: relative;
  flex: none;
  height: 240px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--map-land);
  /* Dragging moves the map, not the popup (app.js alarmMap). */
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.alarmd-map.is-dragging {
  cursor: grabbing;
}
.alarmd-map:focus-visible {
  outline: 2px solid var(--svc);
  outline-offset: 2px;
}
/* Dark mode: PDOK's light map inverted (hue kept), as the radar's
   (app.js RADAR_DARK); the street and pins on top keep their colours. */
html[data-theme='dark'] .alarmd-tiles img {
  filter: invert(1) hue-rotate(180deg) brightness(1.05) contrast(0.82);
}
.alarmd-tiles img {
  position: absolute;
  left: 0;
  top: 0;
  width: 256px;
  height: 256px;
  filter: brightness(0.85) contrast(1.2);
  pointer-events: none;
}
/* Zoom in / out, and back to the alert. */
.alarmd-map-ctrl {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--map-ctrl-edge);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.alarmd-map-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-top: 1px solid var(--map-ctrl-line);
  background: var(--map-ctrl-bg);
  color: var(--map-ctrl-ink);
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.alarmd-map-btn:first-child {
  border-top: 0;
}
.alarmd-map-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--map-ctrl-ink) 10%, var(--map-ctrl-bg));
}
.alarmd-map-btn:disabled {
  color: var(--map-ctrl-off);
  cursor: default;
}
/* A round badge in the service colour with its vehicle as a line icon
   (ALARM_SERVICES in app.js). The area around it is .alarmd-area. */
.alarmd-pins {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2; /* above the street */
  width: 0;
  height: 0;
  pointer-events: none;
}
.alarmd-pin {
  position: absolute;
  left: 0;
  top: 0;
  margin: -17px 0 0 -17px;
  pointer-events: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  border: 2.5px solid #fff;
  border-radius: 50%;
  background: var(--svc);
  color: var(--svc-ink, #fff);
  z-index: 2; /* above the street */
  /* A small soft ring in the service's colour around the pin. */
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--svc) 30%, transparent), 0 2px 6px rgba(0, 0, 0, 0.35);
}
/* Where it happened: the street itself, painted in the service's colour
   over a white casing, or the town's outline when only the town is known
   (app.js alarmMap). No circle: a whole street or town as a halo covered
   the map. */
.alarmd-area {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}
.alarmd-street-casing,
.alarmd-street {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.alarmd-street-casing {
  stroke: rgba(255, 255, 255, 0.9);
}
/* Only the town is known: its outline, with a slight tint of the
   service's colour inside; a big town (app.js ALARM_BIG_TOWN_M) a lighter
   tint and a dashed line, so a city doesn't cloud the map. */
.alarmd-town {
  fill: color-mix(in srgb, var(--svc) 9%, transparent);
  stroke: var(--svc);
  stroke-width: 2;
  stroke-opacity: 0.75;
  stroke-linejoin: round;
}
.alarmd-town.is-big {
  fill: color-mix(in srgb, var(--svc) 6%, transparent);
  stroke-dasharray: 6 4;
}
.alarmd-street {
  stroke: var(--svc);
  opacity: 0.85;
}
.alarmd-pin svg {
  width: 20px;
  height: 20px;
}
/* The units sent after the first alert: smaller pins in a ring around it
   (app.js alarmMap), on a faint circle so they read as one incident. */
.alarmd-pin.is-first {
  z-index: 2;
}
.alarmd-pin.is-sat {
  z-index: 1;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-width: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.alarmd-pin.is-sat svg {
  width: 14px;
  height: 14px;
}
.alarmd-pin.is-more {
  background: #fff;
  color: #222;
  border-color: rgba(0, 0, 0, 0.18);
  font-size: 10px;
  font-weight: 800;
}
.alarmd-pin-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--ring);
  height: var(--ring);
  margin: calc(var(--ring) / -2) 0 0 calc(var(--ring) / -2);
  border: 1.5px dashed rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
/* A row's units, small, in its meta line (the leading slot keeps one icon). */
.alarm-icons--meta {
  align-self: center;
  margin-top: 0;
}
.alarm-icons--meta .alarm-svc-icon {
  width: 15px;
  height: 15px;
  box-shadow: 0 0 0 1px var(--panel-2);
}
.alarm-icons--meta .alarm-svc-icon + .alarm-svc-icon {
  margin-left: -4px;
}
.alarm-icons--meta .alarm-svc-icon.is-more {
  font-size: 8px;
}
/* "+N" in a row's or the popup's icon stack. */
.alarm-svc-icon.is-more {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--border);
  box-sizing: border-box;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* A service's vehicle in its colour (rows, the popup's kicker and units). */
.alarm-svc-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--svc);
  color: var(--svc-ink, #fff);
  box-shadow: 0 0 0 1.5px var(--panel-2);
}
.alarm-icons {
  display: inline-flex;
  flex: none;
  align-self: flex-start;
  margin-top: 1px;
}
.alarm-icons .alarm-svc-icon + .alarm-svc-icon {
  margin-left: -7px;
}
.alarm-item .uk-time {
  flex: none;
  margin-left: auto;
  color: var(--muted-2);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.alarmd-kicker .alarm-icons {
  margin-top: 0;
}
.alarmd-kicker .alarm-svc-icon {
  width: 18px;
  height: 18px;
}
.alarmd-kicker .alarm-svc-icon + .alarm-svc-icon {
  margin-left: -6px;
}
/* An incident's units, oldest first, each with its own Zwaailicht link. */
.alarmd-units {
  margin: 14px 0 0;
}
.alarmd-units-head {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.alarmd-unit-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.alarmd-unit {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
}
.alarmd-unit .uk-time {
  min-width: 40px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 20px;
}
.alarmd-unit-body {
  display: grid;
  gap: 1px;
  min-width: 0;
  line-height: 20px;
}
.alarmd-unit-name {
  font-weight: 600;
}
.alarmd-unit-units {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.alarmd-unit .alarmd-src {
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}
/* Looking up the street or town (app.js loadAlarmArea). */
.alarmd-map-loading {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 7px;
  border-radius: 999px;
  background: var(--map-ctrl-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  color: var(--map-ctrl-ink);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}
.alarmd-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--svc);
  border-radius: 50%;
  animation: dd-spin 0.7s linear infinite;
}
.alarmd-map-attr {
  position: absolute;
  right: 6px;
  bottom: 4px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--map-attr-bg);
  color: var(--map-attr-ink);
  font-size: 10.5px;
}
.alarmd-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0;
  font-size: 13.5px;
}
.alarmd-facts dt {
  color: var(--muted);
}
.alarmd-facts dd {
  margin: 0;
}
.alarmd-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 5px;
  margin: 4px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted-2);
  font-size: 12px;
}
.alarmd-src {
  color: var(--muted);
}
.alarmd-src:hover {
  color: var(--text);
}
@media (max-width: 720px) {
  .alarmd {
    padding: 0;
    align-items: end;
  }
  .alarmd-panel {
    max-height: 92vh;
    border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  }
  .alarmd-body {
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .alarmd-title {
    font-size: 20px;
  }
}

/* ---------- Locaties en gebruik (settings tab) ---------- */
.loc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.loc-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.loc-item.is-main {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.loc-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
  min-width: 0;
}
.loc-uses {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 12px;
  font-size: 12.5px;
}
.loc-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: color-mix(in srgb, var(--accent) 75%, var(--text));
  font-weight: 700;
  white-space: nowrap;
}
.loc-make-main {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.loc-make-main:hover {
  border-color: var(--accent);
  color: var(--text);
}
.loc-alarm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
}
.loc-alarm.is-off {
  color: var(--muted-2);
}
.loc-remove {
  width: 28px;
  height: 28px;
}
.loc-empty {
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 520px) {
  .loc-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .loc-uses {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }
}

/* ---------- Uitkijk: Meldingen, Weer, Alarmeringen and Briefing in one box ---------- */
.uitkijk {
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--panel-2);
}
/* Header: the telescope and "Uitkijk" (on a phone the sheet has its own). */
.uitkijk-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 4px 10px;
  color: var(--accent);
}
.uitkijk-head {
  cursor: pointer;
  user-select: none;
}
.uitkijk-head-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.uitkijk-head-dot[hidden] {
  display: none;
}
.uitkijk-collapse {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  margin: -4px -4px -4px -6px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
/* Open: an open eye in the accent; folded: a closed one. */
.uitkijk-collapse {
  color: var(--accent);
}
.uitkijk-head:hover .uitkijk-collapse {
  background: color-mix(in srgb, var(--text) 7%, transparent);
}
.uitkijk-collapse .uk-eye-off,
.uitkijk.is-collapsed .uitkijk-collapse .uk-eye {
  display: none;
}
.uitkijk.is-collapsed .uitkijk-collapse {
  color: var(--muted);
}
.uitkijk.is-collapsed .uitkijk-collapse .uk-eye-off {
  display: block;
}
/* The part icons share the title row. */
.uitkijk-head .uitkijk-tabs {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 0 0 6px;
  padding: 2px;
}
.uitkijk-head .uitkijk-tab {
  height: 30px;
}
/* Folded: only the header. (Never on a phone: there it lives in a sheet.) */
@media (min-width: 721px) {
  .uitkijk.is-collapsed > :not(.uitkijk-head) {
    display: none !important;
  }
  .uitkijk.is-collapsed .uitkijk-head {
    margin-bottom: 0;
  }
  .uitkijk.is-collapsed .uitkijk-tab.is-active:not(.has-new) {
    background: none;
    color: var(--muted);
  }

  /* Next to the latest news (not in the list view, which has none): the
     sidebar shares its height. An open part takes at most ~44% and scrolls
     on its own; the latest news keeps the rest, with its own scroll. */
  .layout:not(.content--list) .sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .layout:not(.content--list) .sidebar > * {
    flex: none;
  }
  .layout:not(.content--list) .sidebar > .latest-list {
    flex: 1 1 auto;
    min-height: 140px;
    margin-right: -10px;
    padding-right: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .layout:not(.content--list) .sidebar .uitkijk {
    --uk-h: clamp(280px, 40vh, 340px);
  }
}
.uitkijk-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Instellingen → Uitkijk → Standaard openen. */
.uitkijk-default-seg {
  flex-wrap: wrap;
  margin-top: 4px;
}
/* The icon row: one icon per switched-on feature. */
.uitkijk-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  padding: 3px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
}
.uitkijk-tabs[hidden],
.uitkijk-tab[hidden],
.uitkijk-pane[hidden] {
  display: none;
}
.uitkijk-tab {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.uitkijk-tab:hover {
  background: var(--panel-hover);
  color: var(--text);
}
.uitkijk-tab.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
/* Something new behind this icon: it lights up in the colour of what came
   in (app.js uitkijkNews: red for a problem, the alarm's service colour, the
   edition's tint) and glows softly; an urgent alarm pulses. */
.uitkijk-tab.has-new {
  background: color-mix(in srgb, var(--tab-c) 16%, transparent);
  color: var(--tab-c);
}
.uitkijk-tab.has-new svg {
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--tab-c) 75%, transparent));
  animation: uk-glow 2.4s ease-in-out infinite;
}
.uitkijk-tab.has-new:hover {
  background: color-mix(in srgb, var(--tab-c) 26%, transparent);
  color: var(--tab-c);
}
.uitkijk-tab.is-urgent {
  --svc: var(--tab-c);
  animation: alarm-glow 1.4s ease-in-out infinite;
}
@keyframes uk-glow {
  50% {
    filter: drop-shadow(0 0 7px var(--tab-c));
  }
}
.uitkijk-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 2px 8px;
}
.uitkijk-pane-head h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* Every part is the same height (--uk-h: next to the news, in the list view
   or in the phone sheet) and scrolls inside, so switching never jumps. */
.uitkijk {
  --uk-h: 340px;
}
.uitkijk-pane:not([hidden]) {
  display: flex;
  flex-direction: column;
  height: var(--uk-h);
  margin-right: -6px;
  padding-right: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.uitkijk-pane > * {
  flex: none;
}
.uitkijk-pane > .notif-list {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
.uitkijk-pane .uitkijk-empty {
  flex: 1;
  justify-content: center;
}
.uitkijk .notif-list,
.uitkijk .alarm-list {
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.uitkijk .alarm-places {
  margin: 0 0 8px;
  padding: 0 2px 8px;
}
.uitkijk .alarm-foot {
  position: static;
  padding: 8px 2px 0;
  border-top: 0;
  background: none;
}
.uitkijk .weather {
  margin-bottom: 0;
}
/* Meldingen with nothing in it: a bell and a short line. */
.uitkijk-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 10px 22px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  list-style: none;
}
.uitkijk-empty .svg {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  color: var(--muted-2);
}
.uitkijk-note {
  padding: 14px 4px;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}
/* Briefing: the day's four editions, each in its edition's light (the same
   tints as the paper, .brief[data-slot]). The newest one that's out leads. */
.brief-date {
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 600;
}
.brief-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.brief-card {
  --tint: #c9a77c;
  --tint-ink: color-mix(in srgb, var(--tint) 62%, var(--text));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px 11px 11px;
  border: 1px solid color-mix(in srgb, var(--tint) 22%, var(--border-soft));
  border-radius: 12px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--tint) 13%, var(--panel)), var(--panel) 70%);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.brief-card[data-slot='ochtend'] {
  --tint: #e8a77c;
}
.brief-card[data-slot='middag'] {
  --tint: #6fb3dc;
}
.brief-card[data-slot='avond'] {
  --tint: #e5866b;
}
.brief-card[data-slot='nacht'] {
  --tint: #9a9be6;
}
.brief-card:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--tint) 60%, var(--border));
  box-shadow: 0 4px 14px -8px color-mix(in srgb, var(--tint) 70%, transparent);
  transform: translateY(-1px);
}
.brief-card .svg {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--tint) 20%, transparent);
  color: var(--tint-ink);
}
.brief-card-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.brief-card-name {
  font-size: 14.5px;
  font-weight: 700;
}
.brief-card-lead {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}
.brief-card-side {
  display: grid;
  justify-items: end;
  gap: 4px;
}
.brief-card-time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.brief-card-state {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
}
.brief-card.is-new .brief-card-state {
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tint) 24%, transparent);
  color: var(--tint-ink);
  font-weight: 800;
}
/* The newest edition: a little more room and its headline. */
.brief-card.is-latest {
  padding: 14px 14px 14px 12px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--tint) 22%, var(--panel)), var(--panel) 80%);
}
.brief-card.is-latest .svg {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.brief-card.is-latest .brief-card-name {
  font-size: 15.5px;
}
.brief-card.is-future {
  border-style: dashed;
  border-color: var(--border-soft);
  background: none;
  cursor: not-allowed;
}
.brief-card.is-future .svg {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--muted-2);
}
.brief-card.is-future .brief-card-name {
  color: var(--muted);
}
/* Phone bar: the Uitkijk button's dot (the most pressing new thing). */
.uitkijk-dot {
  position: absolute;
  top: 7px;
  left: calc(50% + 6px);
  width: 9px;
  height: 9px;
  border: 2px solid var(--panel);
  border-radius: 50%;
}
.uitkijk-dot[hidden] {
  display: none;
}
@media (max-width: 720px) {
  .m-nav-btn.is-urgent svg {
    animation: alarm-glow 1.4s ease-in-out infinite;
    border-radius: 50%;
  }
  .sidebar .uitkijk {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }
  .sidebar .uitkijk {
    --uk-h: min(420px, 56vh);
  }
  /* The sheet has its own title: keep only the icons. */
  .sidebar .uitkijk-head > :not(.uitkijk-tabs) {
    display: none;
  }
  .sidebar .uitkijk-head {
    cursor: default;
  }
}
@media (prefers-reduced-motion: reduce) {
  .uitkijk-tab.is-urgent,
  .uitkijk-tab.has-new svg {
    animation: none;
  }
}

/* ---------- Instellingen: a grid of tiles, each opening its own panel ---------- */
/* One size for the tiles and every panel, so the window never jumps while
   you go through it; a long panel scrolls inside. */
#modal .modal-panel {
  width: min(880px, 100%);
  height: min(760px, 90vh);
  max-height: none;
}
#modal .modal-body {
  flex: 1;
  padding: 22px 26px 28px;
}
/* A panel: its sections spaced apart, each with room inside, hints a size
   up so they're easy to read. */
#modal .tab-panel:not([hidden]) {
  display: grid;
  /* The screen's width, not the widest thing inside: an auto column grew
     past a phone (Categorieën, Account, Feeds at 320-430px). */
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 680px;
  margin: 0 auto;
}
#modal .add-form,
#modal .feed-list,
#modal .tag-list {
  grid-template-columns: minmax(0, 1fr);
}
/* Long button labels ("Authenticator-app opnieuw instellen") wrap on a
   narrow phone instead of pushing the panel wider. */
#modal .account-actions .btn {
  white-space: normal;
  text-align: center;
}
#modal .add-form {
  gap: 16px;
  padding: 20px 22px;
  border-radius: 10px;
}
#modal .add-form h3 {
  margin-bottom: 2px;
}
#modal .hint-inline {
  font-size: 12.5px;
  line-height: 1.45;
}
#modal .switch-line {
  padding: 12px 0;
}
#modal .switch-text strong {
  font-size: 14.5px;
}
#modal .list-title {
  margin: 8px 0 0;
}
#modal .hint {
  margin: 0;
}
.settings-root[hidden] {
  display: none;
}
.settings-root {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-user {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
}
.settings-group {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.settings-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.settings-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 118px;
  padding: 18px 10px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.settings-tile svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
}
.settings-tile:hover,
.settings-tile:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  outline: none;
}
.settings-tile--danger svg,
.settings-tile--danger {
  color: var(--danger);
}
/* A tile's panel: "‹" back, its icon and title in the header. */
.settings-back[hidden] {
  display: none;
}
.settings-back {
  font-size: 24px;
  line-height: 1;
}
.modal-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.settings-title-icon {
  display: inline-flex;
  color: var(--accent);
}
.settings-title-icon:empty {
  display: none;
}
.settings-title-icon svg {
  width: 22px;
  height: 22px;
}
.panel-intro {
  margin: 0;
  padding: 0 4px;
}
/* Weer / Alarmeringen without a location: greyed out (see syncLocationNeeds). */
.switch-line.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.need-location {
  margin: 6px 0 0;
  color: var(--gold);
  font-weight: 600;
}
@media (max-width: 720px) {
  /* Phones: Instellingen fills the screen. */
  #modal .modal-panel {
    width: 100%;
    height: 100%;
  }
  /* The three balance choices stacked, each full width. */
  #modal .balance-seg {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-self: stretch;
    width: 100%;
  }
  #modal .modal-body {
    padding: 16px 14px 24px;
  }
  #modal .add-form {
    padding: 16px;
  }
  .settings-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .settings-tile {
    min-height: 96px;
    gap: 9px;
    padding: 14px 6px 12px;
    font-size: 13px;
  }
  .settings-tile svg {
    width: 28px;
    height: 28px;
  }
}

/* ---------- Live blogs ----------
   The LIVE badge (cards, Nieuwste rows, Laatste nieuws), the "Live" section
   chip, and the reader's update timeline. Red is the logo's accent; a quiet
   grey "Liveblog" once the blog is over. */
.live-dot {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}
.is-running > .live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  animation: live-pulse 1.6s ease-out infinite;
}
@keyframes live-pulse {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-running > .live-dot::after {
    animation: none;
  }
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: 2px;
  margin-right: 7px;
  padding: 1px 7px 1px 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  background: color-mix(in srgb, var(--muted-2) 18%, transparent);
}
.live-badge.is-running {
  color: #fff;
  background: var(--accent);
}
/* In a meta line the badge sits inline, without the title gap. */
.news-meta .live-badge,
.latest-meta .live-badge {
  margin-right: 0;
  vertical-align: 0;
  font-size: 9.5px;
}

/* Section bar chip: a pin like the other section icons, with a red dot
   that pulses softly while a blog runs (the chip only exists then). */
.section--live {
  --cat: var(--accent);
}
.section--live .live-pin-dot {
  fill: var(--accent);
  stroke: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: live-pin 1.8s ease-in-out infinite;
}
@keyframes live-pin {
  50% {
    opacity: 0.6;
    transform: scale(0.86);
  }
}
@media (prefers-reduced-motion: reduce) {
  .section--live .live-pin-dot {
    animation: none;
  }
}

/* Reader: header, then the updates on a time rail. */
.live-intro {
  margin: 0 0 22px;
}
.live-intro > :last-child {
  margin-bottom: 0;
}
.live-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.live-head .live-badge {
  margin: 0;
  font-size: 11.5px;
  padding: 2px 9px 2px 8px;
}
.live-head-meta {
  font-size: 13px;
  color: var(--muted);
}
.live-refresh {
  margin-left: auto;
  font-size: 12.5px;
  padding: 5px 11px;
}
.reader-scrape.is-refreshing .live-list {
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.live-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.live-update {
  position: relative;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 0 14px;
  padding: 0 0 22px;
}
/* The rail: a line down the time column, a dot per update. */
.live-update::before {
  content: '';
  position: absolute;
  left: 71px;
  top: 8px;
  bottom: -2px;
  width: 2px;
  background: var(--border-soft);
}
.live-update:last-child::before {
  display: none;
}
.live-update::after {
  content: '';
  position: absolute;
  left: 67px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--muted-2);
  box-sizing: border-box;
}
.live-update:first-child::after {
  border-color: var(--accent);
  background: var(--accent);
}
.live-when {
  text-align: right;
}
.live-time {
  display: block;
  padding-top: 1px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.live-update:first-child .live-time {
  color: var(--accent);
}
/* "12 min geleden" under the clock time; wraps to two short lines. */
.live-ago {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--muted-2);
}
.live-body {
  min-width: 0;
  padding-left: 14px;
}
.live-headline {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.live-text > :first-child {
  margin-top: 0;
}
.live-text > :last-child {
  margin-bottom: 0;
}
.reader-body .live-photo {
  margin: 8px 0 10px;
  border-radius: var(--radius-sm);
}
.live-day {
  margin: 4px 0 18px 76px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}
@media (max-width: 600px) {
  .live-update {
    grid-template-columns: 54px 1fr;
    gap: 0 10px;
  }
  .live-update::before {
    left: 59px;
  }
  .live-update::after {
    left: 55px;
  }
  .live-body {
    padding-left: 10px;
  }
  .live-day {
    margin-left: 64px;
  }
}

/* ---------- Sidebar as part of the page (computer) ----------
   Next to the deck the sidebar used to be a bordered panel with Actueel as a
   second box inside it: two blocks bolted onto the page. It is now a plain
   column on the page background, set off from the deck by one hairline, and
   Actueel and Laatste nieuws share one heading style (a label over a rule),
   like the sections of a news site. Phones keep the bottom sheet. */
@media (min-width: 921px) {
  .layout:not(.content--list) .sidebar {
    background: transparent;
    border: 0;
    border-left: 1px solid var(--border-soft);
    border-radius: 0;
    padding: 2px 0 0 20px;
  }
  .layout:not(.content--list) .sidebar .uitkijk {
    margin: 0 0 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .layout:not(.content--list) .sidebar .uitkijk-head {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-soft);
  }
  .layout:not(.content--list) .sidebar .uitkijk.is-collapsed .uitkijk-head {
    margin-bottom: 0;
  }
  .layout:not(.content--list) .sidebar .uitkijk-head h2,
  .layout:not(.content--list) .sidebar .sidebar-head h2 {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
  }
  .layout:not(.content--list) .sidebar .sidebar-head {
    padding-bottom: 8px;
  }
  /* The rows breathe like the deck's text, not like a widget list. */
  .layout:not(.content--list) .sidebar .latest-item {
    --tl-pad: 12px;
    /* The sidebar is the page here: the dots' ring is the page colour. */
    --tl-bg: var(--bg);
  }
  .layout:not(.content--list) .sidebar > .latest-list {
    margin-right: -6px;
    padding-right: 6px;
  }
}

.uk-empty[hidden] {
  display: none !important;
}
/* ---------- Actueel on a computer: compact and of one piece ----------
   The four tabs share one look, the rows of Laatste nieuws right below:
   - each tab only as tall as what's in it (capped), not a fixed box;
   - one row: a leading icon, a title, a muted line, the clock time right;
   - one header (a label and small text buttons), one badge, one "new"
     tint, one empty line;
   - the weather without its own card, in the same rhythm.
   Phones (the sheet) and tablets keep their own look. */
@media (min-width: 921px) {
  .layout:not(.content--list) .sidebar .uitkijk {
    margin-bottom: 16px;
  }
  .layout:not(.content--list) .sidebar .uitkijk-head {
    margin-bottom: 6px;
    padding-bottom: 6px;
  }
  .layout:not(.content--list) .sidebar .uitkijk-tabs {
    margin-bottom: 0;
    padding: 2px;
  }
  .layout:not(.content--list) .sidebar .uitkijk-head .uitkijk-tab {
    height: 26px;
  }
  .layout:not(.content--list) .sidebar .uitkijk-pane:not([hidden]) {
    height: auto;
    max-height: clamp(180px, 28vh, 250px);
  }
  .layout:not(.content--list) .sidebar .uitkijk-pane > .notif-list,
  .layout:not(.content--list) .sidebar .uitkijk-pane .uitkijk-empty,
  .layout:not(.content--list) .sidebar .uitkijk .weather {
    flex: none;
  }

  /* One header. */
  .layout:not(.content--list) .sidebar .uitkijk-pane-head,
  .layout:not(.content--list) .sidebar .weather-top {
    min-height: 24px;
    margin: 0 0 2px;
    gap: 6px;
  }
  .layout:not(.content--list) .sidebar .uitkijk-pane-head h3,
  .layout:not(.content--list) .sidebar .weather-loc {
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .layout:not(.content--list) .sidebar .weather-loc::before {
    content: 'Weer ·';
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .layout:not(.content--list) .sidebar .uk-head-btn,
  .layout:not(.content--list) .sidebar .weather-change,
  .layout:not(.content--list) .sidebar .alarm-manage {
    padding: 2px 6px;
    border: 0;
    border-radius: 5px;
    background: none;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    box-shadow: none;
  }
  .layout:not(.content--list) .sidebar .weather-change {
    margin-left: auto;
  }
  /* Buienradar stays a clear accent pill (with its map icon) in the head. */
  .layout:not(.content--list) .sidebar .weather-change + .weather-flipbtn {
    margin-left: 2px;
  }
  .layout:not(.content--list) .sidebar .weather-flipbtn {
    padding: 2px 9px 2px 7px;
    font-size: 11.5px;
  }
  .layout:not(.content--list) .sidebar .uk-head-btn:hover,
  .layout:not(.content--list) .sidebar .weather-change:hover,
  .layout:not(.content--list) .sidebar .alarm-manage:hover {
    background: var(--panel-hover);
    color: var(--text);
  }
  .layout:not(.content--list) .sidebar .brief-date {
    color: var(--muted-2);
    font-size: 11.5px;
  }

  /* One row. */
  .layout:not(.content--list) .sidebar .notif-list,
  .layout:not(.content--list) .sidebar .alarm-list,
  .layout:not(.content--list) .sidebar .brief-list {
    display: block;
    margin: 0;
    padding: 0;
  }
  .layout:not(.content--list) .sidebar .uk-row {
    display: grid;
    /* A fixed leading column: titles line up in every tab. */
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 10px;
    width: 100%;
    margin: 0;
    padding: 7px 4px;
    border: 0;
    border-top: 1px solid var(--border-soft);
    border-radius: 0;
    background: none;
    box-shadow: none;
    transform: none;
  }
  /* No line above a list's first row. (A briefing is a button inside its
     own li: only the first li's.) */
  .layout:not(.content--list) .sidebar ul > .uk-row:first-child,
  .layout:not(.content--list) .sidebar .brief-list > li:first-child > .uk-row {
    border-top: 0;
  }
  .layout:not(.content--list) .sidebar .uk-row:hover:not(:disabled) {
    background: var(--panel-hover);
    border-color: var(--border-soft);
    box-shadow: none;
    transform: none;
  }
  /* The leading icon: at least 20px wide, on the title's line. */
  .layout:not(.content--list) .sidebar .uk-row > :first-child {
    min-width: 20px;
    margin-top: 1px;
    justify-self: center;
  }
  .layout:not(.content--list) .sidebar .uk-row > .notif-dot {
    min-width: 0;
    margin-top: 6px;
  }
  .layout:not(.content--list) .sidebar .notif-live,
  .layout:not(.content--list) .sidebar .notif-live img {
    width: 18px;
    height: 18px;
  }
  .layout:not(.content--list) .sidebar .brief-card .svg,
  .layout:not(.content--list) .sidebar .brief-card.is-latest .svg {
    width: 20px;
    height: 20px;
    border-radius: 0;
    background: none;
  }
  .layout:not(.content--list) .sidebar .brief-card .svg svg {
    width: 17px;
    height: 17px;
  }
  /* Title, text, meta. */
  .layout:not(.content--list) .sidebar .notif-text strong,
  .layout:not(.content--list) .sidebar .alarm-title,
  .layout:not(.content--list) .sidebar .brief-card-name,
  .layout:not(.content--list) .sidebar .brief-card.is-latest .brief-card-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
  }
  .layout:not(.content--list) .sidebar .notif-text p,
  .layout:not(.content--list) .sidebar .brief-card-lead {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.4;
  }
  .layout:not(.content--list) .sidebar .notif-text {
    gap: 0;
  }
  .layout:not(.content--list) .sidebar .notif-meta,
  .layout:not(.content--list) .sidebar .alarm-meta {
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 11.5px;
  }
  .layout:not(.content--list) .sidebar .alarm-body {
    gap: 2px;
  }
  /* One line: the text gives way (…) before anything wraps. */
  .layout:not(.content--list) .sidebar .alarm-meta {
    flex-wrap: nowrap;
    gap: 6px;
  }
  .layout:not(.content--list) .sidebar .alarm-meta > * {
    flex: none;
  }
  .layout:not(.content--list) .sidebar .alarm-meta > .alarm-meta-text {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .layout:not(.content--list) .sidebar .notif-link {
    font-size: 12px;
  }
  /* The time, right. */
  .layout:not(.content--list) .sidebar .uk-time,
  .layout:not(.content--list) .sidebar .brief-card-time {
    color: var(--muted-2);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
    white-space: nowrap;
  }
  .layout:not(.content--list) .sidebar .brief-card-side {
    gap: 2px;
  }
  .layout:not(.content--list) .sidebar .notif-dismiss {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  /* One badge: Spoed (solid), priority (outline), Nieuw (the tint's). */
  .layout:not(.content--list) .sidebar .uk-badge,
  .layout:not(.content--list) .sidebar .brief-card.is-new .brief-card-state {
    padding: 0 5px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 15px;
    text-transform: uppercase;
  }
  .layout:not(.content--list) .sidebar .uk-badge.is-outline {
    border-color: var(--border);
    background: none;
    color: var(--muted);
  }
  .layout:not(.content--list) .sidebar .brief-card-state {
    font-size: 10.5px;
  }

  /* One "new": a light tint in the item's colour, fading once seen. */
  .layout:not(.content--list) .sidebar .uk-row.is-new {
    border-radius: 6px;
    background: color-mix(in srgb, var(--uk-c, var(--accent)) 9%, transparent);
  }
  .layout:not(.content--list) .sidebar .alarm-item.uk-row {
    --uk-c: var(--svc);
  }
  /* A briefing stays unread until it is opened, so a tint would never fade:
     its "Nieuw" badge says it, and the rows keep their plain dividers. */
  .layout:not(.content--list) .sidebar .brief-card.uk-row.is-new {
    border-radius: 0;
    background: none;
  }
  .layout:not(.content--list) .sidebar .brief-card.uk-row.is-new:hover {
    background: var(--panel-hover);
  }
  .layout:not(.content--list) .sidebar .notif-item.uk-row {
    --uk-c: var(--danger);
  }
  /* A patch note keeps its blue block here too (seen or not). */
  .layout:not(.content--list) .sidebar .notif-item--patch.uk-row {
    border-radius: 6px;
    background: color-mix(in srgb, var(--patch) 7%, transparent);
  }
  .layout:not(.content--list) .sidebar .notif-item--patch.uk-row.is-new {
    background: color-mix(in srgb, var(--patch) 15%, transparent);
  }
  .layout:not(.content--list) .sidebar .notif-item--patch.uk-row:hover {
    background: color-mix(in srgb, var(--patch) 20%, transparent);
  }
  .layout:not(.content--list) .sidebar .alarm-item.is-new.is-seen {
    background: none;
  }
  .layout:not(.content--list) .sidebar .brief-card.is-future {
    background: none;
    opacity: 0.7;
  }
  .layout:not(.content--list) .sidebar .alarm-places {
    margin: 0 0 4px;
    padding: 0 4px 6px;
    font-size: 11.5px;
  }
  .layout:not(.content--list) .sidebar .alarm-earlier {
    padding: 8px 4px 3px;
    font-size: 11px;
  }
  .layout:not(.content--list) .sidebar .alarm-foot,
  .layout:not(.content--list) .sidebar .alarm-covered {
    padding: 6px 4px 0;
    font-size: 11px;
    text-align: left;
  }

  /* One empty line. */
  .layout:not(.content--list) .sidebar .uk-empty {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 4px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    text-align: left;
  }
  .layout:not(.content--list) .sidebar .uk-empty .svg {
    display: inline-grid;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--muted-2);
  }
  .layout:not(.content--list) .sidebar .uk-empty .svg svg {
    width: 16px;
    height: 16px;
  }

  /* The weather, in the same rhythm and without its own card. */
  .layout:not(.content--list) .sidebar .weather {
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .layout:not(.content--list) .sidebar .weather-now {
    gap: 6px;
  }
  .layout:not(.content--list) .sidebar .wh {
    gap: 1px;
  }
  .layout:not(.content--list) .sidebar .weather-main {
    gap: 10px;
    padding: 2px 4px;
  }
  .layout:not(.content--list) .sidebar .weather-icon .svg svg {
    width: 28px;
    height: 28px;
  }
  .layout:not(.content--list) .sidebar .weather-icon {
    filter: none;
  }
  .layout:not(.content--list) .sidebar .weather-temp {
    font-size: 30px;
  }
  .layout:not(.content--list) .sidebar .weather-desc {
    font-size: 13px;
    font-weight: 600;
  }
  .layout:not(.content--list) .sidebar .weather-hours {
    padding: 4px 0;
    border: 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    border-radius: 0;
    background: none;
  }
  /* The three days on one line: "Vandaag ☁ 10° 3°", side by side. */
  .layout:not(.content--list) .sidebar .weather-days {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }
  .layout:not(.content--list) .sidebar .weather-day {
    grid-template-columns: auto auto auto;
    justify-content: center;
    gap: 5px;
    padding: 2px 2px;
    border-radius: 0;
    background: none;
    font-size: 11.5px;
    white-space: nowrap;
  }
  .layout:not(.content--list) .sidebar .weather-day + .weather-day {
    border-left: 1px solid var(--border-soft);
  }
  .layout:not(.content--list) .sidebar .weather-day .wd-name {
    grid-column: auto;
    font-size: 11.5px;
  }
  .layout:not(.content--list) .sidebar .weather-day .wd-temp {
    gap: 3px;
  }
  .layout:not(.content--list) .sidebar .weather {
    --wx-pad: 0px;
  }
  .layout:not(.content--list) .sidebar .weather.is-radar {
    min-height: calc(var(--radar-top, 32px) + 200px);
  }
}

/* A wide sidebar (380px): each day on two short lines, the name over its
   sky and temperatures, so the arrows beside them leave room for all of it. */
@media (min-width: 1181px) {
  .layout:not(.content--list) .sidebar .weather-day {
    grid-template-columns: auto auto;
    gap: 1px 5px;
    padding: 1px 2px;
  }
  .layout:not(.content--list) .sidebar .weather-day .wd-name {
    grid-column: 1 / -1;
    justify-self: center;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
  }
}

/* A narrower sidebar (340px): the three days without their icons, and an
   incident's meta line without its "tot 21:23". */
@media (min-width: 921px) and (max-width: 1180px) {
  .layout:not(.content--list) .sidebar .alarm-until {
    display: none;
  }
  .layout:not(.content--list) .sidebar .weather-day .wd-ic {
    display: none;
  }
}

/* Live blogs: following (the bell) and its melding. */
.live-follow {
  color: var(--muted);
}
.live-follow.is-on {
  color: var(--accent);
}
.live-follow.is-on svg path:first-child {
  fill: currentColor;
}
/* Updates since you last looked, and the one a melding jumped to. */
.live-update.is-new .live-time {
  color: var(--accent);
}
.live-update.is-new .live-body {
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
}
.live-update.is-jump .live-body {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-radius: var(--radius-sm);
  transition: background 0.6s ease;
}
/* A followed live blog's melding: the source's favicon with a red live dot
   on its corner, the blog's title on one line, the latest update in at most
   two lines. */
.notif-live {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--accent);
}
.notif-live .feed-icon {
  border-radius: 5px;
}
.notif-live .live-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 9px;
  height: 9px;
  box-shadow: 0 0 0 2px var(--panel-2);
}
.notif-live .live-dot:only-child {
  position: relative;
  right: auto;
  bottom: auto;
}
.notif-item--live .notif-text {
  min-width: 0;
}
/* A melding about a feed: its favicon; failing, with an amber "!". */
.notif-feed .notif-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f59e0b;
  color: #1b1405;
  box-shadow: 0 0 0 2px var(--panel-2);
  font-size: 8.5px;
  font-weight: 900;
  line-height: 1;
}
/* The line icons per kind (app.js NOTIF_ICONS). */
.notif-icon--server {
  color: var(--danger);
}
.notif-icon--feed-error {
  color: #f59e0b;
}
.notif-icon--feed-notice,
.notif-icon--info {
  color: var(--muted);
}
.notif-icon--guest {
  color: var(--accent);
}
.notif-title-line {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-body-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The viewer's controls stay above a zoomed photo. */
.lightbox-close,
.lightbox-nav,
.lightbox-count,
.lightbox-zoom {
  z-index: 2;
}
.lightbox-count {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(20, 22, 26, 0.6);
}

/* The logo goes back to the top (and refreshes with an account). */
.brand {
  cursor: pointer;
  border-radius: 10px;
}
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ---------- The article as a page ----------
   Opening an article no longer shows a card floating over the news: the
   article takes the whole window, on the page's own background, with a top
   bar (Terug, the source, the logo) and the action bar at the bottom, like
   going to the article's page. Terug, Esc and the browser's back button go
   back to the news. (The Bewerkingen view stays a popup.) */
.reader--page {
  display: block;
  padding: 0;
}
.reader--page[hidden] {
  display: none;
}
.reader--page .reader-backdrop {
  display: none;
}
.reader--page .reader-panel {
  width: 100%;
  height: 100dvh;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--bg);
  outline: none;
  animation: none;
}
/* Opening: the top bar (the site's own header) and the action bar stay
   perfectly still; only the article itself fades in. Sliding the whole page
   up made the header look like it jumped. */
.reader--page .reader-scroll {
  animation: reader-page-in 0.22s ease-out both;
}
@keyframes reader-page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .reader--page .reader-scroll {
    animation: none;
  }
}
/* Top bar: like the site's own header. */
.reader--page .reader-head {
  position: relative;
  z-index: 2;
  justify-content: flex-start;
  gap: 20px;
  /* The site's masthead exactly (.masthead: 1600px frame, 10px 22px 8px), so
     the logo stays where it was when an article opens. */
  padding: 10px max(22px, calc((100% - var(--page-w)) / 2 + 22px)) 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
.reader--page .reader-head-info {
  flex: 1 1 auto;
  min-width: 0;
}
/* Terug: a quiet text button, set off from the logo by a thin divider, like
   the header's other controls. */
.reader-back {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: auto;
  height: 36px;
  margin-left: 2px;
  padding: 0 12px 0 7px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}
.reader-back:hover {
  background: var(--panel-hover);
  color: var(--text);
}
.reader-back::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}
/* The source: the feed's icon and name in plain text (not red capitals),
   and "automatisch opgehaald" as a small note instead of a pill. */
.reader--page .reader-source {
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.reader--page .reader-status {
  font-size: 12.5px;
}
.reader-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
/* Already on screen: no slide-in on every article. */
.reader-brand .brand-name,
.reader-brand .brand-tagline {
  animation: none;
}
/* The article: a wider lead photo, a reading column for the text. */
.reader--page .reader-scroll {
  flex: 1 1 auto;
  padding: 40px 20px 72px;
}
.reader--page .reader-title {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.reader--page .reader-scroll > .reader-title,
.reader--page .reader-scroll > .reader-meta,
.reader--page .reader-scroll > .reader-body {
  max-width: 760px;
}
.reader--page .reader-scroll > .reader-hero,
.reader--page .reader-scroll > .reader-media {
  max-width: 980px;
}
.reader--page .reader-hero {
  /* The full 16:9 at the page's width (980px → 551px), not cut to 420px. */
  max-height: min(560px, 62vh);
  margin-bottom: 8px;
}
.reader--page .reader-meta {
  margin-bottom: 26px;
}
.reader--page .reader-body {
  font-size: 17.5px;
  line-height: 1.75;
}
/* Action bar: full width, its content lined up with the top bar. */
.reader--page .reader-foot {
  padding: 11px max(16px, calc((100% - 1180px) / 2));
  background: var(--panel);
}
@media (max-width: 720px) {
  .reader--page .reader-head {
    gap: 10px;
    /* The phone masthead: the logo alone, where the site has it. */
    padding: 10px 14px 6px 12px;
  }
  .reader--page .reader-brand {
    align-self: flex-start;
  }
  .reader-back span,
  .reader-brand .brand-text {
    display: none;
  }
  .reader-back {
    padding: 0 10px 0 8px;
  }
  .reader--page .reader-scroll {
    padding: 22px 16px 32px;
  }
  .reader--page .reader-body {
    font-size: 17px;
  }
}
/* The article page focuses Terug when it opens: a neutral ring, not the
   red one that reads as an error. */
.reader-back:focus-visible,
.reader-brand:focus-visible {
  outline: 2px solid var(--muted-2);
  outline-offset: 2px;
}

/* ---------- OLED-modus ----------
   On top of the dark theme (theme.js sets html[data-oled] only while the
   active theme is dark, also via Systeem). On an OLED screen a black pixel
   is off: the page and the large surfaces are pitch black, the panels just
   off black so they still read as layers, and the borders carry the
   structure that shadows can't show on black. Text is a touch softer than
   pure white, which glares and smears when scrolling on OLED. */
html[data-oled] {
  --bg: #000;
  --bg-grad: none;
  --panel: #000;
  --panel-2: #0e0e10;
  --panel-hover: #18181b;
  --border: #2a2a2f;
  --border-soft: #1b1b1f;
  --text: #e6e6e9;
  --muted: #9d9fa6;
  --muted-2: #82848b;
  --overlay-bg: rgba(0, 0, 0, 0.82);
  --shadow: none;
  --shadow-sm: none;
}
html[data-oled] body {
  background: #000;
}
/* Cards without a photo, and the media placeholders, go black too. */
html[data-oled] .card {
  background: linear-gradient(165deg, #0e0e10, #000 70%);
}
html[data-oled] .reader-thumb--video,
html[data-oled] .media-link-thumb {
  background: #0e0e10;
}
html[data-oled] .lightbox {
  background: #000;
}
/* Instellingen → Thema: the two OLED switches; the one this screen uses is
   marked. */
.theme-oled {
  margin-top: 16px;
}
.theme-oled-title {
  margin: 0 0 2px;
}
.theme-oled .switch-line {
  margin-top: 8px;
}
.theme-oled .switch-line.is-here .switch-text strong::after {
  content: ' · dit scherm';
  font-weight: 500;
  color: var(--muted-2);
}

/* A live blog's melding: its link in the live red (like the LIVE badge and
   the dot on its icon), not the brain-pink of Slimme modus meldingen. */
.notif-item--live .notif-text .notif-link {
  color: var(--accent);
}

/* ---------- Article page: the actions in the top bar ----------
   Score, "Tekst ophalen" and the original ("nos.nl ↗") sit on the right of
   the top bar as quiet text buttons, like Terug, instead of a bar at the
   bottom with a big red button for leaving Newsdeck. */
.reader-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: auto;
}
.reader-head-actions .reader-rating:empty {
  display: none;
}
.reader-head-actions .reader-rating {
  margin-right: 6px;
}
.reader-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.reader-action[hidden] {
  display: none;
}
.reader-action:hover {
  background: var(--panel-hover);
  color: var(--text);
}
.reader-action.is-busy {
  color: var(--muted-2);
  cursor: progress;
}
.reader-action:focus-visible {
  outline: 2px solid var(--muted-2);
  outline-offset: 2px;
}
/* The site's name in the line under the title links to the original. */
.reader-meta-link {
  color: inherit;
  text-decoration: none;
}
.reader-meta-link:hover {
  color: var(--text);
  text-decoration: underline;
}
/* No account: a small note after the article, where "read more" belongs. */
.reader--page .reader-scroll > .reader-guest-note {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--panel);
  font-size: 14px;
}
/* The bottom bar is gone, so the article runs to the bottom of the screen. */
.reader--page .reader-scroll {
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}
@media (max-width: 720px) {
  /* Phones: icons only. */
  .reader-action .scrape-label,
  .reader-action .reader-open-label {
    display: none;
  }
  .reader-action {
    padding: 0 9px;
  }
  .reader-head-actions .reader-rating {
    display: none;
  }
}

/* ---------- Follow bell on live blogs (cards and Laatste rows) ----------
   Outlined: not followed. Filled red: followed. */
.follow-bell {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  cursor: pointer;
  color: inherit;
  background: none;
}
.follow-bell.is-on svg path:first-child {
  fill: currentColor;
}
/* On a card: a round button in the photo's top-right corner. */
.follow-bell--card {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: rgba(14, 16, 22, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: background 0.15s ease, transform 0.15s ease;
}
.follow-bell--card:hover {
  background: rgba(14, 16, 22, 0.82);
  transform: scale(1.06);
}
.follow-bell--card.is-on {
  background: var(--accent);
  box-shadow: none;
}
/* A big card with the bell on its photo: the top line (feed + age) stops
   before the bell instead of running underneath it. */
.card.has-bell:not(.card--quad):not(.card--band) .card-head {
  padding-right: 54px;
}
/* Small cards have no room for it there (the feed name would vanish): their
   bell sits beside the LIVE badge, on the computer as on a phone. */
.follow-bell--inline {
  display: none;
}
.card--quad .follow-bell--card,
.card--band .follow-bell--card {
  display: none;
}
.card--quad .follow-bell--inline,
.card--band .follow-bell--inline {
  position: relative;
  display: inline-grid;
  vertical-align: -5px;
  width: 26px;
  height: 22px;
  margin: 0 4px 0 -2px;
  color: rgba(255, 255, 255, 0.78);
}
.card--quad .follow-bell--inline:hover,
.card--band .follow-bell--inline:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}
.card--quad .follow-bell--inline.is-on,
.card--band .follow-bell--inline.is-on {
  color: var(--accent);
}
/* A thumb-sized target around the small icon. */
.card--quad .follow-bell--inline::after,
.card--band .follow-bell--inline::after {
  content: '';
  position: absolute;
  inset: -11px -9px;
}
/* Phone list rows have no photo behind the text: the plain colours. */
@media (max-width: 720px) {
  .row-quad > .card .follow-bell--inline {
    color: var(--muted-2);
  }
  .row-quad > .card .follow-bell--inline:hover {
    color: var(--text);
    background: var(--panel-hover);
  }
  .row-quad > .card .follow-bell--inline.is-on {
    color: var(--accent);
  }
}
/* A list row's meta line on a phone: feed, age, LIVE and the bell wrap to a
   second line instead of squeezing the feed name to "NU…" and breaking the
   age over two lines. */
@media (max-width: 720px) {
  .news-meta {
    flex-wrap: wrap;
    row-gap: 3px;
  }
  .news-meta .news-time {
    white-space: nowrap;
  }
}
/* LIVE + bell in a meta line: kept together. */
.live-meta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
/* In a list row: small, beside the LIVE badge. */
.follow-bell--row {
  width: 24px;
  height: 22px;
  margin-left: 2px;
  border-radius: 6px;
  color: var(--muted-2);
}
.follow-bell--row:hover {
  color: var(--text);
  background: var(--panel-hover);
}
.follow-bell--row.is-on {
  color: var(--accent);
}
.follow-bell:focus-visible {
  outline: 2px solid var(--muted-2);
  outline-offset: 2px;
}

/* A live blog the site won't let us fetch (Telegraaf): a note after the teaser. */
.reader-live-blocked {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}
.reader-live-blocked a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.reader-live-blocked a:hover {
  text-decoration: underline;
}

/* ---------- Deleting the account (app.js openDeleteDialog) ---------- */
.account-delete {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
}
.delete-warning {
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  color: var(--text);
}
.delete-warning strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--danger);
}
.delete-warning p {
  margin: 6px 0;
}
.delete-warning ul {
  margin: 4px 0 8px;
  padding-left: 20px;
}
.delete-warning li {
  margin: 2px 0;
}
.delete-question {
  margin: 14px 0 0;
  font-weight: 700;
}
.delete-body {
  display: grid;
  gap: 12px;
  text-align: center;
}
.delete-count {
  font-size: 48px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--danger);
}
.delete-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--danger) 15%, transparent);
}
.delete-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--danger);
  transition: width 0.2s linear;
}
.auth-note--done {
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--muted-2) 14%, transparent);
  color: var(--text);
}
.delete-cancel {
  font-weight: 700;
}

/* ---------- One-time login code (app.js makeLoginCode, login.js) ---------- */
.login-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.login-code {
  padding: 8px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  user-select: all;
  background: var(--panel-2);
}
.login-code-steps {
  margin: 4px 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
}
.login-code-ask {
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.login-code-ask p {
  margin: 6px 0;
}
.login-code-done {
  margin: 0;
  font-weight: 600;
}
.login-code-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.auth-links--single {
  justify-content: center;
}
/* Waiting for the other device: a quiet spinner. */
.auth-wait {
  width: 34px;
  height: 34px;
  margin: 8px auto;
  border: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: auth-wait-spin 0.9s linear infinite;
}
@keyframes auth-wait-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-wait {
    animation: none;
  }
}

/* ---------- Settings: overview and panels (readability) ----------
   Every tile says what's behind it; on a phone the tiles are one list with
   a chevron. Hints in the panels are a size up and a shade darker, and sit
   close to the heading they explain. */
.settings-tile .tile-text {
  display: grid;
  gap: 3px;
}
.settings-tile .tile-desc {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
}
.settings-tile--danger .tile-desc {
  color: var(--muted);
}
@media (max-width: 720px) {
  .settings-tiles {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--panel-2);
  }
  .settings-tile {
    position: relative;
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    min-height: 62px;
    padding: 11px 40px 11px 16px;
    border: 0;
    border-radius: 0;
    background: none;
    text-align: left;
    font-size: 15px;
  }
  .settings-tile + .settings-tile {
    border-top: 1px solid var(--border-soft);
  }
  .settings-tile svg {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
  }
  .settings-tile::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted-2);
    border-top: 2px solid var(--muted-2);
    transform: translateY(-50%) rotate(45deg);
  }
  .settings-tile:hover,
  .settings-tile:focus-visible {
    transform: none;
    box-shadow: none;
    background: var(--panel-hover);
  }
  .settings-group {
    margin-top: 14px;
  }
}

#modal .hint-inline {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
#modal .add-form > h3 + .hint-inline,
#modal .add-form > h3 + p.hint {
  margin-top: -10px;
}
#modal .add-form > p.hint-inline {
  margin: 0;
}

/* Feeds: adding an RSS address by hand, folded away. */
.feed-manual {
  margin-top: 18px;
  padding: 0;
  gap: 0;
}
#modal .feed-manual {
  padding: 0;
  gap: 0;
}
.feed-manual-summary {
  display: grid;
  gap: 2px;
  padding: 16px 48px 16px 22px;
  position: relative;
  list-style: none;
  cursor: pointer;
}
.feed-manual-summary::-webkit-details-marker {
  display: none;
}
.feed-manual-summary::after {
  content: '';
  position: absolute;
  right: 22px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted-2);
  border-bottom: 2px solid var(--muted-2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.feed-manual[open] > .feed-manual-summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.feed-manual-title {
  font-weight: 700;
  color: var(--text);
}
.feed-manual-form {
  display: grid;
  gap: 16px;
  padding: 4px 22px 20px;
}
/* Its own heading only says something while editing a feed. */
.feed-manual:not(.is-editing) #feedFormTitle {
  display: none;
}
.feed-manual.is-editing > .feed-manual-summary {
  display: none;
}
.feed-manual.is-editing .feed-manual-form {
  padding-top: 20px;
}
/* Tiles line up by their icon, however long the description. */
@media (min-width: 721px) {
  .settings-tile {
    justify-content: flex-start;
    padding-top: 22px;
  }
}

/* ======================================================================
   Settings: one calm style for every panel
   ----------------------------------------------------------------------
   The window is the page colour; each section is a white (dark: raised)
   card with a sentence-case title and its explanation right under it.
   Inside a card every setting gets its own breathing room: a clear label,
   the control, a readable hint, and space before the next one. Rows of
   switches are divided by hairlines; sub-parts of a card by a rule.
   ====================================================================== */
#modal .modal-body {
  background: var(--bg);
}
#modal .add-form {
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
#modal .add-form h3,
#modal .list-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
#modal .list-title {
  margin-top: 6px;
}
/* The explanation belongs to its title. */
#modal .add-form > h3 + .hint-inline,
#modal .add-form > h3 + p.hint,
#modal .add-form > h3 + p {
  margin-top: -14px;
}
#modal .hint-inline,
#modal .hint {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
#modal p.hint-inline,
#modal p.hint {
  margin: 0;
}
/* A field: label, control, hint — close together; the next field is
   separated by the card's gap. */
#modal .field {
  gap: 7px;
}
#modal .field label {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text);
}
#modal .field label .hint-inline {
  margin-left: 4px;
  font-weight: 400;
}
#modal .add-form input[type='text'],
#modal .add-form input[type='url'],
#modal .add-form input[type='password'],
#modal .add-form input:not([type]),
#modal .add-form select {
  min-height: 42px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
}
#modal .switch-line {
  padding: 14px 0;
}
#modal .switch-line:first-of-type {
  padding-top: 4px;
}
#modal .switch-text strong {
  font-size: 14.5px;
}
/* A second part inside a card (OLED-modus under the colours): a rule
   above it, its own small title. */
#modal .theme-oled-title {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  font-size: 14.5px;
}
#modal .style-group-head {
  margin-bottom: 10px;
  font-size: 13.5px;
  color: var(--text);
}
#modal .account-actions,
#modal .form-actions {
  gap: 10px;
}
/* Lists (feeds, categories, passkeys): rows on the card colour. */
#modal .feed-row {
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--panel);
}
/* Account: its sections are the cards (no card around the cards). */
#modal .account-section {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
#modal .account-panel {
  gap: 18px;
}
/* The overview's tiles on the page colour. */
.settings-tile {
  background: var(--panel);
}
@media (max-width: 720px) {
  #modal .add-form {
    padding: 18px 16px;
  }
  .settings-tiles {
    background: var(--panel);
  }
  .settings-tile {
    background: none;
  }
}

/* ---------- Step dialogs (login code, deleting the account) ----------
   One size from the first step to the last (app.js flowDialog). */
.flow-panel {
  width: min(520px, 100%);
}
.flow-body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 340px;
}
.flow-foot {
  justify-content: flex-end;
  gap: 10px;
}
.flow-foot[hidden] {
  display: none;
}
.flow-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.flow-result {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 10px;
  background: var(--panel-2);
}
.flow-result strong {
  font-size: 16px;
}
.flow-result.is-ok strong {
  color: var(--ok);
}
.flow-result p {
  margin: 0;
  line-height: 1.5;
}
.reauth-box {
  display: grid;
  gap: 12px;
}
.reauth-box h3 {
  margin: 0;
  font-size: 16px;
}
.reauth-box .reauth-form {
  display: grid;
  gap: 10px;
}
.flow-body input[type='password'],
.flow-body input[type='text'] {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
/* The login code's status keeps room for the question it turns into. */
.login-code-status {
  min-height: 132px;
}
.login-code-wait {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--muted);
}
.login-code-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  animation: login-code-pulse 1.4s ease-in-out infinite;
}
@keyframes login-code-pulse {
  50% {
    opacity: 0.25;
  }
}
@media (prefers-reduced-motion: reduce) {
  .login-code-dot {
    animation: none;
  }
}
.login-code-answer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.login-code-ask p {
  margin: 6px 0 0;
}
/* A step dialog sits at a fixed height from the top (not centred), and its
   body has room for the tallest step: a step that is shorter or longer
   never moves the title or the buttons you were about to press. */
.flow-modal {
  align-items: flex-start;
}
.flow-modal .flow-panel {
  margin-top: min(12vh, 110px);
}
.flow-body {
  min-height: 380px;
}
/* The button row keeps its place even in a step without buttons. */
.flow-foot {
  box-sizing: border-box;
  min-height: 63px;
}
@media (max-width: 720px) {
  .flow-modal .flow-panel {
    margin-top: 16px;
  }
}

/* ---------- Welcome / source picker (guests and new accounts) ----------
   The same calm style as Instellingen: white cards on the page colour,
   sentence-case titles, and source chips that are easy to hit and show
   clearly what's picked. */
#intro .intro-body {
  background: var(--bg);
}
#intro .add-form {
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
#intro .add-form h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
#intro .intro-lead {
  font-size: 14px;
  line-height: 1.5;
}
#intro .tag-picker {
  gap: 8px;
}
#intro .tag-check {
  padding: 7px 13px 7px 10px;
  background: var(--bg);
}
#intro .tag-check span {
  font-size: 13px;
}
#intro .tag-check:not(.is-disabled):hover {
  border-color: color-mix(in srgb, var(--cat) 55%, var(--border));
  background: color-mix(in srgb, var(--cat) 7%, var(--bg));
}
#intro .tag-check:has(input:checked) {
  border-color: color-mix(in srgb, var(--cat) 60%, transparent);
  background: color-mix(in srgb, var(--cat) 14%, var(--panel));
}
#intro .tag-check.is-disabled {
  cursor: not-allowed;
}
.intro-count {
  align-self: center;
  margin-right: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.intro-count[hidden] {
  display: none;
}

/* ---------- Guests: a quiet note and one clear invitation ----------
   The header has "Account maken" and the sidebar card explains what an
   account adds; the strip under the header is just a short, calm note. */
.guest-banner {
  border-bottom: 1px solid var(--border-soft);
  background: var(--panel);
}
.guest-banner-inner {
  padding: 8px 22px;
}
.guest-banner-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.guest-banner-link {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.guest-banner-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.guest-promo {
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.guest-promo h2 {
  font-size: 16px;
  font-weight: 700;
}
.guest-promo-list {
  gap: 8px;
  font-size: 13.5px;
  color: var(--text);
}
.guest-promo-list li::before {
  content: '';
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.9' fill='none' stroke='%23e5322d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 16px no-repeat;
}
@media (max-width: 720px) {
  .guest-banner-inner {
    padding: 8px 14px;
  }
  .guest-banner-text {
    font-size: 12.5px;
  }
  /* On a phone the link is the invitation (the header buttons are hidden):
     the note gets its own line, the link and ✕ the line under it. */
  .guest-banner-inner {
    flex-wrap: wrap;
    row-gap: 2px;
  }
  .guest-banner-text {
    flex: 1 1 100%;
  }
  .guest-banner-link {
    font-size: 12.5px;
  }
  .guest-banner-close {
    width: 26px;
    height: 26px;
    margin-left: auto;
  }
}

/* ---------- Guests: compact sidebar promo ----------
   The sidebar has a fixed height next to the deck; the old card (six ticks,
   a full-width button) pushed Laatste nieuws out of sight. Now: title, one
   line, the button and "Andere bronnen kiezen" side by side, the full list
   folded away, and ✕ to drop it for this visit. */
.guest-promo {
  gap: 8px;
  padding: 12px 14px;
}
.guest-promo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.guest-promo h2 {
  font-size: 14.5px;
}
.guest-promo-close {
  flex: none;
  width: 26px;
  height: 26px;
  margin: -4px -6px -4px 0;
  border-radius: 50%;
  font-size: 12px;
}
.guest-promo-lead {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.guest-promo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}
.guest-promo-actions .btn {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
}
.guest-promo-actions .guest-promo-pick {
  align-self: center;
}
.guest-promo-more summary {
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
}
.guest-promo-more summary:hover {
  color: var(--text);
}
.guest-promo-more .guest-promo-list {
  margin-top: 8px;
  font-size: 13px;
}
/* Guests only have Meldingen in Actueel (mostly empty): a shorter pane, so
   Laatste nieuws keeps its room. */
@media (min-width: 721px) {
  .is-guest .layout:not(.content--list) .sidebar .uitkijk {
    --uk-h: clamp(140px, 20vh, 200px);
  }
}

/* Guests on arrival: Inloggen / Account maken are links in the option rows. */
a.intro-option {
  text-decoration: none;
}
.intro-option--primary {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border-soft));
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
}
.intro-option--primary .intro-option-arrow {
  color: var(--accent);
}
/* The account choice has no footer buttons (the rows are the way on). */
#intro:has(.intro-step[data-step="account"]:not([hidden])) .intro-foot {
  display: none;
}
/* Phones (full-height panel): the body fills it, also when the step is short. */
@media (max-width: 720px) {
  #intro .intro-body {
    flex: 1 1 auto;
  }
}
@media (max-width: 720px) {
  #intro .intro-body {
    align-content: start;
  }
}
