/* sto-admin-design/css/base.css — reset, typography, focus, defaults */

*, *::before, *::after { box-sizing: border-box; }
/* The role gate and the binder hide with the `hidden` attribute; an author `display` (.nav-item, .btn, the action
   bar's per-state rules) would otherwise beat the browser's own [hidden] rule and show Letters/Admins/Delete to a
   role that may not use them (found by test/browser on 16 Sep 2026). */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1 { font-family: var(--font-content); font-size: var(--fs-2xl); font-weight: var(--fw-semi); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-xl); font-weight: var(--fw-semi); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-lg); font-weight: var(--fw-semi); line-height: var(--lh-snug); }

a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-text-hi); text-decoration: underline; text-underline-offset: 2px; }
a:visited { color: var(--accent-text); }

strong, b { font-weight: var(--fw-semi); }
code, kbd, samp { font-family: var(--font-mono); font-size: .92em; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }

hr { border: 0; border-top: 1px solid var(--rule); margin: var(--sp-4) 0; }

/* Focus — always visible, never removed */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

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

::placeholder { color: var(--text-3); opacity: 1; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: var(--r-pill); border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #5a534b; background-clip: content-box; }

/* Utilities — the only ones. Everything else is a component. */
.u-kicker { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-kicker); text-transform: uppercase; color: var(--text-3); }
.u-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.u-dim { color: var(--text-2); }
.u-dimmer { color: var(--text-3); }
.u-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.u-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.u-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; }
.u-hidden { display: none !important; }
.u-spacer { flex: 1 1 auto; }

/* Icon sprite usage: <svg class="icon"><use href="icons.svg#check"></use></svg> */
.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 14px; height: 14px; }
.icon--lg { width: 20px; height: 20px; }
.icon--xl { width: 24px; height: 24px; stroke-width: 1.4; }

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