/* =====================================================================
   AnthropicAPIGuide — stylesheet
   Palette: exactly four colors — paper, ink, clay, sage.
   Everything else is an alpha variant of ink or paper. No gradients,
   no glows, no drop shadows.
   ===================================================================== */

/* ---------- Self-hosted fonts (SIL Open Font License 1.1) ---------- */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f6f3ed;
  --ink: #1e1d1b;
  --clay: #ebb5a2;
  --sage: #cbd9c3;

  --ink-85: rgb(30 29 27 / .86);
  --ink-72: rgb(30 29 27 / .72);
  --ink-60: rgb(30 29 27 / .6);
  --ink-14: rgb(30 29 27 / .14);
  --ink-08: rgb(30 29 27 / .08);
  --ink-04: rgb(30 29 27 / .04);
  --paper-80: rgb(246 243 237 / .8);
  --paper-60: rgb(246 243 237 / .6);
  --paper-14: rgb(246 243 237 / .14);

  --font-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --container: 1180px;
  --gutter: clamp(20px, 4.5vw, 48px);
  --radius: 6px;
  --radius-lg: 12px;
  --header-h: 68px;
  --t: 180ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
  color: inherit;
}

mark {
  background: var(--clay);
  color: var(--ink);
  padding: 0 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---------- Type utilities ---------- */
.h1 {
  font-size: clamp(2.75rem, 1.1rem + 5.6vw, 5.25rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.h2 {
  font-size: clamp(2rem, 1.25rem + 2.7vw, 3.375rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.625rem, 1.3rem + 1.1vw, 2.125rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
}

.h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.005em;
}

.lead {
  font-size: clamp(1.125rem, 1.025rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-85);
}

.muted {
  color: var(--ink-72);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--ink-72);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  background: var(--clay);
}

.eyebrow--sage::before {
  background: var(--sage);
  outline: 1px solid var(--ink-14);
}

.meta {
  font-size: 0.875rem;
  color: var(--ink-60);
}

.meta > span + span::before {
  content: "\00B7";
  margin: 0 0.5em;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- Links ---------- */
.link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--clay);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: background-color var(--t) var(--ease);
}

.link:hover {
  background: var(--clay);
  text-decoration-color: transparent;
}

.ext::after {
  content: "";
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.25em;
  vertical-align: super;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 11.5l7-7'/%3E%3Cpath d='M6 4.5h5.5V10'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 11.5l7-7'/%3E%3Cpath d='M6 4.5h5.5V10'/%3E%3C/svg%3E") center / contain no-repeat;
}

.more {
  display: inline;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
}

.more::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1.5px;
  margin-left: 8px;
  vertical-align: middle;
  background: currentColor;
  transition: transform var(--t) var(--ease);
}

.more:hover::after,
.post:hover .more::after {
  transform: translateX(6px);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(820px + 2 * var(--gutter));
}

.section {
  padding-block: clamp(64px, 8.5vw, 120px);
  border-top: 1px solid var(--ink-14);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 32px);
}

.sec-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 32px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.sec-head__title {
  grid-column: 1 / span 6;
}

.sec-head__title .h2 {
  margin-top: 18px;
  max-width: 14ch;
}

.sec-head__intro {
  grid-column: 7 / -1;
}

.sec-head__intro .sub {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem);
  line-height: 1.18;
  max-width: 24ch;
}

.sec-head__intro p:not(.sub) {
  margin-top: 16px;
  color: var(--ink-72);
  max-width: 48ch;
}

.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}

.split__aside {
  grid-column: span 4;
}

.split__main {
  grid-column: span 8;
}

.prose {
  max-width: 66ch;
}

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

.prose h3 {
  margin-top: 1.7em;
}

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

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

.prose li::marker {
  color: var(--ink-60);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--ink-14);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand__mark {
  flex: none;
  width: 14px;
  height: 14px;
  background: var(--clay);
  border: 1.5px solid var(--ink);
  transition: background-color var(--t) var(--ease);
}

.brand:hover .brand__mark {
  background: var(--sage);
}

.brand strong {
  font-weight: 800;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-list a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--t) var(--ease);
}

.nav-list a:hover,
.nav-list a.is-active {
  background: var(--clay);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle__bars {
  position: relative;
  width: 16px;
  height: 10px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--t) var(--ease), top var(--t) var(--ease);
}

.nav-toggle__bars::before {
  top: 1px;
}

.nav-toggle__bars::after {
  top: 8px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 4.5px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 4.5px;
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(56px, 8vw, 112px) clamp(56px, 7vw, 96px);
}

.hero .grid {
  align-items: center;
}

.hero__copy {
  grid-column: span 7;
}

.hero__aside {
  grid-column: span 5;
}

.hero__title {
  margin-top: 22px;
}

.hero__sub {
  margin-top: 26px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.625rem, 1.15rem + 1.9vw, 2.625rem);
  line-height: 1.08;
  max-width: 18ch;
  color: var(--ink);
}

.hero__lead {
  margin-top: 22px;
  max-width: 50ch;
}

.hero__meta {
  margin-top: 26px;
}

.hero__caption {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--ink-60);
  text-align: right;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 2px solid var(--ink);
}

.fact {
  padding: 20px 24px 0 0;
}

.fact + .fact {
  padding-left: 24px;
  border-left: 1px solid var(--ink-14);
}

.fact__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.625rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.fact__label {
  margin-top: 10px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-72);
  max-width: 22ch;
}

/* ---------- Code ---------- */
.code {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
}

.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--paper-14);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-60);
}

.code__bar .lang {
  color: var(--clay);
}

.code pre {
  margin: 0;
  padding: 20px 22px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: var(--paper-14) transparent;
}

.code pre code {
  font: inherit;
  color: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
}

.tk-c {
  color: var(--paper-60);
  font-style: italic;
}

.tk-s {
  color: var(--clay);
}

.tk-k {
  color: var(--sage);
}

.tk-p {
  color: var(--paper-60);
}

:not(pre) > code {
  padding: 0.1em 0.4em;
  border-radius: 4px;
  background: var(--ink-08);
  font-family: var(--font-mono);
  font-size: 0.86em;
}

/* ---------- Images (single-hue treatment to stay on palette) ---------- */
.duo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--clay);
  border-radius: var(--radius-lg);
}

.duo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  mix-blend-mode: luminosity;
}

.duo--sage {
  background: var(--sage);
}

.duo--wide {
  aspect-ratio: 16 / 9;
}

.duo__cap {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 6px 12px;
  background: var(--paper);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-72);
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin-top: 8px;
  border-left: 1px solid var(--ink-14);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 14px 0 14px 26px;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 26px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--clay);
}

.timeline__year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.timeline__text {
  font-size: 0.9875rem;
  line-height: 1.6;
  color: var(--ink-85);
}

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--ink-14);
}

.steps li:last-child {
  border-bottom: 1px solid var(--ink-14);
}

.step__n {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2.75rem;
  line-height: 0.9;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.step__body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.step__body p {
  margin-top: 8px;
  font-size: 0.9875rem;
  color: var(--ink-72);
}

.step__body p + p {
  margin-top: 8px;
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.cards--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--ink-14);
  border-radius: var(--radius);
}

.card__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border-radius: 10px;
  background: var(--clay);
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

.card__icon--sage {
  background: var(--sage);
}

.card h3,
.card h4 {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card p {
  margin-top: 10px;
  font-size: 0.9625rem;
  line-height: 1.65;
  color: var(--ink-72);
}

.card .link,
.card .links {
  margin-top: 16px;
}

.card ul {
  list-style: none;
  margin-top: 8px;
}

.card ul li {
  position: relative;
  padding-left: 16px;
  font-size: 0.9625rem;
  line-height: 1.65;
  color: var(--ink-72);
}

.card ul li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--clay);
}

.card--flat {
  border: 0;
  border-top: 2px solid var(--ink);
  border-radius: 0;
  padding: 24px 0 0;
}

.card__tag {
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sage);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Callout ---------- */
.callout {
  padding: 24px 28px;
  background: var(--ink-04);
  border-left: 4px solid var(--clay);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout--sage {
  background: var(--sage);
  border-left-color: var(--ink);
}

.callout__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.callout p,
.callout li {
  font-size: 0.975rem;
  line-height: 1.65;
  color: var(--ink-85);
}

.callout p + p,
.callout ol,
.callout ul {
  margin-top: 10px;
}

.callout ol,
.callout ul {
  padding-left: 1.2em;
}

.callout li + li {
  margin-top: 6px;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink-14);
  border-radius: var(--radius);
  scrollbar-width: thin;
  scrollbar-color: var(--ink-14) transparent;
}

.table-wrap table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.table-wrap th,
.table-wrap td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ink-08);
}

.table-wrap th {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-72);
  background: var(--ink-04);
  white-space: nowrap;
}

.table-wrap td:first-child {
  white-space: nowrap;
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

.table-wrap tbody tr:hover td {
  background: var(--ink-04);
}

.table-wrap td strong {
  font-weight: 600;
}

.table-note {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--ink-60);
}

/* ---------- Highlighted band (developer programs) ---------- */
.band {
  padding-block: clamp(64px, 8.5vw, 120px);
  background: var(--sage);
  border-top: 1px solid var(--ink-14);
  border-bottom: 1px solid var(--ink-14);
}

.band .sec-head__title .h2 {
  max-width: 12ch;
}

.band-note {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-14);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-85);
  max-width: 72ch;
}

/* ---------- Posts ---------- */
.posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 28px;
}

.post {
  display: flex;
  flex-direction: column;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.post__cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 4 / 3;
  padding: 18px 20px 20px;
  overflow: hidden;
  background: var(--clay);
  border-radius: var(--radius);
}

.post__cover--sage {
  background: var(--sage);
}

.post__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.post__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2.5rem, 2rem + 1.8vw, 3.375rem);
  line-height: 0.9;
}

.post__icon {
  width: 26px;
  height: 26px;
}

.post__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  max-width: 10ch;
  transition: transform var(--t) var(--ease);
}

.post:hover .post__word {
  transform: translateX(6px);
}

.post__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 18px;
}

.post__title {
  display: block;
  font-family: var(--font-display);
  margin-top: 12px;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.post:hover .post__title {
  text-decoration: underline;
  text-decoration-color: var(--clay);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.post__excerpt {
  display: block;
  flex: 1;
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-72);
}

.post .more {
  margin-top: 16px;
}

/* ---------- Spacing and grid utilities ---------- */
.figure,
.duo {
  margin: 0;
}

.mt-s {
  margin-top: 20px;
}

.mt-m {
  margin-top: 32px;
}

.mt-l {
  margin-top: 48px;
}

.mt-xl {
  margin-top: 72px;
}

.col-6 {
  grid-column: span 6;
}

.align-start {
  align-items: start;
}

.post .more {
  margin-top: 16px;
}

/* ---------- FAQ ---------- */
.faq-list {
  border-bottom: 1px solid var(--ink-14);
}

.faq {
  border-top: 1px solid var(--ink-14);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--ink);
}

.faq__icon {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition: background-color var(--t) var(--ease);
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.5px;
  margin: -0.75px 0 0 -5px;
  background: currentColor;
  transition: transform var(--t) var(--ease);
}

.faq__icon::after {
  transform: rotate(90deg);
}

.faq[open] .faq__icon {
  background: var(--clay);
}

.faq[open] .faq__icon::after {
  transform: rotate(0deg);
}

.faq__a {
  max-width: 62ch;
  padding: 0 44px 22px 0;
  font-size: 0.9875rem;
  line-height: 1.7;
  color: var(--ink-72);
}

.faq__a p + p,
.faq__a ul {
  margin-top: 10px;
}

.faq__a ul {
  padding-left: 1.2em;
}

/* ---------- Definition list (quick answers) ---------- */
.dl {
  margin: 0;
  border-top: 1px solid var(--ink-14);
}

.dl > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 8px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ink-14);
}

.dl dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
}

.dl dd {
  margin: 0;
  font-size: 0.9875rem;
  line-height: 1.65;
  color: var(--ink-72);
}

/* ---------- Article pages ---------- */
.article-head {
  padding-block: clamp(48px, 6vw, 88px) clamp(36px, 4vw, 56px);
  border-bottom: 1px solid var(--ink-14);
}

.article-head__cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: clamp(200px, 30vw, 330px);
  margin-bottom: 32px;
  padding: 24px 28px 26px;
  background: var(--clay);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-head__cover--sage {
  background: var(--sage);
}

.article-head__cover .post__num {
  font-size: clamp(3.5rem, 2.5rem + 4vw, 6rem);
}

.article-head__cover .post__word {
  max-width: 14ch;
  font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem);
}

.article-head__title {
  max-width: 22ch;
  font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4rem);
  line-height: 1;
}

.article-head__lead {
  margin-top: 22px;
  max-width: 58ch;
}

.article-head__meta {
  display: block;
  margin-top: 22px;
}

.article-head__icon {
  width: 40px;
  height: 40px;
}

.article-head__cover .post__top {
  align-items: flex-start;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(32px, 5vw, 80px);
  padding-block: clamp(40px, 5vw, 72px);
}

.article-body {
  max-width: 68ch;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink-85);
}

.article-body > * + * {
  margin-top: 1.15em;
}

.article-body h2 {
  margin-top: 2em;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  line-height: 1.04;
}

.article-body h3 {
  margin-top: 1.8em;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  line-height: 1.15;
}

.article-body ul,
.article-body ol {
  padding-left: 1.3em;
}

.article-body li + li {
  margin-top: 0.5em;
}

.article-body li::marker {
  color: var(--ink-60);
}

.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.article-body .code,
.article-body .table-wrap,
.article-body .callout,
.article-body .duo {
  margin-top: 1.6em;
}

.article-body .callout {
  margin-bottom: 0.4em;
}

.article-body .table-note + * {
  margin-top: 1.6em;
}

.article-body blockquote {
  margin: 1.6em 0 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--clay);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--ink);
}

.takeaways {
  padding: 24px 28px;
  background: var(--sage);
  border-radius: var(--radius);
}

.takeaways__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
}

.takeaways ul {
  list-style: none;
  margin-top: 10px;
}

.takeaways li {
  position: relative;
  padding-left: 18px;
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--ink);
}

.takeaways li + li {
  margin-top: 8px;
}

.takeaways li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--ink);
}

.article-aside {
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 24px);
  font-size: 0.9rem;
}

.aside-box {
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.aside-box + .aside-box {
  margin-top: 28px;
}

.aside-box h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-72);
}

.aside-box ol,
.aside-box ul {
  list-style: none;
  margin-top: 10px;
}

.aside-box li + li {
  margin-top: 6px;
}

.aside-box a {
  color: var(--ink-85);
  text-decoration: none;
}

.aside-box a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--clay);
  text-decoration-thickness: 2px;
}

.related {
  padding-block: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--ink-14);
}

.related__title {
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.card--link {
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}

.card--link:hover {
  border-color: var(--ink);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.card--link:hover .card__title {
  text-decoration: underline;
  text-decoration-color: var(--clay);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.aside-note {
  margin-top: 12px;
}

.aside-text {
  margin-top: 10px;
  line-height: 1.6;
  color: var(--ink-72);
}

.aside-text a {
  color: var(--ink);
}

.sources {
  list-style: none;
}

.sources li {
  padding-left: 0;
  font-size: 0.925rem;
  line-height: 1.55;
}

.article-body .sources li + li {
  margin-top: 8px;
}

.sources li span {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-60);
}

/* ---------- Legal pages ---------- */
.legal-head {
  padding-block: clamp(48px, 6vw, 88px) clamp(28px, 3vw, 40px);
  border-bottom: 1px solid var(--ink-14);
}

.legal-head__title {
  max-width: 18ch;
  font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4.5rem);
}

.legal-head__meta {
  display: block;
  margin-top: 18px;
}

.legal {
  max-width: 72ch;
  padding-block: clamp(36px, 5vw, 64px) clamp(56px, 7vw, 96px);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-85);
}

.legal > * + * {
  margin-top: 1em;
}

.legal h2 {
  margin-top: 2.2em;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2rem);
  line-height: 1.15;
}

.legal ul,
.legal ol {
  padding-left: 1.3em;
}

.legal li + li {
  margin-top: 0.4em;
}

.legal li::marker {
  color: var(--ink-60);
}

.legal strong {
  color: var(--ink);
  font-weight: 600;
}

.legal .callout {
  margin-top: 1.6em;
}

.legal + .related {
  border-top: 1px solid var(--ink-14);
}

/* ---------- About strip ---------- */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}

.about__main {
  grid-column: span 7;
}

.about__side {
  grid-column: span 5;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: clamp(48px, 6vw, 72px) 0 32px;
  background: var(--ink);
  color: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 40px 32px;
}

.site-footer .brand {
  color: var(--paper);
}

.site-footer .brand__mark {
  border-color: var(--paper);
}

.site-footer .brand:hover .brand__mark {
  background: var(--clay);
}

.footer-about {
  margin-top: 18px;
  max-width: 34ch;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--paper-60);
}

.site-footer h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-60);
}

.site-footer ul {
  list-style: none;
  margin-top: 14px;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer li a,
.footer-legal a,
.site-footer button {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.9375rem;
  color: var(--paper-80);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--t) var(--ease);
}

.site-footer li a:hover,
.footer-legal a:hover,
.site-footer button:hover {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--clay);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.site-footer :focus-visible {
  outline-color: var(--clay);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: clamp(40px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--paper-14);
  font-size: 0.875rem;
  color: var(--paper-60);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-note {
  margin-top: 18px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--paper-60);
  max-width: 96ch;
}

/* ---------- Buttons (cookie banner only — no marketing CTAs) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}

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

.btn--solid:hover {
  background: var(--clay);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
  width: min(440px, calc(100vw - 32px));
  padding: 22px 24px 24px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
}

.cookie-banner[hidden],
.consent-set .cookie-banner {
  display: none;
}

.cookie-banner p {
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-72);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: calc(var(--gutter) * -1);
    right: calc(var(--gutter) * -1);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    display: block;
    padding: 13px 8px;
    border-radius: 0;
    border-bottom: 1px solid var(--ink-08);
    font-size: 1.0625rem;
  }

  .nav-list li:last-child a {
    border-bottom: 0;
  }

  .hero__copy,
  .hero__aside {
    grid-column: 1 / -1;
  }

  .hero__sub {
    max-width: 22ch;
  }

  .hero__caption {
    text-align: left;
  }

  .sec-head__title,
  .sec-head__intro {
    grid-column: 1 / -1;
  }

  .sec-head__title .h2 {
    max-width: 16ch;
  }

  .sec-head {
    align-items: start;
    row-gap: 16px;
  }

  .split__aside,
  .split__main {
    grid-column: 1 / -1;
  }

  .posts,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .article-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    position: static;
  }

  .aside-box + .aside-box {
    margin-top: 0;
  }

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

  .about__main,
  .about__side {
    grid-column: 1 / -1;
  }
}

@media (max-width: 819px) {
  .col-6 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 639px) {
  .facts {
    grid-template-columns: 1fr;
  }

  .fact,
  .fact + .fact {
    padding: 18px 0;
    border-left: 0;
    border-bottom: 1px solid var(--ink-14);
  }

  .fact:last-child {
    border-bottom: 0;
  }

  .cards,
  .cards--3,
  .posts,
  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps li {
    grid-template-columns: 52px 1fr;
    gap: 14px;
  }

  .step__n {
    font-size: 2.125rem;
  }

  .timeline li {
    grid-template-columns: 72px 1fr;
    gap: 12px;
  }

  .dl > div {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
