:root {
  color-scheme: light;
  --ink: #1f1f1c;
  --muted: #58584e;
  --yellow: #ffdc33;
  --yellow-light: #fff1a3;
  --paper: #fafaf6;
  --line: #dcdcd2;
  --headline: "Signika Negative", "Arial Narrow", "Segoe UI", sans-serif;
  --body: "Open Sans", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--body);
}

a { color: inherit; text-underline-offset: .2em; }
button, input, select { color: inherit; font: inherit; }
button, select { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #795d00; outline-offset: 4px; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--headline);
  font-weight: 800;
  line-height: 1.16;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.shell { width: min(100% - 3rem, 1160px); margin-inline: auto; }
.skip-link { position: absolute; top: .75rem; left: .75rem; z-index: 1; padding: .5rem .8rem; background: white; transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.utility-bar { background: var(--ink); color: white; font-size: .82rem; }
.utility-inner { display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-height: 2.55rem; }
.utility-inner a { font-weight: 700; color: var(--yellow); white-space: nowrap; }
.utility-inner a:focus-visible { outline-color: var(--yellow); }
.masthead { background: var(--yellow); }
.masthead:has(.masthead-art:not([hidden])) { background: white; }

.brand {
  display: grid;
  align-items: center;
  min-height: clamp(108px, 15vw, 194px);
  width: fit-content;
  max-width: 100%;
  text-decoration: none;
}

.brand:has(.masthead-art:not([hidden])) { width: 100%; padding-block: 1rem; }
.masthead-art { width: 100%; height: auto; }

.wordmark {
  font: 900 clamp(2.5rem, 8vw, 6.75rem)/.98 var(--headline);
  letter-spacing: -.065em;
  padding-block: .78rem;
  text-wrap: balance;
}

.navigation { background: white; border-bottom: 1px solid var(--line); }
.navigation-inner { display: flex; align-items: stretch; gap: 2.1rem; }

.navigation a {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 3.4rem;
  padding: .25rem 0;
  border-block: 3px solid transparent;
  font-size: .96rem;
  font-weight: 750;
  text-decoration: none;
}

.navigation a:hover, .navigation a[aria-current="page"] { border-bottom-color: var(--yellow); }
.navigation .navigation-source { margin-left: auto; color: var(--muted); font-size: .85rem; }
.page { flex-grow: 1; padding-block: 2.5rem 4rem; }
.page:focus, .page h1:focus { outline: none; }
.home-layout { display: grid; grid-template-columns: minmax(0, 2.65fr) minmax(240px, 1fr); gap: clamp(1.4rem, 4vw, 3.2rem); }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.3rem;
  padding-bottom: .65rem;
  border-bottom: 3px solid var(--ink);
}

.section-heading h1, .section-heading h2 { font-size: clamp(1.65rem, 3.5vw, 2.4rem); letter-spacing: -.025em; }
.section-heading a { font-size: .88rem; font-weight: 700; white-space: nowrap; }
.feature-controls { display: flex; gap: .4rem; }

.feature-controls button {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  background: white;
  font: 1.65rem/1 var(--body);
}

.feature-controls button:hover { background: var(--yellow); border-color: var(--ink); }
.feature-story { min-width: 0; border-bottom: 1px solid var(--line); background: white; }
.feature-story:not(:has(.story-image)) { background: var(--yellow-light); }
.feature-story .story-copy { padding: clamp(1.5rem, 4.5vw, 3.25rem); }
.feature-story h2 { font-size: clamp(1.75rem, 4vw, 3.55rem); letter-spacing: -.045em; }
.feature-story p { font-size: clamp(1rem, 2vw, 1.17rem); }
.feature-story .story-image { aspect-ratio: 2.35; }
.featured-link { display: inline-block; margin-top: 1.35rem; font-size: .91rem; font-weight: 800; }
.recent-section { margin-top: 2.7rem; }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.story-card { min-width: 0; border: 1px solid var(--line); border-top: 4px solid var(--yellow); background: white; }
.story-card h2, .story-card h3 { font-size: clamp(1.15rem, 2.2vw, 1.53rem); letter-spacing: -.018em; }
.story-card .story-copy { padding: 1.1rem 1.2rem 1.3rem; }
.story-card p, .feature-story p { margin: .7rem 0 0; max-width: 63ch; color: var(--muted); overflow-wrap: anywhere; }
.story-card p { font-size: .94rem; }
.story-image { width: 100%; aspect-ratio: 1.75; object-fit: cover; }
.story-title a { text-decoration: none; }
.story-title a:hover { text-decoration: underline; text-decoration-color: #a27a00; text-decoration-thickness: .09em; }
.story-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .75rem; margin-bottom: .7rem; color: var(--muted); font-size: .84rem; }
.story-meta a { font-weight: 750; }

.sidebar-panel { margin-bottom: 1.4rem; border: 1px solid var(--line); background: white; }
.sidebar-panel h2 { padding: .85rem 1.1rem; background: var(--yellow); font-size: 1.22rem; }
.sidebar-list, .history-links { margin: 0; padding: 0; list-style: none; }
.sidebar-list li + li { border-top: 1px solid var(--line); }
.sidebar-list a { display: flex; justify-content: space-between; gap: .75rem; padding: .65rem 1.1rem; text-decoration: none; }
.sidebar-list a:hover { background: var(--paper); text-decoration: underline; }
.sidebar-list a span:last-child { color: var(--muted); font-size: .87rem; font-variant-numeric: tabular-nums; }
.history-panel p { margin: 0; padding: .95rem 1.1rem; color: var(--muted); font-size: .93rem; }
.history-links { padding: 0 1.1rem 1.1rem; font-size: .89rem; font-weight: 700; }
.history-links li + li { margin-top: .5rem; }

.search-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .9rem 1.3rem; padding: 1.15rem; background: var(--yellow-light); }
.field { display: grid; gap: .35rem; }
.field label { font-size: .88rem; font-weight: 750; }
.field input, .field select { width: 100%; min-height: 2.9rem; padding: .55rem .7rem; border: 1px solid #8b824f; border-radius: 0; background: white; }
.results-count { margin: 1.3rem 0 .9rem; color: var(--muted); font-size: .93rem; }
.archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.action-button {
  width: fit-content;
  min-height: 2.8rem;
  margin-top: 1.5rem;
  padding: .55rem .9rem;
  border: 1px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 750;
}

.action-button:hover { background: var(--yellow-light); }
.empty-state { grid-column: 1 / -1; padding: 1.25rem; border: 1px solid var(--line); background: white; }
.empty-state p { margin: 0; }

.article-view { max-width: 840px; margin-inline: auto; }
.back-link { display: inline-block; margin-bottom: 1.4rem; color: var(--muted); font-size: .93rem; font-weight: 700; }
.article-view h1 { font-size: clamp(2rem, 5.2vw, 4rem); letter-spacing: -.045em; }
.article-view .story-image { margin-top: 1.35rem; aspect-ratio: 2; }
.article-summary { margin: 1.2rem 0 0; max-width: 67ch; font-size: clamp(1.12rem, 2.4vw, 1.35rem); overflow-wrap: anywhere; }
.article-source-panel { margin-top: 2.1rem; padding: 1.15rem 1.3rem; border-left: 5px solid var(--yellow); background: white; }
.article-source-panel h2 { font-size: 1.22rem; }
.article-source-panel ul { margin: .7rem 0 0; padding-left: 1.15rem; }
.article-source-panel li + li { margin-top: .45rem; }

.site-footer { background: var(--ink); color: white; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .55rem 1.4rem; padding-block: 1.3rem; }
.footer-inner p { margin: 0; }
.footer-inner p span { margin-left: .55rem; color: #dfdfd3; font-size: .86rem; }
.footer-inner a { color: var(--yellow); font-size: .87rem; font-weight: 700; }
.footer-inner a:focus-visible { outline-color: var(--yellow); }

@media (max-width: 850px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .home-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1.25rem; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .shell { width: calc(100% - 2rem); }
  .page { padding-block: 1.6rem 2.5rem; }
  .brand:has(.masthead-art:not([hidden])) { padding-block: .3rem; }
  .masthead-art { width: min(100%, 350px); height: auto; aspect-ratio: 3.15; object-fit: cover; object-position: left center; justify-self: center; }
  .navigation-inner { gap: 1rem; }
  .navigation a { min-height: 3rem; font-size: .82rem; }
  .navigation .navigation-source { gap: .25rem; font-size: .73rem; }
  .story-grid, .archive-grid, .home-aside, .search-form { grid-template-columns: minmax(0, 1fr); }
  .section-heading a { font-size: .8rem; }
  .feature-controls button { width: 2.4rem; height: 2.4rem; }
  .footer-inner p span { display: block; margin-left: 0; }
}
