/* /overbieden: the generated per-gemeente pages (da_fun/seo/build_overbieden.py).
 *
 * The tokens, header, buttons and footer are the homepage's, copied so the pages
 * read as the same site; index.html keeps its own inline copy. Below that is
 * only what these pages add: the KPI row, the distribution chart, data tables, the
 * CTA band and the FAQ. Hand-written; the build script never touches this file.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-paper:   oklch(97.6% 0.010 90);
  --color-paper-2: oklch(95.2% 0.017 88);
  --color-paper-3: oklch(92.4% 0.022 86);
  --color-card:    oklch(99.2% 0.006 92);

  --color-ink:   oklch(24% 0.020 262);
  --color-ink-2: oklch(45% 0.017 262);
  --color-ink-3: oklch(58% 0.014 262);

  --color-accent:        oklch(80% 0.115 85);
  --color-accent-deep:   oklch(65% 0.125 78);
  --color-accent-soft:   oklch(80% 0.115 85 / 0.16);
  --color-accent-2:      oklch(60% 0.115 236);
  --color-accent-2-deep: oklch(49% 0.125 240);
  --color-accent-2-soft: oklch(60% 0.115 236 / 0.12);
  --color-mint:          oklch(66% 0.125 158);
  --color-mint-deep:     oklch(52% 0.115 158);
  --color-link:          oklch(47% 0.105 80);
  --color-ink-warm:      oklch(25% 0.045 55);

  --color-border:   oklch(88% 0.014 88);
  --color-border-2: oklch(82% 0.018 86);
  --color-focus:    oklch(55% 0.14 240);

  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --radius-card:  20px;
  --radius-pill:  999px;
  --radius-input: 12px;
  --radius-sm:    10px;

  --shadow-card:       0 1px 2px oklch(24% 0.02 262 / 0.05), 0 14px 34px -18px oklch(24% 0.02 262 / 0.16);
  --btn-cast:          oklch(65% 0.125 78 / 0.40);

  --dur-short: 140ms; --dur-mid: 220ms;
  --ease-out:   cubic-bezier(.22, 1, .36, 1);
  --ease-press: cubic-bezier(.2, .7, .3, 1);

  --shell: 1120px;
  --gutter: 1.5rem;
  --text: 62ch;
  --maat-tekst: 32em;
}

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-paper);
  line-height: 1.65;
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }

a { color: var(--color-link); text-underline-offset: 2px; }

.container { max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--color-ink-3);
  margin-bottom: .8rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.9rem);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.16;
  color: var(--color-ink);
  overflow-wrap: anywhere;
  margin-bottom: .7rem;
}
.section-title-sm {
  font-family: var(--font-display);
  font-size: 1.18rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25;
  margin-bottom: .6rem;
}

/* ── Button (same push button as the homepage) ── */
.btn {
  --btn-face: var(--color-accent);
  --btn-edge: var(--color-accent-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85rem 1.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  color: var(--color-ink); background: var(--btn-face);
  border: 0; border-radius: var(--radius-pill);
  text-decoration: none; cursor: pointer; position: relative; isolation: isolate;
  box-shadow: 0 4px 0 0 var(--btn-edge), 0 6px 14px -3px var(--btn-cast);
  transform: translateY(0);
  transition: transform var(--dur-short) var(--ease-press),
              box-shadow var(--dur-short) var(--ease-press),
              background-color 160ms var(--ease-out);
}
.btn:hover  { transform: translateY(-2px); background: var(--color-accent); box-shadow: 0 6px 0 0 var(--btn-edge), 0 13px 24px -4px var(--btn-cast); }
.btn:active { transform: translateY(3px);  box-shadow: 0 1px 0 0 var(--btn-edge), 0 2px 6px -2px var(--btn-cast); transition-duration: 70ms; }
.btn svg { transition: transform var(--dur-short) var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklch, var(--color-paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1.5px solid var(--color-border);
  padding: .85rem 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.6rem; }
.header-inner > .logo { margin-right: auto; }

.logo {
  font-family: var(--font-display);
  font-size: 1.22rem; font-weight: 700; letter-spacing: -.02em;
  color: var(--color-ink); text-decoration: none; flex-shrink: 0;
}
.logo span { color: var(--color-accent-deep); }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a {
  font-size: .9rem; font-weight: 500; color: var(--color-ink-2);
  text-decoration: none; transition: color var(--dur-short) var(--ease-out);
}
.site-nav a:hover { color: var(--color-ink); }
.nav-account { display: inline-flex; align-items: center; gap: .4rem; }
.nav-account svg { width: 20px; height: 20px; display: block; }

.btn-nav {
  font-size: .9rem; line-height: 1.2; text-decoration: none;
  padding: .55rem 1.15rem; font-weight: 700; white-space: nowrap; color: var(--color-ink) !important;
  background: var(--color-accent); border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 0 var(--color-accent-deep), 0 5px 12px -3px var(--btn-cast);
  transition: transform var(--dur-short) var(--ease-press), box-shadow var(--dur-short) var(--ease-press) !important;
}
.btn-nav:hover { transform: translateY(-2px); box-shadow: 0 5px 0 0 var(--color-accent-deep), 0 10px 20px -4px var(--btn-cast); }
.btn-nav:active { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--color-accent-deep); }
.btn-nav-short { display: none; }

.nav-toggle {
  display: none; flex-shrink: 0; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-right: -.6rem;
  padding: 0; border: 0; background: none; cursor: pointer; color: var(--color-ink);
}
.nav-toggle-bars { position: relative; display: block; width: 22px; height: 2px; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  border-radius: 2px; background: currentColor;
  transition: transform var(--dur-short) var(--ease-out), background var(--dur-short) var(--ease-out);
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; width: 100%; height: 2px; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after  { top: 7px; }
.site-header.nav-open .nav-toggle-bars { background: transparent; }
.site-header.nav-open .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-toggle-bars::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0 var(--gutter) .55rem;
    background: var(--color-paper);
    border-bottom: 1.5px solid var(--color-border);
    box-shadow: 0 18px 26px -22px var(--btn-cast);
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav a { font-size: 1rem; padding: .95rem .1rem; border-bottom: 1.5px solid var(--color-border); }
  .site-nav a:last-child { border-bottom: 0; }
  .btn-nav-full { display: none; }
  .btn-nav-short { display: inline; }
}

/* ── Footer ── */
footer {
  background: var(--color-ink);
  color: color-mix(in oklch, var(--color-paper) 72%, transparent);
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr auto auto auto;
  gap: 3rem 2.6rem; margin-bottom: 2.5rem; align-items: start;
}
.footer-brand .logo { display: inline-block; margin-bottom: .85rem; color: var(--color-paper); }
.footer-brand .logo span { color: var(--color-accent); }
.footer-brand p {
  font-size: .9rem; line-height: 1.72; max-width: 40ch;
  color: color-mix(in oklch, var(--color-paper) 56%, transparent);
}
.footer-links-col h4, .footer-qr-col h4 {
  font-family: var(--font-mono);
  font-size: .68rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: 1rem;
}
.footer-links-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-links-list a, .footer-qr-col a {
  font-size: .9rem; text-decoration: none;
  color: color-mix(in oklch, var(--color-paper) 64%, transparent);
  transition: color var(--dur-short) var(--ease-out);
}
.footer-links-list a:hover, .footer-qr-col a:hover { color: var(--color-paper); }
.footer-qr-col a { display: block; }
.footer-qr-col img {
  width: 108px; height: 108px; border-radius: var(--radius-input);
  display: block; margin-bottom: .6rem; background: #fff; padding: 6px;
}
.footer-mail { margin-top: .45rem; }
.footer-links-list li:empty { display: none; }
.footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom a:hover { color: var(--color-paper); }
.footer-social { margin-left: auto; display: inline-flex; align-items: center; gap: .9rem; }
.footer-bottom .footer-social a { display: inline-flex; padding: .2rem 0; margin: -.2rem 0; text-decoration: none; }
.footer-social svg { width: 15px; height: 15px; fill: currentColor; }
.footer-bottom {
  padding-top: 1.5rem; border-top: 1px solid color-mix(in oklch, var(--color-paper) 14%, transparent);
  display: flex; flex-wrap: wrap; gap: .4rem 2rem;
  font-family: var(--font-mono); font-size: .74rem;
  color: color-mix(in oklch, var(--color-paper) 40%, transparent);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ─────────────────────────  PAGE  ───────────────────────── */

main { padding-bottom: 1rem; }

.crumbs { padding: 1.1rem 0 0; font-size: .82rem; color: var(--color-ink-3); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; }
.crumbs li + li::before { content: '›'; margin-right: .35rem; color: var(--color-ink-3); }
.crumbs a { color: var(--color-ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--color-ink); text-decoration: underline; }

.page-head { padding: 1.6rem 0 1.4rem; max-width: 70ch; }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem);
  font-weight: 700; letter-spacing: -.028em; line-height: 1.08;
  color: var(--color-ink-warm);
  overflow-wrap: anywhere;
  margin-bottom: 1rem;
}
.lead { font-size: 1.08rem; line-height: 1.7; color: var(--color-ink-2); max-width: var(--text); }
.lead strong { color: var(--color-ink); font-weight: 700; }
.period {
  margin-top: .9rem;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  color: var(--color-ink-3);
}

/* KPI row: stat tiles, label above a proportional-figure value. */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .75rem; margin: .4rem 0 2.6rem;
}
.kpi {
  display: flex; flex-direction: column; gap: .2rem;
  padding: 1rem 1.1rem 1.05rem;
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.kpi-label { font-size: .78rem; font-weight: 500; color: var(--color-ink-2); line-height: 1.3; }
.kpi-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
  color: var(--color-ink);
  margin-top: .15rem;
}
.kpi-note { font-size: .72rem; color: var(--color-ink-3); line-height: 1.3; }

.block { margin: 0 0 2.6rem; }
.block > p { max-width: var(--maat-tekst); color: var(--color-ink-2); margin-bottom: 1rem; }
.block-muted { padding: 1.2rem 1.35rem; background: var(--color-paper-2); border-radius: var(--radius-sm); }
.block-muted > p { font-size: .88rem; line-height: 1.7; max-width: none; margin: 0; columns: 2 26em; column-gap: 2.5rem; }
.block-muted .section-title-sm { font-size: 1rem; margin-bottom: .4rem; }
.fig-note { font-size: .8rem; color: var(--color-ink-3); max-width: var(--maat-tekst); }

/* Distribution: six horizontal bars, one hue, value in text ink next to it. */
.dist { display: flex; flex-direction: column; gap: 6px; max-width: 720px; margin: 1.2rem 0 .6rem; }
.dist-row {
  display: grid; grid-template-columns: minmax(150px, 190px) 1fr 52px auto;
  align-items: center; gap: .7rem;
  font-size: .88rem;
}
.dist-label { color: var(--color-ink-2); line-height: 1.25; }
.dist-track { display: block; height: 18px; position: relative; }
.dist-bar {
  display: block; height: 100%; width: var(--w, 0%);
  min-width: 2px;
  background: var(--color-accent);
  border-radius: 0 4px 4px 0;
}
.dist-value { font-family: var(--font-mono); font-size: .82rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--color-ink); }
.dist-ref { font-family: var(--font-mono); font-size: .72rem; color: var(--color-ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .dist-row { grid-template-columns: 1fr 48px; grid-template-areas: 'label label' 'track value' 'ref ref'; row-gap: .15rem; }
  .dist-label { grid-area: label; }
  .dist-track { grid-area: track; }
  .dist-value { grid-area: value; }
  .dist-ref { grid-area: ref; }
  .dist { gap: 10px; }
}

/* Tables */
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: .9rem;
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.data-table th, .data-table td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.data-table thead th {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--color-ink-3);
  background: var(--color-paper-2);
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--color-paper-2); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table a { color: var(--color-ink); font-weight: 500; text-decoration: none; }
.data-table a:hover { text-decoration: underline; color: var(--color-link); }
@media (max-width: 640px) {
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table th, .data-table td { padding: .5rem .6rem; }
}

/* CTA band */
.cta-band {
  background: var(--color-ink);
  color: var(--color-paper);
  padding: 2.8rem 0;
  margin: 1rem 0 3rem;
}
.cta-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.4rem; align-items: center; }
.cta-band .section-label { color: var(--color-accent); }
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1.3vw, 1.95rem);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.15;
  margin-bottom: .7rem;
}
.cta-sub { color: color-mix(in oklch, var(--color-paper) 70%, transparent); line-height: 1.65; max-width: var(--maat-tekst); }
.cta-sub a { color: var(--color-accent); font-weight: 600; text-decoration: underline; }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.cta-actions .link-secondary { color: color-mix(in oklch, var(--color-paper) 70%, transparent); font-size: .9rem; }
.cta-actions .link-secondary:hover { color: var(--color-paper); }
@media (max-width: 760px) {
  .cta-inner { grid-template-columns: 1fr; gap: 1.4rem; }
}

.link-secondary { color: var(--color-link); font-size: .95rem; }

/* FAQ */
.faq-item {
  border-top: 1.5px solid var(--color-border);
  max-width: 76ch;
}
.faq-item:last-of-type { border-bottom: 1.5px solid var(--color-border); }
.faq-item summary {
  cursor: pointer; list-style: none;
  padding: .9rem 2rem .9rem 0; position: relative;
  font-weight: 600; font-size: 1rem; color: var(--color-ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: .2rem; top: .8rem;
  font-family: var(--font-mono); font-size: 1.1rem; color: var(--color-ink-3);
  transition: transform var(--dur-short) var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 0 1rem; color: var(--color-ink-2); line-height: 1.7; max-width: var(--maat-tekst); }

/* Sibling and ranking lists */
.sib-list {
  list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: .35rem 1.4rem; margin-bottom: 1rem; max-width: 900px;
}
.sib-list li { display: flex; justify-content: space-between; gap: .6rem; font-size: .92rem; padding: .3rem 0; border-bottom: 1px solid var(--color-border); }
.sib-list a { color: var(--color-ink); text-decoration: none; font-weight: 500; }
.sib-list a:hover { color: var(--color-link); text-decoration: underline; }
.sib-val { font-family: var(--font-mono); font-size: .8rem; color: var(--color-ink-3); font-variant-numeric: tabular-nums; }

.rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.rank-list { list-style: none; counter-reset: rank; margin-top: .8rem; }
.rank-list li {
  counter-increment: rank;
  display: grid; grid-template-columns: 1.6rem 1fr auto; column-gap: .6rem; align-items: baseline;
  padding: .45rem 0; border-bottom: 1px solid var(--color-border); font-size: .92rem;
}
.rank-list li::before { content: counter(rank); font-family: var(--font-mono); font-size: .75rem; color: var(--color-ink-3); }
.rank-list a { color: var(--color-ink); font-weight: 500; text-decoration: none; }
.rank-list a:hover { color: var(--color-link); text-decoration: underline; }
.rank-val { font-family: var(--font-mono); font-size: .85rem; font-variant-numeric: tabular-nums; }
.rank-n { grid-column: 2 / 4; font-size: .74rem; color: var(--color-ink-3); }
@media (max-width: 680px) {
  .rank-grid { grid-template-columns: 1fr; }
}

.prov-nav { font-size: .9rem; line-height: 2; max-width: var(--maat-tekst); }
.prov-nav a { white-space: nowrap; }
.prov-sum { display: block; font-family: var(--font-body); font-size: .82rem; font-weight: 400; color: var(--color-ink-3); margin-top: .1rem; }

/* Places: the line under the H1, and the hint in the index table for gemeenten
   whose name is not a place (Súdwest-Fryslân: Sneek, Bolsward, IJlst). */
.places { margin: -.3rem 0 .9rem; font-size: .95rem; color: var(--color-ink-2); }
.place-hint { display: block; font-size: .76rem; color: var(--color-ink-3); font-weight: 400; margin-top: .1rem; }
.faq-body p { max-width: var(--maat-tekst); }
