/*
Theme Name: KőszeghyArt — Kartográf
Theme URI: https://koszeghy.art/
Author: KőszeghyArt Tervezők Bt.
Description: Önálló, keretrendszer-mentes WordPress sablon a KőszeghyArt Tervezők Bt. részére. Térképészeti-intézményi formanyelv, saját kiszolgálású betűtípusok, JavaScript-függőségek nélkül. Standalone WordPress theme — no Fresh Framework, no WPBakery, no jQuery, no Bootstrap.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: koszeghyart
Tags: two-columns, custom-menu, custom-logo, translation-ready, accessibility-ready, block-styles, wide-blocks
*/

/* ==========================================================================
   0. FONTS — self-hosted, no third-party requests (GDPR-friendly)
   ========================================================================== */

@font-face {
	font-family: "Instrument Sans";
	src: url("assets/fonts/instrument-sans-var.woff2") format("woff2-variations");
	font-weight: 400 700;
	font-stretch: 75% 100%;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+2000-206F, U+20A0-20BF, U+2122, U+2212;
}

@font-face {
	font-family: "Instrument Sans";
	src: url("assets/fonts/instrument-sans-italic-var.woff2") format("woff2-variations");
	font-weight: 400 700;
	font-stretch: 75% 100%;
	font-style: italic;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+2000-206F, U+20A0-20BF, U+2122, U+2212;
}

@font-face {
	font-family: "JetBrains Mono";
	src: url("assets/fonts/jetbrains-mono-var.woff2") format("woff2-variations");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0100-017F, U+2000-206F, U+20A0-20BF;
}

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
	color-scheme: light dark;

	/* Paper & ink — a warm surveyor's paper, not white */
	--paper:       #FBFAF6;
	--paper-2:     #F4F1E9;
	--paper-3:     #EAE6D9;
	--ink:         #15171B;
	--ink-2:       #3E434B;
	--ink-3:       #62686F;

	/* Hairlines — the whole system is drawn, not boxed */
	--rule:        #DBD6C8;
	--rule-2:      #C0BAA8;
	--rule-faint:  #F1EDE3;

	/* Accents */
	--accent:      #A93F17;   /* surveyor orange */
	--accent-2:    #8A3211;
	--blue:        #1B4A66;   /* cadastral blue */
	--on-accent:   #FFFBF7;

	--focus:       #A93F17;

	/* Type */
	--font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--step--1: clamp(0.82rem, 0.80rem + 0.10vw, 0.875rem);
	--step-0:  clamp(1.00rem, 0.97rem + 0.16vw, 1.09rem);
	--step-1:  clamp(1.15rem, 1.09rem + 0.30vw, 1.33rem);
	--step-2:  clamp(1.35rem, 1.22rem + 0.62vw, 1.75rem);
	--step-3:  clamp(1.60rem, 1.34rem + 1.28vw, 2.45rem);
	--step-4:  clamp(1.95rem, 1.45rem + 2.45vw, 3.40rem);
	--step-5:  clamp(2.45rem, 1.45rem + 4.90vw, 5.40rem);

	--mono-cap: 0.735rem;

	/* Space & measure */
	--wrap: 1220px;
	--gutter: clamp(1.15rem, 4vw, 3.25rem);
	--section-y: clamp(3.5rem, 7vw, 7rem);
	--measure: 68ch;

	--grid-size: 46px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--paper:       #101215;
		--paper-2:     #171A1F;
		--paper-3:     #1F2329;
		--ink:         #EFECE4;
		--ink-2:       #B7B3A9;
		--ink-3:       #8C8880;
		--rule:        #2C3037;
		--rule-2:      #3C4149;
		--rule-faint:  #191C21;
		--accent:      #E98254;
		--accent-2:    #F49B72;
		--blue:        #86BFDE;
		--on-accent:   #15171B;
		--focus:       #E98254;
	}
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 6rem;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

body {
	margin: 0;
	background-color: var(--paper);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: var(--step-0);
	line-height: 1.62;
	font-synthesis-weight: none;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;

	/* The survey grid — the quietest possible nod to what this firm does */
	background-image:
		linear-gradient(to right,  var(--rule-faint) 1px, transparent 1px),
		linear-gradient(to bottom, var(--rule-faint) 1px, transparent 1px);
	background-size: var(--grid-size) var(--grid-size);
	background-position: center top;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.5em;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.021em;
	text-wrap: balance;
	overflow-wrap: break-word;
	hyphens: auto;              /* Hungarian compounds are long */
	-webkit-hyphens: auto;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p, li { text-wrap: pretty; }
p { margin: 0 0 1.15em; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }

:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 3px;
	border-radius: 2px;
}

::selection { background: var(--accent); color: var(--on-accent); }

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 2.5rem 0;
}

/* ==========================================================================
   3. LAYOUT PRIMITIVES
   ========================================================================== */

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--ink);
	color: var(--paper);
	padding: 0.7rem 1.1rem;
	font: 500 var(--step--1)/1 var(--font-sans);
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

/* Mono "plan sheet" label — used for eyebrows, years, sheet numbers */
.mono {
	font-family: var(--font-mono);
	font-size: var(--mono-cap);
	font-weight: 500;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
	color: var(--ink-3);
}

/* ==========================================================================
   4. HEADER — coordinate strip + masthead
   ========================================================================== */

.coordbar {
	border-bottom: 1px solid var(--rule);
	background: var(--paper-2);
}
.coordbar__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.6rem;
	align-items: center;
	justify-content: space-between;
	min-height: 2.35rem;
	padding-block: 0.35rem;
}
.coordbar a { color: inherit; text-decoration: none; }
.coordbar a:hover { color: var(--accent); text-decoration: underline; }
.coordbar__set { display: flex; flex-wrap: wrap; gap: 0.35rem 1.35rem; }
@media (max-width: 640px) {
	.coordbar__geo { display: none; }
}

.masthead {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--paper) 88%, transparent);
	backdrop-filter: saturate(160%) blur(9px);
	-webkit-backdrop-filter: saturate(160%) blur(9px);
	border-bottom: 1px solid var(--rule);
}
@supports not (backdrop-filter: blur(1px)) {
	.masthead { background: var(--paper); }
}

.masthead__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 4.4rem;
}

/* Wordmark with a survey benchmark cross */
.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	text-decoration: none;
	color: var(--ink);
	font-weight: 700;
	font-size: 1.14rem;
	letter-spacing: 0.005em;
	line-height: 1;
	flex-shrink: 0;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 22px; height: 22px; color: var(--accent); flex: none; }
.brand em { font-style: normal; color: var(--accent); }
.brand img { max-height: 40px; width: auto; }

/* Navigation */
.nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.15rem;
	margin: 0;
	padding: 0;
}
.nav a {
	display: block;
	padding: 0.5rem 0.72rem;
	color: var(--ink-2);
	text-decoration: none;
	font-size: var(--step--1);
	font-weight: 500;
	letter-spacing: 0.005em;
	border-bottom: 2px solid transparent;
	transition: color 0.15s, border-color 0.15s;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule-2); }
.nav .current-menu-item > a,
.nav .current_page_item > a,
.nav .current-menu-ancestor > a,
.nav .current-post-ancestor > a {
	color: var(--ink);
	border-bottom-color: var(--accent);
}

/* Sub-menus */
.nav li { position: relative; }
.nav ul ul {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 15rem;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	background: var(--paper);
	border: 1px solid var(--rule);
	padding: 0.3rem;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.nav li:hover > ul,
.nav li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
.nav ul ul a { border-bottom: 0; padding: 0.5rem 0.65rem; }
.nav ul ul a:hover { background: var(--paper-2); }

/* Mobile toggle */
.nav-toggle {
	display: none;
	align-items: center;
	gap: 0.55rem;
	background: none;
	border: 1px solid var(--ink-3);
	color: var(--ink);
	font: 500 var(--mono-cap)/1 var(--font-mono);
	letter-spacing: 0.11em;
	text-transform: uppercase;
	padding: 0.6rem 0.85rem;
	cursor: pointer;
}
.nav-toggle__bars { width: 15px; height: 9px; position: relative; flex: none; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: ""; position: absolute; left: 0; right: 0; height: 1.5px;
	background: currentColor; transition: transform 0.2s, top 0.2s;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after  { top: 7.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { top: 4px; transform: rotate(-45deg); }

@media (max-width: 900px) {
	.nav-toggle { display: inline-flex; }
	.nav {
		display: none;
		position: absolute;
		left: 0; right: 0; top: 100%;
		background: var(--paper);
		border-bottom: 1px solid var(--rule);
		padding: 0.6rem var(--gutter) 1.2rem;
		box-shadow: 0 18px 30px -22px rgb(0 0 0 / 0.35);
	}
	.masthead__inner { position: relative; }
	.nav.is-open { display: block; }
	.nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.nav a {
		padding: 0.85rem 0;
		font-size: var(--step-0);
		border-bottom: 1px solid var(--rule-faint);
	}
	.nav .current-menu-item > a { border-bottom-color: var(--accent); }
	.nav ul ul {
		position: static; opacity: 1; visibility: visible; transform: none;
		border: 0; padding: 0 0 0 1rem; min-width: 0; background: none;
	}
}

/* ==========================================================================
   5. HERO
   ========================================================================== */

.hero {
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid var(--rule);
	padding-block: clamp(3.25rem, 8vw, 7.5rem) clamp(2.5rem, 4.5vw, 4rem);
	isolation: isolate;
}
.hero__contours {
	position: absolute;
	inset: -12% -6% auto -6%;
	z-index: -1;
	color: var(--rule-2);
	opacity: 0.55;
	pointer-events: none;
	-webkit-mask-image: radial-gradient(120% 95% at 50% 32%, #000 34%, transparent 82%);
	        mask-image: radial-gradient(120% 95% at 50% 32%, #000 34%, transparent 82%);
}
.hero__contours svg { width: 100%; height: auto; }
@media (prefers-color-scheme: dark) { .hero__contours { opacity: 0.75; } }

.hero__eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem 0.9rem;
	margin-bottom: clamp(1.1rem, 2.5vw, 1.9rem);
}
.hero__eyebrow::after {
	content: "";
	flex: 1 1 3rem;
	height: 1px;
	background: var(--rule-2);
	min-width: 2rem;
}

.hero__title {
	font-size: var(--step-5);
	font-weight: 700;
	letter-spacing: -0.032em;
	line-height: 0.98;
	margin: 0 0 clamp(1.1rem, 2.6vw, 1.9rem);
	max-width: 16ch;
}
.hero__title em { font-style: normal; color: var(--accent); }

.hero__lede {
	font-size: var(--step-1);
	line-height: 1.5;
	color: var(--ink-2);
	max-width: 52ch;
	margin: 0 0 clamp(1.8rem, 4vw, 2.8rem);
}

.hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 clamp(1.5rem, 4vw, 3.25rem);
	border-top: 1px solid var(--rule);
	padding-top: 1.1rem;
}
.hero__meta div { padding-block: 0.35rem; }
.hero__meta dt { margin-bottom: 0.3rem; }
.hero__meta dd {
	margin: 0;
	font-size: var(--step-0);
	font-weight: 500;
	color: var(--ink);
}

/* ==========================================================================
   6. SECTIONS — plan-sheet header rows
   ========================================================================== */

.section { padding-block: var(--section-y); border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: 0; }
.section--tint { background: var(--paper-2); }

.section__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.7rem;
	align-items: baseline;
	padding-bottom: 1.15rem;
	margin-bottom: clamp(1.75rem, 4vw, 3rem);
	border-bottom: 1px solid var(--rule-2);
}
@media (min-width: 720px) {
	.section__head { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0 1.5rem; }
}
.section__no { color: var(--accent); }
.section__title { margin: 0; font-size: var(--step-3); }
.section__intro {
	grid-column: 1 / -1;
	margin: 0.4rem 0 0;
	color: var(--ink-2);
	max-width: var(--measure);
}
@media (min-width: 720px) { .section__intro { grid-column: 2; } }

/* Two-column: sticky heading left, prose right */
.split { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); }
@media (min-width: 900px) {
	.split { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); }
	.split__aside { position: sticky; top: 7rem; align-self: start; }
}

/* ==========================================================================
   7. RULED LISTS — services & activities (no cards, no shadows)
   ========================================================================== */

.ruled { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ruled > li {
	display: grid;
	grid-template-columns: 3.1rem minmax(0, 1fr);
	gap: 0 1rem;
	align-items: start;
	padding-block: clamp(0.95rem, 2vw, 1.35rem);
	border-bottom: 1px solid var(--rule);
	transition: background-color 0.18s;
}
.ruled > li:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.ruled__no { color: var(--accent); padding-top: 0.32em; }
.ruled__body > :last-child { margin-bottom: 0; }
.ruled__title {
	margin: 0;
	font-size: var(--step-1);
	font-weight: 600;
	letter-spacing: -0.012em;
	line-height: 1.3;
}
.ruled__desc { margin: 0.35rem 0 0; color: var(--ink-2); font-size: var(--step--1); max-width: 62ch; }

/* Compact two-up ruled list for the activities column */
.ruled--tight > li { grid-template-columns: 1.9rem minmax(0, 1fr); padding-block: 0.72rem; }
.ruled--tight .ruled__title { font-size: var(--step-0); font-weight: 500; }
@media (min-width: 820px) {
	.ruled--2col { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(1.5rem, 4vw, 3rem); border-top: 0; }
	.ruled--2col > li { border-top: 1px solid var(--rule); border-bottom: 0; }
}

/* ==========================================================================
   8. REFERENCE INDEX — year gutter, ruled rows
   ========================================================================== */

.refs { border-top: 1px solid var(--rule-2); }

.refs__year {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	border-bottom: 1px solid var(--rule);
}
@media (min-width: 760px) {
	.refs__year { grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0 1.75rem; }
}

.refs__label {
	margin: 0;
	padding-block: clamp(1rem, 2.4vw, 1.6rem) 0.35rem;
	font-family: var(--font-mono);
	font-size: 1.02rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--accent);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}
@media (min-width: 760px) {
	.refs__label { position: sticky; top: 6.5rem; align-self: start; padding-block: clamp(1rem, 2.4vw, 1.6rem); }
}

.refs__list { list-style: none; margin: 0; padding: 0 0 clamp(0.9rem, 2.2vw, 1.5rem); }
@media (min-width: 760px) { .refs__list { padding-top: clamp(1rem, 2.4vw, 1.6rem); } }

.refs__list li {
	position: relative;
	padding: 0.42rem 0 0.42rem 1.3rem;
	color: var(--ink-2);
	font-size: var(--step--1);
	line-height: 1.5;
	break-inside: avoid;
}
.refs__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.92em;
	width: 0.55rem;
	height: 1px;
	background: var(--rule-2);
}
.refs__list li strong { color: var(--ink); font-weight: 600; }
@media (min-width: 1040px) {
	.refs__list { columns: 2; column-gap: clamp(1.5rem, 3vw, 2.75rem); }
}

/* ==========================================================================
   9. PROSE — everything the editor outputs, styled by default
   ========================================================================== */

.prose { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose h2 { font-size: var(--step-2); margin-top: 2.2em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.9em; }
.prose h4 { font-size: var(--step-0); margin-top: 1.7em; text-transform: none; }

.prose ul, .prose ol { margin: 0 0 1.25em; padding-left: 1.15rem; }
.prose li { margin-bottom: 0.4em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 1.3rem; }
.prose ul > li::before {
	content: "";
	position: absolute;
	left: 0; top: 0.86em;
	width: 0.6rem; height: 1px;
	background: var(--accent);
}
.prose ol { list-style: none; counter-reset: p; padding-left: 0; }
.prose ol > li { position: relative; padding-left: 2.1rem; counter-increment: p; }
.prose ol > li::before {
	content: counter(p, decimal-leading-zero);
	position: absolute; left: 0; top: 0.16em;
	font: 500 var(--mono-cap)/1.6 var(--font-mono);
	color: var(--accent);
	letter-spacing: 0.06em;
}

.prose blockquote {
	margin: 1.9em 0;
	padding: 0.2rem 0 0.2rem 1.4rem;
	border-left: 2px solid var(--accent);
	font-size: var(--step-1);
	line-height: 1.5;
	color: var(--ink);
}
.prose blockquote cite { display: block; margin-top: 0.7rem; font: 500 var(--mono-cap)/1.4 var(--font-mono); letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink-3); font-style: normal; }

.prose code, .prose kbd { font-family: var(--font-mono); font-size: 0.88em; background: var(--paper-3); padding: 0.12em 0.35em; }
.prose pre { background: var(--paper-3); padding: 1rem 1.15rem; overflow-x: auto; border-left: 2px solid var(--rule-2); }
.prose pre code { background: none; padding: 0; }

.prose img, .prose figure { margin-block: 2em; }
.prose figcaption { margin-top: 0.6rem; font: 500 var(--mono-cap)/1.5 var(--font-mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }

.prose table { width: 100%; border-collapse: collapse; margin: 1.9em 0; font-size: var(--step--1); }
.prose th, .prose td { text-align: left; padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font: 500 var(--mono-cap)/1.5 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); border-bottom-color: var(--rule-2); }

/* Plan-sheet numbering: existing editor <h2>s become §01, §02… with a rule.
   Nothing has to be re-authored — the counter does the work. */
.prose--sheets { max-width: none; counter-reset: sheet; }
.prose--sheets > :not(h2) { max-width: var(--measure); }

.prose--sheets > h2 {
	counter-increment: sheet;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.55rem;
	align-items: baseline;
	max-width: none;
	margin-top: clamp(3rem, 6vw, 5.5rem);
	margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
	padding-bottom: 1.05rem;
	border-bottom: 1px solid var(--rule-2);
	font-size: var(--step-3);
}
.prose--sheets > h2:first-child { margin-top: 0; }
.prose--sheets > h2::before {
	content: "§ " counter(sheet, decimal-leading-zero);
	font: 500 var(--mono-cap)/1.6 var(--font-mono);
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--accent);
	font-variant-numeric: tabular-nums;
}
@media (min-width: 720px) {
	.prose--sheets > h2 { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0 1.5rem; }
	/* Body copy sits in the same column as the heading text, so the sheet
	   numbers form a single continuous rail down the left edge. */
	.prose--sheets > :not(h2) { margin-left: 7rem; }
}

/* Subsection headings inside a sheet */
.prose--sheets > h3 {
	font-size: var(--step-1);
	font-weight: 600;
	margin-top: 2.1em;
	margin-bottom: 0.75em;
}

/* Reference years — a cartographic label, not a heading */
.kart-year {
	font-family: var(--font-mono);
	font-size: 1.02rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--accent);
	font-variant-numeric: tabular-nums;
	margin: 2.4em 0 0.85em;
	padding-top: 0.9rem;
	border-top: 1px solid var(--rule-2);
	line-height: 1;
}
.kart-year:first-child { margin-top: 0; }
.prose--sheets > .kart-year { max-width: none; }  /* rule spans the full content column */

/* Long year lists breathe better in columns on wide screens */
@media (min-width: 1040px) {
	.prose--sheets > .kart-year + ul { columns: 2; column-gap: clamp(1.5rem, 3vw, 2.75rem); max-width: none; }
	.prose--sheets > .kart-year + ul > li { break-inside: avoid; }
}

/* Reference-list page template: h3 years become mono labels automatically */
.prose--refs h3 {
	font-family: var(--font-mono);
	font-size: 1.02rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--accent);
	text-transform: none;
	margin-top: 2.4em;
	padding-top: 0.9rem;
	border-top: 1px solid var(--rule-2);
}
.prose--refs { max-width: none; }
@media (min-width: 1040px) { .prose--refs ul { columns: 2; column-gap: 2.75rem; } .prose--refs li { break-inside: avoid; } }

/* WordPress alignment + block defaults */
.alignleft  { float: left;  margin: 0.4em 1.6em 1.2em 0; }
.alignright { float: right; margin: 0.4em 0 1.2em 1.6em; }
.aligncenter { margin-inline: auto; }
.alignwide, .alignfull { max-width: none; }
.alignfull { margin-inline: calc(50% - 50vw); width: 100vw; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-block-image figcaption { font: 500 var(--mono-cap)/1.5 var(--font-mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); margin-top: 0.6rem; }
.sticky .entry__title::after { content: " ●"; color: var(--accent); }

/* ==========================================================================
   10. BUTTONS & FORMS
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.78rem 1.35rem;
	border: 1px solid var(--ink);
	background: var(--ink);
	color: var(--paper);
	font: 500 var(--step--1)/1.2 var(--font-sans);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.16s, border-color 0.16s, color 0.16s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--ghost { background: none; color: var(--ink); border-color: var(--ink-3); }
.btn--ghost:hover { background: none; border-color: var(--accent); color: var(--accent); }
.btn__arrow { transition: transform 0.16s; }
.btn:hover .btn__arrow { transform: translateX(3px); }

input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="search"], input[type="number"], input[type="password"], textarea, select {
	width: 100%;
	padding: 0.7rem 0.85rem;
	font: inherit;
	font-size: var(--step--1);
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--ink-3);
	border-radius: 0;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--accent); }
label { display: block; margin-bottom: 0.4rem; font: 500 var(--mono-cap)/1.5 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

.search-form { display: flex; gap: 0.5rem; }
.search-form label { flex: 1; margin: 0; }

/* ==========================================================================
   11. ARCHIVE / POST LISTS — ruled rows, not cards
   ========================================================================== */

.entries { border-top: 1px solid var(--rule-2); }

.entry-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.5rem 1.75rem;
	padding-block: clamp(1.4rem, 3vw, 2.1rem);
	border-bottom: 1px solid var(--rule);
}
@media (min-width: 780px) {
	.entry-row { grid-template-columns: 8.5rem minmax(0, 1fr) minmax(0, 14rem); align-items: start; }
	.entry-row--nothumb { grid-template-columns: 8.5rem minmax(0, 1fr); }
}
.entry-row__date { padding-top: 0.4rem; }
.entry-row__title { margin: 0 0 0.45rem; font-size: var(--step-2); letter-spacing: -0.018em; }
.entry-row__title a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.25s; }
.entry-row__title a:hover { color: var(--accent); background-size: 100% 1px; }
.entry-row__excerpt { margin: 0; color: var(--ink-2); font-size: var(--step--1); max-width: 62ch; }
.entry-row__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(1) contrast(1.03); transition: filter 0.3s; }
.entry-row:hover .entry-row__thumb img { filter: none; }
.entry-row__terms { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; }
.entry-row__terms a { color: var(--ink-3); text-decoration: none; font: 500 var(--mono-cap)/1.5 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.entry-row__terms a:hover { color: var(--accent); }

/* Single post */
.entry-header { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--rule); }
.entry-header__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-bottom: 1.1rem; }
.entry-header__title { margin: 0; max-width: 22ch; }
.entry-thumb { margin-block: clamp(2rem, 4vw, 3rem); }
.entry-thumb img { width: 100%; }

.pagination { display: flex; flex-wrap: wrap; gap: 0.4rem; padding-block: clamp(2rem, 4vw, 3rem); }
.pagination .page-numbers {
	display: grid; place-items: center;
	min-width: 2.6rem; height: 2.6rem; padding-inline: 0.6rem;
	border: 1px solid var(--ink-3); color: var(--ink-2);
	font: 500 var(--mono-cap)/1 var(--font-mono); letter-spacing: 0.08em;
	text-decoration: none;
}
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.post-nav { display: grid; gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
@media (min-width: 720px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a { display: block; padding: clamp(1.2rem, 3vw, 2rem) 0; background: var(--paper); color: var(--ink); text-decoration: none; }
.post-nav a:hover .post-nav__title { color: var(--accent); }
.post-nav__title { display: block; margin-top: 0.5rem; font-size: var(--step-1); font-weight: 600; letter-spacing: -0.012em; }
.post-nav > :last-child { padding-left: clamp(1.2rem, 3vw, 2rem); }

/* ==========================================================================
   12. CONTACT BLOCK
   ========================================================================== */

.contact-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 820px) { .contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.contact-card { border-top: 1px solid var(--rule-2); padding-top: 1.15rem; }
.contact-card dl { margin: 0; }
.contact-card dt { margin-bottom: 0.6rem; }
.contact-card dd { margin: 0; font-size: var(--step-1); font-weight: 500; letter-spacing: -0.01em; line-height: 1.35; }
.contact-card dd a { color: var(--ink); text-decoration: none; }
.contact-card dd a:hover { color: var(--accent); }

/* ==========================================================================
   13. FOOTER
   ========================================================================== */

.site-footer {
	background: #14161A;
	color: #E7E3DA;
	border-top: 1px solid var(--rule);
	background-image:
		linear-gradient(to right,  rgb(255 255 255 / 0.035) 1px, transparent 1px),
		linear-gradient(to bottom, rgb(255 255 255 / 0.035) 1px, transparent 1px);
	background-size: var(--grid-size) var(--grid-size);
}
.site-footer a { color: #E7E3DA; text-decoration: none; }
.site-footer a:hover { color: #E98254; text-decoration: underline; }
.site-footer .mono { color: #8D887E; }

.footer__main {
	display: grid;
	gap: clamp(1.75rem, 4vw, 3.5rem);
	padding-block: clamp(2.75rem, 6vw, 5rem);
}
@media (min-width: 820px) { .footer__main { grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr)); } }

.footer__brand { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 700; font-size: 1.14rem; margin-bottom: 1rem; }
.footer__brand .brand__mark { color: #E98254; }
.footer__brand em { font-style: normal; color: #E98254; }
.footer__blurb { color: #A9A49A; font-size: var(--step--1); max-width: 40ch; margin: 0; }

.footer__list { list-style: none; margin: 0.9rem 0 0; padding: 0; }
.footer__list li { padding-block: 0.3rem; font-size: var(--step--1); }

.footer__bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	justify-content: space-between;
	align-items: center;
	padding-block: 1.25rem;
	border-top: 1px solid rgb(255 255 255 / 0.11);
}

/* Back to top */
.to-top {
	position: fixed;
	right: clamp(0.9rem, 2.5vw, 1.75rem);
	bottom: clamp(0.9rem, 2.5vw, 1.75rem);
	z-index: 90;
	display: grid;
	place-items: center;
	width: 2.9rem; height: 2.9rem;
	background: var(--paper);
	border: 1px solid var(--ink-3);
	color: var(--ink);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s, border-color 0.2s, color 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   13b. WIDGETS, SIDEBAR & COMMENTS
   ========================================================================== */

.sidebar { display: grid; gap: 2rem; }
.widget { border-top: 1px solid var(--rule-2); padding-top: 1.1rem; }
.widget__title { margin: 0 0 0.85rem; font-size: var(--mono-cap); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding-block: 0.32rem; border-bottom: 1px solid var(--rule-faint); font-size: var(--step--1); }
.widget a { color: var(--ink-2); text-decoration: none; }
.widget a:hover { color: var(--accent); }

.comment-list li { border-bottom: 1px solid var(--rule); padding-block: 1.35rem; }
.comment-list .children { list-style: none; margin: 1rem 0 0; padding-left: clamp(1rem, 3vw, 2.5rem); border-left: 1px solid var(--rule); }
.comment-meta { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; }
.comment-author img { border-radius: 50%; }
.comment-metadata, .comment-author .says { font: 500 var(--mono-cap)/1.5 var(--font-mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }
.comment-body p { font-size: var(--step--1); }
.comment-respond { margin-top: 2.5rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form .form-submit { margin-top: 1.25rem; }
.comment-reply-link { font: 500 var(--mono-cap)/1.5 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }

/* ==========================================================================
   14. PRINT — municipalities do print these pages
   ========================================================================== */

@media print {
	body { background: #fff; color: #000; font-size: 10.5pt; }
	.masthead, .coordbar, .nav, .to-top, .hero__contours, .pagination, .post-nav { display: none !important; }
	.site-footer { background: none; color: #000; border-top: 1px solid #000; }
	.site-footer .mono, .footer__blurb { color: #333; }
	a { color: #000; text-decoration: underline; }
	.section { border-bottom: 0; padding-block: 1.2rem; }
	.refs__year, .ruled > li { break-inside: avoid; }
}
