/* Site type scale and color. Loaded last so it replaces older sizes and colors.
   The TV board keeps its display sizes. Weather category colors stay as data. */

:root,
html.scheme-light {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f5f1;
  --text: #141414;
  --muted: #4f4b44;
  --gold: #f5c518;
  --gold-hover: #e0b010;
  --gold-ink: #5e4b09;
  --on-gold: #141414;
  --ink-button: #141414;
  --on-ink-button: #ffffff;
  --ink-button-hover: #2a2a2a;
  --border: #8a8478;
  --line: #e4dfd4;
  --focus: #141414;
  --bs-body-color: #141414;
  --bs-body-bg: #ffffff;
  --bs-heading-color: #141414;
  --bs-link-color: #5e4b09;
  --bs-link-hover-color: #5e4b09;
  --bs-secondary-color: #4f4b44;
  --bs-border-color: #e4dfd4;
  --bs-tertiary-bg: #f6f5f1;
}

html.scheme-dark {
  color-scheme: dark;
  --bg: #111111;
  --surface: #1a1a1a;
  --chrome: #262626;
  --text: #f4f1ea;
  --muted: #c8c2b4;
  --gold: #f5c518;
  --gold-hover: #e0b010;
  --gold-ink: #f5c518;
  --on-gold: #141414;
  --ink-button: #f4f1ea;
  --on-ink-button: #141414;
  --ink-button-hover: #ffffff;
  --border: #8d887e;
  --line: #34322e;
  --focus: #f5c518;
  --bs-body-color: #f4f1ea;
  --bs-body-bg: #111111;
  --bs-heading-color: #f4f1ea;
  --bs-link-color: #f5c518;
  --bs-link-hover-color: #f5c518;
  --bs-secondary-color: #c8c2b4;
  --bs-border-color: #34322e;
  --bs-tertiary-bg: #1a1a1a;
}

html.scheme-dark .tooltip {
  --bs-tooltip-color: #f4f1ea;
  --bs-tooltip-bg: #262626;
}

@media (prefers-color-scheme: dark) {
  html.scheme-auto {
    color-scheme: dark;
    --bg: #111111;
    --surface: #1a1a1a;
    --chrome: #262626;
    --text: #f4f1ea;
    --muted: #c8c2b4;
    --gold: #f5c518;
    --gold-hover: #e0b010;
    --gold-ink: #f5c518;
    --on-gold: #141414;
    --ink-button: #f4f1ea;
    --on-ink-button: #141414;
    --ink-button-hover: #ffffff;
    --border: #8d887e;
    --line: #34322e;
    --focus: #f5c518;
    --bs-body-color: #f4f1ea;
    --bs-body-bg: #111111;
    --bs-heading-color: #f4f1ea;
    --bs-link-color: #f5c518;
    --bs-link-hover-color: #f5c518;
    --bs-secondary-color: #c8c2b4;
    --bs-border-color: #34322e;
    --bs-tertiary-bg: #1a1a1a;
  }

  html.scheme-auto .tooltip {
    --bs-tooltip-color: #f4f1ea;
    --bs-tooltip-bg: #262626;
  }
}

body:not(.page-tv) {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: "Source Sans 3", "Segoe UI", sans-serif !important;
  font-size: 1rem !important;
  font-weight: 400;
  line-height: 1.5;
}

body:not(.page-tv) :is(h1, h2, h3, h4, h5, h6) {
  font-family: inherit !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: var(--text) !important;
}

body:not(.page-tv) h1 {
  line-height: 1.2 !important;
}

body:not(.page-tv) h1::after {
  content: "" !important;
  display: block !important;
  width: 3rem !important;
  height: 0.25rem !important;
  margin-top: 0.5rem !important;
  background: var(--gold) !important;
  border: 0 !important;
}

body:not(.page-tv) :is(h2, h3)::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
}

body:not(.page-tv) h2 { font-size: 2rem !important; line-height: 1.25 !important; }
body:not(.page-tv) h3 { font-size: 1.75rem !important; line-height: 1.3 !important; }
body:not(.page-tv) h4 { font-size: 1.5rem !important; line-height: 1.35 !important; }
body:not(.page-tv) h5 { font-size: 1.25rem !important; line-height: 1.4 !important; }
body:not(.page-tv) h6 { font-size: 1rem !important; line-height: 1.5 !important; }

body:not(.page-tv) :is(p, li, td, th, label, dd, dt, figcaption, small, .small) {
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

body:not(.page-tv) :is(div, span):where(:not(
  .fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands, .bi, .badge,
  .leaflet-container *, .maplibregl-map *, .maplibregl-ctrl *,
  .ace_editor *, .apexcharts-canvas *
)) {
  font-size: inherit !important;
  line-height: inherit;
}

/* Jumbotron empty-state glyphs. The .icon div is forced to inherit, so size the icon. */
body:not(.page-tv) .jumbotron .icon :is(.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands) {
  font-size: 3rem !important;
  line-height: 1;
}

body:not(.page-tv) :is(strong, b, em, legend) {
  font-size: inherit !important;
}

/* Jumbotron stats. These beat the span size lock above. */
body:not(.page-tv) .summary .info span.number {
  font-size: 1.75rem !important;
  line-height: 1.1 !important;
  font-weight: 600 !important;
}

body:not(.page-tv) .summary .info span.title {
  font-size: 0.875rem !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
}

body:not(.page-tv) .badge {
  font-size: 1rem !important;
  font-weight: 600;
  line-height: 1.5;
}

/* Blocked Registrations: small Community Log tag under the last flight. */
body:not(.page-tv) .badge.blocked-cl-tag {
  font-size: .7rem !important;
  font-weight: 500;
  line-height: 1.2;
  padding: .2em .5em;
}

body:not(.page-tv) .navbar-aviation-flights-group .user-notification .badge {
  font-size: 0.6875rem !important;
  line-height: 1 !important;
  padding: 0.15em 0.4em;
  vertical-align: 0.35em;
}

body.page-index :is(.block-cover h3, .list-news) .badge {
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  padding: 0.2em 0.45em;
}

/* :where() keeps this weaker than the chrome, photo, and hero rules below. */
body:not(.page-tv) a:where(:not(.btn, .page-link, .nav-link, .dropdown-item, .upgrade-btn)) {
  color: var(--gold-ink) !important;
  font-size: inherit;
  text-decoration: none !important;
}

/* Flight cards and tables are dense. In light mode the links stay ink and underline on hover. */
html.scheme-light body:not(.page-tv) :is(.flight-table-container, .display-container, .flight-item, .flight-other) a:not(.btn) {
  color: var(--text) !important;
}
html.scheme-light body:not(.page-tv) :is(.flight-table-container, .display-container, .flight-item, .flight-other) a:not(.btn):is(:hover, :focus-visible) {
  text-decoration: underline !important;
  text-underline-offset: 0.12em;
}
@media (prefers-color-scheme: light) {
  html.scheme-auto body:not(.page-tv) :is(.flight-table-container, .display-container, .flight-item, .flight-other) a:not(.btn) {
    color: var(--text) !important;
  }
  html.scheme-auto body:not(.page-tv) :is(.flight-table-container, .display-container, .flight-item, .flight-other) a:not(.btn):is(:hover, :focus-visible) {
    text-decoration: underline !important;
    text-underline-offset: 0.12em;
  }
}

body:not(.page-tv) .alert-danger a:not(.btn) {
  color: var(--bs-alert-color, #58151c) !important;
  font-weight: 700;
}

body:not(.page-tv) .alert-success a:not(.btn) {
  color: var(--bs-alert-color, #0a3622) !important;
  font-weight: 700;
}

/* Flight-card titles and date headings stay ink, not gold. */
body:not(.page-tv) :is(.date-sticky, .flight-container .date-fixed) a,
body:not(.page-tv) .flight-info h4 a {
  color: #141414 !important;
}

html.scheme-dark body:not(.page-tv) :is(.date-sticky, .flight-container .date-fixed) a,
html.scheme-dark body:not(.page-tv) .flight-info h4 a {
  color: #fff !important;
}

html.scheme-dark body:not(.page-tv) :is(.date-sticky, .flight-container .date-fixed) a {
  background-color: transparent !important;
}

@media (prefers-color-scheme: dark) {
  html.scheme-auto body:not(.page-tv) :is(.date-sticky, .flight-container .date-fixed) a,
  html.scheme-auto body:not(.page-tv) .flight-info h4 a {
    color: #fff !important;
  }

  html.scheme-auto body:not(.page-tv) :is(.date-sticky, .flight-container .date-fixed) a {
    background-color: transparent !important;
  }
}

body:not(.page-tv) :is(.navbar, .footer, .above-footer, .page-cover, .block-cover, .pagination, .dropdown-menu, .about-hero, .upgrade-hero, .nav-pills) a,
body:not(.page-tv) .nav-pills a:hover {
  text-decoration: none !important;
}

body:not(.page-tv) .nav-pills > li:not(.active) > a:not(:hover) {
  color: var(--text) !important;
}

body:not(.page-tv) :is(.page-cover, .block-cover, .about-hero, .user-cover-photo) :is(h1, h2, h3, h4, p, a, span, button) {
  color: #fff !important;
}

body:not(.page-tv) :is(.user-cover-photo-floating-action-button, .user-profile-photo-floating-action-button):not(.social-cover-tools, .social-avatar-tools) {
  padding: 4px !important;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(17, 17, 17, 0.8) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

body:not(.page-tv) :is(.user-cover-photo-floating-action-button, .user-profile-photo-floating-action-button):not(.social-cover-tools, .social-avatar-tools) a {
  width: 2rem;
  height: 2rem;
  margin-right: 2px !important;
  border-radius: 50%;
  color: #fff !important;
  font-size: 0.9rem !important;
  line-height: 2rem;
  text-align: center;
}

body:not(.page-tv) :is(.user-cover-photo-floating-action-button, .user-profile-photo-floating-action-button):not(.social-cover-tools, .social-avatar-tools) a:last-child {
  margin-right: 0 !important;
}

body:not(.page-tv) :is(.user-cover-photo-floating-action-button, .user-profile-photo-floating-action-button):not(.social-cover-tools, .social-avatar-tools) a:is(:hover, :focus-visible) {
  background: #f5c518;
  color: #111 !important;
}

body:not(.page-tv) .derby-hero .derby-month-title h3 {
  color: #fff !important;
}

body:not(.page-tv) .derby-months .derby-pill {
  border-color: #f5c518 !important;
  background: #f5c518 !important;
  color: #16181d !important;
}

body:not(.page-tv) .derby-months .derby-pill:is(:hover, :focus-visible, .is-current) {
  border-color: #c99f00 !important;
  background: #c99f00 !important;
  color: #16181d !important;
}

body:not(.page-tv) .derby-months .derby-pill.is-current {
  font-weight: 700;
}

body:not(.page-tv) .derby-hero .derby-month-arrow {
  border-color: #f5c518 !important;
  background: #f5c518 !important;
  color: #16181d !important;
}

body:not(.page-tv) .derby-hero a.derby-month-arrow:is(:hover, :focus-visible) {
  border-color: #c99f00 !important;
  background: #c99f00 !important;
}

body:not(.page-tv) .block-cover-container :is(h1, h2, h3, h4) {
  font-size: 1.25rem !important;
  line-height: 1.3 !important;
}

body:not(.page-tv) :is(.page-cover, .block-cover, .about-hero) h1::after {
  display: none !important;
  content: none !important;
}

body:not(.page-tv) .footer :is(h1, h2, h3, h4, h5, h6, a) {
  color: #fff !important;
  text-decoration: none !important;
}

body:not(.page-tv) .footer :is(p, li) {
  color: #c8c2b4 !important;
}

body:not(.page-tv) .above-footer :is(h1, h2, h3, h4, a, p, li) {
  color: #fff !important;
}

body:not(.page-tv) .navbar-aviation-flights-group :is(a, .navbar-brand span) {
  color: var(--text) !important;
  text-decoration: none !important;
}

body:not(.page-tv) .navbar-aviation-flights-group .dropdown-menu li:is(:hover, .active) > a {
  background: #141414 !important;
  color: #fff !important;
}

body:not(.page-tv) .navbar-aviation-flights-group .dropdown-menu .multi-column-dropdown li:is(:hover, .active) a {
  background: transparent !important;
  color: #f5c518 !important;
}

body:not(.page-tv) .nav-pills .dropdown-menu > li > a {
  background: transparent !important;
  color: var(--text) !important;
}

body:not(.page-tv) .nav-pills .dropdown-menu > li:is(:hover, .active) > a {
  background: #141414 !important;
  color: #fff !important;
}

body:not(.page-tv) .afg-notice :is(h1, h2, h3, p, li, label) {
  color: #141414 !important;
}

body:not(.page-tv) .afg-notice a {
  color: #5e4b09 !important;
  text-decoration: none !important;
}

body:not(.page-tv) .afg-notice :is(.afg-notice-deny, .afg-notice-accept, .afg-notice-save) {
  color: #fff !important;
  background: #141414 !important;
}

body:not(.page-tv) .afg-notice :is(.afg-notice-customize, .afg-notice-back) {
  color: #141414 !important;
  background: #fff !important;
}

body:not(.page-tv) .upgrade-hero :is(h1, h2, h3, .upgrade-lead) {
  color: #f4f1ea !important;
}

body:not(.page-tv) .upgrade-hero .upgrade-kicker {
  color: var(--gold) !important;
}

body:not(.page-tv) .upgrade-hero :is(.upgrade-btn-ghost, .upgrade-btn-ghost:hover) {
  color: #f4f1ea !important;
  border-color: rgba(244, 241, 234, 0.7) !important;
  background: transparent !important;
}

body.page-about {
  --about-bg: var(--surface);
  --about-card: var(--bg);
  --about-ink: var(--text);
  --about-muted: var(--muted);
  --about-line: var(--line);
  --about-soft: var(--bg);
}

body.page-about :is(.about-step, .about-step-copy) {
  border-radius: 0.125rem !important;
}

body.page-about .about-step:hover,
body.page-about .about-step.is-active {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--on-gold) !important;
}

body.page-about .about-plane {
  background: var(--ink-button) !important;
  color: var(--on-ink-button) !important;
}


body:not(.page-tv) a.skip-link {
  background: var(--gold) !important;
  color: var(--on-gold) !important;
  text-decoration: none !important;
  font-weight: 600;
}

.footer {
  background: #141414 !important;
  color: #c8c2b4 !important;
}

html.scheme-dark .footer {
  background: #262626 !important;
}

@media (prefers-color-scheme: dark) {
  html.scheme-auto .footer {
    background: #262626 !important;
  }
}

.above-footer {
  background: #141414 !important;
  color: #c8c2b4 !important;
}

html.scheme-dark .above-footer {
  background: #262626 !important;
}

@media (prefers-color-scheme: dark) {
  html.scheme-auto .above-footer {
    background: #262626 !important;
  }
}

body .btn {
  border-radius: 0.5rem !important;
}

body:not(.page-tv) :is(.btn, .btn-info, .btn-primary, .btn-secondary, .btn-outline-secondary, .btn-outline-dark, .upgrade-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 0.5rem !important;
  font-family: inherit !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  text-decoration: none !important;
  text-shadow: none;
}

body:not(.page-tv) :is(.btn, .btn-info, .btn-primary):not(.btn-outline-secondary):not(.btn-outline-dark):not(.btn-secondary):not(.btn-link):not(.dropdown-toggle) {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--on-gold) !important;
}

body:not(.page-tv) :is(.btn, .btn-info, .btn-primary):not(.btn-outline-secondary):not(.btn-outline-dark):not(.btn-secondary):not(.btn-link):not(.dropdown-toggle):hover {
  background: var(--gold-hover) !important;
  border-color: var(--gold-hover) !important;
  color: var(--on-gold) !important;
}

body:not(.page-tv) .row-buttons .btn {
  width: 100%;
  white-space: normal;
}

body:not(.page-tv) :is(.btn-outline-secondary, .btn-outline-dark, .upgrade-btn-ghost) {
  background: transparent !important;
  border: 0.125rem solid var(--border) !important;
  color: var(--text) !important;
}

body:not(.page-tv) :is(.btn-outline-secondary, .btn-outline-dark, .upgrade-btn-ghost):hover {
  background: transparent !important;
  border-color: var(--gold-ink) !important;
  color: var(--text) !important;
}

body:not(.page-tv) .btn-secondary:not(.btn-outline-secondary) {
  background: var(--ink-button) !important;
  border-color: var(--ink-button) !important;
  color: var(--on-ink-button) !important;
}

body:not(.page-tv) .upgrade-btn-light {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--on-gold) !important;
}

body:not(.page-tv) .bootstrap-select > .dropdown-toggle {
  background: var(--bg) !important;
  color: var(--text) !important;
  border: 0.125rem solid var(--border) !important;
  font-weight: 400 !important;
}

body:not(.page-tv) :is(input, select, textarea).form-control,
body:not(.page-tv) .form-select {
  font-size: 1rem !important;
  color: var(--text);
  background: var(--bg);
  border-color: var(--border);
}

body:not(.page-tv) :focus-visible {
  outline: 0.1875rem solid var(--focus) !important;
  outline-offset: 0.1875rem;
}

body:not(.page-tv) #navbar-quick-search-input:is(:focus, :focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

body:not(.page-tv) :is(.navbar-aviation-flights-top, .footer) :focus-visible {
  outline-color: var(--gold) !important;
}

body:not(.page-tv) .nav-pills :is(.nav-link.active, .active a, a.active) {
  background: var(--gold) !important;
  color: var(--on-gold) !important;
}

body:not(.page-tv) .nav-pills > li > a:hover {
  background: var(--gold) !important;
  color: var(--on-gold) !important;
  opacity: 1;
}

/* .open is added on the pill li while its menu is open, and the old rule paints every anchor in that li black. */
body:not(.page-tv) .nav-pills > li.dropdown:is(.open, :hover) > a {
  background: var(--gold) !important;
  color: var(--on-gold) !important;
}

/* Pills inside a tab stay neutral until hover or the selected family. */
body:not(.page-tv) .tab-content .nav-pills > li:not(.active) > a:not(:hover) {
  background-color: #eee !important;
  color: var(--text) !important;
}

html.scheme-dark body:not(.page-tv) .tab-content .nav-pills > li:not(.active) > a:not(:hover) {
  background-color: #1a1a1a !important;
}

@media (prefers-color-scheme: dark) {
  html.scheme-auto body:not(.page-tv) .tab-content .nav-pills > li:not(.active) > a:not(:hover) {
    background-color: #1a1a1a !important;
  }
}

body:not(.page-tv) .tab-content .nav-pills > li > a:hover,
body:not(.page-tv) .tab-content .nav-pills > li.active > a {
  background-color: var(--gold) !important;
  color: var(--on-gold) !important;
}

.upgrade-pitch {
  --up-ink: var(--text);
  --up-muted: var(--muted);
  --up-paper: var(--bg);
  --up-soft: var(--surface);
  --up-line: var(--line);
  --up-card: var(--bg);
  --up-accent: var(--gold);
  --up-nav-on: var(--surface);
}

.upgrade-hero {
  background: #141414 !important;
}

.ace_editor,
.ace_editor * {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace !important;
  font-size: 1rem !important;
}

body.page-tv {
  background: #000 !important;
  color: #f4f1ea !important;
  font-family: "Source Sans 3", "Segoe UI", sans-serif !important;
}

body.page-tv h1::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* White text for headings on a photo or a dark bar. This rule does not paint the bar. */
body:not(.page-tv) :is(
  .modal-header,
  .modal-header :is(h1, h2, h3, h4, h5, .modal-title),
  .jumbotron-header :is(h1, h2, p),
  .business-jumbotron :is(h1, h2, p),
  .photo-grid-container .photo :is(h4, span),
  .flight-item-table-header,
  .summary .info span.title,
  .documention-table-header
) {
  color: #fff !important;
}

body.page-user_login .column h4,
body.page-user_reset .column h4 {
  background: #141414 !important;
  color: #fff !important;
}

html.scheme-dark body:not(.page-tv) :is(
  .modal-header,
  .flight-item-table-header,
  .summary .info span.title,
  .documention-table-header
),
html.scheme-dark body.page-user_login .column h4,
html.scheme-dark body.page-user_reset .column h4 {
  background-color: #262626 !important;
  color: #fff !important;
}
html.scheme-dark body:not(.page-tv) .modal-header :is(h1, h2, h3, h4, h5, .modal-title) {
  background-color: transparent !important;
  color: #fff !important;
}
html.scheme-dark body.page:not(.page-tv) .jumbotron h1 {
  background-color: transparent !important;
}

@media (prefers-color-scheme: dark) {
  html.scheme-auto body:not(.page-tv) :is(
    .modal-header,
    .flight-item-table-header,
    .summary .info span.title,
    .documention-table-header
  ),
  html.scheme-auto body.page-user_login .column h4,
  html.scheme-auto body.page-user_reset .column h4 {
    background-color: #262626 !important;
    color: #fff !important;
  }
  html.scheme-auto body:not(.page-tv) .modal-header :is(h1, h2, h3, h4, h5, .modal-title) {
    background-color: transparent !important;
    color: #fff !important;
  }
  html.scheme-auto body.page:not(.page-tv) .jumbotron h1 {
    background-color: transparent !important;
  }
}

body:not(.page-tv) :is(.block-cover, .page-cover, .list-news) .badge {
  background: #141414 !important;
  color: #fff !important;
}

html.scheme-dark body:not(.page-tv) :is(.block-cover, .page-cover, .list-news) .badge {
  background: #262626 !important;
  color: #fff !important;
}

@media (prefers-color-scheme: dark) {
  html.scheme-auto body:not(.page-tv) :is(.block-cover, .page-cover, .list-news) .badge {
    background: #262626 !important;
    color: #fff !important;
  }
}

body:not(.page-tv) .upgrade-close :is(h1, h2, h3, p, a) {
  color: #f4f1ea !important;
}

body.page-about .about-hero-scroll {
  font-size: 1rem !important;
}


a,
a:hover,
a:focus,
a:visited {
  text-decoration: none !important;
}

body:not(.page-tv) .above-footer.has-premium-note {
  padding-top: 2.75em !important;
  padding-bottom: 2.75em !important;
}
body:not(.page-tv) .above-footer.has-premium-note .container {
  display: flow-root;
}
