/* ============ NieuwsKompas design system — "Compass blue" ============
   Clean, light, all-sans skin for the shared frontend. Same class structure
   as the NieuwsOog theme (shared app.js renders identical markup), completely
   different look: white/cool-gray base, azure accent, left sidebar, flat cards. */
:root {
  --paper: #ffffff;
  --paper-2: #f4f6f9;
  --card: #ffffff;
  --ink: #17222d;
  --ink-soft: #44515e;
  --ink-faint: #8694a3;
  --accent: #1464c0;
  --accent-dark: #0e4a91;
  --accent-ink: #ffffff;
  --navy: #0d2c4e;
  --chip: #e8f1fb;
  --line: #e5eaf0;
  --line-strong: #cfd7e0;
  --head: "Manrope", "Inter", -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
}
html.dark {
  --paper: #10161d;
  --paper-2: #171f29;
  --card: #1a242f;
  --ink: #e7edf3;
  --ink-soft: #a7b3c0;
  --ink-faint: #6e7c8a;
  --accent: #5da2ec;
  --accent-dark: #3c87d8;
  --navy: #0a223d;
  --chip: #1c3450;
  --line: #243140;
  --line-strong: #324255;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  transition: background .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ============ Utility strip ============ */
.topbar { background: var(--paper-2); color: var(--ink-faint); font-size: 12.5px; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 32px; }
.topbar-date { white-space: nowrap; font-weight: 500; }
.topbar-tagline { color: var(--ink-faint); }
.topbar-spacer { flex: 1; }
.weather { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-soft); }
.theme-toggle {
  background: none; border: 1px solid var(--line-strong); color: var(--ink-soft);
  border-radius: 50%; width: 22px; height: 22px; font-size: 13px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; padding: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ============ Sticky header: logo + nav + search ============ */
.siteheader {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.siteheader-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); flex-shrink: 0; }
.logo-mark { width: 32px; height: 32px; }
.logo-word { font-family: var(--head); font-weight: 800; font-size: 23px; letter-spacing: -.02em; line-height: 1; }
.lw-nieuws { color: var(--ink); }
.lw-kompas { color: var(--accent); }

.mainnav { flex: 1; min-width: 0; }
.nav-links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; justify-content: center; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 8px 12px; font-weight: 600; font-size: 14px; color: var(--ink-soft);
  border-radius: 999px; white-space: nowrap;
}
.nav-links a:hover { background: var(--paper-2); color: var(--ink); }
.nav-links a.active { background: var(--chip); color: var(--accent); }
.nav-links a[data-nav="net-binnen"]::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 6px; vertical-align: 2px;
  animation: blink 1.6s infinite;
}
@keyframes blink { 50% { opacity: .25; } }

.search-form {
  display: flex; flex-shrink: 0; background: var(--paper-2);
  border: 1px solid transparent; border-radius: 999px; overflow: hidden;
}
.search-form:focus-within { border-color: var(--accent); background: var(--paper); }
.search-form input {
  border: 0; outline: 0; background: transparent; color: var(--ink);
  padding: 8px 4px 8px 16px; width: 150px; font: inherit; font-size: 14px;
}
.search-form button { border: 0; background: transparent; color: var(--ink-faint); font-size: 17px; padding: 0 12px; cursor: pointer; }
.search-form button:hover { color: var(--accent); }

/* ============ Ticker ============ */
.ticker { background: var(--paper); border-bottom: 1px solid var(--line); }
.ticker-inner { display: flex; align-items: center; gap: 14px; height: 38px; }
.ticker-label {
  background: var(--chip); color: var(--accent); font-weight: 800; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; border-radius: 999px;
  padding: 4px 12px; flex-shrink: 0;
}
.ticker-track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-move { display: inline-flex; gap: 48px; white-space: nowrap; animation: ticker 60s linear infinite; padding-left: 100%; }
.ticker-track:hover .ticker-move { animation-play-state: paused; }
.ticker-move a { font-size: 13.5px; font-weight: 500; color: var(--ink-soft); }
.ticker-move a:hover { color: var(--accent); }
.ticker-move .tick-src { color: var(--accent); font-weight: 700; margin-right: 6px; font-size: 12px; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ============ Breaking banner ============ */
.breaking { background: var(--navy); color: #fff; }
.breaking a {
  display: flex; align-items: center; gap: 12px; max-width: 1240px; margin: 0 auto;
  padding: 10px 24px; font-weight: 600; font-size: 15px;
}
.breaking .brk-badge {
  background: #fff; color: var(--navy); font-size: 11px; font-weight: 800;
  letter-spacing: .08em; padding: 3px 9px; border-radius: 999px; flex-shrink: 0;
}

/* ============ Layout: sidebar left, content right ============ */
#app { padding: 32px 24px 70px; min-height: 60vh; }
.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; }
.layout > div { grid-column: 2; grid-row: 1; }
.layout > .sidebar { grid-column: 1; grid-row: 1; }

.section-head { display: flex; align-items: center; gap: 12px; margin: 44px 0 18px; }
.section-head::before { content: ""; width: 4px; height: 22px; background: var(--accent); border-radius: 2px; flex-shrink: 0; }
.section-head:first-child { margin-top: 0; }
.section-head h2 { font-family: var(--head); font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.section-head h2 a:hover { color: var(--accent); }
.section-head .more { font-size: 13px; font-weight: 700; color: var(--accent); margin-left: auto; white-space: nowrap; }
.section-head .more:hover { text-decoration: underline; }

/* ============ Kickers & meta ============ */
.kicker {
  display: inline-block; width: fit-content; background: var(--chip); color: var(--accent);
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
}
.meta { color: var(--ink-faint); font-size: 12.5px; font-weight: 500; }
.meta b { color: var(--ink-soft); font-weight: 700; }

/* ============ Hero: full-width image with overlay ============ */
.hero { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy); }
.hero-img { display: block; aspect-ratio: 21 / 10; min-height: 300px; background: var(--paper-2); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 90px 30px 26px;
  background: linear-gradient(180deg, rgba(10, 26, 44, 0) 0%, rgba(10, 26, 44, .55) 35%, rgba(10, 26, 44, .92) 100%);
  display: flex; flex-direction: column; gap: 10px; color: #fff;
}
.hero-body .kicker { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(4px); }
.hero-body h1 { font-family: var(--head); font-size: clamp(24px, 3vw, 36px); line-height: 1.15; letter-spacing: -.02em; margin: 0; font-weight: 800; }
.hero-body h1 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-body p { margin: 0; color: rgba(255, 255, 255, .82); font-size: 15px; max-width: 64ch; }
.hero-body .meta { color: rgba(255, 255, 255, .65); }
.hero-body .meta b { color: rgba(255, 255, 255, .9); }
.hero .noimg { color: rgba(255, 255, 255, .5); }

/* ============ Cards: flat, borderless ============ */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card { display: flex; flex-direction: column; }
.card-img { aspect-ratio: 16/9; background: var(--paper-2); border-radius: 12px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: 12px 2px 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-family: var(--head); font-size: 16.5px; line-height: 1.35; letter-spacing: -.01em; margin: 0; font-weight: 700; flex: 1; }
.card-body h3 a:hover { color: var(--accent); }

.row-list { display: flex; flex-direction: column; }
.row-item { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.row-item:last-child { border-bottom: 0; }
.row-thumb { aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--paper-2); }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-item h3 { font-family: var(--head); font-size: 16px; margin: 6px 0 4px; line-height: 1.35; letter-spacing: -.01em; font-weight: 700; }
.row-item h3 a:hover { color: var(--accent); }

/* placeholder voor artikelen zonder beeld */
.noimg { display: grid; place-items: center; color: var(--accent); opacity: .55; height: 100%; min-height: 80px; }
.noimg svg { width: 38%; max-width: 90px; }

/* ============ Sidebar (left) ============ */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget { background: var(--paper-2); border-radius: var(--radius); padding: 20px 22px; }
.widget > h3 {
  margin: 0 0 6px; font-family: var(--head); font-size: 12px; letter-spacing: .1em; font-weight: 800;
  color: var(--accent); text-transform: uppercase; display: flex; align-items: center; gap: 8px;
}
.widget > h3 .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1.6s infinite; }
.newest-list { list-style: none; margin: 0; padding: 0; }
.newest-list li { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.newest-list li:last-child { border-bottom: 0; }
.newest-time { color: var(--accent); font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.newest-list a { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.newest-list a:hover { color: var(--accent); }
.newest-list .meta { display: block; margin-top: 2px; }

.popular-list { list-style: none; margin: 0; padding: 0; counter-reset: pop; }
.popular-list li { counter-increment: pop; display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.popular-list li:last-child { border-bottom: 0; }
.popular-list li::before {
  content: counter(pop); font-family: var(--head); font-weight: 800; font-size: 22px;
  color: var(--accent); opacity: .55; min-width: 20px; line-height: 1;
}
.popular-list a { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.popular-list a:hover { color: var(--accent); }

/* ============ Article page ============ */
.article-page { max-width: 740px; margin: 0 auto; }
.article-page .kicker { font-size: 11.5px; }
.article-page h1 { font-family: var(--head); font-size: clamp(28px, 4.5vw, 40px); line-height: 1.18; letter-spacing: -.02em; margin: 12px 0 14px; font-weight: 800; }
.article-standfirst { font-size: 18.5px; line-height: 1.55; color: var(--ink-soft); margin: 0 0 18px; font-weight: 500; }
.article-byline { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 24px; }
/* aspect-ratio reserves the box before the image loads, so the page doesn't shift (CLS) */
.article-hero-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; aspect-ratio: 16/9; max-height: 480px; background: var(--paper-2); }
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.article-body p { font-size: 17px; line-height: 1.75; margin: 0 0 18px; }
.article-body h2, .article-body h3, .article-body h4 { font-family: var(--head); line-height: 1.25; letter-spacing: -.01em; margin: 28px 0 10px; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--accent-dark); }
.article-body img { border-radius: 12px; margin: 6px 0; }
.article-body figure { margin: 22px 0; }
.article-body figcaption { font-size: 13px; color: var(--ink-faint); margin-top: 8px; line-height: 1.45; }
.article-body blockquote {
  border-left: 3px solid var(--accent); margin: 22px 0; padding: 6px 0 6px 18px;
  font-size: 17.5px; font-weight: 500; color: var(--ink-soft);
}
.article-body ul, .article-body ol { font-size: 17px; line-height: 1.75; margin: 0 0 18px; padding-left: 26px; }
.article-body table { border-collapse: collapse; font-size: 14.5px; margin: 18px 0; width: 100%; }
.article-body td, .article-body th { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.article-body pre { background: var(--paper-2); border-radius: 10px; padding: 14px; overflow-x: auto; font-size: 13.5px; }
.full-status { color: var(--ink-faint); font-size: 13px; border-top: 1px solid var(--line); padding-top: 12px; margin: 6px 0 18px; }
.full-status b { color: var(--ink-soft); }
.mini-loader {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px;
  border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.source-cta {
  display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: #fff;
  font-weight: 700; padding: 13px 24px; border-radius: 999px; margin: 10px 0 8px; font-size: 15px;
  transition: background .15s;
}
.source-cta:hover { background: var(--accent-dark); }
.source-note { color: var(--ink-faint); font-size: 13px; margin-top: 10px; }
.back-link { display: inline-block; margin-bottom: 18px; font-weight: 700; font-size: 14px; color: var(--accent); }
.related { margin-top: 44px; }

/* ============ List / search pages ============ */
.page-title { font-family: var(--head); font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.page-sub { color: var(--ink-faint); margin: 0 0 26px; font-size: 14.5px; }
.load-more {
  display: block; width: fit-content; margin: 36px auto 0; background: var(--accent); border: 0;
  color: #fff; font: inherit; font-weight: 700; padding: 12px 36px; border-radius: 999px; cursor: pointer;
  text-decoration: none; text-align: center; transition: background .15s;
}
.load-more:hover { background: var(--accent-dark); }
.load-more[hidden] { display: none; }

.empty { text-align: center; padding: 70px 20px; color: var(--ink-faint); }
.empty .big { font-size: 44px; margin-bottom: 8px; }

/* ============ Loading ============ */
.loading { display: grid; place-items: center; padding: 90px 0; color: var(--ink-faint); }
.pulse-loader { width: 52px; height: 52px; position: relative; }
.pulse-loader::after {
  content: ""; position: absolute; inset: 0;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg transform='translate(24,24)' fill='none' stroke='%231464c0' stroke-width='2.4'%3E%3Ccircle r='17'/%3E%3C/g%3E%3Cg transform='translate(24,24) rotate(40)'%3E%3Cpath d='M0 -12 L3.4 0 L0 12 L-3.4 0 Z' fill='%231464c0'/%3E%3C/g%3E%3C/svg%3E");
  animation: compass-spin 1.6s ease-in-out infinite;
}
@keyframes compass-spin { 0%,100% { transform: rotate(-25deg); } 50% { transform: rotate(205deg); } }

/* ============ Footer ============ */
.footer { background: var(--paper-2); color: var(--ink-soft); margin-top: 30px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; padding: 44px 24px 30px; }
.footer-logo .logo-mark { width: 26px; height: 26px; }
.footer-logo .logo-word { font-size: 19px; }
.footer-brand p { font-size: 13.5px; line-height: 1.6; margin: 12px 0 0; }
.footer-col { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.footer-col h4 { color: var(--ink); margin: 0 0 6px; font-family: var(--head); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.footer-col a:hover { color: var(--accent); text-decoration: underline; }
.footer-updated { font-size: 12px; color: var(--ink-faint); }
.footer-bottom { border-top: 1px solid var(--line); padding: 16px 24px; font-size: 12.5px; color: var(--ink-faint); }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .mainnav { order: 3; flex-basis: 100%; }
  .nav-links { justify-content: flex-start; }
  .siteheader-inner { padding-top: 10px; padding-bottom: 4px; }
  .search-form { margin-left: auto; }
}
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .layout > div { grid-column: 1; grid-row: 1; }
  .layout > .sidebar { grid-column: 1; grid-row: 2; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .topbar-tagline { display: none; }
}
@media (max-width: 680px) {
  .topbar-inner { font-size: 11.5px; gap: 10px; }
  .logo-mark { width: 26px; height: 26px; }
  .logo-word { font-size: 19px; }
  .search-form { flex: 1; min-width: 0; }
  .search-form input { width: 100%; flex: 1; padding: 7px 4px 7px 14px; }
  .nav-links a { padding: 7px 10px; font-size: 13.5px; }
  .hero-img { aspect-ratio: 16/10; min-height: 0; }
  .hero-body { padding: 70px 18px 18px; }
  .card-grid, .card-grid.two { grid-template-columns: 1fr; }
  .row-item { grid-template-columns: 96px 1fr; }
  .ticker-move { animation-duration: 40s; }
}
