/* ============ KopFlits design system — "Electric editorial" ============
   Punchy, high-contrast news skin for the shared frontend. Same class
   structure as the other brands (the shared app.js renders identical markup),
   distinct look: warm off-white paper, charcoal slate ink, an electric-yellow
   lightning accent, Fraunces display-serif headlines over an Inter UI.
   Inspired by KopFlits logo concepts #22 (charcoal stack + yellow bolt) and
   #58 (refined serif, newspaper stack). */
:root {
  --paper: #fbfaf7;
  --paper-2: #f1efe9;
  --card: #ffffff;
  --ink: #1f2733;
  --ink-soft: #44505f;
  --ink-faint: #818b98;
  --accent: #eaa400;          /* darker amber: accessible text/links on paper */
  --accent-dark: #b97c00;
  --accent-ink: #1f2733;      /* dark text on yellow chips */
  --bolt: #ffc21a;            /* electric-yellow lightning fill */
  --bolt-edge: #1f2733;       /* outline around the bolt mark */
  --navy: #1f2733;            /* dark slab (hero/breaking) */
  --chip: #fff2cc;            /* soft yellow chip */
  --line: #e6e2d8;
  --line-strong: #d3cdbe;
  --head: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
}
html.dark {
  --paper: #14181e;
  --paper-2: #1b212a;
  --card: #1c232d;
  --ink: #eef1f5;
  --ink-soft: #b3bdca;
  --ink-faint: #76828f;
  --accent: #ffc21a;
  --accent-dark: #ffd34d;
  --accent-ink: #1f2733;
  --bolt: #ffc21a;
  --bolt-edge: #14181e;
  --navy: #0c0f14;
  --chip: #3a2f10;
  --line: #2a313c;
  --line-strong: #3b434f;
}

* { 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(--navy); color: rgba(255, 255, 255, .72); font-size: 12.5px; }
.topbar-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
.topbar-date { white-space: nowrap; font-weight: 600; }
.topbar-tagline { color: var(--bolt); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
.topbar-spacer { flex: 1; }
.weather { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.theme-toggle {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .24); color: #fff;
  border-radius: 50%; width: 32px; height: 32px; font-size: 13px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; padding: 0;
}
.theme-toggle:hover { background: var(--bolt); border-color: var(--bolt); color: var(--ink); }

/* ============ Sticky header: logo + nav + search ============ */
.siteheader {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.siteheader-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; min-height: 66px; padding-top: 8px; padding-bottom: 8px; }
.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); flex-shrink: 0; }
.logo-mark { width: 36px; height: 36px; }
.logo-word { font-family: var(--head); font-weight: 900; font-size: 25px; letter-spacing: -.015em; line-height: 1; }
.lw-kop { color: var(--ink); }
.lw-flits { color: var(--accent-dark); }
html.dark .lw-flits { color: var(--bolt); }

.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 13px; font-weight: 700; font-size: 14px; color: var(--ink-soft);
  border-radius: 8px; white-space: nowrap; position: relative;
}
.nav-links a:hover { background: var(--paper-2); color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px;
  height: 3px; border-radius: 2px; background: var(--bolt);
}
.nav-links a[data-nav="net-binnen"]::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--bolt); margin-right: 6px; vertical-align: 2px;
  box-shadow: 0 0 0 0 var(--bolt); 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(--bolt); background: var(--card); }
.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-dark); }

/* ============ Ticker ============ */
.ticker { background: var(--card); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); }
.ticker-inner { display: flex; align-items: center; gap: 14px; height: 38px; }
.ticker-label {
  background: var(--bolt); color: var(--ink); font-weight: 800; font-size: 11px;
  letter-spacing: .07em; text-transform: uppercase; border-radius: 4px;
  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-dark); }
.ticker-move .tick-src { color: var(--accent-dark); font-weight: 800; margin-right: 6px; font-size: 12px; }
html.dark .ticker-move .tick-src { color: var(--bolt); }
@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: var(--bolt); color: var(--ink); font-size: 11px; font-weight: 800;
  letter-spacing: .08em; padding: 3px 9px; border-radius: 4px; 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 heads carry a lightning-bolt accent + a stacked-paper underline. */
.section-head { display: flex; align-items: center; gap: 11px; margin: 46px 0 18px; padding-bottom: 10px; position: relative; }
.section-head::before {
  content: ""; width: 18px; height: 24px; flex-shrink: 0;
  background: var(--bolt);
  -webkit-mask: var(--bolt-mask) center/contain no-repeat;
  mask: var(--bolt-mask) center/contain no-repeat;
}
.section-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background:
    linear-gradient(var(--ink), var(--ink)) left bottom / 100% 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) left 4px / 100% 1px no-repeat;
}
.section-head:first-child { margin-top: 0; }
.section-head h2 { font-family: var(--head); font-size: 23px; font-weight: 900; letter-spacing: -.01em; margin: 0; }
.section-head h2 a:hover { color: var(--accent-dark); }
.section-head .more { font-size: 13px; font-weight: 800; color: var(--accent-dark); margin-left: auto; white-space: nowrap; }
html.dark .section-head .more { color: var(--bolt); }
.section-head .more:hover { text-decoration: underline; }

:root { --bolt-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 24'%3E%3Cpath d='M11 0 L1 13 H7.5 L5 24 L17 9 H9.5 Z'/%3E%3C/svg%3E"); }

/* ============ Kickers & meta ============ */
.kicker {
  display: inline-block; width: fit-content; background: var(--bolt); color: var(--accent-ink);
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 4px;
}
.meta { color: var(--ink-faint); font-size: 12.5px; font-weight: 500; }
.meta b { color: var(--ink-soft); font-weight: 700; }
.meta-cluster { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.story-badge {
  display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 2px 8px; color: var(--accent-dark); font-size: 11px; font-weight: 800; white-space: nowrap;
}
html.dark .story-badge { color: var(--bolt); }

/* ============ 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: 92px 30px 26px;
  background: linear-gradient(180deg, rgba(15, 19, 25, 0) 0%, rgba(15, 19, 25, .5) 32%, rgba(15, 19, 25, .94) 100%);
  display: flex; flex-direction: column; gap: 10px; color: #fff;
}
.hero-body .kicker { background: var(--bolt); color: var(--ink); }
.hero-body h1 { font-family: var(--head); font-size: clamp(25px, 3.1vw, 38px); line-height: 1.12; letter-spacing: -.02em; margin: 0; font-weight: 900; }
.hero-body h1 a:hover { text-decoration: underline; text-decoration-color: var(--bolt); 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, .68); }
.hero-body .meta b { color: rgba(255, 255, 255, .92); }
.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: 10px; 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: 13px 2px 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-family: var(--head); font-size: 17.5px; line-height: 1.3; letter-spacing: -.005em; margin: 0; font-weight: 700; flex: 1; }
.card-body h3 a:hover { color: var(--accent-dark); }
html.dark .card-body h3 a:hover { color: var(--bolt); }

.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: 8px; 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: 16.5px; margin: 6px 0 4px; line-height: 1.3; letter-spacing: -.005em; font-weight: 700; }
.row-item h3 a:hover { color: var(--accent-dark); }
html.dark .row-item h3 a:hover { color: var(--bolt); }

/* placeholder voor artikelen zonder beeld */
.noimg { display: grid; place-items: center; color: var(--accent-dark); opacity: .5; 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(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.widget > h3 {
  margin: 0 0 8px; font-family: var(--sans); font-size: 12px; letter-spacing: .1em; font-weight: 800;
  color: var(--ink); text-transform: uppercase; display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px; border-bottom: 2px solid var(--ink);
}
.widget > h3 .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bolt); 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-dark); font-weight: 800; font-size: 12.5px; font-variant-numeric: tabular-nums; padding-top: 2px; }
html.dark .newest-time { color: var(--bolt); }
.newest-list a { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.newest-list a:hover { color: var(--accent-dark); }
.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, decimal-leading-zero); font-family: var(--head); font-weight: 900; font-size: 20px;
  color: var(--accent-dark); opacity: .65; min-width: 26px; line-height: 1;
}
html.dark .popular-list li::before { color: var(--bolt); }
.popular-list a { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.popular-list a:hover { color: var(--accent-dark); }

/* ============ 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(29px, 4.6vw, 42px); line-height: 1.14; letter-spacing: -.02em; margin: 12px 0 14px; font-weight: 900; }
.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 { overflow-wrap: anywhere; }
.article-body p { font-size: 17px; line-height: 1.78; 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; font-weight: 700; }
.article-body a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--ink); }
.article-body img { border-radius: 10px; 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: 4px solid var(--bolt); margin: 22px 0; padding: 6px 0 6px 18px;
  font-size: 17.5px; font-weight: 500; color: var(--ink-soft); font-family: var(--head);
}
.article-body ul, .article-body ol { font-size: 17px; line-height: 1.78; margin: 0 0 18px; padding-left: 26px; }
.article-body table { border-collapse: collapse; display: block; font-size: 14.5px; margin: 18px 0; max-width: 100%; min-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; width: max-content; }
.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; }
.source-cta {
  display: inline-flex; align-items: center; gap: 10px; background: var(--bolt); color: var(--ink);
  font-weight: 800; padding: 13px 24px; border-radius: 8px; margin: 10px 0 8px; font-size: 15px;
  transition: transform .12s, box-shadow .12s;
}
.source-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255, 194, 26, .4); }
.source-note { color: var(--ink-faint); font-size: 13px; margin-top: 10px; }
.back-link { display: inline-block; margin-bottom: 18px; font-weight: 800; font-size: 14px; color: var(--accent-dark); }
html.dark .back-link { color: var(--bolt); }
.story-cluster { margin: 24px 0 8px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--bolt); border-radius: var(--radius); }
.story-cluster h2 { margin: 0 0 10px; font-family: var(--head); font-size: 20px; font-weight: 700; }
.story-cluster ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.story-cluster li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: baseline; }
.story-cluster li a { color: var(--accent-dark); font-weight: 800; }
html.dark .story-cluster li a { color: var(--bolt); }
.story-cluster li a:hover { text-decoration: underline; }
.story-cluster li span { color: var(--ink-soft); font-size: 13.5px; line-height: 1.35; }
.related { margin-top: 44px; }

/* ============ List / search pages ============ */
.page-title { font-family: var(--head); font-size: clamp(27px, 4vw, 38px); font-weight: 900; 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(--ink); border: 0;
  color: var(--paper); font: inherit; font-weight: 800; padding: 12px 36px; border-radius: 8px; cursor: pointer;
  text-decoration: none; text-align: center; transition: background .15s, color .15s;
}
.load-more:hover { background: var(--bolt); color: var(--ink); }
.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%3Cpath d='M28 4 L12 27 H22 L18 44 L36 19 H25 Z' fill='%23ffc21a' stroke='%231f2733' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
  animation: bolt-pulse 1.2s ease-in-out infinite;
}
@keyframes bolt-pulse { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.05); } }

/* ============ Footer ============ */
.footer { background: var(--navy); color: rgba(255, 255, 255, .72); margin-top: 30px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; padding: 44px 24px 30px; }
.footer-logo { color: #fff; }
.footer-logo .logo-mark { width: 28px; height: 28px; }
.footer-logo .logo-word { font-size: 20px; }
.footer-logo .lw-kop { color: #fff; }
.footer-logo .lw-flits { color: var(--bolt); }
.footer-brand p { font-size: 13.5px; line-height: 1.6; margin: 12px 0 0; max-width: 42ch; }
.footer-col { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.footer-col a { color: rgba(255, 255, 255, .72); }
.footer-col h4 { color: var(--bolt); margin: 0 0 6px; font-family: var(--sans); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-updated { font-size: 12px; color: rgba(255, 255, 255, .5); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 16px 24px; font-size: 12.5px; color: rgba(255, 255, 255, .5); }

/* ============ 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: 4px 10px; }
  .topbar-date { white-space: normal; }
  .logo-mark { width: 28px; height: 28px; }
  .logo-word { font-size: 21px; }
  .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; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
  .ticker-track { overflow-x: auto; }
  .ticker-move {
    animation: none !important;
    padding-left: 0;
    white-space: nowrap;
  }
  .card:hover .card-img img { transform: none; }
}
