/* Reset, type, utilities. */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: #000;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
  overscroll-behavior: none;
}
html[data-room="white"] { background: var(--bg); }
body {
  margin: 0;
  height: 100%;
  background: inherit;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.38;
  font-weight: 400;
  /* every figure in the app lines up in columns (Stocks, Wallet): tabular figures are the default, not an opt-in */
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, select { -webkit-user-select: text; user-select: text; }
::selection { background: var(--ink); color: var(--bg); }
h1, h2, h3, h4, p { margin: 0; font-weight: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; opacity: .4; }
a { color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 1px solid var(--ink-3); outline-offset: 3px; border-radius: 6px; }
svg { display: block; }
hr.div { border: 0; height: 1px; background: var(--line); margin: 14px 0; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100dvh; display: block; z-index: 0; pointer-events: none; }
#app { position: fixed; inset: 0; z-index: 1; }
#overlay { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#overlay .sheet-wrap, #overlay .portal > * { pointer-events: auto; }
.no-gl #gl { display: none; }
/* iOS 26 Home Screen app: the layout viewport ends ~62 pt above the screen's bottom (100dvh = innerHeight = 812 on
   an 874 pt screen), so inset:0 and 100dvh leave a dead band over the home indicator. The large viewport is the
   real screen there; layout.js reads the same height for the mode and the fold. */
@media (display-mode: standalone) {
  html, body { height: 100lvh; }
  #gl { height: 100lvh; }
  #app, #overlay { bottom: auto; height: 100lvh; }
  html #gl-labels { bottom: auto; height: 100lvh; }
}
/* 3D labels are projected from a camera that is still gliding during a fold/unfold: hide them for the turn */
html #gl-labels { transition: opacity .14s var(--ease); }
html.flipping #gl-labels { opacity: 0; transition-duration: 60ms; }

.num, .mono { font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.code { font-family: var(--code); font-size: .92em; letter-spacing: 0; }
.serif, .display { font-family: var(--display); font-weight: 400; letter-spacing: -0.02em; }
/* labels like iOS Settings: sentence case, 13 px, secondary text (decision 28) */
.label { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink-3); font-weight: 400; }
.muted { color: var(--ink-3); }
.dim { color: var(--ink-2); }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--ink-2); }
.gold { color: var(--gold); }
.t-up { color: var(--up); } .t-down { color: var(--down); } .t-gold { color: var(--gold); } .t-steel { color: var(--steel); } .t-ink { color: var(--ink); } .t-flat { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* privacy veil: amounts blurred until you lift it */
:root:has(.shell.veiled) #gl-labels { filter: blur(8px); transition: filter .3s var(--ease), opacity .14s var(--ease); }
.veiled .money, .veiled .num.amt, .veiled .row-vv, .veiled .tile-v, .veiled .hero-v { filter: blur(9px); transition: filter .3s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
