/* WATTBA: nieuwssite. Plain CSS, no JS, no external resources. Light, dark or automatic (prefers-color-scheme) via data-theme. */

/* Theme: light tokens on :root; dark tokens for data-theme="donker" and for data-theme="auto" under a dark OS scheme.
   The two dark blocks must stay identical. data-theme is set on <html> by the layout from the `thema` cookie. */
:root {
  --bg: #ffffff;
  --fg: #111318;
  --muted: #5a5f69;
  --accent: #c8102e; /* WATTBA rood */
  --accent-fg: #ffffff;
  --link: #a30d26;
  --border: #dcdfe4;
  --border-strong: #111318;
  --surface: #f3f4f6;
  --major: #b45309;
  --major-bg: #fff4e0;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --img-filter: none;
  /* Rubriek colours: fill (white text on it) and label colour on the page background. */
  --c-modellen: #2f5d9e;  --c-modellen-ink: #2f5d9e;
  --c-robotica: #b4501a;  --c-robotica-ink: #a8470f;
  --c-hardware: #4a5568;  --c-hardware-ink: #475467;
  --c-energie: #a8750a;   --c-energie-ink: #8a5f06;
  --c-biotech: #2f7a5b;   --c-biotech-ink: #266a4e;
  --c-onderzoek: #6b4aa0; --c-onderzoek-ink: #5f3f94;
  --c-beleid: #8a2f45;    --c-beleid-ink: #8a2f45;
  --c-bedrijven: #1f6f7a; --c-bedrijven-ink: #1b636d;
  --rub: #4b5563;
  --rub-ink: #4b5563;
  color-scheme: light dark;
}

:root[data-theme='licht'] { color-scheme: light; }

:root[data-theme='donker'] {
  color-scheme: dark;
  --bg: #0f1013;
  --fg: #ececee;
  --muted: #a1a5af;
  --accent: #ff4d63;
  --accent-fg: #14080a;
  --link: #ff8b9b;
  --border: #2b2d33;
  --border-strong: #ececee;
  --surface: #181a1f;
  --major: #fbbf24;
  --major-bg: #2a2110;
  --img-filter: brightness(0.92);
  --c-modellen: #274b7f;  --c-modellen-ink: #8db4ec;
  --c-robotica: #8f4216;  --c-robotica-ink: #f0a477;
  --c-hardware: #3b4556;  --c-hardware-ink: #a9b4c6;
  --c-energie: #7d570a;   --c-energie-ink: #ecc15f;
  --c-biotech: #25614a;   --c-biotech-ink: #7fd0ab;
  --c-onderzoek: #54397f; --c-onderzoek-ink: #bda4ea;
  --c-beleid: #70283a;    --c-beleid-ink: #ee9cb0;
  --c-bedrijven: #1a5961; --c-bedrijven-ink: #78cbd6;
  --rub: #3a404b;
  --rub-ink: #aab0bc;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme='auto'] {
    --bg: #0f1013;
    --fg: #ececee;
    --muted: #a1a5af;
    --accent: #ff4d63;
    --accent-fg: #14080a;
    --link: #ff8b9b;
    --border: #2b2d33;
    --border-strong: #ececee;
    --surface: #181a1f;
    --major: #fbbf24;
    --major-bg: #2a2110;
    --img-filter: brightness(0.92);
    --c-modellen: #274b7f;  --c-modellen-ink: #8db4ec;
    --c-robotica: #8f4216;  --c-robotica-ink: #f0a477;
    --c-hardware: #3b4556;  --c-hardware-ink: #a9b4c6;
    --c-energie: #7d570a;   --c-energie-ink: #ecc15f;
    --c-biotech: #25614a;   --c-biotech-ink: #7fd0ab;
    --c-onderzoek: #54397f; --c-onderzoek-ink: #bda4ea;
    --c-beleid: #70283a;    --c-beleid-ink: #ee9cb0;
    --c-bedrijven: #1a5961; --c-bedrijven-ink: #78cbd6;
    --rub: #3a404b;
    --rub-ink: #aab0bc;
  }
}

/* Rubriek classes pick up the tokens above, so they follow every theme mode. */
.cat-modellen   { --rub: var(--c-modellen);   --rub-ink: var(--c-modellen-ink); }
.cat-robotica   { --rub: var(--c-robotica);   --rub-ink: var(--c-robotica-ink); }
.cat-hardware   { --rub: var(--c-hardware);   --rub-ink: var(--c-hardware-ink); }
.cat-energie    { --rub: var(--c-energie);    --rub-ink: var(--c-energie-ink); }
.cat-biotech    { --rub: var(--c-biotech);    --rub-ink: var(--c-biotech-ink); }
.cat-onderzoek  { --rub: var(--c-onderzoek);  --rub-ink: var(--c-onderzoek-ink); }
.cat-beleid     { --rub: var(--c-beleid);     --rub-ink: var(--c-beleid-ink); }
.cat-bedrijven  { --rub: var(--c-bedrijven);  --rub-ink: var(--c-bedrijven-ink); }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; padding-block: 1.25rem 3rem; }

.wrap { width: 100%; max-width: 75rem; margin-inline: auto; padding-inline: 1rem; }
.narrow { max-width: 46rem; }

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

img { max-width: 100%; }

h1, h2, h3, h4 { line-height: 1.2; }
h1 { font-family: var(--serif); font-size: 2rem; margin-block: 0.25rem 0.75rem; }
h2 { font-size: 1.35rem; margin-block: 2rem 0.75rem; }
h3 { font-size: 1.1rem; margin-block: 0.75rem 0.25rem; }
h4 { font-size: 1.05rem; margin-block: 1rem 0.25rem; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-fg); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0; }

/* ---------- Masthead & section bar ---------- */
.masthead { background: var(--bg); }
.masthead-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.8rem 0.55rem;
}
.brand { text-decoration: none; color: var(--fg); display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.75rem; line-height: 1; }
.brand-name { font-family: var(--font); font-weight: 900; letter-spacing: -0.045em; font-size: 2.1rem; text-transform: uppercase; color: var(--fg); }
.brand-name::first-letter { color: var(--accent); }
.brand-tagline { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.01em; }
.masthead-date { margin: 0; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

.section-bar { border-block: 3px solid var(--accent); border-bottom-width: 1px; border-bottom-color: var(--border); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.section-bar .wrap { padding-inline: 0; }
.section-bar ul {
  list-style: none; margin: 0; padding: 0 1rem;
  display: flex; gap: 0.1rem; overflow-x: auto; white-space: nowrap;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.section-bar ul::-webkit-scrollbar { display: none; }
.section-bar a {
  display: block; padding: 0.7rem 0.7rem 0.6rem; color: var(--fg); text-decoration: none;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  border-bottom: 3px solid transparent;
}
.section-bar a:hover { color: var(--accent); }
.section-bar a[aria-current='page'] { border-bottom-color: var(--accent); color: var(--accent); }
.section-bar li:first-child a { padding-left: 0; }

/* Theme switch: segmented control, icons only on small screens. */
.masthead-side { display: flex; align-items: center; gap: 0.5rem 1.25rem; }
.theme-switch ul { list-style: none; margin: 0; padding: 0; display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.theme-switch a {
  display: flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; padding: 0;
  color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 600; line-height: 1;
}
.theme-switch li + li a { border-left: 1px solid var(--border); }
.theme-switch a:hover { background: var(--surface); }
.theme-switch a[aria-current='true'] { background: var(--fg); color: var(--bg); }
.theme-switch a:focus-visible { outline-offset: -3px; }
.theme-icon { font-size: 0.8rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 3px solid var(--accent); color: var(--muted); font-size: 0.9rem; padding-block: 2rem 2.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.site-footer h2 { margin: 0 0 0.5rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg); }
.site-footer ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.site-footer li { margin-block: 0.2rem; break-inside: avoid; }
.site-footer a { color: var(--fg); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .brand-name { margin: 0 0 0.4rem; font-size: 1.5rem; }
.footer-note { margin: 0; max-width: 34ch; }
.footer-disclaimer { margin: 1.75rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.82rem; max-width: 80ch; }
.footer-disclaimer a { color: var(--fg); }

/* ---------- Shared bits ---------- */
.kicker { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.6rem; margin: 0 0 0.3rem; font-size: 0.8rem; color: var(--muted); }
.cat-label, .type-label {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; text-decoration: none;
}
.cat-label { color: var(--rub-ink); }
a.cat-label:hover { text-decoration: underline; }
.type-label { color: var(--fg); border: 1px solid var(--border-strong); padding: 0 0.35rem; border-radius: 2px; }
.front-label {
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--accent); border: 1px solid var(--accent); padding: 0 0.35rem; border-radius: 2px;
}
.ts, time.ts { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.time-list .ts { white-space: normal; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.25rem; }
.empty { color: var(--muted); }

/* Media: always 16:9 so grids do not jump. */
.media-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  border-top: 3px solid var(--rub, var(--accent)); padding-top: 0.45rem; margin: 2.25rem 0 1rem;
}
.section-head h2 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.005em; }
.section-head h2 a { color: var(--fg); text-decoration: none; }
.section-head h2 a:hover { text-decoration: underline; }
.section-more { font-size: 0.85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-more:hover { text-decoration: underline; }

/* ---------- Story cards ---------- */
.story { display: block; min-width: 0; }
.story-media { display: block; margin-bottom: 0.55rem; }
.story-title { font-family: var(--serif); font-size: 1.08rem; font-weight: 700; line-height: 1.22; margin: 0; }
.story-title a, .top-body h1 a, .news-text h3 a, .time-list h3 a { color: var(--fg); text-decoration: none; }
.story-title a:hover, .top-body h1 a:hover, .news-text h3 a:hover, .time-list h3 a:hover, .compact-list a:hover { text-decoration: underline; }
.story-lead { color: var(--muted); margin: 0.4rem 0 0; font-size: 0.95rem; }
.story-big .story-title { font-size: 1.5rem; }

/* ---------- Front page ---------- */
.front { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.top-story { display: block; }
.top-media { display: block; margin-bottom: 0.75rem; }
.top-body h1 { font-size: 1.85rem; font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
.top-lead { font-size: 1.1rem; line-height: 1.45; margin: 0 0 0.6rem; color: var(--fg); }
.byline-small { margin: 0; font-size: 0.82rem; color: var(--muted); }

.secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

.latest-box, .side-box { background: var(--surface); padding: 0.9rem 1rem 1rem; border-top: 3px solid var(--accent); }
.side-box { margin-top: 1.25rem; }
.box-title { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.35rem; }
.time-list { list-style: none; padding: 0; margin: 0; }
.time-list li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 0.5rem; padding-block: 0.6rem; border-bottom: 1px solid var(--border); }
.time-list li:last-child { border-bottom: 0; }
.time-list .ts { padding-top: 0.2rem; font-weight: 600; }
.time-list h3 { font-family: var(--serif); font-size: 1rem; font-weight: 700; line-height: 1.25; margin: 0.05rem 0 0; }
.time-list .cat-label { font-size: 0.66rem; }
.more { margin: 0.5rem 0 0; font-size: 0.88rem; font-weight: 600; }
.more a { text-decoration: none; }
.more a:hover { text-decoration: underline; }

.mini-timeline { list-style: none; margin: 0; padding: 0; }
.mini-timeline li { padding-block: 0.45rem; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; font-size: 0.92rem; line-height: 1.3; }
.mini-timeline li:last-child { border-bottom: 0; }
.mini-timeline time { font-size: 0.75rem; color: var(--muted); }

.cat-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 1.5rem; }
.compact-list { list-style: none; margin: 0; padding: 0; align-self: start; }
.compact-list li { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: 0.5rem; padding-block: 0.7rem; border-top: 1px solid var(--border); }
.compact-list li:first-child { border-top: 0; padding-top: 0; }
.compact-list a { font-family: var(--serif); font-weight: 700; line-height: 1.25; color: var(--fg); text-decoration: none; }
.compact-list .ts { padding-top: 0.15rem; }

.empty-front { max-width: 46rem; padding-block: 2rem; border-bottom: 1px solid var(--border); }
.empty-front h1 { font-size: 2.4rem; }

/* ---------- Lists ---------- */
.list-head { border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; margin-bottom: 0.5rem; border-top: 3px solid var(--rub, var(--accent)); padding-top: 0.6rem; }
.list-head .kicker { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; font-size: 0.74rem; }
.list-head h1 { font-size: 2.1rem; margin-bottom: 0.25rem; }
.list-intro { margin: 0; color: var(--muted); max-width: 60ch; }
.page-main { max-width: 52rem; }

.news-list, .post-list { list-style: none; padding: 0; margin: 0; }
.news-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.85rem; padding-block: 1rem; border-bottom: 1px solid var(--border); }
.news-thumb { display: block; }
.news-text h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; line-height: 1.22; margin: 0.05rem 0 0; }
.news-lead { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.95rem; display: none; }
.news-text .ts { font-size: 0.78rem; }
.post-list li { padding-block: 0.9rem; border-bottom: 1px solid var(--border); }
.post-list h3 { font-family: var(--serif); margin-block: 0 0.1rem; }
.post-list p { margin-block: 0.25rem; }

.pagination { margin-block: 1.5rem; }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.pagination a, .pagination span { display: inline-block; padding: 0.25rem 0.7rem; border: 1px solid var(--border); border-radius: 3px; text-decoration: none; color: var(--fg); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination [aria-current='page'] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 700; }
.pagination .disabled { color: var(--muted); }

.author-box { background: var(--surface); border-left: 3px solid var(--accent); padding: 0.75rem 1rem; margin-block: 0.75rem; }

/* ---------- Article page ---------- */
.breadcrumb { margin-bottom: 0.75rem; font-size: 0.82rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; color: var(--muted); }
.breadcrumb li + li::before { content: '\203A'; margin-right: 0.25rem; }
.breadcrumb a { color: var(--muted); }

.article { max-width: 46rem; margin-inline: auto; }
.article-head h1 { font-size: 2.1rem; line-height: 1.12; letter-spacing: -0.015em; margin-block: 0.35rem 0.75rem; }
.article-head .lead-text { font-size: 1.2rem; line-height: 1.45; font-weight: 500; color: var(--fg); margin: 0 0 1rem; }
.byline { display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; margin: 0; padding-block: 0.6rem; border-block: 1px solid var(--border); color: var(--muted); font-size: 0.88rem; }
.byline a { color: var(--fg); }
.byline-time { font-variant-numeric: tabular-nums; }
.updated-note { font-style: italic; }
.ai-disclosure { color: var(--muted); font-size: 0.85rem; margin: 0.6rem 0 0; padding: 0.5rem 0.75rem; background: var(--surface); border-left: 3px solid var(--rub-ink, var(--accent)); }
.ai-disclosure a { color: var(--fg); }

figure.article-image { margin: 1.25rem 0; }
figure.article-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface); }
figure.article-image.article-art img { border-radius: 2px; }
figure.article-image figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; }

.prose { overflow-wrap: break-word; font-size: 1.1rem; line-height: 1.7; max-width: 70ch; margin-top: 1.25rem; }
.prose p { margin-block: 0 1.1em; }
.prose h2 { font-family: var(--serif); font-size: 1.5rem; margin-block: 1.8em 0.5em; padding-top: 0.2em; }
.prose h3 { font-family: var(--serif); font-size: 1.25rem; margin-block: 1.5em 0.4em; }
.prose ul, .prose ol { padding-left: 1.4rem; margin-block: 0 1.1em; }
.prose li { margin-block: 0.3em; }
.prose img, .prose video { max-width: 100%; height: auto; }
.prose pre { overflow-x: auto; background: var(--surface); padding: 0.75rem; border-radius: 4px; font-size: 0.9rem; line-height: 1.5; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--surface); padding: 0.05em 0.3em; border-radius: 3px; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1.4em 0; padding: 0.2em 0 0.2em 1.1rem; border-left: 4px solid var(--accent); font-family: var(--serif); font-size: 1.2rem; font-style: italic; line-height: 1.5; }
.prose blockquote p { margin: 0; }
.prose a { text-underline-offset: 2px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 2em; }

.sources { margin-top: 2rem; padding: 0.9rem 1rem 1rem; background: var(--surface); border-top: 3px solid var(--fg); max-width: 70ch; }
.sources h2 { margin: 0 0 0.4rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.sources ol { padding-left: 1.25rem; margin: 0.25rem 0 0; }
.sources li { margin-block: 0.3rem; overflow-wrap: anywhere; font-size: 0.95rem; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 1.25rem 0 0; }
.tags a { display: inline-block; font-size: 0.85rem; text-decoration: none; color: var(--fg); background: var(--surface); border: 1px solid var(--border); padding: 0.15rem 0.7rem; border-radius: 999px; }
.tags a:hover { border-color: var(--accent); color: var(--accent); }

.share { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.share h2 { margin: 0 0 0.5rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.share ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; }
.share a { display: inline-block; padding: 0.4rem 0.9rem; border: 1px solid var(--border-strong); color: var(--fg); text-decoration: none; font-size: 0.88rem; font-weight: 600; border-radius: 3px; }
.share a:hover { background: var(--fg); color: var(--bg); }

.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1rem; }

/* ---------- Timeline (later feature, modest) ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.tl-year h2 { border-bottom: 2px solid var(--border); padding-bottom: 0.25rem; }
.month-title { text-transform: capitalize; color: var(--muted); }
.tl-item { border-left: 3px solid var(--border); padding: 0.25rem 0 0.25rem 1rem; margin-block: 1rem; }
.tl-item h3, .tl-item h4 { margin-block: 0.1rem 0.25rem; font-family: var(--serif); }
.tl-body p { margin-block: 0.25rem; }
.tl-links { font-size: 0.9rem; margin-block: 0.25rem 0; }
.tl-item.impact-1 { opacity: 0.9; }
.tl-item.impact-2 { border-left-color: var(--accent); }
.tl-item.impact-3 { border-left: 6px solid var(--major); background: var(--major-bg); padding: 0.75rem 1rem; border-radius: 0 6px 6px 0; }
.tl-item.impact-3 h3, .tl-item.impact-3 h4 { font-size: 1.3rem; }
.badge {
  display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.05rem 0.5rem; border-radius: 3px; background: var(--surface); color: var(--fg); border: 1px solid var(--border); margin-left: 0.25rem;
}
.badge.major { background: var(--major); color: var(--bg); border-color: var(--major); font-weight: 700; }

/* ---------- Ads ---------- */
.ad {
  margin-block: 1.5rem; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-top: 2px solid var(--muted);
  background: var(--surface); font-size: 0.95rem;
}
.ad-label { margin: 0 0 0.4rem; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ad-link { display: block; color: var(--fg); text-decoration: none; }
.ad-link:hover .ad-headline { text-decoration: underline; }
.ad-image { display: block; max-width: 100%; height: auto; margin-bottom: 0.4rem; }
.ad-headline { display: block; font-weight: 700; color: var(--link); overflow-wrap: anywhere; }
.ad-text { display: block; color: var(--fg); overflow-wrap: anywhere; }

.preview-banner { background: var(--major-bg); color: var(--major); border-bottom: 2px solid var(--major); padding: 0.4rem 1rem; text-align: center; font-weight: 700; }

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  .news-row { grid-template-columns: 12rem minmax(0, 1fr); gap: 1.1rem; }
  .news-lead { display: block; }
  .news-text h3 { font-size: 1.3rem; }
  .related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .site-footer ul { columns: 1; }
  .site-footer nav:nth-of-type(1) ul { columns: 2; }
}

@media (min-width: 768px) {
  .secondary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem 2rem; }
  .top-body h1 { font-size: 2.3rem; }
  .article-head h1 { font-size: 2.6rem; }
}

@media (min-width: 1024px) {
  .front { grid-template-columns: minmax(0, 1fr) 21rem; gap: 2rem; }
  .front-side { border-left: 1px solid var(--border); padding-left: 2rem; }
  .front-main { min-width: 0; }
  .top-story { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.25rem; align-items: start; }
  .top-media { margin-bottom: 0; }
  .top-body h1 { font-size: 2rem; }
  .secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .latest-box, .side-box { background: none; padding: 0; border-top: 0; }
  .latest-box .box-title, .side-box .box-title { border-top: 3px solid var(--accent); padding-top: 0.4rem; }
  .brand-name { font-size: 2.5rem; }
}

@media (min-width: 1200px) {
  .secondary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  h1 { font-size: 1.7rem; }
  .top-body h1 { font-size: 1.65rem; }
  .article-head h1 { font-size: 1.75rem; }
  .article-head .lead-text { font-size: 1.1rem; }
  .prose { font-size: 1.05rem; }
  .brand-name { font-size: 1.85rem; }
  .masthead-inner { flex-wrap: wrap; align-items: flex-start; }
  .masthead-side { display: contents; }
  .masthead-inner .brand { order: 1; flex: 1 1 0; min-width: 0; }
  .theme-switch { order: 2; flex: none; }
  .masthead-date { order: 3; flex-basis: 100%; }
  .brand-tagline { flex-basis: 100%; margin-top: 0.3rem; }
  .news-row { grid-template-columns: 6.2rem minmax(0, 1fr); gap: 0.7rem; }
  .news-text h3 { font-size: 1.02rem; }
  .story-big .story-title { font-size: 1.3rem; }
}

.media-img:not(.media-art), figure.article-image:not(.article-art) img { filter: var(--img-filter); }

@media print {
  .section-bar, .site-footer, .ad, .share, .related, .theme-switch { display: none; }
}
