/* Six approved corrections to the preserved design. */
@media (max-width: 480px) {
  #post-147 .et_pb_text_1 { font-size: 32px; }
}

/* The longest word needs 257.35px at 32px and 386px at 48px. */
@media (max-width: 321px) {
  #post-147 .et_pb_text_1 { font-size: 28px; }
}

@media (min-width: 481px) and (max-width: 482px) {
  #post-147 .et_pb_text_1 { font-size: 40px; }
}

@media (min-width: 981px) and (max-width: 1100px) {
  #post-147 .et_pb_text_0 h1 { font-size: 40px; }
}

@media (min-width: 981px) {
  #post-318 .et_pb_section_3,
  #post-318 .et_pb_section_6,
  #post-312 .et_pb_section_9,
  #post-322 .et_pb_section_4 {
    container-type: inline-size;
  }

  #post-318 .et_pb_row_3 { display: flex; align-items: stretch; }
  #post-318 .et_pb_row_3 > .et_pb_column { display: flex; }
  #post-318 .et_pb_row_3 .et_pb_testimonial { width: 100%; margin-bottom: 0 !important; }
}

#post-312 .service-cards .et_pb_text_1 a { color: var(--refresh-paper) !important; }

.vsh-steuernews .meta { color: #666; }

#post-151 .et_pb_text_1 a {
  color: var(--refresh-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

/* Use the header's existing Divi column; section backgrounds stay full width. */
#post-318 .et_pb_section_2 > .et_pb_row,
#post-318 .et_pb_section_6 > .et_pb_row,
#post-312 .et_pb_section_9 > .et_pb_row,
#post-322 .et_pb_section_4 > .et_pb_row {
  width: 80%;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 981px) {
  #post-318 .et_pb_column_4 { padding-left: 0; }
  #post-318 .et_pb_row_2,
  #post-147 .et_pb_row_0 {
    width: 80%;
    max-width: 1080px;
  }

  /* Preserve the original portrait sizes and their opposing alignment. */
  #post-318 .et_pb_image_1,
  #post-318 .et_pb_image_2 {
    max-width: calc(min(80cqw, 1152px) * .33075);
  }

  /* Scale the existing 30px contact gap with its former 1440px frame. */
  #post-318 .et_pb_column_12,
  #post-312 .et_pb_column_16,
  #post-322 .et_pb_column_3 {
    padding-left: calc(30px * (min(80cqw, 1080px) / min(100cqw, 1440px)));
  }

  #post-147 .et_pb_column_0 { padding-left: 0; }
  #post-151 .et_pb_section_1 { width: 100%; }
}

/* These mobile/tablet insets exceeded the measured 4px allowance. */
@media (max-width: 980px) {
  /* Font-swap anchoring in this column otherwise nudges native history restores. */
  #post-318 .et_pb_column_4 { overflow-anchor: none; }

  #post-318 .et_pb_row > .et_pb_column_4,
  #post-147 .et_pb_column_0 {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Preserve the existing wide search-results panel independently of sections. */
@media (min-width: 1441px) {
  #main-header #search-results {
    left: calc(50% - 540px);
    width: 1080px;
  }
}

/* Header, navigation, dropdowns, mobile menu and search respond immediately. */
#main-header,
#main-header *,
#main-header *::before,
#main-header *::after {
  transition: none !important;
  animation: none !important;
}

/* Keep the 40px item rhythm while wrapped lines use the paragraph leading. */
#post-312 .et_pb_text ul li {
  line-height: 23.8px;
  padding-top: calc((2.5em - 1lh) / 2);
  padding-bottom: calc((2.5em - 1lh) / 2);
}

/* The existing 600px rule belongs to the divider, not the whole text column.
   At 756px the tablet column first exceeds that cap by more than 4px. */
@media (min-width: 756px) {
  #post-312 :is(#angebotebuchhaltung, #angebotelohnabrechnung, #angeboteadmin) .et_pb_with_border {
    max-width: none;
    position: relative;
    border-top-color: transparent;
  }

  #post-312 :is(#angebotebuchhaltung, #angebotelohnabrechnung, #angeboteadmin) .et_pb_with_border::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: min(600px, 100%);
    border-top: 2px solid var(--refresh-accent);
    pointer-events: none;
  }
}

/* Match the two existing left-hand narrative columns on the home page. */
@media (min-width: 981px) {
  #post-318 .et_pb_text_7,
  #post-318 .et_pb_text_8 {
    max-width: calc(min(80cqw, 1080px) / 2 - 60px);
  }
}

/* Only lift tablet caps once their shortfall exceeds the 4px allowance. */
@media (min-width: 656px) and (max-width: 980px) {
  #post-318 .et_pb_text_5 { max-width: none; }
}

@media (min-width: 756px) and (max-width: 980px) {
  #post-318 .et_pb_text_4 { max-width: none; }
}

@media (min-width: 981px) {
  #top-menu > li.current-menu-item > a { color: hsl(204.183673 88.288288% 41.2%); }
}
