:root {
  --ink: #1c1b19;
  --muted: #5e5a54;
  --line: #e2ddd4;
  --paper: #f6f3ee;
  --surface: #fffcf8;
  --soft: #ece7df;
  --charcoal: #242220;
  --silver: #c5c2bb;
  --accent: #1d4e89;
  --accent-strong: #163d6b;
  --link: #1d4e89;
  --measure: min(92vw, 1120px);
  --font-display: "Canela", "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", "Helvetica Neue", sans-serif;
  color-scheme: light;
}

html[data-theme="dark"], html.dark {
  --ink: #f3efe8;
  --muted: #b7b1a7;
  --line: #3a3632;
  --paper: #161412;
  --surface: #211e1b;
  --soft: #2c2824;
  --charcoal: #0e0d0c;
  --silver: #8d8880;
  --accent: #8eb4e0;
  --accent-strong: #c5daf2;
  --link: #9ec2ea;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--accent-strong); }
button, input, select { font: inherit; }
button { cursor: pointer; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: .6rem 1rem; background: var(--charcoal); color: #fff; }
.skip-link:focus { top: 1rem; }
.measure { width: var(--measure); margin-inline: auto; }

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 8;
}
.masthead-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0 .7rem;
}
.tagline {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  text-align: center;
}
.brand:hover { color: var(--ink); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 2.15rem;
  letter-spacing: -.03em;
  line-height: 1;
}
.header-tools { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; }
.header-tools a.search-link {
  color: var(--ink);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
}
[data-theme-toggle], .menu-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: 2.4rem;
  height: 2.4rem;
  display: inline-grid;
  place-items: center;
}
.menu-toggle { display: none; padding: 0; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after {
  content: "";
  width: 1rem;
  height: 1.5px;
  background: currentColor;
  display: block;
}
.menu-toggle span { margin: 4px 0; }

.main-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .35rem 1.25rem;
  padding: 0 1rem .85rem;
}
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 500;
}
.main-nav a[aria-current="page"] { color: var(--accent); }

.hero-lead { padding: 2.2rem 0 1rem; }
.lead-copy h1, .page-hero h1, .article-header h1 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -.03em;
  line-height: 1.08;
  margin: .35rem 0 .6rem;
}
.hero-lead h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); max-width: 16ch; }
.lede { font-size: 1.15rem; max-width: 42rem; color: var(--ink); }
.eyebrow, .category-label {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.hero-actions, .cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }
.button {
  display: inline-flex;
  align-items: center;
  padding: .7rem 1.05rem;
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
}
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-strong); color: #fff; }
.button-quiet { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.button-quiet:hover { color: var(--ink); border-color: var(--ink); }

.feature-frame { margin: 1.5rem 0 2rem; }
.feature-frame img, .split-visual img, .article-cover img { width: 100%; object-fit: cover; }
.feature-frame img { max-height: 520px; }
.caption { color: var(--muted); font-size: .82rem; margin: .45rem 0 0; }

.section { padding: 2.2rem 0; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-heading h2, .page-hero h1 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -.02em;
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}
.section-link { color: var(--ink); font-size: .88rem; font-weight: 600; }

.story-grid, .news-grid, .archive-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem 1.2rem;
}
.story-card { background: transparent; }
.story-image { display: block; background: var(--soft); aspect-ratio: 16/10; overflow: hidden; }
.story-image img { width: 100%; height: 100%; object-fit: cover; }
.story-meta { display: flex; gap: .7rem; align-items: center; margin: .7rem 0 .25rem; color: var(--muted); font-size: .78rem; }
.story-card h3 { font-family: var(--font-display); font-weight: 650; font-size: 1.35rem; line-height: 1.2; margin: .2rem 0 .35rem; }
.story-card h3 a { color: var(--ink); text-decoration: none; }
.story-card h3 a:hover { color: var(--accent); }
.story-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.story-author { display: flex; align-items: center; gap: .45rem; margin-top: .45rem; font-size: .82rem; }
.story-author-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.lead-slot .story-card { display: grid; grid-template-columns: 1.3fr .9fr; gap: 1.4rem; align-items: center; }
.lead-slot .story-card h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.lead-slot .story-image { aspect-ratio: 16/11; }

.topic-strip { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.topic-strip a {
  padding: 1.1rem .9rem;
  text-decoration: none;
  color: var(--ink);
  border-right: 1px solid var(--line);
}
.topic-strip a:last-child { border-right: 0; }
.topic-strip strong { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 650; }
.topic-strip span { color: var(--muted); font-size: .8rem; }

.picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.newsletter {
  background: var(--charcoal);
  color: #f6f3ee;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1.5rem;
  align-items: center;
}
.newsletter h2 { font-family: var(--font-display); font-weight: 650; margin: 0 0 .4rem; font-size: 2rem; }
.newsletter p { margin: 0; color: #d9d3c8; }
.newsletter form { display: flex; gap: .5rem; }
.newsletter input, .archive-form input, .compare select {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: .7rem .8rem;
  width: 100%;
}
.newsletter input { background: #fff; color: #1c1b19; }
.newsletter button { border: 0; background: var(--accent); color: #fff; padding: .7rem 1rem; font-weight: 600; }
.form-note { font-size: .82rem; margin-top: .45rem; }

.page-hero { padding: 2.4rem 0 1rem; }
.page-hero p { max-width: 40rem; color: var(--muted); }
.prose { max-width: 42rem; }
.prose h2 { font-family: var(--font-display); font-weight: 650; font-size: 1.6rem; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.5rem; align-items: center; margin: 1rem 0 2rem; }
.rail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 2rem; }
.side-links { border-left: 1px solid var(--line); padding-left: 1rem; }
.side-links h2 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.side-links a { color: var(--ink); }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0 2rem; }
.compare article { background: var(--surface); border: 1px solid var(--line); padding: 1rem; }
.compare h3 { font-family: var(--font-display); margin: .4rem 0; }
.compare dl { margin: 0; }
.compare dt { color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; margin-top: .6rem; }
.compare dd { margin: 0; }

.score-list { display: grid; gap: .6rem; margin: 1rem 0 2rem; }
.score-list div { display: grid; grid-template-columns: 8rem 1fr auto; gap: .7rem; align-items: center; }
.bar { height: 4px; background: var(--soft); }
.bar span { display: block; height: 100%; background: var(--accent); }

.issue-list { list-style: none; padding: 0; margin: 0; }
.issue-list li { border-top: 1px solid var(--line); padding: 1rem 0; }
.issue-list h3 { font-family: var(--font-display); margin: 0 0 .3rem; font-size: 1.3rem; }

.article-shell { max-width: 44rem; }
.article-header h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.article-deck { font-size: 1.15rem; }
.article-cover { margin: 1rem 0; }
#article-content h2, #article-content h3 { font-family: var(--font-display); }
#article-content blockquote { border-left: 3px solid var(--accent); margin: 1.2rem 0; padding-left: 1rem; font-family: var(--font-display); font-size: 1.35rem; }
.byline { display: flex; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.byline img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.byline p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }

.archive-tools { display: grid; gap: .8rem; margin-bottom: 1.2rem; }
.filter-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-list a, .filter-list button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  padding: .3rem .6rem;
  font-size: .82rem;
}
.empty-state { color: var(--muted); }
.not-found { padding: 3rem 0; }

.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 0 2.5rem; background: var(--charcoal); color: #f3efe8; }
.site-footer a { color: #f3efe8; text-decoration: none; }
.site-footer a:hover { color: #c5daf2; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1.5rem; }
.footer-brand { font-family: var(--font-display); font-size: 1.8rem; font-weight: 650; }
.footer-grid h2 { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #b7b1a7; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: .3rem 0; }
.footer-meta { margin-top: 1.5rem; color: #b7b1a7; font-size: .85rem; }

@media (max-width: 860px) {
  .masthead-top { grid-template-columns: 1fr auto; }
  .tagline { display: none; }
  .menu-toggle { display: inline-grid; }
  .main-nav { display: none; flex-direction: column; align-items: flex-start; padding: .4rem 5vw 1rem; }
  .main-nav.is-open { display: flex; }
  .story-grid, .news-grid, .archive-results, .picks, .topic-strip, .lead-slot .story-card, .newsletter, .split, .rail-layout, .compare, .footer-grid {
    grid-template-columns: 1fr;
  }
  .topic-strip a { border-right: 0; border-bottom: 1px solid var(--line); }
  .newsletter form { flex-direction: column; }
}
