/**
 * Springtime History Archive — front-end styles
 *
 * Font-family is intentionally left untouched so the parent theme's
 * typography controls headings/body text. Only color, spacing, and layout
 * are defined here.
 *
 * Palette below uses the site's actual design-system colors:
 *   Primary 500  #151F72  deep navy
 *   Primary 300  #2A7F9D  teal   (= Primary 900)
 *   Primary 700  #D95F7E  rose
 *   Secondary 100 #EEA7C9 light pink
 *   Primary 100  #2C2C2C  ink / near-black text
 *
 * Every color below is driven from the CSS variables on .stha-wrap, so
 * retinting later only means editing the :root-style block at the top.
 *
 * NOTE ON SPECIFICITY: a handful of rules below use !important. This is
 * intentional and limited to states (hover/focus/active) on the tab and
 * accordion buttons, because many themes ship global `button` styles
 * (background, border-radius) that otherwise win the cascade on hover/
 * active and make the pills snap to square or flash an unrelated color.
 * Owning those states explicitly keeps the widget's look consistent
 * regardless of which theme it's dropped into.
 */

.stha-wrap {
	--stha-navy: #151F72;
	--stha-navy-dark: #0f1652;
	--stha-teal: #2A7F9D;
	--stha-rose: #D95F7E;
	--stha-rose-dark: #c14564;
	--stha-pink-light: #EEA7C9;
	--stha-ink: #2C2C2C;

	--stha-panel-bg: #fdfbfb;
	--stha-stripe-bg: #fbeef2;
	--stha-border: #f1d4dd;

	--stha-pill-radius: 999px;
	--stha-radius: 10px;
	--stha-shadow: 0 4px 18px rgba(21, 31, 114, 0.10);

	margin: 2.5em 0;
	color: var(--stha-ink);
	line-height: 1.5;
}

.stha-wrap * {
	box-sizing: border-box;
}

/* ---------- Intro ---------- */

.stha-intro {
	text-align: center;
	margin: 0 0 2em;
}

.stha-eyebrow {
	display: inline-block;
	font-size: 0.8em;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--stha-rose);
	font-weight: 700;
	margin: 0 0 0.5em;
}

.stha-title {
	margin: 0;
	color: var(--stha-navy);
	line-height: 1.2;
}

/* ---------- Tabs (desktop) ---------- */

.stha-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
	justify-content: center;
	margin: 0 0 1.75em;
	padding: 0;
	list-style: none;
}

.stha-wrap button.stha-tab {
	appearance: none !important;
	-webkit-appearance: none !important;
	margin: 0 !important;
	font: inherit;
	line-height: 1.2;
	cursor: pointer;
	border: none !important;
	box-shadow: none !important;
	outline: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15em;
	padding: 0.8em 1.4em 0.7em !important;
	border-radius: var(--stha-pill-radius) !important;
	color: #fff !important;
	background-image: linear-gradient(135deg, var(--stha-navy), var(--stha-teal)) !important;
	background-color: var(--stha-navy) !important;
	transition: background-image 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	position: relative;
}

.stha-wrap button.stha-tab:hover {
	border-radius: var(--stha-pill-radius) !important;
	background-image: linear-gradient(135deg, var(--stha-navy-dark), var(--stha-teal)) !important;
	color: #fff !important;
	box-shadow: var(--stha-shadow) !important;
	transform: translateY(-1px);
}

.stha-wrap button.stha-tab:active {
	border-radius: var(--stha-pill-radius) !important;
	background-image: linear-gradient(135deg, var(--stha-navy-dark), var(--stha-navy)) !important;
	color: #fff !important;
	transform: translateY(0);
}

.stha-wrap button.stha-tab:focus,
.stha-wrap button.stha-tab:focus-visible {
	border-radius: var(--stha-pill-radius) !important;
	outline: 2px solid var(--stha-rose) !important;
	outline-offset: 2px;
}

.stha-tab-label {
	font-weight: 700;
	font-size: 0.95em;
}

.stha-tab-sublabel {
	font-size: 0.76em;
	opacity: 0.85;
}

.stha-wrap button.stha-tab.is-active {
	border-radius: var(--stha-pill-radius) !important;
	background-image: linear-gradient(135deg, var(--stha-rose-dark), var(--stha-rose)) !important;
	color: #fff !important;
	box-shadow: var(--stha-shadow) !important;
}

.stha-wrap button.stha-tab.is-active:hover {
	background-image: linear-gradient(135deg, var(--stha-rose-dark), var(--stha-rose)) !important;
}

/* ---------- Panels ---------- */

.stha-panels {
	background: var(--stha-panel-bg);
	border: 1px solid var(--stha-border);
	border-radius: var(--stha-radius);
	box-shadow: var(--stha-shadow);
	overflow: hidden;
}

.stha-panel + .stha-panel {
	border-top: 1px solid var(--stha-border);
}

.stha-panel[hidden] {
	display: none;
}

.stha-panel-inner {
	padding: 2em clamp(1em, 4vw, 2.5em);
}

.stha-panel-heading {
	color: var(--stha-navy);
	margin: 0 0 1em;
	padding-bottom: 0.45em;
	border-bottom: 2px solid var(--stha-pink-light);
}

.stha-table-note {
	font-size: 0.88em;
	opacity: 0.75;
	margin: -0.5em 0 1em;
}

/* Accordion toggle button — hidden on desktop, shown on small screens */

.stha-wrap button.stha-accordion-toggle {
	display: none;
	width: 100%;
	appearance: none !important;
	-webkit-appearance: none !important;
	margin: 0 !important;
	background: var(--stha-panel-bg) !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-align: left;
	padding: 1.1em clamp(1em, 4vw, 2.5em) !important;
	cursor: pointer;
	font: inherit;
	color: var(--stha-navy) !important;
	align-items: center;
	justify-content: space-between;
}

.stha-accordion-icon {
	width: 0.7em;
	height: 0.7em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.stha-wrap button.stha-accordion-toggle[aria-expanded="true"] .stha-accordion-icon {
	transform: rotate(-135deg);
}

/* ---------- Founding members panel ---------- */

.stha-founders-photo {
	margin: 0 0 1.75em;
	text-align: center;
}

.stha-founders-photo img {
	max-width: 100%;
	height: auto;
	border-radius: var(--stha-radius);
	border: 4px solid #fff;
	box-shadow: var(--stha-shadow);
}

.stha-founders-columns {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0 2.5em;
}

.stha-founders-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.stha-founders-list li {
	padding: 0.65em 0 0.65em 1.3em;
	border-bottom: 1px solid var(--stha-border);
	position: relative;
}

.stha-founders-list li::before {
	content: "\2766";
	position: absolute;
	left: 0;
	color: var(--stha-rose);
}

.stha-founders-list li:last-child {
	border-bottom: none;
}

/* ---------- Tables ---------- */

.stha-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--stha-border);
	border-radius: var(--stha-radius);
}

.stha-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 480px;
}

.stha-table th,
.stha-table td {
	padding: 0.7em 0.95em;
	text-align: left;
	border-bottom: 1px solid var(--stha-border);
	white-space: nowrap;
}

.stha-table thead th {
	background: var(--stha-navy);
	color: #fff;
	font-weight: 700;
	position: sticky;
	top: 0;
	white-space: nowrap;
}

.stha-table tbody th {
	font-weight: 600;
	color: var(--stha-navy);
	background: transparent;
}

.stha-table tbody tr:nth-child(even) {
	background: var(--stha-stripe-bg);
}

.stha-table tbody tr:hover {
	background: var(--stha-pink-light);
}

.stha-empty {
	opacity: 0.4;
}

/* ---------- Responsive: switch to accordion ---------- */

@media (max-width: 680px) {
	.stha-tabs {
		display: none;
	}

	.stha-panel {
		border-top: 1px solid var(--stha-border) !important;
	}

	.stha-panel:first-child {
		border-top: none !important;
	}

	.stha-wrap button.stha-accordion-toggle {
		display: flex;
	}

	.stha-panel-inner {
		padding: 1.25em;
	}

	.stha-founders-columns {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.stha-table {
		min-width: 380px;
	}
}
