:root {
  --bg: #ffffff;
  --ink: #242424;
  --muted: #6b6b6b;
  --faint: #757575;
  --line: #f2f2f2;
  --line-2: #e6e6e6;
  --green: #1a8917;
  --green-hover: #0f730c;
  --green-soft: #e8f3e8;
  --soft: #fafafa;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --page: 1192px;
  --article: 680px;
  --header: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
button, input { font: inherit; }
::selection { background: #d0f0ce; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

#read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--green);
  z-index: 40;
  pointer-events: none;
}

.tricolor {
  height: 3px;
  background: linear-gradient(90deg, #fff 0 33.3%, #00966e 33.3% 66.6%, #d62612 66.6%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(var(--page), calc(100% - 40px));
  margin: 0 auto;
  min-height: var(--header);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  flex-shrink: 0;
}
.mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
}
.word { display: flex; flex-direction: column; line-height: 1.15; }
.word-main {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}
.word-sub {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-form input {
  width: 150px;
  border: 0;
  background: var(--soft);
  border-radius: 99px;
  padding: 8px 14px;
  color: var(--ink);
}
.search-form input:focus {
  outline: 2px solid var(--green-soft);
  background: #fff;
  box-shadow: 0 0 0 1px var(--line-2);
}

.btn-follow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: #229ed9;
  color: #fff !important;
  border-radius: 99px;
}
.btn-follow svg { display: block; }
.btn-follow:hover { background: #1b8fc7; }
.btn-follow-text {
  width: auto;
  height: auto;
  padding: 7px 16px;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 99px;
  padding: 7px 12px;
  cursor: pointer;
}
.mobile-nav {
  display: none;
  gap: 14px;
  padding: 8px 20px 16px;
  font-size: 0.92rem;
  color: var(--muted);
}

.page {
  width: min(var(--page), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.masthead { max-width: 720px; padding: 28px 0 12px; }
.masthead.compact { padding-top: 18px; }
.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.masthead h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 8px 0 12px;
  font-weight: 700;
}
.lede {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--muted);
  margin: 0 0 10px;
}
.mast-meta { color: var(--faint); font-size: 0.92rem; }
.mast-meta a { text-decoration: underline; text-underline-offset: 3px; }

.feed { display: grid; }
.story {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 32px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.story.featured {
  grid-template-columns: 1.4fr 0.8fr;
  padding-top: 18px;
  border-top: 0;
}
.story.featured h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}
.kicker {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.story h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 6px 0 8px;
  font-weight: 700;
}
.dek {
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.45;
}
.thumb {
  display: block;
  background: var(--soft);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story.featured .thumb { aspect-ratio: 16 / 10; }
.story:not(:has(.thumb)) { grid-template-columns: 1fr; }

.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-size: 0.82rem;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 0.85rem;
}
.by { color: var(--ink); font-weight: 500; }

.article-page { padding: 18px 0 80px; }
.article {
  width: min(var(--article), calc(100% - 40px));
  margin: 0 auto;
}
.article-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 2.65rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 10px 0 12px;
}
.article-dek {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--muted);
  margin: 0 0 22px;
}
.article-byline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 8px 0 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn {
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 99px;
  padding: 6px 12px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn.clapped { color: var(--green); border-color: var(--green); }

.hero { margin: 0 0 28px; }
.hero img { width: 100%; border-radius: 2px; }
.hero figcaption {
  color: var(--faint);
  font-size: 0.84rem;
  margin-top: 8px;
}

.article-body {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.58;
  letter-spacing: -0.003em;
  color: #292929;
}
.article-body p { margin: 0 0 1.4em; }
.article-body h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 1.8em 0 0.7em;
  letter-spacing: -0.02em;
}
.article-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 20px;
  border-left: 3px solid var(--ink);
  color: var(--muted);
  font-style: italic;
}
.article-body strong { font-weight: 700; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 36px 0 18px;
  padding-top: 8px;
}
.tag {
  background: var(--soft);
  color: var(--ink);
  border-radius: 99px;
  padding: 7px 12px;
  font-size: 0.82rem;
}
.tag:hover { background: #f0f0f0; }

.source-note {
  color: var(--faint);
  font-size: 0.9rem;
  padding: 18px 0 8px;
  border-top: 1px solid var(--line);
}
.source-note a { text-decoration: underline; text-underline-offset: 3px; }

.more {
  width: min(var(--page), calc(100% - 40px));
  margin: 48px auto 0;
}
.more h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin: 0 0 8px;
}

.empty {
  padding: 48px 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.2rem;
}
.empty a { text-decoration: underline; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  background: var(--soft);
}
.footer-inner {
  width: min(var(--page), calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}
.site-footer p { color: var(--muted); max-width: 52ch; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-content: start;
  color: var(--muted);
}
.legal {
  width: min(var(--page), calc(100% - 40px));
  margin: 28px auto 0;
  font-size: 0.82rem;
  color: var(--faint);
}

@media (max-width: 860px) {
  .nav, .search-form { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav.is-open { display: flex; flex-wrap: wrap; }
  .story, .story.featured { grid-template-columns: 1fr 110px; gap: 16px; }
  .story.featured h2 { font-size: 1.45rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .article-byline { flex-direction: column; align-items: flex-start; }
  .word-sub { display: none; }
  .article-body { font-size: 19px; }
}

@media (max-width: 560px) {
  .header-inner { width: calc(100% - 24px); }
  .page, .article, .more, .footer-inner, .legal { width: calc(100% - 28px); }
  .story, .story.featured { grid-template-columns: 1fr; }
  .thumb { max-width: 100%; aspect-ratio: 16 / 9; }
}
