/* Pass 80: final shared presentation and viewport reconciliation. */
:root {
  --museum-panel: linear-gradient(180deg, rgba(7, 29, 36, .93), rgba(2, 12, 18, .97));
  --museum-line: rgba(216, 174, 91, .4);
}

.site-header {
  min-height: 70px;
  height: 70px;
  padding-inline: clamp(16px, 2.4vw, 40px);
}
.brand { font-size: clamp(1.15rem, 1.65vw, 1.75rem); }
.main-nav { gap: clamp(8px, 1.15vw, 20px); }
.main-nav a { font-size: clamp(.65rem, .72vw, .78rem); }

.story-main,
.story-page,
.dossier-main,
.station-main,
.marker-main,
.archive-wrap,
.film-page,
.ra {
  color: rgba(229, 226, 210, .9);
  font-weight: 400;
}

:is(.story-main,.story-page,.dossier-main,.station-main,.marker-main,.archive-wrap,.film-page,.ra) :is(h1,h2,h3),
.exhibit-section :is(h2,h3) {
  font-family: var(--deco);
  font-weight: 400;
  letter-spacing: .035em;
  text-wrap: balance;
}

:is(.story-main,.story-page,.dossier-main,.station-main,.marker-main,.archive-wrap,.film-page,.ra) p,
.exhibit-section p {
  font-weight: 400;
  line-height: 1.62;
  text-wrap: pretty;
}

:is(.publication-record,.doc-card,.source-card,.research-card,.film-card,.fp-card,.ra-card,.knowledge-card,.research-visual-card) {
  min-width: 0;
  border: 1px solid var(--museum-line) !important;
  border-radius: 0 !important;
  background: var(--museum-panel) !important;
  box-shadow: inset 0 0 0 1px rgba(242, 207, 133, .035), 0 14px 34px rgba(0, 0, 0, .18);
  overflow: hidden;
}

:is(.doc-card,.source-card,.research-card,.research-visual-card) img,
.scan-card img,
.source-preview {
  background: #020b10 !important;
}

.doc-card > img,
.source-card.visual-record img,
.research-visual-card > img,
.research-image-link img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto !important;
  object-fit: cover !important;
  object-position: top center;
}

.archive-grid,
.film-grid,
.fp-grid,
.ra-grid {
  align-items: stretch;
}

.film-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
}
.film-grid > .film-card { min-width: 0; height: auto; }
.film-card .film-player { aspect-ratio: 16 / 9; padding: 5px; }
.film-card .film-copy { padding: 16px; }
.film-card .film-copy h3 { margin-block: 7px; font-size: clamp(1rem, 1.5vw, 1.3rem); }
.film-card .film-copy p { font-size: .87rem; line-height: 1.48; }
.film-card .film-rights { display: none; }

.rights-footer.rights-footer-minimal {
  clear: both;
  position: relative;
  z-index: 4;
}

@media (max-width: 860px) {
  .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hero-shell {
    box-sizing: border-box;
    min-height: calc(100svh - 70px) !important;
    height: calc(100svh - 70px);
    padding: 7px !important;
    overflow: hidden;
  }
  .hero-frame {
    box-sizing: border-box;
    min-height: 0 !important;
    height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: center;
    gap: 7px;
    padding: clamp(17px, 3.2svh, 28px) 14px 13px !important;
  }
  .hero-copy { transform: none; }
  .date-rule { margin-bottom: 7px; }
  .title-great { font-size: clamp(2.35rem, min(12.5vw, 7.7svh), 4.15rem); }
  .title-miami { margin-block: 0 2px; font-size: clamp(2.35rem, min(12vw, 7.5svh), 4.05rem); }
  .title-hurricane { font-size: clamp(2rem, min(10.5vw, 6.6svh), 3.55rem); }
  .deco-divider {
    grid-template-columns: 1fr 52px 1fr;
    width: min(78%, 420px);
    margin-block: 7px 5px;
  }
  .divider-storm { width: 52px; height: 39px; }
  .subline { font-size: clamp(.57rem, 2.2vw, .72rem); }
  .hero-art-wrap { width: min(67vw, 34svh, 360px) !important; }
  .corner { width: 38px; height: 38px; }

  /* The countdown has no 70px site header, so it receives the full viewport. */
  .countdown-shell {
    min-height: 100svh !important;
    height: 100svh !important;
    padding: 7px !important;
  }
  .countdown-shell .hero-frame {
    min-height: 0 !important;
    height: 100% !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: clamp(14px, 2.4svh, 22px) 13px 11px !important;
  }
  .countdown-shell .hero-art-wrap { width: min(58vw, 27svh, 280px) !important; }
  .countdown-shell .launch-panel { margin-top: 4px; padding-block: 11px 9px; }
}

@media (max-width: 560px) {
  .brand { font-size: 1.03rem; }
  .brand-with-emblem.brand-emblem-visible::before { width: 28px; height: 28px; flex-basis: 28px; }
  :is(.story-main,.story-page,.dossier-main,.station-main,.marker-main,.archive-wrap,.film-page,.ra) {
    overflow-wrap: anywhere;
  }
  .film-grid { grid-template-columns: 1fr !important; }
}

@media (max-height: 650px) and (min-width: 861px) {
  .hero-shell { height: calc(100svh - 70px); min-height: 0; padding-block: 8px; }
  .hero-frame { height: 100%; min-height: 0; padding-block: 18px; }
  .hero-art-wrap { width: min(37vw, 65svh, 455px); }
  .date-rule { margin-bottom: 10px; }
  .deco-divider { margin-block: 12px 7px; }
  .countdown-shell { height: 100svh; min-height: 100svh; }
  .countdown-shell .hero-frame { height: calc(100svh - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-with-emblem::before { transition: none; }
}
/* Keep locally preserved directory/document excerpts inside their content
   column even on pages that do not load the older document-room stylesheet. */
.document-spread {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  margin: 2rem 0;
}

/* Pass 82 launch-gate layout corrections. */
.museum-jumpbar { display: none !important; }
.marker-home-collage {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr;
  grid-template-rows: 238px 74px; gap: 7px; margin: 17px 0;
}
.marker-home-collage img { width: 100%; height: 100%; object-fit: cover; background: #020b10; }
.marker-home-collage img:nth-child(3) { grid-column: 1 / -1; object-fit: contain; padding: 7px; box-sizing: border-box; }
.marker-home-facts { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 18px; background: rgba(216,174,91,.3); }
.marker-home-facts span { padding: 10px 7px; background: #061820; color: #b8cbc7; font-size: .68rem; letter-spacing: .05em; text-align: center; text-transform: uppercase; }
.marker-home-facts strong { display: block; color: #f0ca7a; font: 400 1.25rem/1.1 var(--deco); }
.um-hurricane-grid { grid-template-columns: minmax(0,1fr) minmax(420px,.95fr) !important; align-items: stretch !important; }
.um-hurricane-media { display: grid !important; grid-template-columns: 1fr 1fr; gap: 14px !important; align-content: start; }
.um-video-card,.um-image-card { padding: 8px !important; }
.um-video-frame { aspect-ratio: 4 / 5 !important; max-height: 410px !important; }
.um-image-card img { height: 330px !important; object-fit: cover !important; }
.podcast-section { grid-template-columns: minmax(240px,.78fr) minmax(0,1.22fr); padding: clamp(22px,3vw,38px); }
.podcast-consent { display: grid; place-items: center; gap: 5px; width: 100%; min-height: 150px; border: 0; background: radial-gradient(circle at 50% 30%,#153944,#04151c 68%); color: #f3d18b; cursor: pointer; }
.podcast-consent .podcast-play { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(242,202,120,.7); border-radius: 50%; padding-left: 3px; }
.podcast-consent strong { font: 400 1rem/1.2 var(--deco); letter-spacing: .06em; text-transform: uppercase; }
.podcast-consent small { color: #a9bfba; font: .7rem/1.2 var(--nav); }
.embedded-film-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
.embedded-film-grid .media-card { height: auto !important; }
.film-page .film-intro,.film-page .film-group,.film-page .archive-subhead { max-width: 1500px; margin-inline: auto; }
.marker-press-headline { align-items: stretch !important; }
.marker-press-headline .marker-enlarge { display: grid; place-items: center; min-height: 250px; padding: 18px; }
.marker-press-headline .marker-enlarge img { width: 100%; max-height: none; object-fit: contain; }
.marker-article-reader { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(260px,.65fr); min-height: 640px; border: 1px solid var(--museum-line); background: #020d12; }
.marker-article-reader iframe { display: block; width: 100%; height: 640px; border: 0; background: #19252a; }
.marker-article-copy { align-self: center; padding: clamp(22px,3vw,38px); }
.marker-article-copy h3 { color: #f0cc83; font-size: clamp(1.4rem,2.4vw,2.1rem); }
.marker-article-copy a { display: block; width: fit-content; margin-top: 13px; }
@media(max-width:980px){
  .um-hurricane-grid { grid-template-columns: 1fr !important; }
  .embedded-film-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}
@media(max-width:620px){
  .marker-home-collage { grid-template-rows: 190px 64px; }
  .um-hurricane-media,.embedded-film-grid { grid-template-columns: 1fr !important; }
  .podcast-section { grid-template-columns: 1fr; }
  .marker-article-reader { grid-template-columns: 1fr; min-height: 0; }
  .marker-article-reader iframe { height: 72svh; }
}
.document-spread figure { min-width: 0; margin: 0; }
.document-spread a,
.document-spread img { display: block; max-width: 100%; }
.document-spread img { width: 100%; height: auto; }
@media (max-width: 720px) {
  .document-spread { grid-template-columns: 1fr; }
}

/* Pass 81 correction: compact cards, readable atlas labels, and a viewer
   that always begins below the persistent navigation bar. */
.atlas-place-label span {
  color: #f5d68f !important;
  -webkit-text-stroke: 2px #020405 !important;
  paint-order: stroke fill !important;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
               1px 1px 0 #000, 0 2px 5px #000 !important;
}

.exhibit-modal.source-viewer {
  inset: 74px 0 0 !important;
  height: calc(100dvh - 74px) !important;
  padding: 10px !important;
  z-index: 5000 !important;
}
.source-viewer .modal-panel.source-viewer-panel {
  height: calc(100dvh - 94px) !important;
  max-height: calc(100dvh - 94px) !important;
}

.weather-source-rail {
  display: grid !important;
  gap: 14px !important;
}
.balanced-media-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
}
.weather-source-rail .source-card {
  min-height: 0 !important;
  aspect-ratio: 4 / 3;
}
.weather-source-rail .source-card img {
  height: 100% !important;
  object-fit: cover !important;
}

.research-interpretations .research-visual-card:last-child:nth-child(3n+1) {
  grid-column: auto !important;
  display: flex !important;
  grid-template-columns: none !important;
}
.research-interpretations .research-visual-card:last-child:nth-child(3n+1) > img {
  grid-row: auto !important;
  height: 210px !important;
  min-height: 0 !important;
  margin: 0 0 14px !important;
}
.research-interpretations { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }

.dossier-evidence-gallery:not(.recovery-evidence) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.compact-credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  max-width: 760px;
  padding: 12px 15px !important;
  font-size: .82rem;
}
.compact-credit :is(p,a) { margin: 0 !important; }
.compact-credit .section-kicker { flex-basis: 100%; font-size: .62rem; }
.compact-credit .source-button { padding: 7px 10px !important; }

.enlarge-image {
  width: fit-content;
  max-width: calc(100% - 12px);
  margin: 8px 6px 14px !important;
  white-space: normal;
}
.wind-source-card { width: min(100%, 640px); margin-inline: auto; }

/* Pass 85: restore the established compact card language and remove late-pass
   layout regressions without changing the exhibit's visual identity. */
.lobby-preview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: clamp(190px, 19vw, 270px) !important;
}
.lobby-preview-card,
.lobby-preview-card.lobby-preview-wide { grid-column: auto !important; }

.marker-home-collage {
  grid-template-rows: 300px !important;
}
.marker-home-collage img { object-position: center; }

.rose-history {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 28px;
}
.rose-history > h3 { grid-column: 1 / -1; }
.rose-history > p { margin: 0; }
.rose-history > p:last-child { grid-column: 1 / -1; }
.rose-history .source-thumb {
  padding: 9px 12px;
  border: 1px solid rgba(241,202,120,.5);
  background: #0b232b;
  color: #efd18d;
  font: 600 .78rem/1.3 var(--nav);
  letter-spacing: .04em;
  cursor: pointer;
}

.um-hurricane-grid { grid-template-columns: minmax(0,1.05fr) minmax(420px,.95fr) !important; }
.um-hurricane-media { grid-template-columns: 1fr 1fr !important; align-items: stretch; }
.um-video-card,.um-image-card { min-width: 0; display: flex; flex-direction: column; }
.um-video-frame,.um-image-card img {
  width: 100% !important;
  height: 350px !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #02090d;
}
.um-video-frame img { object-fit: contain !important; }

.embedded-film-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
.embedded-film-grid > * { grid-column: auto !important; }
.embedded-film-grid .video-consent span,
.embedded-film-grid .video-consent small {
  left: 14px !important;
  right: 14px !important;
  width: auto !important;
  max-width: none !important;
  transform: none !important;
  text-align: left;
  overflow: visible;
  white-space: normal !important;
}
.embedded-film-grid .video-consent span { top: auto !important; bottom: 40px !important; }
.embedded-film-grid .video-consent small { bottom: 10px !important; }

.film-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }

.research-interpretations .research-visual-card:last-child:nth-child(3n+1) {
  grid-column: auto !important;
  display: flex !important;
}
.research-interpretations .research-visual-card:last-child:nth-child(3n+1) > img {
  height: 210px !important;
  min-height: 0 !important;
  margin: 0 0 14px !important;
}

.survey-frame .enlarge-image { display: none !important; }

.curator-card { display: flex; flex-direction: column; min-height: 0 !important; }
.curator-card img {
  height: 250px !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #020b10;
}

@media (max-width: 980px) {
  .lobby-preview-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .rose-history { grid-template-columns: 1fr 1fr; }
  .um-hurricane-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 620px) {
  .lobby-preview-grid { grid-auto-rows: min(48vw,210px) !important; gap: 7px !important; }
  .rose-history { grid-template-columns: 1fr; }
  .rose-history > h3,.rose-history > p:last-child { grid-column: auto; }
  .um-hurricane-media,.embedded-film-grid,.film-grid { grid-template-columns: 1fr !important; }
  .research-interpretations { grid-template-columns: 1fr !important; }
  .um-video-frame,.um-image-card img { height: min(72vw,360px) !important; }
}

@media (max-width: 900px) {
  .weather-source-rail.balanced-media-grid { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
}
@media (max-width: 760px) {
  .exhibit-modal.source-viewer {
    inset: 70px 0 0 !important;
    height: calc(100dvh - 70px) !important;
    padding: 0 !important;
  }
  .source-viewer .modal-panel.source-viewer-panel {
    height: calc(100dvh - 70px) !important;
    max-height: calc(100dvh - 70px) !important;
  }
  .weather-source-rail.balanced-media-grid {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-template-columns: none !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-columns: minmax(170px, 44vw) !important;
    overflow-x: auto !important;
  }
  .weather-source-rail.balanced-media-grid > * { grid-column: auto !important; }
  .dossier-evidence-gallery:not(.recovery-evidence) {
    display: grid;
    grid-template-columns: none;
  }
}
