*, *::before, *::after{ box-sizing: border-box; }
html, body{ height: 100%; }
html{ scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*{ scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
body{
  margin: 0;
  /* clip (not hidden) kills any stray horizontal scrollbar without turning body
     into a scroll container — so the sticky topbar and fixed bottom bar stay put. */
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1,h2,h3,h4{ margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.2px; }
p{ margin: 0; }
a{ color: inherit; text-decoration: none; }
button, input, select, textarea{ font-family: inherit; font-size: inherit; color: inherit; }
button{ cursor: pointer; }
::selection{ background: var(--accent-soft); }

/* scrollbar, subtle */
::-webkit-scrollbar{ width: 8px; height: 8px; }
::-webkit-scrollbar-thumb{ background: var(--line-strong); border-radius: 10px; }
::-webkit-scrollbar-track{ background: transparent; }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Mono figures utility — used for money, IDs, dates everywhere */
.mono{ font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.eyebrow{
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Frame number — corner marking on cards, like a negative strip frame index */
.frame-no{
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.5px;
}

/* Ink stamp — status badge styled like a rubber lab stamp */
.stamp{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 3px 10px 2px;
  border: 1.5px dashed currentColor;
  border-radius: 3px;
  transform: rotate(-4deg);
  white-space: nowrap;
}
.stamp--paid{ color: var(--stamp-green); background: var(--stamp-green-bg); }
.stamp--due{ color: var(--stamp-red); background: var(--stamp-red-bg); }
.stamp--partial{ color: var(--stamp-amber); background: var(--stamp-amber-bg); }
.stamp--info{ color: var(--stamp-navy); background: var(--stamp-navy-bg); }

.reduced-motion, .no-anim{ transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce){
  /* animation-delay matters as much as duration here: staggered entrances use a
     `backwards` fill, so a surviving delay would leave content invisible while it
     waits. Zero all three. */
  *{
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
}
