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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--t-base);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  font-feature-settings: 'tnum' 1, 'cv11' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--text);
}
h1 { font-size: var(--t-xl); }
h2 { font-size: var(--t-lg); }
h3 { font-size: var(--t-md); }
h4 { font-size: var(--t-base); font-weight: 600; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease-out);
}
a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
button:disabled { cursor: not-allowed; }
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
}

input[type="checkbox"], input[type="radio"] {
  accent-color: var(--accent);
  cursor: pointer;
}

textarea { resize: vertical; }

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

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

img, svg, video { display: block; max-width: 100%; }

hr {
  border: none;
  height: 1px;
  background: var(--border-2);
  margin: var(--s-4) 0;
}

code, kbd, pre {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  font-size: var(--t-2xs);
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: inset 0 -1px 0 var(--border-2);
}

.muted { color: var(--text-2); }
.muted-2 { color: var(--text-3); }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: 'tnum' 1; }
.tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scroll-x { overflow-x: auto; }

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

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