/* Shared reading scale, based on Book a Court. Loaded by every web layout.
   Keep icon fonts, calendar geometry, charts and numeric KPI sizing intact. */
:root {
  --ui-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui-type-page: clamp(1.75rem, 3vw, 2.375rem);
  --ui-type-section: 1.3125rem;
  --ui-type-card: 1.125rem;
  --ui-type-body: .9375rem;
  --ui-type-label: .875rem;
  --ui-type-help: .875rem;
  --ui-type-control: 1rem;
  --ui-leading-body: 1.55;
  --ui-leading-heading: 1.3;
}
/* Legacy Bootstrap/site styles reduced rem-based text on phones. */
html:has(body.ui-typography) { font-size: 100%; }
html body.ui-typography {
  font-family: var(--ui-font) !important;
  font-size: var(--ui-type-body) !important;
  line-height: var(--ui-leading-body);
}
html body.ui-typography :is(h1, .h1) {
  font-size: var(--ui-type-page) !important;
  font-weight: 800 !important; line-height: 1.12 !important; letter-spacing: -.03em;
}
html body.ui-typography :is(h2, .h2, .modal-title) {
  font-size: var(--ui-type-section) !important;
  font-weight: 800 !important; line-height: 1.3 !important;
}
html body.ui-typography :is(h3, .h3) { font-size: var(--ui-type-card) !important; font-weight: 700 !important; }
html body.ui-typography :is(h4, h5, h6, .h4, .h5, .h6) { font-size: 1rem !important; font-weight: 700 !important; }
html body.ui-typography :is(h1,h2,h3,h4,h5,h6,p,label,td,th,input,select,textarea,.btn,.nav-link) {
  font-family: var(--ui-font) !important;
}
html body.ui-typography p { font-size: var(--ui-type-body) !important; line-height: var(--ui-leading-body) !important; }
html body.ui-typography :is(label, .form-label) { font-size: var(--ui-type-label) !important; line-height: 1.5; font-weight: 600 !important; }
html body.ui-typography :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) {
  font-size: var(--ui-type-control) !important; line-height: 1.5;
}
html body.ui-typography :is(button:not(.navbar-toggler):not(.sub-nav-toggler), .btn, .main-btn, .cb-btn) {
  font-family: var(--ui-font); font-size: var(--ui-type-label) !important; font-weight: 700;
}
html body.ui-typography :is(td, th) { font-size: var(--ui-type-body) !important; line-height: 1.55; }
html body.ui-typography :is(small, .form-text, .help-block, .field-validation-error, [class$="-hint"], [class$="-help"]) {
  font-size: var(--ui-type-help) !important; line-height: 1.5;
}
html body.ui-typography :is([class$="-eyebrow"], .eyebrow) { font-size: .75rem !important; font-weight: 800; letter-spacing: .08em; }
/* ID-scoped tournament rules otherwise outrank shared element selectors. */
html body.ui-typography #tournament-app h1 { font-size: var(--ui-type-page) !important; }
html body.ui-typography #tournament-app :is(h2, dialog h2) { font-size: var(--ui-type-section) !important; }
html body.ui-typography #tournament-app h3 { font-size: var(--ui-type-card) !important; }
html body.ui-typography #tournament-app :is(button, label) { font-size: var(--ui-type-label); }
html body.ui-typography #tournament-app :is(input, select, textarea) { font-size: var(--ui-type-control) !important; }
html body.ui-typography #tournament-app .tw-header > div > p:first-child { font-size: .75rem !important; font-weight: 800; letter-spacing: .08em; }
html body.ui-typography #tournament-app :is(.tw-field-help, #tw-selector-help, .tw-bracket-match small) { font-size: var(--ui-type-help) !important; }
html body.ui-typography #tournament-app :is(td, th, .tw-bracket-side) { font-size: var(--ui-type-body); }
html body.ui-typography #tournament-app .tw-header { min-width: 0; }
html body.ui-typography #tournament-app .tw-header > div { min-width: 0; overflow-wrap: anywhere; }
/* Calendar slot sizes stay independent from general table text. */

html body.ui-typography .modal-title { font-size: var(--ui-type-section) !important; }
html body.ui-typography :is(.ue-stat-value, .ub-stat-value) { font-size: 1.5rem !important; }
html body.ui-typography :is(.ue-stat-label, .ub-stat-label) { font-size: var(--ui-type-label) !important; }
html body.ui-typography .cb-page .fc-toolbar h2 { font-size: 1.125rem !important; }
html body.ui-typography .fc :is(td, th) { font-size: inherit !important; }
@media (max-width: 767px) {
  html body.ui-typography .cb-page .fc-toolbar h2 { font-size: 1rem !important; }
}
