/* Ledger: warm paper, tight ink, mono metadata, hairlines instead of cards. */
:root {
  --paper: #fbfaf7;
  --surface: #fff;
  --ink: #151413;
  --ink-2: #4a4844;
  --ink-3: #6f6c65;
  --accent: #1b3fcb;
  --rule: #e3e0d8;
  --rule-strong: #d2cec3;
  --live: #197648;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --page: 24px;
  --read: 696px;
  --wide: 1024px;
  --section: 88px;
  --shadow-line: 0 0 0 1px var(--rule);
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
::selection { background: #dfe6ff; color: var(--ink); }

.skip-link {
  position: fixed; z-index: 20; top: 10px; left: 10px; transform: translateY(-150%);
  background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 4px;
}
.skip-link:focus { transform: translateY(0); }
:where(a, button, [tabindex]):focus-visible { outline: 0; box-shadow: var(--focus); border-radius: 4px; }

.col { max-width: calc(var(--read) + (var(--page) * 2)); margin: 0 auto; padding-inline: var(--page); }
.wide { max-width: calc(var(--wide) + (var(--page) * 2)); margin: 0 auto; padding-inline: var(--page); }
.prose-width { max-width: var(--read); }

.masthead { border-bottom: 1px solid var(--rule); }
.masthead__inner {
  min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-line); }
.brand strong { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a, .nav-toggle {
  font: 500 11.5px/1.2 var(--mono); letter-spacing: .09em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-3); background: none; border: 0; padding: 5px 0;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--accent); }
.nav-toggle { display: none; color: var(--ink); cursor: pointer; }

.hero { padding-top: 78px; }
.hero--portrait {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 44px 64px; align-items: center;
}
.hero__copy, .hero__portrait { min-width: 0; }
.hero--portrait .metrics { grid-column: 1 / -1; margin-top: 0; }
.hero__portrait { margin: 0; align-self: stretch; }
.hero__portrait img {
  display: block; width: 100%; height: 100%; min-height: 500px; object-fit: cover;
  box-shadow: var(--shadow-line);
}
.home__content { max-width: var(--read); margin-inline: auto; }
.eyebrow, .meta, .label, .stack, .section-head, .metric dt, .route-back {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.eyebrow { margin: 0 0 18px; color: var(--ink-3); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.hero h1, .page-head h1 {
  margin: 0; max-width: 21ch; font-size: 44px; line-height: 1.06; letter-spacing: -.035em; font-weight: 500;
}
.hero__lede { margin: 24px 0 0; max-width: 49ch; color: var(--ink-2); font-size: 20px; line-height: 1.55; letter-spacing: -.01em; }
.hero__note { margin: 12px 0 0; max-width: 62ch; color: var(--ink-3); font-size: 15px; line-height: 1.55; }
.hero__actions, .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 18px;
  border: 0; border-radius: 4px; text-decoration: none; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
.btn--primary { color: var(--paper); background: var(--ink); }
.btn--primary:hover { color: #fff; background: var(--accent); }
.btn--secondary { background: transparent; color: var(--ink); box-shadow: var(--shadow-line); }
.btn--secondary:hover { color: var(--accent); box-shadow: 0 0 0 1px var(--rule-strong); }

.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 48px 0 0; padding: 0;
  border-block: 1px solid var(--rule); list-style: none;
}
.metric { padding: 18px 14px 18px 0; }
.metric + .metric { padding-left: 14px; border-left: 1px solid var(--rule); }
.metric dt { color: var(--ink-3); font-size: 11px; line-height: 1.35; letter-spacing: .06em; text-transform: uppercase; }
.metric dd { margin: 4px 0 0; font-size: 20px; line-height: 1.2; font-weight: 500; letter-spacing: -.02em; }

.section { padding-top: var(--section); }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin-bottom: 32px; padding-top: 16px; border-top: 1px solid var(--rule);
  font-size: 11.5px; line-height: 1.3; letter-spacing: .09em; text-transform: uppercase;
}
.section-head__title { display: flex; gap: 12px; align-items: baseline; }
.section-head__title span { color: var(--accent); }
.section-head h2 {
  margin: 0; font: 500 23px/1.2 var(--sans); letter-spacing: -.025em; text-transform: none;
}
.section-head > a { color: var(--ink-3); text-decoration: none; }
.section-head > a:hover { color: var(--accent); }

.rows { margin: 0; padding: 0; list-style: none; }
.rows > li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.rows > li:first-child { padding-top: 0; }
.rows > li:last-child { padding-bottom: 0; border-bottom: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: baseline; }
.row h3, .row-title { margin: 0; font-size: 17.5px; line-height: 1.4; letter-spacing: -.01em; font-weight: 500; }
.row h3 a, .row-title a { text-decoration: none; }
.row h3 a:hover, .row-title a:hover { color: var(--accent); box-shadow: inset 0 -1px 0 var(--accent); }
.row p { margin: 3px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.meta { color: var(--ink-3); font-size: 12.5px; line-height: 1.45; white-space: nowrap; }
.stack { margin-top: 8px; color: var(--ink-3); font-size: 12px; line-height: 1.6; }
.live { display: inline-block; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: var(--live); vertical-align: 2px; }
.impact-list { margin: 8px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.impact-list li { position: relative; padding-left: 15px; margin-top: 3px; }
.impact-list li::before { content: "—"; position: absolute; left: 0; color: var(--rule-strong); }

.quote { margin: 12px 0 0; padding-left: 16px; border-left: 1px solid var(--rule-strong); color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.quote cite { display: block; margin-top: 5px; color: var(--ink-3); font: normal 12px/1.45 var(--mono); }
.text-link { color: var(--accent); text-decoration: none; }
.text-link:hover { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }

.contact-block { padding-block: var(--section) 72px; }
.contact-block__inner { padding-top: 32px; border-top: 1px solid var(--rule); }
.contact-block h2 { max-width: 24ch; margin: 0; font-size: 30px; line-height: 1.16; letter-spacing: -.028em; font-weight: 500; }
.contact-block p { max-width: 50ch; margin: 12px 0 0; color: var(--ink-2); font-size: 15px; }

.page-head { padding: 72px 0 42px; border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: 38px; }
.page-head p { max-width: 51ch; margin: 18px 0 0; color: var(--ink-2); font-size: 18px; line-height: 1.55; }
.page-head .meta { display: block; margin-top: 20px; }

.case-grid { display: grid; gap: 48px; }
.case-study { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr); gap: 42px; padding-bottom: 48px; border-bottom: 1px solid var(--rule); }
.case-study:last-child { border-bottom: 0; padding-bottom: 0; }
.case-study h2 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -.025em; font-weight: 500; }
.case-study__dek { margin: 10px 0 0; color: var(--ink-2); font-size: 17px; line-height: 1.55; }
.case-study__facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0; padding: 0; list-style: none; }
.case-study__facts li { padding-right: 14px; }
.case-study__facts li + li { padding-left: 14px; border-left: 1px solid var(--rule); }
.case-study__facts strong { display: block; font-size: 19px; font-weight: 500; }
.case-study__facts span { display: block; margin-top: 2px; color: var(--ink-3); font: 11px/1.45 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.case-study__body { color: var(--ink-2); font-size: 15px; }
.case-study__body p { margin: 0 0 10px; }
.case-study__media { align-self: start; margin: 0; }
.case-study__media img { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow-line); background: var(--surface); }
.case-study__media figcaption { margin-top: 9px; color: var(--ink-3); font: 11.5px/1.45 var(--mono); }
.case-study--featured { border-left: 2px solid var(--rule-strong); padding-left: 22px; }
.case-study--featured .case-study__copy { grid-column: 1 / -1; }

.timeline { margin: 0; padding: 0; list-style: none; }
.timeline > li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 30px; padding: 0 0 46px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline__date { color: var(--ink-3); font: 12px/1.5 var(--mono); }
.timeline__body { position: relative; padding-left: 28px; border-left: 1px solid var(--rule-strong); }
.timeline__body::before { content: ""; position: absolute; top: 7px; left: -4px; width: 7px; height: 7px; background: var(--paper); box-shadow: 0 0 0 1px var(--ink-3); border-radius: 50%; }
.timeline h2 { margin: 0; font-size: 21px; line-height: 1.3; letter-spacing: -.02em; font-weight: 500; }
.timeline .role { margin: 2px 0 12px; color: var(--ink-3); font: 12px/1.45 var(--mono); }
.timeline ul { margin: 0; padding-left: 19px; color: var(--ink-2); font-size: 15px; }
.timeline li li { margin-top: 7px; }

.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.service { padding: 28px; background: var(--surface); border-radius: 6px; box-shadow: var(--shadow-line); }
.service .label { color: var(--ink-3); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.service h2 { margin: 12px 0 8px; font-size: 23px; line-height: 1.25; letter-spacing: -.02em; font-weight: 500; }
.service > p { margin: 0; color: var(--ink-2); font-size: 15px; }
.service ul { margin: 22px 0 0; padding: 18px 0 0 18px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
.service li { margin-top: 6px; }
.service .actions { margin-top: 24px; }

.writing-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.writing-list li { display: grid; grid-template-columns: 106px minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.writing-list h2, .writing-list h3 { margin: 0; font-size: 16.5px; line-height: 1.45; font-weight: 400; }
.writing-list a { text-decoration: none; }
.writing-list a:hover { color: var(--accent); }
.publication { display: block; margin-top: 3px; color: var(--ink-3); font: 11.5px/1.4 var(--mono); }

.article-head { padding: 62px 0 24px; border-bottom: 1px solid var(--rule); }
.route-back { display: inline-block; margin-bottom: 28px; color: var(--ink-3); font-size: 11.5px; text-decoration: none; text-transform: uppercase; letter-spacing: .06em; }
.route-back:hover { color: var(--accent); }
.article-head h1 { margin: 0; max-width: 27ch; font-size: 34px; line-height: 1.12; letter-spacing: -.03em; font-weight: 500; }
.article-head__summary { max-width: 57ch; margin: 16px 0 0; color: var(--ink-2); font-size: 17px; line-height: 1.55; }
.article-head__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; }
.article-body { padding-top: 36px; overflow-wrap: anywhere; }
.article-body > *:first-child { margin-top: 0; }
.article-body h1, .article-body h2 { margin: 48px 0 12px; font-size: 22px; line-height: 1.3; letter-spacing: -.02em; font-weight: 500; }
.article-body h3 { margin: 34px 0 10px; font-size: 18px; line-height: 1.4; letter-spacing: -.01em; font-weight: 500; }
.article-body h4 { margin: 28px 0 8px; font-size: 17px; font-weight: 500; }
.article-body p { margin: 0 0 18px; }
.article-body strong { font-weight: 500; }
.article-body a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--rule-strong); }
.article-body a:hover { text-decoration-color: var(--accent); }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 23px; }
.article-body li { margin: 6px 0; }
.article-body li > p { margin-bottom: 7px; }
.article-body blockquote { margin: 26px 0; padding: 2px 0 2px 18px; border-left: 1px solid var(--rule-strong); color: var(--ink-2); }
.article-body picture, .article-body figure, .article-body .captioned-image-container, .article-body .image2-inset, .article-body .image2, .article-body .image-link { display: block; max-width: 100%; }
.article-body img, .article-body video { display: block; max-width: 100%; height: auto; margin: 28px 0; border-radius: 6px; box-shadow: var(--shadow-line); background: var(--surface); }
.article-body figcaption { margin: -17px 0 26px; color: var(--ink-3); font: 11.5px/1.5 var(--mono); }
.article-body pre { max-width: 100%; overflow-x: auto; margin: 22px 0; padding: 16px; background: var(--surface); border-radius: 6px; box-shadow: var(--shadow-line); font: 13px/1.6 var(--mono); }
.article-body code { font-family: var(--mono); font-size: .88em; }
.article-body :not(pre) > code { padding: 1px 5px; background: var(--surface); border-radius: 3px; box-shadow: var(--shadow-line); }
.article-body hr { margin: 44px 0; border: 0; border-top: 1px solid var(--rule); }
.article-body table { display: block; max-width: 100%; overflow-x: auto; margin: 24px 0; border-collapse: collapse; font-size: 14px; }
.article-body th, .article-body td { padding: 9px 11px; border-bottom: 1px solid var(--rule); text-align: left; }
.article-body th { border-bottom-color: var(--rule-strong); font-weight: 500; }
.article-pager { display: flex; justify-content: space-between; gap: 18px; margin-top: 52px; padding-top: 16px; border-top: 1px solid var(--rule); font: 12px/1.5 var(--mono); }
.article-pager a { color: var(--accent); text-decoration: none; }

.footer { margin-top: 24px; border-top: 1px solid var(--rule); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 25px 46px; color: var(--ink-3); font: 12px/1.55 var(--mono); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }

.not-found { min-height: 65vh; padding-top: 96px; }
.not-found h1 { margin: 0; font-size: 54px; line-height: 1; letter-spacing: -.04em; font-weight: 500; }
.not-found p { max-width: 42ch; color: var(--ink-2); }

@media (max-width: 760px) {
  :root { --page: 20px; --section: 60px; }
  .masthead__inner { min-height: 68px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; z-index: 10; top: 68px; left: 0; right: 0; display: none;
    padding: 18px 20px 22px; background: var(--paper); border-bottom: 1px solid var(--rule);
  }
  .nav[data-open] { display: grid; gap: 8px; }
  .nav a { padding: 9px 0; }
  .hero { padding-top: 54px; }
  .hero--portrait { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .hero--portrait .metrics { margin-top: 2px; }
  .hero__portrait { max-height: 520px; }
  .hero__portrait img { min-height: 0; max-height: 520px; aspect-ratio: 4 / 5; object-position: center 28%; }
  .hero h1, .page-head h1 { max-width: none; font-size: 34px; }
  .hero__lede { font-size: 18px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--rule); }
  .metric:nth-child(4) { border-top: 1px solid var(--rule); }
  .row { grid-template-columns: 1fr; gap: 5px; }
  .row .meta { grid-row: 1; }
  .section-head > a { display: none; }
  .case-study { grid-template-columns: 1fr; gap: 24px; }
  .case-study__media { grid-row: 1; }
  .case-study__facts { grid-template-columns: 1fr; gap: 12px; }
  .case-study__facts li + li { padding-left: 0; border-left: 0; }
  .timeline > li { grid-template-columns: 1fr; gap: 8px; padding-bottom: 38px; }
  .timeline__body { padding-left: 20px; }
  .service-grid { grid-template-columns: 1fr; }
  .service { padding: 22px; }
  .writing-list li { grid-template-columns: 1fr auto; gap: 3px 14px; }
  .writing-list .date { grid-column: 1 / -1; }
  .article-head { padding-top: 46px; }
  .article-head h1 { font-size: 29px; }
  .article-pager { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
