/* Production-only layout correction for the deliberately sparse, published-only home sections. */
.home-page .hero-portrait img { height: auto; }
.home-page .card-grid--single { grid-template-columns: minmax(0, 1fr); }
.home-page .card-grid--single .article-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  align-items: center;
}
.home-page .card-grid--single .article-card div { padding: 28px; }
.home-page .card-grid--single .article-card h3 { font-size: 30px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 20px; }

@media (max-width: 860px) {
  .home-page .card-grid--single .article-card { grid-template-columns: minmax(0, 1fr); }
  .home-page .card-grid--single .article-card div { padding: 20px; }
  .home-page .card-grid--single .article-card h3 { font-size: 25px; }
}

/* Legacy mSearch2 turns .mini-search into a full-screen panel below 1200px.
   In the new header it is an inline form, so reset only that inherited panel. */
.design-page .site-header .design-search .mini-search {
  padding: 0 !important;
  overflow: visible !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  z-index: auto !important;
}
.design-page .site-header .design-search .mini-search__button {
  position: static;
  flex: 0 0 34px;
  margin: 0;
}

/* The legacy modxMinify bundle globally applies -webkit-appearance:none to
   every input. Restore only the native, keyboard-operable radio control used
   by the isolated educational quiz; do not alter calculator text fields. */
.design-page .dtq input[type="radio"] {
  -webkit-appearance: radio;
  appearance: auto;
  box-sizing: border-box;
  inline-size: 1.1em;
  block-size: 1.1em;
  min-inline-size: 1.1em;
  min-block-size: 1.1em;
  margin: 4px 0 0;
  padding: 0;
  opacity: 1;
}

/* Template 9 places source headings inside articleBody/article, outside the
   former .article-header. Carry the article type scale into that exact path;
   direct .prose headings cover generic-page chunks without touching tools. */
.design-page .prose > h1,
.design-page .prose > h2,
.design-page .prose > h3,
.design-page .prose [itemprop="articleBody"] h1,
.design-page .prose [itemprop="articleBody"] h2,
.design-page .prose [itemprop="articleBody"] h3 {
  color: #18354D;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.035em;
}
.design-page .prose > h1,
.design-page .prose [itemprop="articleBody"] h1 {
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.08;
  margin: 0 0 28px;
}
.design-page .prose > h2,
.design-page .prose [itemprop="articleBody"] h2 {
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.12;
  margin: 42px 0 14px;
}
.design-page .prose > h3,
.design-page .prose [itemprop="articleBody"] h3 {
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.2;
  margin: 30px 0 12px;
}

/* Templates 15/16 retain historic image wrappers whose first-image rule pulls
   the picture upward with a negative margin and a decorative top pad. In the
   redesigned prose column both wrappers remain ordinary blocks; leave their
   picture/source markup and responsive image sizing intact. */
.design-page .prose .page-image-history-1,
.design-page .prose .page-image-history-2 {
  position: static;
  z-index: auto;
  margin: 36px 0;
  padding-top: 0;
  background: transparent;
  border-radius: 0;
}

/* The legacy search stylesheet makes its page H1 inline. Redesigned search
   pages use a direct prose H1, so keep its following empty-state text on a
   separate line. */
.design-page .prose > h1 {
  display: block;
}

/* At the narrow legacy breakpoint autocomplete is force-hidden even after
   mSearch2/jQuery UI writes display:block inline. Restore it only while that
   library has explicitly opened the menu; its inline display:none on close
   remains untouched. */
@media (max-width: 413px) {
  body.design-page ul.ui-menu.ui-autocomplete[style*="display: block"] {
    display: block !important;
    background-color: #fff !important;
    opacity: 1;
    max-height: min(50vh, 320px);
    overflow-y: auto;
  }
}
