:root {
  --bg: #f3f0e9;
  --paper: #f8f5ef;
  --ink: #111111;
  --muted: #66615a;
  --line: #171310;
  --accent: #b6421d;
  --max-width: 1180px;
  --reading-width: 740px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.52;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

a:hover {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

hr {
  border: 0;
  border-top: 1px solid rgba(17, 17, 17, 0.18);
  margin: 2.5rem 0;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  background: #ece8df;
  border: 1px solid rgba(17, 17, 17, 0.12);
}

code {
  font-size: 0.94em;
}

pre code {
  background: transparent;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
}

th,
td {
  padding: 0.65rem 0.75rem;
  border-top: 1px solid rgba(17, 17, 17, 0.18);
  text-align: left;
  vertical-align: top;
}

.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  border-bottom: 1px solid rgba(17, 17, 17, 0.14);
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.15rem;
  padding-bottom: 1rem;
}

.site-title {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
}

.site-main {
  padding-top: 3.75rem;
  padding-bottom: 6rem;
}

.site-footer {
  border-top: 1px solid rgba(17, 17, 17, 0.14);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.1rem;
  padding-bottom: 1.5rem;
}

.footer-mark,
.footer-copy {
  margin: 0;
}

.footer-mark {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-copy {
  color: var(--muted);
  max-width: 44rem;
}

.eyebrow,
.eyebrow-link {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow,
.tutorial-meta span,
.eyebrow-link a {
  color: var(--accent);
}

.eyebrow-link a {
  text-decoration: none;
}

.home-hero {
  padding-bottom: 4.5rem;
}

.home-title {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7.4rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.home-intro {
  max-width: 37rem;
  margin: 1.8rem 0 0;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: var(--muted);
}

.home-note {
  max-width: 30rem;
  margin: 2.25rem 0 0;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(17, 17, 17, 0.18);
  font-size: 0.94rem;
  color: var(--muted);
}

.home-section {
  padding-top: 3.25rem;
}

.section-head {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.section-head p:last-child {
  max-width: 34rem;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.tutorial-list {
  border-top: 1px solid rgba(17, 17, 17, 0.18);
}

.tutorial-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1.25rem;
  align-items: start;
  padding: 1rem 0 1.15rem;
  border-bottom: 1px solid rgba(17, 17, 17, 0.18);
  text-decoration: none;
}

.tutorial-row h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.tutorial-row p {
  margin: 0;
}

.tutorial-row-main p {
  max-width: 38rem;
  margin-top: 0.45rem;
  color: var(--muted);
}

.tutorial-row-meta {
  padding-top: 0.15rem;
}

.tutorial-row-meta p {
  font-size: 0.78rem;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tutorial-row-meta p:first-child {
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-weight: 700;
}

.tutorial-row-meta p:last-child {
  color: var(--muted);
}

.home-closing {
  max-width: 44rem;
  padding-top: 4rem;
}

.home-closing p:last-child {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.3;
}

.tutorial-page {
  padding-top: 0.25rem;
}

.tutorial-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid rgba(17, 17, 17, 0.14);
}

.tutorial-title {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(2.9rem, 7vw, 5.9rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.tutorial-subtitle {
  max-width: 32rem;
  margin: 1rem 0 0;
  font-size: clamp(1.02rem, 1.6vw, 1.28rem);
  color: var(--muted);
}

.tutorial-meta {
  display: grid;
  gap: 0.95rem;
}

.tutorial-meta p {
  margin: 0;
  font-size: 0.92rem;
}

.tutorial-meta span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tutorial-content {
  max-width: var(--reading-width);
  padding-top: 2.4rem;
}

.prose {
  font-size: 1.08rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.prose h1,
.prose h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.65rem);
}

.prose h3 {
  font-size: 1.3rem;
}

.prose h4 {
  font-size: 1.05rem;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table {
  margin-top: 0;
  margin-bottom: 1.15rem;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.prose img {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(17, 17, 17, 0.1);
}

@media (max-width: 980px) {
  .footer-inner,
  .tutorial-hero,
  .tutorial-row {
    grid-template-columns: 1fr;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .tutorial-title,
  .home-title {
    max-width: none;
  }

  .tutorial-row-meta {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 0 18px;
  }

  .masthead {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-main {
    padding-top: 2.25rem;
    padding-bottom: 3.5rem;
  }

  .prose {
    font-size: 1rem;
  }
}
