/* Structural base tokens — palette-free. Layer a justinian-design theme on top as styles/theme.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; line-height: 1.5; }
img, svg, canvas { max-width: 100%; display: block; }
h1, h2, h3, h4, p, figure { margin: 0 0 0.5em; }

:root {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 40px;
  --text-xs: 0.72rem; --text-sm: 0.85rem; --text-base: 1rem;
  --text-lg: 1.2rem; --text-xl: 1.5rem; --text-2xl: 1.9rem;
}

:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th { text-align: left; }
th.num, td.num { text-align: right; }
.table-scroll { overflow: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

@media print {
  nav, button, .btn, .toolbar, .no-print { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .table-scroll { overflow: visible; max-height: none; }
  tr, .card { break-inside: avoid; }
  @page { margin: 16mm; }
}

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