/* Shared visual language of the SimRacers homepage. Page styles own layout. */
html[data-sr-theme] {
  color-scheme: dark;
  --bg: #0d0f12;
  --panel: #15181d;
  --raised: #1d2128;
  --ink: #f5f5f3;
  --muted: #a9afb9;
  --line: #2b3038;
  --orange: #ff882e;
  --accent: var(--orange);
  --surface: var(--panel);
  --white: var(--ink);
  --text: var(--ink);
  --display: Arial, Helvetica, sans-serif;
  --body: Arial, Helvetica, sans-serif;
  background-color: var(--bg);
}
[data-sr-theme] body {
  background: var(--bg) !important;
  color: var(--ink);
  font-family: var(--body);
}
[data-sr-theme] :is(button, input, select, textarea) { font-family: var(--body); }
[data-sr-theme] :focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

[data-sr-theme="page"] :is(h1, h2, h3),
[data-sr-theme] :is(.track-card strong, .party-match strong, .grid-availability strong, .home-circuit strong, .home-circuits h2, .home-circuit-more h3) {
  font-family: var(--display);
  letter-spacing: -.035em;
  text-transform: none;
  line-height: 1.1;
}
[data-sr-theme="page"] h1 {
  font-size: clamp(2.65rem, 5.8vw, 5.375rem);
  font-weight: 750;
  letter-spacing: -.055em;
  overflow-wrap: break-word;
}
[data-sr-theme="page"] .section > h2,
[data-sr-theme="page"] .section-head h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
[data-sr-theme="page"] :is(h1, h2) em { color: var(--orange); font-style: normal; }
[data-sr-theme="page"] :is(body > header, .sr-sitebar) {
  background: #0d0f12f5;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
[data-sr-theme="page"] :is(.wordmark, .brand, .sr-brand) { font-family: var(--body); font-weight: 800; letter-spacing: -.035em; }
[data-sr-theme="page"] :is(.wordmark-sub, .brand-name > span, .sr-brand span) { color: var(--orange); }
[data-sr-theme="page"] :is(.site-nav nav, header nav, .sr-sitebar) a { font-family: var(--body); }
[data-sr-theme="page"] :is(.action, .button, a.primary, #refresh, #party-view:enabled):not(.secondary, .ghost, .glass) {
  border: 1px solid var(--orange);
  border-radius: 4px;
  background: var(--orange);
  color: #0d0f12;
  font-family: var(--body);
  font-weight: 700;
}
[data-sr-theme="page"] :is(.action.secondary, .button.secondary) {
  color: var(--ink); background: var(--panel); border: 1px solid #525861; border-radius: 4px;
}
[data-sr-theme="page"] :is(.toolbar, .history, .server-list, .detail, .direct, .totals, .feature, .hub-metric) {
  background-color: var(--panel); border-color: var(--line);
}
/* The deployed download template uses important declarations for its controls. */
[data-sr-theme="page"] .download-page :is(h1, h2, h3) {
  font-family: var(--display) !important; text-transform: none !important;
}
[data-sr-theme="page"] .download-page main { background: var(--panel) !important; border-color: var(--line) !important; }
[data-sr-theme="page"] .download-page .download { background: var(--orange) !important; border-color: var(--orange) !important; }
