@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #151614;
  --plate: #1a1b19;
  --ink: #ede9e1;
  --ink-2: #d6d2c8;
  --ink-3: #bdb9af;
  --copper: #c8875a;
  --sea-rgb: 125 179 165;
  --frost-rgb: 237 233 225;
  --rule: rgb(var(--frost-rgb) / 0.12);
  /* The app's clarity-3 glass: its sidebar and most legible panes. */
  --glass-blur: blur(12px) saturate(125%);
  --glass-fill: rgb(var(--frost-rgb) / 0.06);
  --glass-edge: rgb(var(--sea-rgb) / 0.5);
  --text-plate: rgb(26 27 25 / 0.92);
  --rim: 6px;
  --radius-sheet: 18px;
  --radius-plate: 10px;
  --radius-control: 10px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
}

/* The app's polygon backdrop: a file, fixed and static, so the CSP needs no inline style. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg) url("/backdrop.svg") center / cover no-repeat;
}

.skip {
  position: absolute;
  left: -9999px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 1;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-plate);
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
}

.brand img {
  display: block;
  flex: none;
  width: auto;
  height: 28px;
}

/* The seal on the home page: the mark at its moment of ceremony, above the 96 px minimum. */
.seal {
  display: block;
  float: right;
  width: 160px;
  height: 160px;
  margin: -4px -4px 16px 24px;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The app's sidebar items: quiet until current, then frost fill and a sea edge. */
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  font-weight: 500;
  font-size: 14px;
  /* On the bare backdrop, not a plate, so a step brighter than the app's quiet nav ink. */
  color: var(--ink-2);
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

nav a[aria-current="page"] {
  color: var(--ink);
  background: rgb(var(--frost-rgb) / 0.1);
  border-color: rgb(var(--sea-rgb) / 0.45);
}

/* A pane as in the app: frosted glass with a sea edge, and a text plate inset by the rim. */
main {
  display: flow-root;
  position: relative;
  isolation: isolate;
  padding: calc(var(--rim) + 24px) calc(var(--rim) + 24px) calc(var(--rim) + 28px);
  background: var(--glass-fill);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-sheet);
  box-shadow: inset 0 1px 0 rgb(var(--frost-rgb) / 0.22);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

main::before {
  content: "";
  position: absolute;
  inset: var(--rim);
  z-index: -1;
  background: var(--text-plate);
  border-radius: var(--radius-plate);
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h2 {
  margin: 32px 0 8px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
}

p,
li {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.lede {
  color: var(--ink);
  font-size: 18px;
}

.meta {
  color: var(--ink-3);
  font-size: 14px;
}

a {
  color: var(--ink);
  text-underline-offset: 3px;
}

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

code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14px;
  color: var(--ink);
}

blockquote {
  margin: 12px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--glass-edge);
  background: rgb(var(--frost-rgb) / 0.04);
  border-radius: 0 var(--radius-plate) var(--radius-plate) 0;
  color: var(--ink);
}

.table {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
}

th:first-child,
td:first-child {
  width: 38%;
}

td code {
  overflow-wrap: anywhere;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
  color: var(--ink-2);
}

th {
  color: var(--ink);
  font-weight: 600;
}

footer {
  margin-top: 24px;
  color: var(--ink-2);
  font-size: 14px;
}

@media (max-width: 560px) {
  .seal {
    float: none;
    width: 128px;
    height: 128px;
    margin: 4px auto 20px;
  }

  main {
    padding: calc(var(--rim) + 16px) calc(var(--rim) + 14px) calc(var(--rim) + 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
