/* Shared reduction pass: keep live functionality while removing low-value blocks. */

/* Keep secondary-page hero imagery framed like the homepage. The previous
   300px height made the same cover image appear tightly cropped. */
.page-hero {
  min-height: clamp(340px, 48vw, 440px);
  background-position: center 58%;
}

/* Compact navigation */
.nav-more { position: relative; }
.nav-more > summary { list-style: none; cursor: pointer; padding: .65rem .8rem; font-weight: 800; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: ' ▾'; font-size: .72em; }
.nav-more-menu { position: absolute; z-index: 20; right: 0; top: calc(100% + 6px); display: grid; min-width: 170px; padding: 8px; border: 1px solid rgba(16,35,27,.12); border-radius: 14px; background: #fff; box-shadow: 0 16px 36px rgba(16,35,27,.14); }
.nav-more:not([open]) .nav-more-menu { display: none; }
.nav-more-menu a { white-space: nowrap; }

/* River levels */
body:has(.station-grid) #station-count,
body:has(.station-grid) #river-threshold-guide,
body:has(.station-grid) .page-hero .jump-links,
.station-card .reading-list > div:first-child,
.chart-summary-grid .chart-summary-card:nth-child(5) { display: none !important; }
body:has(.station-grid) .station-card { padding: 16px; }
body:has(.station-grid) .station-card .station-river,
body:has(.station-grid) .station-card > p:not(.station-river) { margin-bottom: 4px; }
body:has(.station-grid) .chart-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Weather */
body:has([data-weather-checked]) .page-hero .jump-links,
body:has([data-weather-checked]) .page-hero .actions,
body:has([data-weather-checked]) .weather-note-list,
body:has([data-weather-checked]) .weather-grid .weather-card:nth-child(2) { display: none !important; }
body:has([data-weather-checked]) .weather-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body:has([data-weather-checked]) #fishing-weather-read { border: 0; box-shadow: none; background: transparent; padding-top: 0; }
body:has([data-weather-checked]) #fishing-weather-read .section-heading { display: none; }
body:has([data-weather-checked]) .weather-insight-grid { margin-top: 0; }
body:has([data-weather-checked]) .weather-insight-card { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 8px 2px; }

/* Storm overflows */
body:has([data-overflow-checked]) .page-hero .jump-links,
body:has([data-overflow-checked]) .overflow-summary .summary-card:nth-child(2),
body:has([data-overflow-checked]) .overflow-summary .summary-card:nth-child(3),
body:has([data-overflow-checked]) .relevance-pill,
body:has([data-overflow-checked]) .overflow-group-helper,
body:has([data-overflow-checked]) #water-quality-note .note-card:first-child,
body:has([data-overflow-checked]) #water-quality-note .note-card:last-child { display: none !important; }
body:has([data-overflow-checked]) .overflow-summary { grid-template-columns: minmax(0, 360px); }
body:has([data-overflow-checked]) #water-quality-note { padding-block: 18px; }
body:has([data-overflow-checked]) #water-quality-note .note-grid { display: block; }
body:has([data-overflow-checked]) #water-quality-note .note-card { border: 0; padding: 0; background: transparent; }

/* Catchment map */
body:has(#river-map) .section-summary,
body:has(#river-map) .map-legend span:nth-child(4),
body:has(#river-map) .map-legend span:nth-child(5),
body:has(#river-map) label:has(input[data-map-filter="inactive"]),
body:has(#river-map) label:has(input[data-map-filter="unavailable"]) { display: none !important; }
body:has(#river-map) .page-hero { padding-bottom: 12px; }

/* Preferences */
body:has([data-preferences-form]) .preferences-grid .preference-field:nth-child(4),
body:has([data-preferences-form]) label:has(input[name="lowLight"]) { display: none !important; }

/* Reduce repeated micro-headings inside cards */
.decision-card > .eyebrow,
.weather-card > .eyebrow,
.guide-card > .eyebrow { display: none !important; }

@media (max-width: 760px) {
  .page-hero {
    min-height: 340px;
    background-position: center 58%;
  }

  .nav-more { width: 100%; }
  .nav-more-menu { position: static; margin-top: 4px; box-shadow: none; }
  body:has(.station-grid) .chart-summary-grid,
  body:has([data-weather-checked]) .weather-grid { grid-template-columns: 1fr; }
  body:has([data-weather-checked]) #hourly-weather .hourly-table-wrap { max-height: 440px; overflow: auto; }
}
