/* base.css — reset, typography, focus, reduced motion. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: var(--fz-body); line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow: hidden; /* the shell scrolls its own content area; the page never scrolls behind the chrome */
}
h1, h2, h3, h4, h5 { margin: 0; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
h1 { font-size: var(--fz-h); letter-spacing: -.02em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 .75em; }
a { color: inherit; text-decoration: none; }
a.link, .md a { color: var(--bblue); text-decoration: underline; text-underline-offset: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled, [aria-disabled="true"] { cursor: default; }
img, svg { display: block; }
svg.i { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i-sm { width: 15px; height: 15px; }
svg.i-xs { width: 13px; height: 13px; }
code, kbd, .mono { font-family: var(--mono); }
code { font-size: .92em; background: var(--nested); border-radius: 4px; padding: 1px 5px; }
kbd { font-size: 11px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface); color: var(--mut); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
::selection { background: var(--brand-t); }

/* Focus: one consistent blue ring, keyboard only */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--bblue); outline-offset: 2px; border-radius: 6px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 0; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* text helpers */
.mut { color: var(--mut); } .mut2 { color: var(--mut2); } .mut3 { color: var(--mut3); }
.lbl { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mut2); font-weight: 600; }
.lbl-mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--mut2); font-weight: 500; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serif { font-family: var(--serif); }

/* entrance animation used by chat messages and cards */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

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