/* Desktop keeps its authored line breaks and media placement. */
.mobile-intro-break-space { display: none; }
.program-comparison-mobile { display: none; }

@layer utilities {
  @media (max-width: 767px) {
    /* Preserve the managed image and alt text while presenting it as a backdrop. */
    .site-main .mobile-photo-hero.mobile-photo-hero {
      position: relative;
      isolation: isolate;
      overflow: hidden;
    }
    .site-main .mobile-photo-hero.mobile-photo-hero > .mobile-photo-hero-image {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100% !important;
      max-height: none;
      aspect-ratio: auto !important;
      object-fit: cover;
      border-radius: 0 !important;
      margin: 0;
      z-index: -2;
    }
    .site-main .mobile-photo-hero.mobile-photo-hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(110deg,rgba(10,24,44,.88),rgba(10,24,44,.74));
      z-index: -1;
      pointer-events: none;
    }
    .site-main .mobile-photo-hero.mobile-photo-hero > :is(div,header) {
      background: transparent !important;
    }
    .site-main .mobile-photo-hero.mobile-photo-hero :is(h1,p) {
      color: #fff !important;
    }
    .site-main .mobile-photo-hero.mobile-photo-hero a {
      color: var(--site-ink) !important;
      background: #fff !important;
      border-color: #fff !important;
    }
    /* The bottom full menu replaces category navigation; course tabs remain. */
    .section-navigation { display: none !important; }
    .site-main .mobile-intro-line-break { display: none; }
    .site-main .mobile-intro-break-space { display: inline !important; }
    .site-main :is(.page-title-section,.education-hero,.career-hero,.program-category-hero,
      .family-hero,.special-hero,.online-hero,.outreach-hero,.regular-hero-layout,
      .journey-hero,.books-screen-head,.terms-header)
      :is(.presentation-kicker,.education-label,.career-label,.regular-course-detail-label,
      .regular-eyebrow,.regular-hero-eyebrow,.daily-landing-kicker,.daily-label,.special-eyebrow,
      .online-eyebrow,.outreach-eyebrow,.journey-label,.books-eyebrow,.flow-kicker,
      .reservation-kicker,.reservation-eyebrow,.detail-kicker,.terms-category) {
      margin-bottom: 8px !important;
    }
    .site-main .branch-directory-heading h1,
    .site-main :is(.faq-page > .career-hero, .education-page > .education-hero) h1:first-child,
    .site-main .page-title-section :is(div,header):has(> h1):not(:has(> :is(.presentation-kicker,.flow-kicker,.detail-kicker,.reservation-eyebrow))) > h1 {
      margin-top: 28px !important;
    }
    .site-main :is(.education-hero,.career-hero,.page-title-section) h1 + p,
    .site-main :is(.online-lead,.outreach-lead,.special-lead,.family-hero-description,
      .daily-landing-lead,.regular-lead,.regular-hero-description,.journey-lead,.home-brand-hero-description) {
      margin-top: 12px !important;
      margin-bottom: 0 !important;
      font-size: 1rem !important;
      line-height: 1.75 !important;
    }
    .site-main :is(.regular-hero-layout,.family-hero,.online-hero,.special-hero,.outreach-hero,.daily-landing-hero) {
      gap: 0 !important;
    }
    .site-main :is(.online-visual,.special-orbit,.daily-landing-art,.astronomy-hero-placeholder,.outreach-hero-placeholder) {
      display: none !important;
    }
    .site-main :is(.online-actions,.outreach-actions,.special-actions,.career-hero .career-actions,
      .daily-landing-actions,.home-brand-hero-actions) { margin-top: 16px !important; }
    .site-main .family-hero .regular-button { margin-top: 16px !important; }
    .site-main .page-title-section :is(.flow-back-link,.detail-back-link) { margin-top: 16px !important; }
    .site-main .home-brand-hero-eyebrow { margin-bottom: 8px !important; }
    .site-main .home-brand-hero-image { height: 220px !important; }
    .site-main .regular-hero { gap: 12px !important; }
    .site-main .regular-course-detail-hero-content .list-title { margin-bottom: 8px !important; }
    .site-main .regular-course-detail-hero-content .list-detail { line-height: 1.75 !important; }

    .site-main :is(.regular-summary,.online-facts,.outreach-facts,.special-facts) { padding-block: 16px !important; }
    .site-main :is(.regular-summary-grid,.online-facts .online-grid,.outreach-facts .outreach-grid,.special-fact-grid,
      .daily-landing-facts,.family-facts,.first-experiences) {
      display: grid !important;
      grid-template-columns: repeat(2,minmax(0,1fr)) !important;
      gap: 0 16px !important;
    }
    .site-main :is(.daily-landing-facts,.family-facts,.first-experiences) { padding-block: 16px !important; }
    .site-main :is(.regular-summary-grid,.online-facts .online-grid,.outreach-facts .outreach-grid,.special-fact-grid,
      .daily-landing-facts,.family-facts,.first-experiences) > div {
      min-width: 0;
      padding: 12px 0 !important;
      border: 0 !important;
      text-align: left;
    }
    .site-main :is(.online-facts,.outreach-facts,.special-facts,.daily-landing-facts,.family-facts,.first-experiences) strong {
      font-size: 1.125rem !important;
      line-height: 1.4 !important;
    }
    .site-main :is(.online-facts,.outreach-facts,.special-facts,.daily-landing-facts,.family-facts,.first-experiences) p,
    .site-main :is(.family-facts dd,.special-fact-grid > div,.first-experiences > div) > span {
      margin-top: 8px !important;
      font-size: .875rem !important;
      line-height: 1.65 !important;
    }
    .site-main .family-facts dt { margin-bottom: 8px; }
    .site-main .family-facts dd strong { margin-bottom: 0; }
    .site-main .first-experiences > div { gap: 0; }
    .site-main .regular-summary-grid dd { font-size: 1.125rem !important; line-height: 1.4 !important; }
    .site-main .regular-summary-grid dd span { font-size: .875rem !important; line-height: 1.65 !important; }
    .site-main .regular-summary-note { margin-top: 12px !important; font-size: .875rem !important; line-height: 1.65 !important; }
    .site-main :is(.first-experiences,.regular-summary-grid,.online-facts .online-grid,
      .outreach-facts .outreach-grid,.special-fact-grid,.daily-landing-facts,.family-facts):has(> div:nth-child(3)):not(:has(> div:nth-child(4))) {
      grid-template-columns: repeat(3,minmax(0,1fr)) !important;
      gap: 0 12px !important;
    }
    .site-main :is(.first-experiences,.regular-summary-grid,.online-facts .online-grid,
      .outreach-facts .outreach-grid,.special-fact-grid,.daily-landing-facts,.family-facts):not(:has(> div:nth-child(2))) {
      grid-template-columns: minmax(0,1fr) !important;
    }
    .site-main .regular-course-detail .regular-detail-observation-info > .flex {
      grid-template-columns: repeat(2,minmax(0,1fr)) !important;
      gap: 12px !important;
    }
    .site-main .regular-course-detail .regular-observation > .absolute { padding: 8px !important; }
    .site-main .regular-course-detail .observation-title { font-size: .875rem !important; line-height: 1.4 !important; }

    .site-main .mobile-intro-media {
      width: min(100% - 40px,1150px);
      margin: 20px auto;
      border: 1px solid var(--site-line);
      border-radius: 12px;
      background: #fff;
      color: var(--site-ink);
      overflow: hidden;
    }
    .mobile-intro-media-body { padding: 0 16px 16px; }
    .site-main .mobile-intro-media :is(.regular-hero-media,.video-container,img) { width: 100%; max-width: 100%; margin: 0; }
    .site-main .mobile-intro-media--visible { width: calc(100% - 48px); border: 0; background: transparent; }
    .mobile-intro-media--visible .mobile-intro-media-body { padding: 0; }
  }
}

@media (max-width: 767px) {
    .site-main .program-comparison-desktop,
    .site-main .special-comparison-hint { display: none !important; }
    .site-main .program-comparison-mobile { display: table !important; width: 100%; min-width: 0; margin-top: 24px; table-layout: fixed; border-collapse: collapse; font-size: .875rem; line-height: 1.65; }
    .site-main .program-comparison-mobile :is(th,td) { padding: 12px 8px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
    .site-main .program-comparison-mobile thead { color: #fff; background: var(--site-ink); }
    .site-main .program-comparison-mobile th { color: inherit; font-weight: 700; }
    .site-main .program-comparison-mobile td { color: var(--site-muted); border-bottom: 1px solid var(--site-line); }
    .site-main .program-comparison-mobile td + td { border-left: 1px solid var(--site-line); }
    .site-main .program-comparison-mobile td p { margin: 0; font-size: inherit !important; line-height: inherit !important; }
    .site-main .program-comparison-mobile td p + p { margin-top: 12px; }
    .site-main .program-comparison-mobile-label th { padding: 10px 8px; text-align: center; background: var(--site-tint); border-block: 1px solid var(--site-line); color: var(--site-ink); font-size: 1rem; }
}

/* Program comparisons read as full-width summaries on narrow screens. */
@layer utilities {
  .site-main .program-comparison-cards { display: grid; gap: 16px; margin-top: 24px; }
  .site-main .program-comparison-cards > article { min-width: 0; padding: 20px; border: 1px solid var(--site-line); border-radius: 12px; background: #fff; }
  .site-main .program-comparison-cards h3 { margin: 0 0 16px; color: var(--site-ink); font-size: 1.25rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
  .site-main .program-comparison-cards dl > div + div { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--site-line); }
  .site-main .program-comparison-cards dt { margin-bottom: 6px; color: var(--site-accent); font-size: .875rem; font-weight: 700; }
  .site-main .program-comparison-cards dd { margin: 0; color: var(--site-body); font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere; }
  .site-main .program-comparison-cards dd p { font-size: inherit; line-height: inherit; }
  .site-main .program-comparison-cards dd p + p { margin-top: 12px; }
  .site-main .daily-comparison-mobile[hidden] { display: none !important; }
  @media (min-width: 768px) {
    .site-main .program-comparison-cards { display: none; }
  }
}
