/* commons-web — resets and element defaults. Extracted verbatim from finance-app web/styles.css
   (restructuring Phase 3). Loads BEFORE the app stylesheet, so an app rule of
   equal specificity always wins a tie against anything here. */

* { box-sizing: border-box; }

/* Author styles beat the UA stylesheet regardless of specificity, so any rule
   setting `display` on an element that also uses the `hidden` attribute
   silently defeats it. `.gate { display: flex }` did exactly that and stacked
   the sign-in screen on top of the app. This must stay above those rules. */
[hidden] { display: none !important; }

body {
  margin: 0;
  /* Explicit now that `color-scheme: light dark` no longer supplies them. */
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Kills double-tap-to-zoom without killing the 300ms-free tap. One of three
     zoom mechanisms; see lib/viewport.js for the other two. */
  touch-action: manipulation;
  /* Safe-area insets used to live here as body padding. That worked while the
     page was a normal scrolling document, but the shell is now a 100dvh flex
     column — padding on the body would push it past the viewport and produce a
     second, outer scrollbar. The insets moved onto the chrome that actually
     touches the edges: the topbar (notch), the bottom bar (home indicator) and
     #app (landscape ears). */
  padding: 0;
}

/* Every figure in the app is money or a count. Opting the whole document in is
   fewer rules than tagging each site, and there is no proportional-numeral case
   in this UI. */
body { font-variant-numeric: tabular-nums; }
