/* Terpec demo – one stylesheet for every page.
   Look: white pages, navy header band and footer, the village crest, hills above the footer.
   Structure follows what residents look for first (like budapest.hu): "Miben segíthetünk?" topics,
   what is important now, quick help, news, developments.
   Every text colour is checked for at least 4.5:1 contrast on its ground.
   All sizes are in rem, so the "A+" button (bigger root font) scales the whole page. */

:root {
  --navy: #0b3768;        /* header band, help section, footer */
  --navy-deep: #082a52;
  --blue: #1257a6;        /* links and buttons, 6.9:1 on white */
  --ink: #1b2533;         /* running text */
  --muted: #4a5868;       /* dates and notes, 7:1 on white */
  --line: #dbe3ee;
  --tint: #eef3f9;        /* light blue panels */
  --page: #ffffff;
  --card: #ffffff;
  --on-navy: #ffffff;
  --on-navy-muted: #c9d6e8;
  --alert-bg: #fff4d6;    /* "Most fontos" strip */
  --alert-edge: #8a5d00;
  --done-bg: #e3f3e8;   --done-ink: #17572f;     /* status: kész */
  --doing-bg: #fff1d6;  --doing-ink: #6b4300;    /* status: folyamatban */
  --plan-bg: #e3ecf7;   --plan-ink: #0b3768;     /* status: tervezés alatt */
  --focus-light: #ffbf47; /* focus: yellow ring + dark ring, visible on white and on navy */
  --focus-dark: #0b1c33;

  --font: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 76rem;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --radius: 0.75rem;
}

/* "A+" button: everything grows by ~19% */
html[data-text="large"] { font-size: 118.75%; }

/* "Kontraszt" button: black, white and yellow */
html[data-contrast="high"] {
  --navy: #000; --navy-deep: #000; --blue: #ffff00; --ink: #fff; --muted: #fff; --line: #fff;
  --tint: #000; --page: #000; --card: #000; --on-navy: #ffff00; --on-navy-muted: #fff;
  --alert-bg: #000; --alert-edge: #ffff00;
  --done-bg: #000; --done-ink: #fff; --doing-bg: #000; --doing-ink: #fff; --plan-bg: #000; --plan-ink: #fff;
  --focus-light: #00ffff; --focus-dark: #000;
}
html[data-contrast="high"] .button { color: #000; }
html[data-contrast="high"] :is(.topic, .card, .quick__panel, .project, .notice, .status, .tag, .alert, .matters details) { border: 1px solid #fff; }
html[data-contrast="high"] :is(h1, h2, h3, .topic__title) { color: #fff !important; }
html[data-contrast="high"] .feature__media::after { background: rgba(0, 0, 0, 0.8); }
html[data-contrast="high"] .waves { display: none; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); font-size: 1.125rem; line-height: 1.6; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { color: var(--navy); line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus-light); outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus-dark); border-radius: 4px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: 1rem; z-index: 100;
  background: #fff; color: #0b3768; font-weight: 700; padding: 0.75rem 1rem; border-radius: 0.5rem;
}
.skip:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; padding: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.button {
  display: inline-flex; align-items: center; gap: 0.6rem; background: var(--blue); color: #fff;
  text-decoration: none; font-weight: 700; padding: 0.8rem 1.35rem; border-radius: 999px;
  min-height: 2.75rem; border: 0; cursor: pointer;
}
.button:hover { background: var(--navy-deep); }
.button--light { background: #fff; color: #0b3768; }
.button--light:hover { background: #dfe8f3; }
html[data-contrast="high"] .button--light { background: #ffff00; }
.more { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; white-space: nowrap; }

/* ---------- Utility bar: demo note + display tools ---------- */
.utility { background: var(--tint); border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.utility .wrap { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; min-height: 2.75rem; flex-wrap: wrap; }
.tools { display: flex; align-items: center; gap: 0.15rem; }
.tools__label { margin-right: 0.35rem; color: var(--muted); }
html:not(.js) .tools { display: none; }
.tool {
  min-width: 2.5rem; min-height: 2.5rem; border: 0; background: none; cursor: pointer; border-radius: 0.5rem;
  font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0 0.5rem;
}
.tool:hover { background: #dfe8f3; }
html[data-contrast="high"] .tool:hover { background: #222; }
.tool[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); }
html[data-contrast="high"] .tool[aria-pressed="true"] { outline: 2px solid #fff; }

/* ---------- Header band ---------- */
.header { background: var(--navy); color: var(--on-navy); }
html[data-contrast="high"] .header { border-bottom: 1px solid #fff; }
.header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 5.25rem; }
.brand { display: flex; align-items: center; gap: 0.85rem; color: var(--on-navy); text-decoration: none; margin-right: auto; }
.brand__crest { width: 3.1rem; height: auto; }
.brand__name { white-space: nowrap; font-weight: 700; font-size: 1.6rem; line-height: 1.05; display: block; letter-spacing: 0.01em; }
.brand__sub { display: block; font-size: 0.8125rem; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 600; color: var(--on-navy-muted); margin-top: 0.2rem; }

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.nav a {
  display: flex; align-items: center; min-height: 2.75rem; padding: 0 0.8rem; border-radius: 0.5rem;
  color: var(--on-navy); text-decoration: none; font-weight: 600; font-size: 1.0625rem; white-space: nowrap;
}
.nav a:hover { background: var(--navy-deep); text-decoration: underline; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.45em; }
.search { display: flex; align-items: center; background: #fff; border-radius: 999px; margin-left: 0.5rem; }
.search input { border: 0; background: transparent; padding: 0.55rem 0 0.55rem 1rem; width: 10.5rem; min-width: 0; color: #1b2533; }
.search input::placeholder { color: #4a5868; opacity: 1; }
.search input:focus-visible { box-shadow: none; outline: none; }
.search:focus-within { outline: 3px solid var(--focus-light); box-shadow: 0 0 0 6px var(--focus-dark); }
.search button { border: 0; background: none; padding: 0.55rem 0.9rem; cursor: pointer; color: #0b3768; display: grid; }
html[data-contrast="high"] .search { border: 2px solid #ffff00; background: #000; }
html[data-contrast="high"] .search input, html[data-contrast="high"] .search button { color: #fff; }
html[data-contrast="high"] .search input::placeholder { color: #fff; }
.menu-toggle { display: none; }

/* ---------- Page heads (sub-pages) ---------- */
.pagehead { background: var(--tint); border-bottom: 1px solid var(--line); }
.pagehead .wrap { padding-top: 1.1rem; padding-bottom: 2.25rem; }
.crumbs { font-size: 0.9375rem; margin-bottom: 1.25rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.crumbs li { display: flex; align-items: center; gap: 0.4rem; }
.crumbs a { color: var(--ink); }
.crumbs svg { color: var(--muted); }
.pagehead h1 { font-size: clamp(2.1rem, 1.6rem + 2vw, 3rem); }
.pagehead p { font-size: 1.25rem; margin-top: 0.6rem; max-width: 46rem; }
.pills { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pills a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.1rem; border-radius: 999px;
  background: var(--card); border: 1px solid #8c9bb0; color: var(--navy); font-weight: 600; text-decoration: none;
}
html[data-contrast="high"] .pills a { color: #ffff00; border-color: #fff; }
.pills a:hover { border-color: var(--navy); text-decoration: underline; }

.content { max-width: var(--wrap); margin: 0 auto; padding: 2.25rem var(--gutter) 0; }
.content--narrow { max-width: 52rem; }
.content h2 { font-size: 1.75rem; margin: 2.5rem 0 0.8rem; }
.content > h2:first-child { margin-top: 0; }
.content p + p, .content p + ul, .content ul + p { margin-top: 0.85rem; }
.content ul:not([class]) { padding-left: 1.3rem; }
.content ul:not([class]) li + li { margin-top: 0.35rem; }

/* ---------- Home: featured story ---------- */
.feature { position: relative; min-height: 27rem; display: flex; align-items: flex-end; overflow: hidden; color: #fff; }
.feature__media { position: absolute; inset: 0; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 60%; }
/* dark scrim under the text so white type keeps its contrast */
.feature__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(5,24,48,0.92) 0%, rgba(5,24,48,0.78) 45%, rgba(5,24,48,0.05) 85%);
}
.feature__text { position: relative; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 4rem var(--gutter) 2.5rem; }
.feature__text > * { max-width: 44rem; }
.kicker { display: inline-block; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; background: #fff; color: #0b3768; padding: 0.2rem 0.65rem; border-radius: 0.3rem; }
html[data-contrast="high"] .kicker { background: #ffff00; color: #000; }
.feature h2 { color: #fff; font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem); margin: 0.8rem 0 0.7rem; }
.feature p { font-size: 1.25rem; margin-bottom: 1.5rem; }

/* "Most fontos" strip */
.alert { background: var(--alert-bg); border-bottom: 1px solid #ecd9a6; }
.alert .wrap { display: flex; align-items: center; gap: 0.9rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.alert svg { color: var(--alert-edge); }
.alert strong { margin-right: 0.35rem; }

/* ---------- Home: "Miben segíthetünk?" ---------- */
.help { background: var(--navy); color: var(--on-navy); padding: 3.5rem 0 4rem; }
html[data-contrast="high"] .help { border-top: 1px solid #fff; border-bottom: 1px solid #fff; }
.help h2 { color: var(--on-navy); font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); }
.help__lead { color: var(--on-navy-muted); font-size: 1.1875rem; margin: 0.5rem 0 1.75rem; }
.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; align-items: start; }
.topic { background: var(--card); color: var(--ink); border-radius: var(--radius); }
.topic summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 0.35rem 0.9rem;
  align-items: start; padding: 1.25rem 1.2rem; min-height: 9.5rem; border-radius: var(--radius);
}
.topic summary::-webkit-details-marker { display: none; }
.topic summary:hover .topic__title { text-decoration: underline; }
.topic__icon { color: var(--blue); }
html[data-contrast="high"] .topic__icon { color: #fff; }
.topic__title { font-weight: 700; font-size: 1.25rem; line-height: 1.25; color: var(--navy); }
.topic__desc { grid-column: 1 / 4; color: var(--muted); font-size: 1rem; line-height: 1.45; }
.topic__chev {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--tint); color: var(--navy); transition: transform 0.2s;
}
html[data-contrast="high"] .topic__chev { color: #fff; border: 1px solid #fff; }
.topic[open] .topic__chev { transform: rotate(90deg); }
.topic ul { list-style: none; margin: 0; padding: 0 1.2rem 0.75rem; border-top: 1px solid var(--line); }
.topic li a {
  display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.35rem 0;
  color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line);
}
.topic li a:hover { text-decoration: underline; color: var(--navy); }
.topic li a svg { color: var(--blue); }
.topic li:last-child a { border-bottom: 0; color: var(--blue); }

/* ---------- Home sections ---------- */
.section { padding: 3.5rem 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.8rem, 1.5rem + 1.2vw, 2.4rem); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.quick__panel { background: var(--tint); border-radius: var(--radius); padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.quick__panel h3 { display: flex; align-items: center; gap: 0.65rem; font-size: 1.3rem; }
.quick__panel h3 svg { color: var(--blue); }
html[data-contrast="high"] .quick__panel h3 svg { color: #fff; }
.quick__panel .more { margin-top: auto; padding-top: 0.25rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field label { font-size: 0.9375rem; font-weight: 600; }
.field input, .field select {
  border: 1px solid #8c9bb0; border-radius: 0.5rem; background: var(--card); padding: 0.6rem 0.9rem; min-height: 2.9rem;
}
.office-state { font-weight: 700; font-size: 1.1875rem; display: flex; align-items: baseline; gap: 0.5rem; }
.office-state:empty { display: none; }
.dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: #8c9bb0; }
.dot--open { background: #1d7a3e; }
.dot--closed { background: #b3261e; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
.next-list { list-style: none; margin: 0; padding: 0; }
.next-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-top: 1px solid var(--line); }

/* ---------- News cards ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card__body { padding: 1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.4rem; }
.card__meta { display: flex; gap: 0.6rem; align-items: center; font-size: 0.9375rem; color: var(--muted); flex-wrap: wrap; }
.card h3 { font-size: 1.25rem; line-height: 1.3; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.card:hover h3 a { text-decoration: underline; }
.card:focus-within { outline: 3px solid var(--focus-light); box-shadow: 0 0 0 6px var(--focus-dark); }
.card h3 a:focus-visible { outline: none; box-shadow: none; }
.card p { font-size: 1rem; line-height: 1.5; }
.tag { background: var(--plan-bg); color: var(--plan-ink); border-radius: 999px; padding: 0.1rem 0.7rem; font-size: 0.875rem; font-weight: 700; white-space: nowrap; }

/* ---------- Developments ---------- */
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.project { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; background: var(--card); display: flex; flex-direction: column; gap: 0.55rem; height: 100%; }
.project h3 { font-size: 1.25rem; line-height: 1.3; }
.project dl { margin: auto 0 0; padding-top: 0.6rem; display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.9rem; font-size: 0.9375rem; border-top: 1px solid var(--line); }
.project dt { color: var(--muted); }
.project dd { margin: 0; font-weight: 600; }
.status { align-self: flex-start; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.2rem 0.65rem; border-radius: 0.3rem; }
.status--done { background: var(--done-bg); color: var(--done-ink); }
.status--doing { background: var(--doing-bg); color: var(--doing-ink); }
.status--plan { background: var(--plan-bg); color: var(--plan-ink); }

/* ---------- Notices list ---------- */
.filters { display: grid; grid-template-columns: 1fr 13rem 10rem; gap: 0.75rem; margin-bottom: 0.75rem; }
.result-count { color: var(--muted); font-size: 0.9375rem; margin: 0.25rem 0 0.75rem; }
.notices { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.notice { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.notice summary {
  list-style: none; cursor: pointer; display: grid; align-items: center; gap: 1.1rem;
  grid-template-columns: auto 1fr auto auto; padding: 0.9rem 1.1rem;
}
.notice summary::-webkit-details-marker { display: none; }
.notice summary:hover .notice__title { text-decoration: underline; }
.notice__icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 0.5rem; background: var(--tint); color: var(--navy); }
html[data-contrast="high"] .notice__icon { color: #fff; border: 1px solid #fff; }
.notice__title { display: block; font-weight: 700; font-size: 1.1875rem; color: var(--ink); line-height: 1.3; }
.notice__date { display: block; color: var(--muted); font-size: 0.9375rem; }
.chev { transition: transform 0.2s; color: var(--navy); display: grid; }
html[data-contrast="high"] .chev { color: #fff; }
details[open] > summary .chev { transform: rotate(90deg); }
.notice__body { padding: 0 1.1rem 1.1rem calc(1.1rem + 3rem + 1.1rem); }
.notice__body p + p { margin-top: 0.6rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 0.4rem; margin-top: 1.75rem; }
.pager button {
  min-width: 2.75rem; min-height: 2.75rem; border-radius: 0.5rem; border: 0; background: none;
  font-weight: 700; cursor: pointer; color: var(--ink); display: grid; place-items: center;
}
.pager button:hover:not(:disabled) { background: var(--tint); }
.pager button[aria-current="page"] { background: var(--navy); color: var(--on-navy); }
.pager button:disabled { opacity: 0.4; cursor: default; }

/* ---------- Services (Ügyintézés) ---------- */
.matters { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.matters details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.matters summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.2rem; font-weight: 700; font-size: 1.1875rem;
}
.matters summary::-webkit-details-marker { display: none; }
.matters summary .where { font-weight: 400; color: var(--muted); font-size: 1rem; margin-left: auto; text-align: right; }
.matters details > p { padding: 0 1.2rem 1.1rem; }

/* ---------- Waste page and tables ---------- */
.waste { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem; align-items: start; }
.waste__ask { background: var(--tint); border-radius: var(--radius); padding: 1.5rem; }
.waste__ask h2 { margin-top: 0; font-size: 1.5rem; }
.waste__ask .field { margin-top: 1rem; }
#waste-result { margin-top: 1.25rem; }
#waste-result h3 { font-size: 1.1875rem; margin-bottom: 0.5rem; }
.table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.table caption { text-align: left; font-weight: 700; font-size: 1.375rem; color: var(--navy); margin-bottom: 0.6rem; }
html[data-contrast="high"] .table caption { color: #fff; }
.table th, .table td { text-align: left; vertical-align: top; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); }
.table thead th { background: var(--tint); }
.table .num { text-align: right; white-space: nowrap; }

/* ---------- Village page ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin: 1.5rem 0; padding: 0; }
.facts div { background: var(--tint); border-radius: var(--radius); padding: 1rem 1.2rem; }
.facts dt { color: var(--muted); font-size: 0.9375rem; }
.facts dd { margin: 0; font-weight: 700; font-size: 1.6rem; color: var(--navy); }
html[data-contrast="high"] .facts dd { color: #fff; }
.figure { margin: 1.5rem 0; }
.figure img { border-radius: var(--radius); width: 100%; }
.figure figcaption { font-size: 0.9375rem; color: var(--muted); margin-top: 0.5rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }

/* ---------- Footer ---------- */
.waves { display: block; width: 100%; height: auto; margin-top: 4rem; }
.footer { background: var(--navy); color: var(--on-navy); }
html[data-contrast="high"] .footer { border-top: 1px solid #fff; margin-top: 4rem; }
.footer a { color: var(--on-navy); }
.footer__main { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2rem; padding-top: 2.25rem; padding-bottom: 2.25rem; }
.footer h3 { color: var(--on-navy); font-size: 1.0625rem; margin-bottom: 0.6rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer address { font-style: normal; display: grid; gap: 0.4rem; margin-top: 1rem; }
.footer address span, .footer address a { display: flex; align-items: center; gap: 0.7rem; }
.hours { border-collapse: collapse; }
.hours th { text-align: left; font-weight: 400; padding: 0.1rem 1.25rem 0.1rem 0; }
.hours td { padding: 0.1rem 0; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.3); }
.footer__bottom .wrap { padding-top: 1rem; padding-bottom: 1.25rem; font-size: 0.875rem; color: var(--on-navy-muted); }
.footer__bottom a { color: var(--on-navy-muted); }
.footer .footer__legal { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font-size: 0.9375rem; margin-bottom: 0.6rem; }
.footer__legal a { color: var(--on-navy); }
.credits { margin-top: 0.4rem; }

/* ---------- Narrower screens ---------- */
@media (max-width: 75rem) {
  .nav ul a { padding: 0 0.5rem; }
  .search input { width: 7.5rem; }
  .topics { grid-template-columns: repeat(2, 1fr); }
  .topic summary { min-height: 0; }
}

@media (max-width: 72rem) {
  /* Menu folds into a "Menü" button (without script it simply stays open below the name) */
  .header .wrap { flex-wrap: wrap; gap: 0 1rem; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 0.9rem;
    background: none; border: 2px solid rgba(255,255,255,0.6); border-radius: 999px; color: var(--on-navy); font-weight: 700; cursor: pointer;
  }
  html:not(.js) .menu-toggle { display: none; }
  .nav { flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 0.25rem 0 1rem; }
  .js .menu-toggle[aria-expanded="false"] + .nav { display: none; }
  .nav ul { flex-direction: column; }
  .nav ul a { padding: 0 0.25rem; min-height: 3rem; border-bottom: 1px solid rgba(255,255,255,0.18); border-radius: 0; }
  .search { margin: 0.75rem 0; order: -1; }
  .search input { width: 100%; flex: 1; }
}

@media (max-width: 64rem) {
  .quick, .cards, .projects { grid-template-columns: 1fr 1fr; }
  .footer__main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 40rem) {
  .brand__name { font-size: 1.35rem; }
  .brand__crest { width: 2.6rem; }
  .utility .wrap { justify-content: center; text-align: center; padding-top: 0.25rem; padding-bottom: 0.25rem; }
  .tools__label { display: none; }

  .feature { min-height: 0; display: block; color: var(--ink); }
  .feature__media { position: relative; height: 13rem; }
  .feature__media::after { display: none; }
  .feature__text { padding: 1.5rem var(--gutter) 2rem; }
  .feature h2 { color: var(--navy) !important; }
  .kicker { background: var(--navy); color: #fff; }
  .feature .button--light { background: var(--blue); color: #fff; }

  .alert .wrap { align-items: flex-start; }
  .topics, .quick, .cards, .projects { grid-template-columns: 1fr; }
  .topic summary { padding: 1rem; }

  .filters { grid-template-columns: 1fr 1fr; }
  .filters .field:first-child { grid-column: 1 / -1; }
  .notice summary { grid-template-columns: auto 1fr auto; gap: 0.75rem; padding: 0.8rem; }
  .notice .tag { grid-column: 2; justify-self: start; grid-row: 2; }
  .notice .chev { grid-row: 1; grid-column: 3; }
  .notice__icon { width: 2.5rem; height: 2.5rem; }
  .notice__body { padding: 0 0.9rem 1rem; }
  .matters summary { flex-wrap: wrap; }
  .matters summary .where { flex-basis: 100%; text-align: left; margin-left: 0; order: 3; }

  .waste, .split { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .table--stack thead { display: none; }
  .table--stack tr { display: block; border-bottom: 1px solid var(--line); padding: 0.5rem 0; }
  .table--stack th, .table--stack td { display: block; border: 0; padding: 0.15rem 0; }
  .table--stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; }
  .footer__main { grid-template-columns: 1fr; }
}

/* Visitors who asked their device for less motion get none */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
