/**
 * AOH Online Archive — public stylesheet.
 * Owned by: styling squad. Enqueued by the theme as handle `aoh-archive-main`.
 *
 * This file implements the approved visual design (docs/design/ui-mockup.html)
 * against the CSS CLASS CONTRACT fixed in docs/design/UI-IMPLEMENTATION.md §1,
 * using the token set in §2 verbatim. Every selector below is one the
 * Templates agent's markup is committed to emit — do not invent selectors
 * that aren't in that contract, and do not rename any that are.
 *
 * Contents:
 *   1.  Tokens (light default, dark via prefers-color-scheme + data-theme)
 *   2.  Reset & base type
 *   3.  Global utilities (.aoh-container, .aoh-eyebrow, .aoh-mono, .aoh-tnum…)
 *   4.  Skip link
 *   5.  Masthead & primary nav
 *   6.  Hero, searchbar, stats
 *   7.  Section heads, browse cards, material-type list
 *   8.  Breadcrumbs
 *   9.  Buttons & generic form controls
 *   10. Facet sidebar (query-owned inner form)
 *   11. Archive / search / taxonomy results layout
 *   12. Result card
 *   13. Single entry — finding-aid layout
 *   14. Entry metadata block
 *   15. Citation block
 *   16. Outbound repository link
 *   17. Related links & feedback CTA
 *   18. Repository card & quicklinks
 *   19. About — scholarly prose
 *   20. Contribute — intro/format card + form
 *   21. Footer
 *   22. Small-screen refinements
 *   23. Forced-colors / high-contrast
 * ============================================================================
 */

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
	/* Base sizing: 112.5% of a 16px browser default = 18px root, satisfying
	   the "18px+ base type" accessibility floor while staying in rem units so
	   a user's own browser zoom/font-size preference still scales correctly. */
	font-size: 112.5%;

	/* Type — system stacks only (no external fonts). Atkinson Hyperlegible
	   (vendored, fonts.css) leads the sans stack for the low-vision audience;
	   headings use the approved serif stack from the mockup. */
	--aoh-font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
	--aoh-font-sans: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--aoh-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	--aoh-line-height: 1.55;
	--aoh-line-height-tight: 1.15;

	/* Surfaces & ink (sage-tinted paper / ink) */
	--aoh-bg: #e8ebe3;
	--aoh-surface: #f7f8f3;
	--aoh-surface-2: #eff1ea;
	--aoh-ink: #1a241f;
	--aoh-ink-soft: #4c574f;
	--aoh-ink-faint: #79837a;

	/* Brand (deep Hibernian green) + antique gold accent */
	--aoh-brand: #1c3d2e;
	--aoh-brand-2: #2f5c46;
	--aoh-brand-ink: #f7f8f3;
	--aoh-gold: #8f7130;
	/* Darker gold reserved for gold *text* on the light paper surface: #8f7130
	   on #f7f8f3 is only ~4.3:1 (below the 4.5:1 AA floor), so text use gets
	   this ~6:1 value while --aoh-gold stays for borders/rules. */
	--aoh-gold-text: #6f5720;
	--aoh-gold-line: #c9b17a;

	/* Page "chrome" (utility bar + footer): a fixed deep green in BOTH themes so
	   the bands bookend the page consistently and never flip to light green when
	   --aoh-brand lightens for dark mode. Defined only here (not in the dark
	   scopes) so the values persist across themes. */
	--aoh-chrome-bg: #163021;
	--aoh-chrome-ink: #eef2ea;
	--aoh-chrome-ink-soft: rgba(238, 242, 234, 0.74);
	--aoh-chrome-line: rgba(238, 242, 234, 0.16);

	/* Lines & shadow */
	--aoh-line: #ccd2c7;
	--aoh-line-soft: #dde1d7;
	--aoh-shadow: 0 1px 2px rgba(26, 36, 31, 0.06), 0 8px 24px rgba(26, 36, 31, 0.06);

	/* Focus (WCAG visible-focus) — distinct from link/brand color */
	--aoh-focus: #8f7130;

	/* Danger / notice (not in mockup; derived to meet AA on both surfaces) */
	--aoh-danger: #8a1f1f;

	--aoh-maxw: 1120px;
	--aoh-radius: 10px;
	--aoh-radius-sm: 6px;
	--aoh-border-width: 1px;

	/* Spacing scale (rem) */
	--aoh-space-1: 0.25rem;
	--aoh-space-2: 0.5rem;
	--aoh-space-3: 0.75rem;
	--aoh-space-4: 1rem;
	--aoh-space-5: 1.5rem;
	--aoh-space-6: 2rem;
	--aoh-space-7: 3rem;
	--aoh-space-8: 4rem;
}

@media (prefers-color-scheme: dark) {
	:root {
		--aoh-bg: #0f1512;
		--aoh-surface: #181f1a;
		--aoh-surface-2: #141b16;
		--aoh-ink: #e9ebe3;
		--aoh-ink-soft: #a9b3a8;
		--aoh-ink-faint: #7c867c;
		--aoh-brand: #7cb99a;
		--aoh-brand-2: #98cbaf;
		--aoh-brand-ink: #0f1512;
		--aoh-gold: #c9a961;
		/* On the dark surface #c9a961 already clears AA (~8:1), so text reuses it. */
		--aoh-gold-text: #c9a961;
		--aoh-gold-line: #6b5a30;
		--aoh-line: #2a332c;
		--aoh-line-soft: #222a24;
		--aoh-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
		--aoh-focus: #ffd166;
		--aoh-danger: #f2a3a3;
	}
}

/* A future in-page theme toggle stamps data-theme on the root; it must win
   in both directions regardless of the OS-level signal above. */
:root[data-theme="light"] {
	--aoh-bg: #e8ebe3;
	--aoh-surface: #f7f8f3;
	--aoh-surface-2: #eff1ea;
	--aoh-ink: #1a241f;
	--aoh-ink-soft: #4c574f;
	--aoh-ink-faint: #79837a;
	--aoh-brand: #1c3d2e;
	--aoh-brand-2: #2f5c46;
	--aoh-brand-ink: #f7f8f3;
	--aoh-gold: #8f7130;
	--aoh-gold-text: #6f5720;
	--aoh-gold-line: #c9b17a;
	--aoh-line: #ccd2c7;
	--aoh-line-soft: #dde1d7;
	--aoh-shadow: 0 1px 2px rgba(26, 36, 31, 0.06), 0 8px 24px rgba(26, 36, 31, 0.06);
	--aoh-focus: #8f7130;
	--aoh-danger: #8a1f1f;
}

:root[data-theme="dark"] {
	--aoh-bg: #0f1512;
	--aoh-surface: #181f1a;
	--aoh-surface-2: #141b16;
	--aoh-ink: #e9ebe3;
	--aoh-ink-soft: #a9b3a8;
	--aoh-ink-faint: #7c867c;
	--aoh-brand: #7cb99a;
	--aoh-brand-2: #98cbaf;
	--aoh-brand-ink: #0f1512;
	--aoh-gold: #c9a961;
	--aoh-gold-text: #c9a961;
	--aoh-gold-line: #6b5a30;
	--aoh-line: #2a332c;
	--aoh-line-soft: #222a24;
	--aoh-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
	--aoh-focus: #ffd166;
	--aoh-danger: #f2a3a3;
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */

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

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

body.aoh-archive {
	margin: 0;
	font-family: var(--aoh-font-sans);
	font-size: 1rem; /* = 18px given the 112.5% root above */
	line-height: var(--aoh-line-height);
	color: var(--aoh-ink);
	background: var(--aoh-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
svg {
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--aoh-font-serif);
	line-height: var(--aoh-line-height-tight);
	color: var(--aoh-ink);
	font-weight: 600;
	margin: 0 0 var(--aoh-space-4);
}

h1 {
	font-size: 2.2rem;
}

h2 {
	font-size: 1.6rem;
}

h3 {
	font-size: 1.25rem;
}

h4 {
	font-size: 1.1rem;
}

p {
	margin: 0 0 var(--aoh-space-4);
}

ul,
ol {
	margin: 0 0 var(--aoh-space-4);
	padding-left: 1.4em;
}

a {
	color: var(--aoh-brand);
	text-underline-offset: 3px;
	text-decoration-thickness: max(1px, 0.08em);
}

a:visited {
	color: var(--aoh-brand-2);
}

a:hover,
a:active {
	color: var(--aoh-brand-2);
}

/* Visible-focus is a hard WCAG 2.1 AA requirement. Applied broadly (not just
   :focus-visible) because many WP core widgets don't opt into
   :focus-visible-only styling reliably. */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
summary:focus,
[tabindex]:focus {
	outline: 3px solid var(--aoh-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
	outline: 3px solid var(--aoh-focus);
	outline-offset: 2px;
}

hr {
	border: none;
	border-top: var(--aoh-border-width) solid var(--aoh-line);
	margin: var(--aoh-space-6) 0;
}

table {
	border-collapse: collapse;
	width: 100%;
}

/* ==========================================================================
   3. Global utilities
   ========================================================================== */

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

.aoh-container {
	max-width: var(--aoh-maxw);
	margin-inline: auto;
	padding-inline: var(--aoh-space-5);
}

@media (max-width: 40em) {
	.aoh-container {
		padding-inline: var(--aoh-space-4);
	}
}

.aoh-main {
	padding-block: var(--aoh-space-6);
	min-height: 40vh;
}

.aoh-eyebrow {
	display: inline-block;
	font-family: var(--aoh-font-sans);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--aoh-gold-text);
	font-weight: 700;
}

.aoh-mono {
	font-family: var(--aoh-font-mono);
}

.aoh-tnum {
	font-variant-numeric: tabular-nums;
}

.aoh-callout {
	background: color-mix(in srgb, var(--aoh-gold) 8%, var(--aoh-surface));
	background: var(--aoh-surface-2);
	border: var(--aoh-border-width) solid var(--aoh-gold-line);
	border-left-width: 4px;
	border-radius: var(--aoh-radius-sm);
	padding: var(--aoh-space-4) var(--aoh-space-5);
	margin: 0;
}

.aoh-callout p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   4. Skip link
   ========================================================================== */

.aoh-skip-link {
	position: absolute;
	top: -3rem;
	left: var(--aoh-space-4);
	z-index: 1000;
	background: var(--aoh-brand);
	color: var(--aoh-brand-ink);
	padding: var(--aoh-space-3) var(--aoh-space-5);
	border-radius: 0 0 var(--aoh-radius-sm) var(--aoh-radius-sm);
	font-weight: 700;
	text-decoration: none;
	transition: top 0.15s ease-in-out;
}

.aoh-skip-link:focus {
	top: 0;
	outline-offset: -3px;
}

/* ==========================================================================
   5. Masthead & primary nav
   ========================================================================== */

.aoh-utility {
	background: var(--aoh-chrome-bg);
	color: var(--aoh-chrome-ink);
	font-size: 0.78rem;
}

.aoh-utility__founding {
	color: var(--aoh-chrome-ink-soft);
}

.aoh-utility__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: var(--aoh-space-3);
	padding-block: 7px;
}

.aoh-utility__return {
	color: var(--aoh-chrome-ink);
	opacity: 0.9;
	text-decoration: none;
}

.aoh-utility__return:hover,
.aoh-utility__return:focus {
	opacity: 1;
	text-decoration: underline;
}

.aoh-site-header {
	border-bottom: var(--aoh-border-width) solid var(--aoh-line);
	background: var(--aoh-surface);
}

.aoh-masthead {
	border-top: 3px solid var(--aoh-gold-line);
	background: var(--aoh-surface);
}

.aoh-masthead__brandrow {
	display: flex;
	align-items: center;
	gap: var(--aoh-space-5);
	padding: var(--aoh-space-6) 0 var(--aoh-space-5);
}

/* Header treatment B: the seal stands on its own — no gold ring, no circular
 * crop or background — so the emblem's own border frames it and its detail
 * shows at a larger size. */
.aoh-emblem {
	width: 66px;
	height: 66px;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	color: var(--aoh-brand);
	font-family: var(--aoh-font-serif);
	font-weight: 700;
	font-size: 1.4rem;
	letter-spacing: 0.02em;
}

/* Show any logo (bundled seal or a Customizer upload) whole, never cropped. */
.aoh-emblem img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.aoh-emblem__seal {
	object-fit: contain;
}

.aoh-wordmark {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.aoh-wordmark__name {
	font-family: var(--aoh-font-serif);
	font-size: 1.6rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--aoh-ink);
	text-decoration: none;
	display: inline-block;
}

.aoh-wordmark__tagline {
	font-family: var(--aoh-font-sans);
	font-size: 0.8rem;
	color: var(--aoh-ink-soft);
	letter-spacing: 0.02em;
	margin: 0;
}

.aoh-primary-nav {
	border-top: var(--aoh-border-width) solid var(--aoh-line-soft);
}

.aoh-primary-nav__inner {
	display: flex;
	align-items: center;
}

.aoh-primary-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.aoh-primary-nav__item {
	display: block;
}

.aoh-primary-nav__link {
	display: inline-block;
	font-family: var(--aoh-font-sans);
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--aoh-ink-soft);
	text-decoration: none;
	padding: 13px 16px;
	border-bottom: 2px solid transparent;
}

.aoh-primary-nav__link:hover,
.aoh-primary-nav__link:focus {
	color: var(--aoh-brand);
}

.aoh-primary-nav__link[aria-current="page"] {
	color: var(--aoh-brand);
	border-bottom-color: var(--aoh-gold);
	font-weight: 700;
}

.aoh-primary-nav__search {
	margin-inline-start: auto;
	align-self: center;
	color: var(--aoh-ink-faint);
	font-size: 0.85rem;
	padding-inline: 12px;
	text-decoration: none;
}

.aoh-primary-nav__search:hover,
.aoh-primary-nav__search:focus {
	color: var(--aoh-brand);
}

@media (max-width: 51.25em) {
	.aoh-primary-nav__inner {
		flex-wrap: wrap;
	}

	.aoh-primary-nav__list {
		flex-wrap: wrap;
	}

	.aoh-primary-nav__search {
		margin-inline-start: 0;
		flex-basis: 100%;
		padding-block: var(--aoh-space-2);
	}
}

/* ==========================================================================
   6. Hero, searchbar, stats
   ========================================================================== */

.aoh-hero {
	padding: 52px 0 40px;
	background: var(--aoh-surface);
	background: linear-gradient(180deg, color-mix(in srgb, var(--aoh-brand) 6%, var(--aoh-surface)), var(--aoh-surface));
	border-bottom: var(--aoh-border-width) solid var(--aoh-line);
}

.aoh-hero .aoh-eyebrow {
	margin-bottom: var(--aoh-space-3);
}

.aoh-hero__title {
	font-size: 2.5rem;
	max-width: 16ch;
	margin-bottom: var(--aoh-space-3);
	text-wrap: balance;
}

.aoh-hero__lede {
	font-family: var(--aoh-font-serif);
	font-size: 1.16rem;
	color: var(--aoh-ink-soft);
	max-width: 56ch;
	margin-bottom: var(--aoh-space-6);
}

.aoh-searchbar {
	max-width: 620px;
}

/* Only the input + submit form the rounded pill; the scope note sits outside it
   so it is never squeezed into the flex row or clipped by overflow:hidden. */
.aoh-searchbar__row {
	display: flex;
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-radius: var(--aoh-radius);
	background: var(--aoh-surface);
	overflow: hidden;
	box-shadow: var(--aoh-shadow);
}

.aoh-searchbar__note {
	margin: var(--aoh-space-3) 0 0;
	font-size: 0.85rem;
	color: var(--aoh-ink-faint);
	max-width: 60ch;
}

.aoh-searchbar__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 15px 18px;
	font-size: 1rem;
	color: var(--aoh-ink);
	font-family: var(--aoh-font-sans);
	border-radius: 0;
}

.aoh-searchbar__input:focus {
	outline: 2px solid var(--aoh-brand);
	outline-offset: -2px;
}

.aoh-searchbar__submit {
	border: 0;
	background: var(--aoh-brand);
	color: var(--aoh-brand-ink);
	font-weight: 600;
	padding: 0 22px;
	font-size: 0.95rem;
	cursor: pointer;
	font-family: var(--aoh-font-sans);
}

.aoh-searchbar__submit:hover,
.aoh-searchbar__submit:focus {
	background: var(--aoh-brand-2);
	color: var(--aoh-brand-ink);
}

.aoh-searchhints {
	margin-top: var(--aoh-space-3);
	font-size: 0.85rem;
	color: var(--aoh-ink-faint);
}

.aoh-searchhints a {
	color: var(--aoh-brand-2);
}

.aoh-stats {
	display: flex;
	flex-wrap: wrap;
	border-top: var(--aoh-border-width) solid var(--aoh-line);
	background: var(--aoh-surface-2);
}

.aoh-stat {
	flex: 1;
	min-width: 150px;
	padding: 20px var(--aoh-space-5);
	border-right: var(--aoh-border-width) solid var(--aoh-line-soft);
}

.aoh-stat:last-child {
	border-right: 0;
}

.aoh-stat__value {
	font-family: var(--aoh-font-serif);
	font-size: 1.7rem;
	color: var(--aoh-brand);
	line-height: 1;
}

.aoh-stat__label {
	font-size: 0.78rem;
	color: var(--aoh-ink-soft);
	margin-top: var(--aoh-space-2);
	letter-spacing: 0.02em;
}

/* ==========================================================================
   7. Section heads, browse cards, material-type list
   ========================================================================== */

.aoh-block {
	padding-block: var(--aoh-space-7);
}

/* Consecutive sections must not stack top+bottom padding — that doubling (plus
 * each callout's own margin) is what left a huge gap between the stacked
 * callouts (How to use / What you won't find / Scope & sources). Collapse the
 * following section's top padding so every section gap is one consistent rhythm. */
.aoh-block + .aoh-block {
	padding-top: 0;
}

.aoh-sechead {
	display: flex;
	align-items: baseline;
	gap: var(--aoh-space-4);
	margin-bottom: var(--aoh-space-6);
	flex-wrap: wrap;
}

.aoh-sechead h2 {
	font-size: 1.5rem;
	margin: 0;
}

.aoh-sechead__rule {
	flex: 1;
	height: 1px;
	background: var(--aoh-line);
	min-width: 2rem;
}

.aoh-sechead__more {
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--aoh-brand-2);
}

.aoh-browse {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--aoh-space-4);
}

.aoh-bcard {
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-radius: var(--aoh-radius);
	padding: var(--aoh-space-5);
	background: var(--aoh-surface);
	text-decoration: none;
	color: var(--aoh-ink);
	display: flex;
	flex-direction: column;
	gap: var(--aoh-space-2);
	transition: border-color 0.15s, transform 0.15s;
}

.aoh-bcard:hover,
.aoh-bcard:focus {
	border-color: var(--aoh-gold-line);
	transform: translateY(-2px);
}

.aoh-bcard__icon {
	font-size: 1.1rem;
}

.aoh-bcard__title {
	font-family: var(--aoh-font-serif);
	font-size: 1.12rem;
}

.aoh-bcard__caption {
	font-size: 0.82rem;
	color: var(--aoh-ink-faint);
}

.aoh-typelist {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--aoh-space-2) var(--aoh-space-7);
	margin-top: var(--aoh-space-2);
	list-style: none;
	padding: 0;
}

.aoh-typerow {
	display: flex;
	justify-content: space-between;
	gap: var(--aoh-space-3);
	padding: 9px 2px;
	border-bottom: 1px dotted var(--aoh-line);
	font-size: 0.92rem;
}

.aoh-typerow__label {
	color: var(--aoh-ink-soft);
}

.aoh-typerow__count {
	font-family: var(--aoh-font-mono);
	color: var(--aoh-brand-2);
}

/* ==========================================================================
   8. Breadcrumbs
   ========================================================================== */

.aoh-breadcrumbs {
	font-size: 0.85rem;
	color: var(--aoh-ink-faint);
	margin-bottom: var(--aoh-space-5);
}

.aoh-breadcrumbs__item {
	color: inherit;
}

.aoh-breadcrumbs__sep {
	margin-inline: var(--aoh-space-2);
	color: var(--aoh-line);
}

.aoh-breadcrumbs__current {
	color: var(--aoh-ink-soft);
	font-weight: 700;
}

/* ==========================================================================
   9. Buttons & generic form controls
   ========================================================================== */

.aoh-button,
.aoh-button--primary,
.aoh-button--secondary,
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--aoh-space-2);
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border-radius: 9px;
	border: var(--aoh-border-width) solid transparent;
	padding: 13px 22px;
	line-height: 1.2;
	font-size: 0.95rem;
}

.aoh-button--primary {
	background: var(--aoh-brand);
	color: var(--aoh-brand-ink);
	border-color: var(--aoh-brand);
}

.aoh-button--primary:hover,
.aoh-button--primary:focus {
	background: var(--aoh-brand-2);
	border-color: var(--aoh-brand-2);
	color: var(--aoh-brand-ink);
}

.aoh-button--primary:visited {
	color: var(--aoh-brand-ink);
}

.aoh-button--secondary {
	background: transparent;
	color: var(--aoh-brand);
	border-color: var(--aoh-line);
}

.aoh-button--secondary:hover,
.aoh-button--secondary:focus {
	background: var(--aoh-surface-2);
	border-color: var(--aoh-gold-line);
	color: var(--aoh-brand);
}

.aoh-button--small {
	padding: var(--aoh-space-2) var(--aoh-space-3);
	font-size: 0.85rem;
}

.aoh-form,
.aoh-form__field {
	max-width: 40rem;
}

.aoh-form__field {
	margin-bottom: var(--aoh-space-4);
	display: flex;
	flex-direction: column;
	gap: var(--aoh-space-2);
}

.aoh-form__label {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--aoh-ink-soft);
	font-weight: 700;
}

.aoh-form__help {
	color: var(--aoh-ink-faint);
	font-size: 0.85rem;
}

.aoh-form__error {
	color: var(--aoh-danger);
	font-size: 0.85rem;
	font-weight: 700;
}

.aoh-form__input,
.aoh-form__textarea,
.aoh-form__select,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
	font: inherit;
	color: var(--aoh-ink);
	background: var(--aoh-surface);
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-radius: 8px;
	padding: 11px 12px;
	width: 100%;
}

.aoh-form__input:focus,
.aoh-form__textarea:focus,
.aoh-form__select:focus,
input:focus,
textarea:focus,
select:focus {
	outline: 2px solid var(--aoh-brand);
	outline-offset: -1px;
}

input[type="checkbox"],
input[type="radio"] {
	width: 1.25em;
	height: 1.25em;
	accent-color: var(--aoh-brand);
}

label {
	cursor: pointer;
}

.aoh-form__tabs {
	display: flex;
	gap: var(--aoh-space-2);
	margin-bottom: var(--aoh-space-5);
	flex-wrap: wrap;
}

.aoh-form__tab {
	font-size: 0.85rem;
	font-weight: 600;
	padding: var(--aoh-space-2) var(--aoh-space-4);
	border-radius: 8px;
	border: var(--aoh-border-width) solid var(--aoh-line);
	color: var(--aoh-ink-soft);
	background: var(--aoh-surface);
	text-decoration: none;
	cursor: pointer;
}

.aoh-form__tab--on {
	background: var(--aoh-brand);
	color: var(--aoh-brand-ink);
	border-color: var(--aoh-brand);
}

/* ==========================================================================
   10. Facet sidebar (parts/facet-sidebar → aoh_render_facet_sidebar())
   ========================================================================== */

/*
 * The <aside> shell is Templates-owned; the inner <form> classes below are
 * emitted by aoh_render_facet_sidebar() (query squad, MODULE-CONTRACT §5.3).
 * These names are the styling↔query contract per UI-IMPLEMENTATION §1.5.
 */

.aoh-facet-sidebar {
	background: var(--aoh-surface);
}

.aoh-facet-sidebar__heading {
	font-size: 1.1rem;
	margin-bottom: var(--aoh-space-4);
}

.aoh-facets {
	background: var(--aoh-surface);
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-radius: var(--aoh-radius);
	padding: var(--aoh-space-5);
}

.aoh-facets__group {
	border: none;
	padding: 0;
	margin: 0 0 var(--aoh-space-5);
}

.aoh-facets__group:last-of-type {
	margin-bottom: var(--aoh-space-4);
}

.aoh-facets__group-title {
	font-weight: 700;
	font-family: var(--aoh-font-sans);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--aoh-ink-faint);
	margin: 0 0 var(--aoh-space-3);
	padding: 0;
}

.aoh-facets__option {
	display: flex;
	align-items: flex-start;
	gap: var(--aoh-space-2);
	padding-block: var(--aoh-space-1);
}

.aoh-facets__label {
	flex: 1;
	font-weight: 400;
	color: var(--aoh-ink-soft);
}

.aoh-facets__count {
	color: var(--aoh-ink-faint);
	font-family: var(--aoh-font-mono);
	font-variant-numeric: tabular-nums;
	font-size: 0.85rem;
}

.aoh-facets__actions {
	display: flex;
	gap: var(--aoh-space-3);
	flex-wrap: wrap;
	margin-top: var(--aoh-space-4);
}

.aoh-facets__reset {
	color: var(--aoh-ink-soft);
}

.aoh-active-filters {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: var(--aoh-space-2);
	margin: 0 0 var(--aoh-space-5);
	padding: 0;
	align-items: center;
}

.aoh-active-filters__pill {
	display: inline-flex;
	align-items: center;
	gap: var(--aoh-space-2);
	background: color-mix(in srgb, var(--aoh-brand) 12%, var(--aoh-surface));
	background: var(--aoh-surface-2);
	color: var(--aoh-brand-2);
	border-radius: 999px;
	padding: 3px 9px;
	font-size: 0.74rem;
	text-decoration: none;
	border: var(--aoh-border-width) solid var(--aoh-line-soft);
}

.aoh-active-filters__pill-remove {
	font-weight: 700;
}

.aoh-clear-filters {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--aoh-brand-2);
}

/* ==========================================================================
   11. Archive / search / taxonomy results layout
   ========================================================================== */

.aoh-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--aoh-space-6);
}

@media (min-width: 56em) {
	.aoh-layout {
		grid-template-columns: 18rem 1fr;
		align-items: start;
	}

	.aoh-facet-sidebar {
		position: sticky;
		top: var(--aoh-space-5);
	}
}

.aoh-archive-header {
	margin-bottom: var(--aoh-space-6);
	padding-bottom: var(--aoh-space-5);
	border-bottom: var(--aoh-border-width) solid var(--aoh-line);
}

.aoh-archive-header__title {
	font-size: 1.9rem;
}

.aoh-archive-header__intro {
	max-width: 60ch;
	color: var(--aoh-ink-soft);
	font-family: var(--aoh-font-serif);
	font-size: 1.05rem;
}

.aoh-result-count {
	color: var(--aoh-ink-faint);
	font-size: 0.92rem;
}

.aoh-result-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--aoh-space-4);
}

.aoh-no-results {
	background: var(--aoh-surface-2);
	border: var(--aoh-border-width) dashed var(--aoh-line);
	border-radius: var(--aoh-radius);
	padding: var(--aoh-space-6);
	text-align: center;
	color: var(--aoh-ink-soft);
}

.aoh-no-results__message {
	font-size: 1.05rem;
	color: var(--aoh-ink);
	font-weight: 600;
}

.aoh-no-results__scope {
	max-width: 52ch;
	margin-inline: auto;
}

.aoh-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aoh-space-2);
	margin-top: var(--aoh-space-6);
	list-style: none;
	padding: 0;
}

.aoh-pagination a,
.aoh-pagination span {
	display: inline-flex;
	min-width: 2.75rem;
	min-height: 2.75rem;
	align-items: center;
	justify-content: center;
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-radius: var(--aoh-radius-sm);
	text-decoration: none;
	padding: var(--aoh-space-2);
	color: var(--aoh-ink);
}

.aoh-pagination .current,
.aoh-pagination a:hover,
.aoh-pagination a:focus {
	background: var(--aoh-brand);
	border-color: var(--aoh-brand);
	color: var(--aoh-brand-ink);
	font-weight: 700;
}

/* ==========================================================================
   12. Result card (parts/result-card)
   ========================================================================== */

.aoh-card {
	background: var(--aoh-surface);
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-left: 4px solid var(--aoh-brand);
	border-radius: var(--aoh-radius);
	padding: var(--aoh-space-5);
}

.aoh-card__title {
	font-size: 1.2rem;
	margin: 0 0 var(--aoh-space-2);
	font-family: var(--aoh-font-serif);
}

.aoh-card__link {
	text-decoration: none;
	color: var(--aoh-ink);
}

.aoh-card__link:hover,
.aoh-card__link:focus {
	color: var(--aoh-brand);
	text-decoration: underline;
}

.aoh-card__subhead {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aoh-space-1) var(--aoh-space-4);
	color: var(--aoh-ink-faint);
	font-size: 0.9rem;
	margin: 0 0 var(--aoh-space-3);
}

.aoh-card__repo {
	color: var(--aoh-ink-soft);
}

.aoh-card__date {
	font-variant-numeric: tabular-nums;
}

.aoh-card__excerpt {
	margin: 0 0 var(--aoh-space-3);
	color: var(--aoh-ink-soft);
	font-family: var(--aoh-font-serif);
}

.aoh-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aoh-space-2);
	margin: 0 0 var(--aoh-space-3);
	list-style: none;
	padding: 0;
}

.aoh-card__tag,
.aoh-pill {
	display: inline-block;
	font-size: 0.74rem;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--aoh-surface-2);
	color: var(--aoh-brand-2);
	border: var(--aoh-border-width) solid var(--aoh-line-soft);
	font-weight: 600;
	text-decoration: none;
}

.aoh-card__accession {
	font-family: var(--aoh-font-mono);
	font-size: 0.82rem;
	color: var(--aoh-ink-faint);
}

.aoh-card__footer {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aoh-space-4);
	align-items: center;
}

/* ==========================================================================
   13. Single entry — finding-aid layout
   ========================================================================== */

.aoh-entry {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--aoh-space-6);
}

@media (min-width: 56em) {
	.aoh-entry {
		grid-template-columns: 1fr 300px;
		gap: 34px;
		align-items: start;
	}

	.aoh-entry__aside {
		position: sticky;
		top: var(--aoh-space-5);
	}
}

.aoh-entry__header {
	margin-bottom: var(--aoh-space-2);
}

.aoh-entry__pills {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aoh-space-2);
	margin: var(--aoh-space-2) 0 var(--aoh-space-3);
}

.aoh-acc-chip {
	display: inline-flex;
	align-items: center;
	gap: var(--aoh-space-2);
	font-family: var(--aoh-font-mono);
	font-size: 0.82rem;
	color: var(--aoh-gold-text);
	border: var(--aoh-border-width) solid var(--aoh-gold-line);
	border-radius: var(--aoh-radius-sm);
	padding: 4px 10px;
	letter-spacing: 0.03em;
	margin-bottom: var(--aoh-space-2);
}

.aoh-entry__title {
	font-size: 1.9rem;
	margin: 14px 0 4px;
}

.aoh-entry__daterange {
	font-family: var(--aoh-font-serif);
	font-style: italic;
	color: var(--aoh-ink-soft);
	font-size: 1.1rem;
	margin-bottom: var(--aoh-space-5);
}

.aoh-entry__rights {
	font-size: 0.88rem;
	color: var(--aoh-ink-faint);
	max-width: 62ch;
}

.aoh-desc {
	font-family: var(--aoh-font-serif);
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--aoh-ink);
	max-width: 62ch;
}

.aoh-desc__source {
	font-size: 0.85rem;
	color: var(--aoh-ink-faint);
	font-family: var(--aoh-font-sans);
	max-width: 62ch;
}

.aoh-entry__aside {
	border-left: var(--aoh-border-width) solid var(--aoh-line);
	padding-left: var(--aoh-space-6);
	display: flex;
	flex-direction: column;
}

@media (max-width: 55.9375em) {
	.aoh-entry__aside {
		border-left: 0;
		padding-left: 0;
		border-top: var(--aoh-border-width) solid var(--aoh-line);
		padding-top: var(--aoh-space-6);
	}
}

.aoh-cta {
	display: block;
	background: var(--aoh-brand);
	color: var(--aoh-brand-ink);
	text-decoration: none;
	text-align: center;
	font-weight: 600;
	padding: 14px;
	border-radius: var(--aoh-radius);
	margin-bottom: var(--aoh-space-3);
}

.aoh-cta:hover,
.aoh-cta:focus {
	background: var(--aoh-brand-2);
	color: var(--aoh-brand-ink);
}

.aoh-cta:visited {
	color: var(--aoh-brand-ink);
}

.aoh-cta--sub {
	background: transparent;
	color: var(--aoh-brand);
	border: var(--aoh-border-width) solid var(--aoh-line);
	font-weight: 600;
}

.aoh-cta--sub:hover,
.aoh-cta--sub:focus {
	background: var(--aoh-surface-2);
	color: var(--aoh-brand);
	border-color: var(--aoh-gold-line);
}

.aoh-cta--sub:visited {
	color: var(--aoh-brand);
}

.aoh-entry__related {
	margin-top: var(--aoh-space-7);
	padding-top: var(--aoh-space-5);
	border-top: var(--aoh-border-width) solid var(--aoh-line);
	max-width: 62ch;
}

.aoh-related__title {
	font-size: 1.1rem;
}

.aoh-related__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--aoh-space-2) var(--aoh-space-5);
}

.aoh-related__group {
	display: inline-flex;
	gap: var(--aoh-space-2);
	font-size: 0.9rem;
}

.aoh-related__label {
	color: var(--aoh-ink-faint);
}

/* ==========================================================================
   14. Entry metadata block (parts/entry-meta)
   ========================================================================== */

.aoh-entry-meta {
	width: 100%;
	margin: var(--aoh-space-2) 0 var(--aoh-space-6);
}

.aoh-entry-meta__heading {
	font-size: 0.95rem;
	color: var(--aoh-ink-faint);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-family: var(--aoh-font-sans);
	margin-bottom: var(--aoh-space-3);
}

.aoh-entry-meta__row {
	display: grid;
	grid-template-columns: minmax(9rem, 150px) 1fr;
	gap: var(--aoh-space-3);
	border-bottom: var(--aoh-border-width) solid var(--aoh-line-soft);
}

.aoh-entry-meta__row:last-child {
	border-bottom: none;
}

.aoh-entry-meta__label {
	padding: 11px 0;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--aoh-ink-faint);
	font-weight: 700;
	margin: 0;
}

.aoh-entry-meta__value {
	padding: 11px 0;
	font-size: 0.96rem;
	color: var(--aoh-ink);
	margin: 0;
}

.aoh-entry-meta__location {
	color: var(--aoh-ink-soft);
}

.aoh-entry-meta__row--notice .aoh-entry-meta__value {
	color: var(--aoh-danger);
	font-weight: 700;
}

@media (max-width: 40em) {
	.aoh-entry-meta__row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.aoh-entry-meta__label {
		padding-bottom: 0;
	}

	.aoh-entry-meta__value {
		padding-top: var(--aoh-space-1);
	}
}

/* ==========================================================================
   15. Citation block (parts/citation)
   ========================================================================== */

.aoh-citation {
	margin-top: var(--aoh-space-5);
	background: var(--aoh-surface-2);
	border: var(--aoh-border-width) solid var(--aoh-line-soft);
	border-radius: var(--aoh-radius);
	padding: var(--aoh-space-5);
}

.aoh-citation__heading {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--aoh-ink-faint);
	font-weight: 700;
	margin-bottom: var(--aoh-space-3);
	font-family: var(--aoh-font-sans);
}

.aoh-citation__figure {
	margin: 0;
}

.aoh-citation__text {
	font-family: var(--aoh-font-serif);
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--aoh-ink-soft);
	background: transparent;
	border: none;
	padding: 0;
	margin: 0 0 var(--aoh-space-3);
	white-space: pre-wrap;
	word-break: break-word;
	display: block;
}

.aoh-citation__caption {
	font-size: 0.78rem;
	color: var(--aoh-ink-faint);
}

.aoh-citation__note {
	margin-top: var(--aoh-space-3);
	padding-top: var(--aoh-space-3);
	border-top: 1px dashed var(--aoh-line);
	font-size: 0.85rem;
	color: var(--aoh-ink-faint);
}

/* The copy button is progressive enhancement — see facets.js. Without JS it
   is simply not injected/shown; the citation text stays selectable by hand. */
.aoh-citation__copy {
	margin-top: var(--aoh-space-2);
}

.aoh-citation__copy[data-copied="true"] {
	background: var(--aoh-brand-2);
	border-color: var(--aoh-brand-2);
	color: var(--aoh-brand-ink);
}

/* ==========================================================================
   16. Outbound repository link (parts/outbound-link)
   ========================================================================== */

.aoh-outbound {
	margin-bottom: var(--aoh-space-3);
}

.aoh-outbound__link {
	/* Adopts the .aoh-cta look inside the aside rail. */
	display: block;
	background: var(--aoh-brand);
	color: var(--aoh-brand-ink);
	text-decoration: none;
	text-align: center;
	font-weight: 600;
	padding: 14px;
	border-radius: var(--aoh-radius);
}

.aoh-outbound__link:hover,
.aoh-outbound__link:focus {
	background: var(--aoh-brand-2);
	color: var(--aoh-brand-ink);
}

.aoh-outbound__link:visited {
	color: var(--aoh-brand-ink);
}

.aoh-outbound__label {
	display: block;
}

.aoh-outbound__domain {
	display: block;
	margin-top: var(--aoh-space-1);
	font-size: 0.85rem;
	font-weight: 400;
	opacity: 0.85;
}

.aoh-outbound__hint {
	display: block;
	margin-top: var(--aoh-space-2);
	font-size: 0.78rem;
	color: var(--aoh-ink-faint);
	font-weight: 400;
}

/* ==========================================================================
   17. Related links & feedback CTA
   ========================================================================== */

.aoh-feedback-cta {
	background: var(--aoh-surface-2);
	border: var(--aoh-border-width) solid var(--aoh-gold-line);
	border-radius: var(--aoh-radius);
	padding: var(--aoh-space-5);
	text-align: center;
	margin-top: var(--aoh-space-6);
}

.aoh-feedback-cta p {
	margin-bottom: var(--aoh-space-3);
}

/* ==========================================================================
   18. Repository card & quicklinks
   ========================================================================== */

.aoh-repo-card {
	background: var(--aoh-surface);
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-radius: var(--aoh-radius);
	padding: var(--aoh-space-5);
}

.aoh-repo-card__name {
	margin-bottom: var(--aoh-space-2);
	font-family: var(--aoh-font-serif);
}

.aoh-repo-card__meta {
	color: var(--aoh-ink-faint);
	font-size: 0.9rem;
	margin-bottom: var(--aoh-space-3);
}

.aoh-quicklinks {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
	gap: var(--aoh-space-4);
	margin: var(--aoh-space-6) 0;
	padding: 0;
}

.aoh-quicklinks__item a {
	display: block;
	background: var(--aoh-surface);
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-radius: var(--aoh-radius);
	padding: var(--aoh-space-4);
	text-decoration: none;
	font-weight: 700;
	color: var(--aoh-brand);
	text-align: center;
}

.aoh-quicklinks__item a:hover,
.aoh-quicklinks__item a:focus {
	border-color: var(--aoh-gold-line);
	background: var(--aoh-surface-2);
}

/* ==========================================================================
   19. About — scholarly prose
   ========================================================================== */

.aoh-prose {
	max-width: 66ch;
}

.aoh-prose .aoh-eyebrow {
	display: block;
	margin-bottom: var(--aoh-space-3);
}

.aoh-prose h2 {
	font-size: 2rem;
	margin-bottom: var(--aoh-space-2);
}

.aoh-prose__sub {
	color: var(--aoh-ink-soft);
	font-family: var(--aoh-font-serif);
	font-style: italic;
	margin-bottom: var(--aoh-space-6);
}

.aoh-prose p {
	font-family: var(--aoh-font-serif);
	font-size: 1.08rem;
	line-height: 1.72;
	margin-bottom: var(--aoh-space-5);
	color: var(--aoh-ink);
}

.aoh-prose--dropcap > p:first-of-type::first-letter {
	font-size: 3.2rem;
	line-height: 0.8;
	float: left;
	padding: 6px 10px 0 0;
	color: var(--aoh-brand);
	font-weight: 600;
}

/* ==========================================================================
   20. Contribute — intro/format card + form
   ========================================================================== */

.aoh-contrib {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--aoh-space-7);
}

@media (max-width: 51.25em) {
	.aoh-contrib {
		grid-template-columns: 1fr;
	}
}

.aoh-fmt {
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-radius: var(--aoh-radius);
	background: var(--aoh-surface-2);
	padding: var(--aoh-space-6);
}

.aoh-fmt h3 {
	font-size: 1.15rem;
	margin-bottom: var(--aoh-space-2);
}

.aoh-fmt__list {
	margin: var(--aoh-space-4) 0 0;
	padding-left: 20px;
}

.aoh-fmt__list li {
	margin-bottom: var(--aoh-space-3);
	font-size: 0.92rem;
	color: var(--aoh-ink-soft);
}

.aoh-fmt__list li b {
	color: var(--aoh-ink);
	font-family: var(--aoh-font-sans);
}

/* ==========================================================================
   21. Footer
   ========================================================================== */

.aoh-site-footer {
	background: var(--aoh-chrome-bg);
	color: var(--aoh-chrome-ink);
	padding-block: var(--aoh-space-6);
	margin-top: var(--aoh-space-8);
}

.aoh-site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aoh-space-7);
	justify-content: space-between;
}

.aoh-site-footer__col {
	max-width: 34ch;
}

.aoh-site-footer__heading {
	font-family: var(--aoh-font-serif);
	font-size: 1.05rem;
	margin-bottom: var(--aoh-space-3);
	color: var(--aoh-chrome-ink);
}

.aoh-site-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.aoh-site-footer a,
.aoh-site-footer p {
	color: var(--aoh-chrome-ink-soft);
	font-size: 0.86rem;
	text-decoration: none;
	line-height: 1.9;
	display: block;
}

.aoh-site-footer a:hover,
.aoh-site-footer a:focus {
	color: var(--aoh-chrome-ink);
	text-decoration: underline;
}

.aoh-site-footer__fine {
	color: var(--aoh-chrome-ink-soft);
	font-size: 0.78rem;
	margin-top: var(--aoh-space-6);
	border-top: 1px solid var(--aoh-chrome-line);
	padding-top: var(--aoh-space-4);
}

/* ==========================================================================
   22. Small-screen refinements
   ========================================================================== */

@media (max-width: 51.25em) {
	.aoh-browse {
		grid-template-columns: repeat(2, 1fr);
	}

	.aoh-typelist {
		grid-template-columns: 1fr;
	}

	.aoh-hero__title {
		font-size: 2rem;
	}
}

@media (max-width: 40em) {
	h1 {
		font-size: 1.7rem;
	}

	h2 {
		font-size: 1.35rem;
	}

	.aoh-masthead__brandrow {
		padding-block: var(--aoh-space-5) var(--aoh-space-4);
	}

	.aoh-hero {
		padding-block: var(--aoh-space-6);
	}

	.aoh-hero__title {
		font-size: 1.7rem;
	}

	.aoh-browse {
		grid-template-columns: 1fr;
	}

	.aoh-block {
		padding-block: var(--aoh-space-6);
	}
}

/* ==========================================================================
   23. Forced-colors / high-contrast mode
   ========================================================================== */

@media (forced-colors: active) {
	.aoh-card,
	.aoh-facets,
	.aoh-entry-meta,
	.aoh-citation,
	.aoh-outbound__link,
	.aoh-repo-card,
	.aoh-feedback-cta,
	.aoh-bcard,
	.aoh-fmt,
	.aoh-acc-chip {
		border: 1px solid CanvasText;
	}

	.aoh-button--primary,
	.aoh-cta,
	.aoh-searchbar__submit {
		border: 1px solid ButtonText;
	}
}

/* ---------------------------------------------------------------------------
 * 24. Feedback / Contribute form
 * The feedback plugin emits .aoh-feedback__* markup and .aoh-btn buttons.
 * These rules were added by the orchestrator to reconcile the plugin's
 * form classes with the theme (QA finding: styling<->feedback class contract).
 * ------------------------------------------------------------------------- */
.aoh-feedback {
	max-width: 42rem;
}
.aoh-feedback__form {
	display: flex;
	flex-direction: column;
	gap: var(--aoh-space-4);
}
.aoh-feedback__field {
	display: flex;
	flex-direction: column;
	gap: var(--aoh-space-2);
}
.aoh-feedback__field label,
.aoh-feedback__regarding label {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	color: var(--aoh-ink-soft);
}
.aoh-feedback__field input[type="text"],
.aoh-feedback__field input[type="email"],
.aoh-feedback__field input[type="url"],
.aoh-feedback__field select,
.aoh-feedback__field textarea,
.aoh-feedback__regarding input,
.aoh-feedback__regarding select {
	width: 100%;
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-radius: var(--aoh-radius-sm);
	background: var(--aoh-surface);
	padding: 0.7rem 0.75rem;
	font-family: var(--aoh-font-sans);
	font-size: 0.95rem;
	color: var(--aoh-ink);
}
.aoh-feedback__field textarea {
	min-height: 7rem;
	resize: vertical;
}
.aoh-feedback__field input:focus-visible,
.aoh-feedback__field select:focus-visible,
.aoh-feedback__field textarea:focus-visible,
.aoh-feedback__regarding input:focus-visible,
.aoh-feedback__regarding select:focus-visible {
	outline: 2px solid var(--aoh-focus);
	outline-offset: 1px;
}
.aoh-feedback__hint {
	font-size: 0.82rem;
	color: var(--aoh-ink-faint);
}
.aoh-feedback__required {
	color: var(--aoh-danger);
	margin-inline-start: 0.15em;
}
.aoh-feedback__regarding {
	display: flex;
	flex-direction: column;
	gap: var(--aoh-space-2);
	padding: var(--aoh-space-4);
	background: var(--aoh-surface-2);
	border: var(--aoh-border-width) solid var(--aoh-line-soft);
	border-radius: var(--aoh-radius);
}
/* Honeypot: must be invisible and unfocusable for humans, present for bots. */
.aoh-feedback__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.aoh-feedback__notice {
	padding: var(--aoh-space-3) var(--aoh-space-4);
	border-radius: var(--aoh-radius-sm);
	border: var(--aoh-border-width) solid var(--aoh-line);
	font-size: 0.92rem;
}
.aoh-feedback__notice--success {
	background: color-mix(in srgb, var(--aoh-brand) 10%, var(--aoh-surface));
	border-color: var(--aoh-brand-2);
	color: var(--aoh-ink);
}
.aoh-feedback__notice--error {
	background: color-mix(in srgb, var(--aoh-danger) 12%, var(--aoh-surface));
	border-color: var(--aoh-danger);
	color: var(--aoh-ink);
}
.aoh-feedback__submit {
	margin: 0;
}

/* Buttons (plugin submit uses .aoh-btn / .aoh-btn--primary) */
.aoh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--aoh-space-2);
	font-family: var(--aoh-font-sans);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	padding: 0.8rem 1.4rem;
	border-radius: var(--aoh-radius-sm);
	border: var(--aoh-border-width) solid var(--aoh-line);
	background: var(--aoh-surface);
	color: var(--aoh-ink);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.aoh-btn:hover {
	border-color: var(--aoh-gold-line);
}
.aoh-btn:focus-visible {
	outline: 2px solid var(--aoh-focus);
	outline-offset: 2px;
}
.aoh-btn--primary {
	background: var(--aoh-brand);
	border-color: var(--aoh-brand);
	color: var(--aoh-brand-ink);
}
.aoh-btn--primary:hover {
	background: var(--aoh-brand-2);
	border-color: var(--aoh-brand-2);
}
@media (prefers-reduced-motion: reduce) {
	.aoh-btn {
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
 * 25. Mobile navigation disclosure + chrome focus
 * The nav ships open with a hidden toggle (no-JS = plain wrapping menu). With
 * JS (html.js) the toggle appears on small screens and collapses the menu.
 * ------------------------------------------------------------------------- */
.aoh-nav-toggle {
	display: none; /* shown only on small screens when JS is present */
	align-items: center;
	gap: 0.6rem;
	margin-block: 8px;
	padding: 10px 14px;
	background: transparent;
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-radius: var(--aoh-radius-sm);
	font: 600 0.9rem/1 var(--aoh-font-sans);
	color: var(--aoh-ink);
	cursor: pointer;
}
.aoh-nav-toggle:hover {
	border-color: var(--aoh-gold-line);
}
.aoh-nav-toggle:focus-visible {
	outline: 2px solid var(--aoh-focus);
	outline-offset: 2px;
}
.aoh-nav-toggle__bars,
.aoh-nav-toggle__bars::before,
.aoh-nav-toggle__bars::after {
	display: block;
	width: 20px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}
.aoh-nav-toggle__bars {
	position: relative;
}
.aoh-nav-toggle__bars::before,
.aoh-nav-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}
.aoh-nav-toggle__bars::before { top: -6px; }
.aoh-nav-toggle__bars::after { top: 6px; }

@media (max-width: 51.25em) {
	.js .aoh-nav-toggle {
		display: inline-flex;
	}
	.js .aoh-primary-nav__inner {
		flex-wrap: wrap;
	}
	/* Collapsed: hide the menu + search until the toggle opens them. */
	.js .aoh-primary-nav:not(.is-open) .aoh-primary-nav__list,
	.js .aoh-primary-nav:not(.is-open) .aoh-primary-nav__search {
		display: none;
	}
	/* Expanded: stack the items full-width as a simple, tappable list. */
	.js .aoh-primary-nav.is-open .aoh-primary-nav__list {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		flex-basis: 100%;
		width: 100%;
		gap: 0;
		padding-bottom: var(--aoh-space-2);
	}
	.js .aoh-primary-nav.is-open .aoh-primary-nav__item {
		border-top: var(--aoh-border-width) solid var(--aoh-line-soft);
	}
	.js .aoh-primary-nav.is-open .aoh-primary-nav__link {
		display: block;
		padding: 12px 4px;
	}
	.js .aoh-primary-nav.is-open .aoh-primary-nav__search {
		flex-basis: 100%;
		width: 100%;
		margin-inline-start: 0;
		padding: 12px 4px;
		border-top: var(--aoh-border-width) solid var(--aoh-line-soft);
	}
}

/* Keyboard focus ring for links on the dark green chrome (utility bar + footer),
 * where the default focus outline can wash out. */
.aoh-utility a:focus-visible,
.aoh-site-footer a:focus-visible {
	outline: 2px solid var(--aoh-chrome-ink);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------------------------------------------------------------------------
 * 26. Facet dropdown (repository facet uses a <select> — too many terms for
 * checkboxes). Styled to match the other form controls.
 * ------------------------------------------------------------------------- */
.aoh-facet__select {
	width: 100%;
	margin-top: 0.35rem;
	padding: 0.55rem 0.6rem;
	border: var(--aoh-border-width) solid var(--aoh-line);
	border-radius: var(--aoh-radius-sm);
	background: var(--aoh-surface);
	color: var(--aoh-ink);
	font-family: var(--aoh-font-sans);
	font-size: 0.92rem;
}
.aoh-facet__select:focus-visible {
	outline: 2px solid var(--aoh-focus);
	outline-offset: 1px;
}

/* ---------------------------------------------------------------------------
 * 27. Collapsible facet groups (native <details>/<summary>)
 * Styles the classes the query renderer actually emits (aoh-facet__*), and
 * turns each filter group into a compact accordion. Collapsed by default;
 * groups with an active selection render open (see query-facet-render.php).
 * ------------------------------------------------------------------------- */
.aoh-facet {
	border-top: var(--aoh-border-width) solid var(--aoh-line-soft);
	margin: 0;
	padding: 0;
}
.aoh-facet:first-of-type {
	border-top: 0;
}

/* Summary = the clickable group header. */
.aoh-facet__legend {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--aoh-space-2);
	cursor: pointer;
	list-style: none; /* remove default disclosure triangle */
	padding: var(--aoh-space-3) 0;
	font-family: var(--aoh-font-sans);
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--aoh-ink-soft);
}
.aoh-facet__legend::-webkit-details-marker { display: none; }
.aoh-facet__legend::after {
	content: "+";
	font-size: 1.15rem;
	font-weight: 400;
	line-height: 1;
	color: var(--aoh-gold-text);
}
.aoh-facet[open] > .aoh-facet__legend::after {
	content: "\2212"; /* minus */
}
.aoh-facet__legend:focus-visible {
	outline: 2px solid var(--aoh-focus);
	outline-offset: 2px;
}

.aoh-facet__body {
	padding-bottom: var(--aoh-space-3);
}

/* Checkbox list within a group. */
.aoh-facet__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--aoh-space-1);
	max-height: 15rem;
	overflow-y: auto; /* long lists (e.g. State) scroll rather than sprawl */
}
.aoh-facet__item { margin: 0; }
.aoh-facet__label {
	display: flex;
	align-items: flex-start;
	gap: var(--aoh-space-2);
	font-size: 0.92rem;
	color: var(--aoh-ink-soft);
	cursor: pointer;
	padding-block: 0.15rem;
}
.aoh-facet__checkbox {
	margin-top: 0.2rem;
	flex: 0 0 auto;
	accent-color: var(--aoh-brand);
}
.aoh-facet__name { flex: 1; }
.aoh-facet__count {
	color: var(--aoh-ink-faint);
	font-family: var(--aoh-font-mono);
	font-variant-numeric: tabular-nums;
	font-size: 0.85rem;
}
