/* SWB Theme — chrome only (header, mobile nav, page canvas, post single).
   Content styles come from brand-tokens → brand-defaults → blocks.css.
   The header reproduces the Hub-era block-page chrome: absolute transparent
   86px bar over the hero, white 14px/500 nav, white dropdown panels,
   burger under 1000px. */

/* base resets Hub used to provide — without border-box every padded element
   overflows its 390px track, and unconstrained media blows out the viewport */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
input, select, textarea, button { max-width: 100%; }

body {
	background: var(--swb-cream);
	/* base typography — Hub's stylesheet used to own this baseline
	   (18px/1.7 antialiased); matching it keeps every inheriting element
	   where the pre-swap chrome had it */
	font-family: var(--swb-ff, "Google Sans Flex", "Helvetica Neue", Arial, sans-serif);
	font-size: 18px;
	line-height: 1.7;
	color: var(--swb-ink, #1f2937);
	margin: 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.swb-skip {
	position: absolute; left: -9999px; top: 0; z-index: 2000;
	background: var(--swb-card); color: var(--swb-ink); padding: 10px 16px;
	font-family: var(--swb-ff); font-weight: 600; border-radius: 0 0 10px 0;
}
.swb-skip:focus { left: 0; }

/* ---------- header bar ---------- */
.swb-siteheader { position: absolute; top: 0; left: 0; right: 0; z-index: 1000; background: transparent; }
.swb-siteheader__row { display: flex; align-items: center; gap: 32px; min-height: 86px; }
.swb-siteheader__brand { display: inline-flex; flex-shrink: 0; }
.swb-siteheader__brand img { width: 163px; height: auto; display: block; }

/* ---------- desktop nav ---------- */
/* auto margins on BOTH sides center the nav between the brand (pinned left) and
   the Donate pill (pinned right): free space splits evenly instead of dumping a
   lopsided void after the logo. */
.swb-siteheader__nav { margin-left: auto; margin-right: auto; }
.swb-nav { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.swb-nav a {
	display: inline-block; font-family: var(--swb-ff); font-weight: 500; font-size: 14px;
	color: #fff; text-decoration: none; padding: 10px 14px; border-radius: 8px;
	transition: opacity .15s;
}
.swb-nav a:hover { opacity: .75; }
.swb-nav .menu-item-has-children { position: relative; }
.swb-nav .menu-item-has-children > a::after {
	content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
}
.swb-nav .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 260px; display: none;
	background: var(--swb-card); border: 1px solid var(--swb-line); border-radius: 14px;
	box-shadow: var(--swb-shadow-sm); list-style: none; margin: 0; padding: 10px;
}
.swb-nav .menu-item-has-children:hover > .sub-menu,
.swb-nav .menu-item-has-children:focus-within > .sub-menu { display: block; }
.swb-nav .sub-menu a { display: block; color: var(--swb-ink); font-weight: 400; font-size: 18px; padding: 10px 14px; border-radius: 10px; }
.swb-nav .sub-menu a:hover { opacity: 1; background: var(--swb-mint); color: var(--swb-green); }
/* nested sub-subs (the policies under Transparency's children) just indent */
.swb-nav .sub-menu .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 14px; }

/* ---------- header Donate pill (§9.3 reinstated) ---------- */
.swb-siteheader__donate {
	display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
	font-family: var(--swb-ff); font-weight: 600; font-size: 13px;
	color: #fff; text-decoration: none; line-height: 1;
	background: var(--swb-green-deep); border-radius: 100px; padding: 14px 22px;
	transition: background .15s;
}
.swb-siteheader__donate:hover { background: var(--swb-green); }

/* ---------- burger + mobile nav ---------- */
.swb-siteheader__burger {
	display: none; margin-left: auto; width: 44px; height: 44px; padding: 10px;
	background: transparent; border: none; cursor: pointer;
	flex-direction: column; justify-content: center; gap: 5px;
}
.swb-siteheader__burger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.swb-siteheader__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.swb-siteheader__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.swb-siteheader__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.swb-siteheader__mobilenav {
	display: none; background: var(--swb-green-deep); padding: 8px 18px 18px;
	box-shadow: var(--swb-shadow-sm);
}
.swb-siteheader__mobilenav.is-open { display: block; }
.swb-mobilenav__list, .swb-mobilenav__list .sub-menu { list-style: none; margin: 0; padding: 0; }
.swb-mobilenav__list a {
	display: block; font-family: var(--swb-ff); font-weight: 500; font-size: 17px;
	color: #fff; text-decoration: none; padding: 12px 6px;
	border-bottom: 1px solid rgba(255,255,255,.12);
}
.swb-mobilenav__list .sub-menu a { font-weight: 400; font-size: 15px; padding-left: 22px; opacity: .9; }

@media (max-width: 999px) {
	.swb-siteheader__nav { display: none; }
	/* Donate pill is desktop-only — on mobile it crowded the burger; the hero
	   CTA, Quick Donate bar, and mobile menu carry the donate action instead. */
	.swb-siteheader__donate { display: none; }
	.swb-siteheader__burger { display: flex; margin-left: auto; }
	.swb-siteheader__row { min-height: 78px; }
	.swb-siteheader__brand img { width: 148px; }
}

/* policy pages have no dark hero: blocks.css paints a Deep-Forest bar behind
   the absolute header (.swb-policy::before) — unchanged under this theme. */

/* ---------- plain post single (e.g. legacy blog posts) ---------- */
.swb-postsingle { background: var(--swb-cream); }
.swb-postsingle__article { max-width: 760px; }
.swb-postsingle__article p { font-size: 17px; line-height: 1.7; color: var(--swb-ink); margin: 0 0 16px; }
.swb-postsingle__article a { color: var(--swb-green); }
.swb-postsingle__article img { max-width: 100%; height: auto; border-radius: var(--swb-radius-sm); }
