:root,
[data-theme="paper"] {
  --bg: #f6f6f3;
  --ink: #111110;
  --muted: #5a5853;
  --faint: #8a8780;
  --rule: #dcdad3;
  --accent: #c2410c;
  --focus: #c2410c;
  color-scheme: light;
}

[data-theme="ink"] {
  --bg: #0b0c0f;
  --ink: #f2efe8;
  --muted: #9a968c;
  --faint: #6b6860;
  --rule: #2a2c33;
  --accent: #e0b15c;
  --focus: #e0b15c;
  color-scheme: dark;
}

[data-theme="dusk"] {
  --bg: #1a1714;
  --ink: #f3e7d6;
  --muted: #b39f8a;
  --faint: #7c6f62;
  --rule: #3a332c;
  --accent: #e07a4c;
  --focus: #e07a4c;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

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

.shell {
  width: min(100% - 2.25rem, 58rem);
  margin-inline: auto;
}

.masthead {
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--rule);
}

.masthead .shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.75rem;
  min-height: 3.4rem;
}

.wordmark {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.search { max-width: 22rem; justify-self: end; width: 100%; }
.search input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  padding: 0.3rem 0;
  font: inherit;
  font-size: 0.92rem;
  border-radius: 0;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-bottom-color: var(--accent); }

.themes { display: flex; gap: 0.85rem; }
.themes button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--faint);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.themes button:hover { color: var(--ink); }

html[data-theme="paper"] .themes [data-theme-set="paper"],
html[data-theme="ink"] .themes [data-theme-set="ink"],
html[data-theme="dusk"] .themes [data-theme-set="dusk"] {
  color: var(--accent);
}

main {
  flex: 1;
  width: min(100% - 2.25rem, 68rem);
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}

.board {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 1fr);
  gap: 0 3.25rem;
  align-items: start;
}

.kicker {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.meta {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.45;
}

.empty-desk { padding: 3.5rem 0 4rem; }
.empty-desk h1 {
  font-family: "Newsreader", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 60;
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 0.75rem;
}
.empty-desk .lede { max-width: 22rem; }

.lead {
  padding-right: 0.5rem;
}
.lead h1 {
  font-family: "Newsreader", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 72;
  font-weight: 500;
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  margin: 0 0 1rem;
}
.lead h1 a { text-decoration: none; }
.lead .lede { font-size: 1.2rem; max-width: 36rem; }
.lead .meta { margin-top: 1.15rem; }

.river {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--rule);
  padding-left: 2rem;
}

.river li {
  padding: 0 0 1.15rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--rule);
}
.river li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.river h2 {
  font-family: "Newsreader", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 36;
  font-weight: 500;
  font-size: 1.28rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}
.river h2 a { text-decoration: none; }
.river .lede { font-size: 0.95rem; }
.river .meta { margin-top: 0.55rem; }

.story, .empty-desk { max-width: 40rem; }

.story h1 {
  font-family: "Newsreader", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 72;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.story .lede {
  font-size: 1.18rem;
  color: var(--ink);
  margin-bottom: 1.8rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--rule);
}

.body {
  font-family: "Newsreader", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 18;
  font-size: 1.1rem;
  line-height: 1.62;
}

.body p { margin: 0 0 1em; }
.body p:last-child { margin-bottom: 0; }
.body a { color: var(--accent); }
.body h2, .body h3 {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 1.7em 0 0.55em;
}
.body ul, .body ol { margin: 0 0 1em; padding-left: 1.15em; }
.body blockquote {
  margin: 1.3em 0;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

.back { margin-top: 2.5rem; }
.back a {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.back a:hover { text-decoration: underline; }

.colophon {
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.colophon .shell {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

[hidden] { display: none !important; }

@media (max-width: 640px) {
  .masthead .shell {
    grid-template-columns: 1fr auto;
    padding: 0.7rem 0 0.85rem;
  }
  .wordmark { grid-column: 1; }
  .themes { grid-column: 2; }
  .search { grid-column: 1 / -1; justify-self: stretch; max-width: none; }
  .board { grid-template-columns: 1fr; gap: 2rem; }
  .river { border-left: 0; padding-left: 0; border-top: 1px solid var(--ink); padding-top: 1.4rem; }
  .empty-desk { padding: 2rem 0 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
