/* Senior Citizen Journal
   One family (Literata), stone ground, near-black ink, oxblood accent.
   Text hangs from one axis at 5/12 of the grid; sections are told apart by flat fields. */

@font-face {
	font-family: "Literata";
	src: url("/fonts/literata-latin.woff2") format("woff2");
	font-weight: 400 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Literata";
	src: url("/fonts/literata-latin-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

:root {
	--bg: #f4f3ef;
	--surface: #e8e6e0;
	--ink: #1a1918;
	--muted: #57534e;
	--accent: #8b1e1e;
	--accent-strong: #6e1515;
	--accent-ink: #ffffff;
	--field-ox: #6e1515;
	--field-ox-ink: #f7efe9;
	--field-ox-muted: #e3cbc3;
	--field-ink: #1a1918;
	--field-ink-ink: #f4f3ef;
	--field-ink-muted: #bdb8b0;

	--font: "Literata", Georgia, "Times New Roman", serif;

	--step-small: clamp(0.875rem, 0.84rem + 0.12vw, 0.9375rem);
	--step-body: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
	--step-lead: clamp(1.3125rem, 1.15rem + 0.7vw, 1.75rem);
	--step-head: clamp(2rem, 1.3rem + 2.6vw, 3.75rem);
	--step-display: clamp(2.125rem, 1.2rem + 4.2vw, 5.5rem);

	--margin: clamp(1rem, 2.6vw, 2.5rem);
	--gutter: clamp(1rem, 2vw, 2rem);
	--section: clamp(4rem, 2.5rem + 4.5vw, 7.5rem);
	--measure: 66ch;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: var(--step-body);
	line-height: 1.6;
	font-kerning: normal;
	font-optical-sizing: auto;
	text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; hyphens: none; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 0.07em; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip-link {
	position: absolute;
	left: var(--margin);
	top: -100px;
	z-index: 50;
	background: var(--accent);
	color: var(--accent-ink);
	padding: 0.6rem 1rem;
	text-decoration: none;
}
.skip-link:focus { top: 0.5rem; color: var(--accent-ink); }

/* ---------- Frame and grid ---------- */

.wrap { width: 100%; max-width: 1760px; margin-inline: auto; padding-inline: var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.side { grid-column: 1 / 5; }
.main { grid-column: 6 / 13; }
.full { grid-column: 1 / -1; }

.band { padding-block: var(--section); }
.band + .band { padding-top: var(--section); }
.field-surface { background: var(--surface); }
.field-ox { background: var(--field-ox); color: var(--field-ox-ink); }
.field-ox a:hover { color: var(--field-ox-ink); text-decoration-thickness: 0.12em; }
.field-ink { background: var(--field-ink); color: var(--field-ink-ink); }
.field-ink a:hover { color: var(--field-ink-ink); text-decoration-thickness: 0.12em; }
.field-ox ::selection, .field-ink ::selection { background: var(--field-ox-ink); color: var(--field-ox); }
.field-ox :focus-visible, .field-ink :focus-visible { outline-color: var(--field-ox-ink); }

.muted { color: var(--muted); }
.field-ox .muted { color: var(--field-ox-muted); }
.field-ink .muted { color: var(--field-ink-muted); }

.heading { font-size: var(--step-head); letter-spacing: -0.03em; line-height: 1.04; max-width: 22ch; }
.lead { font-size: var(--step-lead); line-height: 1.4; max-width: 44ch; }
.small { font-size: var(--step-small); line-height: 1.5; }

.button {
	display: inline-block;
	background: var(--accent);
	color: var(--accent-ink);
	font: 600 1.0625rem/1.2 var(--font);
	padding: 1rem 1.5rem;
	text-decoration: none;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 160ms ease, transform 160ms ease;
}
.button:hover { background: var(--accent-strong); color: var(--accent-ink); }
.button:active { transform: translateY(1px); }

.text-link { font-weight: 600; }

/* ---------- Header ---------- */

.site-header { position: relative; z-index: 20; background: var(--bg); }
.site-header .bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: 5.5rem;
	padding-block: 1rem;
}
.wordmark { display: block; text-decoration: none; color: var(--ink); line-height: 1.1; flex-shrink: 0; }
.wordmark:hover { color: var(--ink); }
.wordmark .name { display: block; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.wordmark .name em { font-style: normal; color: var(--accent); }
.wordmark .tagline { display: block; font-size: var(--step-small); color: var(--muted); margin-top: 0.15rem; }
.site-title { margin: 0; font: inherit; letter-spacing: inherit; }

.primary-nav > ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; list-style: none; align-items: center; justify-content: flex-end; }
.primary-nav > ul > li { position: relative; }
.primary-nav a { text-decoration: none; font-size: 1.0625rem; display: inline-block; padding-block: 0.5rem; }
.primary-nav > ul > li > a[aria-current="page"], .primary-nav > ul > li.current > a { color: var(--accent); }
.primary-nav .sub {
	display: none;
	position: absolute;
	top: 100%;
	left: -1.25rem;
	width: 22rem;
	list-style: none;
	background: var(--bg);
	padding: 0.75rem 1.25rem 1rem;
	box-shadow: 0 18px 40px rgba(26, 25, 24, 0.16);
}
.primary-nav li:hover > .sub, .primary-nav li:focus-within > .sub { display: block; }
.primary-nav .sub a { font-size: 1rem; line-height: 1.35; padding-block: 0.4rem; display: block; }
.primary-nav .sub a:hover { color: var(--accent); }
.primary-nav .nav-search a { font-weight: 600; }
.primary-nav .sheet-search { display: none; }

.menu-toggle {
	display: none;
	background: var(--ink);
	color: var(--bg);
	border: 0;
	border-radius: 0;
	font: 600 1.0625rem/1 var(--font);
	padding: 0.85rem 1.1rem;
	min-height: 48px;
	cursor: pointer;
}

/* ---------- Home ---------- */

.masthead { padding-block: clamp(1.5rem, 0.75rem + 3vw, 3.5rem) clamp(3rem, 2rem + 3vw, 5rem); }
.masthead h1 {
	grid-column: 1 / -1;
	font-size: var(--step-display);
	font-weight: 500;
	line-height: 0.92;
	letter-spacing: -0.045em;
	margin-left: -0.04em;
}
.masthead h1 span { white-space: nowrap; }
.masthead .side { align-self: end; margin-top: clamp(2rem, 4vw, 3.5rem); }
.masthead .main { margin-top: clamp(2rem, 4vw, 3.5rem); }
.masthead .lead { margin-bottom: 2rem; }

.today .main .heading { margin-bottom: 2.5rem; }
.today .story-title { display: block; font-size: var(--step-lead); font-weight: 600; line-height: 1.25; text-decoration: none; max-width: 30ch; }
.today .story-title:hover { text-decoration: underline; }
.today .story-date { margin: 0.5rem 0 1.5rem; }
.today .story-body p { max-width: var(--measure); }
.today .story-body p + p { margin-top: 0.9em; }
.today .story-more { margin-top: 1.75rem; }
.today .side h3 { font-size: var(--step-lead); font-weight: 600; margin-bottom: 1rem; }
.today .side li { list-style: none; margin-bottom: 0.7rem; line-height: 1.35; }
.today .side a { text-decoration: none; }
.today .side a:hover { text-decoration: underline; }
.today .side .text-link { display: inline-block; margin-top: 0.75rem; text-decoration: underline; }

.rows .main > .heading { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.row { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; padding-block: 1.25rem; }
.row + .row { margin-top: 0.5rem; }
.row .row-meta { grid-column: 1 / 5; padding-top: 0.3rem; }
.row .row-text { grid-column: 6 / 13; }
.row h3, .row h2 { font-size: var(--step-lead); font-weight: 600; line-height: 1.25; max-width: 34ch; }
.row h3 a, .row h2 a { text-decoration: none; }
.row h3 a:hover, .row h2 a:hover { text-decoration: underline; color: inherit; }
.row p { margin-top: 0.5rem; max-width: var(--measure); }
.rows .more { grid-column: 6 / 13; margin-top: 2rem; }

.trio .heading { grid-column: 6 / 13; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.trio .col { grid-column: span 4; }
.trio .col h3 { font-size: var(--step-lead); font-weight: 600; margin-bottom: 1.5rem; }
.trio .col h3 a { text-decoration: none; }
.trio .col h3 a:hover { text-decoration: underline; color: inherit; }
.trio .col article + article { margin-top: 2rem; }
.trio .col h4 { font-size: var(--step-body); font-weight: 600; line-height: 1.3; }
.trio .col h4 a { text-decoration: none; }
.trio .col h4 a:hover { text-decoration: underline; }
.trio .col p { margin-top: 0.4rem; }

.about .side img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.about .main .heading { margin-bottom: 2rem; }
.about .main p { max-width: var(--measure); }
.about .main p + p { margin-top: 0.9em; }
.about .main .text-link { display: inline-block; margin-top: 1.75rem; }

.sections-index.band { padding-bottom: 0; }
.sections-index .heading { grid-column: 6 / 13; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sections-index .list { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem var(--gutter); list-style: none; }
.sections-index .list > li > a { font-size: var(--step-lead); font-weight: 600; text-decoration: none; line-height: 1.2; }
.sections-index .list > li > a:hover { text-decoration: underline; }
.sections-index .list ul { list-style: none; margin-top: 0.85rem; }
.sections-index .list ul li { margin-bottom: 0.45rem; line-height: 1.35; }
.sections-index .list ul a { text-decoration: none; }
.sections-index .list ul a:hover { text-decoration: underline; }

/* ---------- Articles and pages ---------- */

.article-head { padding-block: clamp(2.5rem, 1.5rem + 4vw, 6rem) clamp(2rem, 4vw, 3.5rem); }
.article-head h1 { grid-column: 6 / 13; font-size: var(--step-head); letter-spacing: -0.03em; line-height: 1.06; max-width: 24ch; }
.article-head .standfirst { grid-column: 6 / 13; margin-top: 1.5rem; }
.article-body { padding-bottom: var(--section); row-gap: 2rem; }
.article-meta { align-self: start; position: sticky; top: 2rem; }
.article-meta dl { margin: 0; display: grid; gap: 1rem; }
.article-meta dt { font-size: var(--step-small); color: var(--muted); }
.article-meta dd { margin: 0.1rem 0 0; font-size: var(--step-small); line-height: 1.45; }
.article-meta dd a { text-decoration: underline; }

.prose { min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose li { max-width: var(--measure); }
.prose h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.125rem); font-weight: 600; letter-spacing: -0.02em; margin-top: 2.2em; max-width: 30ch; }
.prose h3, .prose h4, .prose h5, .prose h6 { font-size: var(--step-lead); font-weight: 600; margin-top: 1.9em; max-width: 34ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.7em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 600; }
.prose blockquote { margin-inline: 0; background: var(--surface); padding: 1.25rem 1.5rem; max-width: var(--measure); }
.prose blockquote > * + * { margin-top: 0.8em; }
.prose figure { margin-inline: 0; max-width: var(--measure); }
.prose figcaption { font-size: var(--step-small); color: var(--muted); margin-top: 0.6rem; line-height: 1.45; }
.prose img { background: var(--surface); }
.prose .alignleft, .prose .alignright { max-width: min(45%, 320px); }
.prose .alignleft { float: left; margin: 0.4em 1.5rem 1rem 0; }
.prose .alignright { float: right; margin: 0.4em 0 1rem 1.5rem; }
.prose .aligncenter { margin-inline: auto; }
.prose::after { content: ""; display: table; clear: both; }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--step-small); }
.prose td, .prose th { border: 1px solid var(--surface); padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
.prose sup { line-height: 0; }

.tags { margin-top: 2.5rem; font-size: var(--step-small); color: var(--muted); max-width: var(--measure); }
.tags a { color: var(--ink); }

.children-list { list-style: none; padding: 0 !important; columns: 2; column-gap: var(--gutter); }
.children-list li { break-inside: avoid; margin-bottom: 0.75rem; line-height: 1.35; }

.related .heading { grid-column: 6 / 13; margin-bottom: clamp(2rem, 4vw, 3rem); }

/* ---------- Listings ---------- */

.listing-head { padding-block: clamp(2.5rem, 1.5rem + 4vw, 6rem) clamp(1.5rem, 3vw, 2.5rem); }
.listing-head h1 { grid-column: 6 / 13; font-size: var(--step-head); letter-spacing: -0.03em; line-height: 1.04; max-width: 22ch; }
.listing-head .lead { grid-column: 6 / 13; margin-top: 1.25rem; }
.listing { padding-bottom: var(--section); }
.pagination { grid-column: 6 / 13; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; padding: 0 0.9rem; text-decoration: none; background: var(--surface); }
.pagination a:hover { background: var(--ink); color: var(--bg); }
.pagination span[aria-current] { background: var(--ink); color: var(--bg); font-weight: 600; }

.search-form { display: flex; gap: 0.5rem; max-width: 40rem; margin-top: 1.5rem; }
.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	font: inherit;
	font-size: var(--step-body);
	color: var(--ink);
	background: var(--surface);
	border: 0;
	border-radius: 0;
	padding: 0.85rem 1rem;
	min-height: 52px;
}
.search-form input[type="search"]::placeholder { color: var(--muted); }
.search-form label { position: absolute; left: -9999px; }
.search-results { display: contents; }
.listing-head .search-form { grid-column: 6 / 13; }
.search-empty { grid-column: 6 / 13; }

/* ---------- Footer ---------- */

.site-footer { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem) 1.5rem; font-size: var(--step-small); line-height: 1.5; }
.site-footer .cols { grid-column: 5 / 13; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.6fr); gap: 1.5rem var(--gutter); }
.site-footer .intro { grid-column: 1 / 4; max-width: 30ch; }
.site-footer .footer-brand { display: block; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 0.6rem; }
.site-footer h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; letter-spacing: 0; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.3rem; line-height: 1.35; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .years { margin-top: 0.6rem; }
.site-footer .years li { margin-bottom: 0.3rem; }
.site-footer summary { cursor: pointer; text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.18em; min-height: 32px; }
.site-footer summary:hover { text-decoration-thickness: 0.12em; }
.site-footer .years span { font-weight: 600; margin-right: 0.35rem; }
.site-footer .years a { text-decoration: underline; text-decoration-thickness: 0.05em; }
.footer-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; margin-top: 2rem; }

/* ---------- Smaller screens ---------- */

@media (max-width: 1180px) {
	.menu-toggle { display: inline-block; }
	.primary-nav { display: none; }
	.site-header.open .primary-nav {
		display: block;
		position: fixed;
		inset: 0;
		top: 0;
		overflow-y: auto;
		background: var(--bg);
		padding: 6.5rem var(--margin) 3rem;
		z-index: 15;
	}
	.site-header.open .bar { position: relative; z-index: 16; }
	.site-header.open .primary-nav > ul { display: block; }
	.site-header.open .primary-nav > ul > li > a { font-size: var(--step-lead); font-weight: 600; padding-block: 0.6rem; }
	.primary-nav .sub, .primary-nav li:hover > .sub, .primary-nav li:focus-within > .sub { display: none; }
	.primary-nav .nav-search { display: none; }
	.primary-nav .sheet-search { display: flex; margin: 0 0 1.5rem; }
	body.nav-open { overflow: hidden; }
}

@media (max-width: 900px) {
	.side, .main, .row .row-meta, .row .row-text, .trio .heading, .trio .col, .rows .more,
	.sections-index .heading, .related .heading, .article-head h1, .article-head .standfirst,
	.listing-head h1, .listing-head .lead, .listing-head .search-form, .search-empty, .pagination, .site-footer .cols, .site-footer .intro {
		grid-column: 1 / -1;
	}
	.masthead .side { order: 2; }
	.today .side { order: 2; margin-top: 3.5rem; }
	.about .side { margin-bottom: 2.5rem; }
	.about .side img { max-width: 360px; }
	.row .row-meta { padding-top: 0; margin-bottom: 0.35rem; }
	.trio .col + .col { margin-top: 3rem; }
	.sections-index .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.article-meta { order: 2; position: static; }
	.article-meta dl { grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--surface); padding: 1.25rem; }
	.site-footer .intro { margin-bottom: 1.75rem; }
}

@media (max-width: 600px) {
	.site-header .bar { min-height: 4.5rem; gap: 1rem; }
	.wordmark .name { font-size: 1.25rem; }
	.wordmark .tagline { display: none; }
	.sections-index .list { grid-template-columns: 1fr; gap: 2.5rem; }
	.children-list { columns: 1; }
	.site-footer .cols { grid-template-columns: 1fr 1fr; }
	.site-footer .cols > :last-child { grid-column: 1 / -1; }
	.prose .alignleft, .prose .alignright { float: none; max-width: 100%; margin: 1rem 0; }
	.article-meta dl { grid-template-columns: 1fr; }
	.search-form { flex-direction: column; }
	.search-form .button { width: 100%; }
}

@media (max-width: 380px) {
	.wordmark { flex-shrink: 1; min-width: 0; }
	.wordmark .name { font-size: 1.0625rem; }
	.menu-toggle { padding-inline: 0.9rem; flex-shrink: 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
	.site-header, .site-footer, .related, .skip-link { display: none !important; }
	body { background: #fff; }
	.side, .main { grid-column: 1 / -1; }
}
