:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #141b29;
  --muted: #536174;
  --line: #dce3ed;
  --accent: #285ed6;
  --accent-deep: #204dac;
  --link: #1e4fbf;
  --link-hover: #163a86;
  --hover: #e8eef6;
  --nav-bg: rgba(248, 250, 252, 0.82);
  --tint-a: #f3f7ff;
  --tint-b: #e8eef9;
  --glow: rgba(40, 94, 214, 0.1);
  --ink-hover: #0c111a;
  --on-ink: #ffffff;
  --ok: #15803d;
  --on-ok: #ffffff;
  --ok-tint: #ecfdf3;
  --ok-line: #c6ebd4;
  --warn-bg: #fff8e8;
  --warn-line: #ead7a2;
  --warn-ink: #3d3420;
  --radius: 10px;
  --shadow-shot: 0 30px 70px -22px rgba(20, 27, 41, 0.24), 0 8px 20px -10px rgba(20, 27, 41, 0.1), 0 0 0 1px rgba(20, 27, 41, 0.07);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "IBM Plex Mono", monospace;
  --measure: 66ch;
  --pad: clamp(1.25rem, 3vw, 2.5rem);
  --content: 1120px;
  --paper: var(--bg);
  --sheet: var(--surface);
  --blue: var(--accent);
  --blue-deep: var(--link);
  --focus: var(--accent);
  color-scheme: light;
}

/* Screenshots stay light; only the page chrome follows the system theme.
   The docs bundle shares this file but is light-only; its <html> carries
   data-product-origin, so it is excluded here. */
@media (prefers-color-scheme: dark) {
  :root:not([data-product-origin]) {
    color-scheme: dark;
    --bg: #0d1117;
    --surface: #151b24;
    --ink: #eef2f8;
    --muted: #9aa7b8;
    --line: #273142;
    --accent: #3b6fe0;
    --accent-deep: #4c7fee;
    --link: #8ab0ff;
    --link-hover: #b3ccff;
    --hover: #1e2735;
    --nav-bg: rgba(13, 17, 23, 0.8);
    --tint-a: #18223a;
    --tint-b: #131b2c;
    --glow: rgba(76, 130, 240, 0.2);
    --ink-hover: #ffffff;
    --on-ink: #0d1117;
    --ok: #4ade80;
    --on-ok: #06240f;
    --ok-tint: #10261a;
    --ok-line: #1e4a31;
    --warn-bg: #2a2412;
    --warn-line: #5c4d1f;
    --warn-ink: #f1e3b4;
    --shadow-shot: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
code { font-family: var(--mono); font-size: 0.92em; }
::selection { background: var(--accent); color: #fff; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: var(--pad);
  top: 0;
  z-index: 80;
  transform: translateY(-120%);
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.8rem;
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { transform: none; }

.wrap {
  width: min(var(--content), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

.button, .button-wait {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.55rem 1.1rem;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 600;
}
.button {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px -8px rgba(40, 94, 214, 0.6);
}
.button:hover { color: #ffffff; background: var(--accent-deep); }
.button.quiet {
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line);
}
.button.quiet:hover { color: var(--ink); background: var(--hover); }
.button-wait {
  background: var(--surface);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: not-allowed;
}

.site-nav, .site-foot { font-size: 1.0625rem; }
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
.site-nav .bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.wordmark img {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 22%;
}
.wordmark[aria-current="page"] { color: var(--ink); }
.product-here {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.product-here::before {
  content: "/";
  margin-right: 0.7rem;
  color: var(--muted);
  font-weight: 400;
}
.site-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.2rem;
  margin-left: auto;
}
.site-menu a:not(.button) {
  color: var(--ink);
  text-decoration: none;
}
.site-menu a:not(.button):hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.28rem; }
.site-menu a[aria-current="page"]:not(.button) { color: var(--link); text-decoration: underline; text-underline-offset: 0.28rem; }
.nav-toggle {
  display: none;
  margin-left: auto;
  min-height: 2.75rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
@media (max-width: 759px) {
  .site-nav .bar { flex-wrap: wrap; padding-block: 0.65rem; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-menu {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding-bottom: 0.85rem;
    gap: 0.15rem;
  }
  .site-menu.is-open { display: flex; }
  .site-menu a {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
  }
}

.site-foot {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.25rem;
  color: var(--muted);
  background: var(--bg);
}
.site-foot .foot-grid {
  display: grid;
  grid-template-columns: 13rem repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1.5rem 2rem;
  align-items: start;
}
.site-foot nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}
.site-foot nav p {
  margin: 0 0 0.25rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0;
}
.site-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  text-decoration: none;
}
.site-foot a:hover { color: var(--ink); }
.site-foot a.all { color: var(--link); font-weight: 600; }
/* Pointer users don't need the 44px touch target; keeps columns compact. */
@media (pointer: fine) { .site-foot nav a { min-height: 2.1rem; } }
.site-foot .wordmark { color: var(--ink); }
.site-foot .copy {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
}
@media (max-width: 759px) {
  .site-foot .foot-grid { grid-template-columns: 1fr 1fr; }
  .site-foot .wordmark { grid-column: 1 / -1; }
}

.shot-modal {
  width: min(96vw, 1440px);
  max-height: 92dvh;
  margin: auto;
  padding: 0;
  border: 0;
  padding-top: 3.5rem;
  background: var(--surface);
  border-radius: 12px;
  overflow: auto;
}
.shot-modal::backdrop {
  background: rgba(12, 16, 24, 0.78);
}
body:has(.shot-modal[open]) { overflow: hidden; }
.shot-modal [hidden] { display: none; }
.shot-modal img,
.shot-modal video {
  display: block;
  width: 100%;
  max-height: calc(92dvh - 3.5rem);
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.shot-close {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  min-height: 2.75rem;
  padding: 0.3rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 700px) {
  .shot-modal { padding-top: 0; }
  .shot-modal img { width: 1000px; max-width: none; max-height: none; }
  .shot-modal video { width: 100%; }
  .shot-close { position: sticky; top: 0.35rem; display: block; margin: 0.35rem 0.5rem 0.35rem auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
