/* ============ NieuwsOog design system ============ */
:root {
  --paper: #faf7f2;
  --paper-2: #f1ece3;
  --card: #ffffff;
  --ink: #18150f;
  --ink-soft: #4f4a40;
  --ink-faint: #8a8478;
  --accent: #d6452c;
  --accent-dark: #b23519;
  --accent-ink: #ffffff;
  --line: #e3dccf;
  --line-strong: #18150f;
  --shadow: 0 1px 2px rgba(24, 21, 15, .06), 0 8px 24px -12px rgba(24, 21, 15, .18);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
}
html.dark {
  --paper: #15130f;
  --paper-2: #1d1a14;
  --card: #201d17;
  --ink: #f0ebe1;
  --ink-soft: #b5ad9e;
  --ink-faint: #7d766a;
  --accent: #ff6a4d;
  --accent-dark: #e2522f;
  --line: #312c23;
  --line-strong: #f0ebe1;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -12px rgba(0, 0, 0, .6);
}

* { 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.55;
  transition: background .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============ Topbar ============ */
.topbar { background: var(--ink); color: var(--paper); font-size: 13px; }
html.dark .topbar { background: #000; }
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 34px; }
.topbar-date { letter-spacing: .02em; white-space: nowrap; }
.topbar-spacer { flex: 1; }
.weather { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.theme-toggle {
  background: none; border: 1px solid rgba(255,255,255,.35); color: inherit;
  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: #fff; }

/* ============ Masthead ============ */
.masthead { border-bottom: 3px solid var(--line-strong); background: var(--paper); }
.masthead-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 22px 20px 18px; gap: 12px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); grid-column: 2; justify-self: center; }
.logo-blocks { display: inline-flex; align-items: stretch; line-height: 1; font-size: 32px; }
.lb {
  font-family: var(--sans); font-weight: 800; letter-spacing: .02em;
  color: #faf7f2; padding: .3em .34em .26em; display: inline-flex; align-items: center;
}
.lb-nieuws { background: #d6452c; }
.lb-oog { background: #18150f; }
.lb-eye { height: .68em; width: 1.12em; margin: 0 .05em; flex-shrink: 0; }
html.dark .lb-nieuws { background: #18150f; }
html.dark .lb-oog { background: #ff6a4d; }
.tagline {
  grid-column: 1; grid-row: 1; margin: 0; justify-self: start;
  font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--ink-soft);
}
.search-form {
  grid-column: 3; grid-row: 1; justify-self: end; display: flex;
  border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card);
}
.search-form:focus-within { border-color: var(--accent); }
.search-form input {
  border: 0; outline: 0; background: transparent; color: var(--ink);
  padding: 8px 4px 8px 16px; width: 180px; font: inherit; font-size: 14px;
}
.search-form button { border: 0; background: transparent; color: var(--ink-soft); font-size: 18px; padding: 0 12px; cursor: pointer; }
.search-form button:hover { color: var(--accent); }

/* ============ Nav ============ */
.mainnav {
  background: var(--paper);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 var(--line);
}
.mainnav-inner { display: flex; align-items: center; gap: 18px; }
.nav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 13px 12px; font-weight: 700; font-size: 14.5px; letter-spacing: .01em;
  border-bottom: 3px solid transparent; white-space: nowrap; color: var(--ink-soft);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); border-bottom-color: var(--accent); }
.nav-links a[data-nav="net-binnen"]::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 6px; vertical-align: 2px;
  animation: blink 1.6s infinite;
}
@keyframes blink { 50% { opacity: .25; } }

/* ============ Ticker ============ */
.ticker { display: flex; align-items: stretch; background: var(--card); border-bottom: 1px solid var(--line); height: 38px; }
.ticker-label {
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 12px;
  letter-spacing: .12em; display: flex; align-items: center; padding: 0 14px; 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: 600; color: var(--ink-soft); }
.ticker-move a:hover { color: var(--accent); }
.ticker-move .tick-src { color: var(--accent); font-weight: 800; margin-right: 6px; font-size: 12px; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ============ Breaking banner ============ */
.breaking { background: var(--accent); color: var(--accent-ink); }
.breaking a {
  display: flex; align-items: center; gap: 12px; max-width: 1200px; margin: 0 auto;
  padding: 10px 20px; font-weight: 700; font-size: 15px;
}
.breaking .brk-badge {
  background: #fff; color: var(--accent-dark); font-size: 11px; font-weight: 900;
  letter-spacing: .1em; padding: 3px 8px; border-radius: 4px; flex-shrink: 0;
}

/* ============ Layout ============ */
#app { padding: 28px 20px 60px; min-height: 60vh; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; }
.section-head {
  display: flex; align-items: baseline; gap: 14px; margin: 38px 0 18px;
  border-top: 3px solid var(--line-strong); padding-top: 10px;
}
.section-head:first-child { margin-top: 0; }
.section-head h2 { font-family: var(--serif); font-size: 26px; font-weight: 900; 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; }

/* ============ Cards ============ */
.kicker { color: var(--accent); font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.meta { color: var(--ink-faint); font-size: 12.5px; font-weight: 500; }
.meta b { color: var(--ink-soft); font-weight: 700; }

.hero { display: grid; grid-template-columns: 7fr 5fr; gap: 0; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-img { position: relative; min-height: 340px; background: var(--paper-2); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-body { padding: 28px 30px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.hero-body h1 { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); line-height: 1.15; margin: 0; font-weight: 900; }
.hero-body h1 a:hover { color: var(--accent); }
.hero-body p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.card-img { aspect-ratio: 16/9; background: var(--paper-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-family: var(--serif); font-size: 17.5px; line-height: 1.25; 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: 110px 1fr; gap: 14px; padding: 14px 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(--serif); font-size: 16.5px; margin: 2px 0 4px; line-height: 1.3; 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: .8; height: 100%; min-height: 80px; }
.noimg svg { width: 38%; max-width: 90px; opacity: .55; }

/* ============ Sidebar ============ */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.widget { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.widget > h3 {
  margin: 0 0 4px; font-size: 13px; letter-spacing: .12em; 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: 52px 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: 800; font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.newest-list a { font-size: 14px; font-weight: 600; line-height: 1.35; }
.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(--serif); font-weight: 900; font-size: 26px;
  color: var(--accent); opacity: .85; min-width: 22px; line-height: 1;
}
.popular-list a { font-size: 14px; font-weight: 600; line-height: 1.35; }
.popular-list a:hover { color: var(--accent); }

/* ============ Article page ============ */
.article-page { max-width: 760px; margin: 0 auto; }
.article-page .kicker { font-size: 13px; }
.article-page h1 { font-family: var(--serif); font-size: clamp(28px, 4.5vw, 42px); line-height: 1.12; margin: 10px 0 14px; font-weight: 900; }
.article-standfirst { font-size: 19px; line-height: 1.5; color: var(--ink-soft); font-family: var(--serif); margin: 0 0 18px; }
.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: 22px; }
/* 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: 24px; box-shadow: var(--shadow); 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.7; margin: 0 0 18px; }
.article-body h2, .article-body h3, .article-body h4 { font-family: var(--serif); line-height: 1.25; 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: var(--radius); 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(--accent); margin: 22px 0; padding: 4px 0 4px 18px;
  font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-soft);
}
.article-body ul, .article-body ol { font-size: 17px; line-height: 1.7; 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: 8px; 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 22px; 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(--serif); font-size: clamp(28px, 4vw, 38px); font-weight: 900; 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: 34px auto 0; background: none; border: 2px solid var(--line-strong);
  color: var(--ink); font: inherit; font-weight: 800; padding: 11px 34px; border-radius: 999px; cursor: pointer;
  text-decoration: none; text-align: center;
}
.load-more:hover { background: var(--ink); color: var(--paper); }
.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: 64px; height: 30px; position: relative; overflow: hidden; }
.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 64 28'%3E%3Cpath d='M2 18h12l5-13 9 22 6-13h12' fill='none' stroke='%23d6452c' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  animation: heartbeat 1s ease-in-out infinite;
}
@keyframes heartbeat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* ============ Footer ============ */
.footer { background: var(--ink); color: #c9c2b4; margin-top: 30px; }
html.dark .footer { background: #000; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; padding: 44px 20px 30px; }
.footer-logo { font-size: 18px; }
.footer-brand p { font-size: 13.5px; line-height: 1.6; margin: 10px 0 0; }
.footer-col { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.footer-col h4 { color: var(--paper); margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
html.dark .footer-col h4 { color: var(--ink); }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-updated { font-size: 12px; color: #8a8478; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 20px; font-size: 12.5px; color: #8a8478; }

/* ============ Responsive ============ */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .topbar-inner { font-size: 11.5px; gap: 10px; }
  .masthead { border-bottom-width: 2px; }
  .masthead-inner { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
  .tagline { display: none; }
  .logo { gap: 7px; flex-shrink: 0; }
  .logo-blocks { font-size: 18px; }
  .search-form { flex: 1; min-width: 0; margin: 0; }
  .search-form input { width: 100%; flex: 1; padding: 7px 4px 7px 14px; }
  .nav-links a { padding: 11px 10px; font-size: 14px; }
  .hero { grid-template-columns: 1fr; }
  .hero-img { min-height: 0; aspect-ratio: 16/9; }
  .hero-img img { position: static; }
  .card-grid, .card-grid.two { grid-template-columns: 1fr; }
  .row-item { grid-template-columns: 90px 1fr; }
  .ticker-move { animation-duration: 40s; }
}
