@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600&family=Source+Serif+4:opsz,wght@8..60,500;8..60,700&display=swap");

:root {
  --paper: #f3eee4;
  --ink: #1c1712;
  --muted: #6a6156;
  --rule: #d8cfc0;
  --signal: #b42318;
  --link: #1c1712;
  --card: #fbf8f1;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161310;
    --ink: #efe8dc;
    --muted: #b3a899;
    --rule: #3a342c;
    --signal: #e25a4c;
    --link: #efe8dc;
    --card: #1e1a16;
  }
}

* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--signal); }
.skip {
  position: absolute;
  left: -999px;
}
.inner, .shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}
.masthead {
  border-bottom: 3px solid var(--ink);
  padding: 1.4rem 0 1rem;
}
.masthead .inner {
  display: grid;
  gap: 0.25rem;
}
.brand {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.brand a { text-decoration: none; }
.dateline {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}
.masthead nav {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.6rem;
  font-size: 0.9rem;
}
.masthead nav a[aria-current="page"] { color: var(--signal); }
.beats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.85rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.beats a {
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.1rem;
}
.beats a:hover { color: var(--signal); border-color: var(--signal); }
.lede-block {
  padding: 2.2rem 0 1.2rem;
  border-bottom: 1px solid var(--rule);
}
.mood {
  margin: 0 0 0.5rem;
  color: var(--signal);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.8rem; line-height: 1.1; }
.lede { font-size: 1.18rem; max-width: 42rem; margin: 0; }
.experiment .disclaimer {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.tip.last { border-color: var(--ink); }
.tip.last.hit { border-left: 3px solid #2f6f4e; }
.tip.last.miss { border-left: 3px solid var(--signal); }
.tip.next { border-left: 3px solid var(--signal); }
.tip-meta {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 2.5rem;
  padding: 1.8rem 0 3rem;
}
.section { margin: 0 0 2.4rem; }
.section h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--ink);
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.grid {
  display: grid;
  gap: 1.1rem;
}
.section .grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.story,
.tip {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 1rem 1rem 0.9rem;
}
.kicker {
  margin: 0 0 0.3rem;
  color: var(--signal);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.story h3 {
  margin: 0 0 0.45rem;
  font-size: 1.22rem;
  line-height: 1.2;
}
.story h3 a { text-decoration: none; }
.summary { margin: 0; color: var(--ink); }
.source {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.source a { color: var(--muted); }
.rail h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4rem;
}
.rail ol { list-style: none; margin: 0; padding: 0; }
.rail li { border-bottom: 1px solid var(--rule); }
.rail a {
  display: block;
  padding: 0.65rem 0;
  text-decoration: none;
  font-size: 0.92rem;
}
.rail li[aria-current="page"] a { color: var(--signal); }
footer {
  border-top: 1px solid var(--rule);
  padding: 1.4rem 0 2.4rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.stamp { margin: 0.3rem 0 0; }
.archive-list { list-style: none; margin: 1.5rem 0 3rem; padding: 0; }
.archive-list li { border-top: 1px solid var(--rule); }
.archive-list a {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 0;
  text-decoration: none;
}
.archive-list time { font-family: var(--serif); font-size: 1.2rem; }
.archive-list span { color: var(--muted); }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .rail { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
