/* ============================================================
   GTBNPS FINANCE — BASE
   Reset, typography, splash, scrollbars, shared utilities.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Stops the whole page rubber-banding on iOS while a grid is being
     scrolled horizontally inside it. */
  overscroll-behavior-y: none;
}

body { overflow: hidden; }

h1,h2,h3,h4,h5 { margin: 0; font-weight: var(--w-bold); letter-spacing: -.015em; }
p { margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--navy); text-decoration: none; }

/* No blue flash on tap — the app should feel native on a phone. */
* { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid var(--navy-soft);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--r-full);
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* Inline icons are written as <svg viewBox="0 0 24 24"> with no
   width or height attributes, so without a default the SVG spec
   sizes them at 300x150 and they blow the layout apart anywhere a
   component forgot to size them. Components that set their own size
   still win on specificity. */
svg { width: 18px; height: 18px; flex: none; }

/* Money is always tabular — a column that doesn't line up is a
   column nobody reads twice. */
.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ── Splash ───────────────────────────────────────────────── */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s5);
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  transition: opacity var(--slow), visibility var(--slow);
}
#splash.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.splash__mark {
  width: 78px; height: 78px; border-radius: 22px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  display: grid; place-items: center;
  color: var(--gold-light); font-weight: var(--w-black); font-size: 26px; letter-spacing: -1px;
}
.splash__name { color: #fff; font-size: var(--t-lg); font-weight: var(--w-bold); letter-spacing: -.02em; }
.splash__name span { color: var(--gold-light); }
.splash__sub { color: rgba(255,255,255,.55); font-size: var(--t-sm); margin-top: -12px; }
.splash__bar {
  width: 132px; height: 3px; border-radius: var(--r-full);
  background: rgba(255,255,255,.16); overflow: hidden; position: relative;
}
.splash__bar::after {
  content: ''; position: absolute; inset: 0; width: 40%;
  background: var(--gold-light); border-radius: var(--r-full);
  animation: splashSlide 1.15s ease-in-out infinite;
}
@keyframes splashSlide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}

/* ── Utilities ────────────────────────────────────────────── */
.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;
}
.hide { display: none !important; }
.pos  { color: var(--green); }
.neg  { color: var(--red); }
.muted { color: var(--text-3); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; }
.gap2 { gap: var(--s2); } .gap3 { gap: var(--s3); } .gap4 { gap: var(--s4); }
.spacer { flex: 1; }

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