/* Zero Stray Pawject: responsive overrides (tablet / iPad and mobile) + 404 page.
   Loaded after css/styles.css and style.css. Class names refer to the generated design classes. */

img, svg, video { max-width: 100%; }
.zsp-burger { display: none; }

/* ---- Desktop: dropdown opens on hover (or keyboard focus) ---- */
@media (min-width: 961px) {
	.c184, .c420, .c454 { display: none; }
	.c6 > .c7 > .zsp-sub {
		position: absolute; top: 100%; left: -10px; z-index: 80; min-width: 264px; max-width: 320px;
		background: rgb(255, 255, 255); border: 1px solid rgb(229, 231, 235); box-shadow: rgba(10, 10, 10, 0.14) 0 18px 44px; padding: 10px 0;
	}
	.c6 > .c7 > .zsp-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
	.c6 > .c7:nth-last-child(-n+3) > .zsp-sub { left: auto; right: -10px; }
	.c6 > .c7:hover > .zsp-sub, .c6 > .c7:focus-within > .zsp-sub { display: block; }
	.c6 > .c7 > a svg { transition: transform 0.18s; }
	.c6 > .c7:hover > a svg { transform: rotate(180deg); }
	.c6 > .c7:hover > .c10 { background: rgb(249, 250, 251); color: rgb(10, 10, 10); }
}

/* ---- Header: hamburger on the right, menu opens as a left-side drawer below 960px ---- */
.zsp-drawer-close { display: none; }
.zsp-sub, .zsp-sub-toggle { display: none; }
@media (max-width: 960px) {
	.c3 { min-height: 64px; gap: 0; flex-wrap: nowrap; justify-content: space-between; }
	.zsp-burger {
		flex: 0 0 auto; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
		width: 44px; height: 44px; margin: 0 -10px 0 14px; padding: 0;
		background: transparent; border: 0; cursor: pointer;
	}
	.zsp-burger span { display: block; width: 24px; height: 2px; background: rgb(10, 10, 10); }

	/* Drawer: full height, slides in from the left, close icon at the top */
	.c3 > nav.c6 {
		position: fixed; top: 0; left: 0; bottom: 0; z-index: 90;
		width: min(340px, 86vw); display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0;
		padding: 0 0 28px; overflow-y: auto; background: rgb(255, 255, 255);
		box-shadow: 18px 0 44px rgba(10, 10, 10, 0.18);
		transform: translateX(-102%); visibility: hidden;
		transition: transform 0.25s ease, visibility 0s linear 0.25s;
	}
	.zsp-nav-open .c3 > nav.c6 { transform: none; visibility: visible; transition: transform 0.25s ease; }
	.admin-bar .c3 > nav.c6 { top: 32px; }
	.zsp-drawer-close {
		display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
		width: 44px; height: 44px; margin: 10px 12px 6px auto; padding: 0;
		background: transparent; border: 0; color: rgb(10, 10, 10); cursor: pointer;
	}
	.zsp-drawer-close:hover { color: rgb(92, 172, 181); }
	/* Backdrop behind the drawer */
	.zsp-nav-open::after { content: ""; position: fixed; inset: 0; z-index: 55; background: rgba(10, 10, 10, 0.5); }
	.zsp-nav-open { overflow: hidden; }

	.c6 > .c7 { display: flex; flex-wrap: wrap; align-items: stretch; }
	.c6 > .c7 > .c8, .c6 > .c7 > .c10 { flex: 1 1 0; width: auto; min-width: 0; }
	.c6 > .c7 > .c8 svg, .c6 > .c7 > .c10 svg { display: none; }
	.c6 > .c7 > .zsp-sub-toggle {
		display: flex; align-items: center; justify-content: center; flex: 0 0 56px; height: 52px; padding: 0;
		background: transparent; border: 0; color: rgb(61, 71, 74); cursor: pointer;
	}
	.c6 > .c7 > .c8 + .zsp-sub-toggle { color: rgb(255, 255, 255); background: rgb(92, 172, 181) }
	.c6 > .c7 > .zsp-sub-toggle svg { transition: transform 0.18s; }
	.c6 > .c7.zsp-sub-open > .zsp-sub-toggle svg { transform: rotate(180deg); }
	.c6 > .c7 > .zsp-sub { flex: 0 0 100%; }
		.c6 .c8, .c6 .c10, .c6 .c11, .c6 .c421 { display: flex; justify-content: space-between; width: 100%; height: 52px; margin: 0; padding: 0 20px; }
	.c6 > .c7:has(.c11, .c421) { padding: 18px 20px 0; }
	.c6 .c11, .c6 .c421 { justify-content: center; padding: 0 18px; }
	/* Desktop dropdowns are replaced by the tap-to-open submenu in the drawer. */
	.c184, .c420, .c454 { display: none; }
	.c6 > .c7.zsp-sub-open > .zsp-sub { display: block; background: rgb(249, 250, 251); padding: 4px 0; }
	.c6 > .c7.zsp-sub-open > .zsp-sub .c185 { white-space: normal; padding: 12px 32px; }
	.c185 { white-space: normal; padding: 12px 32px; }
}
@media (max-width: 782px) { .admin-bar .c3 > nav.c6 { top: 46px; } }

/* ---- Tablet: up to 900px ---- */
@media (max-width: 900px) {
	/* Two-column split layouts stack; sticky side panels become static. */
	.c343, .c406 { grid-template-columns: minmax(0, 1fr); margin-top: 36px; }
	.c351 { position: static; }
	.c496, .c502 { padding-left: clamp(20px, 6vw, 94px); padding-right: clamp(20px, 6vw, 94px); padding-bottom: 64px; }
	.c151 { padding: 40px 32px 44px; }

	/* News rows: meta + image on the first line, text below, arrow hidden. */
	.c457 { grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 26px 0; }
	.c457 > .c458 { grid-column: 1; grid-row: 1; }
	.c457 > .c460 { grid-column: 2; grid-row: 1; height: 160px; }
	.c457 > span:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
	.c457 > .c464 { display: none; }
}

/* ---- Mobile: up to 600px ---- */
@media (max-width: 600px) {
	.c22 { padding: 26px 20px; margin-top: 28px; }
	.c23 { font-size: 17px; }
	.c25 { font-size: 28px; }
	.c29, .c30 { flex-basis: 100%; max-width: none; }
	.c34 { padding: 26px 22px 24px; }
	.c104, .c110 { padding: 28px 22px; min-height: 0; }
	.c134, .c416 { padding: 26px 22px; min-height: 0; }
	.c333 { padding: 30px 22px; }
	.c426 { padding: 26px 20px; }
	.c151 { padding: 30px 22px 34px; }
	.c207, .c211 { padding: 18px 20px; }
	.c250 { padding: 24px 20px; }
	.c92 { padding: 14px 16px; }

	/* Accordion bodies: drop the wide left indent. */
	.c120, .c218, .c348, .c385 { padding-left: 20px; padding-right: 16px; }
	.c247 { padding-left: 0; }

	/* Two-up grids -> one column. */
	.c409, .c414 { grid-template-columns: minmax(0, 1fr); }

	/* Home partners: logos stay two per row. */
	.c143 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.c143 .c144 { padding: 10px; }

	/* Team / founder cards: photo on top. */
	.c267 { grid-template-columns: minmax(0, 1fr); }
	.c268 { aspect-ratio: 4 / 3; }
	.c271 { font-size: 21px; overflow-wrap: anywhere; }

	/* Label / value rows */
	.c303, .c309, .c304, .c310 { flex: 1 1 100%; }
	.c390 { flex-wrap: wrap; padding: 20px 16px; gap: 12px; }
	.c116 { padding: 12px; gap: 12px; }

	.c378 { white-space: normal; }
	.c352 { height: 220px; }
	.c369, .c401 { min-height: 240px; }
	.c358 { flex-basis: 100%; }

	/* News rows: single column. */
	.c457 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.c457 > .c458, .c457 > .c460, .c457 > span:nth-child(3) { grid-column: 1; grid-row: auto; }
	.c457 > .c458 { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; }
	.c457 > .c460 { height: 190px; }

	/* Long words must never push the page wider than the screen. */
	h1, h2, h3, p { overflow-wrap: break-word; }
}

/* ---- Small phones ---- */
@media (max-width: 380px) {
	.c24 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.c20 { font-size: 36px; }
}

/* ---- 404 page ---- */
.zsp-404 { position: relative; background: rgb(10, 10, 10); color: rgb(255, 255, 255); overflow: hidden; }
.zsp-404::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 85% 20%, rgba(92, 172, 181, 0.28), transparent 70%); pointer-events: none; }
.zsp-404__inner { position: relative; max-width: 1280px; margin: 0 auto; padding: clamp(64px, 10vw, 140px) clamp(20px, 6vw, 94px); }
.zsp-404__eyebrow { display: flex; align-items: center; gap: 26px; margin: 0 0 28px; font: 700 13px / 1 Montserrat, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255, 255, 255); }
.zsp-404__eyebrow::before { content: ""; width: 4px; height: 27px; background: rgb(255, 255, 255); }
.zsp-404__code { margin: 0; font: 900 clamp(110px, 24vw, 280px) / 0.9 Montserrat, sans-serif; letter-spacing: -0.04em; color: rgb(92, 172, 181); }
.zsp-404__title { margin: 12px 0 0; max-width: 760px; font: 900 clamp(32px, 5.6vw, 64px) / 1.06 Montserrat, sans-serif; letter-spacing: -0.02em; text-transform: uppercase; color: rgb(255, 255, 255); }
.zsp-404__text { margin: 24px 0 0; max-width: 620px; font: 400 clamp(16px, 1.8vw, 20px) / 1.6 Montserrat, sans-serif; color: rgb(201, 210, 211); }
.zsp-404__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.zsp-404__btn { display: inline-flex; align-items: center; justify-content: center; flex: 1 1 220px; max-width: 300px; height: 60px; padding: 0 24px; font: 700 14px / 1 Montserrat, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; transition: background 0.18s, color 0.18s; }
.zsp-404__btn--primary { background: rgb(92, 172, 181); color: rgb(10, 10, 10); }
.zsp-404__btn--primary:hover { background: rgb(255, 255, 255); color: rgb(10, 10, 10); }
.zsp-404__btn--ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.5); color: rgb(255, 255, 255); }
.zsp-404__btn--ghost:hover { background: rgb(255, 255, 255); color: rgb(10, 10, 10); }
.zsp-404__search { display: flex; max-width: 520px; margin-top: 44px; }
.zsp-404__search input[type="search"] { flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.35); border-right: 0; border-radius: 0; background: rgba(255, 255, 255, 0.06); color: rgb(255, 255, 255); font: 400 15px Montserrat, sans-serif; }
.zsp-404__search input[type="search"]::placeholder { color: rgba(255, 255, 255, 0.55); }
.zsp-404__search button { flex: 0 0 auto; height: 52px; padding: 0 22px; border: 0; border-radius: 0; background: rgb(92, 172, 181); color: rgb(10, 10, 10); font: 700 13px Montserrat, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.zsp-404__links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 40px 0 0; padding: 28px 0 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.zsp-404__links a { font: 700 13px / 1 Montserrat, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255, 255, 255); }
.zsp-404__links a:hover { color: rgb(92, 172, 181); }
@media (max-width: 600px) {
	.zsp-404__btn { flex-basis: 100%; max-width: none; }
	.zsp-404__search button { padding: 0 16px; }
}

/* ---- Search results ---- */
.zsp-search-hero .zsp-404__inner { padding-block: clamp(56px, 8vw, 110px); }
.zsp-search-hero .zsp-404__title { max-width: 980px; overflow-wrap: anywhere; }
.zsp-search-hero .zsp-404__search { max-width: 640px; }
.zsp-search-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 48px; }
.zsp-search-pages .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border: 1px solid rgb(201, 210, 211); font: 700 13px / 1 Montserrat, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(10, 10, 10); transition: background-color 0.2s, color 0.2s; }
.zsp-search-pages a.page-numbers:hover, .zsp-search-pages .page-numbers.current { background: rgb(92, 172, 181); border-color: rgb(92, 172, 181); color: rgb(10, 10, 10); }
.zsp-search-pages .page-numbers.dots { border-color: transparent; }
.zsp-search-empty { max-width: 640px; padding: clamp(24px, 5vw, 64px) 0; }
.zsp-search-empty p { margin: 16px 0 32px; font: 400 18px / 1.6 Montserrat, sans-serif; color: rgb(75, 85, 86); }
.zsp-search-empty .zsp-404__btn { max-width: 260px; }

/* Case-study step labels wrap instead of overflowing. */
@media (max-width: 600px) {
	.c99 { flex-wrap: wrap; gap: 12px 24px; }
	.c100 { flex-wrap: wrap; gap: 10px 18px; }
}
@media (max-width: 380px) {
	.c42 { gap: 18px; }
	.c197 { font-size: 28px; }
}
@media (max-width: 380px) {
	.c63, .c81 { font-size: 24px; letter-spacing: -0.01em; }
}

/* Puzzle: fits the screen width on phones, no padding, no scrolling. */
@media (max-width: 760px) {
	.c89 { overflow: hidden; margin-top: 16px; }
	.c89 .c90 { width: 100%; max-width: 100%; aspect-ratio: 1131 / 465; }

	/* Full-width buttons: breathing room left and right, text may wrap. */
	.c126 { height: auto; min-height: 56px; padding: 18px 24px; line-height: 1.4; text-align: center; }
}

/* Education hero: buttons stack and go full width on phones. */
@media (max-width: 760px) {
	#education-hero .c404 { flex-direction: column; align-items: stretch; gap: 14px; }
	#education-hero .c404 > a { width: 100%; box-sizing: border-box; height: auto; min-height: 56px; padding: 18px 24px; line-height: 1.4; text-align: center; }
}

/* Donation popup */
.zsp-modal[hidden] { display: none; }
.zsp-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.zsp-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.75); }
.zsp-modal__box { position: relative; width: 100%; max-width: 1200px; max-height: 92vh; overflow-y: auto; background: #fff; color: #0a0a0a; padding: 32px 24px 24px; box-sizing: border-box; }
.zsp-modal__close { position: absolute; top: 6px; right: 10px; background: none; border: 0; font-size: 32px; line-height: 1; cursor: pointer; color: #0a0a0a; }
body.zsp-modal-open { overflow: hidden; }

/* Accordion / tab buttons: neutral reset (zero specificity so the design classes still win). */
:where(button[type="button"][data-action], button.c443, button.c446, button.c53, button.c131) {
	appearance: none; -webkit-appearance: none; background: none; border: 0; margin: 0; padding: 0;
	font: inherit; color: inherit; text-align: inherit; cursor: pointer; border-radius: 0;
}
:where(.c116, .c93, .c242, .c53, .c56)[type="button"] { width: 100%; }

/* Skip link: visible only on keyboard focus. */
.zsp-skip-link { position: absolute; left: 8px; top: -100px; z-index: 100000; padding: 12px 18px; background: rgb(92, 172, 181); color: rgb(10, 10, 10); font: 700 14px / 1 Montserrat, sans-serif; text-decoration: none; }
.zsp-skip-link:focus { top: 8px; outline: 2px solid rgb(10, 10, 10); outline-offset: 2px; }
main:focus { outline: none; }

/* Desktop dropdown: dismissed after choosing an item (until the pointer leaves), open from the keyboard. */
@media (min-width: 961px) {
	.c6 > .c7.zsp-sub-dismissed > .zsp-sub, .c6 > .c7.zsp-sub-dismissed > .c184, .c6 > .c7.zsp-sub-dismissed > .c454 { display: none !important; }
	.c6 > .c7.zsp-sub-kb-open > .zsp-sub { display: block; }
}

/* Donation popup: full width up to 1200px on desktop; edge-to-edge sheet on mobile. */
@media (max-width: 767px) {
  .zsp-modal { padding: 0; align-items: flex-end; }
  .zsp-modal__box { max-width: 100%; max-height: 100vh; height: 100%; padding: 48px 16px 16px; }
  .zsp-modal__close { top: 8px; right: 12px; }
}

/* ---- Category / tag archives ---- */
.zsp-archive-count { margin: 20px 0 0; font: 700 13px / 1 Montserrat, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(92, 172, 181); }
.zsp-archive-back { display: inline-block; margin-top: 28px; font: 700 13px / 1 Montserrat, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255, 255, 255); border-bottom: 1px solid rgba(255, 255, 255, 0.5); padding-bottom: 6px; }
.zsp-archive-back:hover { color: rgb(92, 172, 181); border-color: rgb(92, 172, 181); }

/* ---- Section "Text color" (set per section in the page builder) ---- */
.zsp-has-text-color :where(h1, h2, h3, h4, h5, h6, p, span, li, label, blockquote, cite, strong, em) { color: var(--zsp-text); }

/* ---- Box "text color" (set per section in the page builder) ---- */
.zsp-box-text :where(h1, h2, h3, h4, h5, h6, p, span, li, label, blockquote, cite, strong, em, div) { color: var(--zsp-box-text); }
