.valley-heading { padding-block: 28px 24px; }
.valley-heading .breadcrumbs { margin-bottom: 20px; color: var(--ink-soft); }
.valley-heading .eyebrow { margin-bottom: 12px; font-size: .875rem; }
.valley-heading h1 { margin: 0 0 14px; font-family: var(--serif); font-size: clamp(2.4rem, 4.8vw, 4.4rem); font-weight: 500; line-height: 1.05; letter-spacing: -.035em; }
.valley-heading > p:last-child { max-width: 850px; margin: 0; font-size: 1.0625rem; }
.valley-next { padding-block: 36px 64px; max-width: 1220px; }
.valley-next h2 { font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1.2; }
.valley-next p { max-width: 880px; }
.valley-source-gallery { padding-top: 42px; }
.valley-source-gallery h2 { font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1.2; }
.valley-reference-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 14px; }
.valley-reference-buttons button { min-height: 44px; padding: 8px 18px; border: 1px solid var(--pine-700); border-radius: 6px; font-size: .9375rem; background: var(--white); color: var(--ink); cursor: pointer; }
.valley-reference-buttons [aria-pressed="true"] { background: var(--pine-900); color: var(--white); }
.valley-source-gallery figure { margin: 0; border: 1px solid var(--line); background: var(--white); }
.valley-source-gallery img { width: 100%; height: clamp(320px, 52vw, 640px); object-fit: contain; background: #e7ece7; }
.valley-source-gallery figcaption { padding: 18px 22px; font-size: .9375rem; line-height: 1.55; }
#threat { scroll-margin-top: calc(var(--header-height) + 24px); }
.valley-home-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: clamp(32px, 5vw, 60px) 0 20px; }
.valley-home-intro p { max-width: 790px; margin: 0; font-size: 1rem; line-height: 1.6; }
.valley-home-intro .text-arrow { flex-shrink: 0; }
.valley-home-explorer { width: 100%; margin: 0; }
@media (max-width: 960px) { .valley-home-intro { flex-direction: column; align-items: start; gap: 12px; } }
/* Mobile keeps compact tools over the map. The embedded desktop viewer gives
   the opening Whitney view its own unobstructed canvas above the controls. */
.valley-explorer { --tool-bg: #102e28f5; --tool-line: #a6bdbb45; --comparison-clearance: 240px; position: relative; isolation: isolate; width: 100%; height: clamp(460px, 76svh, 800px); min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #122e29; color: #fffdf8; }
.valley-explorer [hidden] { display: none !important; }
.valley-stage, .valley-canvas { position: absolute; inset: 0; }
.valley-stage { overflow: hidden; }
.valley-canvas canvas { display: block; width: 100%; height: 100%; }
.valley-explorer button:not(.glossary-term) { min-width: 44px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--tool-line); border-radius: 9px; background: var(--tool-bg); color: #fffdf8; font: inherit; font-size: .875rem; font-weight: 650; cursor: pointer; touch-action: manipulation; }
.valley-explorer button:not(.glossary-term):hover:not(:disabled) { background: #36594d; }
.valley-explorer button:not(.glossary-term):disabled { opacity: .45; cursor: default; }
.valley-explorer :is(button, input, select, summary):focus-visible { outline: 3px solid #f1d37e; outline-offset: 3px; }
.valley-studio-bar { position: absolute; z-index: 4; inset: 12px 12px auto 12px; display: flex; justify-content: space-between; gap: 12px; align-items: center; pointer-events: none; }
.valley-studio-bar strong { padding: 9px 12px; border-radius: 8px; background: var(--tool-bg); font-size: .875rem; }
.valley-studio-bar button { pointer-events: auto; }
.valley-north { position: absolute; z-index: 2; top: 72px; left: 16px; display: grid; place-items: center; width: 38px; height: 38px; background: var(--tool-bg); border: 1px solid var(--tool-line); border-radius: 50%; font-size: .75rem; font-weight: 700; }
.valley-navigation { position: absolute; z-index: 2; right: 12px; top: 72px; display: grid; gap: 4px; }
.valley-navigation button { padding: 5px !important; font-size: 1.375rem !important; }
.valley-trail-label { position: absolute; z-index: 3; left: 50%; top: 50%; max-width: min(15rem,calc(100% - 24px)); transform: translate(-50%,-50%) rotate(var(--trail-angle,0deg)); transform-origin: center; color: #fff8dc; font-size: clamp(.625rem,2.4vw,.8125rem); font-weight: 800; letter-spacing: .045em; line-height: 1; text-align: center; text-shadow: -2px -2px 2px #172a25,2px -2px 2px #172a25,-2px 2px 2px #172a25,2px 2px 2px #172a25,0 0 6px #172a25; text-transform: uppercase; white-space: nowrap; pointer-events: none; }
.valley-water-label { position: absolute; z-index: 4; left: 50%; top: 42%; display: none; inline-size: max-content; max-inline-size: calc(100% - 24px); transform: translate(-50%,-50%); padding: 7px 10px 8px; border: 1px solid #d7ece777; border-radius: 8px; background: linear-gradient(145deg,#102e28e8,#173a30e0); box-shadow: 0 5px 18px #061b2466; color: #fffdf8; overflow-wrap: anywhere; text-align: center; white-space: normal; pointer-events: none; backdrop-filter: blur(5px); }
.valley-water-label > span { display: block; color: #d8e8df; font-size: .625rem; font-weight: 700; letter-spacing: .075em; line-height: 1.25; text-transform: uppercase; }
.valley-water-label strong { display: block; margin-top: 2px; color: #f4d78e; font-size: .8125rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.2; }
.valley-comparison-bar { position: absolute; z-index: 6; left: 50%; bottom: max(12px,env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(720px,calc(100% - 24px)); padding: 8px; border: 1px solid var(--tool-line); border-radius: 16px; background: var(--tool-bg); box-shadow: 0 6px 28px #061b2440; }
.valley-scenario-control { min-width: 0; }
.valley-control-heading { display: grid; align-content: center; gap: 1px; min-height: 44px; margin: 0 2px 4px; padding-right: 112px; font-size: .8125rem; line-height: 1.25; }
.valley-control-heading strong { font-weight: 650; }
.valley-control-heading span { color: #c5d8cd; }
.valley-inline-help { display: inline-flex; min-height: 44px; align-items: center; justify-self: start; margin-top: 3px; padding: 7px 0; border: 0; border-radius: 0; color: #e5c877; background: transparent; font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.valley-scenario-strip { display: grid; grid-template-columns: repeat(5,minmax(3.15rem,1fr)); gap: 4px; min-width: 0; margin: 0; padding: 3px 3px 6px; overflow-x: auto; scrollbar-width: thin; border: 0; }
.valley-scenario-strip label { position: relative; min-width: 0; cursor: pointer; }
.valley-scenario-strip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.valley-scenario-strip label > span { display: grid; place-items: center; align-content: center; gap: 2px; min-height: 58px; padding: 4px 2px; border: 1px solid #78928a; border-radius: 9px; color: #fffdf8; line-height: 1.05; }
.valley-scenario-strip b { font-size: .9375rem; }
.valley-scenario-strip small { display: grid; min-width: 0; font-size: .75rem; font-weight: 400; opacity: .86; text-align: center; }
.valley-scenario-strip small span { display: block; min-width: 0; }
.valley-scenario-strip input:checked + span { background: #e5c877; border-color: #e5c877; color: #142f27; }
.valley-scenario-strip input:focus-visible + span { outline: 3px solid #f1d37e; outline-offset: 3px; }
.valley-terrain-choice b { font-size: .75rem; }
.valley-water-control { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; min-width: 0; min-height: 46px; font-size: .8125rem; }
.valley-water-control > span { font-weight: 650; }
.valley-water-control > span small { display: block; max-width: 250px; margin-top: 2px; color: #c5d8cd; font-size: .69rem; font-weight: 400; line-height: 1.25; }
.valley-water-range { position: relative; display: block; min-width: 0; height: 46px; }
.valley-water-control input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 46px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; touch-action: none; }
.valley-water-control input::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: #78928a; }
.valley-water-control input::-webkit-slider-thumb { width: 46px; height: 46px; margin-top: -20px; border: 2px solid #102e28; border-radius: 50%; appearance: none; -webkit-appearance: none; background: #e5c877; }
.valley-water-control input::-moz-range-track { height: 6px; border: 0; border-radius: 999px; background: #78928a; }
.valley-water-control input::-moz-range-thumb { width: 42px; height: 42px; border: 2px solid #102e28; border-radius: 50%; background: #e5c877; }
.valley-water-control input:disabled { cursor: default; opacity: .6; }
.valley-water-control input:disabled + .valley-fill-thumb { opacity: .6; }
.valley-fill-thumb { position: absolute; z-index: 2; top: 50%; left: 0; display: grid; place-items: center; width: 46px; height: 46px; transform: translate(var(--fill-x,0),-50%); border: 2px solid #102e28; border-radius: 50%; background: #e5c877; color: #142f27; font-size: .75rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1; pointer-events: none; }
.valley-dock { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.valley-explorer .valley-dock button { min-width: 48px; min-height: 44px; padding: 6px 8px; border-color: #78928a; background: transparent; font-size: .75rem; line-height: 1.2; }
.valley-explorer .valley-dock [aria-expanded="true"] { background: #e5c877; border-color: #e5c877; color: #142f27; }
.valley-dock-icon { display: none; }
.valley-dock svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.75; }
.valley-panel { position: absolute; z-index: 5; top: 72px; left: 12px; right: 12px; bottom: calc(var(--comparison-clearance) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; max-height: none; border: 1px solid var(--tool-line); border-radius: 16px; background: #102e28fc; box-shadow: 0 8px 36px #071e2655; overflow: hidden; }
.valley-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 8px 10px 8px 18px; border-bottom: 1px solid var(--tool-line); }
.valley-panel h3 { margin: 0; font: 600 1rem/1.3 var(--sans); color: #fffdf8; }
.valley-explorer [data-panel-close] { padding: 4px; border: 0; background: transparent; font-size: 1.625rem; font-weight: 400; }
.valley-panel-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 18px; scrollbar-width: thin; scrollbar-color: #738f85 transparent; }
.valley-panel p { margin: 12px 0 0; color: #e0e9e2; font-size: .875rem; line-height: 1.5; }
.valley-panel p:first-child { margin-top: 0; }
.valley-mobile-info-intro { display: none; }
.valley-panel a { color: #f4d78e; text-underline-offset: 3px; }
.valley-panel details { margin-top: 16px; border-top: 1px solid var(--tool-line); }
.valley-panel summary { min-height: 44px; padding-block: 12px; cursor: pointer; font-size: .875rem; font-weight: 650; }
.valley-view-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.valley-update { color: #f4d78e; font-size: .8125rem; }
.valley-switch { display: flex; align-items: center; gap: 12px; min-height: 60px; padding-block: 8px; cursor: pointer; font-size: .9375rem; }
.valley-switch + .valley-switch { border-top: 1px solid var(--tool-line); }
.valley-switch input { width: 22px; height: 22px; flex-shrink: 0; accent-color: #e5c877; }
.valley-switch small { display: block; margin-top: 4px; color: #c5d8cd; font-size: .8125rem; }
.valley-select { display: grid; gap: 8px; margin-top: 14px; font-size: .875rem; }
.valley-select select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid #78928a; border-radius: 8px; color: #fffdf8; background: #173a30; font: inherit; }
.valley-key { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: .875rem; }
.valley-key li { display: flex; align-items: center; gap: 10px; }
.valley-key i { width: 24px; height: 12px; flex-shrink: 0; border-radius: 3px; }
.key-water { background: linear-gradient(90deg,#87e9f5,#147bc1); }.key-dam { background: #9d8965; }.key-wilderness { background: #f0b75b; }.key-sites { width: 12px !important; height: 12px !important; margin-inline: 6px; border-radius: 50% !important; background: #ff2f2f; }.key-place { background: #fff4d4; }.key-road { background: #efcb71; height: 4px !important; }.key-trail { background: #ff66cf; height: 4px !important; }
.valley-notice, .valley-depth { position: absolute; z-index: 3; margin: 0; left: 12px; right: 12px; bottom: calc(var(--comparison-clearance) + env(safe-area-inset-bottom)); padding: 9px 12px; border-radius: 9px; background: var(--tool-bg); font-size: .8125rem; line-height: 1.4; }
.valley-depth { left: auto; right: 12px; max-width: calc(100% - 24px); }
.valley-cover { position: absolute; z-index: 3; inset: 0; display: grid; align-items: center; padding: 28px; background: #102d27; }
.valley-cover img { position: absolute; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.valley-cover > div { position: relative; max-width: 420px; }
.valley-cover strong { font-family: var(--serif); font-size: clamp(1.75rem,3vw,3rem); font-weight: 500; line-height: 1.1; }
.valley-cover p { margin-block: 14px; font-size: .9375rem; }
.valley-fallback-link { display: block; color: #f4d78e; margin-top: 12px; }
.valley-noscript { position: absolute; z-index: 4; inset: 45% 18px auto; background: #102e28; padding: 18px; }.valley-noscript a { color: #f4d78e; }
.valley-fullscreen-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; padding: 0; background: #102e28; }
.valley-fullscreen-dialog[open] { display: flex; flex-direction: column; }
.valley-fullscreen-dialog::backdrop { background: #071e26; }
.valley-fullscreen-dialog .valley-explorer { flex: 1; min-height: 0; height: auto; border: 0; border-radius: 0; }
.valley-explorer[data-expanded="true"] .valley-studio-bar { top: max(12px,env(safe-area-inset-top)); left: auto; right: max(12px,env(safe-area-inset-right)); }
.valley-explorer[data-expanded="true"] .valley-studio-bar strong { display: none; }
.valley-explorer[data-expanded="true"] .valley-north { top: max(16px,env(safe-area-inset-top)); left: max(16px,env(safe-area-inset-left)); }
@media (min-width: 700px) {
 .valley-explorer:not([data-expanded="true"]) { height: auto; }
 .valley-explorer:not([data-expanded="true"]) .valley-stage { position: relative; inset: auto; height: clamp(460px,52vw,680px); }
 .valley-explorer:not([data-expanded="true"]) .valley-comparison-bar { position: relative; left: auto; bottom: auto; width: 100%; transform: none; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
 .valley-panel { top: auto; left: 50%; right: auto; width: min(430px,calc(100% - 24px)); max-height: min(60%,480px); transform: translateX(-50%); }
}
@media (max-width: 699px) {
 .valley-explorer { height: max(600px,82svh); }
 .valley-studio-bar { gap: 6px; }
 .valley-studio-bar strong { max-width: 45%; font-size: .8125rem; }
 .valley-studio-bar [data-expand] { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 4px; border-radius: 50%; font-size: 1.25rem; }
 .valley-studio-bar .valley-expand-label { display: none; }
 .valley-comparison-bar { width: calc(100% - 16px); bottom: max(8px,env(safe-area-inset-bottom)); gap: 4px; padding: 6px; border-radius: 13px; }
 .valley-control-heading { display: none; }
 .valley-scenario-strip { gap: 4px; padding: 0; overflow: visible; }
 .valley-scenario-strip label > span { min-height: 44px; padding: 2px; border-radius: 8px; }
 .valley-scenario-strip b { font-size: .875rem; }
 .valley-scenario-strip small { display: none; }
 .valley-terrain-choice b { font-size: .6875rem; }
 .valley-water-control { grid-template-columns: 42px minmax(0,1fr); gap: 6px; min-height: 44px; font-size: .75rem; }
 .valley-water-control > span small { display: none; }
 .valley-water-range, .valley-water-control input { height: 44px; }
 .valley-dock { z-index: 7; top: auto; right: 0; bottom: calc(100% + 8px); }
 .valley-explorer .valley-dock button { display: grid; width: 44px; min-width: 44px; height: 44px; min-height: 44px; place-items: center; padding: 0; border-radius: 50%; background: var(--tool-bg); box-shadow: 0 4px 16px #061b2455; }
 .valley-dock-label { display: none; }
 .valley-dock-icon { display: grid; width: 20px; height: 20px; place-items: center; font-size: 1.25rem; font-weight: 750; line-height: 1; }
 .valley-panel { top: auto; bottom: calc(var(--comparison-clearance) + env(safe-area-inset-bottom) + 48px); max-height: min(62svh,540px); }
 .valley-panel-body { padding: 14px; }
 .valley-mobile-info-intro { display: block; margin: 14px 0; padding: 10px 0 12px; border-top: 1px solid var(--tool-line); border-bottom: 1px solid var(--tool-line); }
 .valley-mobile-info-intro .valley-inline-help { margin: 0; }
 .valley-mobile-info-intro p { margin-top: 8px; }
 .valley-notice, .valley-depth { bottom: calc(var(--comparison-clearance) + env(safe-area-inset-bottom) + 48px); }
 .valley-water-label { display: grid; pointer-events: auto; cursor: pointer; touch-action: manipulation; }
}
@media (max-height: 520px) and (orientation: landscape) {
 .valley-explorer[data-expanded="true"] .valley-panel { z-index: 8; top: max(8px,env(safe-area-inset-top)); right: max(8px,env(safe-area-inset-right)); bottom: max(8px,env(safe-area-inset-bottom)); left: max(8px,env(safe-area-inset-left)); width: auto; max-height: none; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .valley-page * { scroll-behavior: auto; } }


/* Let the existing controls reflow when visitors enlarge text. */
.valley-explorer strong { overflow-wrap: anywhere; }

html.viewer-embed,
html.viewer-embed body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #102e28;
}

.viewer-embed body > :is(.skip-link, .progress-line, .site-header, .site-footer),
.viewer-embed .valley-heading,
.viewer-embed .valley-source-gallery,
.viewer-embed .valley-next,
.viewer-embed .valley-page > noscript {
  display: none !important;
}

.viewer-embed .valley-page {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.viewer-embed .valley-explorer {
  width: 100%;
  max-width: none;
  height: 100dvh !important;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.viewer-embed .valley-studio-bar {
  display: none;
}

.viewer-embed .valley-stage {
  position: absolute !important;
  inset: 0 !important;
  height: auto !important;
}

.viewer-embed .valley-comparison-bar {
  position: absolute !important;
  left: 50% !important;
  bottom: max(12px, env(safe-area-inset-bottom)) !important;
  width: min(720px, calc(100% - 24px)) !important;
  transform: translateX(-50%) !important;
  border: 1px solid var(--tool-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 28px #061b2440 !important;
}

.viewer-embed .valley-north,
.viewer-embed .valley-navigation {
  top: max(16px, env(safe-area-inset-top));
}

@media (max-width: 699px) {
  .viewer-embed .valley-comparison-bar {
    width: calc(100% - 16px) !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    border-radius: 13px !important;
  }
}

.valley-switch > i { display:inline-grid; place-items:center; flex:0 0 22px; width:22px; height:22px; font-style:normal; }
.valley-switch > .bioblitz-key-pin { border:2px solid #fffdf8; border-radius:50%; background:#edce85; color:#082820; font-size:12px; font-weight:800; }
