@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;700&family=Public+Sans:wght@400;700&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400&display=swap");

/* Components start with a narrow screen; wider layouts are added at the end. */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #222222;
  --black: #000000;
  --soft: #f5f5f5;
  --muted: #666666;
  --deep: #333333;
  --unit: 8px;
  --corner: 12px;
  --measure: 72ch;
  font-family: "Barlow", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
img { max-width: 100%; display: block; }
a { color: inherit; overflow-wrap: anywhere; text-underline-offset: 0.2em; }
a:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 4px;
  border-radius: 4px;
}
p, li, a, figcaption { font-size: 1rem; }
.guide-name, .nav-note, .question-tab, .button, .footer-links {
  font-family: "Public Sans", Arial, sans-serif;
}
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: 2.5rem; line-height: 1.08; letter-spacing: -0.025em; }
h1 em {
  display: block;
  margin-top: 8px;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0;
}
h2 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 24px; }
h3 { font-size: 1.25rem; line-height: 1.35; margin-bottom: 8px; }
ul, ol { margin: 0; padding: 0; }
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 24px; }
.skip-link {
  position: absolute;
  top: 8px;
  left: 24px;
  z-index: 10;
  padding: 12px 16px;
  min-height: 48px;
  background: var(--paper);
  color: var(--black);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }
.reading-progress {
  display: none;
  appearance: none;
  position: fixed;
  inset: 0 0 auto;
  width: 100%;
  height: 5px;
  border: 0;
  z-index: 9;
  color: var(--black);
  background: var(--soft);
}
.has-progress .reading-progress { display: block; }
.reading-progress::-webkit-progress-bar { background: var(--soft); }
.reading-progress::-webkit-progress-value { background: var(--black); }
.reading-progress::-moz-progress-bar { background: var(--black); }
.opening { position: relative; padding-top: 16px; }
.nav-panel {
  position: relative;
  z-index: 2;
  width: calc(100% - 32px);
  max-width: 1232px;
  padding: 16px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--muted);
  border-radius: var(--corner);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.guide-name {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-note { color: var(--muted); font-size: 1rem; }
.question-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.question-tab {
  min-height: 48px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  line-height: 1.35;
}
.question-tab:last-child { grid-column: 1 / -1; }
.question-tab:hover { border-color: var(--muted); }
.question-tab.is-current { background: var(--ink); color: var(--paper); }
.intro { position: relative; z-index: 1; padding-top: 48px; padding-bottom: 48px; }
.intro-copy { max-width: 56rem; }
.eyebrow, .rail-mark, .source-date {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 1rem;
  line-height: 1.6;
}
.eyebrow { margin-bottom: 24px; color: var(--muted); }
.lede { max-width: var(--measure); margin-top: 24px; }
.home .opening { background: var(--black); }
.home .intro { color: var(--paper); padding-top: 48px; padding-bottom: 56px; }
.home .eyebrow { color: var(--paper); }
.hero-still {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 880px;
  object-fit: cover;
  object-position: center;
  opacity: 0.6;
  color: transparent;
}
.home .opening::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 880px;
  background: linear-gradient(90deg, #000000f0, #000000b8 55%, #22222280);
  z-index: 1;
  pointer-events: none;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  line-height: 1.4;
  text-decoration: none;
  border-radius: var(--corner);
  border: 1px solid var(--ink);
  font-weight: 700;
}
.button::after { content: "↗"; margin-left: 16px; }
.button.light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.button.outline { color: var(--paper); border-color: var(--paper); }
.button.dark { color: var(--paper); background: var(--ink); }
.hero-actions a:focus-visible { outline-color: var(--paper); }
.hero-actions .light:focus-visible { outline-color: var(--paper); }
.reading-ground { position: relative; z-index: 2; color: var(--ink); background: var(--paper); padding-block: 48px 64px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.reading-copy { max-width: var(--measure); min-width: 0; }
.guide-section { margin-bottom: 48px; }
.guide-section:last-child { margin-bottom: 0; }
.check-list { list-style: none; counter-reset: check-step; }
.check-list > li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  border-top: 1px solid var(--muted);
  padding-block: 24px;
  counter-increment: check-step;
}
.check-list > li:last-child { border-bottom: 1px solid var(--muted); }
.check-list > li::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border: 1px solid var(--muted);
  border-radius: 8px;
}
.steps .check-list > li::before { content: counter(check-step, upper-alpha); background: var(--ink); color: var(--paper); border-color: var(--ink); }
.check-copy p { line-height: 1.6; }
.slip, .urgent { padding: 24px; border-radius: var(--corner); }
.slip { background: var(--soft); border-left: 4px solid var(--ink); }
.slip p:last-child { margin-top: 16px; }
.urgent { color: var(--paper); background: var(--ink); }
.urgent h2 { font-size: 1.5rem; }
.browse-grid, .board-grid { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.browse-link, .board-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--muted);
  border-radius: var(--corner);
  text-decoration: none;
  line-height: 1.4;
}
.browse-link::after, .board-link::after { content: "↗"; flex-shrink: 0; }
.browse-link:hover, .board-link:hover { background: var(--soft); }
.note-photo { margin: 0 0 48px; background: var(--soft); border-radius: var(--corner); overflow: hidden; }
.note-still { width: 100%; height: auto; aspect-ratio: 896 / 640; object-fit: cover; color: transparent; }
.source-notes { border-top: 2px solid var(--ink); padding-top: 32px; margin-top: 48px; }
.source-notes h2 { font-size: 1.25rem; margin-bottom: 16px; }
.source-date { color: var(--muted); margin-bottom: 8px; }
.source-links { list-style: none; margin-top: 16px; }
.source-link { display: flex; align-items: center; min-height: 48px; padding-block: 12px; line-height: 1.5; }
.question-rail {
  align-self: start;
  background: var(--soft);
  padding: 24px;
  border-radius: var(--corner);
}
.rail-mark { color: var(--muted); margin-bottom: 16px; }
.question-rail h2 { font-size: 1.5rem; margin-bottom: 16px; }
.question-rail ul { list-style: none; }
.related-link { display: flex; align-items: center; min-height: 64px; padding-block: 16px; border-top: 1px solid var(--muted); text-decoration: none; line-height: 1.4; }
.related-link:hover { text-decoration: underline; }
.question-rail .button { margin-top: 24px; width: 100%; }
.site-footer { color: var(--paper); background: var(--ink); padding-block: 40px; }
.footer-layout { display: grid; gap: 32px; }
.footer-layout p { max-width: 60ch; }
.footer-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.footer-links a { display: flex; align-items: center; min-height: 48px; padding-block: 12px; line-height: 1.4; text-decoration: underline; }
.footer-links a:focus-visible { outline-color: var(--paper); }
main:focus { outline: none; }
@media (min-width: 640px) {
  .opening { padding-top: 24px; }
  .nav-panel { width: calc(100% - 48px); padding: 16px 24px; grid-template-columns: 1fr auto; align-items: center; gap: 8px 24px; }
  .question-tabs { grid-column: 1 / -1; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .question-tab:last-child { grid-column: auto; }
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2rem; }
  .intro { padding-block: 64px; }
  .home .intro { padding-block: 64px 80px; }
  .browse-grid, .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slip, .urgent { padding: 32px; }
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 4rem; }
  .home .intro-copy { max-width: 56rem; }
  .hero-still, .home .opening::before { height: 800px; }
  .reading-ground { padding-block: 64px 80px; }
  .content-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 80px; }
  .question-rail { position: sticky; top: 32px; }
  .guide-section { margin-bottom: 64px; }
  .footer-layout { grid-template-columns: 1fr 1fr; gap: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media print {
  .nav-panel, .question-rail, .reading-progress, .skip-link, .hero-actions, .hero-still, .note-photo { display: none; }
  .opening, .home .opening, .home .intro, .site-footer, .urgent { background: white; color: black; }
  .home .opening::before { display: none; }
  .home .eyebrow { color: black; }
  .wrap { max-width: none; padding-inline: 0; }
  .content-layout, .footer-layout { display: block; }
  .intro, .home .intro, .reading-ground { padding-block: 24px; }
  h1 { font-size: 2.5rem; }
  .footer-links { display: none; }
  .guide-section, .check-list > li { break-inside: avoid; }
}
