/* Tupelo Free Press. Plain CSS, no web fonts, no JavaScript. WCAG AA contrast. */
:root {
  --bg: #fffdf8;
  --text: #1c1b19;
  --muted: #55524b;
  --rule: #ddd8cc;
  --accent: #7a1f1f;
  --panel: #f4f0e6;
  --link: #7a1f1f;
  --focus: #1a5fb4;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --text: #ebe8e1;
    --muted: #b5b0a5;
    --rule: #3a3731;
    --accent: #f0a59b;
    --panel: #1f1d1a;
    --link: #f3b3aa;
    --focus: #8cc4ff;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.125rem/1.6 var(--serif);
}
.wrap { max-width: 42rem; margin: 0 auto; padding: 0 1rem; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--bg); padding: 0.5rem 1rem; }
.skip:focus { left: 0.5rem; z-index: 1; }

/* Masthead */
.masthead { border-bottom: 3px double var(--rule); font-family: var(--sans); }
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.5rem; padding-top: 1rem; padding-bottom: 0.75rem; }
.brand { font: 700 1.6rem/1.2 var(--serif); color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1rem; }
nav a { display: inline-block; padding: 0.4rem 0; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
nav a[aria-current="page"] { color: var(--text); border-bottom: 2px solid var(--accent); }
main { padding-top: 1.5rem; padding-bottom: 3rem; }

/* Type */
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.5vw, 2.4rem); margin: 0.25rem 0 0.5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.5rem; }
p { margin: 0 0 1rem; }
.kicker, .meta, .cite, .byline, .list .when, .doc-list, .small, table { font-family: var(--sans); }
.kicker { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; font-weight: 700; color: var(--accent); margin: 0; }
.dek { font-size: 1.2rem; color: var(--muted); margin-bottom: 1rem; }
.meta, .small { font-size: 0.9rem; color: var(--muted); }

/* Byline block (docs/EDITORIAL.md) */
.byline { display: flex; gap: 0.75rem; align-items: center; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0.75rem 0; margin: 1rem 0; font-size: 0.92rem; line-height: 1.45; }
.byline img { flex: none; width: 40px; height: 40px; }
.byline p { margin: 0; }

/* Sources under each paragraph: one tap away */
.cite { font-size: 0.85rem; color: var(--muted); margin: -0.6rem 0 1.25rem; }
.cite span { font-weight: 600; }
.cite a { display: inline-block; padding: 0.2rem 0.45rem; margin: 0.1rem 0.15rem 0.1rem 0; border: 1px solid var(--rule); border-radius: 4px; text-decoration: none; min-height: 1.75rem; }
.cite a:hover { border-color: var(--link); }

ul.items { padding-left: 1.2rem; font-size: 1rem; }
ul.items li { margin-bottom: 0.5rem; }

/* "How this story was made" and update notes */
.how, .notice { background: var(--panel); border-left: 4px solid var(--accent); padding: 0.25rem 1.25rem 0.75rem; margin: 2.5rem 0 1rem; font-size: 1rem; }
.how h2 { margin-top: 1rem; font-size: 1.15rem; }
.how ul.sources { padding-left: 1.2rem; font-family: var(--sans); font-size: 0.92rem; }
.notice { margin: 0 0 1.5rem; }
.notice h2 { font-size: 1rem; margin: 0.75rem 0 0.25rem; font-family: var(--sans); }

/* Lists of stories and meetings */
.list { list-style: none; padding: 0; margin: 0; }
.list li { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.list h2, .list h3 { margin: 0.15rem 0 0.35rem; font-size: 1.3rem; }
.list h3 { font-size: 1.1rem; }
.list h2 a, .list h3 a { color: var(--text); text-decoration: none; }
.list h2 a:hover, .list h3 a:hover { text-decoration: underline; }
.list p { margin: 0; }
.list .when { font-size: 0.85rem; color: var(--muted); }
.doc-list { padding-left: 1.2rem; }
.doc-list li { margin-bottom: 0.4rem; }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 0 0 1.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.5rem 0.5rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; }

.site-footer { border-top: 1px solid var(--rule); font: 0.9rem/1.5 var(--sans); color: var(--muted); padding: 1.5rem 0 2rem; }
.site-footer a { color: inherit; }

@media print {
  .masthead nav, .skip, .site-footer { display: none; }
  .cite a::after { content: " (" attr(href) ")"; word-break: break-all; }
}
caption { text-align: left; caption-side: bottom; padding-top: 0.5rem; }
img.mark { vertical-align: middle; margin-right: 0.4rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Collapsed sections ("Also on the agenda", "How this story was made"): <details>, no JS */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary h2 { display: inline; margin: 0; }
details > summary::after { content: " +"; font: 700 1.2rem/1 var(--sans); color: var(--accent); }
details[open] > summary::after { content: " −"; }
details.more { margin: 2rem 0 1rem; padding: 0.75rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
details.more[open] > summary { margin-bottom: 0.75rem; }
details.more .count { font: 400 0.95rem var(--sans); color: var(--muted); }
details.how { padding: 0.9rem 1.25rem; }
details.how > summary h2 { font-size: 1.15rem; }
details.how[open] > summary { margin-bottom: 0.75rem; }
@media print { details > summary::after { content: ""; } }
