@import url("https://fonts.googleapis.com/css2?family=Alegreya+Sans:ital,wght@0,400;0,500;0,700;1,400&family=JetBrains+Mono:wght@400;500&family=Zilla+Slab:wght@600;700&display=swap");

:root {
  --paper: #F4EFE6;
  --ink: #1A1916;
  --signal: #D3261B;
  --signal-press: #B01E15;
  --oat: #E6DCCB;
  --oat-deep: #DCCFB9;
  --char: #3A3731;
  --rule: #C9BCA6;
  --clay: #7E4528;
  --paper-on-ink: #F4EFE6;
  --muted-on-ink: #BDB4A4;
  --rule-on-ink: #3A3731;

  --feco-5fa: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --feco-575: "Alegreya Sans", "Gill Sans", "Trebuchet MS", sans-serif;
  --feco-579: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --fs-h1: clamp(2rem, 1.2rem + 4.2vw, 4.75rem);
  --fs-h2: clamp(1.6rem, 1.1rem + 2.2vw, 2.9rem);
  --fs-h3: clamp(1.2rem, 1rem + 0.8vw, 1.5rem);
  --fs-h4: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  --fs-body: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-lede: clamp(1.125rem, 1rem + 0.6vw, 1.4rem);
  --fs-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --fs-mono: clamp(0.75rem, 0.72rem + 0.12vw, 0.8125rem);
  --fs-label: 0.75rem;

  --lh-tight: 1.04;
  --lh-head: 1.14;
  --lh-body: 1.6;
  --measure: 66ch;
  --track-display: -0.01em;
  --track-tight: -0.02em;
  --track-label: 0.12em;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --section-y: clamp(3.5rem, 8vw, 7rem);
  --section-y-tight: clamp(2.25rem, 5vw, 4rem);

  --frame: clamp(6px, 1.2vw, 14px);
  --shell: 1240px;
  --shell-narrow: 860px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --strip-h: 3rem;

  --radius: 4px;
  --radius-0: 0;
  --rule-thin: 1px solid var(--rule);
  --rule-heavy: 3px solid var(--ink);
  --shadow-press: 0 2px 0 var(--ink);
  --shadow-block: 6px 6px 0 var(--ink);
  --shadow-lift: 0 1px 0 rgba(26, 25, 22, 0.08), 0 14px 30px -18px rgba(26, 25, 22, 0.45);
  --grain: none;
  --grain-size: 5px 5px, 7px 7px;
  --grain-pos: 0 0, 2px 3px;

  --dur-1: 120ms;
  --dur-2: 180ms;
  --dur-3: 320ms;
  --dur-4: 600ms;
  --dur-draw: 1200ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-stamp: cubic-bezier(0.3, 1.4, 0.5, 1);
  --ease-snap: cubic-bezier(0.5, 0, 0.1, 1);

  --z-base: 1;
  --z-header: 40;
  --z-frame: 60;
  --z-chat: 70;
  --z-consent: 80;
  --z-skip: 100;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--frame) + 8rem);
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: var(--frame);
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--feco-575);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  font-kerning: normal;
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  border: var(--frame) solid var(--ink);
  pointer-events: none;
  z-index: var(--z-frame);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--feco-5fa);
  font-weight: 700;
  line-height: var(--lh-head);
  letter-spacing: var(--track-display);
  color: var(--ink);
  text-wrap: balance;
  font-feature-settings: "kern", "liga", "lnum";
}

h1,
.h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
}

h2,
.h2 {
  font-size: var(--fs-h2);
  line-height: 1.08;
}

h3,
.h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
}

h4,
.h4 {
  font-size: var(--fs-h4);
  font-weight: 600;
  letter-spacing: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

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

strong,
b {
  font-weight: 700;
}

em,
i {
  font-style: italic;
}

small {
  font-size: var(--fs-small);
}

code,
kbd,
samp,
.mono {
  font-family: var(--feco-579);
  font-size: 0.86em;
  font-feature-settings: "zero" 0;
}

hr {
  border: 0;
  border-top: var(--rule-thin);
  margin: 0;
}

hr.rule-heavy,
.rule-heavy {
  border-top: var(--rule-heavy);
}

address {
  font-style: normal;
}

table {
  border-collapse: collapse;
  width: 100%;
}

::selection {
  background: var(--signal);
  color: var(--paper);
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: currentColor;
  stroke: currentColor;
  vertical-align: -0.18em;
}

.icon--lg {
  width: 1.6em;
  height: 1.6em;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow {
  max-width: var(--shell-narrow);
}

.section {
  padding-block: var(--section-y);
  border-top: var(--rule-thin);
}

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

.section--heavy {
  border-top: var(--rule-heavy);
}

.section--flush {
  border-top: 0;
}

.section--oat {
  background-color: var(--oat);
  background-image: var(--grain);
  background-size: var(--grain-size);
  background-position: var(--grain-pos);
}

.section--ink {
  background: var(--ink);
  color: var(--paper);
  border-top-color: var(--ink);
}

.section--ink h2,
.section--ink h3,
.section--ink h4 {
  color: var(--paper);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, var(--s-4));
}

.stack > * {
  min-width: 0;
}

.stack--sm { --stack-gap: var(--s-2); }
.stack--lg { --stack-gap: var(--s-6); }
.stack--xl { --stack-gap: var(--s-7); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-gap, var(--s-3));
}

.cluster > * {
  min-width: 0;
}

.grid {
  display: grid;
  gap: var(--grid-gap, var(--s-6));
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 16rem)), 1fr));
}

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

.split {
  display: grid;
  gap: var(--split-gap, clamp(2rem, 5vw, 4.5rem));
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.split > * {
  min-width: 0;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, var(--split-a, 1fr)) minmax(0, var(--split-b, 1fr));
  }
  .split--wide-left { --split-a: 1.35fr; --split-b: 1fr; }
  .split--wide-right { --split-a: 1fr; --split-b: 1.35fr; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--feco-579);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--char);
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 3px;
  background: var(--signal);
  flex: none;
}

.section--ink .eyebrow {
  color: var(--muted-on-ink);
}

.lede {
  font-size: var(--fs-lede);
  line-height: 1.45;
  max-width: 52ch;
  color: var(--char);
}

.meta {
  font-family: var(--feco-579);
  font-size: var(--fs-mono);
  letter-spacing: 0.02em;
  color: var(--char);
}

.num {
  font-family: var(--feco-579);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.signal { color: var(--signal); }
.muted { color: var(--char); }

.prose {
  max-width: var(--measure);
  hanging-punctuation: first last;
}

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

.prose h2 {
  margin-top: 2.2em;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
}

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

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.6em;
}

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

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

.prose ul li::marker {
  color: var(--signal);
}

.prose ol li::marker {
  font-family: var(--feco-579);
  font-size: 0.85em;
  color: var(--clay);
}

.prose a {
  color: var(--ink);
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  transition: color var(--dur-1) var(--ease-out), text-decoration-color var(--dur-1) var(--ease-out);
}

.prose a:hover {
  color: var(--signal);
}

.prose a:active {
  color: var(--ink);
  text-decoration-thickness: 3px;
}

.prose blockquote {
  margin: 1.5em 0;
  padding-left: 1.1em;
  border-left: 3px solid var(--signal);
  font-family: var(--feco-5fa);
  font-weight: 600;
  font-size: 1.2em;
  line-height: 1.35;
}

.prose .table-wrap,
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.media {
  position: relative;
  margin: 0;
  background: var(--oat-deep);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-0);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 0.01ms;
    --dur-2: 0.01ms;
    --dur-3: 0.01ms;
    --dur-4: 0.01ms;
    --dur-draw: 0.01ms;
  }
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body::before { display: none; }
  body { padding: 0; background: #fff; }
}
