:root {
  --bg: #ffffff;
  --ink: #000000;
  --muted: #4a4a4a;
  --line: #d8d8d8;
  --line-strong: #a8a8a8;
  --max-width: 1180px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--mono);
}

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

code,
pre,
input,
button,
textarea,
select {
  font: inherit;
}

pre {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fafafa;
}

.page-shell {
  width: min(var(--max-width), calc(100% - clamp(32px, 6vw, 88px)));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.site-header,
.site-footer,
.site-nav,
.link-row {
  display: flex;
}

.site-header,
.site-footer {
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.site-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav,
.link-row {
  flex-wrap: wrap;
  gap: 1rem;
}

.site-nav a.active {
  text-decoration-thickness: 2px;
}

main {
  display: grid;
  gap: 0;
}

.intro,
.section-grid,
.metric-grid,
.site-footer {
  margin-top: 32px;
}

.intro h1,
.section-grid h2,
.site-footer p,
.metric-card strong,
.tool-list strong {
  margin: 0;
}

.intro h1,
.section-grid h2 {
  font-size: clamp(2rem, 6vw, 3.3rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-grid h2 {
  font-size: clamp(1.25rem, 4vw, 1.8rem);
}

.hero-intro {
  max-width: 76rem;
}

.hero-intro h1 {
  max-width: none;
  font-size: clamp(2.9rem, 6vw, 4.9rem);
  line-height: 0.98;
}

.hero-intro .lede {
  max-width: 58ch;
}

.hero-mark {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 400;
  vertical-align: baseline;
  transform: translateY(-0.03em);
}

.kicker,
.section-label,
.metric-card span,
.detail-list dt,
.profile-list span,
.profile-list time {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kicker,
.section-label {
  margin: 0 0 0.65rem;
}

.lede,
.section-grid p,
.note,
.tool-list p,
.detail-list dd,
.bullet-list li,
.steps li,
.metric-list li span {
  color: var(--muted);
}

.lede {
  max-width: 74ch;
  margin: 1rem 0 0;
}

.note {
  margin: 1rem 0 0;
  font-size: 0.92rem;
}

.rule {
  margin-top: 32px;
  border-top: 1px solid var(--line-strong);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 72px);
  align-items: start;
}

.section-grid > section {
  min-width: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 24px;
  border-top: 1px solid var(--line);
}

.metric-card {
  min-width: 0;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--line);
}

.metric-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  line-height: 1;
}

.detail-list,
.metric-list,
.profile-list,
.tool-list,
.steps,
.bullet-list {
  margin: 1rem 0 0;
  padding: 0;
}

.detail-list div,
.metric-list li,
.profile-list li,
.tool-list li {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}

.detail-list div:first-child,
.metric-list li:first-child,
.profile-list li:first-child,
.tool-list li:first-child {
  border-top: 0;
}

.detail-list div {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
}

.detail-list dd {
  margin: 0;
  text-align: right;
}

.metric-list li {
  list-style: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
}

.metric-list strong,
.profile-list strong {
  font-size: 1rem;
}

.profile-list li {
  list-style: none;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  column-gap: 1rem;
}

.tool-list li {
  list-style: none;
}

.tool-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.tool-list p {
  margin: 0;
}

.plain-text {
  white-space: pre-wrap;
}

.narrow {
  max-width: 640px;
}

.site-footer {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 960px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .hero-intro h1 {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(var(--max-width), calc(100% - 28px));
    padding-top: 20px;
    padding-bottom: 36px;
  }

  .site-header,
  .site-footer {
    display: grid;
    gap: 0.9rem;
  }

  .intro,
  .section-grid,
  .metric-grid,
  .site-footer,
  .rule {
    margin-top: 24px;
  }

  .intro h1 {
    max-width: 100%;
  }

  .profile-list li,
  .detail-list div,
  .metric-list li {
    grid-template-columns: 1fr;
  }

  .detail-list dd,
  .profile-list time {
    text-align: left;
  }
}
