/* Department exhibits inherit the store masthead and navigation. */
.topic-hero[data-habitat] {
  --hab-accent: #b4df98;
  --hab-muted: #c3d6ca;
  --hab-ink: #f6f7ed;
  display: block;
  padding: 0;
  color: var(--hab-ink);
  border-color: #577266;
  background: #112921;
}
.topic-hero[data-habitat="saltwater"] { --hab-accent: #a0e8ff; --hab-muted: #bfd4e0; background: #0c2130; border-color: #385b71; }
.topic-hero[data-habitat="terrariums"] { --hab-accent: #efce97; --hab-muted: #ddd2be; background: #26271c; border-color: #655b44; }
.topic-hero[data-habitat="pond"] { --hab-accent: #ead09b; --hab-muted: #cfd8ca; background: #212e27; border-color: #596b55; }
.hab-intro { padding: clamp(18px,2.2vw,32px) clamp(18px,3vw,40px); }
[data-habitat] h1 { font-family: Georgia,serif; font-size: clamp(34px,4.6vw,66px); line-height: 1.04; font-weight: 500; letter-spacing: -.04em; margin: 0 0 8px; color: var(--hab-ink); }
.hab-intro p,.hab-note p { margin: 0; color: var(--hab-muted); line-height: 1.55; max-width: 58ch; }
.hab-intro p { font-size: clamp(15px,1.25vw,18px); }
.hab-stage { position: relative; overflow: hidden; isolation: isolate; align-self: start; }
.hab-stage .hab-photo { display: block; width: 100%; height: auto; border: 0; border-radius: 0; }
.hab-stream-layout,.hab-pond-layout { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(260px,1fr); align-items: center; }
.hab-field,.hab-reef-copy { min-width: 0; padding: clamp(18px,2.4vw,34px); }
.hab-field > .hab-link { display: inline-block; margin-top: 20px; }
.hab-choices { display: none; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.hab-choices button,.hab-action,.hab-motion { appearance: none; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; border: 1px solid #effffb55; color: var(--hab-ink); border-radius: 6px; padding: 8px 13px; background: transparent; min-height: 42px; }
.hab-choices button[aria-pressed="true"],.hab-action { background: var(--hab-accent); border-color: var(--hab-accent); color: #102119; }
.hab-choices button:hover,.hab-action:hover,.hab-motion:hover { border-color: #fff; }
[data-habitat] :is(a,button):focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #152620; }
.hab-note h2,.hab-species h2 { font: 500 clamp(23px,2.3vw,36px)/1.12 Georgia,serif; margin: 0 0 9px; color: var(--hab-ink); }
.hab-note p { font-size: 16px; }
.hab-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; }
.hab-link { color: var(--hab-accent); text-underline-offset: 4px; font-size: 15px; font-weight: 650; }
.hab-link span { display: inline-block; font-family: system-ui,sans-serif; font-size: .85em; }
.hab-link:hover,.hab-reference a:hover { color: #fff; }
.hab-note > .hab-link { display: inline-block; margin-top: 12px; }
.hab-note + .hab-note { margin-top: 16px; }
.hab-ready .hab-note + .hab-note { margin: 0; }
.hab-pin { display: none; position: absolute; left: var(--x); top: var(--y); width: 44px; height: 44px; transform: translate(-50%,-50%); align-items: center; justify-content: center; background: transparent; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.hab-pin span { display: grid; place-items: center; border: 1.5px solid #fff; background: #09201bce; border-radius: 50%; color: white; width: 28px; height: 28px; font: 20px/1 system-ui,sans-serif; box-shadow: 0 2px 6px #000a; }
.hab-pin[aria-pressed="true"] span,.hab-pin:hover span { background: var(--hab-accent); color: #142119; }
.hab-ready .hab-pin { display: flex; }
.hab-ready .hab-choices { display: flex; }
[data-habitat] [hidden] { display: none !important; }
.hab-reference { border-top: 1px solid #e2efe829; display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; padding: 4px clamp(18px,3vw,40px); }
.hab-reference a { font-size: 13px; color: var(--hab-muted); text-underline-offset: 3px; padding-block: 10px; }

.hab-stream { aspect-ratio: 1752/897; width: 100%; }
.hab-stream canvas,.hab-cabinet canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hab-stream canvas.is-moving { pointer-events: auto; cursor: pointer; }
.hab-motion { position: absolute; bottom: 10px; left: 10px; padding: 5px 10px; min-height: 32px; font-size: 12px; background: #0a1b16df; }

.hab-reef-layout { display: grid; grid-template-columns: minmax(255px,.8fr) minmax(0,1.5fr); align-items: center; }
.hab-reef-copy { padding: clamp(20px,3vw,44px); }
.hab-reef-copy .hab-intro { padding: 0; }
.hab-action { display: none; margin: 18px 0 7px; padding: 10px 18px; }
.hab-ready .hab-action { display: inline-flex; }
.hab-reef-copy .hab-flow { margin-block: 12px; }
.hab-reef-copy .hab-note h2 { font-size: 23px; }
.hab-reef-copy .hab-links { margin-top: 18px; }
.hab-cabinet { align-self: center; background: #132437; }
.hab-chromis-still { position: absolute; inset: 0; pointer-events: none; }
.hab-chromis-still img { position: absolute; height: auto; transform: translate(-50%,-50%) scaleX(-1); }
.hab-doors { position: absolute; inset: 48.9% 7.9% 8.9% 8.4%; display: none; perspective: 1000px; pointer-events: none; }
.hab-ready .hab-doors { display: flex; }
.hab-doors i { display: block; width: 50%; position: relative; background: linear-gradient(105deg,#2d353b,#20282d 65%,#141b20); border: 2px solid #10171b; box-shadow: inset 0 0 0 1px #50565a; transform-origin: left; transition: transform .65s ease,opacity .65s; }
.hab-doors i + i { transform-origin: right; }
.hab-doors i::after { content: ''; position: absolute; top: 17%; right: 5%; height: 19%; width: 2%; border-radius: 3px; background: linear-gradient(90deg,#505b5e,#c2c5bc,#758085); }
.hab-doors i + i::after { left: 5%; }
.hab-open .hab-doors i { transform: rotateY(-100deg); opacity: 0; }
.hab-open .hab-doors i + i { transform: rotateY(100deg); }
.hab-plumbing { display: none; }
.hab-open .hab-plumbing { display: block; }
.hab-trace { display: none; position: absolute; pointer-events: none; color: #daffff; filter: drop-shadow(0 0 2px #053f47); }
.hab-trace span { position: absolute; font: 700 clamp(16px,2vw,27px)/1 system-ui,sans-serif; }
.trace-down { left: 18.6%; top: 12%; height: 62%; border-left: 3px dashed #9af6f4; }
.trace-down span { bottom: -9px; left: -.55em; }
.trace-across { left: 22%; top: 78%; width: 49%; border-top: 3px dashed #9af6f4; }
.trace-across span { right: -8px; top: -.58em; }
.trace-up { left: 80%; top: 12%; height: 69%; border-left: 3px dashed #9af6f4; }
.trace-up span { top: -9px; left: -.55em; }
[data-choice="overflow"] .trace-down,[data-choice="skimmer"] .trace-across,[data-choice="return"] .trace-up { display: block; }

.hab-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #8c785a; }
.hab-pair article { background: #2d291f; }
.hab-pair article + article { background: #1c3028; }
.hab-enclosure .hab-photo { aspect-ratio: 1.6; object-fit: cover; }
.hab-species { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px 20px 12px; pointer-events: none; background: linear-gradient(transparent,#14170ad9); }
.hab-species h2 { font-size: clamp(23px,2.7vw,38px); margin: 0; }
.hab-species p { margin: 0 0 3px; color: #fff; font: 600 12px/1.2 system-ui,sans-serif; letter-spacing: .07em; text-transform: uppercase; }
.hab-pair .hab-field { padding: 16px 20px 20px; }
.hab-pair .hab-note h2 { font-size: 21px; }
.hab-bottom { padding: 14px clamp(18px,3vw,40px); }
.hab-pond .hab-photo { aspect-ratio: 3/2; }
.hab-pond .hab-field > .hab-link { border-top: 1px solid #e2efe829; padding-top: 16px; }
@media (max-width: 800px) {
  .hab-stream-layout,.hab-pond-layout { grid-template-columns: 1fr; }
  .hab-reef-layout { grid-template-columns: 1fr; }
  .hab-reef-copy { display: contents; }
  .hab-reef-copy .hab-intro { grid-row: 1; padding: 18px 18px 10px; }
  .hab-cabinet { grid-row: 2; }
  .hab-reef-copy > .hab-action { justify-self: start; margin: 12px 18px 0; }
  .hab-reef-copy > .hab-flow,.hab-reef-copy > .hab-links { margin: 12px 18px; }
  .hab-reef-copy > .hab-links { padding-bottom: 8px; }
  .hab-choices { margin-bottom: 10px; }
}
@media (max-width: 570px) {
  .hab-pair { grid-template-columns: 1fr; }
  .hab-field { padding: 16px 18px; }
  .hab-reference { gap: 0 14px; }
}
@media (prefers-reduced-motion: reduce) { .hab-doors i { transition: none; } }

/* Keyword line inside the H1 (Nov 25 2026); the display line keeps the original headline style. */
[data-habitat] h1 .hab-kicker { display: block; margin: 0 0 10px; font-family: Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size: 12px; font-weight: 800; letter-spacing: .12em; line-height: 1.35; text-transform: uppercase; color: var(--hab-accent); }
[data-habitat] h1 .hab-headline { display: block; }
