/* Pitboard — page shell: base, header, navigation, footer, inner-page headers. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--pb-header-h) + 16px); }
body {
	margin: 0;
	background: var(--pb-paper);
	color: var(--pb-ink);
	font-family: var(--pb-font-body);
	font-size: var(--pb-body-size);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--pb-felt); }
.pb-sr, .pb-skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pb-skip:focus { position: fixed; top: 12px; left: 12px; z-index: 200; padding: 10px 16px; background: var(--pb-brass); color: var(--pb-ink); border-radius: 8px; }
:focus-visible { outline: 3px solid var(--pb-brass); outline-offset: 3px; }

.pb-wrap {
	width: 100%;
	max-width: calc(var(--pb-wrap) + var(--pb-gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--pb-gutter);
}
.pb-wrap--narrow { max-width: calc(var(--pb-wrap-narrow) + var(--pb-gutter) * 2); }
.pb-main { display: block; }

/* Core blocks placed directly between sections on block-built pages: readable centred column */
.pb-flow > :not(.pb) {
	box-sizing: content-box;
	max-width: var(--pb-wrap);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--pb-gutter);
	padding-right: var(--pb-gutter);
}
.pb-flow > .alignwide:not(.pb) { max-width: var(--pb-wrap); }
.pb-flow > .alignfull:not(.pb) { max-width: none; padding-left: 0; padding-right: 0; }
.pb-flow > p:empty { display: none; }
.pb-flow > :not(.pb):first-child, .pb-flow > .pb + :not(.pb) { margin-top: 64px; }
.pb-flow > :not(.pb):last-child, .pb-flow > :not(.pb):has(+ .pb) { margin-bottom: 64px; }
/* A section block nested in a narrow content column still spans the full window */
.pb-prose > .pb { width: 100vw; margin-left: calc(50% - 50vw); }
body { overflow-x: clip; }

/* ---------- header ---------- */
.pb-header {
	position: relative;
	z-index: 50;
	background: var(--pb-felt);
	color: var(--pb-on-felt);
	transition: box-shadow .2s;
}
.pb-header.is-sticky { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); }
.pb-header.is-scrolled { box-shadow: 0 1px 0 rgba(255, 255, 255, .08), 0 10px 30px rgba(0, 0, 0, .18); }
.pb-header__bar { display: flex; align-items: center; gap: 28px; min-height: var(--pb-header-h); }

.pb-logo { display: inline-flex; align-items: center; gap: 10px; flex: none; color: #fff; text-decoration: none; }
.pb-logo__img { display: block; height: 56px; max-height: none; width: auto; }
.pb-logo__mark { display: inline-flex; color: var(--pb-brass); }
.pb-logo__text { font: var(--pb-h-wght) 19px/1 var(--pb-font-display); font-stretch: var(--pb-h-wdth); letter-spacing: -0.01em; white-space: nowrap; }
.pb-logo__text span { color: var(--pb-on-felt-dim); font-weight: 600; }

.pb-nav { display: flex; align-items: center; flex: 1 1 auto; justify-content: center; }
.pb-menu { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pb-menu > li { position: relative; display: flex; align-items: center; }
.pb-menu a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--pb-on-felt); font-size: 15.5px; font-weight: 500; text-decoration: none; transition: background-color .15s, color .15s; }
.pb-menu > li > a:hover { background: var(--pb-felt-2); color: #fff; }
.pb-menu > .current-menu-item > a, .pb-menu > .current-menu-ancestor > a { color: #fff; box-shadow: inset 0 -2px 0 var(--pb-brass); border-radius: 8px 8px 0 0; }
.pb-sub-toggle { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: -8px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--pb-on-felt-dim); cursor: pointer; }
.pb-sub-toggle svg { transition: transform .2s; }
.pb-menu .sub-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 250px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: #fff;
	border-radius: var(--pb-r-card);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 18px 44px rgba(9, 30, 24, .22);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .16s, transform .16s, visibility .16s;
}
.pb-menu .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.pb-menu .sub-menu a { color: var(--pb-ink); padding: 10px 12px; font-size: 15px; }
.pb-menu .sub-menu a:hover { background: var(--pb-paper); }
.pb-menu > li:hover > .sub-menu, .pb-menu > li:focus-within > .sub-menu, .pb-menu > li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.pb-menu > li.is-open > .pb-sub-toggle svg { transform: rotate(180deg); }
.pb-menu .sub-menu:has(> li:nth-child(7)) { display: grid; grid-template-columns: 1fr 1fr; min-width: 460px; }

.pb-header__cta, .pb-nav__cta { display: flex; align-items: center; gap: 10px; flex: none; }
.pb-header .pb-btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
.pb-header .pb-btn--line { color: #fff; border-color: rgba(255, 255, 255, .32); }
.pb-header .pb-btn--line:hover { border-color: #fff; }
.pb-nav__cta { display: none; }

.pb-burger { display: none; position: relative; width: 46px; height: 46px; margin-left: auto; padding: 0; border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; background: none; color: #fff; cursor: pointer; }
.pb-burger__lines, .pb-burger__lines::before, .pb-burger__lines::after { position: absolute; left: 13px; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.pb-burger__lines { top: 21px; }
.pb-burger__lines::before, .pb-burger__lines::after { content: ""; left: 0; }
.pb-burger__lines::before { top: -6px; }
.pb-burger__lines::after { top: 6px; }
.nav-open .pb-burger__lines { background: transparent; }
.nav-open .pb-burger__lines::before { transform: translateY(6px) rotate(45deg); }
.nav-open .pb-burger__lines::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1140px) {
	.pb-header__cta { display: none; }
	.pb-burger { display: block; }
	.pb-nav {
		position: fixed;
		top: calc(var(--pb-header-h) + var(--wp-admin--admin-bar--height, 0px));
		left: 0;
		right: 0;
		bottom: 0;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 24px;
		padding: 16px var(--pb-gutter) 32px;
		background: var(--pb-felt-deep);
		overflow-y: auto;
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
		transition: opacity .2s, transform .2s, visibility .2s;
	}
	.nav-open .pb-nav { visibility: visible; opacity: 1; transform: none; }
	.nav-open { overflow: hidden; }
	.pb-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.pb-menu > li { flex-wrap: wrap; border-bottom: 1px solid rgba(255, 255, 255, .08); }
	.pb-menu > li > a { flex: 1; padding: 16px 2px; font-size: 18px; }
	.pb-menu > .current-menu-item > a { box-shadow: none; color: var(--pb-brass); }
	.pb-sub-toggle { width: 44px; height: 44px; margin: 0; color: #fff; }
	.pb-menu .sub-menu { position: static; display: none; width: 100%; min-width: 0; padding: 0 0 12px 12px; background: none; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
	.pb-menu > li:hover > .sub-menu, .pb-menu > li:focus-within > .sub-menu { display: none; }
	.pb-menu > li.is-open > .sub-menu { display: block; }
	.pb-menu .sub-menu a { color: var(--pb-on-felt); padding: 10px 2px; }
	.pb-menu .sub-menu a:hover { background: none; color: #fff; }
	.pb-nav__cta { display: flex; flex-direction: column; align-items: stretch; }
	.pb-nav__cta .pb-btn { min-height: 50px; }
}

/* ---------- inner page header ---------- */
.pb-pagehead { background: var(--pb-felt); color: var(--pb-on-felt); padding: clamp(40px, 4.5vw, 64px) 0 clamp(40px, 4.5vw, 60px); }
.pb-pagehead__title {
	margin: 0;
	font-family: var(--pb-font-display);
	font-stretch: var(--pb-h-wdth);
	font-weight: var(--pb-h-wght);
	font-size: clamp(2.1rem, 1.3rem + 2.6vw, 3.4rem);
	line-height: 1.04;
	letter-spacing: -0.015em;
	color: #fff;
	text-wrap: balance;
	max-width: 22ch;
}
.pb-pagehead__sub { margin: 18px 0 0; max-width: 60ch; font-size: 1.12em; color: var(--pb-on-felt-dim); }
.pb-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; font-size: 14.5px; color: var(--pb-on-felt-dim); }
.pb-crumbs a { color: var(--pb-on-felt-dim); text-decoration: none; }
.pb-crumbs a:hover { color: #fff; text-decoration: underline; }
.pb-pagehead--post .pb-pagehead__title { max-width: none; }
.pb-article__meta { margin: 18px 0 0; font-size: 15px; color: var(--pb-on-felt-dim); }
.pb-page { padding-top: var(--pb-sec-y); padding-bottom: var(--pb-sec-y); }
.pb-article__img { margin: 0 0 40px; border-radius: var(--pb-r-panel); overflow: hidden; }
.pb-article__img img { display: block; width: 100%; }

.pb-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.pb-cats a { padding: 8px 16px; border: 1px solid var(--pb-line); border-radius: 999px; color: var(--pb-ink); text-decoration: none; font-size: 15px; background: #fff; }
.pb-cats a[aria-current] { background: var(--pb-felt); border-color: var(--pb-felt); color: #fff; }
.pb-pagination { margin-top: 40px; }
.pb-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pb-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: var(--pb-r-btn); background: #fff; border: 1px solid var(--pb-line); color: var(--pb-ink); text-decoration: none; }
.pb-pagination .page-numbers.current { background: var(--pb-felt); border-color: var(--pb-felt); color: #fff; }
.pb-pagination .screen-reader-text { position: absolute; left: -9999px; }
.pb-empty { font-size: 1.1em; color: var(--pb-muted); }

/* ---------- footer ---------- */
.pb-footer { background: var(--pb-ink); color: var(--pb-on-felt-dim); padding: 80px 0 32px; font-size: 15.5px; }
.pb-footer__top { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)); gap: 40px; }
.pb-logo--footer { margin-bottom: 18px; }
.pb-logo--footer .pb-logo__img { height: 64px; }
.pb-footer__blurb { margin: 0 0 24px; max-width: 36ch; }
.pb-footer .pb-contacts a { color: var(--pb-on-felt); }
.pb-footer__title { margin: 4px 0 16px; font: 700 16px/1.2 var(--pb-font-display); font-stretch: 110%; color: #fff; }
.pb-footer__menu, .pb-footer__legal { margin: 0; padding: 0; list-style: none; }
.pb-footer__menu li + li { margin-top: 10px; }
.pb-footer a { color: var(--pb-on-felt-dim); text-decoration: none; }
.pb-footer a:hover { color: #fff; }
.pb-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; }
.pb-footer__bottom p { margin: 0; }
.pb-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }

@media (max-width: 1000px) {
	.pb-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pb-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 781px) {
	:root { --pb-header-h: 68px; --pb-gutter: 20px; }
	.pb-logo__img { height: 46px; }
	.pb-footer { padding-top: 56px; }
}
@media (max-width: 420px) {
	:root { --pb-gutter: 16px; }
	body { font-size: 16px; }
	.pb-logo__text { font-size: 17px; }
	.pb-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
	.pb-footer__bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.pb-header, .pb-nav, .pb-menu .sub-menu, .pb-burger__lines, .pb-burger__lines::before, .pb-burger__lines::after { transition: none !important; }
}
