/* Shared dialog repairs. */
.brief-heading > div { flex: 1; }
.brief-heading-art { flex: 0 0 135px; width: 135px; margin: 0; }
.brief-heading-art img { display: block; width: 100%; height: auto; object-fit: contain; }
.dialog-close { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
.mobile-sector-field { display: none; }
body.sheet-locked { position: fixed; inset: var(--sheet-page-scroll) 0 auto; width: 100%; overflow: hidden; }
.navigation-dialog { width: min(480px, 100vw); max-width: 100vw; max-height: calc(var(--sheet-height, 100dvh) - 12px); margin: 0 0 0 auto; padding: 0; inset: var(--sheet-top, 0px) 0 auto auto; background: var(--deep); color: white; border-bottom: 3px solid var(--gold); overflow: auto; }
.navigation-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px 10px; }
.navigation-heading h2 { font-size: 1.6rem; }
.navigation-heading .dialog-close { border-color: #ffffff55; }
.navigation-heading .dialog-close:hover { background: #ffffff15; }
.navigation-dialog .mobile-nav { position: static; padding: 6px 24px max(24px, env(safe-area-inset-bottom)); border: 0; }
.navigation-dialog .mobile-nav a, .navigation-dialog .mobile-nav button { min-height: 60px; display: flex; align-items: center; padding: 14px 0; }
.navigation-dialog::backdrop { background: #001a2fd9; }

@media (max-width:650px), (max-width:900px) and (max-height:500px) {
  .mobile-sheet { position: fixed; inset: var(--sheet-top, 0px) 0 auto; width: calc(100% - 12px); max-width: calc(100% - 12px); height: calc(var(--sheet-height, 100dvh) - 12px); max-height: calc(var(--sheet-height, 100dvh) - 12px); margin: 6px auto; padding: 0; border-radius: 14px; overflow: hidden; }
  .mobile-sheet[open] { display: flex; flex-direction: column; }
  .mobile-sheet .sheet-header { flex: 0 0 auto; display: flex; align-items: center; gap: 16px; margin: 0; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); background: #fff; z-index: 2; }
  .mobile-sheet .sheet-header > div { flex: 1; min-width: 0; }
  .mobile-sheet .sheet-header .eyebrow { margin: 0 0 7px; font-size: .65rem; line-height: 1.5; }
  .mobile-sheet .sheet-header h2 { font-size: 1.75rem; line-height: 1.1; letter-spacing: -.035em; }
  .mobile-sheet .sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 18px max(24px, env(safe-area-inset-bottom)); scroll-padding-block: 20px; }
  .mobile-sheet .dialog-close { width: 44px; height: 44px; }
  .mobile-sheet a.text-link, .sector-brief-link, .resource-links a, .brief-resources a, .named-contact a { min-height: 44px; display: flex; align-items: center; }
  .brief-heading-art, .brief-heading .eyebrow { display: none; }
  .brief-dialog .sheet-header { padding-top: 14px; padding-bottom: 14px; }
  .brief-sheet-body > .brief-local-note { display: block; margin: 24px 0 0; font-size: .8125rem; line-height: 1.5; }

  #brief-form { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
  .brief-dialog .brief-sheet-body { padding-top: 0; }
  .brief-progress { margin: 0 0 22px; padding: 18px 0 14px; gap: 8px; flex-wrap: nowrap; font-size: .625rem; line-height: 1.5; }
  .brief-progress span { flex: 1 1 0; min-width: 0; }
  .brief-progress span:not(.active) { display: none; }
  .brief-progress { font-size: .75rem; }
  .brief-progress .cfdc-icon { width: 20px; height: 20px; }
  .brief-form-actions { flex: 0 0 auto; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px 12px; padding: 12px 18px max(12px, env(safe-area-inset-bottom)); margin: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 14px #083f6508; }
  .brief-form-actions .brief-local-note { flex-basis: 100%; font-size: .75rem; line-height: 1.4; }
  .brief-form-actions .brief-back { order: 1; min-width: 60px; min-height: 48px; text-align: left; }
  .brief-form-actions .button { order: 2; min-width: 0; flex: 1; min-height: 48px; padding: 12px; }
  .step-intro { margin-bottom: 18px; font-size: 1.05rem; }
  .form-grid { gap: 18px; }
  .form-grid input, .form-grid select, .form-grid textarea { font-size: 1rem; scroll-margin-block: 24px; }
  .form-grid label > span { margin-top: -5px; }
  .form-grid textarea { min-height: 110px; }
  .needs-grid label { min-height: 52px; }
  .industry-explorer { grid-template-columns: minmax(0, 1fr); gap: 25px; margin-top: 0; }
  .sector-tabs { display: none; }
  .mobile-sector-field { display: grid; gap: 9px; font-size: .9375rem; font-weight: 700; }
  .mobile-sector-field select { width: 100%; min-width: 0; min-height: 52px; padding: 12px 35px 12px 12px; border: 1px solid #8faabd; border-radius: 0; background: #fff; color: var(--navy); font: 400 16px/1.5 var(--sans); text-overflow: ellipsis; }
  #sector-index { margin-bottom: 14px; font-size: .7rem; }
  #sector-kicker { font-size: .67rem; margin-bottom: 12px; }
  #sector-title { font-size: 1.9rem; line-height: 1.1; }
  #sector-copy { font-size: 1.0625rem; margin: 17px 0; line-height: 1.6; }
  .sector-brief-link { margin-top: 7px; }
  .resource-questions { margin-top: 24px; padding-top: 24px; }
  .resource-questions h3 { font-size: 1.6rem; }
  .resource-questions summary { min-height: 56px; }
  .map-dialog-heading > p { margin: 0; font-size: .65rem; }
  .region-heading { margin-bottom: 22px; }
  .region-heading .eyebrow { font-size: .65rem; margin-bottom: 10px; }
  .region-heading h2 { font-size: 2rem; }
  .region-heading > p { font-size: 1rem; margin-top: 12px; }
  .region-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .map-mobile-controls { min-width: 0; }
  .region-dialog .sheet-body { padding-top: 18px; }
  .region-dialog .sheet-header h2 { flex: 1; min-width: 0; font-size: 1.6rem; }
  .region-heading[hidden], .map-dialog-heading > p[hidden] { display: none; }
  .map-mobile-insight { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; gap: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
  .map-mobile-insight .map-number { font-size: clamp(2rem, 11vw, 2.7rem); white-space: nowrap; }
  .map-mobile-insight .map-unit { display: block; margin: 7px 0 0; font-size: .59rem; line-height: 1.5; letter-spacing: 0; }
  .map-mobile-insight h3 { font-size: 1.35rem; line-height: 1.15; letter-spacing: -.025em; margin: 0; }
  .map-mobile-sources { margin-top: 22px; }
  .map-mobile-sources .map-note { padding: 0 0 12px; }
  .map-mobile-sources .map-sources { margin: 0; }

  .region-prompt { margin: 0 0 10px; font-size: .65rem; }
  .map-lenses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .map-lens { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; min-height: 64px; min-width: 0; padding: 8px 3px; font-size: .8125rem; line-height: 1.25; }
  .map-lens .cfdc-icon { width: 22px; height: 22px; }
  .map-label { padding: 12px; }
  .map-legend { padding: 12px; }
  .map-note { padding: 0 12px 12px; }
  .map-sources { margin: 0 12px 0; }
  .map-sources summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 10px 0; }
  .map-story { padding: 6px 0 22px; }
  .map-number { font-size: 3.4rem; }
  .map-unit { font-size: .65rem; }
  .map-story p { font-size: 1.0625rem; }
  .map-site-link { min-height: 48px; }
  .navigation-dialog { border-radius: 0 0 16px 16px; width: 100%; }
  .film-dialog { max-width: calc(100vw - 12px); max-height: calc(var(--sheet-height, 100dvh) - 12px); }
}

@media (max-width:900px) and (max-height:500px) {
  .mobile-sheet .sheet-header { padding-top: 10px; padding-bottom: 10px; }
  .mobile-sheet .sheet-header .eyebrow { display: none; }
  .mobile-sheet .sheet-header h2 { font-size: 1.5rem; }
  .brief-form-actions .brief-local-note { display: none; }
}

/* Stack map controls when enlarged text needs more room than the content width. */
@media (max-width:650px), (max-width:900px) and (max-height:500px) {
  .region-dialog .sheet-body { container: map-sheet / inline-size; }
  @container map-sheet (max-width:13em) {
    .map-lenses { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .map-lens { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 12px 16px; min-height: 56px; text-align: left; }
    .map-mobile-insight { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .map-mobile-insight .map-number { white-space: normal; overflow-wrap: anywhere; }
    .map-mobile-insight h3 { overflow-wrap: break-word; }
  }
}
