/* =============================================================
   NeDNA — styles.css
   Loaded after css/tokens.css (the design kit's tokens, unmodified).
   Visual reference: the design kit's styleguide/preview.html.
   Rules: docs/STYLEGUIDE.md. Light theme only: no dark mode.

   Colours come from tokens only. The few extra values below are
   derived from tokens (color-mix) or are build-only (placeholders).
   ============================================================= */

/* ── Site additions to the tokens ─────────────────────────────── */
:root {
  /* Hero: white to a very light petrol tint (STYLEGUIDE §6) */
  --hero-bg-end: color-mix(in srgb, var(--nedna-petrol-tint) 45%, var(--color-bg));
  /* Tile border inside the shared-foundations block */
  --found-tile-line: color-mix(in srgb, var(--nedna-petrol) 14%, var(--nedna-petrol-tint));
  /* {{PLACEHOLDER}} highlight. Test server only: production refuses to
     deploy while any remain. Deliberately loud yellow, outside the palette. */
  --color-placeholder-bg: #FFE66B;
  --color-placeholder-line: #C9A400;
  --header-h: 72px;
}

/* ── Fonts: IBM Plex Sans, self-hosted (SIL OFL, assets/fonts/OFL.txt) ── */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-700.woff2") format("woff2"); }

/* ── Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--space-4)); }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
p { margin: 0; }
img { max-width: 100%; height: auto; }
a { color: var(--color-link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
main:focus { outline: none; }

/* Focus ring from the tokens. The transparent outline keeps a visible
   ring in Windows high-contrast mode, where box-shadow is dropped. */
:focus-visible { outline: 3px solid transparent; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.icon { width: 1em; height: 1em; fill: currentColor; flex: none; vertical-align: -0.125em; }
/* Marks links that open another site in a new tab */
.icon.ext { width: 0.75em; height: 0.75em; margin-left: 0.2em; vertical-align: 0; opacity: 0.8; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-accent); display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
}

/* Placeholders: visible on the test server, fatal on production */
mark.ph {
  background: var(--color-placeholder-bg); color: var(--nedna-ink);
  outline: 1px dashed var(--color-placeholder-line); border-radius: 2px; padding: 0 0.2em;
  overflow-wrap: anywhere;
}
a.ph-link { outline: 2px dashed var(--color-placeholder-line); outline-offset: 2px; }

/* Skip link */
.skip-link {
  position: absolute; left: var(--space-4); top: var(--space-2); z-index: 20;
  background: var(--color-surface); color: var(--color-link); font-weight: 600;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ── Buttons (STYLEGUIDE §6) ─────────────────────────────────────
   CTA: orange fill with INK text (never white on orange). One per screen. */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: 600 1rem/1.2 var(--font-sans); padding: 0.72rem 1.2rem;
  border-radius: var(--radius-md); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn.cta { background: var(--color-cta); color: var(--color-on-cta); }
.btn.cta:hover { background: color-mix(in srgb, var(--color-cta) 88%, var(--color-bg)); }
.btn.primary { background: var(--color-action); color: var(--color-on-action); }
.btn.secondary { border-color: var(--color-action); color: var(--color-action); background: transparent; }
.btn.secondary:hover { background: var(--nedna-petrol-tint); }
.btn.small { padding: 0.45rem 0.9rem; font-size: 0.92rem; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Tertiary: petrol text with an arrow */
.more { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }
.more .icon { transition: transform 0.15s; }
.more:hover .icon { transform: translateX(3px); }
.more-links { display: flex; flex-wrap: wrap; gap: var(--space-6); }

/* ── Header (STYLEGUIDE §6): white, sticky, 72 px ─────────────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--color-surface); border-bottom: 1px solid var(--color-line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); }
.logo { display: block; flex: none; border-radius: var(--radius-sm); }
.logo img { display: block; height: 52px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 1.25rem; font-weight: 500; font-size: 0.97rem; }
.navlinks { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.navlinks a {
  color: var(--color-text); text-decoration: none; display: block;
  padding-block: 0.35rem; border-bottom: 2px solid transparent; white-space: nowrap;
}
.navlinks a:hover { border-bottom-color: var(--color-line); }
.navlinks a[aria-current] { border-bottom-color: var(--color-cta); }
.lang { display: flex; align-items: center; gap: 0.1rem; font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted); }
.lang a { color: var(--color-text-muted); text-decoration: none; padding: 0.3rem 0.35rem; }
.lang a:hover { color: var(--color-text); }
.lang a[aria-current] {
  color: var(--color-text); text-decoration: underline; text-decoration-color: var(--color-cta);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}

.menu-btn {
  display: none; align-items: center; gap: var(--space-2);
  font: 600 0.95rem var(--font-sans); color: var(--color-text);
  background: none; border: 1px solid var(--color-line); border-radius: var(--radius-md);
  padding: 0.55rem 0.8rem; min-height: 44px; cursor: pointer;
}
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: inline; }

/* Menu button below 1024 px (STYLEGUIDE §6 says 900 px; with five menu
   items the row no longer fits below 1024). Without JS the links simply
   wrap under the logo, so navigation always works. */
/* Hamburger below 72rem: seven nav items plus Join and EN | NL need that width on one line. */
@media (max-width: 71.99rem) {
  .logo img { height: 44px; }
  html.js .menu-btn { display: inline-flex; }
  html.js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: var(--space-4);
    background: var(--color-surface); border-bottom: 1px solid var(--color-line);
    padding: var(--space-4) var(--gutter) var(--space-6); box-shadow: var(--shadow-card);
  }
  html.js .site-nav.open { display: flex; }
  html.js .navlinks { flex-direction: column; gap: 0; }
  html.js .navlinks a { padding-block: 0.7rem; border-bottom: 1px solid var(--color-line); }
  html.js .navlinks a[aria-current] { border-bottom: 1px solid var(--color-line); box-shadow: inset 3px 0 0 var(--color-cta); padding-left: var(--space-3); }
  html.js .site-nav .btn { align-self: flex-start; }
  html:not(.js) .site-header .wrap { flex-wrap: wrap; padding-block: var(--space-3); }
  html:not(.js) .site-nav { flex-wrap: wrap; }
  html:not(.js) .navlinks { flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
}
@media (max-width: 22rem) { .logo img { height: 38px; } }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  background: var(--color-bg);
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--hero-bg-end) 100%);
  border-bottom: 1px solid var(--color-line);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center; padding-block: var(--space-16) 3.5rem; }
.hero-text { max-width: 44rem; }
/* With the photo (SHOW_HERO_PHOTO): text left, photo right */
.hero.has-photo .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.hero.has-photo .hero-text { max-width: none; }
@media (max-width: 56rem) { .hero.has-photo .wrap { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { font-size: var(--fs-display); letter-spacing: -0.02em; margin-block: 0.8rem 1.1rem; }
.hero .lead { font-size: 1.15rem; max-width: 56ch; color: var(--color-text-muted); }
.hero .actions { margin-top: 1.8rem; }
.facts { display: flex; flex-wrap: wrap; gap: var(--space-4) 2.5rem; margin: 2.2rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--color-line); }
.facts div { display: grid; }
.facts dt { font-size: 0.8rem; color: var(--color-text-muted); }
.facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── Sections ─────────────────────────────────────────────────── */
.block { padding-block: 4.5rem; }
.alt { background: var(--color-surface-alt); border-block: 1px solid var(--color-line); }
.sec-head { max-width: 62ch; margin-bottom: 2.25rem; }
.sec-head h2 { margin-bottom: 0.6rem; }
.sec-head p { color: var(--color-text-muted); }
@media (max-width: 40rem) { .block { padding-block: var(--space-12); } }

/* Why a national working group: heading left, text right */
.why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--space-8) 3rem; }
@media (max-width: 56rem) { .why { grid-template-columns: minmax(0, 1fr); } }

/* What we do: 5 on one row, 3 below 1024 px, 1 below 640 px */
.do { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-8) 1.75rem; }
@media (max-width: 64rem) { .do { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .do { grid-template-columns: minmax(0, 1fr); } }
.do > div { display: grid; gap: 0.4rem; align-content: start; }
.do .ic {
  width: 2.5rem; height: 2.5rem; border-radius: var(--radius-md); margin-bottom: 0.35rem;
  background: var(--nedna-petrol-tint); color: var(--color-link); display: grid; place-items: center; font-size: 1.05rem;
}
.do h3 { font-size: 1.08rem; }
.do p { color: var(--color-text-muted); }

/* ── Integration grid + shared foundations (STYLEGUIDE §6) ──────
   Hover or focus on a label, or on the part of a bar that crosses
   nothing, lights up that bar and draws a box ("track") around its whole
   row or column. On a crossing, both bars light up. The selected group on
   its own page keeps its track and bar lit; the rest is dimmed. */
.integ { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-lg); overflow: hidden; }
.page-body .integ { margin-block: var(--space-8); }
.matrix-hint {
  display: flex; align-items: center; gap: var(--space-2); margin: 0;
  padding: var(--space-3) 1.25rem 0; font-size: var(--fs-small); color: var(--color-text-muted);
}
.matrix-hint .icon { color: var(--color-link); }
/* --cols / --rows: number of applications / environments, set inline by the build. */
.overlap {
  position: relative; display: grid; grid-template-columns: minmax(9rem, 12rem) repeat(var(--cols, 4), minmax(0, 1fr));
  grid-template-rows: auto repeat(var(--rows, 4), 3.4rem); padding: var(--space-2) 1.25rem 1.5rem 0.75rem;
}
.overlap.has-chev { grid-template-rows: auto repeat(var(--rows, 4), 3.4rem) auto; padding-bottom: 0; }
.overlap .band { border-radius: 3px; transition: opacity 0.15s; pointer-events: none; }
.overlap .band.h { background: var(--band-environment); opacity: var(--band-opacity); margin: 0.5rem 0; }
.overlap .band.v { background: var(--band-application); opacity: var(--band-opacity); margin: 0 10%; }
.overlap .band.dim { opacity: calc(var(--band-opacity) * 0.5); }
.overlap .band.on { opacity: var(--band-opacity-hover); }
.overlap .band.sel { opacity: calc(var(--band-opacity-hover) * 1.5); }
.overlap.pointing { cursor: pointer; }

.track { pointer-events: none; border-radius: var(--radius-md); border: 2px solid transparent; transition: border-color 0.15s; z-index: 2; }
.track.row { margin: 0.2rem -0.35rem; }
.track.col { margin: 0 2%; }
.track.row.show, .track.row.sel { border-color: var(--band-environment); }
.track.col.show, .track.col.sel { border-color: var(--color-accent); }
.track.sel { border-width: 3px; }

.rlabel, .clabel {
  position: relative; z-index: 3; color: var(--color-text); font-weight: 600; font-size: 0.95rem;
  display: flex; align-items: center; gap: 0.55rem; border-radius: 6px;
  text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--color-text-muted);
  text-underline-offset: 0.2em;
}
.rlabel { padding: 0 0.75rem 0 0.35rem; }
.rlabel .icon { color: var(--band-environment); }
.clabel { flex-direction: column; justify-content: flex-end; text-align: center; gap: 0.35rem; padding: 0.5rem 0.25rem 0.75rem; line-height: 1.25; }
.clabel .icon { color: var(--color-accent); font-size: 1.15rem; }
.rlabel:hover, .clabel:hover, .rlabel.hot, .clabel.hot { color: var(--color-link); text-decoration-style: solid; text-decoration-color: currentColor; }
.rlabel.sel, .clabel.sel { color: var(--color-link); text-decoration: none; }
.rlabel.sel .lt, .clabel.sel .lt { background: var(--nedna-petrol-tint); padding: 0.1rem 0.4rem; border-radius: var(--radius-sm); }
.clabel.sel .lt { background: var(--nedna-orange-tint); color: var(--color-text); }
.chev { justify-self: center; color: var(--color-cta); font-size: 0.9rem; padding-block: 0.4rem 0.3rem; }
@media (max-width: 45rem) {
  /* Labels become icons; the lists below carry the content */
  .overlap { grid-template-columns: 2.5rem repeat(var(--cols, 4), minmax(0, 1fr)); grid-template-rows: auto repeat(var(--rows, 4), 2.75rem); padding: var(--space-2) 0.75rem 0.75rem; }
  .overlap.has-chev { grid-template-rows: auto repeat(var(--rows, 4), 2.75rem) auto; }
  .rlabel .lt, .clabel .lt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rlabel { justify-content: center; padding: 0; }
  .clabel { justify-content: center; align-items: center; min-height: 2.75rem; }
  .track.row { margin-inline: 0; }
}
.found { background: var(--nedna-petrol-tint); padding: 1.5rem 1.5rem 1.75rem; border-top: 4px solid var(--color-cta); }
.found .fhead { display: grid; justify-items: center; text-align: center; gap: 0.35rem; margin-bottom: 1.25rem; }
.found h3 { font-size: 1.2rem; }
.found .fsub { color: var(--color-text-muted); font-size: 0.95rem; max-width: 60ch; }
.found ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--space-4); }
.found li { background: var(--color-surface); border: 1px solid var(--found-tile-line); border-radius: 6px; padding: var(--space-4); display: grid; gap: 0.35rem; align-content: start; }
.found li a { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; color: var(--color-text); text-decoration: none; }
.found li a .icon { color: var(--color-link); }
.found li a:hover { color: var(--color-link); text-decoration: underline; }
.found li p { color: var(--color-text-muted); font-size: 0.92rem; line-height: 1.45; }
.found li:hover { border-color: var(--color-link); }
.found li.sel { border: 3px solid var(--color-cta); box-shadow: var(--shadow-card); }
.found li.sel a { color: var(--color-link); }

.lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); gap: 2.5rem; margin-top: 2.75rem; }
.lists h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.lists .dot { width: 0.9rem; height: 0.9rem; border-radius: 3px; flex: none; }
.lists .dot-env { background: var(--band-environment); }
.lists .dot-app { background: var(--band-application); }
.lists .list-intro { color: var(--color-text-muted); font-size: var(--fs-small); margin-bottom: var(--space-3); }
.lists ul { list-style: none; margin: 0; padding: 0; display: grid; }
.lists li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.75rem; padding-block: 0.85rem; border-top: 1px solid var(--color-line); }
.lists li > .icon { margin-top: 0.3rem; color: var(--color-text-muted); }
.lists li a { font-weight: 600; }
.lists li p { color: var(--color-text-muted); font-size: 0.95rem; }
.lists .coord { font-size: 0.85rem; margin-top: 0.2rem; }
/* Open coordinator role: muted, so it does not read as a name. */
.vacant { color: var(--color-text-muted); font-style: italic; }
.block .lists + .more-links { margin-top: var(--space-8); }

/* ── Roadmap + notice ─────────────────────────────────────────── */
.road { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 3rem; align-items: start; }
@media (max-width: 56rem) { .road { grid-template-columns: minmax(0, 1fr); } }

/* Interim notice: orange tint, 3 px orange left border, eyebrow */
.notice {
  background: var(--nedna-orange-tint); border-left: 3px solid var(--color-cta);
  border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: var(--space-4) 1.2rem;
  max-width: 60ch; display: grid; gap: 0.35rem;
}
.notice-title { font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-warning); }
.prose .notice { margin-block: var(--space-6); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: var(--space-4); padding-block: var(--space-4); border-top: 1px solid var(--color-line); }
.timeline li:last-child { border-bottom: 1px solid var(--color-line); }
.timeline .when { font-size: 0.9rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; padding-top: 0.1rem; }
/* Timeline text continues the date ("Spring 2026: a core group ..."), so
   capitalise it when shown on its own. */
.timeline p::first-letter { text-transform: uppercase; }
.timeline li.next .when { color: var(--color-accent); font-weight: 600; }
@media (max-width: 30rem) { .timeline li { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); } }

/* ── Call-to-action band (petrol tint) ────────────────────────── */
.ctaband { background: var(--nedna-petrol-tint); border-top: 1px solid var(--color-line); }
.ctaband .wrap { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: center; justify-content: space-between; padding-block: var(--space-12); }
.ctaband h2 { font-size: 1.6rem; margin-bottom: var(--space-2); }
.ctaband p { color: var(--color-text-muted); max-width: 60ch; }

/* ── Content pages ────────────────────────────────────────────── */
/* Compact page head (feedback 14-10-2026): subpages are informative, so the
   title and a short intro take little height and the content starts high.
   Only the home page keeps a large hero. */
.page-head { background: var(--color-bg); border-bottom: 1px solid var(--color-line); }
.page-head:has(+ .jumpnav) { border-bottom: 0; }
.page-head .wrap { padding-block: var(--space-8) var(--space-6); }
/* The jump bar brings its own top padding (it needs it when stuck under the
   header), so the head gives up the same amount to keep the gap unchanged. */
.page-head:has(+ .jumpnav) .wrap { padding-bottom: var(--space-3); }
.page-head h1 { max-width: 40ch; font-size: var(--fs-h2); line-height: 1.2; }
.page-head .eyebrow { margin-bottom: var(--space-1); }
.page-head .lead { font-size: var(--fs-body); color: var(--color-text-muted); max-width: 80ch; margin-top: var(--space-2); }
.page-body { padding-block: var(--space-8) var(--space-16); }

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { margin-top: var(--space-12); }
.prose h3 { margin-top: var(--space-8); }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: var(--space-2); }
.prose .more-links, .prose .actions { margin-top: var(--space-6); }
/* Full-width sections: heading left, content right (same width as the
   home page, readable line length on the right). */
.psec {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: var(--space-4) 3rem;
  padding-block: var(--space-8); border-top: 1px solid var(--color-line);
}
.psec:first-child { border-top: 0; padding-top: 0; }
.psec-full { grid-template-columns: minmax(0, 1fr); }
.psec-head h2 { font-size: var(--fs-h3); line-height: 1.3; position: sticky; top: calc(var(--header-h) + var(--space-4)); }
.psec-body.prose { max-width: var(--measure); }
.page-sections { margin-top: var(--space-8); }
.page-sections .psec:first-child { border-top: 1px solid var(--color-line); padding-top: var(--space-8); }
.lists + .page-sections { margin-top: var(--space-12); }
@media (max-width: 56rem) {
  .psec { grid-template-columns: minmax(0, 1fr); }
  .psec-head h2 { position: static; font-size: var(--fs-h2); }
}

/* News article: text + photo side by side when the photo is shown */
.article { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8) 3rem; align-items: start; }
.article.has-photo { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 56rem) { .article.has-photo { grid-template-columns: minmax(0, 1fr); } }

.table-wrap { overflow-x: auto; margin-block: var(--space-6); }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--color-line); }
th { font-weight: 600; background: var(--color-surface-alt); }

/* Cards (STYLEGUIDE §6): providers */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)); gap: var(--space-6); }
.cards.stack { grid-template-columns: minmax(0, 1fr); }
.card {
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-lg);
  padding: var(--space-6); display: grid; gap: var(--space-3); align-content: start; transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-card); }
.card .meta { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-small); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.card h3 a { color: var(--color-text); text-decoration: none; }
.card h3 a:hover { color: var(--color-link); text-decoration: underline; }
/* Photos (hero, news): radius, soft shadow, caption with an orange rule */
.photo { margin: 0; display: grid; gap: 0.6rem; }
.photo img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.photo figcaption { font-size: 0.85rem; color: var(--color-text-muted); display: flex; gap: 0.5rem; align-items: center; }
.photo figcaption::before { content: ""; width: 1.25rem; height: 3px; background: var(--color-cta); border-radius: 2px; flex: none; }
.herophoto img, .article-photo img { aspect-ratio: 4 / 3; object-fit: cover; box-shadow: var(--shadow-card); }

/* "Connects with" on group pages */
.chips { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chips li { margin: 0 !important; }
.chips a {
  display: inline-flex; align-items: center; gap: var(--space-2); padding: 0.4rem 0.8rem;
  border: 1px solid var(--color-line); border-radius: 999px; text-decoration: none; font-size: var(--fs-small); font-weight: 500;
}
.chips a:hover { background: var(--nedna-petrol-tint); }

.notfound { display: grid; gap: var(--space-12); }
.notfound .lead { margin-bottom: var(--space-4); }

/* ── Forms (membership, contact) ─────────────────────────────── */
.nform { display: grid; gap: var(--space-6); margin-top: var(--space-2); }
.nform .fs { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-4); min-width: 0; }
.nform fieldset.fs { border-top: 1px solid var(--color-line); padding-top: var(--space-4); }
.nform fieldset.fs > legend { font-size: 1.05rem; font-weight: 600; padding: 0; margin-bottom: var(--space-2); float: left; width: 100%; }
.nform fieldset.fs > legend + * { clear: both; }
.field { display: grid; gap: var(--space-1); border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .choice-group > legend { font-weight: 500; padding: 0; }
.opt { color: var(--color-text-muted); font-weight: 400; font-size: 0.9em; }
.nform input[type="text"], .nform input[type="email"], .nform select, .nform textarea {
  font: inherit; color: var(--color-text); background: var(--color-surface); width: 100%;
  border: 1.5px solid var(--color-text-muted); border-radius: var(--radius-md); padding: 0.6rem 0.75rem; min-height: 44px;
}
.nform textarea { resize: vertical; min-height: 8rem; }
.nform input:focus-visible, .nform select:focus-visible, .nform textarea:focus-visible { border-color: var(--color-link); }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: var(--space-1) var(--space-4); margin-top: var(--space-1); }
.choice { display: flex; gap: var(--space-2); align-items: flex-start; padding-block: 0.3rem; cursor: pointer; font-weight: 400; }
.choice input { width: 1.2rem; height: 1.2rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--nedna-petrol); }
.field[aria-invalid="true"] input, .field[aria-invalid="true"] select, .field[aria-invalid="true"] textarea { border-color: var(--color-warning); }
.field-error { color: var(--color-warning); font-size: var(--fs-small); font-weight: 600; }
.field[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; }
.form-actions .btn[disabled] { opacity: 0.7; cursor: progress; }
.form-msg { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border-radius: var(--radius-md); border-left: 3px solid; }
.form-msg .icon { margin-top: 0.25rem; font-size: 1.1rem; }
.form-msg.is-success { background: var(--nedna-petrol-tint); border-color: var(--color-success); }
.form-msg.is-success .icon { color: var(--color-success); }
.form-msg.is-error { background: var(--nedna-orange-tint); border-color: var(--color-warning); }
.form-msg.is-error .icon { color: var(--color-warning); }
.form-msg[hidden] { display: none; }

/* ── Supporters ───────────────────────────────────────────────── */
.supporters { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: var(--space-4); max-width: none; }
.prose .supporters li + li { margin-top: 0; }
.psec-body.prose:has(.supporters) { max-width: none; }
.supporter {
  display: grid; grid-template-rows: 7rem auto; height: 100%; text-decoration: none; color: var(--color-text);
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow 0.2s, border-color 0.2s;
}
.supporter:hover { box-shadow: var(--shadow-card); border-color: var(--color-link); }
.logo-box { display: grid; place-items: center; padding: var(--space-3) var(--space-4); }
.logo-box img { max-width: 100%; height: auto; }
.logo-text { font-size: 1.6rem; font-weight: 700; letter-spacing: 0.02em; }
.sname { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--color-line); font-size: var(--fs-small); font-weight: 500; color: var(--color-link); }
.sname .icon { font-size: 0.8rem; }

/* ── Footer: the one dark block ───────────────────────────────── */
.site-footer { background: var(--footer-bg); color: var(--footer-text); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); padding-block: var(--space-12); }
@media (max-width: 48rem) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr); } }
.fbrand img { height: 44px; width: auto; display: block; }
.fbrand p { color: var(--footer-muted); max-width: 42ch; margin-top: var(--space-4); }
.site-footer h2 { font-size: 0.95rem; color: var(--footer-text); }
.site-footer ul { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer li { display: flex; gap: 0.55rem; align-items: center; color: var(--footer-muted); }
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer li[hidden] { display: none; }
/* "Cookie settings" is a button (it opens the banner) that looks like the links around it. */
.linkbtn { font: inherit; color: var(--footer-text); background: none; border: 0; padding: 0; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

/* ── Consent banner (Google Analytics) ─────────────────────────
   A small card in the bottom-left corner: no overlay, the page stays
   usable, and it can simply be ignored. Full width on phones. */
.consent {
  position: fixed; z-index: 20; left: var(--space-4); bottom: var(--space-4);
  width: min(26rem, calc(100% - 2 * var(--space-4)));
  background: var(--color-surface); border: 1px solid var(--color-line); border-top: 3px solid var(--color-link);
  border-radius: var(--radius-lg); box-shadow: 0 8px 32px rgb(19 35 46 / 0.18);
  padding: var(--space-4) var(--space-6) var(--space-6); font-size: var(--fs-small);
  animation: consent-in 0.3s ease-out;
}
.consent[hidden] { display: none; }
.consent p { margin: 0; color: var(--color-text-muted); }
.consent .consent-title { font-weight: 600; font-size: var(--fs-body); color: var(--color-text); margin-bottom: var(--space-1); }
/* Same size and weight for both choices: saying no is as easy as yes. */
.consent-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.consent-actions .btn { flex: 1 1 9rem; justify-content: center; }
@keyframes consent-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 30rem) {
  .consent { left: var(--space-2); bottom: var(--space-2); width: calc(100% - 2 * var(--space-2)); padding-inline: var(--space-4); }
}

/* ── Motion: respect the system preference ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Narrow phones: menu button shows only its icon; the label stays
   available to screen readers. */
@media (max-width: 26rem) {
  html.js .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html.js .menu-btn { min-width: 44px; justify-content: center; }
}

/* ── eDNA in the Netherlands: projects, providers, publications ── */
/* Wide sections: heading above, content over the full width (tables, card grids). */
.psec-wide { grid-template-columns: minmax(0, 1fr); }
.psec-wide .psec-head h2 { position: static; }
.psec-wide .psec-body.prose { max-width: none; }
.psec-wide .psec-body.prose > p { max-width: var(--measure); }
.muted { color: var(--color-text-muted); }
.nowrap { white-space: nowrap; }

/* Filters only work with JS. */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3) var(--space-4); margin-top: var(--space-6); }
html:not(.js) .filters { display: none; }
.filter { display: grid; gap: var(--space-1); font-size: var(--fs-small); font-weight: 500; }
.filter select {
  font: inherit; font-weight: 400; color: var(--color-text); background: var(--color-surface); min-height: 44px; min-width: 11rem;
  border: 1.5px solid var(--color-text-muted); border-radius: var(--radius-md); padding: 0.45rem 0.6rem;
}
.filter-count { font-size: var(--fs-small); color: var(--color-text-muted); margin: 0 0 0.7rem auto !important; }

.ptable { margin-top: var(--space-4); }
.ptable td { font-size: var(--fs-small); overflow-wrap: break-word; }
.ptable tr[hidden] { display: none; }
.ptable .ptitle { font-weight: 600; font-size: 1rem; }
.ptable .psum { color: var(--color-text-muted); margin-top: var(--space-1) !important; max-width: 52ch; }
.ptable td:first-child { width: 40%; }
.status { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
.status-ongoing { background: var(--nedna-petrol-tint); color: var(--nedna-petrol); }
.status-planned { background: var(--nedna-orange-tint); color: var(--nedna-orange-text); }
.status-completed { background: var(--color-surface-alt); color: var(--color-text-muted); }
.filter-empty { margin-top: var(--space-4); }

/* Narrow screens: each project becomes a card, with the column name before each value. */
@media (max-width: 48rem) {
  .ptable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ptable, .ptable tbody, .ptable tr, .ptable td { display: block; width: auto !important; }
  .ptable tr { border: 1px solid var(--color-line); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); }
  .ptable td { border: 0; padding: 0.3rem 0; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--space-2); }
  .ptable td::before { content: attr(data-label); font-weight: 600; color: var(--color-text-muted); }
  .ptable td:first-child { display: block; padding-bottom: var(--space-2); }
  .ptable td:first-child::before { content: none; }
  .ptable td:not(:first-child) { line-height: 1.5; }
}

.providers { list-style: none; padding: 0 !important; margin-top: var(--space-6) !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)); gap: var(--space-4); }
.prose .providers li + li { margin-top: 0; }
.provider h3 { font-size: 1.05rem; margin: 0; }
.provider h3 a { color: var(--color-text); }
.provider > p:not(.meta) { font-size: var(--fs-small); }
.pfacts { margin: 0; display: grid; gap: var(--space-1); font-size: var(--fs-small); border-top: 1px solid var(--color-line); padding-top: var(--space-3); }
.pfacts div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--space-2); }
.pfacts dt { font-weight: 600; color: var(--color-text-muted); }
.pfacts dd { margin: 0; }

.pubs { list-style: none; padding: 0 !important; }
.pubs li { padding-block: var(--space-3); border-bottom: 1px solid var(--color-line); }
.prose .pubs li + li { margin-top: 0; }
.pubs .ptitle { font-weight: 600; }
.pubs .muted { font-size: var(--fs-small); margin-top: var(--space-1); }

/* ── Help desk: FAQ as native <details> (works without JS) ───── */
.faq { border-bottom: 1px solid var(--color-line); }
.prose .faq { margin-top: 0; }
.prose .faq:first-of-type { border-top: 1px solid var(--color-line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding-block: var(--space-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--color-accent); flex: none; }
.faq[open] summary::after { content: "\2212"; }
.faq summary:hover h3 { color: var(--color-link); }
.faq-body { padding-bottom: var(--space-4); }
.faq-body > * + * { margin-top: var(--space-3); }

/* ── "On this page" jump links ─────────────────────────────────
   Under the page head; sticks below the header on wide screens so you can
   jump between long sections. On the news page only on narrow screens,
   where the two columns are stacked. */
.jumpnav { background: var(--color-surface); border-bottom: 1px solid var(--color-line); }
.jumpnav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); padding-block: var(--space-3); }
.jumpnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.jumpnav li[hidden] { display: none; }
.jumpnav a {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0.35rem 0.9rem;
  border: 1px solid var(--color-line); border-radius: 999px; text-decoration: none; font-size: var(--fs-small); font-weight: 500; color: var(--color-text);
}
.jumpnav a:hover { background: var(--nedna-petrol-tint); border-color: var(--color-link); }
.jumpnav .count { font-size: 0.8rem; font-weight: 600; color: var(--nedna-petrol); background: var(--nedna-petrol-tint); border-radius: 999px; padding: 0 0.45rem; }
@media (min-width: 56rem) {
  .jumpnav:not(.mobile-only) { position: sticky; top: var(--header-h); z-index: 5; }
  /* Headings scroll clear of header + jump bar; sticky H2s sit below the bar. */
  html:has(.jumpnav:not(.mobile-only)) { scroll-padding-top: calc(var(--header-h) + 4.5rem); }
  .jumpnav:not(.mobile-only) ~ .page-body .psec-head h2 { top: calc(var(--header-h) + 4.5rem); }
  .jumpnav.mobile-only { display: none; }
}

/* ── News & events: two compact columns ──────────────────────── */
.news-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-8) 4rem; align-items: start; }
@media (max-width: 56rem) { .news-cols { grid-template-columns: minmax(0, 1fr); } }
.ncol > h2, .past > h2 { font-size: var(--fs-h3); padding-bottom: var(--space-3); border-bottom: 2px solid var(--nedna-ink); }
.past { margin-top: var(--space-12); }
.past[hidden] { display: none; }
.col-intro { font-size: var(--fs-small); color: var(--color-text-muted); margin-top: var(--space-3); }
.elist, .nlist { list-style: none; margin: 0; padding: 0; }

/* Event row: date block left, text right */
.erow { display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); gap: var(--space-4); padding-block: var(--space-4); border-bottom: 1px solid var(--color-line); }
.edate {
  display: grid; justify-items: center; align-content: center; align-self: start; gap: 0.1rem; height: 3.75rem; border-radius: var(--radius-md);
  background: var(--nedna-orange-tint); color: var(--nedna-ink); text-align: center; line-height: 1.1;
}
.edate .d { font-size: 1.25rem; font-weight: 700; }
.edate .m { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.edate .y { font-size: 0.7rem; color: var(--color-text-muted); }
.edate.recurring .icon { color: var(--color-accent); font-size: 1.2rem; }
.erow.deadline .edate { background: var(--nedna-petrol-tint); }
.ekind { font-size: var(--fs-eyebrow); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--nedna-petrol); }
.erow h3, .nrow h3 { font-size: 1rem; line-height: 1.4; margin: 0; }
.erow h3 a, .nrow h3 a { color: var(--color-text); }
.erow h3 a:hover, .nrow h3 a:hover { color: var(--color-link); }
.efacts { font-size: 0.875rem; color: var(--color-text-muted); margin-top: 0.15rem; }
.esum { font-size: var(--fs-small); margin-top: var(--space-1); }
.past .erow { opacity: 0.85; }
.past .edate { background: var(--color-surface-alt); }
.past .esum { display: none; }

/* News row */
.nrow { padding-block: var(--space-4); border-bottom: 1px solid var(--color-line); }
.ndate { font-size: 0.875rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.nsum { font-size: var(--fs-small); color: var(--color-text-muted); margin-top: var(--space-1); }

/* Compact heads, continued: no double gap above the grid on group pages,
   and on narrow screens the jump links without their visible label (the
   nav keeps it as its accessible name) and with smaller pills. */
.page-body > .wrap > .integ:first-child { margin-top: 0; }
@media (max-width: 56rem) {
  .jumpnav a { min-height: 36px; padding: 0.25rem 0.75rem; }
}
