/* Waterline demo: one canonical layout, with no internal scrolling surfaces. */
.exercise-wrap { padding: 110px 0; background: #000f2d; }
.exercise-intro { display: grid; grid-template-columns: .72fr 1.28fr; gap: 7vw; margin-bottom: 54px; }
.exercise-intro h2 { margin: 0; font-family: 'Newsreader', serif; font-size: clamp(2.8rem, 5vw, 5rem); font-weight: 400; line-height: 1; }
.exercise-intro p { max-width: 680px; margin: 0; color: var(--muted); }
.privacy-note { display: block; margin-top: 1rem; color: var(--aqua); font-size: .88rem; }
.exercise-launch { max-width: 900px; margin: 0 auto 24px; padding: clamp(42px, 6vw, 72px) clamp(28px, 6vw, 64px); border: 1px solid var(--line); background: linear-gradient(135deg, rgba(241, 231, 198, .09), rgba(58, 140, 167, .11)); text-align: center; }
.exercise-launch h3 { max-width: 650px; margin: .35rem auto .8rem; color: var(--cream); font-family: 'Newsreader', serif; font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 400; line-height: 1.04; letter-spacing: -.025em; }
.exercise-launch p:not(.eyebrow) { max-width: 620px; margin: 0 auto 1.5rem; color: var(--muted); font-size: 1.04rem; }
.primary, .secondary { min-height: 46px; padding: .72rem 1.25rem; border-radius: 4px; cursor: pointer; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.primary { border: 0; background: var(--cream); color: var(--ink); font-weight: 600; }
.secondary { border: 1px solid rgba(241, 231, 198, .35); background: transparent; color: var(--cream); }
.primary:hover:not(:disabled), .secondary:hover:not(:disabled) { transform: translateY(-1px); }
.primary:disabled, .secondary:disabled { opacity: .4; cursor: not-allowed; }
.actions { margin-top: 1.7rem; display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.exercise { --depth-density: .7; position: relative; min-height: 760px; border: 1px solid rgba(241, 231, 198, .2); background: linear-gradient(180deg, #002959 0%, #001a41 50%, #001030 100%); box-shadow: 0 40px 100px rgba(0, 0, 0, .42); transition: background 2.8s cubic-bezier(.15, .85, .3, 1), color 2.8s cubic-bezier(.15, .85, .3, 1); }
.exercise[hidden] { display: none; }
.exercise.deep { --depth-density: .7; }
.exercise.mid-water { --depth-density: .45; background: linear-gradient(180deg, #044d7a 0%, #002959 60%, #001a41 100%); }
.exercise.near-surface { --depth-density: .2; background: linear-gradient(180deg, #3a8ca7 0%, #044d7a 50%, #002959 100%); }
.exercise.surface { --depth-density: .05; color: var(--ink); background: linear-gradient(180deg, #e8f4fc 0%, #87ceeb 40%, #5ba3c6 100%); }
.exercise::before { content: ''; position: absolute; inset: -24% 11% auto auto; width: 25%; height: 85%; transform: rotate(18deg) skewX(-16deg); background: linear-gradient(180deg, rgba(241, 231, 198, .2), transparent); pointer-events: none; }
.exercise::after { content: ''; position: absolute; inset: auto 0 0; z-index: 1; height: 45%; pointer-events: none; opacity: var(--depth-density); background: radial-gradient(ellipse at 50% 100%, rgba(0, 8, 30, .8), transparent 72%); transition: opacity 2.8s ease; }
.exercise:has(.instrument-intro)::before { display: none; }
.exercise:has(.instrument-intro) .exercise-bar { opacity: 0; pointer-events: none; }
.exercise-bar { position: relative; z-index: 4; min-height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(241, 231, 198, .12); color: var(--muted); font-size: .78rem; }
.reset { border: 0; padding: .55rem; color: var(--muted); background: none; cursor: pointer; }
.reset:hover { color: var(--cream); }
.exercise-stage { position: relative; z-index: 2; min-height: 700px; transition: opacity .18s ease, transform .18s ease; }
.exercise-stage.is-exiting { opacity: 0; transform: translateY(10px); pointer-events: none; }
.exercise-stage.is-entering { animation: sceneEnter .52s cubic-bezier(.15, .85, .3, 1) both; }
.phase { position: relative; width: min(100%, 920px); min-height: 700px; margin-inline: auto; padding: clamp(54px, 7vw, 84px) 30px 80px; }
.phase.center { text-align: center; }
.phase h2, .pass-copy h2, .dump-copy h2 { margin: 0 0 1rem; color: var(--cream); font-family: 'Newsreader', serif; font-size: clamp(2.3rem, 5vw, 4.5rem); font-weight: 400; line-height: 1.05; }
.surface .phase h2, .surface .phase h3, .surface .phase p { color: var(--ink); }
.phase .instruction, .dump-copy .instruction { max-width: 690px; margin: 0 auto 2rem; color: rgba(241, 231, 198, .76); font-family: 'Newsreader', serif; font-size: 1.2rem; line-height: 1.48; }
.surface .phase .instruction { color: rgba(8, 36, 61, .72); }
.instrument-intro { position: absolute; inset: 0; min-height: 700px; display: grid; place-items: center; overflow: hidden; background: #001030; }
.instrument-intro h2 { position: relative; z-index: 2; margin: 0; color: var(--cream); font-family: 'Newsreader', serif; font-size: clamp(3.5rem, 9vw, 8rem); font-weight: 400; letter-spacing: -.05em; opacity: 0; animation: introTitle 1.4s ease-out 1s forwards; }
.intro-shaft { position: absolute; inset: -10% -8%; opacity: 0; transform: translateX(-105%); background: rgba(160, 200, 220, .18); clip-path: polygon(20% 0%, 27% 0%, 14% 100%, 7% 100%); animation: shaftSweep 5.8s cubic-bezier(.15, .85, .3, 1) 2s forwards; }
.shaft-two { background: rgba(140, 180, 200, .12); clip-path: polygon(46% 0%, 58% 0%, 40% 100%, 28% 100%); animation-delay: 2.4s; animation-duration: 6.4s; }
.shaft-three { background: rgba(120, 165, 185, .15); clip-path: polygon(68% 0%, 76% 0%, 60% 100%, 52% 100%); animation-delay: 2.2s; animation-duration: 5.2s; }
.instrument-orientation { max-width: 760px; }
.orientation-copy { max-width: 660px; margin: 2rem auto 0; color: rgba(241, 231, 198, .82); font-family: 'Newsreader', serif; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; }
.orientation-copy p { margin: 0 0 1.2rem; }
.duration { margin: 2.2rem 0 .7rem; color: var(--aqua); font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; }
.instrument-orientation .privacy-note { max-width: 580px; margin: 0 auto; color: rgba(241, 231, 198, .62); }
.dump-scene { position: relative; min-height: 760px; padding: 60px 30px 42px; }
.dump-copy { position: relative; z-index: 3; max-width: 840px; margin-inline: auto; text-align: center; }
.harbour-examples { margin: 0 auto 1.2rem; color: rgba(241, 231, 198, .52); font-family: 'Newsreader', serif; font-style: italic; transition: opacity .3s ease; }
.harbour-examples.is-hidden { opacity: 0; }
.dump-form { display: flex; gap: 12px; max-width: 680px; margin: 0 auto; }
.dump-form input { flex: 1; min-width: 0; padding: .9rem 1rem; color: var(--cream); background: rgba(0, 10, 35, .38); border: 1px solid rgba(241, 231, 198, .32); border-radius: 4px; font-family: 'Newsreader', serif; font-size: 1.1rem; }
.dump-form .add-button { min-width: 86px; }
.bubble-pool { position: relative; z-index: 2; width: 100%; min-height: 320px; margin: 28px auto 0; }
.dump-pool { min-height: 500px; }
.bubble { position: absolute; left: 0; top: 0; width: var(--bubble-size); height: var(--bubble-size); display: inline-flex; align-items: center; justify-content: center; padding: 10px; overflow: hidden; border: 1px solid rgba(241, 231, 198, .48); border-radius: 50%; color: var(--ink); background: rgba(241, 231, 198, .94); font-family: 'Newsreader', serif; font-size: var(--bubble-font-size); line-height: 1.05; text-align: center; cursor: grab; touch-action: manipulation; animation: bubbleFadeIn .6s cubic-bezier(.15, .85, .3, 1) both, bubbleDrift 18s ease-in-out .6s infinite; will-change: transform, opacity; }
.bubble:hover { animation-play-state: paused; }
.bubble.selected { box-shadow: 0 0 0 4px var(--coral); animation-play-state: paused; }
.bubble.dragging { opacity: .5; }
.dump-complete { position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 1rem; padding-top: 18px; }
.completion-button { border: 0; border-bottom: 1px solid rgba(241, 231, 198, .4); padding: .5rem 0; color: var(--cream); background: none; cursor: pointer; font-family: 'Newsreader', serif; font-size: 1.15rem; }
.dump-count, .left-in-water, .counter { color: var(--aqua); font-size: .86rem; }
.take-through { max-width: 920px; }
.pass-head { text-align: center; }
.take-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; margin-top: 1.5rem; }
.take-item { display: flex; align-items: center; gap: .75rem; min-height: 58px; padding: .8rem; border: 1px solid rgba(241, 231, 198, .2); color: var(--cream); background: rgba(241, 231, 198, .04); text-align: left; cursor: pointer; }
.take-item.selected { border-color: var(--cream); background: rgba(241, 231, 198, .14); }
.take-dot { flex: 0 0 auto; width: 12px; height: 12px; border: 1px solid currentColor; border-radius: 50%; }
.take-item.selected .take-dot { background: var(--coral); border-color: var(--coral); }
.counter, .left-in-water { text-align: center; }
.guess-band-wrap { max-width: 680px; margin: 3rem auto 0; }
.guess-band { position: relative; height: 20px; border: 1px solid rgba(241, 231, 198, .38); background: rgba(241, 231, 198, .08); }
.guess-fill { position: absolute; inset: 0 auto 0 0; width: var(--guess-position); background: rgba(239, 106, 76, .7); }
.guess-marker { position: absolute; top: 50%; left: var(--guess-position); width: 20px; height: 40px; border: 3px solid var(--cream); border-radius: 20px; background: var(--deep); transform: translate(-50%, -50%); pointer-events: none; }
.guess-band input { position: absolute; inset: -18px 0; width: 100%; height: 56px; opacity: .01; cursor: pointer; }
.guess-labels { display: flex; justify-content: space-between; margin-top: .8rem; color: var(--muted); font-family: 'Newsreader', serif; }
.guess-band-wrap output { display: block; margin-top: 1.6rem; color: var(--cream); font-family: 'Newsreader', serif; font-size: 2rem; }
.pass-scene { position: relative; min-height: 1100px; padding: 0 0 34px; }
.pass-copy { width: min(100%, 940px); margin-inline: auto; padding: 58px 30px 28px; }
.pass-copy h2 { max-width: 780px; margin-inline: auto; text-align: center; }
.pass-indicator { margin: 0 0 1rem; color: var(--aqua); font-size: .78rem; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.pass-guidance { margin: 0 auto; color: rgba(241, 231, 198, .62); font-size: .92rem; text-align: center; }
.current-zones { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(var(--zone-count), minmax(0, 1fr)); align-items: stretch; margin: 0 28px; border-block: 1px solid rgba(241, 231, 198, .1); }
.current-zone { position: relative; min-width: 0; min-height: 760px; border-right: 1px solid rgba(241, 231, 198, .1); background: linear-gradient(0deg, rgba(58, 140, 167, .06), transparent 60%); cursor: pointer; transition: background .25s ease, border-color .25s ease; }
.current-zone:last-child { border-right: 0; }
.current-zone:hover, .current-zone.drag-over { border-color: rgba(241, 231, 198, .58); background: linear-gradient(0deg, rgba(58, 140, 167, .14), rgba(241, 231, 198, .05) 65%); }
.current-layer { position: absolute; inset: 0; opacity: .2; pointer-events: none; overflow: hidden; background: repeating-linear-gradient(170deg, transparent 0 24px, rgba(131, 201, 195, .08) 25px 26px, transparent 27px 54px); animation: currentDrift 12s linear infinite; }
.current-layer.layer-b { opacity: .12; animation-direction: reverse; animation-duration: 16s; }
.zone-label { position: relative; z-index: 2; display: block; min-height: 78px; padding: 32px 12px 12px; color: rgba(241, 231, 198, .86); font-size: .88rem; font-weight: 500; line-height: 1.25; text-align: center; }
.zone-items { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 12px; padding: 18px 10px 34px; }
.placed-bubble { position: relative; flex: 0 0 auto; left: auto; top: auto; width: min(var(--bubble-size), 104px); height: min(var(--bubble-size), 104px); font-size: clamp(12px, var(--bubble-font-size), 14px); animation: placedBubbleDrift 20s ease-in-out var(--sway-delay, 0s) infinite; }
.placed-bubble.is-moving { z-index: 8; animation: none !important; pointer-events: none; }
.pass-pool { min-height: 320px; margin-inline: 28px; }
.pass-footer { position: relative; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 20px 30px 0; }
.pass-footer .remaining { color: rgba(241, 231, 198, .68); font-size: .88rem; }
.pass-footer .primary:disabled { display: none; }
.reveal-copy { max-width: 900px; color: var(--ink); }
.reveal-copy h2 { max-width: 820px; margin-inline: auto; font-size: clamp(2.35rem, 5vw, 4.7rem); }
.tailored-reveal { max-width: 680px; margin: 1.2rem auto 0; color: rgba(8, 36, 61, .78) !important; font-size: 1.5rem !important; }
.ownership-read { max-width: 760px; margin: 3.1rem auto 0; }
.ownership-bar { display: flex; height: 18px; overflow: hidden; border: 1px solid rgba(8, 36, 61, .28); background: rgba(8, 36, 61, .08); }
.ownership-system { background: var(--coral); transition: width .8s cubic-bezier(.15, .85, .3, 1); }
.ownership-yours { background: var(--ink); transition: width .8s cubic-bezier(.15, .85, .3, 1); }
.ownership-labels { display: flex; justify-content: space-between; margin-top: .7rem; color: rgba(8, 36, 61, .76); font-size: .88rem; }
.reveal-pattern, .next-step { max-width: 760px; margin: 2.5rem auto 0; padding-top: 1.45rem; border-top: 1px solid rgba(8, 36, 61, .18); text-align: left; }
.pattern-label { margin: 0 0 .5rem !important; color: rgba(8, 36, 61, .62) !important; font-family: 'DM Sans', sans-serif !important; font-size: .78rem !important; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.reveal-pattern p:not(.pattern-label), .next-step p:not(.pattern-label) { margin: .4rem 0 0; color: rgba(8, 36, 61, .78); font-family: 'Newsreader', serif; font-size: 1.25rem; line-height: 1.42; }
.reveal-pattern strong { color: var(--ink); font-family: 'DM Sans', sans-serif; font-size: 1rem; }
.reveal-pills { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .85rem; }
.reveal-pills span { padding: .42rem .7rem; border: 1px solid rgba(8, 36, 61, .2); border-radius: 999px; color: rgba(8, 36, 61, .78); font-size: .8rem; }
@keyframes sceneEnter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes introTitle { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes shaftSweep { 0% { opacity: 0; transform: translateX(-105%); } 18% { opacity: 1; } 72% { opacity: 1; transform: translateX(22%); } 100% { opacity: 0; transform: translateX(105%); } }
@keyframes bubbleFadeIn { from { opacity: 0; transform: translateY(7px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes bubbleDrift { 0%, 100% { transform: translate3d(-1px, 4px, 0); } 48% { transform: translate3d(2px, -6px, 0); } 72% { transform: translate3d(-2px, -3px, 0); } }
@keyframes placedBubbleDrift { 0%, 100% { transform: translate3d(-1px, 3px, 0); } 50% { transform: translate3d(2px, -5px, 0); } 76% { transform: translate3d(-2px, -2px, 0); } }
@keyframes currentDrift { from { background-position-y: 0; } to { background-position-y: -108px; } }
@media (max-width: 850px) {
  .exercise-intro { grid-template-columns: 1fr; }
  .current-zones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .current-zone { min-height: 560px; }
  .take-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .exercise-wrap { padding: 76px 0; }
  .exercise-launch { padding: 42px 22px 48px; }
  .phase { padding: 48px 16px 68px; }
  .dump-scene { padding: 48px 14px 38px; }
  .dump-form input { font-size: 1rem; }
  .dump-form .add-button { min-width: 72px; padding-inline: .7rem; }
  .take-grid { grid-template-columns: 1fr; }
  .current-zones { grid-template-columns: 1fr; margin-inline: 8px; }
  .current-zone { min-height: 520px; border-right: 0; border-bottom: 1px solid rgba(241, 231, 198, .1); }
  .current-zone:last-child { border-bottom: 0; }
  .zone-items { gap: 8px; padding-inline: 6px; }
  .pass-pool { margin-inline: 8px; }
  .pass-footer { flex-direction: column; }
  .dump-complete { flex-direction: column; gap: .4rem; }
  .tailored-reveal { font-size: 1.25rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  .exercise, .exercise::after { transition-duration: .4s; }
  .exercise-stage { transition: none; }
  .exercise-stage.is-entering, .bubble, .placed-bubble, .current-layer { animation: none; }
  .intro-shaft { display: none; }
  .instrument-intro h2 { animation-duration: .4s; animation-delay: 0s; animation-fill-mode: forwards; }
}
