/*
 * Brand tokens: the canonical CSS custom properties for the landing page and the design mockups.
 * DESIGN.md documents every token; docs/design/APP_UI.md maps them onto the desktop app's variables.
 *
 * Dark is the default (bare :root). Light applies when the system asks for it and no explicit dark theme is set,
 * or when data-theme="light" is set. No component rule may use a literal color: only these tokens.
 */

:root {
  color-scheme: dark;

  /* Ground: petrol. A coloured dark, never neutral black. */
  --canvas: oklch(0.24 0.036 205);
  --canvas-sunk: oklch(0.21 0.033 205);
  --surface: oklch(0.275 0.038 205);
  --surface-raised: oklch(0.31 0.038 205);
  --surface-overlay: oklch(0.345 0.038 205);
  --surface-popover: oklch(0.345 0.038 205);
  --surface-hover: oklch(0.375 0.038 205);
  --line: oklch(0.37 0.034 205);
  --line-strong: oklch(0.47 0.032 205);

  /* Text: chalk, slightly warm against the cool ground. */
  --text: oklch(0.96 0.012 95);
  --text-muted: oklch(0.82 0.022 195);
  --text-faint: oklch(0.72 0.024 195);

  /* The ball: marigold. Means "your move". Primary action, focus, the nudge. */
  --ball: oklch(0.84 0.165 78);
  --ball-hover: oklch(0.88 0.15 84);
  --ball-press: oklch(0.79 0.16 72);
  --ball-ink: oklch(0.22 0.045 65);
  --ball-text: oklch(0.86 0.15 80);
  --ball-soft: oklch(0.84 0.165 78 / 14%);

  /* State hues. Each pairs with a shape or label, never colour alone. */
  --ice: oklch(0.82 0.075 225);
  --ice-soft: oklch(0.82 0.075 225 / 14%);
  --ember: oklch(0.75 0.16 40);
  --ember-soft: oklch(0.74 0.16 40 / 15%);
  --mint: oklch(0.83 0.12 165);
  --mint-soft: oklch(0.83 0.12 165 / 14%);

  /* The wall: the saturated field the product sits on in marketing (a desktop wallpaper). */
  --wall: oklch(0.8 0.15 76);
  --wall-deep: oklch(0.72 0.15 66);
  --wall-ink: oklch(0.24 0.05 60);

  --focus: oklch(0.86 0.16 80);
  --selection: oklch(0.84 0.165 78 / 32%);
  --scrim: oklch(0.14 0.03 205 / 62%);
  --shadow-color: oklch(0.08 0.02 205 / 55%);
  --shadow-color-soft: oklch(0.08 0.02 205 / 28%);
  --highlight: oklch(1 0 0 / 6%);

  /* Type */
  --font-display: 'Archivo', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Archivo', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Martian Mono', 'Cascadia Mono', 'SF Mono', Consolas, monospace;
  --wdth-display: 118;
  --wdth-body: 100;

  /* Space: 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 144px;

  /* Radius. --radius-corner is the signature sharp corner: one per Corner-owned object. */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --radius-corner: 2px;

  /* Elevation: offset, soft blur, tinted by the ground. */
  --shadow-1: 0 1px 2px var(--shadow-color-soft);
  --shadow-2: 0 2px 4px var(--shadow-color-soft), 0 8px 24px -6px var(--shadow-color);
  --shadow-card:
    0 1px 0 var(--highlight) inset, 0 2px 6px var(--shadow-color-soft),
    0 18px 44px -12px var(--shadow-color);
  --shadow-pop: 0 4px 10px var(--shadow-color-soft), 0 24px 60px -16px var(--shadow-color);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-press: 120ms;
  --dur-fast: 160ms;
  --dur-base: 220ms;
  --dur-card-in: 420ms;
  --dur-card-out: 200ms;
}

/* A region that stays petrol in either theme (the landing's privacy band). Same values as dark. */
[data-surface='petrol'] {
  color-scheme: dark;

  /* Ground: petrol. A coloured dark, never neutral black. */
  --canvas: oklch(0.24 0.036 205);
  --canvas-sunk: oklch(0.21 0.033 205);
  --surface: oklch(0.275 0.038 205);
  --surface-raised: oklch(0.31 0.038 205);
  --surface-overlay: oklch(0.345 0.038 205);
  --surface-popover: oklch(0.345 0.038 205);
  --surface-hover: oklch(0.375 0.038 205);
  --line: oklch(0.37 0.034 205);
  --line-strong: oklch(0.47 0.032 205);

  /* Text: chalk, slightly warm against the cool ground. */
  --text: oklch(0.96 0.012 95);
  --text-muted: oklch(0.82 0.022 195);
  --text-faint: oklch(0.72 0.024 195);

  /* The ball: marigold. Means "your move". Primary action, focus, the nudge. */
  --ball: oklch(0.84 0.165 78);
  --ball-hover: oklch(0.88 0.15 84);
  --ball-press: oklch(0.79 0.16 72);
  --ball-ink: oklch(0.22 0.045 65);
  --ball-text: oklch(0.86 0.15 80);
  --ball-soft: oklch(0.84 0.165 78 / 14%);

  /* State hues. Each pairs with a shape or label, never colour alone. */
  --ice: oklch(0.82 0.075 225);
  --ice-soft: oklch(0.82 0.075 225 / 14%);
  --ember: oklch(0.75 0.16 40);
  --ember-soft: oklch(0.74 0.16 40 / 15%);
  --mint: oklch(0.83 0.12 165);
  --mint-soft: oklch(0.83 0.12 165 / 14%);

  /* The wall: the saturated field the product sits on in marketing (a desktop wallpaper). */
  --wall: oklch(0.8 0.15 76);
  --wall-deep: oklch(0.72 0.15 66);
  --wall-ink: oklch(0.24 0.05 60);

  --focus: oklch(0.86 0.16 80);
  --selection: oklch(0.84 0.165 78 / 32%);
  --scrim: oklch(0.14 0.03 205 / 62%);
  --shadow-color: oklch(0.08 0.02 205 / 55%);
  --shadow-color-soft: oklch(0.08 0.02 205 / 28%);
  --highlight: oklch(1 0 0 / 6%);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --canvas: oklch(0.972 0.008 200);
    --canvas-sunk: oklch(0.945 0.01 200);
    --surface: oklch(0.993 0.003 200);
    --surface-raised: oklch(1 0 0);
    --surface-overlay: oklch(0.94 0.012 200);
    --surface-popover: oklch(1 0 0);
    --surface-hover: oklch(0.91 0.014 200);
    --line: oklch(0.89 0.012 200);
    --line-strong: oklch(0.78 0.015 200);
    --text: oklch(0.22 0.03 210);
    --text-muted: oklch(0.42 0.03 205);
    --text-faint: oklch(0.5 0.025 205);
    --ball: oklch(0.82 0.165 76);
    --ball-hover: oklch(0.86 0.155 82);
    --ball-press: oklch(0.77 0.16 70);
    --ball-ink: oklch(0.22 0.045 65);
    --ball-text: oklch(0.5 0.13 60);
    --ball-soft: oklch(0.82 0.165 76 / 20%);
    --ice: oklch(0.48 0.09 235);
    --ice-soft: oklch(0.6 0.09 235 / 13%);
    --ember: oklch(0.55 0.18 35);
    --ember-soft: oklch(0.6 0.18 35 / 12%);
    --mint: oklch(0.5 0.11 165);
    --mint-soft: oklch(0.6 0.11 165 / 13%);
    --wall: oklch(0.82 0.15 78);
    --wall-deep: oklch(0.74 0.15 68);
    --wall-ink: oklch(0.24 0.05 60);
    --focus: oklch(0.5 0.13 60);
    --selection: oklch(0.82 0.165 76 / 40%);
    --scrim: oklch(0.3 0.03 205 / 40%);
    --shadow-color: oklch(0.3 0.04 205 / 22%);
    --shadow-color-soft: oklch(0.3 0.04 205 / 12%);
    --highlight: oklch(1 0 0 / 70%);
  }
}

:root[data-theme='light'] {
  color-scheme: light;
  --canvas: oklch(0.972 0.008 200);
  --canvas-sunk: oklch(0.945 0.01 200);
  --surface: oklch(0.993 0.003 200);
  --surface-raised: oklch(1 0 0);
  --surface-overlay: oklch(0.94 0.012 200);
  --surface-popover: oklch(1 0 0);
  --surface-hover: oklch(0.91 0.014 200);
  --line: oklch(0.89 0.012 200);
  --line-strong: oklch(0.78 0.015 200);
  --text: oklch(0.22 0.03 210);
  --text-muted: oklch(0.42 0.03 205);
  --text-faint: oklch(0.5 0.025 205);
  --ball: oklch(0.82 0.165 76);
  --ball-hover: oklch(0.86 0.155 82);
  --ball-press: oklch(0.77 0.16 70);
  --ball-ink: oklch(0.22 0.045 65);
  --ball-text: oklch(0.5 0.13 60);
  --ball-soft: oklch(0.82 0.165 76 / 20%);
  --ice: oklch(0.48 0.09 235);
  --ice-soft: oklch(0.6 0.09 235 / 13%);
  --ember: oklch(0.55 0.18 35);
  --ember-soft: oklch(0.6 0.18 35 / 12%);
  --mint: oklch(0.5 0.11 165);
  --mint-soft: oklch(0.6 0.11 165 / 13%);
  --wall: oklch(0.82 0.15 78);
  --wall-deep: oklch(0.74 0.15 68);
  --wall-ink: oklch(0.24 0.05 60);
  --focus: oklch(0.5 0.13 60);
  --selection: oklch(0.82 0.165 76 / 40%);
  --scrim: oklch(0.3 0.03 205 / 40%);
  --shadow-color: oklch(0.3 0.04 205 / 22%);
  --shadow-color-soft: oklch(0.3 0.04 205 / 12%);
  --highlight: oklch(1 0 0 / 70%);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-card-in: 200ms;
  }
}

/*
 * Help center. Colors come only from brand/tokens.css (prepended by the build). The base, header and footer rules
 * mirror apps/landing/src/styles.css so the two read as one site; everything else is for reading.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-variation-settings: 'wdth' var(--wdth-body);
  font-feature-settings: 'kern' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  caret-color: var(--ball);
  overflow-x: clip;
}

body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--canvas);
  z-index: 60;
}

::selection {
  background: var(--selection);
  color: var(--text);
}

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

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
blockquote,
pre {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

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

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

button {
  cursor: pointer;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--ball);
  color: var(--ball-ink);
  border-radius: var(--radius-sm);
  font-weight: 650;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 90;
  font-size: 0.875em;
}

/* ---- Layout ----------------------------------------------------------------------------------------------------- */

.shell {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-4);
  }
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  padding-block: var(--space-6) var(--space-8);
}

@media (min-width: 1000px) {
  .help:not(.help-index) .help-layout {
    grid-template-columns: 208px minmax(0, 1fr);
    gap: var(--space-8);
    padding-top: var(--space-7);
  }
}

@media (min-width: 1280px) {
  .help:not(.help-index) .help-layout {
    grid-template-columns: 208px minmax(0, 1fr) 200px;
    gap: var(--space-7);
  }
}

/* ---- Header ------------------------------------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 64px;
}

.brand {
  display: inline-flex;
  color: var(--text);
  border-radius: var(--radius-xs);
}

.brand svg,
.footer-brand svg {
  height: 22px;
  width: auto;
  display: block;
}

.help-home {
  padding: var(--space-1) 0 var(--space-1) var(--space-4);
  border-left: 1px solid var(--line-strong);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'wdth' 108;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1.2;
}

.help-home[aria-current='page'] {
  color: var(--text);
}

@media (hover: hover) and (pointer: fine) {
  .help-home:hover {
    color: var(--text);
  }
}

.header-row > .search {
  margin-left: auto;
  flex: 1 1 auto;
  max-width: 340px;
  min-width: 0;
}

/* ---- Search ------------------------------------------------------------------------------------------------------- */

.search {
  position: relative;
}

.search input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.9375rem;
  outline: none;
  transition:
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease;
}

.search input::placeholder {
  color: var(--text-faint);
  opacity: 1;
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search input:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px var(--ball-soft);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  translate: 0 -50%;
  color: var(--text-faint);
  pointer-events: none;
}

.search-key {
  position: absolute;
  right: 10px;
  top: 50%;
  translate: 0 -50%;
  pointer-events: none;
}

.search input:focus ~ .search-key {
  display: none;
}

.search-lg {
  max-width: 640px;
  margin-top: var(--space-6);
}

.search-lg input {
  height: 56px;
  padding-left: 46px;
  border-radius: var(--radius-md);
  font-size: 1.0625rem;
}

.search-lg .search-icon {
  left: 16px;
  width: 1.3em;
  height: 1.3em;
}

/* The results arrive from the search box: a Corner-owned popover, so its bottom-right corner is the sharp one. */
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 70;
  width: min(480px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-corner) var(--radius-md);
  background: var(--surface-popover);
  box-shadow: var(--shadow-pop);
}

.search-lg .search-results {
  left: 0;
  right: auto;
  width: 100%;
}

@media (max-width: 640px) {
  .header-row > .search .search-results {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top, 0px));
    left: 16px;
    right: 16px;
    width: auto;
  }
  .search .search-key {
    display: none;
  }
}

.search-results a {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.search-results a[aria-selected='true'] {
  background: var(--surface-hover);
}

@media (hover: hover) and (pointer: fine) {
  .search-results a:hover {
    background: var(--surface-hover);
  }
}

.r-page {
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 600;
}

.r-head {
  font-weight: 650;
  font-size: 0.9375rem;
  line-height: 1.35;
}

.r-snip {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.search-results mark {
  background: var(--ball-soft);
  color: var(--text);
  border-radius: 2px;
  padding: 0 1px;
}

.search-empty {
  padding: 12px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ---- Navigation --------------------------------------------------------------------------------------------------- */

.side-nav,
.toc {
  display: none;
}

.nav-title {
  margin-bottom: var(--space-2);
  color: var(--text-faint);
  font-size: 0.8125rem;
  font-weight: 650;
}

.nav-group + .nav-group {
  margin-top: var(--space-5);
}

.side-nav a,
.topic-picker nav a {
  display: block;
  padding: 6px 10px;
  margin-inline: -10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1.35;
  text-decoration: none;
  transition:
    color var(--dur-fast) ease,
    background-color var(--dur-fast) ease;
}

.side-nav a[aria-current='page'],
.topic-picker nav a[aria-current='page'] {
  background: var(--surface-overlay);
  color: var(--text);
  font-weight: 650;
}

@media (hover: hover) and (pointer: fine) {
  .side-nav a:hover,
  .topic-picker nav a:hover {
    color: var(--text);
    background: var(--surface);
  }
}

.topic-picker {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.topic-picker summary,
.toc-inline summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-4);
  cursor: pointer;
  list-style: none;
}

.topic-picker summary::-webkit-details-marker,
.toc-inline summary::-webkit-details-marker {
  display: none;
}

.topic-picker summary span {
  color: var(--text-faint);
  font-size: 0.875rem;
}

.topic-picker summary b {
  font-weight: 650;
}

.topic-picker summary .icon,
.toc-inline summary .icon {
  margin-left: auto;
  color: var(--text-muted);
  transition: rotate var(--dur-base) var(--ease-out);
}

.topic-picker[open] summary .icon,
.toc-inline[open] summary .icon {
  rotate: 180deg;
}

.topic-picker nav {
  padding: var(--space-1) var(--space-4) var(--space-4) calc(var(--space-4) + 10px);
}

@media (min-width: 1000px) {
  .side-nav {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 0 10px var(--space-5);
  }
  .topic-picker {
    display: none;
  }
}

.toc ul,
.toc-inline ul {
  display: grid;
  gap: 2px;
}

.toc a,
.toc-inline a {
  display: block;
  padding: 4px 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.4;
  text-decoration: none;
}

.toc a[aria-current='true'] {
  color: var(--text);
  font-weight: 650;
}

@media (hover: hover) and (pointer: fine) {
  .toc a:hover,
  .toc-inline a:hover {
    color: var(--text);
  }
}

.toc-inline {
  margin-top: var(--space-6);
  border-block: 1px solid var(--line);
}

.toc-inline summary {
  padding: 0;
  font-weight: 650;
  font-size: 0.9375rem;
}

.toc-inline nav {
  padding-bottom: var(--space-4);
}

@media (min-width: 1280px) {
  .toc {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  .toc-inline {
    display: none;
  }
}

/* ---- Article ------------------------------------------------------------------------------------------------------ */

.article {
  min-width: 0;
}

.article-head .display-1,
.article-head .display-2 {
  font-family: var(--font-display);
  text-wrap: balance;
}

.display-1 {
  font-size: clamp(2.5rem, 1.35rem + 4.3vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 800;
  font-variation-settings: 'wdth' 110;
}

.display-2 {
  font-size: clamp(2.125rem, 1.5rem + 2.2vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 780;
  font-variation-settings: 'wdth' 108;
  max-width: 20ch;
}

.lede {
  margin-top: var(--space-4);
  max-width: 52ch;
  color: var(--text-muted);
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.prose {
  max-width: 70ch;
}

.prose > *:first-child {
  margin-top: var(--space-6);
}

.prose h2 {
  margin: 3.25rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.4375rem, 1.3rem + 0.5vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 760;
  font-variation-settings: 'wdth' 106;
  text-wrap: balance;
  scroll-margin-top: 88px;
}

.prose p,
.prose ul,
.prose ol,
.prose dl,
.prose pre,
.prose blockquote,
.prose .table-wrap,
.prose figure,
.prose .note {
  margin-top: 1rem;
}

.prose h2 + * {
  margin-top: 0;
}

.prose p,
.prose li,
.prose dd {
  text-wrap: pretty;
}

.prose b,
.prose strong {
  font-weight: 650;
}

.prose a {
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color var(--dur-fast) ease;
}

@media (hover: hover) and (pointer: fine) {
  .prose a:hover {
    text-decoration-color: var(--ball);
  }
}

.prose ul > li {
  position: relative;
  padding-left: 1.25rem;
}

.prose ul > li + li,
.prose ol > li + li {
  margin-top: 0.5rem;
}

.prose ul > li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
}

.prose ol.steps {
  counter-reset: step;
}

.prose ol.steps > li {
  position: relative;
  padding-left: 2.5rem;
  counter-increment: step;
}

.prose ol.steps > li + li {
  margin-top: 0.75rem;
}

.prose ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.12em;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--surface-overlay);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 90;
}

.prose code {
  padding: 0.1em 0.35em;
  border-radius: var(--radius-xs);
  background: var(--surface-overlay);
  font-family: var(--font-mono);
  font-size: 0.8125em;
  font-variation-settings: 'wdth' 90;
  overflow-wrap: anywhere;
}

.prose pre {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--canvas-sunk);
  border: 1px solid var(--line);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: 0.875rem;
  overflow-wrap: normal;
}

.prose blockquote {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-muted);
}

.note {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--canvas-sunk);
  border: 1px solid var(--line);
}

.note p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.note b {
  color: var(--text);
}

.prose dl dt {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'wdth' 104;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.prose dl dt:first-child {
  margin-top: 0;
}

.prose dl dt small {
  color: var(--text-faint);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8125rem;
}

.prose dl dd {
  margin-top: 0.25rem;
  color: var(--text-muted);
}

.prose dl.levels {
  border-left: 1px solid var(--line);
  padding-left: var(--space-5);
}

/* ---- Tables ------------------------------------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.prose thead th {
  padding: 0 var(--space-4) var(--space-2) 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-faint);
  font-size: 0.8125rem;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}

.prose tbody th,
.prose tbody td {
  padding: var(--space-3) var(--space-4) var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose tbody th {
  font-weight: 650;
}

.prose tbody th small {
  display: block;
  color: var(--text-faint);
  font-weight: 500;
  font-size: 0.8125rem;
}

.prose tbody td {
  color: var(--text-muted);
}

.keys-table tbody th {
  font-weight: 500;
  width: 50%;
}

.keys-table td {
  white-space: nowrap;
}

/* ---- Keys --------------------------------------------------------------------------------------------------------- */

kbd {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variation-settings: 'wdth' 90;
}

.keys,
.cap {
  display: inline-block;
  padding: 0.12em 0.42em;
  border-radius: var(--radius-xs);
  background: var(--surface-overlay);
  box-shadow: inset 0 -1px 0 var(--line-strong);
  color: var(--text);
  font-size: 0.78em;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: 0.06em;
}

.cap {
  min-width: 1.75em;
  text-align: center;
}

.cap + .cap {
  margin-left: 3px;
}

.then {
  margin-inline: 0.45em;
  color: var(--text-faint);
  font-size: 0.8125rem;
}

.os-sep {
  color: var(--text-faint);
}

:root[data-os='mac'] .os-win,
:root[data-os='mac'] .os-sep,
:root[data-os='win'] .os-mac,
:root[data-os='win'] .os-sep {
  display: none;
}

/* ---- Status ------------------------------------------------------------------------------------------------------- */

/* A hollow ring: not here yet. Same vocabulary as the landing page (filled = works today, ring = next). */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 9px 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 650;
  font-variation-settings: 'wdth' 100;
  letter-spacing: 0;
  line-height: 1.5;
  vertical-align: 0.2em;
  white-space: nowrap;
}

.soon::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

h2 .soon {
  margin-left: 0.4em;
}

.status {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

@media (min-width: 720px) {
  .status {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-7);
  }
}

.prose .status-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.prose .status-list li {
  margin: 0;
  padding: 10px 0 10px 1.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.prose .status-list li::before {
  top: 1.05em;
  left: 0.1rem;
  width: 9px;
  height: 9px;
}

.prose .status-list .is-live::before {
  background: var(--mint);
}

.prose .status-list .is-soon {
  color: var(--text-muted);
}

.prose .status-list .is-soon::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--text-faint);
}

/* ---- Index -------------------------------------------------------------------------------------------------------- */

.help-index .article-head {
  padding-block: var(--space-6) var(--space-4);
}

@media (min-width: 768px) {
  .help-index .article-head {
    padding-block: var(--space-8) var(--space-6);
  }
}

.help-index .prose {
  max-width: none;
}

.help-index .prose > p {
  max-width: 70ch;
}

.help-index .prose h2:not(.sr-only) {
  margin-top: var(--space-8);
}

.topics {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 900px) {
  .topics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

.prose .topic-list {
  border-top: 1px solid var(--line);
}

.prose .topic-list li {
  padding: 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.prose .topic-list li::before {
  display: none;
}

.prose .topic-list a {
  display: grid;
  gap: 4px;
  padding: var(--space-4) var(--space-3);
  margin-inline: calc(var(--space-3) * -1);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color var(--dur-fast) ease;
}

@media (hover: hover) and (pointer: fine) {
  .prose .topic-list a:hover {
    background: var(--surface);
  }
}

.topic-list b {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  font-variation-settings: 'wdth' 106;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.topic-list span {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ---- Specimen card (the nudge, as on screen) ---------------------------------------------------------------------- */

.specimen figcaption {
  margin-top: var(--space-3);
  color: var(--text-faint);
  font-size: 0.875rem;
}

.specimen-card {
  width: min(372px, 100%);
  padding: 0 var(--space-5) var(--space-5);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-corner) var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.specimen-card p {
  margin: 0;
}

.specimen-band {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'wdth' 112;
  font-size: 0.875rem;
}

.specimen-band .mono {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.ball {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ball);
}

.specimen-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  font-variation-settings: 'wdth' 104;
  line-height: 1.3;
}

.specimen-body {
  margin-top: var(--space-1) !important;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.specimen-meta {
  margin-top: var(--space-2) !important;
  color: var(--text-faint);
  font-size: 0.8125rem;
}

/* ---- FAQ ---------------------------------------------------------------------------------------------------------- */

.faq section + section {
  margin-top: var(--space-2);
}

.faq h2 {
  margin-top: var(--space-6);
  font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
}

.faq section:first-child h2 {
  margin-top: var(--space-6);
}

/* ---- Foot of an article ------------------------------------------------------------------------------------------- */

.article-foot {
  max-width: 70ch;
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.875rem;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  max-width: 70ch;
  margin-top: var(--space-5);
}

.pager a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 650;
  line-height: 1.3;
  transition:
    border-color var(--dur-fast) ease,
    background-color var(--dur-fast) ease;
}

.pager small {
  display: block;
  color: var(--text-faint);
  font-size: 0.8125rem;
  font-weight: 500;
}

.pager-next {
  grid-column: 2;
  justify-content: flex-end;
  text-align: right;
}

@media (hover: hover) and (pointer: fine) {
  .pager a:hover {
    border-color: var(--line-strong);
    background: var(--surface);
  }
}

/* ---- Footer ------------------------------------------------------------------------------------------------------- */

.site-footer {
  padding-block: var(--space-6) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.875rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
}

.footer-brand {
  display: inline-flex;
  color: var(--text);
  border-radius: var(--radius-xs);
}

.switches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-left: auto;
}

.theme-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.theme-switch button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.theme-switch button[aria-checked='true'] {
  background: var(--surface-overlay);
  color: var(--text);
}

.no-js .switches,
.no-js .search {
  display: none;
}

@media (max-width: 640px) {
  .switches {
    margin-left: 0;
  }
}

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