:root {
  color-scheme: dark;
  --ink: #181d31;
  --answer-surface: #212a43;
}

body {
  background: radial-gradient(ellipse at 72% 12%, #1d2948 0, transparent 630px);
}

.site-header {
  padding-block: 18px;
}

.brand-mark {
  border-radius: 10px;
  object-fit: contain;
  background: transparent;
}

.preview-strip {
  background: #1c253c;
  color: var(--muted);
}

.hero {
  gap: clamp(24px, 5vw, 70px);
  padding-block: clamp(36px, 7vw, 100px) 62px;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
}

.hero h1 {
  text-wrap: initial;
  max-width: none;
  overflow-wrap: normal;
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 5.2vw, 4.7rem);
  line-height: .97;
  letter-spacing: -.055em;
}

.hero .lead {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  max-width: 30ch;
}

.hero .prose {
  max-width: 42ch;
}

.hero .prose h2 {
  margin: 1.4rem 0 .6rem;
  font-size: 1.15rem;
}

.hero .media img {
  border-radius: 16px;
  border: 1px solid var(--line);
}

.media img, .hero .media img {
  background: var(--surface);
}

button, .button {
  color: var(--ink);
}

.answer, th, .prose code, .prose pre {
  background: var(--answer-surface);
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 36px;
}

.guide-card:hover {
  background: linear-gradient(90deg, transparent, #222c46);
}

.spoiler {
  scroll-margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 17px;
  background: var(--surface);
}

.spoiler summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent);
}

.code-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
  padding: 0;
}

.code-list li {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  margin: 0;
  border: 1px solid var(--line);
}

.prose .code-list code {
  background: none;
  padding: 0;
  font-size: 1rem;
}

.skip {
  background: var(--surface);
}

@media (max-width: 600px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 40px;
  }

  .guide-list {
    grid-template-columns: minmax(0, 1fr);
  }

  th, td {
    min-width: 0;
    padding: 10px 8px;
    overflow-wrap: anywhere;
    vertical-align: top;
  }
}

@media (max-width: 850px) {
  .toc {
    grid-row: auto;
    position: static;
  }
}
