/* Shared presentation for the structure catalogue and all unit pages. */
.hb-structure, .inner-page-section.structure-detail {
  --hb-ink: #183b50;
  --hb-muted: #526876;
  --hb-accent: #087f76;
  --hb-border: #d7e5e7;
  background: #f5f8f8;
  padding: 44px 0 72px;
  min-height: 60vh;
}
.hb-structure .page-content-wrap, .structure-detail .page-content-wrap { padding-inline: 24px; }
.hb-page-heading { max-width: 920px; margin-bottom: 32px; }
.hb-page-heading .hb-eyebrow { margin: 0 0 12px; color: var(--hb-accent); font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hb-structure .hb-page-heading h1, .structure-detail .hb-page-heading h1 {
  font-size: clamp(28px, 3.5vw, 42px); line-height: 1.15; color: var(--hb-ink);
  border: 0; margin: 0 0 18px; padding: 0; text-wrap: balance;
}
.hb-page-heading .hb-page-intro { color: var(--hb-muted); font-size: 19px; line-height: 1.55; max-width: 760px; margin: 0; }
.hb-back-link { display: inline-flex; gap: 10px; align-items: center; color: var(--hb-accent); margin-bottom: 22px; font-size: 16px; }
.hb-section-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 32px; border-bottom: 1px solid var(--hb-border); }
.hb-section-nav a { display: inline-flex; min-height: 42px; align-items: center; padding: 8px 16px; border: 1px solid var(--hb-border); background: #fff; border-radius: 6px; color: var(--hb-ink); font-size: 16px; }
.hb-section-nav a:hover { background: #e6f3f0; border-color: var(--hb-accent); text-decoration: none; }
.hb-unit-group { margin-top: 38px; scroll-margin-top: 24px; }
.hb-group-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.hb-group-heading h2 { color: var(--hb-ink); font-size: 25px; line-height: 1.25; }
.hb-group-heading > span { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; background: #e2eeed; border-radius: 50%; color: #40615f; font-size: 14px; }
.hb-units-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.hb-unit-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--hb-border); border-radius: 10px; color: var(--hb-ink); transition: border-color .18s, box-shadow .18s, transform .18s; }
.hb-unit-card:hover { color: var(--hb-ink); border-color: #77ada6; box-shadow: 0 8px 22px #193d5010; transform: translateY(-2px); text-decoration: none; }
.hb-unit-card__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 8px; background: #e9f4f0; color: var(--hb-accent); margin: 24px 24px 0; }
.hb-unit-card__image { width: 100%; height: 180px; object-fit: cover; }
.hb-unit-card__body { padding: 20px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.hb-unit-card__body h3 { font-size: 23px; line-height: 1.3; margin: 0 0 14px; overflow-wrap: anywhere; }
.hb-unit-card__body p { margin: 0 0 18px; font-size: 17px; line-height: 1.55; color: var(--hb-muted); }
.hb-unit-card__more { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: auto; padding-top: 18px; color: var(--hb-accent); font-size: 16px; font-weight: 700; }
.hb-unit-card__more > span { font-size: 23px; }
.hb-people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0 30px; }
.hb-person { display: flex; align-items: flex-start; gap: 20px; min-width: 0; padding: 24px; background: #fff; border: 1px solid var(--hb-border); border-radius: 10px; }
.hb-person--featured { border-top: 3px solid var(--hb-accent); padding-top: 22px; }
.hb-person__photo { width: 112px; height: 140px; flex-shrink: 0; object-fit: cover; object-position: top; border-radius: 6px; background: #e8eeee; }
.hb-person__body { min-width: 0; flex: 1; }
.structure-detail .hb-person__role { color: var(--hb-accent); font-size: 15px; line-height: 1.4; margin: 0 0 10px; }
.structure-detail .hb-person__name { font-size: 22px; line-height: 1.25; color: var(--hb-ink); margin: 0; overflow-wrap: anywhere; }
.structure-detail .hb-person__description { white-space: pre-line; color: var(--hb-muted); font-size: 16px; line-height: 1.6; margin: 12px 0 0; overflow-wrap: anywhere; }
.structure-detail .hb-person__links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 0; }
.structure-detail .hb-person__links li { margin: 0; padding: 0; }
.hb-person__links a { display: inline-flex; padding: 7px 10px; min-height: 36px; align-items: center; background: #eff5f7; color: #285c78; border: 1px solid #deebef; border-radius: 5px; font-size: 14px; overflow-wrap: anywhere; }
.hb-person__links a:hover { background: #e1eeed; color: var(--hb-accent); }
.lib-sidebar .hb-people-grid, .dept-right .hb-people-grid { grid-template-columns: minmax(0,1fr); }
.structure-detail .dept-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 24px; padding: 0 0 16px; border-bottom: 1px solid var(--hb-border); background: transparent; }
.structure-detail .dept-tab { padding: 11px 18px; font: inherit; font-size: 17px; line-height: 1.3; border: 1px solid var(--hb-border); border-radius: 6px; color: var(--hb-ink); background: #fff; cursor: pointer; }
.structure-detail .dept-tab.active, .structure-detail .dept-tab[aria-selected="true"] { background: var(--hb-accent); color: #fff; border-color: var(--hb-accent); }
.structure-detail .dept-tab-content { padding: 0; min-width: 0; }
.structure-detail .dept-tab-content[hidden] { display: none; }
.structure-detail .section-title { font-size: 24px; color: var(--hb-ink); margin: 24px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--hb-border); }
.structure-detail p, .structure-detail li, .structure-detail td { font-size: 17px; line-height: 1.65; }
.structure-detail .pub-list li { overflow-wrap: anywhere; }
.structure-detail .table-wrap { overflow-x: auto; }
.structure-detail .station-card { border-radius: 10px; border-color: var(--hb-border); }
.structure-detail .station-header { background: #e7f1ef; color: var(--hb-ink); }
.structure-detail .station-header h2 { color: var(--hb-ink); font-size: 24px; }
.structure-detail .station-header .station-meta { color: var(--hb-muted); }
.hb-unit-body { line-height: 1.7; margin: 28px 0; overflow-wrap: anywhere; }
.hb-unit-body ul, .hb-unit-body ol { padding-left: 24px; }
.hb-unit-body h2, .hb-unit-body h3 { margin: 24px 0 12px; }
.hb-structure a:focus-visible, .structure-detail a:focus-visible, .structure-detail button:focus-visible { outline: 3px solid #15766f; outline-offset: 4px; }
@media (max-width: 1000px) {
  .hb-units-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hb-people-grid--leadership { grid-template-columns: minmax(0,1fr); }
  .hb-person { gap: 14px; padding: 18px; }
  .hb-person__photo { width: 90px; height: 116px; }
}
@media (max-width: 680px) {
  .hb-structure, .inner-page-section.structure-detail { padding: 28px 0 44px; }
  .hb-structure .page-content-wrap, .structure-detail .page-content-wrap { padding-inline: 16px; }
  .hb-units-grid, .hb-people-grid { grid-template-columns: minmax(0,1fr); }
  .hb-page-heading { margin-bottom: 24px; }
  .hb-page-heading .hb-page-intro { font-size: 17px; }
  .hb-group-heading h2 { font-size: 23px; }
  .hb-section-nav { gap: 6px; padding-bottom: 24px; }
  .hb-section-nav a { font-size: 15px; padding: 8px 12px; }
  .hb-unit-card__body h3 { font-size: 23px; }
  .structure-detail .dept-tabs { gap: 6px; }
  .structure-detail .dept-tab { padding: 10px 12px; font-size: 16px; }
  .structure-detail .lib-layout, .structure-detail .dept-top { display: flex; flex-direction: column; }
  .structure-detail .lib-sidebar, .structure-detail .dept-right, .structure-detail .dept-photo { width: 100%; flex: auto; min-width: 0; }
  .structure-detail .stations-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 380px) {
  .hb-person { flex-direction: column; }
  .hb-person__photo { width: 90px; height: 112px; }
}
@media (prefers-reduced-motion: reduce) { .hb-unit-card { transition: none; } .hb-unit-card:hover { transform: none; } }
.hb-person__details { margin-top: 18px; overflow-wrap: anywhere; }
.hb-person__details summary { color: var(--hb-accent); cursor: pointer; font-weight: 600; }
.hb-person__details[open] summary { margin-bottom: 12px; }
.hb-unit-body { overflow-wrap: anywhere; min-width: 0; }
.hb-unit-body img { max-width: 100%; height: auto; }
.hb-unit-body table { max-width: 100%; }
.hb-gallery { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: 24px; }
.hb-gallery figure { margin: 0; }
.hb-gallery img { display: block; width: 100%; height: 240px; object-fit: cover; border-radius: 8px; }
.hb-gallery figcaption { padding-top: 10px; color: var(--hb-muted); }
.hb-gallery-section { margin-top: 36px; }

/* One illustration layout for imported content and galleries from the editor. */
.structure-detail .photos-grid,
.structure-detail .hb-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  margin: 24px 0 32px;
}
.structure-detail .photos-grid figure,
.structure-detail .hb-gallery figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--hb-border);
  border-radius: 10px;
  background: #fff;
}
.structure-detail .photos-grid figure > a,
.structure-detail .hb-gallery figure > a { display: block; }
.structure-detail .photos-grid img,
.structure-detail .hb-gallery img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 250px;
  padding: 12px;
  margin: 0;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: #edf3f4;
  transform: none;
  transition: none;
  cursor: zoom-in;
}
.structure-detail .photos-grid img:hover { transform: none; }
.structure-detail .photos-grid figcaption,
.structure-detail .hb-gallery figcaption {
  margin: 0;
  padding: 16px 18px 20px;
  color: var(--hb-ink);
  font-size: 16px;
  font-style: normal;
  line-height: 1.55;
  text-align: left;
  overflow-wrap: anywhere;
}
.structure-detail .photos-grid figure > a:focus-visible,
.structure-detail .hb-gallery figure > a:focus-visible {
  outline: 3px solid var(--hb-accent);
  outline-offset: -3px;
}
@media (max-width: 1000px) {
  .structure-detail .photos-grid,
  .structure-detail .hb-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 600px) {
  .structure-detail .photos-grid,
  .structure-detail .hb-gallery { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .structure-detail .photos-grid img,
  .structure-detail .hb-gallery img { height: 260px; }
}
