/* danielbae.me */

/* Fonts ---------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fragment Mono";
  src: url("/fonts/fragment-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
/* Metric-matched fallback so the swap does not reflow the page. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue");
  size-adjust: 107.12%;
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
}

/* Tokens --------------------------------------------------------------- */
:root {
  color-scheme: light;
  /* Mount */
  --paper: #f7f7f4;
  --paper-2: #ecece6;
  --white: #ffffff;
  --ink: #0e1a2b;
  --ink-2: #4b5567;
  --rule: #e2e2db;
  --rule-2: #c9cac1;
  --hex-ink: #0a6394;
  --brass-ink: #8a6421;
  --selection: #cdebf8;
  /* Night plate */
  --night: #0b1727;
  --night-2: #10243c;
  --night-3: #16324f;
  --cream: #f0eadc;
  --mist: #b3bfce;
  --hex: #62cff5;
  --hex-2: #9be1fa;
  --brass: #d6aa5f;
  --on-night-rule: rgb(240 234 220 / 0.14);
  --on-night-rule-2: rgb(240 234 220 / 0.26);
  --on-dark-line: rgb(240 234 220 / 0.4);
  --on-dark-wash: rgb(240 234 220 / 0.08);
  /* Brass plate */
  --brass-2: #a87c37;
  --on-brass: #1b1407;
  --on-brass-2: #24190a;
  /* Zaun plate */
  --zaun: #0c1f1e;
  --zaun-2: #112e2b;
  --mint: #8fdcc6;
  --zmist: #a9c2bd;
  /* Verdigris plate */
  --verd: #2a665d;
  --verd-2: #1b4640;
  --vmist: #cfe3dd;
  /* A deeper hextech blue: the mark's core and the current-page marks */
  --hex-mid: #1f7fb8;

  --grain: url("/img/grain.svg");
  --grain-soft: url("/img/grain-soft.svg");
  --wash: rgb(14 26 43 / 0.04);
  --bar-glass: rgb(247 247 244 / 0.86);
  --frame-ring: rgb(5 12 22 / 0.12);
  --frame-shadow: 0 30px 60px -30px rgb(5 12 22 / 0.55), 0 2px 8px -2px rgb(5 12 22 / 0.18);
  --sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 75rem;
  --gutter: clamp(1.25rem, 0.5rem + 2.5vw, 2.5rem);
  --inset: clamp(0.5rem, 0.2rem + 1vw, 1rem);
  --radius: 999px;
  --radius-frame: 0.625rem;
  --radius-plate: clamp(1rem, 0.6rem + 1.2vw, 1.75rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --bar: 4rem;
}

/* Base ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar) + 1.5rem);
  scroll-behavior: smooth;
  caret-color: var(--hex-ink);
  accent-color: var(--hex-ink);
  background: var(--paper);
}
body {
  margin: 0;
  background: var(--grain-soft) repeat, var(--paper);
  background-blend-mode: soft-light, normal;
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  font-optical-sizing: auto;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre, table {
  margin: 0;
}
ul, ol {
  padding: 0;
  list-style: none;
}
h1, h2, h3, h4 {
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
img, svg {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-2);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s, color 0.2s;
}
a:hover {
  text-decoration-color: currentColor;
  color: var(--hex-ink);
}
code {
  font: 400 0.875em/1 var(--mono);
  letter-spacing: 0;
  padding: 0.12em 0.35em;
  border-radius: 0.3rem;
  background: var(--paper-2);
}
strong {
  font-weight: 600;
}
time {
  font-variant-numeric: tabular-nums;
}
:focus-visible {
  outline: 2px solid var(--hex-ink);
  outline-offset: 3px;
  border-radius: 0.25rem;
}
::selection {
  background: var(--selection);
  color: var(--ink);
}
button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  padding: 0.6rem 1rem;
  background: var(--night);
  color: var(--cream);
  border-radius: var(--radius);
  text-decoration: none;
}
.skip:focus {
  top: 1rem;
}
.skip:hover {
  color: var(--hex);
}
main:focus {
  outline: none;
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Grid ----------------------------------------------------------------- */
.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* Plates --------------------------------------------------------------- */
/* Grain tile on top (overlay); lights screened over the base gradient. */
.plate {
  position: relative;
  border-radius: var(--radius-plate);
  isolation: isolate;
}
/* A light ring keeps a dark screenshot's edge visible on a dark plate. */
.plate-night,
.plate-zaun,
.plate-verd {
  --frame-ring: rgb(240 234 220 / 0.14);
}
.plate-night {
  --rule: var(--on-night-rule);
  --rule-2: var(--on-night-rule-2);
  color: var(--cream);
  background:
    var(--grain) repeat,
    radial-gradient(40% 58% at 100% 0%, rgb(235 140 50 / 0.36), transparent 70%),
    radial-gradient(70% 55% at 50% 108%, rgb(98 207 245 / 0.34), transparent 72%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  background-blend-mode: overlay, screen, screen, normal;
}
.plate-brass {
  color: var(--on-brass);
  background:
    var(--grain-soft) repeat,
    radial-gradient(75% 85% at 0% 0%, rgb(255 236 190 / 0.55), transparent 70%),
    radial-gradient(60% 60% at 100% 100%, rgb(90 52 10 / 0.2), transparent 70%),
    linear-gradient(155deg, var(--brass), var(--brass-2));
  background-blend-mode: overlay, screen, multiply, normal;
}
.plate-zaun {
  --rule: rgb(143 220 198 / 0.16);
  --rule-2: rgb(143 220 198 / 0.3);
  color: var(--cream);
  background:
    var(--grain) repeat,
    radial-gradient(55% 75% at 0% 100%, rgb(178 94 224 / 0.3), transparent 70%),
    radial-gradient(45% 55% at 100% 0%, rgb(143 220 198 / 0.14), transparent 70%),
    linear-gradient(180deg, var(--zaun) 0%, var(--zaun-2) 100%);
  background-blend-mode: overlay, screen, screen, normal;
}
.plate-verd {
  /* Dimmed on phones, where it sits behind the meta line. */
  --verd-light: rgb(160 226 208 / 0.3);
  --rule: rgb(240 234 220 / 0.16);
  --rule-2: rgb(240 234 220 / 0.3);
  color: var(--cream);
  background:
    var(--grain-soft) repeat,
    radial-gradient(70% 80% at 100% 0%, var(--verd-light), transparent 70%),
    linear-gradient(160deg, var(--verd), var(--verd-2));
  background-blend-mode: overlay, screen, normal;
}
/* Night plate behind a screenshot: the light is centred on the picture. */
.shot.plate-night {
  background:
    var(--grain) repeat,
    radial-gradient(60% 55% at 50% 45%, rgb(98 207 245 / 0.2), transparent 75%),
    radial-gradient(40% 60% at 100% 0%, rgb(235 140 50 / 0.3), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  background-blend-mode: overlay, screen, screen, normal;
}
@media (max-width: 39.99em) {
  .plate-verd {
    --verd-light: rgb(160 226 208 / 0.16);
  }
}
/* A full-width plate with a small margin. */
.band {
  margin-inline: var(--inset);
}

/* The bar -------------------------------------------------------------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bar-glass);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--rule);
  transition: box-shadow 0.3s;
}
html.js .bar:not(.is-scrolled):not(.is-open) {
  box-shadow: 0 1px 0 transparent;
}
.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--bar);
}
/* Home link: the hex d mark. */
.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: -0.5rem;
  border-radius: 0.75rem;
  color: var(--ink);
  transition: color 0.2s;
}
.mark svg {
  width: 2.375rem;
  height: 2.375rem;
}
.mark .mark-d {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linejoin: miter;
}
.mark .mark-core {
  fill: var(--hex-mid);
  transition: fill 0.3s;
}
.mark:hover {
  color: var(--ink);
}
.mark:hover .mark-core {
  fill: var(--hex);
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 2rem;
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink-2);
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color 0.2s;
}
.nav a:not(.btn):hover,
.nav a[aria-current] {
  color: var(--ink);
}
.nav a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--hex-mid);
  text-underline-offset: 0.55em;
}
.nav .btn {
  margin-left: 0.5rem;
}
.bar.is-open {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--rule), 0 24px 40px -24px rgb(11 23 39 / 0.25);
}
.menu-toggle {
  display: none;
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.6rem;
  border-radius: 0.75rem;
}
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.menu-toggle::before {
  top: calc(50% - 4px);
}
.menu-toggle::after {
  top: calc(50% + 3px);
}
.menu-toggle[aria-expanded="true"]::before {
  top: calc(50% - 1px);
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"]::after {
  top: calc(50% - 1px);
  transform: rotate(-45deg);
}
@media (max-width: 49.99em) {
  /* Without JS the menu can't collapse, so don't pin it. */
  html:not(.js) .bar {
    position: static;
  }
  .menu-toggle {
    display: block;
  }
  .bar-inner {
    flex-wrap: wrap;
  }
  .nav {
    order: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 0.5rem 0 1.25rem;
    font-size: 1.0625rem;
    border-top: 1px solid var(--rule);
  }
  .nav a:not(.btn) {
    min-height: 3rem;
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
  }
  .nav a[aria-current] {
    text-decoration: none;
  }
  .nav a[aria-current]::after {
    content: "";
    margin-left: auto;
    width: 0.5rem;
    height: 0.5rem;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: var(--hex-mid);
  }
  .nav .btn {
    margin: 1rem 0 0;
    justify-content: center;
  }
  .menu-toggle:not([hidden])[aria-expanded="false"] + .nav {
    display: none;
  }
}

/* Buttons -------------------------------------------------------------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.375rem;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:hover {
  border-color: currentColor;
  background: var(--wash);
  color: inherit;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--night);
  border-color: var(--night);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--night-3);
  border-color: var(--night-3);
  color: var(--cream);
}
.plate-night .btn:hover {
  background: var(--on-dark-wash);
}
/* On night the primary is the hextech cyan. */
.plate-night .btn-primary {
  background: var(--hex);
  border-color: var(--hex);
  color: var(--night);
}
.plate-night .btn-primary:hover {
  background: var(--hex-2);
  border-color: var(--hex-2);
  color: var(--night);
}
/* Link hover on plates. */
:where(.plate-night) a:not(.btn):hover {
  color: var(--hex);
}
:where(.plate-zaun) a:not(.btn):hover {
  color: var(--mint);
}
:where(.plate-brass) a:not(.btn):hover {
  color: var(--night);
}
/* Cyan fails AA on verdigris, so a link keeps its colour and firms its underline. */
:where(.plate-verd) a:not(.btn):hover {
  color: var(--cream);
}
.plate :focus-visible {
  outline-color: var(--hex);
}
.plate-brass :focus-visible {
  outline-color: var(--night);
}
.btn-sm {
  min-height: 2.25rem;
  padding: 0 1rem;
  font-size: 0.875rem;
}
@media (max-width: 29.99em) {
  .page-head .actions .btn,
  .feature .actions .btn,
  .contact .actions .btn {
    flex: 1 1 100%;
  }
  .btn {
    white-space: normal;
    text-align: center;
    padding-block: 0.5rem;
  }
}
/* Text link with an arrow. */
.more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
}
.more:hover {
  text-decoration: underline;
  text-decoration-color: currentColor;
}
.more::after {
  content: "";
  width: 0.875rem;
  height: 0.875rem;
  background: currentColor;
  -webkit-mask: url("/img/arrow-e.svg") center / contain no-repeat;
  mask: url("/img/arrow-e.svg") center / contain no-repeat;
  transition: transform 0.3s var(--ease);
}

/* Frames: product screenshots ------------------------------------------ */
.frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-frame);
  background: var(--night);
  box-shadow: 0 0 0 1px var(--frame-ring), var(--frame-shadow);
}
.frame picture {
  display: block;
}
.frame img {
  width: 100%;
}
.frame-crop {
  aspect-ratio: 16 / 10;
}
/* The phone crop (the <source> in the <picture>) is shown whole. */
@media (max-width: 27.5em) {
  .frame-crop.has-phone {
    aspect-ratio: auto;
  }
  .frame-crop.has-phone img {
    height: auto;
  }
}
@media (max-width: 63.99em) {
  .frame-strip {
    overflow-x: auto;
  }
  .frame-strip img {
    min-width: 75rem;
  }
}
.frame-crop img {
  height: 100%;
  object-fit: cover;
  object-position: top;
}
@media (hover: hover) {
  .more:hover::after {
    transform: translateX(3px);
  }
}
/* Screenshot max widths: their native size (the renders are 2x). */
.w-562 {
  max-width: 35.125rem;
}
.w-640 {
  max-width: 40rem;
}
.w-768 {
  max-width: 48rem;
}
.w-800 {
  max-width: 50rem;
}
.caption {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.plate-night .caption {
  color: var(--mist);
}
.plate-brass .caption {
  color: var(--on-brass);
}
.plate-verd .caption {
  color: var(--vmist);
}
/* A screenshot on a plate; the plate clips the frame's shadow. */
.shot {
  padding: clamp(1rem, 0.25rem + 3.2vw, 3rem);
  overflow: hidden;
}
.shot > .frame {
  margin-inline: auto;
}
.shot-tight {
  padding: clamp(0.75rem, 0.25rem + 2vw, 1.75rem);
}
/* Sections ------------------------------------------------------------- */
.section {
  padding: clamp(4.5rem, 3rem + 4vw, 8rem) 0;
}
.section + .section {
  border-top: 1px solid var(--rule);
}
.section-head h2 {
  max-width: 18em;
  font-size: clamp(2rem, 1.35rem + 2.2vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.032em;
}
.section-head .lede {
  margin-top: 1.125rem;
  max-width: 40rem;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ink-2);
}
.section-head .lede a {
  color: var(--ink);
}
.section-foot {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
}

/* Hero ----------------------------------------------------------------- */
.hero {
  margin: 0.25rem var(--inset) 0;
  padding: clamp(3rem, 1.5rem + 4vw, 5.5rem) 0 clamp(3rem, 2rem + 3vw, 5rem);
  /* Its own light: cyan in the open right half, running into the brass leak. */
  background:
    var(--grain) repeat,
    radial-gradient(45% 70% at 100% 0%, rgb(235 140 50 / 0.34), transparent 70%),
    radial-gradient(42% 62% at 76% 58%, rgb(98 207 245 / 0.3), transparent 72%),
    radial-gradient(70% 45% at 50% 110%, rgb(98 207 245 / 0.22), transparent 72%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  background-blend-mode: overlay, screen, screen, screen, normal;
}
.hero h1 {
  font-size: clamp(3.25rem, 1.6rem + 6vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 640;
  color: var(--cream);
}
.hero-sub {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.5;
  color: var(--mist);
}
.hero-sub a {
  color: var(--cream);
  text-decoration-color: var(--on-dark-line);
}
.hero-sub a:hover {
  color: var(--hex);
}
.hero .actions {
  margin-top: 2.25rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--mist);
}
.hero-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--mist);
  text-decoration-color: color-mix(in srgb, var(--mist) 45%, transparent);
}
.hero-meta a:hover {
  color: var(--hex);
}

/* Work ----------------------------------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem 3.5rem;
  align-items: start;
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
}
.feature + .feature {
  margin-top: clamp(4rem, 3rem + 4vw, 7rem);
}
.feature h3 {
  font-size: clamp(1.75rem, 1.4rem + 1.1vw, 2.375rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.feature-text > p {
  margin-top: 1rem;
  color: var(--ink-2);
}
.feature-facts {
  margin-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.feature-facts > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.feature-facts dt {
  color: var(--ink-2);
}
.feature-facts dd {
  font-variant-numeric: tabular-nums;
}
.feature .actions {
  margin-top: 1.5rem;
}
@media (min-width: 55em) {
  .feature {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
  .feature-flip {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
  .feature-flip .feature-media {
    order: 2;
  }
}

/* Smaller projects */
.more-head {
  margin-top: clamp(5rem, 3.5rem + 4vw, 8rem);
  font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.028em;
}
.more-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 3rem;
  margin-top: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
  border-top: 1px solid var(--rule-2);
}
.more-work > li {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0 1.75rem;
  border-bottom: 1px solid var(--rule);
}
.more-work h4 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.more-work h4 a {
  text-decoration: none;
}
.more-work p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.more-work .meta {
  margin-top: auto;
  padding-top: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.more-work .meta a {
  color: var(--ink-2);
}
.more-work .meta a:hover {
  color: var(--hex-ink);
}
@media (min-width: 40em) {
  .more-work {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 61.25em) {
  .more-work {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Ledgers --------------------------------------------------------------- */
.ledger {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  border-top: 1px solid var(--rule-2);
}
.ledger > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem 2rem;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--rule);
}
.ledger .who {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ledger .who a {
  text-decoration: none;
}
.ledger .who small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ink-2);
}
.ledger .what {
  color: var(--ink-2);
}
.ledger .ref {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0;
}
.ledger .ref a {
  color: var(--ink-2);
  text-decoration-color: transparent;
}
.ledger .ref a:hover {
  color: var(--hex-ink);
  text-decoration-color: currentColor;
}
@media (min-width: 55em) {
  .ledger > li {
    grid-template-columns: 15rem minmax(0, 1fr) 9rem;
    align-items: start;
  }
  .ledger .ref {
    justify-content: flex-end;
    text-align: right;
  }
}

/* Spec lists: label beside value */
.spec {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
  border-top: 1px solid var(--rule-2);
}
.spec > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem 2rem;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--rule);
}
.spec dt {
  font-weight: 500;
  color: var(--ink-2);
}
.spec dd + dd {
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.spec dd + dd a {
  color: var(--ink-2);
}
.spec dd + dd a:hover {
  color: var(--hex-ink);
}
@media (min-width: 55em) {
  .spec > div {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
  .spec.spec-wide > div {
    grid-template-columns: 12rem minmax(0, 2fr) minmax(0, 1fr);
  }
}

/* Security band ---------------------------------------------------------- */
.security {
  padding: clamp(3.5rem, 2.5rem + 4vw, 7rem) 0;
}
.security .section-head h2 {
  color: var(--cream);
}
.security .section-head .lede {
  color: var(--zmist);
}
.security .section-head .lede a {
  color: var(--cream);
  text-decoration-color: var(--on-dark-line);
}
.security .section-head .lede a:hover,
.security .more:hover {
  color: var(--mint);
}
.security .spec dt {
  color: var(--mint);
}
.security .spec dd {
  color: var(--cream);
}

/* Writing -------------------------------------------------------------- */
.posts {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  border-top: 1px solid var(--rule-2);
}
.post {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}
.post-title {
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
}
.post-title a {
  text-decoration: none;
}
.post-summary {
  color: var(--ink-2);
  max-width: 44rem;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.post-none {
  padding: 1.25rem 0;
  color: var(--ink-2);
}
@media (min-width: 55em) {
  .post {
    grid-template-columns: 9rem minmax(0, 1fr);
    grid-template-areas: "meta title" "meta summary";
    align-items: baseline;
  }
  .post-meta {
    grid-area: meta;
    flex-direction: column;
    padding-top: 0.2rem;
  }
  .post-title {
    grid-area: title;
  }
  .post-summary {
    grid-area: summary;
  }
}

/* Contact --------------------------------------------------------------- */
.contact {
  padding: clamp(4rem, 3rem + 4vw, 7.5rem) 0;
  overflow: hidden;
}
.contact .section-head h2 {
  color: var(--cream);
}
.contact .section-head .lede {
  color: var(--mist);
}
.contact-email {
  margin-top: 2rem;
  font-size: clamp(1.625rem, 1rem + 2.6vw, 3.5rem);
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.contact-email a {
  color: var(--cream);
  text-decoration-thickness: 2px;
  text-decoration-color: var(--hex);
  text-underline-offset: 0.14em;
}
.contact-email a:hover {
  color: var(--hex-2);
}
.contact .actions {
  margin-top: 2.25rem;
  align-items: center;
  gap: 0.75rem 1.75rem;
}

/* Footer --------------------------------------------------------------- */
.foot {
  padding: clamp(3rem, 2rem + 3vw, 5rem) 0 2.5rem;
  font-size: 0.9375rem;
}
.foot-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 2rem;
}
@media (min-width: 45em) {
  .foot-cols {
    grid-template-columns: 2fr repeat(2, minmax(0, 1fr));
  }
}
.foot-id {
  grid-column: 1 / -1;
}
@media (min-width: 45em) {
  .foot-id {
    grid-column: auto;
  }
}
.foot-line {
  margin-top: 0.5rem;
  color: var(--ink-2);
  max-width: 18rem;
}
.foot-h {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0;
}
.foot ul {
  margin-top: 0.25rem;
}
.foot li a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}
.foot a {
  text-decoration: none;
  color: var(--ink);
}
.foot a:hover {
  color: var(--hex-ink);
}

/* Subpages: case studies ------------------------------------------------ */
.page-head {
  padding: clamp(3rem, 2rem + 4vw, 6rem) 0 clamp(2.5rem, 2rem + 2vw, 4rem);
}
.page-head.plate {
  margin: 0 var(--inset);
  padding: clamp(3.5rem, 2rem + 4.5vw, 6.5rem) 0 clamp(3rem, 2rem + 3vw, 5rem);
  overflow: hidden;
}
.page-head h1 {
  font-size: clamp(2.75rem, 1.6rem + 4vw, 5rem);
  line-height: 1;
  letter-spacing: -0.038em;
  font-weight: 640;
  max-width: 12em;
}
.page-meta {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.page-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-top: 1.5rem;
  font-weight: 500;
}
.page-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--cream);
  text-decoration-color: var(--on-dark-line);
}
.page-sub {
  margin-top: 1rem;
  max-width: 38rem;
  font-size: 1.0625rem;
  color: var(--ink-2);
}
.page-head .actions {
  margin-top: 2rem;
  align-items: center;
}
.actions .more {
  min-height: 2.75rem;
}
.actions .more + .more {
  margin-left: 1rem;
}
.plate-night .page-meta,
.plate-night .page-sub {
  color: var(--mist);
}
.plate-verd .page-meta,
.plate-verd .page-sub {
  color: var(--vmist);
}
.plate-brass .page-meta,
.plate-brass .page-sub {
  color: var(--on-brass-2);
}
.plate-zaun .page-meta {
  color: var(--zmist);
}
.page-head .page-intro {
  max-width: 44rem;
  margin-top: clamp(1.75rem, 1.25rem + 1.5vw, 2.75rem);
}
/* A case study's lead picture, inside the head plate; beside the text from 68.75em. */
.lead {
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}
.lead .caption {
  margin-top: 1rem;
}
@media (min-width: 68.75em) {
  .lead-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 4rem;
    align-items: center;
  }
  .lead-grid .lead {
    justify-self: end;
    width: 100%;
    margin-top: 0;
  }
}

/* Article rows: heading above body. */
.article {
  padding: clamp(3rem, 2rem + 3vw, 5rem) 0;
  border-top: 1px solid var(--rule);
}
.page-head.plate + .article {
  border-top: 0;
}
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
.article h2 {
  max-width: 22em;
  font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.028em;
}
.article .side-note {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.article .side-note a {
  color: var(--ink-2);
}
.article-head {
  max-width: 40rem;
}
/* On wide screens the reading column is centred, on the figures' axis. */
@media (min-width: 68.75em) {
  .article-grid {
    max-width: 44rem;
  }
}
.prose {
  max-width: 42rem;
  font-size: 1.0625rem;
  line-height: 1.65;
}
.prose p + p,
.prose p + ul {
  margin-top: 1.1em;
}
.prose ul {
  padding-left: 1.25rem;
  list-style: disc;
}
.prose li + li {
  margin-top: 0.5em;
}
.prose li::marker {
  color: var(--brass-ink);
}
.article .figure {
  margin-top: 2.5rem;
}
.fact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule-2);
}
.fact-grid > div {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.fact-grid dt {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}
.fact-grid dd {
  margin-top: 0.2rem;
  font-size: 0.9375rem;
}
@media (min-width: 40em) {
  .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }
}

.tool-list > div {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.tool-list > div:first-child {
  border-top: 1px solid var(--rule-2);
}
.tool-list dt {
  font-weight: 600;
}
.tool-list dd {
  margin-top: 0.25rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* The diagram on the sites page */
.diagram-scroll {
  overflow-x: auto;
  padding: 1.5rem;
  border-radius: var(--radius-frame);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--frame-ring), var(--frame-shadow);
}
.diagram svg {
  min-width: 42rem;
  width: 100%;
  height: auto;
  font: 500 15px var(--sans);
}
.dg-box rect {
  fill: var(--white);
  stroke: var(--rule-2);
}
.dg-box text {
  fill: var(--ink);
  text-anchor: middle;
}
.dg-edge rect {
  fill: var(--night);
  stroke: var(--night);
}
.dg-edge text {
  fill: var(--cream);
}
.dg-internal rect {
  stroke: var(--verd);
  stroke-dasharray: 4 3;
}
.dg-line path {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.5;
}
.dg-dashed path {
  stroke-dasharray: 4 4;
}
.dg-label text {
  fill: var(--ink-2);
  font-size: 13px;
  font-weight: 400;
}

/* The full pull-request ledger ------------------------------------------ */
.prs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.prs-table caption {
  text-align: left;
  padding-bottom: 1rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.prs-table th,
.prs-table td {
  padding: 1.25rem 0 1.375rem;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--rule-2);
}
.prs-table thead th {
  padding: 0 0 0.6rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule-2);
}
.prs-table th[scope="row"] {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.prs-table th[scope="row"] a {
  text-decoration: none;
}
.prs-table .repo-meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.prs-table .repo-desc {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-2);
  max-width: 16rem;
}
.pr-list li {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
}
.pr-list li + li {
  margin-top: 0.5rem;
}
.pr-list .pr-num {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0;
  padding-top: 0.2rem;
}
.pr-list .pr-num a {
  color: var(--ink-2);
  text-decoration-color: transparent;
}
.pr-list .pr-num a:hover {
  color: var(--hex-ink);
  text-decoration-color: currentColor;
}
.pr-list .pr-kind {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 0.05rem 0.5rem;
  border-radius: var(--radius);
  background: var(--paper-2);
  vertical-align: 0.1em;
}
.pr-list .pr-date {
  /* Wraps as a unit instead of hanging off the title's last word. */
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 45em) {
  .prs-table th[scope="row"] {
    width: 20rem;
    padding-right: 2rem;
  }
}
@media (max-width: 44.99em) {
  .prs-table,
  .prs-table tbody,
  .prs-table tr,
  .prs-table th,
  .prs-table td {
    display: block;
    width: auto;
  }
  .prs-table thead {
    display: none;
  }
  .prs-table caption {
    display: block;
    width: 100%;
  }
  .prs-table tr {
    padding: 1.25rem 0 1.375rem;
    border-bottom: 1px solid var(--rule-2);
  }
  .prs-table th,
  .prs-table td {
    padding: 0;
    border: 0;
  }
  .prs-table td {
    margin-top: 0.75rem;
  }
  .prs-table .repo-desc {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .menu-toggle::before,
  .menu-toggle::after,
  .more::after,
  .btn {
    transition: none;
  }
}

/* Print ---------------------------------------------------------------- */
@media print {
  .bar,
  .actions,
  .skip,
  .menu-toggle {
    display: none !important;
  }
  body,
  .plate {
    color: #000 !important;
    background: #fff !important;
    font-size: 11pt;
  }
  .plate * {
    color: #000 !important;
  }
  a {
    color: #000;
    text-decoration: none;
  }
  .frame {
    box-shadow: none;
    border: 1px solid #999;
  }
  .btn {
    color: #000 !important;
    background: none !important;
    border-color: #000 !important;
  }
  h2,
  h3,
  h4 {
    break-after: avoid;
  }
  figure,
  li,
  tr,
  .fact-grid > div,
  .spec > div {
    break-inside: avoid;
  }
}
