* { box-sizing: border-box; }
html { color-scheme: light dark; }
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button, a, summary { -webkit-tap-highlight-color: var(--clear); }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
input, select { min-width: 0; height: 38px; }
input, select, textarea {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 7px 11px;
  background: var(--surface);
  max-width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.6; }
/* One consistent dropdown arrow instead of each browser's own. */
select {
  appearance: none;
  padding-right: 30px;
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: var(--ring); outline: none; }
::placeholder { color: var(--text-3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.3; letter-spacing: .01em; }
h2 { font-size: var(--fs-md); font-weight: 650; }
h3 { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
ul { padding-left: 20px; }
summary { cursor: pointer; }
kbd {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
}
code { font-family: var(--font-mono); font-size: var(--fs-sm); }
[hidden] { display: none !important; }
.muted { color: var(--text-3); }
.empty { color: var(--text-3); font-size: var(--fs-sm); padding: 14px 0; }
.danger { color: var(--danger); }
.warn { color: var(--warn); }
.icon { width: 1.15em; height: 1.15em; vertical-align: -.17em; flex-shrink: 0; }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.field input, .field select, .field textarea { color: var(--text); font-weight: 400; font-size: var(--fs-md); }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.split { display: flex; justify-content: space-between; align-items: center; gap: var(--gap); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
