/* TheBiglerFamily.com - warm, readable family archive */
:root {
	--bg: #fbf6ec;
	--paper: #fffdf8;
	--ink: #2b211b;
	--ink-muted: #6b5a4d;
	--rule: #e3d6c1;
	--accent: #8a3f1f;
	--accent-dark: #66300f;
	--sand: #f1e4cb;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 1.125rem/1.7 Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
main { flex: 1; padding-bottom: 3rem; }
.wrap { width: min(62rem, calc(100% - 2rem)); margin: 0 auto; }
.wrap.narrow { width: min(46rem, calc(100% - 2rem)); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover, a:focus-visible { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.25; color: var(--ink); }
img, video, iframe { max-width: 100%; }
img { height: auto; }
.visually-hidden {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: .5rem 1rem; z-index: 20000; }
.skip-link:focus { left: 0; }

.site-header { background: var(--sand); border-bottom: 3px solid var(--accent); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding: .9rem 0; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 1.6rem; font-weight: 700; color: var(--accent-dark); }
.brand-tag { font-size: .9rem; color: var(--ink-muted); font-style: italic; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: 1rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent-dark); }

.crumbs { font-size: .9rem; color: var(--ink-muted); margin: 1.25rem 0 .5rem; }
.crumbs a { color: var(--ink-muted); }

.hero { text-align: center; padding: 2.5rem 0 1.25rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.1rem); margin: 0; color: var(--accent-dark); }
.hero-tag { font-size: 1.25rem; font-style: italic; color: var(--ink-muted); margin: .25rem 0 1rem; }
.hero-note { max-width: 36rem; margin: 0 auto 1.5rem; }
.search-form { display: flex; gap: .5rem; max-width: 30rem; margin: 0 auto 1.25rem; }
.search-form input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: .55rem .8rem; border: 1px solid var(--rule); border-radius: .4rem; background: var(--paper); color: var(--ink); }
.search-form button { font: inherit; font-size: 1rem; padding: .55rem 1.1rem; border: 0; border-radius: .4rem; background: var(--accent); color: #fff; cursor: pointer; }
.search-form button:hover, .search-form button:focus-visible { background: var(--accent-dark); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0; font-size: .95rem; }
.chip { text-decoration: none; background: var(--paper); border: 1px solid var(--rule); border-radius: 2rem; padding: .15rem .8rem; }
.chip span { color: var(--ink-muted); font-size: .85rem; }
.chip:hover, .chip:focus-visible { border-color: var(--accent); }

.page-head { margin: 1rem 0 1rem; }
.page-head h1, .post-head h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin: .25rem 0; }
.lede, .meta, .post-meta { color: var(--ink-muted); margin: 0; font-size: 1rem; }
.year h2 { border-bottom: 1px solid var(--rule); padding-bottom: .25rem; margin: 2rem 0 1rem; color: var(--accent-dark); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: .6rem; padding: 1rem 1.15rem; }
.card-title { margin: 0 0 .15rem; font-size: 1.2rem; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-meta { margin: 0 0 .5rem; font-size: .9rem; color: var(--ink-muted); }
.card-excerpt { margin: 0 0 .5rem; font-size: 1rem; line-height: 1.55; }
.card .post-terms__cats { margin: 0; font-size: .85rem; color: var(--ink-muted); }

.post { background: var(--paper); border: 1px solid var(--rule); border-radius: .6rem; padding: 1.25rem 1.5rem 1.5rem; margin-top: .75rem; }
.post-head { margin-bottom: 1rem; }
.post-body { overflow-wrap: anywhere; }
.post-body::after { content: ""; display: block; clear: both; }
.post-body img { border-radius: .25rem; }
.post-body .alignleft, .post-body img[align="left"] { float: left; margin: .25rem 1.25rem .75rem 0; }
.post-body .alignright, .post-body img[align="right"] { float: right; margin: .25rem 0 .75rem 1.25rem; }
.post-body .aligncenter { display: block; margin: 1rem auto; }
.post-body blockquote { margin: 1rem 0; padding: .25rem 1rem; border-left: 4px solid var(--rule); color: var(--ink-muted); }
.post-body table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.post-body td, .post-body th { border: 1px solid var(--rule); padding: .3rem .6rem; vertical-align: top; }
.post-body figure { margin: 1rem 0; }
.post-body figcaption { font-size: .9rem; color: var(--ink-muted); }
.wp-video { max-width: 100% !important; width: auto !important; }
.post-body video { width: 100%; height: auto; max-width: 640px; background: #000; }
.post-body iframe { aspect-ratio: 16 / 9; width: 100%; max-width: 640px; height: auto; border: 0; }
.post-body .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; clear: both; margin: 1.25rem 0; }
.post-body .gallery figure { margin: 0; }
.post-body .gallery img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.post-body .gallery-icon { line-height: 0; }
.post-body input[type="image"] { max-width: 100%; }
.post-terms { border-top: 1px solid var(--rule); margin-top: 1.5rem; padding-top: .75rem; font-size: .95rem; color: var(--ink-muted); }
.post-terms p { margin: .15rem 0; }

.comments { margin-top: 2rem; }
.comments h2 { font-size: 1.5rem; }
.comments-note { color: var(--ink-muted); font-size: .95rem; margin-top: 0; }
.comment-list, .comment-children { list-style: none; margin: 0; padding: 0; }
.comment-children { margin-left: 1.25rem; padding-left: 1rem; border-left: 3px solid var(--rule); }
.comment { margin: 1rem 0; }
.comment article { background: var(--paper); border: 1px solid var(--rule); border-radius: .5rem; padding: .75rem 1rem; }
.comment-head { font-size: .95rem; margin-bottom: .25rem; }
.comment-head time { color: var(--ink-muted); margin-left: .5rem; }
.comment-body { overflow-wrap: anywhere; }
.comment-body p { margin: .4rem 0; }

.post-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2rem; font-size: 1rem; }
.post-nav a { display: block; max-width: 24rem; text-decoration: none; background: var(--paper); border: 1px solid var(--rule); border-radius: .5rem; padding: .6rem 1rem; }
.post-nav a span { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); }
.post-nav__next { margin-left: auto; text-align: right; }

.site-footer { background: #2b211b; color: #e8dcc8; padding: 1.5rem 0; font-size: .95rem; text-align: center; }
.site-footer p { margin: .3rem 0; }
.site-footer a { color: #fff; }
.footer-credit { margin-top: .4rem; }
.footer-credit-trigger { color: #e8dcc8; }

@media (max-width: 600px) {
	body { font-size: 1.05rem; }
	.post { padding: 1rem; }
	.post-body .alignleft, .post-body .alignright, .post-body img[align] { float: none; display: block; margin: .75rem auto; }
	.cards { grid-template-columns: 1fr; }
}

/* Redoubt Ads slot (same markup and loader as joelevi.com article pages) */
.post-body--rs-rail {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 160px;
	column-gap: 1.25rem;
	align-items: stretch;
}
.post-body--rs-rail > .post-body__main {
	min-width: 0;
	grid-column: 1;
}
.rs-inset {
	margin: 2rem 0 1.5rem;
	text-align: center;
}
.rs-inset[hidden] {
	display: none;
}
.rs-inset--rail {
	grid-column: 2;
	align-self: stretch;
	width: 160px;
	max-width: 160px;
	margin: 0;
	text-align: center;
}
.rs-inset--rail .rs-inset__sticky {
	position: sticky;
	top: var(--rs-inset-sticky-top, 1rem);
	z-index: 2;
}
/* sal.js rotate-in entrance for the slot (custom data-sal value; sal has no rotate preset).
   The loader adds data-sal only after sal.js starts, so the slot is never left hidden.
   Rail layouts animate the sticky inner box rather than the full-height rail column. */
.rs-inset[data-sal="rotate-in"],
.rs-inset [data-sal="rotate-in"] {
	opacity: 0;
	transform: rotate(-6deg) scale(0.9);
	transform-origin: 50% 50%;
	transition-property: opacity, transform;
	transition-duration: var(--sal-duration, 0.7s);
	transition-delay: var(--sal-delay, 0s);
	transition-timing-function: var(--sal-easing, cubic-bezier(0.175, 0.885, 0.32, 1.275));
}
.rs-inset[data-sal="rotate-in"].sal-animate,
.rs-inset [data-sal="rotate-in"].sal-animate,
body.sal-disabled .rs-inset[data-sal="rotate-in"],
body.sal-disabled .rs-inset [data-sal="rotate-in"] {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	.rs-inset[data-sal="rotate-in"],
	.rs-inset [data-sal="rotate-in"] {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
.rs-inset__label {
	margin: 0 0 0.35rem;
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-muted);
}
.rs-inset__frame {
	display: flex;
	justify-content: center;
	width: 100%;
	min-height: 250px;
}
.rs-inset--rail .rs-inset__frame {
	width: 160px;
	min-height: 600px;
}
.rs-inset__note {
	box-sizing: border-box;
	width: 100%;
	max-width: 728px;
	padding: 0.75rem 1rem;
	border: 1px solid var(--rule);
	border-radius: 0.5rem;
	color: var(--ink-muted);
	font-size: 0.9rem;
	line-height: 1.45;
	text-align: left;
}
.rs-inset__note p {
	margin: 0;
}
/* Contribution note styled as a warning (Bootstrap alert-warning equivalent, scoped to the note).
   Shimmer stops when the reader prefers reduced motion. */
.rs-inset__note.alert-warning {
	position: relative;
	overflow: hidden;
	margin: 0;
	border: 1px solid #ffda6a;
	background: #fff3cd;
	color: #664d03;
	box-shadow: 0 0.25rem 0.9rem rgba(102, 77, 3, 0.3);
}
.rs-inset__note.alert-warning a {
	color: #523e02;
	font-weight: 700;
	text-decoration: underline;
}
.rs-inset__note.alert-warning::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	pointer-events: none;
	background: linear-gradient(100deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 60%) no-repeat;
	background-size: 300% 100%;
	animation: rs-inset-shimmer 3.5s ease-in-out infinite;
}
.rs-inset__icon {
	display: inline-block;
	width: 1.1em;
	height: 1.1em;
	margin-right: 0.35em;
	vertical-align: -0.15em;
	fill: currentColor;
}
@keyframes rs-inset-shimmer {
	0% {
		background-position: 100% 0;
	}
	70%,
	100% {
		background-position: 0 0;
	}
}
@media (prefers-reduced-motion: reduce) {
	.rs-inset__note.alert-warning::after {
		animation: none;
		display: none;
	}
}
