/* Base: reset, type, spacing scale, focus and motion. Colors and sizes come from theme.css. */
:root {
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--sb-bg); color: var(--sb-text);
  font: var(--fw-text) var(--fs-md)/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* The dashboard and its dialogs use the dense UI size; marketing pages keep 16px. */
.ui { font-size: var(--fs-sm); line-height: 1.5; }

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -.01em; }
h1 { font-size: var(--fs-h2); line-height: 1.15; font-weight: var(--fw-medium); }
h2 { font-size: var(--fs-h3); line-height: 1.3; font-weight: var(--fw-semibold); }
h3 { font-size: var(--fs-md); line-height: 1.5; font-weight: var(--fw-semibold); }
h4 { font-size: var(--fs-sm); line-height: 1.5; font-weight: var(--fw-semibold); }
p { margin: 0 0 var(--sp-3); }
a { color: var(--sb-brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, kbd, samp, .mono { font-family: var(--font-mono); font-size: 13px; }
:not(pre) > code { background: var(--sb-surface-2); border: 1px solid var(--sb-border); border-radius: var(--r-sm); padding: 1px 6px; }
img, svg { display: block; max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--sb-border); margin: var(--sp-5) 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:disabled { cursor: not-allowed; }
::selection { background: var(--sb-brand-soft); }

:focus-visible { outline: 2px solid var(--sb-brand); outline-offset: 2px; box-shadow: 0 0 0 4px var(--sb-brand-ring); border-radius: var(--r-sm); }

.muted { color: var(--sb-text-muted); }
.faint { color: var(--sb-text-faint); }
.mono { font-family: var(--font-mono); }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.noscript { margin: 0; padding: var(--sp-4); background: var(--sb-surface-2); color: var(--sb-text); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--sb-surface-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); }
.skip:focus { left: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .spin { animation: spin 1.8s linear infinite !important; animation-iteration-count: infinite !important; }
}
