/* Auto-generated by scripts/sync-global-css.mjs — do not edit public/css/global.css */

/* Non-critical styles — async via /css/global.css (see BaseLayout). */

/* In-flow links stay blue at rest; hover uses secondary teal (not another “action blue”). */
main a:hover,
footer a:hover {
	color: color-mix(in srgb, var(--app-accent-secondary-color) 70%, var(--app-text-color) 30%);
}


/* Footer: mirrors header rhythm – wide = 3 columns; narrow = copyright + locale row, nav full-width below */
.site-footer__inner-shell {
	max-width: 52rem;
	margin-inline: auto;
	width: 100%;
	box-sizing: border-box;
	padding: 0 1.25rem;
}

.site-footer__grid {
	display: grid;
	width: 100%;
	box-sizing: border-box;
	align-items: center;
	column-gap: 1rem;
	row-gap: 0.85rem;
	grid-template-columns: 1fr auto;
	grid-template-areas:
		'copy locale'
		'nav nav';
}

.site-footer__copyright {
	grid-area: copy;
	margin: 0;
	color: var(--app-muted-color);
	justify-self: start;
}

.site-footer__locale {
	grid-area: locale;
	justify-self: end;
	display: flex;
	align-items: center;
}

.site-footer__subnav {
	grid-area: nav;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.35rem 1rem;
	margin-top: 0;
	font-size: 0.84rem;
	text-align: center;
}

.site-footer .site-footer__subnav {
	margin-top: 0;
}

@media (min-width: 48rem) {
	.site-footer__grid {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas: 'copy nav locale';
		row-gap: 0;
		column-gap: 1.5rem;
	}

	.site-footer__subnav {
		justify-content: center;
	}
}


/* Prose: hover expands `title`; optional link to /abbreviations/ handled in content */
main :not(pre) abbr[title] {
	text-decoration: underline dotted;
	text-underline-offset: 0.12em;
	cursor: help;
}


.site-footer__subnav a {
	color: var(--app-muted-color);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.site-footer__subnav a:hover {
	color: var(--app-text-color);
}


/* Off-site http(s): small "opens elsewhere" arrow (skip storyofai.net + local dev hosts). */
:is(main, footer, header)
	a[href^='http://']:not([href^='http://storyofai.net']):not([href^='http://localhost']):not([href^='http://127.0.0.1'])::after,
:is(main, footer, header)
	a[href^='https://']:not([href^='https://storyofai.net']):not([href^='https://localhost']):not(
			[href^='https://127.0.0.1']
		)::after {
	content: '\00a0↗';
	font-size: 0.82em;
	opacity: 0.85;
	text-decoration: none;
	display: inline-block;
}


h3 {
	font-size: 1.2rem;
	line-height: 1.3;
	font-weight: 600;
	margin: 1.35rem 0 0.4rem;
}

main article h2 {
	margin: 2rem 0 0.5rem;
}

h4 {
	font-size: 1.0875rem;
	line-height: 1.32;
	font-weight: 600;
	margin: 1.15rem 0 0.35rem;
}

h5 {
	font-size: 1rem;
	line-height: 1.32;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.045em;
	margin: 1.05rem 0 0.32rem;
	color: var(--app-muted-color);
}

h6 {
	font-size: 0.9375rem;
	line-height: 1.35;
	font-weight: 600;
	margin: 0.95rem 0 0.3rem;
	color: var(--app-muted-color);
}

p {
	margin: 0 0 1rem;
}

ul,
ol {
	margin: 0 0 1rem;
	padding-left: 1.25rem;
}

blockquote {
	border-left: 5px solid var(--app-border-color);
	margin-left: 0;
	padding-left: 1rem;
}

code {
	font-size: 0.92em;
	background: var(--app-surface-color);
	padding: 0.1em 0.35em;
	border-radius: 4px;
	border: 1px solid var(--app-border-color);
}

.muted {
	color: var(--app-muted-color);
	font-size: 0.9rem;
}

.hyphens-auto {
	hyphens: auto;
	overflow-wrap: break-word;
}

input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not([type='file']):not([type='hidden']):not([type='button']):not([type='submit']):not([type='reset']):focus,
textarea:focus,
input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not([type='file']):not([type='hidden']):not([type='button']):not([type='submit']):not([type='reset']):focus-visible,
textarea:focus-visible {
	outline: none;
	border-color: var(--app-accent-secondary-color);
}

/* Buttons — P1T027: hover uses teal secondary; variant shape (solid / outline / ghost) stays the same. */
button:focus,
button:focus-visible {
	outline: none;
}

.btn-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 0.5rem 0.95rem;
	border-radius: 10px;
	border: 1px solid transparent;
	font-family: inherit;
	font-size: inherit;
	line-height: 1.25;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.btn-action:hover {
	text-decoration: none;
}

.btn-action:focus-visible {
	outline: none;
}

/* Primary: solid sky; hover/focus fill → secondary teal */
.btn-action--primary {
	background: var(--app-accent-color);
	color: var(--app-bg-color);
	border-color: transparent;
}

.btn-action--primary:hover,
.btn-action--primary:focus-visible {
	background: var(--app-accent-secondary-color);
	color: var(--app-bg-color);
	border-color: transparent;
}

/* Outline: sky ring; hover/focus ring + label → teal */
.btn-action--outline {
	background: transparent;
	color: var(--app-accent-color);
	border-color: var(--app-accent-color);
}

.btn-action--outline:hover,
.btn-action--outline:focus-visible {
	background: transparent;
	color: var(--app-accent-secondary-color);
	border-color: var(--app-accent-secondary-color);
}

.btn-action--ghost {
	background: transparent;
	color: var(--app-muted-color);
	border-color: var(--app-border-color);
}

/* Ghost: hover/focus = green border only (text/bg unchanged). */
.btn-action--ghost:hover,
.btn-action--ghost:focus-visible {
	color: var(--app-muted-color);
	background: transparent;
	border-color: var(--app-accent-secondary-color);
}


/* Site search overlay (lazy-loaded index) */
.site-search {
	margin: 0;
	padding: 0;
	border: none;
	max-width: none;
	max-height: none;
	width: 100%;
	height: 100%;
	background: color-mix(in srgb, var(--app-bg-color) 55%, transparent);
	backdrop-filter: blur(2px);
}

.site-search::backdrop {
	background: color-mix(in srgb, var(--app-bg-color) 55%, transparent);
	backdrop-filter: blur(2px);
}

.site-search__panel {
	box-sizing: border-box;
	width: min(36rem, calc(100% - 2rem));
	margin: clamp(4.5rem, 12vh, 7rem) auto 2rem;
	padding: 1rem 1rem 0.85rem;
	border: 1px solid var(--app-border-color);
	border-radius: 12px;
	background: var(--app-surface-color);
	box-shadow: 0 18px 48px -16px color-mix(in srgb, #000 50%, black);
}

.site-search__header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.site-search__form {
	flex: 1;
	min-width: 0;
}

.site-search__input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--app-border-color);
	border-radius: 8px;
	background: var(--app-bg-color);
	color: var(--app-text-color);
	font: inherit;
	font-size: 1rem;
	line-height: 1.3;
}

.site-search__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	min-width: 2.5rem;
	min-height: 2.5rem;
	padding: 0.25rem;
	border: 1px solid var(--app-border-color);
	border-radius: 8px;
	background: transparent;
	color: var(--app-muted-color);
	cursor: pointer;
}

.site-search__close:hover,
.site-search__close:focus-visible {
	border-color: var(--app-accent-secondary-color);
	color: var(--app-accent-secondary-color);
}

.site-search__close:focus-visible {
	outline: none;
}

.site-search__status {
	margin: 0.65rem 0 0;
	font-size: 0.85rem;
	color: var(--app-muted-color);
}

.site-search__results {
	margin-top: 0.35rem;
	max-height: min(52vh, 28rem);
	overflow: auto;
	background:
		linear-gradient(var(--app-surface-color) 12%, transparent) center top,
		linear-gradient(transparent, var(--app-surface-color) 88%) center bottom,
		linear-gradient(color-mix(in srgb, #000 16%, transparent), transparent) center top,
		linear-gradient(transparent, color-mix(in srgb, #000 16%, transparent)) center bottom;
	background-repeat: no-repeat;
	background-size:
		100% 3rem,
		100% 3.25rem,
		100% 1.1rem,
		100% 1.75rem;
	background-attachment: local, local, scroll, scroll;
}

.site-search__group {
	margin-top: 0.85rem;
	padding-top: 1rem;
	border-top: 1px solid color-mix(in srgb, var(--app-border-color) 65%, transparent);
}

.site-search__group-title {
	margin: 0 0 0.35rem;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--app-muted-color);
}

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

.site-search__hit {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.55rem 0.45rem;
	border-radius: 8px;
	color: var(--app-text-color);
	text-decoration: none;
}

.site-search__hit:hover,
.site-search__hit:focus-visible {
	background: color-mix(in srgb, var(--app-accent-color) 8%, transparent);
	text-decoration: none;
	outline: none;
}

.site-search__hit-title {
	font-weight: 600;
	line-height: 1.25;
}

.site-search__hit-desc {
	font-size: 0.88rem;
	line-height: 1.35;
	color: var(--app-muted-color);
}

