/* Folded from the platform Design System, tokens version 1 (synced 2026-11-16, last change 2026-11-16), on 2026-11-19. Changes only by a deliberate re-fold; never refreshed by an automatic step.

   What this file is: Music Organ's own copy of the system rules that apply here,
   laid over Bootstrap 5.3.3 (static/musicorgan/vendor/bootstrap). One light theme;
   no colour-scheme media query anywhere (test_design_system_tidy fails on one).
   What is Music Organ's own (the role accents, the bird skin tokens, the banner,
   the organ keys, the player) lives in mo.css, never here. Loaded before mo.css. */

/* --- tokens ------------------------------------------------------------------ */
:root, [data-bs-theme="light"] {
  color-scheme: light;
  --ds-ground: #f8fafc;
  --ds-surface: #ffffff;
  --ds-text: #1e293b;
  --ds-muted: #64748b;
  --ds-primary: #2563eb;
  --ds-primary-rgb: 37, 99, 235;
  --ds-hairline: #dee2e6;
  --ds-card-edge: #cbd5e1;
  --ds-positive: #198754;
  --ds-negative: #dc3545;
  --ds-radius-lg: .5rem;
  --ds-shadow-card: 0 1px 3px rgba(15, 23, 42, .08);
  --ds-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --ds-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* ONE card shape: every card and panel in mo.css takes these two. */
  --mo-card-radius: var(--ds-radius-lg);
  --mo-card-shadow: var(--ds-shadow-card);

  /* Bootstrap, pointed at the tokens. */
  --bs-body-font-family: var(--ds-font);
  --bs-font-sans-serif: var(--ds-font);
  --bs-font-monospace: var(--ds-mono);
  --bs-secondary-color: var(--ds-muted);
  --bs-border-color: var(--ds-hairline);
  --bs-focus-ring-color: rgba(var(--ds-primary-rgb), .15);
}

/* --- tints: meaning on a row or a surface, at alpha .06. A tint is never the
   only signal: every use sits beside a word that says the same thing. ------- */
.bg-primary-tint   { background-color: rgba(13, 110, 253, .06) !important; }
.bg-success-tint   { background-color: rgba(25, 135, 84, .06) !important; }
.bg-danger-tint    { background-color: rgba(220, 53, 69, .06) !important; }
.bg-warning-tint   { background-color: rgba(255, 193, 7, .06) !important; }
.bg-info-tint      { background-color: rgba(13, 202, 240, .06) !important; }
.bg-secondary-tint { background-color: rgba(108, 117, 125, .06) !important; }

/* --- type ---------------------------------------------------------------------- */
body { font-family: var(--ds-font); line-height: 1.5; }
small, .small { font-size: .875rem; }
.table > thead th, .table-head { font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .025em; color: var(--ds-muted); }
/* Every figure (counts, durations, years, ratings, sizes) is set in tabular
   numerals so columns of them line up. */
.figure, .amount, .badge, .pagination, td.text-end, th.text-end { font-variant-numeric: tabular-nums; }
/* Signed figures only. Red means negative: a positive figure is never red. */
.amount-positive { color: var(--ds-positive); }
.amount-negative { color: var(--ds-negative); }

/* --- surfaces: a card holds its shape on the page ground ---------------------- */
.card { --bs-card-border-color: var(--ds-card-edge); }

/* --- actions ------------------------------------------------------------------ */
.btn-primary { --bs-btn-bg: var(--ds-primary); --bs-btn-border-color: var(--ds-primary);
  --bs-btn-hover-bg: #1d4ed8; --bs-btn-hover-border-color: #1d4ed8;
  --bs-btn-active-bg: #1e40af; --bs-btn-active-border-color: #1e40af;
  --bs-btn-disabled-bg: var(--ds-primary); --bs-btn-disabled-border-color: var(--ds-primary); }

/* --- focus: keyboard focus is always visible, one outline -------------------- */
:focus-visible { outline: 2px solid var(--ds-primary); outline-offset: 2px; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--ds-primary); box-shadow: 0 0 0 .2rem rgba(var(--ds-primary-rgb), .15); }

/* --- forms: compact ------------------------------------------------------------ */
.form-label { margin-bottom: .25rem; font-size: .875rem; font-weight: 600; }
.form-text { color: var(--ds-muted); }

/* --- the hidden attribute always wins ------------------------------------------ */
[hidden] { display: none !important; }

/* --- disclosure: never a modal. Content opens in place below its trigger. ---- */
details > summary { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  /* the system's rule, scoped: a character's animation is the studio's own and has its still twin (Kris 2026-11-18, 2026-11-19) */
  .btn, .dropdown-menu, .collapse, .fade, details > summary::before { transition: none !important; }
}

/* --- phone portrait first (390px): no sideways page scroll, touch targets at
   least 44px tall. Breakpoints 576px and 768px. ------------------------------- */
html, body { overflow-x: clip; }
@media (max-width: 767.98px) {
  .btn, .form-control, .form-select, .dropdown-item, .nav-link, .page-link { min-height: 44px; }
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
  textarea.form-control { min-height: 5rem; }
  .table-responsive, .mo-table-scroll { max-width: 100%; }
  img, svg, video { max-width: 100%; }
}
