/* Component behavior from design-system/web-swim/MASTER.md; Figma geometry stays in prototype.css. */
body { font-family: var(--swim-font-family); font-size: var(--swim-font-body); line-height: var(--swim-line-body); }
.button.primary { color: var(--swim-color-on-action); }
:root[data-theme='dark'] .button.primary { color: var(--swim-color-on-action); }
.button.primary:disabled { background: var(--swim-color-disabled); color: var(--swim-color-on-disabled); opacity: 1; }
:root[data-theme='dark'] .button.primary:disabled { color: var(--swim-color-on-disabled); }
.button.outline:disabled { background: var(--surface); color: var(--muted); border-color: var(--line); opacity: .65; }
.badge, .count-badge, .balance-badge { font-size: var(--swim-font-meta); }
.badge { white-space: nowrap; }
.attendance-status-toggle .badge { font-size: var(--swim-font-meta); }
.page-settings .theme-preview.light { background: var(--swim-gray-soft); }
.page-settings .theme-preview.dark { background: var(--swim-night); }
.page-settings .theme-preview.dark > i { background: var(--swim-night-soft); }
.detail-menu > div, .attendance-progress-details .attendance-overview { box-shadow: var(--swim-shadow-popover); }
.topbar { z-index: var(--swim-layer-header); }
.bottom-nav { z-index: var(--swim-layer-navigation); }
.attendance-save-bar { z-index: var(--swim-layer-save); }
.detail-menu > div, .attendance-progress-details { z-index: var(--swim-layer-popover); }
#toast { z-index: var(--swim-layer-toast); }
.skip-link { z-index: var(--swim-layer-skip); }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--swim-color-focus); outline-offset: 2px; }
.field :is(input, select, textarea)[aria-invalid='true'] { border-color: var(--red); background-color: var(--red-soft); }
.field :is(input, select, textarea)[aria-invalid='true']:focus-visible { outline-color: var(--red); }
.form-error { color: var(--red); }
:is(.stat-card strong, .student-balance, .time-tile, .timeline-time, .home-lesson-time, .report-card-counts dd) { font-variant-numeric: tabular-nums; }
@media (width < 1024px) {
  .page-home .home-lesson-eyebrow { font-size: var(--swim-font-meta); flex-wrap: wrap; row-gap: 0; }
  .page-home .lesson-row small:not(.home-lesson-status),
  .page-home:has(.next-lesson) .expiry-line > span,
  .page-home:has(.next-lesson) .expiry-widget .button,
  .page-calendar .day small { font-size: var(--swim-font-meta); }
}
@media (hover: none) {
  .button.primary:not(:disabled):hover { background: var(--primary); }
  .button.outline:not([aria-pressed='true']):not(:disabled):hover { background: var(--surface); color: var(--ink); border-color: var(--input-line); }
}
@media (prefers-reduced-motion: no-preference) {
  :is(.button,.icon-button,.filter-tabs button,.day,.theme-option,.status-option > span) {
    transition: background-color var(--swim-duration-quick) var(--swim-ease), color var(--swim-duration-quick) var(--swim-ease),
      border-color var(--swim-duration-quick) var(--swim-ease), box-shadow var(--swim-duration-panel) var(--swim-ease), transform var(--swim-duration-quick) var(--swim-ease);
  }
  :is(.button:not(:disabled),.icon-button,.theme-option):active { transform: translateY(1px); }
}
