/* Cranes Help. Tokens, type, and controls follow pikespeak-design-system/src/index.css and
   the product's styles.css and book.css, laid out like the one workspace: a sidebar sheet
   in Inter, a short blurred bar over the page, white paper with serif reading text. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/inter.3100e775e8.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Hedvig Letters Serif Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/hedvig-letters-serif.2d555f3693.woff2) format("woff2-variations");
}

:root {
  color-scheme: light;
  --font-sans: "Inter Variable", system-ui, sans-serif;
  --font-title: "Hedvig Letters Serif Variable", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* The book's page is pure white in light mode; the sidebar is a sheet on it. */
  --background: #ffffff;
  --foreground: #171716;
  --card: #ffffff;
  --pane: #f4f4f3;
  --muted-foreground: #6b6a66;
  --ink-soft: #a3a29e;
  --ink-faint: #d3d2ce;
  --border: rgb(20 20 18 / 8%);
  --edge: rgb(20 20 18 / 9%);
  --here: rgb(20 20 18 / 6%);
  --highlight: #f7c600;
  --highlight-ink: #7a5d00;
  --highlight-wash: rgb(247 198 0 / 18%);
  --highlight-foreground: #171716;
  --focus-halo: rgb(247 198 0 / 45%);
  --code-surface: #f4f4f3;
  --control-action: #171716;
  --control-action-hover: #2b2b29;
  --control-action-foreground: #fcfcfc;
  --control-surface: #ffffff;
  --control-border: rgb(20 20 18 / 10%);
  --control-border-hover: rgb(20 20 18 / 18%);
  --control-placeholder: #a3a29e;
  --rule-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='4' viewBox='0 0 12 4'%3E%3Cpath d='M0 2.5 Q3 0.5 6 2.5 T12 2.5' fill='none' stroke='%23d3d2ce' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");

  --shadow-button-primary: inset 0 -1px 0 rgb(0 0 0 / 25%), inset 0 0 0 1px var(--control-border), 0 1px 1px rgb(0 0 0 / 25%), 0 2px 4px rgb(0 0 0 / 10%);
  --shadow-button-outline: 0 0 0 1px rgb(20 20 18 / 9%), 0 1px 2px rgb(20 20 18 / 6%);
  --shadow-button-outline-hover: 0 0 0 1px rgb(20 20 18 / 13%), 0 2px 4px -1px rgb(20 20 18 / 10%);
  --shadow-control-depressed: inset 0 0 0 1px var(--control-border), inset 0 1px 1px rgb(0 0 0 / 7.5%), inset 0 2px 4px rgb(0 0 0 / 2.5%);
  --shadow-control-depressed-hover: inset 0 0 0 1px var(--control-border-hover), inset 0 1.5px 3px rgb(0 0 0 / 10%), inset 0 3px 5px rgb(0 0 0 / 5%);
  --shadow-control-focus: inset 0 0 0 1px var(--control-action), 0 0 0 3px var(--focus-halo), inset 0 1px 1px rgb(0 0 0 / 7.5%);
  --shadow-float: inset 0 1px 0 rgb(255 255 255 / 95%), 0 0 0 1px rgb(20 20 18 / 9%), 0 16px 36px -16px rgb(20 20 18 / 28%);
  --shadow-dialog: 0 0 0 1px rgb(20 20 18 / 6%), 0 24px 64px -24px rgb(20 20 18 / 30%);
  --shadow-sheet-drop: rgb(20 20 18 / 14%);
  --glass: rgb(255 255 255 / 86%);
  --scrim: rgb(20 20 18 / 18%);
  --ease-swift: cubic-bezier(0.23, 0.88, 0.26, 0.92);

  --radius-sheet: 0.375rem;
  --radius-control: 0.625rem;
  --radius-dialog: 0.875rem;

  /* The book's type and spacing scales. */
  --type-meta: 0.75rem;
  --type-caption: 0.8125rem;
  --type-ui: 0.875rem;
  --type-body: 1rem;
  --type-reading: 1rem;
  --type-title: 1.3125rem;
  --leading-reading: 1.65;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  --side: 16.5rem;
  --topbar-height: 3.25rem;
  --page-gutter: 2.5rem;
  --measure: 44rem;
}

/* Dark follows the product's reading-tuned dark tones. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #121211;
  --foreground: #eeede9;
  --card: #1c1c1b;
  --pane: #1c1c1b;
  --muted-foreground: #b4b2ac;
  --ink-soft: #8f8d87;
  --ink-faint: #4d4c48;
  --border: rgb(255 255 255 / 11%);
  --edge: rgb(255 255 255 / 12%);
  --here: rgb(255 255 255 / 8%);
  --highlight: #ffd426;
  --highlight-ink: #ffd95a;
  --highlight-wash: rgb(255 212 38 / 14%);
  --highlight-foreground: #101010;
  --focus-halo: rgb(255 212 38 / 35%);
  --code-surface: #1f1f1e;
  --control-action: #edece8;
  --control-action-hover: #ffffff;
  --control-action-foreground: #101010;
  --control-surface: #1c1c1b;
  --control-border: rgb(255 255 255 / 10%);
  --control-border-hover: rgb(255 255 255 / 18%);
  --control-placeholder: #8b8983;
  --rule-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='4' viewBox='0 0 12 4'%3E%3Cpath d='M0 2.5 Q3 0.5 6 2.5 T12 2.5' fill='none' stroke='%234d4c48' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
  --shadow-button-primary: inset 0 0 0 1px rgb(255 255 255 / 10%), inset 0 1px 0 rgb(255 255 255 / 10%), 0 1px 2px rgb(0 0 0 / 50%), 0 2px 4px rgb(0 0 0 / 25%);
  --shadow-button-outline: 0 0 0 1px rgb(255 255 255 / 12%), 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-button-outline-hover: 0 0 0 1px rgb(255 255 255 / 18%), 0 2px 4px -1px rgb(0 0 0 / 50%);
  --shadow-control-depressed: inset 0 0 0 1px var(--control-border), inset 0 1px 1px rgb(255 255 255 / 5%), inset 0 2px 4px rgb(255 255 255 / 2%);
  --shadow-control-depressed-hover: inset 0 0 0 1px var(--control-border-hover), inset 0 1.5px 3px rgb(255 255 255 / 7.5%), inset 0 3px 5px rgb(255 255 255 / 3%);
  --shadow-float: 0 0 0 1px rgb(255 255 255 / 12%), 0 16px 36px -16px rgb(0 0 0 / 80%);
  --shadow-dialog: 0 0 0 1px rgb(255 255 255 / 14%), 0 24px 64px -20px rgb(0 0 0 / 90%);
  --shadow-sheet-drop: rgb(0 0 0 / 50%);
  --glass: rgb(30 30 29 / 86%);
  --scrim: rgb(0 0 0 / 45%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #121211;
    --foreground: #eeede9;
    --card: #1c1c1b;
    --pane: #1c1c1b;
    --muted-foreground: #b4b2ac;
    --ink-soft: #8f8d87;
    --ink-faint: #4d4c48;
    --border: rgb(255 255 255 / 11%);
    --edge: rgb(255 255 255 / 12%);
    --here: rgb(255 255 255 / 8%);
    --highlight: #ffd426;
    --highlight-ink: #ffd95a;
    --highlight-wash: rgb(255 212 38 / 14%);
    --highlight-foreground: #101010;
    --focus-halo: rgb(255 212 38 / 35%);
    --code-surface: #1f1f1e;
    --control-action: #edece8;
    --control-action-hover: #ffffff;
    --control-action-foreground: #101010;
    --control-surface: #1c1c1b;
    --control-border: rgb(255 255 255 / 10%);
    --control-border-hover: rgb(255 255 255 / 18%);
    --control-placeholder: #8b8983;
    --rule-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='4' viewBox='0 0 12 4'%3E%3Cpath d='M0 2.5 Q3 0.5 6 2.5 T12 2.5' fill='none' stroke='%234d4c48' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
    --shadow-button-primary: inset 0 0 0 1px rgb(255 255 255 / 10%), inset 0 1px 0 rgb(255 255 255 / 10%), 0 1px 2px rgb(0 0 0 / 50%), 0 2px 4px rgb(0 0 0 / 25%);
    --shadow-button-outline: 0 0 0 1px rgb(255 255 255 / 12%), 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-button-outline-hover: 0 0 0 1px rgb(255 255 255 / 18%), 0 2px 4px -1px rgb(0 0 0 / 50%);
    --shadow-control-depressed: inset 0 0 0 1px var(--control-border), inset 0 1px 1px rgb(255 255 255 / 5%), inset 0 2px 4px rgb(255 255 255 / 2%);
    --shadow-control-depressed-hover: inset 0 0 0 1px var(--control-border-hover), inset 0 1.5px 3px rgb(255 255 255 / 7.5%), inset 0 3px 5px rgb(255 255 255 / 3%);
    --shadow-float: 0 0 0 1px rgb(255 255 255 / 12%), 0 16px 36px -16px rgb(0 0 0 / 80%);
    --shadow-dialog: 0 0 0 1px rgb(255 255 255 / 14%), 0 24px 64px -20px rgb(0 0 0 / 90%);
    --shadow-sheet-drop: rgb(0 0 0 / 50%);
    --glass: rgb(30 30 29 / 86%);
    --scrim: rgb(0 0 0 / 45%);
  }
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-width: 20rem;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: var(--type-ui);
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* The serif draws its "ff" ligature as a heavy f, so pairs are set as letters. */
  font-variant-ligatures: no-common-ligatures;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: from-font;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
  border-radius: 0.25rem;
}
.icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
kbd {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.25rem;
  background: var(--card);
  color: var(--muted-foreground);
  box-shadow: inset 0 0 0 1px var(--border), 0 1px 0 var(--border);
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 50;
  translate: 0 -200%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-control);
  background: var(--card);
  box-shadow: var(--shadow-float);
}
.skip-link:focus {
  translate: 0;
}
:root[data-theme="dark"] :is(.brand, .footer-logo) img {
  filter: invert(1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.brand, .footer-logo) img {
    filter: invert(1);
  }
}

/* Buttons: small corners, never pills, as in the design system. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2rem;
  padding: 0 0.875rem;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--control-action);
  color: var(--control-action-foreground);
  box-shadow: var(--shadow-button-primary);
  font-size: var(--type-caption);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease, box-shadow 150ms ease, scale 150ms ease;
}
.button:hover {
  background: var(--control-action-hover);
}
.button:active {
  scale: 0.96;
}
.button-outline {
  background: var(--control-surface);
  color: var(--foreground);
  box-shadow: var(--shadow-button-outline);
}
.button-outline:hover {
  background: var(--control-surface);
  box-shadow: var(--shadow-button-outline-hover);
}
.button-small {
  height: 1.75rem;
  padding: 0 0.75rem;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sheet);
  background: transparent;
  color: var(--muted-foreground);
  transition: background 120ms ease, color 120ms ease;
}
.icon-button:hover {
  background: var(--here);
  color: var(--foreground);
}
.icon-button .icon {
  width: 0.9375rem;
  height: 0.9375rem;
}

/* The shell: the sidebar sheet, and the page beside it. */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100svh;
  margin-left: var(--side);
}

/* The sidebar: a sheet the window's height, its stacked page edges on its right side. */
.side {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: calc(var(--side) - 0.75rem);
  padding: 0.5rem 0.75rem 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: var(--card);
  box-shadow:
    0 0 0 1px var(--edge),
    4px 0 0 -2px var(--card),
    4px 0 0 -1px var(--edge),
    8px 0 0 -4px var(--card),
    8px 0 0 -3px var(--edge),
    8px 10px 24px -10px var(--shadow-sheet-drop);
}
.side::-webkit-scrollbar {
  display: none;
}
/* The help center's name heads the sidebar as a plain row, level with the bar beside it. */
.slip {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.25rem;
  margin-bottom: var(--space-6);
  padding: 0.25rem 0.375rem;
}
.brand {
  display: inline-flex;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  height: 1.75rem;
  padding: 0 0.375rem;
  border-radius: 0.25rem;
  text-decoration: none;
}
.brand img {
  display: block;
  width: 3.5rem;
  height: auto;
}
.brand-label {
  font-family: var(--font-title);
  font-size: 0.9375rem;
  letter-spacing: 0;
}
.slip-search {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sheet);
  background: transparent;
  color: var(--ink-soft);
}
.slip-search:hover {
  background: var(--here);
  color: var(--foreground);
}
.slip-search .icon {
  width: 0.875rem;
  height: 0.875rem;
}
.side-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.side-list ul {
  margin: 0 0 0.25rem;
  padding: 0;
  list-style: none;
}
/* Every row in the sidebar is the same: sans, 14px, icon or fold in one column. */
.row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 1.875rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--muted-foreground);
  font-family: var(--font-sans);
  font-size: var(--type-ui);
  letter-spacing: -0.005em;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
}
.row:hover {
  color: var(--foreground);
}
.row[aria-current="page"] {
  background: var(--here);
  color: var(--foreground);
}
.row > .icon {
  width: 0.9375rem;
  height: 0.9375rem;
  color: var(--ink-soft);
}
.row-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-meta {
  flex: none;
  color: var(--ink-soft);
  font-size: var(--type-meta);
}
kbd.row-meta {
  padding: 0;
  background: none;
  box-shadow: none;
  color: var(--ink-soft);
  font-weight: 400;
}
.row-topic {
  color: var(--foreground);
  font-weight: 500;
}
.row-topic > .icon {
  transition: rotate 120ms ease;
}
.row-topic[data-open] > .icon {
  rotate: 90deg;
}
.row-page {
  padding-block: 0.3125rem;
  padding-left: 2rem;
}
/* A current page's title wraps rather than hiding its end. */
.row-page[aria-current="page"] .row-name {
  white-space: normal;
}
.group-label {
  margin: var(--space-5) 0 var(--space-1);
  padding: 0 0.5rem;
  color: var(--ink-soft);
  font-size: var(--type-meta);
}
.side-foot {
  margin-top: auto;
  padding-top: var(--space-6);
}

/* The bar: a short strip over the page alone, blurring what scrolls under it. */
.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--topbar-height);
  padding: 0 1.75rem 0 var(--page-gutter);
  background: color-mix(in srgb, var(--background) 72%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 1px 0 var(--border);
}
.where {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  font-family: var(--font-title);
  font-size: var(--type-ui);
  letter-spacing: 0;
  white-space: nowrap;
}
.where-up {
  flex: none;
  color: var(--muted-foreground);
  text-decoration: none;
}
.where-up:hover {
  color: var(--foreground);
}
.where > .icon {
  width: 0.625rem;
  height: 0.625rem;
  color: var(--ink-soft);
}
.where-here {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tools {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-left: auto;
}
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 1.75rem;
  min-width: 13rem;
  padding: 0 0.3125rem 0 0.625rem;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--ink-soft);
  font-size: var(--type-caption);
  transition: box-shadow 150ms ease, color 150ms ease;
}
.search-trigger:hover {
  color: var(--muted-foreground);
  box-shadow: inset 0 0 0 1px var(--control-border-hover);
}
.search-trigger .icon {
  width: 0.8125rem;
  height: 0.8125rem;
}
.search-trigger-label {
  flex: 1;
  text-align: start;
}
.contents-toggle {
  display: none;
}

/* The page */
.content {
  padding: 1.75rem var(--page-gutter) 6rem;
}
.reading {
  max-width: calc(var(--measure) + 2 * var(--page-gutter));
}
/* Page titles stay modest: the serif, a step above the text. */
.content h1 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-title);
  font-size: var(--type-title);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.dek {
  max-width: 38rem;
  margin: 0 0 var(--space-8);
  color: var(--muted-foreground);
  font-family: var(--font-title);
  font-size: 1.0625rem;
  line-height: 1.5;
  letter-spacing: 0;
  text-wrap: pretty;
}

/* Cards: every card is the same small page: a quiet serif head over a wavy rule, close
   edges, and a sheet of paper beneath. */
.card {
  --slip-edge: var(--edge);
  padding: var(--space-3) var(--space-4) var(--space-1);
  border-radius: var(--radius-sheet);
  background: var(--card);
  box-shadow:
    0 0 0 1px var(--slip-edge),
    0 1px 2px rgb(20 20 18 / 4%),
    0 5px 0 -3px var(--card),
    0 5px 0 -2px var(--slip-edge);
}
.card-yellow {
  --slip-edge: color-mix(in srgb, var(--highlight) 45%, transparent);
  background: color-mix(in srgb, var(--highlight) 10%, var(--card));
}
.card-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0;
  padding-bottom: var(--space-2);
  border-bottom: 4px solid transparent;
  border-image: var(--rule-wave) 0 0 4 0 / 0 0 4px 0 round;
}
.card-head :is(h2, h3) {
  margin: 0;
  font-family: var(--font-title);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.4;
}
.card-head a {
  text-decoration: none;
}
.card-head a:hover {
  text-decoration: underline;
  text-decoration-color: var(--ink-soft);
}
.card-count {
  flex: none;
  margin-left: auto;
  color: var(--ink-soft);
  font-size: var(--type-meta);
}

/* Home: search, where people start, then each topic as a card. */
.home-content {
  max-width: calc(68rem + 2 * var(--page-gutter));
}
.home-head {
  max-width: 40rem;
  margin-bottom: var(--space-10);
}
.home-head h1 {
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}
.home-head .dek {
  margin-bottom: var(--space-6);
}
.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 0.625rem 0 0.875rem;
  border-radius: var(--radius-control);
  background: var(--control-surface);
  box-shadow: var(--shadow-control-depressed);
  color: var(--ink-soft);
  transition: box-shadow 150ms ease;
}
.hero-search:hover {
  box-shadow: var(--shadow-control-depressed-hover);
}
.hero-search:focus-within {
  box-shadow: var(--shadow-control-focus);
}
.hero-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 0.9375rem;
}
.hero-search input::placeholder {
  color: var(--control-placeholder);
}
.hero-search input:focus-visible {
  outline: 0;
}
.hero-search input::-webkit-search-cancel-button {
  display: none;
}
.hero-results {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.375rem);
  inset-inline: 0;
  max-height: min(24rem, 60svh);
  overflow: auto;
  border-radius: var(--radius-control);
  background: var(--card);
  box-shadow: var(--shadow-dialog);
  color: var(--foreground);
}
.popular {
  margin-top: var(--space-5);
}
.popular-label {
  margin: 0 0 var(--space-2);
  color: var(--ink-soft);
  font-size: var(--type-meta);
}
.popular ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-control);
  background: var(--control-surface);
  box-shadow: var(--shadow-button-outline);
  font-size: var(--type-caption);
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: box-shadow 150ms ease;
}
.chip:hover {
  box-shadow: var(--shadow-button-outline-hover);
}
.new-here {
  max-width: 40rem;
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-4);
}
.new-here-body {
  display: flex;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  padding-top: var(--space-3);
}
.new-here-body p {
  flex: 1;
  margin: 0;
  color: var(--muted-foreground);
  line-height: 1.5;
}
.section-label {
  margin: 0 0 var(--space-4);
  color: var(--muted-foreground);
  font-family: var(--font-title);
  font-size: 0.9375rem;
  font-weight: 400;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: var(--space-8) var(--space-6);
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topic-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.card-about {
  margin: var(--space-3) 0 var(--space-1);
  color: var(--muted-foreground);
  line-height: 1.5;
}
.card-items {
  flex: 1;
  margin: 0 0 var(--space-2);
  padding: 0;
  list-style: none;
}
.card-items a {
  display: block;
  padding: var(--space-2) 0;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}
.card-items li + li a {
  border-top: 1px solid var(--border);
}
.card-items a:hover {
  text-decoration: underline;
  text-decoration-color: var(--ink-soft);
}
.card-more {
  display: block;
  margin: 0 0 var(--space-2);
  padding: var(--space-2) 0 0;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
  text-decoration: none;
}
.card-more:hover {
  color: var(--foreground);
}

/* Topic: its articles as one card, one a row. */
.article-list {
  max-width: var(--measure);
  margin: 0 0 var(--space-12);
  padding: 0;
  list-style: none;
}
.article-list li + li {
  border-top: 1px solid var(--border);
}
.article-list a {
  display: grid;
  gap: 0.125rem;
  padding: 0.875rem var(--space-4);
  text-decoration: none;
}
.article-list-title {
  font-family: var(--font-title);
  font-size: 1.0625rem;
  letter-spacing: 0;
  line-height: 1.4;
}
.article-list-description {
  color: var(--muted-foreground);
  line-height: 1.5;
}
.article-list a:hover .article-list-title {
  text-decoration: underline;
  text-decoration-color: var(--ink-soft);
}

/* Article: the reading column, and "On this page" beside it when there's room. */
.page-grid {
  display: grid;
  grid-template-columns: minmax(0, calc(var(--measure) + 2 * var(--page-gutter))) minmax(11rem, 14rem);
  gap: var(--space-4);
  align-items: start;
}
.page-grid[data-has-toc="false"] {
  grid-template-columns: minmax(0, calc(var(--measure) + 2 * var(--page-gutter)));
}

/* Article text is set like the book: serif, at a reading size. */
.prose {
  max-width: var(--measure);
  font-family: var(--font-title);
  font-size: var(--type-reading);
  line-height: var(--leading-reading);
  letter-spacing: 0;
  text-wrap: pretty;
  hanging-punctuation: first;
}
.prose > * {
  margin: 0;
}
.prose > * + * {
  margin-top: 1em;
}
.prose h2 {
  margin-top: var(--space-10);
  font-family: var(--font-title);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.prose h3 {
  margin-top: var(--space-8);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.prose h2 + *,
.prose h3 + * {
  margin-top: 0.5rem;
}
.prose :is(h2, h3) {
  position: relative;
  scroll-margin-top: calc(var(--topbar-height) + 1.5rem);
}
.heading-anchor {
  position: absolute;
  left: -1.625rem;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  color: var(--ink-soft);
  opacity: 0;
  transition: opacity 150ms var(--ease-swift);
}
.heading-anchor svg {
  width: 0.9375rem;
  height: 0.9375rem;
}
:is(h2, h3):hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}
.prose a {
  text-decoration-color: var(--ink-faint);
}
.prose a:hover {
  text-decoration-color: var(--highlight);
}
/* UI labels are quoted in bold; set them in the interface face so they read as controls. */
.prose strong,
.prose kbd {
  font-family: var(--font-sans);
  font-size: 0.9em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.prose ul,
.prose ol {
  padding-left: 1.5rem;
}
.prose li + li {
  margin-top: 0.4em;
}
.prose li > ul,
.prose li > ol {
  margin-top: 0.4em;
}
.prose ul li::marker {
  color: var(--ink-soft);
}
.prose ol {
  list-style: none;
  counter-reset: step;
  padding-left: 2rem;
}
.prose ol > li {
  position: relative;
  counter-increment: step;
}
.prose ol > li::before {
  content: counter(step);
  position: absolute;
  left: -2rem;
  top: 0.1875rem;
  display: grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 999px;
  background: var(--pane);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
}
.prose code {
  padding: 0.125rem 0.3125rem;
  border-radius: 0.25rem;
  background: var(--code-surface);
  font-family: var(--font-mono);
  font-size: 0.84em;
}
.prose pre {
  overflow-x: auto;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-control);
  background: var(--code-surface);
  line-height: 1.55;
}
.prose pre code {
  padding: 0;
  background: none;
  font-size: 0.8125rem;
}
.prose blockquote {
  padding-left: 1.25rem;
  border-left: 2px solid var(--border);
  color: var(--muted-foreground);
}
/* The rule between things in the book: a thin hand-drawn wave. */
.prose hr {
  height: 4px;
  margin: var(--space-10) 0;
  border: 0;
  background: var(--rule-wave) left center / 12px 4px repeat-x;
}
.prose mark {
  padding: 0 0.125rem;
  background: var(--highlight-wash);
  color: inherit;
}
.table-wrap {
  overflow-x: auto;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: var(--type-ui);
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.prose th,
.prose td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.prose th {
  color: var(--muted-foreground);
  font-weight: 500;
}
.prose table strong {
  font-size: inherit;
}
/* Callouts are ruled at the left, as a layer of a page is; a tip in yellow. */
.callout {
  padding: 0.125rem 0 0.125rem 1.25rem;
  border-left: 2px solid var(--border);
}
.callout > * {
  margin: 0;
}
.callout > * + * {
  margin-top: 0.75em;
}
.callout-label {
  margin-right: 0.25rem;
  font-family: var(--font-sans);
  font-size: var(--type-caption);
  font-weight: 600;
}
.callout-tip,
.callout-important {
  border-left-color: var(--highlight);
}
.callout-warning {
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  border-left-color: var(--highlight);
  border-radius: 0 var(--radius-sheet) var(--radius-sheet) 0;
  background: var(--highlight-wash);
}

/* After the article */
.related {
  max-width: var(--measure);
  margin-top: var(--space-12);
}
.related h2 {
  margin: 0 0 var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 4px solid transparent;
  border-image: var(--rule-wave) 0 0 4 0 / 0 0 4px 0 round;
  color: var(--muted-foreground);
  font-family: var(--font-title);
  font-size: 0.9375rem;
  font-weight: 400;
}
.related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.related li + li {
  border-top: 1px solid var(--border);
}
.related a {
  display: block;
  padding: var(--space-2) 0;
  font-family: var(--font-title);
  font-size: var(--type-body);
  letter-spacing: 0;
  text-decoration: none;
}
.related a:hover {
  text-decoration: underline;
  text-decoration-color: var(--ink-soft);
}
.still-stuck {
  max-width: var(--measure);
  margin-top: var(--space-10);
  padding-top: var(--space-4);
  border-top: 4px solid transparent;
  border-image: var(--rule-wave) 4 0 0 0 / 4px 0 0 0 round;
  color: var(--muted-foreground);
  line-height: 1.6;
}
.still-stuck p {
  margin: 0;
}
.still-stuck strong {
  color: var(--foreground);
  font-weight: 500;
}
.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  max-width: var(--measure);
  margin-top: var(--space-8);
}
.pager a {
  display: grid;
  gap: 0.125rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-control);
  background: var(--control-surface);
  box-shadow: var(--shadow-button-outline);
  text-decoration: none;
  transition: box-shadow 150ms ease;
}
.pager a:hover {
  box-shadow: var(--shadow-button-outline-hover);
}
.pager a[rel="next"] {
  grid-column: 2;
  text-align: right;
}
.pager-label {
  color: var(--ink-soft);
  font-size: var(--type-meta);
}
.pager-title {
  font-family: var(--font-title);
  font-size: 0.9375rem;
  letter-spacing: 0;
  line-height: 1.35;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.on-this-page {
  position: sticky;
  top: var(--topbar-height);
  padding: 1.75rem 1.75rem 2rem 0;
  font-size: var(--type-caption);
}
.on-this-page p {
  margin: 0 0 var(--space-2);
  font-family: var(--font-title);
  font-size: 0.9375rem;
  letter-spacing: 0;
}
.on-this-page ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--border);
}
.on-this-page a {
  position: relative;
  display: block;
  padding: 0.3125rem 0 0.3125rem 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.4;
  text-decoration: none;
}
.on-this-page a:hover,
.on-this-page a[aria-current="true"] {
  color: var(--foreground);
}
.on-this-page a[aria-current="true"]::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0.375rem;
  bottom: 0.375rem;
  width: 2px;
  background: var(--highlight);
}

/* The floating bar, like the product's message bar: glass at the foot of the page. */
.floating-bar {
  position: fixed;
  z-index: 15;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  left: calc(var(--side) + (100vw - var(--side)) / 2);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: calc(100vw - var(--side) - 2rem);
  padding: 0.3125rem 0.3125rem 0.3125rem 1rem;
  border-radius: 1.25rem;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-float);
  font-size: var(--type-caption);
  opacity: 0;
  translate: -50% 0.75rem;
  pointer-events: none;
  transition: opacity 250ms var(--ease-swift), translate 250ms var(--ease-swift);
}
.floating-bar[data-visible] {
  opacity: 1;
  translate: -50% 0;
  pointer-events: auto;
}
.floating-title {
  overflow: hidden;
  max-width: 16rem;
  margin-right: 0.5rem;
  color: var(--muted-foreground);
  font-family: var(--font-title);
  font-size: var(--type-ui);
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.floating-bar :is(button, a) {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 1.875rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-foreground);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.floating-bar :is(button, a):hover {
  background: var(--here);
  color: var(--foreground);
}
.floating-bar .icon {
  width: 0.8125rem;
  height: 0.8125rem;
}
.floating-bar a {
  background: var(--highlight);
  color: var(--highlight-foreground);
}
.floating-bar a:hover {
  background: var(--highlight);
  color: var(--highlight-foreground);
  filter: brightness(0.97);
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  margin-top: auto;
  padding: var(--space-6) var(--page-gutter) 5.5rem;
  color: var(--ink-soft);
  font-size: var(--type-meta);
}
.footer-logo img {
  display: block;
  width: 3.25rem;
  height: auto;
  opacity: 0.55;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}
.site-footer a {
  text-decoration: none;
}
.site-footer nav a:hover {
  color: var(--foreground);
}

/* Search */
.search-dialog {
  width: min(100% - 2rem, 36rem);
  max-height: min(34rem, 80svh);
  margin: 12svh auto auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-dialog);
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-dialog);
  overflow: hidden;
}
.search-dialog::backdrop {
  background: rgb(20 20 18 / 24%);
  backdrop-filter: blur(2px);
}
.search-dialog[open] {
  animation: rise 200ms var(--ease-swift);
}
@keyframes rise {
  from {
    opacity: 0;
    translate: 0 0.5rem;
  }
}
.search-panel {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
}
.search-field input {
  flex: 1;
  min-width: 0;
  height: 3rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 0.9375rem;
}
.search-field input::placeholder {
  color: var(--control-placeholder);
}
.search-field input:focus-visible {
  outline: 0;
}
.search-field input::-webkit-search-cancel-button {
  display: none;
}
.search-results {
  overflow-y: auto;
  padding: 0.25rem;
}
.search-results:empty {
  display: none;
}
.search-result {
  display: grid;
  gap: 0.125rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  text-decoration: none;
  line-height: 1.45;
}
.search-result[aria-selected="true"] {
  background: var(--here);
}
.search-result-title {
  font-weight: 500;
}
.search-result-section {
  color: var(--muted-foreground);
  font-weight: 400;
}
.search-result-topic {
  color: var(--ink-soft);
  font-size: var(--type-meta);
}
.search-result-snippet {
  color: var(--muted-foreground);
  font-size: var(--type-caption);
}
.search-result mark {
  background: var(--highlight-wash);
  color: var(--foreground);
  border-radius: 0.125rem;
}
.search-empty {
  margin: 0;
  padding: 0.875rem 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}
.search-empty a {
  color: var(--foreground);
}

/* Narrower screens: drop "On this page", then fold the sidebar over the page. */
@media (max-width: 78rem) {
  .page-grid,
  .page-grid[data-has-toc="false"] {
    grid-template-columns: minmax(0, 1fr);
  }
  .on-this-page {
    display: none;
  }
}
@media (max-width: 52rem) {
  :root {
    --page-gutter: 1.25rem;
  }
  .main {
    margin-left: 0;
  }
  .side {
    z-index: 30;
    width: min(18rem, 85vw);
    visibility: hidden;
    translate: calc(-100% - 3rem) 0;
    transition: translate 300ms var(--ease-swift), visibility 0s 300ms;
  }
  body[data-contents-open] .side {
    visibility: visible;
    translate: 0 0;
    transition: translate 300ms var(--ease-swift);
  }
  body[data-contents-open]::after {
    content: "";
    position: fixed;
    z-index: 25;
    inset: 0;
    background: var(--scrim);
  }
  .topbar {
    gap: 0.5rem;
    padding: 0 0.75rem 0 0.5rem;
  }
  .contents-toggle {
    display: inline-grid;
  }
  .search-trigger {
    min-width: 0;
    width: 1.75rem;
    padding: 0;
    justify-content: center;
    box-shadow: none;
    color: var(--muted-foreground);
  }
  .search-trigger:hover {
    background: var(--here);
    box-shadow: none;
  }
  .search-trigger .icon {
    width: 0.9375rem;
    height: 0.9375rem;
  }
  .search-trigger-label,
  .search-trigger-kbd,
  kbd.row-meta,
  .open-app,
  .heading-anchor {
    display: none;
  }
  .floating-bar {
    left: 50%;
    max-width: calc(100vw - 2rem);
  }
}
@media (max-width: 34rem) {
  .content {
    padding-top: 1.25rem;
  }
  .hero-search kbd {
    display: none;
  }
  .new-here-body {
    flex-direction: column;
    align-items: flex-start;
  }
  .pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .pager a[rel="next"] {
    grid-column: 1;
  }
  .floating-title {
    display: none;
  }
  .floating-bar {
    padding-left: 0.3125rem;
  }
  .where-up,
  .where > .icon {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  .topbar,
  .side,
  .on-this-page,
  .floating-bar,
  .site-footer,
  .pager,
  .still-stuck {
    display: none;
  }
  .main {
    margin-left: 0;
  }
  .page-grid {
    display: block;
  }
}
