/* Base, typography, focus ring, reduced motion (PB 3.0, 5) */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; overflow-anchor: none; }
html, body { margin: 0; height: 100%; overflow-x: hidden; background: var(--bg); color: var(--label); font: 17px/1.25 var(--font);
  -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: 0.4; cursor: default; }
a { color: var(--blue); text-decoration: none; }
[hidden] { display: none !important; }
input, textarea, select { font-size: 16px; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { position: relative; max-width: var(--col); height: 100vh; height: 100dvh; margin: 0 auto; overflow: hidden; }
.main { display: flex; flex-direction: column; height: 100%; }
.content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: var(--s2) var(--s4) var(--s4); overscroll-behavior: contain; }
/* One-screen dashboard: no scroll, children flex to the remaining height */
.content.fit { display: flex; flex-direction: column; gap: var(--s3); overflow: hidden; padding-bottom: 0; }
.bottom-controls { flex: none; padding: var(--s2) var(--s4); }
.bottom-controls:empty { display: none; }

@media (min-width: 431px) {
  .app { box-shadow: 0 0 0 0.5px var(--sep); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .t-skel-card, .t-skel-line, .t-spin, .t-live { animation: none !important; }
}
