/* CARYA – GDMS v3 changelog. Kleuren overgenomen van carya.eu. */

:root {
    --petrol: #003d4c;
    --petrol-80: #335f6b;
    --teal: #00b6ab;           /* enkel als accent, niet voor tekst of focus */
    --teal-text: #00756d;      /* teal met voldoende contrast voor tekst */
    --bg: #f6f9f9;
    --surface: #ffffff;
    --line: #d4dcde;           /* decoratieve randen (kaarten, scheidingslijnen) */
    --line-soft: #e7eded;
    --control: #7d8b8f;        /* randen van bedieningselementen: ≥ 3:1 op wit */
    --text: #1c2b30;
    --muted: #55666b;

    --new-bg: #ddf4f2;   --new-fg: #00655e;
    --improved-bg: #e3ecf6; --improved-fg: #00448b;
    --fixed-bg: #efe6f5;  --fixed-fg: #602483;

    --radius: 10px;
    --gutter: 16px;
    --content: 860px;
    --font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 1rem/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--petrol); line-height: 1.25; margin: 0; }
p { margin: 0; }
a { color: var(--petrol); text-underline-offset: 3px; }
a:hover { color: var(--teal-text); }

/* Focus: petrol haalt ruim 3:1 op wit en op de lichte achtergrond. */
:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }

[hidden] { display: none !important; }

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

.skip-link {
    position: absolute; left: var(--gutter); top: -100px; z-index: 10;
    background: var(--petrol); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

main.container > * { max-width: var(--content); }

/* ---------- Header ---------- */

.sample-banner {
    background: #fff4d6; color: #5c4400; border-bottom: 1px solid #f0dc9c;
    font-size: .875rem; text-align: center; padding: 8px var(--gutter);
}

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { display: block; height: 30px; width: auto; }
.brand__product {
    color: var(--muted); font-size: .9375rem; font-weight: 500;
    padding-left: 14px; border-left: 1px solid var(--line);
}

.lang-switch ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.lang-switch a {
    display: block; min-width: 40px; padding: 8px; text-align: center;
    font-size: .8125rem; font-weight: 500; letter-spacing: .04em;
    color: var(--muted); text-decoration: none; border-radius: 6px;
}
.lang-switch a:hover { color: var(--petrol); background: var(--bg); }
.lang-switch a[aria-current="true"] { color: var(--petrol); background: var(--new-bg); }

/* ---------- Page head ---------- */

.page-head { padding: 48px 0 28px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -.01em; }
.page-head__intro { margin-top: 10px; color: var(--muted); font-size: 1.125rem; max-width: 640px; }
.page-head .button { margin-top: 24px; }

.ai-notice {
    display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; max-width: 640px;
    font-size: .875rem; color: var(--muted);
}
.ai-notice svg { flex: none; margin-top: 3px; }
.ai-notice a { color: var(--muted); }

/* ---------- Tools: versie + zoeken ---------- */

.tools {
    display: grid; gap: 20px; padding: 24px 0 32px;
    border-top: 1px solid var(--line);
}

.tools__label { display: block; font-size: .875rem; font-weight: 500; color: var(--petrol); margin-bottom: 6px; }

select, input[type="search"] {
    height: 44px; font: inherit; color: var(--text);
    background: var(--surface); border: 1px solid var(--control); border-radius: 8px;
}
select { padding: 0 36px 0 12px; max-width: 100%; }

.version-jump__row { display: flex; flex-wrap: wrap; gap: 8px; }
.version-jump select { flex: 1 1 260px; max-width: 420px; }

.help { margin-top: 8px; font-size: .875rem; color: var(--muted); }
.help summary { cursor: pointer; color: var(--petrol); width: fit-content; }
.help p { margin-top: 6px; max-width: 560px; }

.search-form__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { display: flex; flex-direction: column; }
.field--grow { flex: 1 1 280px; }
.field select { min-width: 200px; }

.search { position: relative; }
.search__icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search input { width: 100%; padding: 0 14px 0 42px; }
.search input::placeholder { color: var(--muted); }

.type-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.type-filter__label { font-size: .875rem; color: var(--muted); margin-right: 2px; }

.chip {
    display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
    font: 500 .875rem var(--font); color: var(--petrol); text-decoration: none;
    background: var(--surface); border: 1px solid var(--control); border-radius: 999px;
}
.chip:hover { color: var(--petrol); border-color: var(--petrol); }
.chip[aria-current="true"] { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.chip--new[aria-current="true"] { background: var(--new-fg); border-color: var(--new-fg); }
.chip--improved[aria-current="true"] { background: var(--improved-fg); border-color: var(--improved-fg); }
.chip--fixed[aria-current="true"] { background: var(--fixed-fg); border-color: var(--fixed-fg); }

/* ---------- Release ---------- */

.release {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 24px 20px;
}
@media (min-width: 720px) { .release { padding: 32px 36px; } }

.release__head { padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.release__eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-text); margin-bottom: 6px; }
.release__version { font-size: 1.5rem; font-weight: 700; letter-spacing: -.005em; }
h1.release__version { font-size: clamp(1.75rem, 4vw, 2.25rem); }
.release__version a { text-decoration: none; }
.release__version a:hover { text-decoration: underline; }
.release__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; color: var(--muted); font-size: .9375rem; }

.release__summary { font-size: 1.0625rem; margin-bottom: 8px; max-width: 70ch; }
.release__summary p + p { margin-top: .75em; }

.release__report { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: .875rem; color: var(--muted); }
.release__report a { color: var(--muted); }

.notice {
    margin-bottom: 20px; padding: 10px 14px; font-size: .9375rem;
    background: var(--bg); border-left: 3px solid var(--teal); border-radius: 0 6px 6px 0; color: var(--muted);
}

.group { margin-top: 24px; }
.group__title { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 4px; }
.group__count { font-size: .875rem; font-weight: 500; color: var(--muted); }

.badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.badge--new { background: var(--new-bg); color: var(--new-fg); }
.badge--improved { background: var(--improved-bg); color: var(--improved-fg); }
.badge--fixed { background: var(--fixed-bg); color: var(--fixed-fg); }

/* ---------- Item ---------- */

.items { list-style: none; margin: 0; padding: 0; }
.item { position: relative; padding: 16px 0; border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.item:last-child { border-bottom: 0; padding-bottom: 0; }

.item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 2px; }
.item__meta:empty { display: none; }
.item__area { font-size: .8125rem; font-weight: 500; color: var(--teal-text); }
.item__untranslated { font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; }

.item__head { display: flex; align-items: flex-start; gap: 8px; }
.item__title { flex: 1; font-size: 1.0625rem; font-weight: 500; color: var(--text); max-width: 64ch; }
.item__link {
    flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; margin-top: -4px;
    color: var(--muted); border-radius: 6px;
}
.item__link:hover { color: var(--petrol); background: var(--bg); }
.item__status { position: absolute; right: 40px; top: 16px; font-size: .8125rem; color: var(--teal-text); font-weight: 500; }
.item__status:empty { display: none; }

.item__desc { margin-top: 4px; color: var(--muted); max-width: 72ch; }
.item__desc p + p { margin-top: .6em; }

/* Gelinkte wijziging blijft gemarkeerd. */
.item:target {
    margin: 0 -14px; padding-left: 11px; padding-right: 14px;
    background: var(--bg); border-left: 3px solid var(--teal); border-radius: 0 6px 6px 0;
}
.item:target:last-child { padding-bottom: 16px; }

mark { background: #fff1a8; color: inherit; border-radius: 2px; padding: 0 1px; }

/* ---------- Zoekresultaten ---------- */

.results-summary {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px;
    margin-bottom: 20px; color: var(--muted);
}
.results-summary strong { color: var(--text); font-weight: 500; }
.results-summary p:empty { display: none; }

.result-group { margin-bottom: 28px; }
.result-group__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 10px; }
.result-group__head h2 { font-size: 1.25rem; }
.result-group__date { font-size: .9375rem; font-weight: 400; color: var(--muted); margin-left: 8px; }
.result-group__head a { font-size: .9375rem; font-weight: 500; text-decoration: none; }
.result-group__head a:hover { text-decoration: underline; }

.items--card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 20px;
}
@media (min-width: 720px) { .items--card { padding: 4px 28px 24px; } }

/* ---------- Eerdere releases ---------- */

.earlier { margin: 40px 0 64px; }
.earlier > h2 { font-size: 1.25rem; margin-bottom: 12px; }

.year { border-top: 1px solid var(--line); }
.year:last-child { border-bottom: 1px solid var(--line); }
.year summary {
    display: flex; align-items: baseline; gap: 10px; padding: 14px 4px;
    cursor: pointer; list-style: none;
}
.year summary::-webkit-details-marker { display: none; }
.year summary::before {
    content: ""; width: 8px; height: 8px; flex: none; align-self: center;
    border-right: 2px solid var(--petrol); border-bottom: 2px solid var(--petrol);
    rotate: -45deg; transition: rotate .15s;
}
.year[open] summary::before { rotate: 45deg; }
.year__label { font-weight: 700; color: var(--petrol); font-size: 1.0625rem; }
.year__count { color: var(--muted); font-size: .875rem; }

.rows { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.row {
    position: relative; display: grid; gap: 4px; padding: 14px 44px 14px 18px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    text-decoration: none; color: var(--text);
}
.row:hover { border-color: var(--petrol-80); color: var(--text); }
.row__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.row__version { font-weight: 700; color: var(--petrol); font-variant-numeric: tabular-nums; }
.row__date { color: var(--muted); font-size: .9375rem; }
.row__counts { color: var(--muted); font-size: .875rem; }
@media (min-width: 720px) { .row__counts { margin-left: auto; } }
.row__summary {
    color: var(--muted); font-size: .9375rem;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
@media (min-width: 720px) { .row__summary { -webkit-line-clamp: 1; } }
.row__arrow { position: absolute; right: 18px; top: 50%; translate: 0 -50%; color: var(--petrol); }

/* ---------- Detail ---------- */

.back { padding: 32px 0 20px; }
.back a { font-weight: 500; text-decoration: none; }
.back a:hover { text-decoration: underline; }
.detail { padding-bottom: 64px; }

.pager { display: grid; gap: 12px; margin-top: 24px; }
@media (min-width: 600px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager__link {
    display: flex; flex-direction: column; gap: 2px; padding: 16px 20px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none;
}
.pager__link:hover { border-color: var(--petrol-80); }
.pager__link--newer { text-align: right; grid-column: 2; }
@media (max-width: 599px) { .pager__link--newer { grid-column: auto; } }
.pager__label { font-size: .875rem; color: var(--muted); }
.pager__version { font-weight: 700; }

/* ---------- Misc ---------- */

.empty {
    padding: 32px 24px; color: var(--muted);
    background: var(--surface); border: 1px dashed var(--control); border-radius: var(--radius);
    margin-bottom: 32px;
}
.empty__title { color: var(--text); font-weight: 500; font-size: 1.0625rem; margin-bottom: 4px; }
.empty__actions { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.empty__actions a { font-weight: 500; }
.empty__support { font-size: .875rem; }

.button {
    display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px;
    font: 500 .9375rem var(--font); color: #fff; text-decoration: none;
    background: var(--petrol); border: 1px solid var(--petrol); border-radius: 8px; cursor: pointer;
}
.button:hover { background: var(--petrol-80); border-color: var(--petrol-80); color: #fff; }
.button--secondary { background: var(--surface); color: var(--petrol); border-color: var(--control); }
.button--secondary:hover { background: var(--bg); color: var(--petrol); border-color: var(--petrol); }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-size: .875rem; color: var(--muted); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 20px; }
.site-footer a { color: var(--muted); }
.rss-link { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 480px) {
    .brand__product { display: none; }
    .lang-switch a { min-width: 34px; padding: 8px 4px; }
    .search-form__row > .button, .version-jump .button { width: 100%; }
    .field select, .version-jump select { min-width: 0; width: 100%; max-width: none; }
    .field { flex: 1 1 100%; }
}
