:root {
  --paper: #fcfcfd;
  --ink: #141820;        /* near-black, matching the logo */
  --ink-soft: #3a4556;   /* slate: summaries */
  --ink-faint: #6b7584;  /* meta text */
  --rule: #e3e7ed;
  --navy: #063966;       /* brand navy, taken from the logo */
  --accent: var(--navy);
  --link: #063966;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --measure: 47.5rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.masthead, .sections, main, .colophon {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Masthead */
.masthead { padding-top: 2.5rem; text-align: center; }
.brand { display: inline-block; }
.brand img { display: block; width: 380px; max-width: 86vw; height: auto; }
.slogan { margin: .6rem 0 0; font-style: italic; color: var(--ink-soft); }
.dateline {
  margin: .9rem 0 0;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--ink-faint);
}

/* Section navigation */
.sections { margin-top: 1.4rem; border-top: 2px solid var(--navy); border-bottom: 1px solid var(--rule); }
.sections ul {
  list-style: none; margin: 0; padding: .55rem 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.15rem;
  font-family: var(--sans); font-size: .82rem;
}
.sections a { color: var(--ink-soft); text-decoration: none; padding: .15rem 0; border-bottom: 2px solid transparent; }
.sections a:hover { color: var(--navy); }
.sections a[aria-current="page"] { color: var(--navy); font-weight: 600; border-bottom-color: var(--navy); }

/* Stories */
.stories { list-style: none; margin: 0; padding: 0; }
.story { padding: 1.05rem 0 .95rem; border-bottom: 1px solid var(--rule); }
.story:last-child { border-bottom: 0; }
.headline { margin: 0; font-size: 1.32rem; font-weight: 600; line-height: 1.28; letter-spacing: -.005em; }
.summary { margin-top: .3rem; color: var(--ink-soft); }
.summary p { margin: 0 0 .5rem; }
.summary p:last-child { margin-bottom: 0; }
.flag, .correction { margin: .35rem 0 0; font-family: var(--sans); font-size: .8rem; color: var(--ink-faint); }
.correction strong { color: var(--accent); font-weight: 600; }

.meta { margin-top: .4rem; font-family: var(--sans); font-size: .78rem; color: var(--ink-faint); }
.meta .when { float: left; margin-right: .35rem; line-height: 1.6; }
.sources > summary {
  display: flow-root; width: fit-content;
  list-style: none; cursor: pointer; line-height: 1.6; color: var(--ink-faint); white-space: nowrap;
  user-select: none;
}
.sources > summary::-webkit-details-marker { display: none; }
.sources > summary:hover { color: var(--navy); }
.sources .sep { margin-right: .15rem; }
.sources .arrow { display: inline-block; width: .62rem; height: .4rem; margin: 0 .1rem .08rem 0; vertical-align: middle;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.sources[open] .arrow { transform: rotate(180deg); }
.sources ul { clear: both; list-style: none; margin: 0; padding: .55rem 0 0 .9rem; border-left: 2px solid var(--rule); }
.sources li { margin: 0 0 .4rem; line-height: 1.4; }
.sources li a { text-decoration: none; }
.sources li a:hover .orig, .sources li a:hover .outlet { text-decoration: underline; }
.sources .outlet { font-weight: 600; color: var(--ink); }
.sources .orig { color: var(--link); }
.sources .via { font-size: .72rem; color: var(--ink-faint); }
.sources .pubdate { display: block; font-size: .72rem; color: var(--ink-faint); }
.sources .report { clear: both; margin: .35rem 0 0 .9rem; font-size: .72rem; }
.sources .report a { color: var(--ink-faint); }
.meta::after { content: ""; display: block; clear: both; }

.ad { padding: 1rem 0; border-bottom: 1px solid var(--rule); text-align: center; }
.ad-label { display: block; margin-bottom: .35rem; font-family: var(--sans); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }

.empty { padding: 3rem 0; text-align: center; color: var(--ink-faint); }

/* Plain pages */
.page { padding: 1.75rem 0 1rem; }
.page h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 1rem; }
.page h2 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; }
.page p, .page li { color: var(--ink-soft); }
.page form { display: grid; gap: .75rem; margin-top: 1rem; }
.page label { font-family: var(--sans); font-size: .85rem; color: var(--ink-soft); display: grid; gap: .3rem; }
.page textarea, .page input[type=text], .page input[type=email] {
  font: inherit; font-size: 1rem; padding: .55rem .65rem; border: 1px solid var(--rule); background: #fff; color: var(--ink); border-radius: 2px;
}
.page button {
  justify-self: start; font-family: var(--sans); font-size: .9rem; padding: .5rem 1rem;
  background: var(--navy); color: #fff; border: 0; border-radius: 2px; cursor: pointer;
}
.hp { position: absolute; left: -9999px; }

/* Footer */
.colophon {
  margin-top: 2rem; padding-top: 1.25rem; padding-bottom: 2.5rem;
  border-top: 2px solid var(--navy);
  font-family: var(--sans); font-size: .76rem; color: var(--ink-faint); text-align: center;
}
.colophon p { margin: .25rem 0; }
.colophon a { color: var(--ink-faint); }
/* Tip button: drawn here rather than loaded from Ko-fi, so nothing is fetched from them until clicked. */
.colophon .tip { margin: 1rem 0 .9rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 761px) {
  .sections ul { justify-content: space-between; }  /* wraps only if a wider system font needs it */
  .sections li { flex: none; }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .masthead { padding-top: 3.6rem; }
  .brand img { width: 300px; }
  .sections ul { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; gap: 1rem; scrollbar-width: none; }
  .sections ul::-webkit-scrollbar { display: none; }
  .sections li { flex: none; }
  .headline { font-size: 1.18rem; }
}

@media print {
  .sections, .sources, .ad, .colophon .links, .colophon .tip { display: none; }
}

/* Search link (masthead), search page, paging, auto-update */
.masthead { position: relative; }
.search-link { position: absolute; top: 1rem; right: 1.25rem; display: block; padding: .35rem; color: var(--ink-faint); line-height: 0; }
.search-link:hover { color: var(--navy); }
/* Coffee button, top left (mirrors the search icon). The footer is out of reach on pages that load more while scrolling. */
.tip-link, .colophon a.tip-button {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem 1.05rem .55rem .85rem; border-radius: 999px;
  background: var(--navy); color: #fff; border: 0;
  font-family: var(--sans); font-size: .86rem; font-weight: 600; letter-spacing: .01em; line-height: 1.1;
  text-decoration: none; box-shadow: 0 1px 2px rgba(6, 57, 102, .18), 0 3px 10px rgba(6, 57, 102, .14);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.tip-link { position: absolute; top: .9rem; left: 1.25rem; }
.tip-link:hover, .colophon a.tip-button:hover {
  background: #0a4a85; color: #fff; transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(6, 57, 102, .2), 0 6px 16px rgba(6, 57, 102, .2);
}
.mug { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mug .steam { opacity: .75; }
@media (prefers-reduced-motion: no-preference) {
  .tip-link:hover .steam, .colophon a.tip-button:hover .steam { animation: steam 1.2s ease-in-out infinite alternate; }
}
@keyframes steam { from { transform: translateY(0); opacity: .75; } to { transform: translateY(-1.5px); opacity: .35; } }
@media (max-width: 520px) {
  .tip-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tip-link { top: .85rem; left: 1rem; padding: .55rem; }
  .tip-link .mug { width: 1.35rem; height: 1.35rem; }
}
@media print { .tip-link { display: none; } }
.colophon a.tip-button { font-size: .9rem; padding: .65rem 1.25rem .65rem 1rem; }
.search-link svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-form { display: flex; gap: .5rem; margin: 1.5rem 0 .5rem; }
.search-form input {
  flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: .55rem .7rem;
  border: 1px solid var(--rule); border-radius: 2px; background: #fff; color: var(--ink);
}
.search-form input:focus { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.search-form button {
  font-family: var(--sans); font-size: .88rem; padding: .5rem 1rem;
  background: var(--navy); color: #fff; border: 0; border-radius: 2px; cursor: pointer;
}
.earlier-note { margin: 1rem 0 0; font-family: var(--sans); font-size: .8rem; color: var(--ink-faint); }
.earlier-note a { color: var(--link); }
.pager { margin: 1.25rem 0 .5rem; text-align: center; }
.pager .more {
  display: inline-block; padding: .55rem 1.2rem; border: 1px solid var(--navy); border-radius: 2px;
  font-family: var(--sans); font-size: .85rem; color: var(--navy); text-decoration: none;
}
.pager .more:hover { background: var(--navy); color: #fff; }
#feed { overflow-anchor: none; }  /* the update script keeps the reading position itself */
@keyframes arrive {
  from { background: rgba(6, 57, 102, .07); box-shadow: -.75rem 0 0 rgba(6, 57, 102, .07), .75rem 0 0 rgba(6, 57, 102, .07); }
  to { background: transparent; box-shadow: none; }
}
.story.is-new { animation: arrive 8s ease-out; }
@media (prefers-reduced-motion: reduce) { .story.is-new { animation: none; } }
@media (max-width: 520px) { .search-link { top: .6rem; right: .6rem; } }
@media print { .search-link, .pager { display: none; } }
/* While stories load automatically, the pager is a quiet status line, not a button. */
.pager .more.loading { opacity: .6; cursor: progress; }

/* Homepage: top stories of the past 24 hours, then the latest */
.list-label {
  margin: 1.3rem 0 0; font-family: var(--sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--navy);
}
.list-label span { font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--ink-faint); }
.latest-label { margin-top: .4rem; padding-top: 1.3rem; border-top: 2px solid var(--navy); }

/* Top stories: a tinted, numbered panel set apart from the newest-first list */
.front {
  margin: 1.25rem -1.25rem 0; padding: .95rem 1.25rem .35rem;
  background: #f1f4f8; border-top: 3px solid var(--navy);
}
.front-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .15rem .7rem; padding-bottom: .55rem; border-bottom: 1px solid #d8dee7; }
.front-title { margin: 0; font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.front-sub { margin: 0; font-family: var(--sans); font-size: .76rem; color: var(--ink-faint); }
.front-list { counter-reset: top; }
.front-list > .story { position: relative; padding-left: 2.25rem; border-bottom-color: #d8dee7; }
.front-list > .story::before {
  counter-increment: top; content: counter(top);
  position: absolute; left: 0; top: 1.02rem; width: 1.6rem; text-align: right;
  font-family: var(--serif); font-size: 1.32rem; font-weight: 600; line-height: 1.28; color: var(--navy);
}
.front .sources ul { border-left-color: #d3dae4; }
.latest-label { margin-top: 1.9rem; padding-top: 0; border-top: 0; }
@media (max-width: 520px) {
  .front { margin-left: -1.25rem; margin-right: -1.25rem; }
  .front-list > .story { padding-left: 1.85rem; }
  .front-list > .story::before { font-size: 1.18rem; width: 1.3rem; }
}
@media print { .front { background: none; } }
.latest-label { font-size: .8rem; font-weight: 700; letter-spacing: .12em; padding-bottom: .55rem; border-bottom: 1px solid var(--rule); }
.latest-label span { font-size: .76rem; letter-spacing: 0; }

/* Thumbnails: freely licensed file photos of the story's subject */
.thumb {
  float: right; width: 76px; height: 76px; margin: .25rem 0 .35rem 1rem;
  object-fit: cover; object-position: center 25%; border-radius: 2px; background: var(--rule);
}
.story.has-thumb::after { content: ""; display: block; clear: both; }
.photo-credit { clear: both; margin: .25rem 0 0; font-family: var(--sans); font-size: .64rem; line-height: 1.4; color: var(--ink-faint); }
.photo-credit a { color: inherit; text-decoration: none; }
.photo-credit a:hover { text-decoration: underline; }
@media (max-width: 520px) { .thumb { width: 62px; height: 62px; margin-left: .75rem; } }
@media print { .thumb, .photo-credit { display: none; } }

/* Share link in each story's meta line */
.meta .share { float: left; margin-right: .35rem; line-height: 1.6; color: var(--ink-faint); text-decoration: none; white-space: nowrap; }
.meta .share .sep { margin-right: .15rem; }
.meta .share:hover { color: var(--navy); }
.meta .share.copied { color: var(--navy); font-weight: 600; }
.share-icon { display: inline-block; width: .8rem; height: .8rem; margin: 0 .2rem .12rem 0; vertical-align: middle;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media print { .meta .share { display: none; } }

/* A story's own page */
.story-page { padding-top: 1.4rem; }
.story-kicker { margin: 0; font-family: var(--sans); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.story-kicker a { color: var(--navy); font-weight: 600; text-decoration: none; }
.story-page .story { border-bottom: 0; padding-top: .5rem; }
.story-page .headline { font-size: 1.75rem; line-height: 1.22; }
.story-page .summary { font-size: 1.08rem; margin-top: .6rem; }
.story-more { margin: 1.4rem 0 .5rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.more-link { font-family: var(--sans); font-weight: 600; font-size: .95rem; color: var(--navy); text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.story-note { margin: .3rem 0 0; font-size: .92rem; font-style: italic; color: var(--ink-faint); }
@media (max-width: 520px) { .story-page .headline { font-size: 1.45rem; } }

/* Daily-email sign-up box */
.signup {
  margin: 1.1rem 0 .4rem; padding: .85rem 1rem; border: 1px solid var(--rule); border-left: 3px solid var(--navy);
  background: #f6f8fb; font-family: var(--sans);
}
.page form.signup, form.signup { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; }
.signup .signup-text, .page .signup .signup-text { display: block; flex: 1 1 18rem; font-size: .86rem; line-height: 1.4; color: var(--ink-soft); }
.signup .signup-text strong { color: var(--ink); }
.signup-row { display: flex; gap: .45rem; flex: 1 1 18rem; }
.signup input[type=email], .page .signup input[type=email] {
  flex: 1; min-width: 0; font: inherit; font-size: .92rem; padding: .5rem .65rem;
  border: 1px solid #cfd6e0; border-radius: 999px; background: #fff; color: var(--ink);
}
.signup input[type=email]:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.signup button, .page .signup button {
  flex: none; font: inherit; font-size: .88rem; font-weight: 600; padding: .5rem 1.05rem; border: 0; border-radius: 999px;
  background: var(--navy); color: #fff; cursor: pointer;
}
.signup button:hover { background: #0a4a85; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.story-page .signup { margin-top: 1.2rem; }
@media print { .signup { display: none; } }
