
:root {
  --ne-h1: 41px;
  --ne-h2: 29px;
  --ne-h3: 23px;
  --ne-h4: 18px;
  --ne-body: 16px;
  --ne-subtext: 14px;
  --ne-caption: 12px;
}

html,
html body {
  font-size: var(--ne-body) !important;
}

/* Headings - Exclude Header & Footer */
html body :is(h1, .h1, .ne-text-h1):not(header *):not(footer *) {
  font-size: var(--ne-h1) !important;
  line-height: 1.2 !important;
}

html body :is(h2, .h2, .ne-text-h2):not(header *):not(footer *) {
  font-size: var(--ne-h2) !important;
  line-height: 1.3 !important;
}

html body :is(h3, .h3, .ne-text-h3):not(header *):not(footer *) {
  font-size: var(--ne-h3) !important;
  line-height: 1.35 !important;
}

html body :is(h4, .h4, .ne-text-h4):not(header *):not(footer *) {
  font-size: var(--ne-h4) !important;
  line-height: 1.4 !important;
}

/* Nested Heading Elements */
html body :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4)
:is(span, strong, b, em, a):not(header *):not(footer *) {
  font-size: inherit !important;
}

/* Body Text */
html body :is(
  p, li, dt, dd, blockquote, td, th,
  label, input, textarea, select, button, a, span
):not(header *):not(footer *) {
  font-size: var(--ne-body) !important;
}

/* Custom Classes */
html body :is(a, span, div):is(
  .nav-link, .dropdown-item, .btn, .card-title,
  .property-title, .home_property_title,
  .main_page_title_caption, .field_font,
  .SF16_19Medium, .SF16_19Regular,
  .SF16_19Bold, .SF18_21Regular, .SF18_21Bold
):not(header *):not(footer *) {
  font-size: var(--ne-body) !important;
}

/* Subtext */
html body :is(
  small, .small, .ne-subtext, .ne-text-subtext,
  .text-muted, .form-text, .help-text,
  .helper-text, .text-secondary, .subtext
):not(header *):not(footer *) {
  font-size: var(--ne-subtext) !important;
}

/* Captions */
html body :is(
  figcaption, .ne-caption, .ne-hint,
  .ne-text-caption, .caption, .hint,
  .time_font, .tab_font, .item_id, .section_count
):not(header *):not(footer *) {
  font-size: var(--ne-caption) !important;
}

/* Section Titles */
html body :is(
  .main_page_title, .home_evaluate_header,
  .home_secondary_title, .home_sections_header,
  .home_request_title
):not(header *):not(footer *) {
  font-size: var(--ne-h3) !important;
  line-height: 1.35 !important;
}

/* Mobile */
@media (max-width: 767.98px) {
  :root {
    --ne-h1: 30px;
    --ne-h2: 29px;
    --ne-h3: 26px;
    --ne-h4: 18px;
  }
}
