/* mhl42.ai — site stylesheet
   Tokens follow the MHL · 42 brand kit: Ink, Paper, Don't-Panic Gold, Inter. */

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #0e1116;
  --paper: #faf6ee;
  --gold: #f5c518;
  --ink-2: rgba(14, 17, 22, 0.7);
  --ink-3: rgba(14, 17, 22, 0.48);
  --ink-line: rgba(14, 17, 22, 0.14);
  --ink-fill: rgba(14, 17, 22, 0.04);
  --paper-2: rgba(250, 246, 238, 0.74);
  --paper-3: rgba(250, 246, 238, 0.5);
  --paper-line: rgba(250, 246, 238, 0.16);
  --paper-fill: rgba(250, 246, 238, 0.06);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1280px;
  --gutter: clamp(20px, 4vw, 64px);
  --section-y: clamp(64px, 8vw, 120px);
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(40px, 5.4vw, 72px);
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(30px, 3.6vw, 48px);
}

h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.45);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--gold);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 80px;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--ink-line);
  background: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 52px;
  height: 52px;
  display: block;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 32px);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.primary-nav a {
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a.active {
  color: var(--ink);
}

.primary-nav a.active {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 6px;
}

.primary-nav .nav-cta {
  min-height: 40px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.primary-nav .nav-cta:hover {
  color: var(--paper);
  opacity: 0.88;
}

.site-header-dark {
  border-bottom-color: var(--paper-line);
  background: var(--ink);
  color: var(--paper);
}

.site-header-dark .brand,
.site-header-dark .primary-nav,
.site-header-dark .primary-nav a:hover,
.site-header-dark .primary-nav a.active {
  color: var(--paper);
}

.site-header-dark .primary-nav .nav-cta {
  border: 1px solid var(--paper-line);
  background: transparent;
}

/* ---------- Shared building blocks ---------- */

.section {
  padding: var(--section-y) var(--gutter);
}

.section > .wrap,
.site-footer > .wrap {
  max-width: var(--max);
  margin: 0 auto;
}

.section-dark,
.surface-ink {
  background: var(--ink);
  color: var(--paper);
}

.section-tint {
  background: #f2ede3;
}

.label,
.eyebrow {
  margin: 0 0 20px;
  display: block;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-dark .label,
.section-dark .eyebrow,
.surface-ink .label,
.surface-ink .eyebrow,
.label.accent,
.eyebrow.accent {
  color: var(--gold);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head.split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.section-head.split > div {
  max-width: 760px;
}

.section-head p:not(.label) {
  max-width: 60ch;
  margin-top: 20px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.65;
}

.section-dark .section-head p:not(.label) {
  color: var(--paper-2);
}

.lead {
  max-width: 58ch;
  color: var(--ink-2);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
}

.section-dark .lead {
  color: var(--paper-2);
}

.button-row {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 120ms ease, background 120ms ease;
}

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

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

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

.button-outline-light {
  border-color: var(--paper-line);
  color: var(--paper);
}

.button-ink:hover,
.button-gold:hover {
  opacity: 0.88;
}

.button-outline:hover {
  background: var(--ink-fill);
}

.button-outline-light:hover {
  background: var(--paper-fill);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.text-link {
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline dotted rgba(14, 17, 22, 0.4);
  text-underline-offset: 5px;
  white-space: nowrap;
}

.text-link:hover {
  text-decoration-style: solid;
}

.section-dark .text-link {
  text-decoration-color: rgba(245, 197, 24, 0.7);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status.gold {
  border-color: rgba(245, 197, 24, 0.5);
  color: var(--gold);
}

.section-dark .status {
  border-color: var(--paper-line);
}

/* ---------- Illustration figure ---------- */

.figure {
  margin: 0;
}

.figure img {
  width: 100%;
  display: block;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  background: var(--paper);
}

.figure-dark img {
  border-color: var(--paper-line);
  background: var(--ink);
}

.figure figcaption {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.figure figcaption span + span::before {
  content: "·";
  margin-right: 18px;
}

.section-dark .figure figcaption {
  color: var(--paper-3);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(48px, 6vw, 96px);
  padding-bottom: clamp(48px, 6vw, 96px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
}

.hero h1 {
  max-width: 14ch;
}

.hero .lead {
  margin-top: 28px;
}

.hero-single .wrap {
  grid-template-columns: 1fr;
}

.page-hero .wrap {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: start;
}

/* ---------- Jump list (services hero) ---------- */

.jump-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink-line);
}

.jump-list li {
  border-bottom: 1px solid var(--ink-line);
}

.jump-list a {
  padding: 14px 4px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: baseline;
  text-decoration: none;
}

.jump-list a:hover {
  background: var(--ink-fill);
}

.jump-list span {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
}

.jump-list strong {
  font-size: 15px;
  font-weight: 700;
}

.jump-list em {
  color: var(--ink-3);
  font-style: normal;
  font-size: 13px;
}

/* ---------- Service rows (home) ---------- */

.service-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink-line);
}

.service-list li {
  border-bottom: 1px solid var(--ink-line);
}

.service-list a {
  padding: 26px 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 0.9fr) minmax(0, 1.4fr) auto;
  gap: 16px 28px;
  align-items: baseline;
  text-decoration: none;
  transition: background 120ms ease;
}

.service-list a:hover {
  background: var(--ink-fill);
}

.service-list span.num {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
}

.service-list h3 {
  font-size: 20px;
}

.service-list p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}

.service-list .arrow {
  color: var(--ink-3);
  font-size: 18px;
  transition: transform 120ms var(--ease);
}

.service-list a:hover .arrow {
  color: var(--ink);
  transform: translateX(4px);
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}

.section-dark .card {
  border-color: var(--paper-line);
}

a.card:hover {
  background: var(--ink-fill);
}

.section-dark a.card:hover {
  background: var(--paper-fill);
}

.card p {
  flex: 1;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}

.section-dark .card p {
  color: var(--paper-2);
}

.card .text-link {
  margin-top: 4px;
}

/* ---------- Steps ---------- */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.steps li {
  padding: 28px 28px 32px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
}

.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 22px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.steps strong {
  display: block;
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.steps p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Two-column sections ---------- */

.two-col .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}

.two-col .body p + p {
  margin-top: 18px;
}

.two-col .body p {
  max-width: 60ch;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.65;
}

.section-dark .two-col .body p {
  color: var(--paper-2);
}

.facts {
  margin: 36px 0 0;
  border-top: 1px solid var(--ink-line);
}

.facts div {
  padding: 12px 0;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--ink-line);
  font-size: 15px;
}

.facts dt {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 2;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
}

.facts dd a {
  text-decoration: underline dotted rgba(14, 17, 22, 0.4);
  text-underline-offset: 4px;
}

.facts dd a:hover {
  text-decoration-style: solid;
}

/* ---------- Service detail (services page) ---------- */

.service {
  border-top: 1px solid var(--ink-line);
}

.service .wrap {
  display: grid;
  grid-template-columns: 96px minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 24px clamp(28px, 4vw, 64px);
  align-items: start;
}

.service .num {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
}

.service h2 {
  max-width: 18ch;
  font-size: clamp(28px, 3vw, 40px);
}

.service .fit {
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 3px solid var(--gold);
  background: var(--ink-fill);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.service .fit strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.service .body > p {
  max-width: 62ch;
  margin-top: 22px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.65;
}

.service aside {
  padding: 24px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
}

.service aside h3 {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.service aside ul {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.service aside li {
  padding: 8px 0;
  border-top: 1px solid var(--ink-line);
  font-size: 14px;
  line-height: 1.45;
}

.service aside p {
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- Approach ---------- */

.points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.points li {
  padding: 22px 0;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  border-top: 1px solid var(--paper-line);
}

.points li span {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.8;
}

.points strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.points p {
  color: var(--paper-2);
  font-size: 15px;
  line-height: 1.6;
}

.standards {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--paper-line);
  color: var(--paper-3);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Formats ---------- */

.formats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.formats li {
  padding: 24px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
}

.formats strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.formats p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Research projects ---------- */

.project {
  border-top: 1px solid var(--ink-line);
}

.project .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
}

.project.flip .wrap > .figure {
  order: -1;
}

.project .meta {
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.project .meta .kind {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project h2 {
  font-size: clamp(30px, 3.4vw, 46px);
}

.project .body > p {
  max-width: 58ch;
  margin-top: 20px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.65;
}

.project .button-row {
  margin-top: 28px;
}

.project .meta .kind code {
  font: inherit;
  text-transform: none;
}

.project .body > .feature-list {
  margin: 28px 0 0;
  max-width: 58ch;
}

.project-plain .wrap {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.feature-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink-line);
}

.feature-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--ink-line);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}

.feature-list strong {
  color: var(--ink);
  font-weight: 700;
}

.project-plain .body > .feature-list + p {
  margin-top: 0;
}

.areas {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--paper-line);
}

.areas li {
  padding: 18px 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--paper-line);
  font-size: 16px;
  line-height: 1.5;
}

.areas li span {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
}

/* ---------- CTA band ---------- */

.cta-band .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}

.cta-band p:not(.label) {
  max-width: 52ch;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 17px;
}

.section-dark.cta-band p {
  color: var(--paper-2);
}

/* ---------- Contact ---------- */

.contact .wrap {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 7vw, 120px);
}

.contact .body p:not(.label) {
  max-width: 48ch;
  margin-top: 20px;
  color: var(--paper-2);
  font-size: 17px;
  line-height: 1.65;
}

.contact-email {
  margin-top: 30px;
  display: inline-block;
  color: var(--paper);
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: underline dotted rgba(245, 197, 24, 0.7);
  text-underline-offset: 7px;
}

#contact-form {
  max-width: 760px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

#contact-form label {
  display: block;
  margin-bottom: 18px;
}

#contact-form label > span {
  margin-bottom: 8px;
  display: block;
  color: var(--paper-3);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--paper-line);
  border-radius: 10px;
  background: transparent;
  color: var(--paper);
  font-size: 15px;
}

#contact-form textarea {
  min-height: 170px;
  resize: vertical;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: rgba(245, 197, 24, 0.62);
}

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.form-actions p {
  max-width: 50ch;
  margin: 0;
  color: var(--paper-3);
  font-size: 12px;
  line-height: 1.55;
}

.form-actions a {
  color: var(--paper-2);
}

.form-status {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--paper-2);
  font-size: 13px;
}

.form-status[data-kind="success"] {
  color: var(--gold);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 32px var(--gutter) 44px;
  border-top: 1px solid var(--paper-line);
  background: var(--ink);
  color: var(--paper);
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 32px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.footer-brand img {
  width: 48px;
  height: 48px;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  font-size: 14px;
}

.footer-brand span {
  margin-top: 2px;
  color: var(--paper-3);
  font-size: 12px;
}

.site-footer nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  color: var(--paper-2);
  font-size: 13px;
}

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

.site-footer nav a:hover {
  color: var(--paper);
}

.site-footer .wrap > p {
  grid-column: 1 / -1;
  color: var(--paper-3);
  font-size: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .hero .wrap,
  .page-hero .wrap,
  .two-col .wrap,
  .project .wrap,
  .project-plain .wrap,
  .contact .wrap {
    grid-template-columns: 1fr;
  }

  .project.flip .wrap > .figure {
    order: 0;
  }

  .hero .figure {
    max-width: 820px;
  }

  .service .wrap {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .service aside {
    grid-column: 2;
  }

  .service-list a {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .service-list p {
    grid-column: 2;
  }

  .card-grid,
  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .formats {
    grid-template-columns: 1fr 1fr;
  }

  .cta-band .wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .primary-nav {
    width: 100%;
    padding-top: 12px;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--ink-line);
  }

  .site-header-dark .primary-nav {
    border-top-color: var(--paper-line);
  }

  html {
    scroll-padding-top: 140px;
  }

  .section-head.split {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-grid,
  .steps,
  .formats {
    grid-template-columns: 1fr;
  }

  .service .wrap {
    grid-template-columns: 1fr;
  }

  .service aside {
    grid-column: 1;
  }

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

  .service-list span.num {
    display: none;
  }

  .service-list p {
    grid-column: 1;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .site-footer .wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .brand span {
    display: none;
  }

  .primary-nav {
    font-size: 13px;
  }

  .primary-nav .nav-cta {
    min-height: 36px;
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Blog ---------- */

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink-line);
}

.post-list li {
  border-bottom: 1px solid var(--ink-line);
}

.post-list a {
  padding: 32px 0;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto;
  gap: 12px 32px;
  align-items: baseline;
  text-decoration: none;
  transition: background 120ms ease;
}

.post-list a:hover {
  background: var(--ink-fill);
}

.post-list .when {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.post-list h2 {
  font-size: clamp(22px, 2.4vw, 30px);
}

.post-list p {
  grid-column: 2;
  max-width: 64ch;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

.post-list .arrow {
  color: var(--ink-3);
  font-size: 18px;
  transition: transform 120ms var(--ease);
}

.post-list a:hover .arrow {
  color: var(--ink);
  transform: translateX(4px);
}

.post-hero h1 {
  max-width: 22ch;
  font-size: clamp(36px, 4.6vw, 60px);
}

.post-hero .label a {
  text-decoration: none;
}

.post-hero .label a:hover {
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}

.post-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--paper-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-meta span + span::before,
.post-meta span + time::before,
.post-meta time + span::before {
  content: "·";
  margin-right: 18px;
}

.post-body > .wrap {
  max-width: 780px;
}

.prose > * + * {
  margin-top: 1.3em;
}

.prose p,
.prose li {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.7;
}

.prose h2 {
  margin-top: 2.4em;
  font-size: clamp(24px, 2.6vw, 32px);
}

.prose h3 {
  margin-top: 2em;
  font-size: 20px;
}

.prose h2 + p,
.prose h3 + p {
  margin-top: 0.9em;
}

.prose strong {
  color: var(--ink);
}

.prose a {
  text-decoration: underline dotted rgba(14, 17, 22, 0.4);
  text-underline-offset: 4px;
}

.prose a:hover {
  text-decoration-style: solid;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.55em;
}

.prose li::marker {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 13px;
}

.prose blockquote {
  margin: 1.8em 0;
  padding: 20px 24px;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: var(--ink-fill);
}

.prose blockquote p {
  color: var(--ink);
  font-size: 17px;
}

.prose blockquote cite {
  display: block;
  margin-top: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose .table-scroll {
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--ink-line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose td {
  color: var(--ink-2);
}

.prose td strong {
  color: var(--ink);
}

.prose code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--ink-fill);
  font-family: var(--mono);
  font-size: 0.88em;
}

.prose .summary {
  padding: 22px 26px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
}

.prose .summary p {
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
}

.post-footer {
  margin-top: 64px;
  padding-top: 32px;
  display: grid;
  gap: 28px;
  border-top: 1px solid var(--ink-line);
}

.author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author .avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.author strong {
  display: block;
  font-size: 15px;
}

.author span {
  color: var(--ink-3);
  font-size: 13px;
}

.author a {
  text-decoration: underline dotted rgba(14, 17, 22, 0.4);
  text-underline-offset: 4px;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.post-nav a {
  padding: 18px 20px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  text-decoration: none;
}

.post-nav a:hover {
  background: var(--ink-fill);
}

.post-nav a.next {
  text-align: right;
}

.post-nav a span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-nav a strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (max-width: 760px) {
  .post-list a {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .post-list .when {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 16px;
  }

  .post-list p {
    grid-column: 1;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav a.next {
    text-align: left;
  }
}

/* ---------- Blog diagrams ---------- */

.prose figure.diagram {
  margin: 2.2em 0;
}

.prose figure.diagram .diagram-scroll {
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  background: var(--paper);
}

.prose figure.diagram svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

.prose figure.diagram figcaption {
  margin-top: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-transform: uppercase;
}

.dg-box {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.dg-soft {
  fill: rgba(14, 17, 22, 0.04);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.dg-dash {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}

.dg-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.dg-thin {
  fill: none;
  stroke: rgba(14, 17, 22, 0.35);
  stroke-width: 1.2;
  stroke-dasharray: 2 4;
}

.dg-gold {
  fill: var(--gold);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.dg-t {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dg-s {
  fill: rgba(14, 17, 22, 0.7);
  font-size: 12px;
}

.dg-m {
  fill: rgba(14, 17, 22, 0.62);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dg-tag {
  fill: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prose pre {
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  background: var(--ink-fill);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}
