/* ==========================================================================
   Hernád — the shared site header
   --------------------------------------------------------------------------
   The accessibility toolbar, masthead and main navigation, identical on the
   Hírmondó front page and on every subpage. Loaded site-wide; hirmondo.css
   depends on this file and adds only the front-page body below the header.

   Everything is scoped to the .hm-head wrapper, for two reasons:

   1. Subpage <body> is Kadence's — Inter at 17px — and the whole masthead is
      sized in em off the editorial 18px. Declaring the font and size on the
      wrapper makes those em units resolve to the same pixels they do on the
      front page, which is the whole point of the exercise.
   2. Nothing here may leak into subpage content. A single misplaced
      `body a { text-decoration: none }` would restyle every article on the
      site, so no selector in this file is allowed to escape .hm-head.

   The one deliberate exception is the `html` rule below.
   ========================================================================== */

@font-face {
	font-family: 'Newsreader';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../../../../uploads/fonts/newsreader-latin-ext-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Newsreader';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../../../../uploads/fonts/newsreader-latin-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The italic faces are deliberately NOT declared. Italic appears only on the
   byline and the occasional <em>, which is not worth ~240 KB of extra font
   payload on a municipal site; the browser synthesises it instead. The italic
   woff2 files remain in uploads/fonts/ if that trade-off is ever revisited. */

/* A metric-matched stand-in for Newsreader, drawn from the local Georgia.
   -------------------------------------------------------------------------
   Newsreader loads with font-display: swap, so the masthead first paints in
   the fallback and then re-lays out when the real font arrives. Georgia's
   line box is 13% taller than Newsreader's (1.136em against 1.000em), so that
   swap changed the masthead's height and pushed the entire page down.

   On most pages the font wins the race and nothing is visible. On /albumok/,
   where it queues behind 170 gallery images, it lost — Lighthouse measured
   CLS 0.202 there against 0 elsewhere, which fails Core Web Vitals.

   Overriding the fallback's metrics makes it occupy exactly Newsreader's box,
   so the swap changes the glyphs and nothing else. Measured on this machine
   with canvas TextMetrics, not copied from a generator:

       Newsreader  ascent 0.735  descent 0.265  advance 8.9265
       Georgia     ascent 0.917  descent 0.219  advance 8.8340

   size-adjust is the advance ratio; the ascent and descent overrides are
   Newsreader's, divided by that ratio because they are resolved against the
   adjusted em. Preloading the fonts instead would have cost 219 KB on the
   critical path, which is a worse trade on a village website. */
@font-face {
	font-family: 'Newsreader Fallback';
	src: local('Georgia'), local('Times New Roman');
	size-adjust: 101.05%;
	ascent-override: 72.74%;
	descent-override: 26.23%;
	line-gap-override: 0%;
}

/* --- Design tokens and the wrapper's own type ---------------------------- */

.hm-head {
	--hm-paper: #fbfaf6;
	--hm-ink: #161616;
	--hm-muted: #565248;
	--hm-red: #8e1b1b;
	/* Azure, from the village arms — see inc/colour.php. */
	--hm-green: #005ca1;
	--hm-rule: #cfcac0;
	--hm-hover: #f3f1ea;

	/* The coat of arms, for direction C. Gold is a surface colour: it is
	   1.57:1 on paper and must never carry text there, but on the deep azure
	   band it reaches 5.55:1 and can. */
	--hm-azure-deep: #004a83;
	--hm-gold: #f8c301;
	/* 6vw gutters, but once the viewport passes ~1720px the gutter grows so the
	   masthead never exceeds 1520px and stays in line with the page below it. */
	--hm-gutter: max(6vw, calc((100vw - 1520px) / 2));

	background: var(--hm-paper);
	color: var(--hm-ink);
	/* 'Newsreader Fallback' sits directly behind the real face: it is Georgia
	   with Newsreader's metrics, so the swap does not move the page. */
	font-family: 'Newsreader', 'Newsreader Fallback', 'Source Serif 4', Charter, 'Bitstream Charter', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
	/* --hm-scale is never declared here — it is set on <html>/<body> by the
	   toolbar, and a declaration on the wrapper would shadow it. */
	font-size: calc(18px * var(--hm-scale, 1));
	line-height: 1.55;
	font-synthesis-weight: none;
	-webkit-font-smoothing: antialiased;
}

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

/* High contrast: pure black on white, stronger rules. Three states — no
   attribute means "follow the operating system", while data-contrast
   high/normal is an explicit choice made with the toolbar.

   Note these are keyed on a bare `body[...]`, not `body.hm-page[...]`: the
   attribute is set on <body> on every page, front page or not. */
body[data-contrast="high"] .hm-head {
	--hm-paper: #ffffff;
	--hm-ink: #000000;
	--hm-muted: #1a1a1a;
	--hm-red: #7a0000;
	--hm-green: #003a68;
	--hm-rule: #000000;
	--hm-hover: #e8e8e8;
}

@media (prefers-contrast: more) {
	body:not([data-contrast="normal"]) .hm-head {
		--hm-paper: #ffffff;
		--hm-ink: #000000;
		--hm-muted: #1a1a1a;
		--hm-red: #7a0000;
		--hm-green: #003a68;
		--hm-rule: #000000;
		--hm-hover: #e8e8e8;
	}

	body:not([data-contrast="normal"]) .hm-head a {
		text-decoration: underline;
	}
}

body[data-contrast="high"] .hm-head a {
	text-decoration: underline;
}

/* --- Local resets, none of which may reach page content ------------------ */

.hm-head h1,
.hm-head h2,
.hm-head p {
	/* Kadence styles headings in Syne, uppercase, in a palette colour. */
	margin: 0;
	font-family: inherit;
	line-height: 1.1;
	letter-spacing: normal;
	text-transform: none;
	color: var(--hm-ink);
}

.hm-head p {
	font-weight: inherit;
	line-height: inherit;
}

.hm-head a {
	color: inherit;
	text-decoration: none;
}

.hm-head a:hover,
.hm-head a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hm-head :focus-visible {
	outline: 2px solid var(--hm-red);
	outline-offset: 2px;
}

.hm-head img {
	max-width: 100%;
	height: auto;
	display: block;
}

.hm-head .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.hm-head .hm-sep {
	margin: 0 .4em;
	color: var(--hm-rule);
}

.hm-head .hm-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--hm-ink);
	color: var(--hm-paper);
	padding: 12px 18px;
	z-index: 100;
}

.hm-head .hm-skip:focus {
	left: 8px;
	top: 8px;
}

/* --- Accessibility controls --------------------------------------------- */

.hm-head .hm-a11y {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 8px var(--hm-gutter);
	border-bottom: 1px solid var(--hm-rule);
	font-size: .778em;
}

.hm-head .hm-a11y-label {
	color: var(--hm-muted);
	margin-right: 4px;
}

.hm-head .hm-a11y button {
	font-family: inherit;
	font-size: 1em;
	line-height: 1;
	color: var(--hm-ink);
	background: transparent;
	border: 1px solid var(--hm-rule);
	border-radius: 0;
	padding: 6px 10px;
	cursor: pointer;
	min-height: 32px;
	/* Kadence gives buttons a palette background, a shadow and a transform on
	   hover; subpages load that stylesheet, the front page does not. */
	box-shadow: none;
	transform: none;
	letter-spacing: normal;
	text-transform: none;
	min-width: 0;
	width: auto;
}

.hm-head .hm-a11y button:hover {
	background: var(--hm-hover);
	color: var(--hm-ink);
	box-shadow: none;
	transform: none;
}

.hm-head .hm-a11y button[aria-pressed="true"] {
	background: var(--hm-ink);
	border-color: var(--hm-ink);
	color: var(--hm-paper);
}

.hm-head .hm-a11y .hm-a11y-size-1 {
	font-size: 1.15em;
}

.hm-head .hm-a11y .hm-a11y-size-2 {
	font-size: 1.3em;
}

.hm-head .hm-a11y-link {
	color: var(--hm-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
	margin-left: 6px;
}

/* --- Masthead ----------------------------------------------------------- */

.hm-head .hm-mast {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: end;
	gap: 20px;
	padding: 26px var(--hm-gutter) 14px;
	border-bottom: 3px double var(--hm-ink);
}

.hm-head .hm-mast-side {
	font-size: .778em;
	line-height: 1.45;
	color: var(--hm-muted);
}

.hm-head .hm-mast-right {
	text-align: right;
}

/* "Ma nincs ügyfélfogadás" sits under the search field and the E-ügyintézés
   button. Every <p> in the masthead has margin 0, which was right when this
   line followed two plain text links — their line-height gave it air. Against
   a bordered 29px button box the gap measured exactly 0 and the label looked
   stuck to it. 8px matches the gap between the two controls themselves, so the
   column keeps one rhythm. */
.hm-head .hm-hours-today {
	margin-top: 8px;
}

.hm-head .hm-weather {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 2px;
	color: var(--hm-ink);
}

/* Tinted line art, not full-colour pictograms: the shapes stay in the same
   hairline style as the Rovatok icons, only the stroke colour changes with the
   condition. Tones are muted and mid-dark so they read on the paper background
   without out-shouting the coat of arms next to them. */
.hm-head .hm-weather-icon {
	flex: none;
	color: var(--hm-green);
}

.hm-head .hm-weather-icon--sun   { color: #b26a00; }
.hm-head .hm-weather-icon--moon  { color: #46506e; }
.hm-head .hm-weather-icon--cloud { color: #5c6672; }
.hm-head .hm-weather-icon--fog   { color: #78818c; }
.hm-head .hm-weather-icon--rain  { color: #21607f; }
.hm-head .hm-weather-icon--snow  { color: #4a7f99; }
.hm-head .hm-weather-icon--storm { color: #6b4a86; }

/* High contrast: drop the tints back to ink, or the mode is undermined. */
body[data-contrast="high"] .hm-head .hm-weather-icon {
	color: var(--hm-ink);
}

@media (prefers-contrast: more) {
	body:not([data-contrast="normal"]) .hm-head .hm-weather-icon {
		color: var(--hm-ink);
	}
}

.hm-head .hm-weather-range {
	color: var(--hm-muted);
	white-space: nowrap;
}

.hm-head .hm-alert {
	color: var(--hm-red);
	font-weight: 600;
}

/* "Keresés" and "E-ügyintézés" are the masthead's only two actions, so they are
   buttons rather than links. Outlined rather than solid: they sit beside the
   coat of arms and two filled blocks there would pull rank on it. */
.hm-head .hm-mast-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	align-items: stretch;
	margin: 0;
}

/* --- The search field ----------------------------------------------------
   The input and its submit read as one control: the button carries no border
   of its own and sits inside the field's outline, so the pair is a single box
   the same height as the E-ügyintézés button beside it.
   ------------------------------------------------------------------------ */

.hm-head .hm-search {
	display: flex;
	align-items: stretch;
	border: 1px solid currentColor;
	color: var(--hm-ink);
	max-width: 100%;
}

.hm-head .hm-search:focus-within {
	outline: 2px solid var(--hm-red);
	outline-offset: 2px;
}

.hm-head .hm-search-field {
	flex: 1 1 auto;
	min-width: 0;
	width: 11ch;
	padding: 5px 4px 5px 10px;
	border: 0;
	background: transparent;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	line-height: 1.3;
	/* the wrapper draws the focus ring for the whole control */
	outline: none;
	/* Safari draws its own rounded box and an inner shadow on type=search */
	-webkit-appearance: none;
	appearance: none;
}

.hm-head .hm-search-field::placeholder {
	color: var(--hm-muted);
	opacity: 1;
}

/* Chrome's own clear button on type=search sits on the wrong ground here. */
.hm-head .hm-search-field::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.hm-head .hm-search-submit {
	flex: none;
	display: grid;
	place-items: center;
	padding: 0 9px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	line-height: 0;
	min-height: 0;
	box-shadow: none;
	transform: none;
}

.hm-head .hm-search-submit:hover {
	background: var(--hm-ink);
	color: var(--hm-paper);
}

.hm-head .hm-mast-btn {
	display: inline-block;
	padding: 5px 12px;
	border: 1px solid currentColor;
	color: var(--hm-ink);
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .12s ease, color .12s ease;
}

.hm-head .hm-mast-btn:hover,
.hm-head .hm-mast-btn:focus-visible {
	background: var(--hm-ink);
	color: var(--hm-paper);
	text-decoration: none;
}

/* mu-plugin 010 turns every "E-ügyintézés" link into a green pill with its own
   font, padding, shadow and a ::before icon. Those declarations carry
   !important, so each one has to be answered in kind — but the answer is now
   the button above rather than a plain link, so the values match .hm-mast-btn
   instead of stripping it back to nothing. */
.hm-head .hm-mast-links a.hernad-eugyintezes-btn {
	display: inline-block !important;
	min-height: 0 !important;
	padding: 5px 12px !important;
	border: 1px solid currentColor !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: var(--hm-ink) !important;
	font-family: inherit !important;
	font-size: inherit !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: inherit !important;
	text-decoration: none !important;
	transform: none !important;
}

.hm-head .hm-mast-links a.hernad-eugyintezes-btn:hover,
.hm-head .hm-mast-links a.hernad-eugyintezes-btn:focus-visible {
	background: var(--hm-ink) !important;
	color: var(--hm-paper) !important;
}

.hm-head .hm-mast-links a.hernad-eugyintezes-btn::before {
	content: none !important;
}

/* The wordmark is an <h1> on the front page and a <p> everywhere else, so the
   page's own title keeps the h1. Both are styled by the class, not the tag. */
.hm-head .hm-wordmark {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	font-size: calc(clamp(48px, 7vw, 96px) * var(--hm-scale, 1));
	font-weight: 700;
	line-height: .9;
	letter-spacing: -.02em;
}

.hm-head .hm-wordmark a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	color: inherit;
	text-decoration: none;
}

.hm-head .hm-wordmark a:hover,
.hm-head .hm-wordmark a:focus-visible {
	text-decoration: none;
}

.hm-head .hm-crest {
	display: block;
	flex: none;
	color: var(--hm-ink);
}

/* Sized in em against the wordmark, so it tracks both the clamp() and the
   accessibility text-size control. The arms are 2006x2549, so 0.787:1.

   The WIDTH is stated rather than left to `auto`. With `auto` the browser has
   no box for the crest until the SVG itself arrives, and on /albumok/ — where
   it queues behind 170 gallery images — it landed after first paint and pushed
   the whole page down: Lighthouse measured CLS 0.20 there against 0 on lighter
   pages. 1.05em x 0.787 = 0.826em reserves the exact space from the first
   frame, on any page, whatever the network does. */
.hm-head .hm-crest img {
	display: block;
	height: 1.05em;
	width: 0.826em;
	max-width: none;
}

.hm-head .hm-tagline {
	text-align: center;
	font-size: .833em;
	letter-spacing: .14em;
	text-transform: uppercase;
	margin-top: 6px;
	color: var(--hm-ink);
}

/* --- Navigation --------------------------------------------------------- */

.hm-head .hm-nav {
	border-bottom: 1px solid var(--hm-ink);
	padding: 12px var(--hm-gutter);
}

.hm-head .hm-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 34px;
	font-size: .889em;
	font-weight: 700;
}

.hm-head .hm-nav li {
	margin: 0;
}

.hm-head .hm-nav a.is-current {
	color: var(--hm-red);
}

/* Menu entries that exist only as a grouping label (url "#") — rendered as
   plain text rather than a link that goes nowhere. */
.hm-head .hm-nav-plain {
	color: var(--hm-muted);
	cursor: default;
}

/* ==========================================================================
   Direction C — "Zászló": the masthead as a banner
   --------------------------------------------------------------------------
   Switched with `wp option update hernad_colour_direction flag` (and back with
   `arms`); the body class comes from hernad_colour_direction() in
   inc/colour.php. Nothing here is a fork of the design — the palette and the
   eight Rovat colours are the same, this only spends them more boldly.

   The band is the DEEP azure #004a83, not #005ca1, and that is a contrast
   decision rather than a taste one: gold on #005ca1 is 4.20:1, which is large
   text only, while on #004a83 it is 5.55:1 and can carry the tagline. White on
   the deep band is 9.10:1.
   ========================================================================== */

body.hm-dir-flag .hm-head .hm-mast {
	background: var(--hm-azure-deep, #004a83);
	color: #ffffff;
	/* the double rule turns gold — the one place gold does structural work */
	border-bottom: 4px solid var(--hm-gold, #f8c301);
}

body.hm-dir-flag .hm-head .hm-mast-side,
body.hm-dir-flag .hm-head .hm-date,
body.hm-dir-flag .hm-head .hm-hours-today {
	color: rgba(255, 255, 255, .88);
}

body.hm-dir-flag .hm-head .hm-wordmark,
body.hm-dir-flag .hm-head .hm-wordmark a,
body.hm-dir-flag .hm-head .hm-weather {
	color: #ffffff;
}

body.hm-dir-flag .hm-head .hm-tagline {
	color: var(--hm-gold, #f8c301);
}

body.hm-dir-flag .hm-head .hm-weather-range {
	color: rgba(255, 255, 255, .8);
}

/* The alert is red on paper. Red on a blue band is both illegible and heraldic
   nonsense, so it takes the gold instead — still the loudest thing in the bar. */
body.hm-dir-flag .hm-head .hm-alert {
	color: var(--hm-gold, #f8c301);
	font-weight: 700;
}

/* Every weather condition goes to one colour here: the tinted line art was
   tuned for a paper ground and the muted tones disappear on deep blue. */
body.hm-dir-flag .hm-head .hm-weather-icon,
body.hm-dir-flag .hm-head .hm-weather-icon--sun,
body.hm-dir-flag .hm-head .hm-weather-icon--moon,
body.hm-dir-flag .hm-head .hm-weather-icon--cloud,
body.hm-dir-flag .hm-head .hm-weather-icon--fog,
body.hm-dir-flag .hm-head .hm-weather-icon--rain,
body.hm-dir-flag .hm-head .hm-weather-icon--snow,
body.hm-dir-flag .hm-head .hm-weather-icon--storm {
	color: var(--hm-gold, #f8c301);
}

/* Every <p> in the band, not just the ones named above. The base reset in this
   file sets `.hm-head p { color: var(--hm-ink) }`, so any paragraph not listed
   explicitly stays ink — which put the "Keresés · E-ügyintézés" line at 1.99:1
   on the blue. Colouring the container catches them all. */
body.hm-dir-flag .hm-head .hm-mast p {
	color: rgba(255, 255, 255, .88);
}

/* The buttons outline themselves in `currentColor`, so making the text white is
   enough to make the whole button white against the band. */
body.hm-dir-flag .hm-head .hm-mast-links a {
	color: #ffffff;
}

body.hm-dir-flag .hm-head .hm-mast-btn:hover,
body.hm-dir-flag .hm-head .hm-mast-btn:focus-visible,
body.hm-dir-flag .hm-head .hm-mast-links a.hernad-eugyintezes-btn:hover,
body.hm-dir-flag .hm-head .hm-mast-links a.hernad-eugyintezes-btn:focus-visible {
	background: #ffffff !important;
	color: var(--hm-azure-deep, #004a83) !important;
}

/* The search field on the band: white outline and white type, with a
   placeholder light enough to read on deep azure — #c8d9e8 measures 6.30:1,
   where plain white would be 9.10:1 but would look like typed-in text. */
body.hm-dir-flag .hm-head .hm-search {
	color: #ffffff;
}

body.hm-dir-flag .hm-head .hm-search-field::placeholder {
	color: #c8d9e8;
}

body.hm-dir-flag .hm-head .hm-search:focus-within {
	outline-color: var(--hm-gold, #f8c301);
}

body.hm-dir-flag .hm-head .hm-search-submit:hover {
	background: #ffffff;
	color: var(--hm-azure-deep, #004a83);
}

/* mu-plugin 010 styles this link as a green pill; the reset that undoes that
   uses `color: inherit !important`, which outranks the rule above. Matching its
   specificity and importance is the only way to reach it. */
body.hm-dir-flag .hm-head .hm-mast-links a.hernad-eugyintezes-btn {
	color: #ffffff !important;
}

body.hm-dir-flag .hm-head .hm-sep {
	color: rgba(255, 255, 255, .45);
}

/* The arms are azure with a gold band — on an azure banner the shield's own
   field would merge into the background and only the black outline would hold
   it together. A paper plaque behind it keeps the heraldry legible and reads
   as a badge pinned to the banner, which is the honest way to place a coat of
   arms on a coloured field. */
body.hm-dir-flag .hm-head .hm-crest {
	background: var(--hm-paper);
	padding: 6px 8px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}

/* Focus rings have to be visible against the band, not against paper. */
body.hm-dir-flag .hm-head .hm-mast :focus-visible {
	outline-color: var(--hm-gold, #f8c301);
}

/* The navigation stays on paper — a second full-width colour band would bury
   the masthead it is meant to sit under — but picks up a gold rule to tie it
   to the banner. */
body.hm-dir-flag .hm-head .hm-nav {
	border-bottom: 3px solid var(--hm-gold, #f8c301);
}

/* Solid buttons rather than outlined ones. */
body.hm-dir-flag .hm-btn,
body.hm-dir-flag .hm-cta {
	background: var(--hm-green);
	border-color: var(--hm-green);
	color: #ffffff;
}

/* High contrast wins over the direction, always. The whole point of that mode
   is that nothing depends on hue, so the banner reverts to ink on paper and
   the gold rules become ink. */
body[data-contrast="high"].hm-dir-flag .hm-head .hm-mast {
	background: var(--hm-paper);
	color: var(--hm-ink);
	border-bottom: 3px double var(--hm-ink);
}

/* The E-ügyintézés link is not listed here on purpose: the mu-plugin reset
   pins it to `color: inherit !important`, which no plain rule can outrank, so
   it takes its colour from the <p> above — which this rule turns to ink. */
body[data-contrast="high"].hm-dir-flag .hm-head .hm-mast p,
body[data-contrast="high"].hm-dir-flag .hm-head .hm-mast-side,
body[data-contrast="high"].hm-dir-flag .hm-head .hm-date,
body[data-contrast="high"].hm-dir-flag .hm-head .hm-hours-today,
body[data-contrast="high"].hm-dir-flag .hm-head .hm-wordmark,
body[data-contrast="high"].hm-dir-flag .hm-head .hm-wordmark a,
body[data-contrast="high"].hm-dir-flag .hm-head .hm-weather,
body[data-contrast="high"].hm-dir-flag .hm-head .hm-tagline,
body[data-contrast="high"].hm-dir-flag .hm-head .hm-alert,
body[data-contrast="high"].hm-dir-flag .hm-head .hm-mast-links a,
body[data-contrast="high"].hm-dir-flag .hm-head .hm-weather-icon {
	color: var(--hm-ink);
}

body[data-contrast="high"].hm-dir-flag .hm-head .hm-search {
	color: var(--hm-ink);
}

body[data-contrast="high"].hm-dir-flag .hm-head .hm-search-field::placeholder {
	color: var(--hm-muted);
}

body[data-contrast="high"].hm-dir-flag .hm-head .hm-crest {
	background: none;
	padding: 0;
	box-shadow: none;
}

body[data-contrast="high"].hm-dir-flag .hm-head .hm-nav {
	border-bottom-color: var(--hm-ink);
}

/* NOT tinted, deliberately: the funding bar. The Széchenyi and EU marks have
   presentation rules attached to the funding, and are drawn for a white field.
   Putting them on a coloured band risks breaching that for decoration. */

/* --- Kadence's own header ------------------------------------------------
   On every page except the Hírmondó template, Kadence still renders #masthead
   right after this one. The body class is added in functions.php so the rule
   cannot accidentally fire on the front page, where #masthead does not exist
   at all. `display: none` rather than removing the header in PHP: Kadence's
   header markup carries the mobile nav and search that other code may look
   for, and the flat wrapping .hm-nav above already covers small screens.
   -------------------------------------------------------------------------- */

body.hm-shared-head #masthead {
	display: none !important;
}

/* Kadence prints its own skip link, in English ("Skip to content") on a
   Hungarian site, and the masthead above now supplies a working Hungarian one.
   Two skip links is one too many for a keyboard user tabbing in, so the
   English one goes. */
body.hm-shared-head #wrapper > .skip-link {
	display: none !important;
}

/* Kadence runs these pages with `transparent-header`, where the header floats
   over the content, and mu-plugin `hernad-transparent-header-offset` pushes the
   content back down with
   `body.transparent-header:not(.home) main.wrap { padding-top: var(--hernad-header-h, 131px) }`.
   With #masthead hidden there is nothing to clear, so that 131px was simply a
   band of empty page between the navigation rule and the title.

   The mu-plugin is left alone — it is still correct for any context where
   Kadence's header renders. The offset is just cancelled where we replaced it. */
body.hm-shared-head #inner-wrap,
body.hm-shared-head main.wrap {
	padding-top: 0 !important;
}

/* Same story one level down: the first content block carries its own leading
   margin (52px, 84px under 700px), which was also there to clear the floating
   header. Stacked on the padding below it that came to 108px of empty page on
   a phone, before a single word of the article.

   `html body...` and !important are both required, not decoration. FOUR
   mu-plugins set this margin — hernad-municipal-hard-style,
   onkormanyzat-card-fix-css, onkormanyzat-final-style and
   hernad-municipal-style-extend — each as
   `body.page .hernad-muni-page-restored { margin-top: 52px !important }`.
   That is (0,3,0) with !important and prints after this file, so anything
   short of (0,3,1)-plus-!important loses on source order. */
html body.hm-shared-head .entry-content > *:first-child,
html body.hm-shared-head .entry-content-wrap > *:first-child {
	margin-top: 0 !important;
}

/* With those two compensations gone the gap is Kadence's own 32px, which is
   tight under a 56px page title and the masthead's double rule. This sets the
   spacing deliberately instead of inheriting whatever is left over. */
body.hm-shared-head .entry-content-wrap {
	padding-top: 48px;
}

@media (max-width: 767px) {
	body.hm-shared-head .entry-content-wrap {
		padding-top: 32px;
	}
}

/* --- The page-title band ------------------------------------------------
   Kadence gives `.entry-header` inside the hero `min-height: 200px` and
   centres the title in it. The title itself, with its underline rule, is about
   104px, so 96px of the band is empty — on top of the masthead above it and
   the content padding below it, that is the gap that made every subpage open
   with a screenful of nothing.

   Sized to its content instead, with padding that is stated rather than left
   over. Measured on /emberek/: 200px band -> 130px, and the first content sits
   178px below the masthead instead of 248px.
   ------------------------------------------------------------------------ */

body.hm-shared-head .entry-hero .entry-header {
	min-height: 0;
	padding: 22px 0 18px;
}

/* The h1's own 34px top margin was there to push the title down inside the
   200px band; the band no longer needs it. Kept as a small optical lead-in.
   (0,3,1) with the tag, so it outranks the mu-plugins' `.page .entry-title`. */
body.hm-shared-head .entry-hero .entry-header h1.entry-title {
	margin-top: 0;
	margin-bottom: 6px;
}

@media (max-width: 767px) {
	body.hm-shared-head .entry-hero .entry-header {
		padding: 16px 0 14px;
	}
}

/* On the 179 pages whose content opens with the page title AS A HEADING, this
   band is that title a second time. The whole hero goes, not just the h1: an
   empty 128px band would be the gap all over again. The list lives in
   functions.php — `hernad_pages_with_own_title()` — along with the reasoning
   for why it has to be a list and not a rule. */
body.hm-shared-head.hm-own-title .entry-hero {
	display: none;
}

/* The nine pages whose visible title is a styled <p>/<div>/<strong> rather than
   a heading. `display: none` would take the page's only <h1> out of the
   accessibility tree along with it, so the hero is hidden from the screen and
   kept for screen readers — the page keeps exactly one h1, and sighted readers
   see the title once. `hernad_pages_with_unmarked_title()` lists them. */
body.hm-shared-head.hm-own-title-unmarked .entry-hero {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* The text-size buttons have to move subpage content too — a control that only
   resized the header strip above the article would be worse than none.
   Scaling the root font size does nothing here: Kadence and the mu-plugins
   size everything in px and vw (the page title is `clamp(42px, 4vw, 56px)`),
   so rem never enters into it. `zoom` does what the reader actually wants —
   it reflows the layout at a larger size, exactly like browser zoom, instead
   of transform-scaling a fixed-width page into a horizontal scrollbar.

   Applied to #wrapper, not <body>: the sticky funding bar is a direct child of
   <body> and must keep its own scale and its fixed positioning. --hm-scale
   defaults to 1, so this is inert until a button is pressed. */
body.hm-shared-head #wrapper {
	zoom: var(--hm-scale, 1);
}

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 767px) {
	.hm-head {
		--hm-gutter: 20px;

		font-size: calc(17px * var(--hm-scale, 1));
	}

	.hm-head .hm-a11y {
		justify-content: flex-start;
	}

	.hm-head .hm-mast {
		grid-template-columns: 1fr;
		text-align: center;
		gap: 10px;
	}

	.hm-head .hm-mast-right {
		text-align: center;
	}

	/* The masthead centres on phones, so the two action buttons do too. */
	.hm-head .hm-mast-links {
		justify-content: center;
	}

	/* The masthead centres on phones, so the flex weather line must too. */
	.hm-head .hm-weather {
		justify-content: center;
	}

	.hm-head .hm-mast-left {
		order: 2;
	}

	.hm-head .hm-mast-centre {
		order: 1;
	}

	.hm-head .hm-mast-right {
		order: 3;
	}

	.hm-head .hm-nav ul {
		justify-content: flex-start;
		gap: 10px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hm-head * {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}
