:root {
  color-scheme: light;
  --rosa: #f5d6dc;
  --rosa-deep: #eeb8c3;
  --bg: #f5d6dc;
  --bg-header: rgba(245, 214, 220, 0.92);
  --paper: #fff7f8;
  --ink: #14110f;
  --muted: #6b4a50;
  --faint: #8a6a70;
  --line: rgba(20, 17, 15, 0.16);
  --rule: #14110f;
  --accent: #9b1b2e;
  --thumb-bg: #ead0d5;
  --shadow: 0 1px 2px rgba(40, 10, 20, 0.06);
  --font: "Source Sans 3", "Helvetica Neue", system-ui, sans-serif;
  --font-masthead: "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
  --max: 720px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c0c10;
  --bg-header: rgba(28, 12, 16, 0.94);
  --paper: #2a1419;
  --ink: #f8ecee;
  --muted: #c9a8ae;
  --faint: #a8888e;
  --line: rgba(245, 214, 220, 0.16);
  --rule: #f5d6dc;
  --accent: #f0a3b0;
  --thumb-bg: #3a1c22;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(80, 20, 30, 0.045) 0.7px, transparent 0.7px);
  background-size: 3px 3px;
  line-height: 1.45;
  min-height: 100vh;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(rgba(245, 214, 220, 0.05) 0.7px, transparent 0.7px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.55rem 0.9rem;
  font-weight: 700;
  z-index: 40;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: min(var(--max), calc(100% - 20px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-header);
  border-bottom: 2px solid var(--rule);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
}
.brand { text-decoration: none; color: inherit; display: block; min-width: 0; }
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.logo-mark {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-masthead);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.wordmark {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  line-height: 0.88;
}
.wm-top, .wm-bot {
  font-family: var(--font-masthead);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.wm-top { font-size: 1.02rem; }
.wm-bot { font-size: 0.92rem; }
.tagline, .updated { display: none; }

.header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.icon-btn {
  appearance: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { border-color: var(--ink); }
.search-toggle { display: grid; }
.search-toggle .icon-close { display: none; }
.search-panel { display: none; }

.site-header.is-search-open .brand { display: none; }
.site-header.is-search-open .header-tools {
  flex: 1;
  min-width: 0;
  align-items: flex-start;
}
.site-header.is-search-open .search-panel {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  min-width: 0;
  gap: 6px;
}
.site-header.is-search-open .search {
  display: block;
  position: relative;
  flex: 1 1 100%;
  min-width: 0;
}
.site-header.is-search-open .search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
}
.site-header.is-search-open .search input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 10px 8px 34px;
  font: inherit;
  font-size: 0.88rem;
  outline: none;
}
.site-header.is-search-open .select-wrap {
  position: relative;
  flex: 1 1 auto;
}
.site-header.is-search-open .select-wrap select {
  appearance: none;
  width: 100%;
  max-width: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 24px 8px 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.site-header.is-search-open .select-wrap::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.site-header.is-search-open .search-toggle .icon-search { display: none; }
.site-header.is-search-open .search-toggle .icon-close { display: block; }

.editions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0 6px;
}
.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0;
}
.card-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.card-summary {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.card-kicker {
  font-family: var(--font-masthead);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
}
.card-headline {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.card-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}
.chevron {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 1px;
  color: var(--muted);
  transition: transform 0.2s ease;
  display: grid;
  place-items: center;
}
.is-open > .card-toggle .chevron { transform: rotate(180deg); }
.card-body {
  display: none;
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}
.is-open > .card-body { display: block; padding-top: 10px; }
.edition-row, .source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.edition-btn, .source-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.edition-btn.is-active, .source-chip.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.edition-btn .soon-flag {
  margin-left: 0.3rem;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0 40px;
}
.status, .empty-note {
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.news-item { border-bottom: 1px solid var(--line); }
.news-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.news-row:hover .news-title,
.news-row:focus-visible .news-title { color: var(--accent); }

.news-thumb {
  position: relative;
  flex: 0 0 112px;
  width: 112px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--thumb-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-placeholder {
  display: none;
  font-family: var(--font-masthead);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--faint);
  line-height: 1;
}
.news-thumb.is-placeholder .news-placeholder,
.news-thumb:not(:has(img)) .news-placeholder { display: block; }

.news-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 1px;
}
.news-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.news-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}
.news-pub-sep, .news-pub {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.news-title {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.32;
  color: var(--ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.news-item.is-read .news-title { color: var(--muted); }
.news-detail {
  padding: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.news-detail[hidden] { display: none; }
.summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.source-link, .also-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}
.source-link:hover, .also-link:hover { text-decoration: underline; }
.news-also {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
}
.also-label { font-weight: 700; margin-right: 0.2rem; }

.badge-mediacourant { color: #9b1b2e; }
.badge-shownieuws { color: #c45c00; }
.badge-rtl_boulevard { color: #1a5fb4; }
.badge-bekende_buren { color: #6d4c41; }
.badge-nu_achterklap { color: #0b7a3b; }
.badge-ad_show, .badge-ad_showbytes, .badge-ad_royalty { color: #0066a1; }
.badge-party { color: #a3206a; }
.badge-showbizzsite { color: #8e24aa; }
.badge-ditjes { color: #d81b60; }
.badge-grazia { color: #000; }
.badge-lovereality { color: #c2185b; }
.badge-metro { color: #1565c0; }
.badge-nos_cultuur, .badge-nos_koningshuis { color: #cc0000; }
[data-theme="dark"] .badge-grazia { color: #f5d6dc; }
[data-theme="dark"] .badge-shownieuws { color: #f0a35a; }
[data-theme="dark"] .badge-rtl_boulevard { color: #7eb0ef; }
[data-theme="dark"] .badge-nu_achterklap { color: #5dce88; }
[data-theme="dark"] .badge-ad_show,
[data-theme="dark"] .badge-ad_showbytes,
[data-theme="dark"] .badge-ad_royalty { color: #6cb7e0; }

.soon-panel {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 1.3rem 1.1rem;
  margin: 8px 0 2rem;
}
.soon-panel h2 {
  font-family: var(--font-masthead);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}
.soon-panel p { color: var(--muted); margin: 0 0 0.6rem; }

.site-footer {
  border-top: 2px solid var(--rule);
  padding: 1.4rem 0 2.4rem;
}
.site-footer p { color: var(--muted); margin: 0 0 0.8rem; font-size: 0.9rem; }
.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.sources a {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.8rem;
  background: var(--paper);
}
.sources a:hover { border-color: var(--ink); }
.fineprint { font-size: 0.8rem; color: var(--faint); }

@media (min-width: 721px) {
  .wrap { width: min(var(--max), calc(100% - 32px)); }
  .header-top { padding: 12px 0 10px; gap: 16px; }
  .logo-mark { width: 40px; height: 40px; flex-basis: 40px; font-size: 0.9rem; }
  .wm-top { font-size: 1.45rem; }
  .wm-bot { font-size: 1.28rem; }
  .tagline, .updated {
    display: block;
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
  }
  .updated { margin-top: 1px; }
  .search-toggle { display: none; }
  .search-panel {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .search { position: relative; }
  .search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--faint);
  }
  .search input {
    width: min(240px, 32vw);
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    border-radius: 999px;
    padding: 9px 14px 9px 36px;
    font: inherit;
    font-size: 0.9rem;
    outline: none;
  }
  .select-wrap { position: relative; }
  .select-wrap select {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    border-radius: 999px;
    padding: 9px 28px 9px 12px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    max-width: 12rem;
  }
  .select-wrap::after {
    content: "";
    position: absolute;
    right: 11px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
  }
  .news-thumb { flex-basis: 128px; width: 128px; height: 100px; }
  .news-title { font-size: 1.12rem; }
}
