:root {
  color: #081e20;
  background: #087c7e;
  font-family: "Courier New", monospace;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: none;
  --teal: #087c7e;
  --deep-teal: #004b4d;
  --aqua: #00f2fe;
  --gold: #f7b748;
  --paper: #f2f5e9;
  --ink: #101010;
}

@keyframes individual-bubble-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(.65); }
  12% { opacity: .8; }
  78% { opacity: .55; }
  100% { opacity: 0; transform: translate(var(--drift), -42vh) scale(1.15); }
}

.text-entry-card { min-width: 0; }

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--aqua) #0a2d37;
  scrollbar-width: auto;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: #0a2d37;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  border: 3px solid #0a2d37;
  border-radius: 8px;
  background: var(--aqua);
  box-shadow: 0 0 8px rgb(0 242 254 / 55%);
}

button,
textarea,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #fff5ce;
  outline-offset: 3px;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.page-stack {
  position: relative;
  width: 100%;
  overflow: clip;
}

.screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
}

.surface-page {
  isolation: isolate;
  height: 200vh;
  height: 200svh;
  min-height: 200vh;
  min-height: 200svh;
  overflow: hidden;
  background: linear-gradient(#a4e1e7 0 27%, #54b9bc 48%, #087c7e 70%, #004b4d);
}

.surface-sky,
.surface-sky > span {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.surface-sky {
  z-index: -1;
  transform-origin: 50% 57%;
  transition: transform 1.5s cubic-bezier(.68, 0, .32, 1);
  background:
    radial-gradient(ellipse at 50% 2%, rgb(255 255 222 / 76%), transparent 35%),
    linear-gradient(180deg, #a4e1e7 0 27%, #54b9bc 48%, #087c7e 70%, #004b4d);
}

.surface-page.is-submerging .surface-sky {
  transform: scale(1.2);
}

.sun {
  inset: 5% auto auto 50% !important;
  width: min(22vw, 240px);
  height: min(22vw, 240px);
  border: 5px solid rgb(255 255 220 / 70%);
  border-radius: 50%;
  background: #f8d890;
  box-shadow: 0 0 70px 40px rgb(248 216 144 / 40%);
  transform: translateX(-50%);
}

.surface-page .mode-options[aria-hidden="true"] .mode-button,
.surface-page .mode-options[aria-hidden="true"] .or-art {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.cloud {
  top: 11% !important;
  left: 7% !important;
  width: 130px;
  height: 27px;
  border-radius: 50%;
  background: rgb(244 251 231 / 66%);
  filter: drop-shadow(23px 8px 0 rgb(244 251 231 / 55%)) drop-shadow(48px -4px 0 rgb(244 251 231 / 52%));
}

.cloud-two {
  top: 19% !important;
  left: 72% !important;
  transform: scale(.72);
}

.horizon {
  top: 27% !important;
  bottom: auto !important;
  height: 6px;
  background: rgb(231 255 246 / 70%);
  box-shadow: 0 7px 24px 9px rgb(231 255 246 / 42%);
}

.water-glint {
  top: 30% !important;
  bottom: 15% !important;
  background:
    radial-gradient(ellipse at 50% 2%, rgb(224 255 247 / 35%), transparent 31%),
    repeating-linear-gradient(174deg, transparent 0 32px, rgb(203 255 249 / 15%) 34px 37px, transparent 39px 69px);
  animation: water-shimmer 5s ease-in-out infinite alternate;
}

.water-depth {
  top: 42% !important;
  background: linear-gradient(180deg, transparent, rgb(0 53 62 / 26%) 44%, rgb(0 34 43 / 55%));
}

.water-current {
  top: 43% !important;
  left: -15% !important;
  width: 130%;
  height: 18px;
  border-top: 3px solid rgb(174 250 240 / 33%);
  border-radius: 50%;
  transform: rotate(-3deg);
  animation: current-drift 8s ease-in-out infinite alternate;
}

.current-two {
  top: 64% !important;
  animation-delay: -3s;
  opacity: .6;
}

.bubble {
  inset: auto !important;
  bottom: 16%;
  left: 25%;
  width: 14px;
  height: 14px;
  border: 2px solid rgb(204 255 250 / 68%);
  border-radius: 50%;
  animation: bubble-rise 5s linear infinite;
}

.bubble-two {
  left: 70%;
  animation-delay: -2s;
}

.bubble-three {
  left: 42%;
  width: 9px;
  height: 9px;
  animation-delay: -3.7s;
}

.surface-fish {
  position: absolute;
  z-index: 2;
  width: 96px;
  height: 48px;
  pointer-events: none;
}

.school-fish {
  width: 58px;
  height: 30px;
  opacity: .7;
  animation: small-fish-cross 17s linear infinite;
}

.fish-silver-one { top: 42%; animation-delay: -2s; }
.fish-silver-two { top: 52%; animation-delay: -9s; transform: scale(.75); }
.fish-silver-three { top: 70%; animation-delay: -14s; transform: scale(.9); }
.fish-silver-four { top: 82%; animation-delay: -6s; transform: scale(.65); }
.fish-silver-five { top: 61%; animation-delay: -11s; transform: scale(.55); }

.orange-fish {
  top: 60%;
  left: 8%;
  z-index: 5;
  animation: orange-fish-cross 7s ease-in-out infinite alternate;
  transform-origin: 30% 50%;
  transition: transform 300ms ease, top 300ms ease;
}

.orange-fish .fish-body,
.orange-fish .fish-tail,
.orange-fish .fish-fin,
.orange-fish .fish-eye,
.progress-fish i {
  position: absolute;
  display: block;
}

.fish-body {
  top: 8%;
  left: 15%;
  width: 74%;
  height: 80%;
  border: 3px solid #4c2111;
  border-radius: 52% 48% 48% 52%;
  background: linear-gradient(145deg, #ffb33c, #ef5b25 68%, #c83d22);
  box-shadow: inset -9px -4px 0 rgb(182 53 23 / 30%);
}

.fish-tail {
  top: 21%;
  left: 0;
  width: 29%;
  height: 59%;
  background: #ed6129;
  clip-path: polygon(100% 50%, 0 0, 13% 50%, 0 100%);
  filter: drop-shadow(2px 2px 0 #542315);
}

.fish-fin {
  top: 0;
  left: 41%;
  width: 25%;
  height: 37%;
  background: #f9862a;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.fish-eye {
  top: 30%;
  right: 13%;
  width: 8px;
  height: 8px;
  border: 2px solid #23140d;
  border-radius: 50%;
  background: white;
}

.metal-hook {
  position: absolute;
  z-index: 7;
  top: 22%;
  left: 50%;
  width: 28px;
  height: 0;
  transform: translateX(-50%);
}

.hook-wire {
  position: absolute;
  top: 0;
  left: 13px;
  width: 3px;
  height: 100%;
  background: #282c2a;
}

.hook-curve {
  position: absolute;
  bottom: -3px;
  left: 13px;
  width: 22px;
  height: 24px;
  border: 4px solid #282c2a;
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 20px;
  transform: rotate(12deg);
}

.corner-link {
  position: absolute;
  z-index: 10;
  top: 20px;
  left: 22px;
  padding: 7px 9px;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: clamp(12px, 1.5vw, 17px);
  font-weight: 900;
  text-decoration: underline;
  text-shadow: 2px 2px #073c40;
}

.about-trigger {
  right: 22px;
  left: auto;
}

.surface-kicker {
  position: absolute;
  top: 5%;
  left: 50%;
  width: 90%;
  margin: 0;
  color: #074d50;
  font-size: clamp(12px, 1.5vw, 20px);
  font-weight: 900;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.phish-button {
  position: absolute;
  z-index: 6;
  top: 12%;
  left: 50%;
  min-width: min(42vw, 580px);
  min-height: clamp(64px, 11vh, 115px);
  padding: .12em .3em .2em;
  border: 4px solid #111;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 8px 8px 0 #177c82;
  color: var(--gold);
  font-size: clamp(42px, 8vw, 104px);
  font-weight: 1000;
  letter-spacing: -.08em;
  line-height: .95;
  text-shadow: 4px 4px 0 #087e86, -3px -3px 0 #111, 3px -3px 0 #111, -3px 3px 0 #111;
  transform: translateX(-50%);
  animation: button-bob 3.3s ease-in-out infinite;
}

.surface-instruction {
  position: absolute;
  top: 43%;
  left: 50%;
  width: 90%;
  margin: 0;
  color: #fff4d5;
  font-size: clamp(12px, 1.7vw, 20px);
  font-weight: 900;
  text-align: center;
  text-shadow: 2px 2px #004b4d;
  transform: translateX(-50%);
}

.mode-options {
  position: absolute;
  z-index: 5;
  top: 48%;
  left: 50%;
  display: flex;
  width: min(680px, 88vw);
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 3vw, 40px);
  margin: 0;
  padding: 0;
  border: 0;
  transform: translateX(-50%);
}

.mode-button {
  display: grid;
  width: min(36%, 230px);
  min-height: clamp(64px, 9vh, 96px);
  place-items: center;
  border: 4px solid #111;
  border-radius: 26px;
  background: var(--gold);
  box-shadow: 5px 6px 0 #111;
  color: #111;
  font-size: clamp(20px, 3vw, 35px);
  font-weight: 1000;
  letter-spacing: .04em;
  text-shadow: 2px 2px 0 #31a5a9;
  transition: transform 150ms ease, filter 150ms ease;
}

.mode-button:hover { filter: brightness(1.08); transform: translateY(-5px); }
.mode-button:active { box-shadow: 1px 2px #111; transform: translateY(2px); }
.or-label { color: #101010; font-size: clamp(18px, 2.6vw, 30px); font-weight: 1000; text-shadow: 2px 2px var(--gold); }
.surface-scroll-hint { position: absolute; bottom: 2%; left: 50%; color: #ddf9ee; font-size: 10px; letter-spacing: .2em; transform: translateX(-50%); }

.mode-form {
  position: relative;
  display: block;
  margin: 0;
}

.terminal-page {
  isolation: isolate;
  height: 200vh;
  overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(ellipse at 50% 20%, rgb(25 156 156 / 35%), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 44px, rgb(0 242 254 / 4%) 45px 46px),
    linear-gradient(150deg, #087c7e, #004b4d 70%, #05282e);
  transition: transform 380ms ease, opacity 380ms ease;
}

.terminal-page::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 70%, rgb(0 242 254 / 9%), transparent 22%),
    radial-gradient(ellipse at 80% 46%, rgb(0 242 254 / 8%), transparent 25%);
  content: "";
}

.text-page { min-height: 200vh; }
.text-page .terminal-heading { top: 9vh; }
.text-page .terminal-frame { top: 23vh; height: 48vh; }
.text-page .run-area { top: 76vh; }
.text-page .analysis-status { top: 88vh; }
.audio-page { height: 200vh; height: 200svh; min-height: 200vh; min-height: 200svh; }

.terminal-heading {
  position: absolute;
  top: 9%;
  left: 50%;
  width: min(900px, 88%);
  text-align: center;
  transform: translateX(-50%);
}

.terminal-eyebrow {
  margin: 0 0 .8em;
  color: var(--aqua);
  font-size: clamp(10px, 1vw, 14px);
  font-weight: 900;
  letter-spacing: .24em;
}

.terminal-heading h1 {
  margin: 0;
  font-size: clamp(23px, 3.1vw, 46px);
  font-weight: 1000;
  letter-spacing: .08em;
  line-height: 1.1;
}

.terminal-frame {
  position: absolute;
  top: 23%;
  left: 7%;
  display: grid;
  width: 86%;
  height: 48%;
  gap: clamp(10px, 2vw, 28px);
  padding: clamp(12px, 2vw, 24px);
  border: 3px solid var(--paper);
  border-radius: 26px;
  background: var(--gold);
  box-shadow: 0 8px 0 rgb(0 0 0 / 25%);
}

.text-frame { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }

.terminal-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: clamp(12px, 1.6vw, 24px);
  border: 3px solid #111;
  border-radius: 20px;
  background: #d6d6d6;
  box-shadow: 0 6px 0 rgb(0 0 0 / 16%);
  color: var(--ink);
}

.terminal-label {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0;
  font-size: clamp(13px, 1.45vw, 20px);
  font-weight: 1000;
  letter-spacing: .04em;
}

#content,
#audio-content {
  width: 100%;
  min-height: 0;
  resize: vertical;
  border: 2px solid #111;
  border-radius: 8px;
  background: #f5f5ed;
  color: #102324;
  font-size: clamp(13px, 1.25vw, 17px);
  line-height: 1.5;
}

.text-entry-card #content {
  position: absolute;
  inset: 23% 7% 7%;
  width: 86%;
  height: 70%;
  padding: 14px;
}

.dashboard-or { align-self: start; padding-top: .4em; color: #111; }

.upload-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.upload-prompt {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  border: 3px dashed #555;
  border-radius: 12px;
  color: #101010;
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: 900;
  text-align: center;
}

.document-icon { width: 52px; height: 60px; fill: none; stroke: currentColor; stroke-linecap: square; stroke-linejoin: miter; stroke-width: 3; }
.image-upload-hit { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.analysis-preview { position: absolute; z-index: 3; inset: 20% 6% 6%; width: 88%; height: 74%; border: 2px solid #111; border-radius: 8px; background: #f5f5ed; object-fit: contain; pointer-events: none; }

.run-area {
  position: absolute;
  top: 76%;
  left: 50%;
  display: grid;
  width: min(420px, 86vw);
  min-height: 58px;
  place-items: center;
  transform: translateX(-50%);
}

.analysis-submit,
.secondary-action {
  min-height: 52px;
  padding: .6em 1.5em;
  border: 3px solid #111;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 4px 5px #111;
  color: #101010;
  font-size: clamp(14px, 1.5vw, 21px);
  font-weight: 1000;
}

.analysis-progress {
  position: relative;
  width: min(360px, 82vw);
  min-height: 76px;
  padding-top: 4px;
  color: #102324;
  font-size: 14px;
  font-weight: 1000;
  text-align: center;
}

.analysis-progressbar {
  position: relative;
  height: 24px;
  margin-top: 10px;
  overflow: hidden;
  border: 3px solid var(--paper);
  border-radius: 999px;
  background: #004b61;
}

#analysis-progress-fill,
#audio-analysis-progress-fill {
  display: block;
  width: 4%;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 160ms linear;
}
.progress-fish {
  position: absolute;
  top: 50%;
  left: 5%;
  display: block;
  width: 40px;
  height: 15px;
  overflow: hidden;
  transform: translate(-50%, -50%);
  transition: left 160ms linear;
}

.progress-fish img {
  position: absolute;
  top: -386.67%;
  left: -375%;
  display: block;
  width: 1125%;
  max-width: none;
  height: 2511.12%;
  image-rendering: pixelated;
}

.analysis-status {
  position: absolute;
  top: 88%;
  left: 5%;
  width: 90%;
  min-height: 1.5em;
  margin: 0;
  color: #fff5ce;
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 900;
  text-align: center;
}

.text-deepen-bottom {
  position: absolute;
  top: 110vh;
  left: 8%;
  display: flex;
  width: 84%;
  height: 75vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 3px solid var(--aqua);
  background:
    repeating-linear-gradient(0deg, transparent 0 40px, rgb(0 242 254 / 7%) 41px 42px),
    #062b31;
  text-align: center;
}

.text-deepen-bottom h2 { margin: 0; color: var(--aqua); font-size: clamp(22px, 3vw, 42px); }
.text-deepen-bottom p { margin: 0; }
.secondary-action { background: var(--aqua); }

.audio-page { height: 200vh; }
.audio-frame {
  top: 22%;
  left: 14%;
  display: flex;
  width: 72%;
  height: 64%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px;
}

.sonar-node {
  position: relative;
  display: grid;
  width: 190px;
  height: 190px;
  flex: 0 0 190px;
  place-items: center;
}

.microphone-icon {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100px;
  height: 100px;
  place-items: center;
  border: 4px solid #111;
  border-radius: 50%;
  background: #ff4a4a;
  box-shadow: 0 0 0 8px rgb(255 74 74 / 20%);
  font-size: 40px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.microphone-icon.is-listening { transform: scale(.94); box-shadow: 0 0 0 12px rgb(255 74 74 / 30%); }

.audio-ripple {
  --ripple-opacity: .8;
  position: absolute;
  inset: 50%;
  width: 105px;
  height: 105px;
  border: 3px solid var(--aqua);
  border-radius: 50%;
  opacity: .8;
  transform: translate(-50%, -50%) scale(.75);
  animation: audio-ripple 3s ease-out infinite;
  pointer-events: none;
}

.ripple-middle { --ripple-opacity: .4; animation-delay: 1s; }
.ripple-outer { --ripple-opacity: .15; animation-delay: 2s; }

.live-assessment-card {
  min-width: min(320px, 85%);
  padding: 12px 20px;
  text-align: center;
}

.live-assessment-value { margin: 8px 0 0; font-size: clamp(14px, 1.6vw, 20px); font-weight: 1000; }

.transcript-terminal {
  width: min(650px, 100%);
  padding: 14px;
  border: 2px solid var(--aqua);
  background: #051c14;
  color: #9bff68;
}

.transcript-terminal .terminal-label { color: var(--aqua); font-size: 12px; }
#audio-content { display: block; min-height: 58px; margin-top: 9px; padding: 8px; border: 0; border-radius: 0; background: #051c14; color: #9bff68; font-size: 13px; }
#audio-content::placeholder { color: #9bff68; opacity: 1; }

.analysis-phone-controls {
  display: flex;
  width: min(560px, 100%);
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.phone-action {
  min-height: 42px;
  padding: 7px 18px;
  border: 3px solid #111;
  border-radius: 999px;
  background: #3ca5a8;
  color: #080808;
  font-size: 13px;
  font-weight: 900;
}

.phone-action:disabled { cursor: not-allowed; opacity: 1; }
#listening-status { flex-basis: 100%; margin: 0; color: #102324; font-size: 12px; font-weight: 900; text-align: center; }

.analysis-result {
  position: absolute;
  top: 25%;
  left: 15%;
  width: 70%;
  max-height: 58%;
  padding: clamp(20px, 3vw, 40px);
  overflow: auto;
  border: 3px solid var(--aqua);
  border-radius: 3px;
  background: #051c14;
  box-shadow: 0 0 22px rgb(0 242 254 / 20%);
  color: #9bff68;
  font-size: clamp(14px, 1.35vw, 19px);
  line-height: 1.5;
}

.analysis-result.error { border-color: #ff4a4a; color: #ff9999; }
.result-value { margin: 0 0 .4em; }
.risk-value { color: var(--aqua); font-size: clamp(20px, 2.5vw, 34px); font-weight: 1000; }
.confidence-value { font-size: clamp(28px, 4vw, 52px); font-weight: 1000; }
.analysis-reasons-list { margin: .7em 0; padding-left: 1.4em; }
.analysis-reasons-list li { padding: 3px 0; }
.action-value { margin-top: 1em; }
.analysis-error-message { margin: 0 0 1em; }
.retry-analysis { padding: 8px 16px; border: 2px solid var(--aqua); background: transparent; color: var(--aqua); font-weight: 900; }
.about-dialog {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 5vh 5vw;
  background: rgb(0 27 31 / 82%);
}

.about-card {
  position: relative;
  display: flex;
  width: min(900px, 100%);
  max-height: 90vh;
  flex-direction: column;
  padding: clamp(24px, 4vw, 48px);
  border: 3px solid var(--paper);
  background: var(--gold);
  color: #101010;
}

.about-card h1 { margin: 0 0 22px; text-align: center; }
.about-card .corner-link { top: 8px; right: 10px; left: auto; color: #101010; text-shadow: none; }
.about-copy { overflow: auto; padding: 20px; border: 3px solid #111; background: #d6d6d6; font-weight: 700; line-height: 1.5; }
.about-copy p { margin: 0 0 1.2em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }

body.dashboard-locked { overflow: hidden; }
html.dashboard-locked { scrollbar-width: none; }
html.dashboard-locked::-webkit-scrollbar { display: none; }
.is-transitioning-out { opacity: 0; transform: scale(.8); }
.is-transitioning-in { opacity: 1; transform: scale(1); animation: swim-in 380ms ease both; }

@keyframes water-shimmer { to { transform: translateY(1.5%) scale(1.02); opacity: .72; } }
@keyframes current-drift { to { transform: translate(5%, 16px) rotate(2deg); } }
@keyframes bubble-rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .8; } 100% { transform: translateY(-65vh); opacity: 0; } }
@keyframes small-fish-cross { from { left: -8%; } to { left: 108%; } }
@keyframes orange-fish-cross { from { left: 8%; } to { left: calc(92% - 96px); } }
@keyframes button-bob { 50% { margin-top: 7px; } }
@keyframes audio-ripple { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.65); } 25% { opacity: var(--ripple-opacity, .8); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.75); } }
@keyframes swim-in { from { opacity: 0; transform: scale(1.2); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 700px) {
  .surface-kicker { top: 5%; }
  .phish-button { top: 13%; min-width: min(74vw, 440px); font-size: clamp(44px, 13vw, 76px); }
  .surface-instruction { top: 40%; }
  .mode-options { top: 46%; width: 92vw; gap: 10px; }
  .mode-button { width: 39%; min-height: 62px; border-width: 3px; border-radius: 18px; font-size: clamp(17px, 5vw, 25px); }
  .or-label { font-size: 18px; }
  .terminal-heading { top: 10%; }
  .terminal-heading h1 { font-size: clamp(20px, 5vw, 30px); }
  .terminal-frame { top: 23%; left: 5%; width: 90%; height: 52%; padding: 10px; border-width: 2px; border-radius: 18px; }
  .text-page .terminal-heading { top: 9vh; }
  .text-page .terminal-frame { top: 23vh; height: 52vh; }
  .text-frame { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .dashboard-or { display: none; }
  .terminal-card { padding: 10px; border-width: 2px; border-radius: 14px; }
  .terminal-label { font-size: clamp(10px, 2.8vw, 14px); }
  .text-entry-card #content { inset: 23% 6% 6%; width: 88%; height: 71%; padding: 9px; font-size: 12px; }
  .upload-prompt { gap: 9px; padding: 5px; font-size: 10px; }
  .document-icon { width: 38px; height: 46px; }
  .analysis-preview { inset: 23% 5% 5%; width: 90%; height: 72%; }
  .run-area { top: 79%; }
  .text-page .run-area { top: 79vh; }
  .analysis-submit { min-height: 46px; font-size: 14px; }
  .analysis-status { top: 89%; }
  .text-page .analysis-status { top: 89vh; }
  .text-deepen-bottom { left: 5%; width: 90%; height: 70vh; }
  .audio-frame { top: 23%; left: 5%; width: 90%; height: 70%; gap: 10px; padding: 12px; }
  .sonar-node { width: 160px; height: 160px; flex-basis: 160px; }
  .microphone-icon { width: 86px; height: 86px; font-size: 34px; }
  .audio-ripple { width: 95px; height: 95px; }
  .transcript-terminal { padding: 9px; }
  #audio-content { min-height: 45px; font-size: 11px; }
  .analysis-phone-controls { gap: 6px; }
  .phone-action { min-height: 36px; padding: 5px 10px; border-width: 2px; font-size: 11px; }
}

.surface-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00575a;
}

.surface-artboard {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #a6e6eb;
  container-type: inline-size;
  isolation: isolate;
}

.scene-background,
.scene-background img {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.scene-background {
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #a6e6eb;
}

.scene-background img {
  display: block;
  max-width: none;
  image-rendering: pixelated;
}

.art-sky { inset: 0 0 auto; width: 100%; height: 66.26%; }
.art-ocean { top: 15.15%; left: 0; width: 100%; height: 85.99%; animation: wave-drift 4.6s ease-in-out infinite; }
.art-lighting { top: 15.15%; left: 0; width: 100%; height: 88.48%; }
.art-clouds { top: 0%; left: 0; width: 100%; height: 25.49%; }

.catch-group,
.fish-orientation {
  position: absolute;
}

.catch-group {
  z-index: 2;
  inset: 0;
}

.orange-fish-swimmer {
  position: absolute;
  top: 36%;
  left: 8%;
  width: clamp(80px, 8cqw, 130px);
  aspect-ratio: 2.85;
  animation: orange-fish-swim 8s ease-in-out infinite alternate;
}

.fish-orientation {
  inset: 0;
  overflow: hidden;
  transform-origin: 86% 50%;
}

.fish-facing {
  position: absolute;
  inset: 0;
  animation: orange-fish-turn 16s steps(1, end) infinite;
}

.fish-sprite {
  position: absolute;
  top: 34.8%;
  left: 0;
  width: 100%;
  height: 55.18%;
  clip-path: inset(var(--fish-top) var(--fish-right) var(--fish-bottom) var(--fish-left));
  animation: fish-swim var(--swim-duration, 6s) linear var(--swim-delay, 0s) infinite;
  transform-origin: center;
}

.fish-left { --fish-top: 0%; --fish-right: 82%; --fish-bottom: 94%; --fish-left: 7%; --swim-duration: 5.2s; --swim-delay: -1.1s; }
.fish-orange {
  top: -389%;
  left: -371%;
  width: 1108%;
  height: 2511%;
  clip-path: none;
  animation: none;
}
.fish-right-high { --fish-top: 8%; --fish-right: 16%; --fish-bottom: 86%; --fish-left: 73%; --swim-duration: 5.8s; --swim-delay: -2.8s; }
.fish-right-low { --fish-top: 20%; --fish-right: 12%; --fish-bottom: 72%; --fish-left: 70%; --swim-duration: 6.4s; --swim-delay: -1.8s; }
.fish-left-low { --fish-top: 75%; --fish-right: 81%; --fish-bottom: 17%; --fish-left: 7%; --swim-duration: 5.6s; --swim-delay: -3.1s; }
.fish-right-bottom { --fish-top: 83%; --fish-right: 20%; --fish-bottom: 7%; --fish-left: 65%; --swim-duration: 6.8s; --swim-delay: -2s; }
.fish-center-bottom { --fish-top: 89%; --fish-right: 37%; --fish-bottom: 3%; --fish-left: 49%; --swim-duration: 5.9s; --swim-delay: -.9s; }

.art-seafloor { right: 0; bottom: 0; left: 0; width: 100%; height: 24.95%; }
.art-hook {
  top: 27.5%;
  left: 45.57%;
  width: 5.28%;
  height: 8.8%;
  transform: scaleY(1);
  transform-origin: 50% 0;
}

.bubble-stream { z-index: 2; overflow: hidden; }
.bubble-stream span {
  position: absolute;
  bottom: 13%;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border: 1px solid rgb(220 255 250 / 78%);
  border-radius: 50%;
  background: rgb(182 244 238 / 15%);
  box-shadow: inset 1px 1px 2px rgb(255 255 255 / 50%), 0 0 5px rgb(205 255 250 / 40%);
  opacity: 0;
  animation: individual-bubble-rise var(--duration) linear var(--delay) infinite;
}

.surface-page .phish-button {
  top: 19.8%;
  left: 29.2%;
  width: 41.6%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  animation: none;
  transition: transform 500ms ease, top 500ms ease;
}

.title-art { display: block; width: 100%; height: auto; image-rendering: pixelated; pointer-events: none; animation: button-bob 3.3s ease-in-out infinite; }
.surface-page .phish-button:disabled { cursor: wait; }
.surface-page.is-choosing .phish-button { transform: translateY(-2vh); }
.surface-page.is-choosing .scene-background {
  transform: translateY(-2%) scale(1.04);
  transition: transform 1.15s cubic-bezier(.68, 0, .32, 1);
}

.surface-page .mode-options {
  display: contents;
  margin: 0;
  padding: 0;
  border: 0;
}

.surface-page .mode-button {
  position: absolute;
  top: 54%;
  display: block;
  width: clamp(250px, 28vw, 400px);
  aspect-ratio: 1.9;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-shadow: none;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 300ms ease, transform 450ms cubic-bezier(.2, .75, .3, 1), filter 120ms ease;
}

.surface-page .mode-options[aria-hidden="false"] .mode-button { opacity: 1; transform: translateY(0); }
.surface-page .text-mode-button { left: 9%; }
.surface-page .audio-mode-button { right: 9%; }
.surface-page .mode-button img {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: auto;
  max-width: none;
  height: 100%;
  image-rendering: pixelated;
  transform: translateX(-50%);
  transition: filter 120ms ease;
}
.surface-page .mode-button:hover img,
.surface-page .mode-button[aria-pressed="true"] img { filter: brightness(1.08); }
.surface-page .mode-button:active img { filter: brightness(.93); }

.or-art {
  position: absolute;
  top: 58%;
  left: 50%;
  display: block;
  width: clamp(220px, 17.5vw, 275px);
  height: clamp(82px, 6vw, 108px);
  image-rendering: pixelated;
  pointer-events: none;
  opacity: 0;
  object-fit: fill;
  transform: translateX(-50%);
  transition: opacity 300ms ease;
}

.surface-page .mode-options[aria-hidden="false"] .or-art { opacity: 1; }
.surface-page.is-catching .art-hook { animation: hook-drop 700ms cubic-bezier(.32, .75, .4, 1) forwards; }
.surface-page.is-snared .catch-group {
  transform: translateY(calc(-1 * var(--fish-lift-distance, 80px)));
  transition: transform 1500ms cubic-bezier(.32, .68, .42, 1);
}
.surface-page.is-snared .fish-orientation {
  transform: rotate(var(--fish-catch-tilt, -25deg));
  transition: transform 1500ms cubic-bezier(.32, .68, .42, 1);
}
.surface-page.is-snared .art-hook {
  animation: none;
  transform: scaleY(var(--hook-target-scale, 1));
}
.surface-page.is-submerging .scene-background { transform: scale(1.2); transition: transform 1500ms cubic-bezier(.68, 0, .32, 1); }
.scene-background { transform-origin: 50% 58%; }

.surface-page .about-trigger {
  top: 3.2%;
  right: 7.4%;
  font-size: clamp(16px, 1.8vw, 21px);
}
.about-trigger { color: #d9952f; }
.terminal-page .about-trigger { top: 20px; right: 22px; }

@keyframes fish-swim {
  0% { transform: translateX(-110cqw); }
  50% { transform: translateX(0) translateY(-.6cqw); }
  100% { transform: translateX(110cqw); }
}

@keyframes orange-fish-swim {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100cqw - 100% - 16cqw)); }
}

@keyframes orange-fish-turn {
  0%, 49.99%, 100% { transform: scaleX(1); }
  50%, 99.99% { transform: scaleX(-1); }
}

@keyframes wave-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(.3cqw); }
}

@keyframes button-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -.8cqw; }
}

@keyframes hook-drop {
  from { transform: scaleY(1); }
  to { transform: scaleY(var(--hook-target-scale, 1)); }
}

@media (max-aspect-ratio: 3 / 5) {
  .surface-artboard { width: 100%; }
  .surface-page { background: #00575a; }
}

@media (max-width: 700px) {
  .surface-page .phish-button { width: min(70%, 320px); }
  .surface-page .mode-button {
    width: min(42vw, 210px);
  }
  .surface-page .text-mode-button { left: 1%; }
  .surface-page .audio-mode-button { right: 1%; }
  .or-art {
    top: 55.5%;
    width: clamp(96px, 28vw, 110px);
    height: clamp(34px, 10vw, 40px);
  }
}

@media (max-width: 700px) {
  .text-frame {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .text-frame .dashboard-or { display: none; }
}

@media (max-width: 320px) {
  html,
  body {
    min-width: 0;
  }
}

.audio-page .terminal-scene { height: 200vh; }

.audio-page .analysis-result {
  top: 110vh;
  left: 8%;
  z-index: 4;
  width: 84%;
  max-height: 80vh;
  padding: clamp(24px, 4vw, 56px);
  outline: 0;
  background: #051c14;
}

.audio-report-heading {
  margin: 0 0 1em;
  color: var(--aqua);
  font-size: clamp(14px, 2vw, 24px);
  letter-spacing: .14em;
}

@media (max-width: 700px) {
  .audio-page .analysis-result {
    top: 106vh;
    left: 5%;
    width: 90%;
    max-height: 82vh;
    padding: 18px;
    font-size: 13px;
  }
}

.terminal-page {
  background: #00575a;
}

.terminal-page::before {
  display: none;
}

.terminal-scene {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.terminal-fish {
  position: absolute;
  left: 0;
  width: 100%;
  height: 55.18%;
  opacity: .92;
  clip-path: inset(var(--fish-top) var(--fish-right) var(--fish-bottom) var(--fish-left));
  image-rendering: pixelated;
  animation: fish-swim var(--swim-duration) linear var(--swim-delay) infinite;
}

.terminal-fish-left { --fish-top: 0%; --fish-right: 82%; --fish-bottom: 94%; --fish-left: 7%; --swim-duration: 5.2s; --swim-delay: -1.1s; top: 34.8%; }
.terminal-fish-right { --fish-top: 8%; --fish-right: 16%; --fish-bottom: 86%; --fish-left: 73%; --swim-duration: 5.8s; --swim-delay: -2.8s; top: 34.8%; }
.terminal-fish-low { --fish-top: 20%; --fish-right: 12%; --fish-bottom: 72%; --fish-left: 70%; --swim-duration: 6.4s; --swim-delay: -1.8s; top: 34.8%; }

.terminal-floor {
  position: absolute;
  right: 0;
  left: 0;
  width: 100%;
  height: 24.95%;
  object-fit: fill;
  image-rendering: pixelated;
}

.terminal-floor-bottom { bottom: 0; }
.terminal-floor-top { top: 75vh; }
.text-page .terminal-floor-top { display: block; }
.text-page .terminal-floor-bottom { display: none; }
.text-page .terminal-scene { height: 100vh; }

.terminal-heading h1 {
  font-size: clamp(13px, 2.9vw, 22px);
  color: #101010;
}

.terminal-heading { z-index: 2; }
.terminal-frame { z-index: 1; }

.terminal-heading .terminal-eyebrow {
  display: none;
}

.text-page .terminal-frame {
  top: 10vh;
  left: 12%;
  width: 76%;
  height: 40vh;
  padding: 38px clamp(10px, 1.5vw, 20px) 12px;
}

.text-frame { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }

.text-entry-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.text-entry-card .terminal-label {
  position: absolute;
  top: clamp(10px, 1.1vw, 16px);
  left: 5%;
  font-size: clamp(9px, 1vw, 13px);
}

.text-entry-card #content {
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 38px 12px 12px;
  resize: none;
  border: 3px solid #111;
  border-radius: 14px;
  background: #d6d6d6;
  font-size: clamp(11px, 1.1vw, 15px);
}

.upload-card {
  padding: clamp(10px, 1.1vw, 16px);
}

.upload-card .terminal-label {
  font-size: clamp(9px, 1vw, 13px);
}

.dashboard-or {
  padding-top: 3px;
  font-size: clamp(12px, 1.4vw, 18px);
}

.text-page .run-area {
  top: 51vh;
}

.text-page .analysis-status {
  top: 61vh;
}

.text-deepen-bottom {
  top: 110vh;
  left: 9%;
  display: flex;
  width: 82%;
  height: min(82svh, 760px);
  max-height: calc(100svh - 56px);
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vh, 24px);
  padding: clamp(16px, 3vw, 36px);
  border: 3px solid #fff7dc;
  border-radius: clamp(20px, 3vw, 42px);
  background: #f7b748;
  box-shadow: 0 8px 0 rgb(0 0 0 / 25%);
  color: #101010;
  text-align: left;
}

.text-page.is-showing-results > .back-to-surface,
.text-page.is-showing-results > .about-trigger,
.audio-page.is-showing-results > .back-to-surface,
.audio-page.is-showing-results > .about-trigger {
  display: none;
}

.result-back-button {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 2px solid #101010;
  background: #f2f5e9;
  color: #101010;
  font-size: clamp(11px, 1.1vw, 14px);
  font-weight: 900;
}

.text-deepen-bottom h2 {
  flex: 0 0 auto;
  margin: 0;
  color: #101010;
  font-size: clamp(28px, 4vw, 52px);
  letter-spacing: .08em;
  text-align: center;
}

.audio-frame {
  top: 9vh;
  left: 11%;
  display: grid;
  width: 78%;
  height: 73vh;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(10px, 1.5vw, 24px);
  padding: clamp(54px, 7vh, 86px) clamp(16px, 3vw, 44px) clamp(16px, 2vw, 28px);
  border: 3px solid #fff7dc;
  border-radius: clamp(22px, 3vw, 44px);
  background: #f7b748;
}

.sonar-node {
  grid-column: 1;
  grid-row: 2;
  width: min(100%, 220px);
  height: min(100%, 220px);
  justify-self: center;
  flex-basis: auto;
}

.microphone-icon {
  width: clamp(100px, 15.6vw, 225px);
  height: clamp(100px, 15.6vw, 225px);
  border-color: transparent;
  background: #379fa2;
  box-shadow: none;
}

.audio-frame .transcript-terminal {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  padding: clamp(14px, 1.8vw, 24px);
  overflow: hidden;
  border: 0;
  border-radius: clamp(18px, 3vw, 42px);
  background: #d6d6d6;
  color: #101010;
}

.audio-frame .transcript-terminal .terminal-label {
  color: #101010;
  font-size: clamp(12px, 1.4vw, 19px);
}

.audio-frame #audio-content {
  height: calc(100% - 2em);
  min-height: 0;
  margin-top: 8px;
  padding: 4px;
  resize: none;
  background: #d6d6d6;
  color: #101010;
  font-size: clamp(12px, 1.2vw, 17px);
}

.audio-frame #audio-content::placeholder {
  color: #101010;
  opacity: 1;
}

.audio-frame .live-assessment-card {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  align-self: stretch;
  padding: clamp(14px, 1.8vw, 24px);
  border: 0;
  border-radius: clamp(18px, 3vw, 42px);
  background: #d6d6d6;
  box-shadow: none;
  text-align: left;
}

.audio-frame .live-assessment-card .terminal-label {
  font-size: clamp(12px, 1.4vw, 19px);
}

.audio-frame .live-assessment-value {
  margin-top: 12px;
  font-size: clamp(14px, 1.6vw, 22px);
  line-height: 1.4;
}

.audio-frame .analysis-phone-controls {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: 100%;
  justify-content: center;
  gap: 8px;
  padding-bottom: 2px;
}

.audio-frame .phone-action {
  min-height: 38px;
  padding: 5px clamp(10px, 1.4vw, 20px);
  border: 3px solid #101010;
  background: #3ca5a8;
  font-size: clamp(10px, 1.15vw, 15px);
}

.audio-frame #listening-status {
  color: #101010;
}

.audio-page .terminal-heading {
  top: 10.7vh;
  z-index: 2;
  pointer-events: none;
}

.audio-page .terminal-heading h1 {
  font-size: clamp(15px, 3.1vw, 30px);
  letter-spacing: .08em;
}

.mic-glyph {
  position: relative;
  display: block;
  width: 42px;
  height: 54px;
}

.mic-glyph i { position: absolute; display: block; background: #071819; }
.mic-head { top: 2px; left: 14px; width: 14px; height: 28px; border-radius: 8px; }
.mic-arc { bottom: 13px; left: 7px; width: 28px; height: 20px; border: 3px solid #071819; border-top: 0; border-radius: 0 0 16px 16px; background: transparent !important; }
.mic-stem { bottom: 5px; left: 20px; width: 3px; height: 12px; }
.mic-base { bottom: 2px; left: 13px; width: 17px; height: 3px; }

.audio-ripple {
  width: clamp(150px, 30vw, 450px);
  height: clamp(150px, 30vw, 450px);
  opacity: var(--ripple-opacity);
  transform: translate(-50%, -50%) scale(var(--ripple-from));
  animation: audio-ripple 3.2s ease-in-out infinite;
}

.audio-ripple.ripple-inner {
  --ripple-opacity: .8;
  --ripple-dim-opacity: .58;
  --ripple-from: .62;
  --ripple-to: .68;
  animation-delay: 0s;
}

.audio-ripple.ripple-middle {
  --ripple-opacity: .4;
  --ripple-dim-opacity: .28;
  --ripple-from: .82;
  --ripple-to: .88;
  animation-delay: .65s;
}

.audio-ripple.ripple-outer {
  --ripple-opacity: .15;
  --ripple-dim-opacity: .1;
  --ripple-from: 1;
  --ripple-to: 1.06;
  animation-delay: 1.3s;
}

@keyframes audio-ripple {
  0%, 100% {
    opacity: var(--ripple-opacity);
    transform: translate(-50%, -50%) scale(var(--ripple-from));
  }
  50% {
    opacity: var(--ripple-dim-opacity);
    transform: translate(-50%, -50%) scale(var(--ripple-to));
  }
}

.audio-frame .sonar-node { grid-row: 2; transform: translateY(-4vh); }

.audio-page .back-to-surface {
  top: 3.2%;
  left: 7.4%;
  z-index: 9;
}

.terminal-page.is-active .back-to-surface,
.terminal-page.is-active .about-trigger {
  position: fixed;
  top: 20px;
  z-index: 20;
}

.terminal-page.is-active .back-to-surface { left: 22px; }
.terminal-page.is-active .about-trigger { right: 22px; }

.analysis-result {
  top: 22%;
  left: 11%;
  width: 78%;
  max-height: 57%;
  border: 3px solid #fff7dc;
  border-radius: 28px;
  background:
    linear-gradient(#f7b748 0 0) padding-box,
    #051c14;
  box-shadow: 0 8px 0 rgb(0 0 0 / 25%);
}

.analysis-result:not(.error) {
  outline: clamp(10px, 2vw, 24px) solid #f7b748;
  outline-offset: -20px;
  background-color: #051c14;
}

.deep-result-card {
  display: grid;
  width: 100%;
  min-height: 0;
  flex: 1;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: clamp(10px, 1.7vh, 22px) clamp(14px, 3vw, 36px);
  margin: 0;
  padding: clamp(14px, 2.2vw, 28px);
  overflow: auto;
  border: 3px solid #101010;
  border-radius: clamp(18px, 3vw, 40px);
  background: #d6d6d6;
  color: #101010;
  font-size: clamp(13px, 1.45vw, 20px);
  line-height: 1.4;
}

.deep-result-card > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .5em;
  align-content: start;
}

.deep-result-card dt {
  font-weight: 900;
}

.deep-result-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.deep-result-card .deep-reasons,
.deep-result-card .deep-action {
  grid-column: 1 / -1;
}

#deep-reasons,
#audio-deep-reasons {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.deep-reasons-list {
  display: block;
  width: 100%;
  margin: 0;
  padding-left: 1.25em;
}

.deep-reasons-list li {
  display: list-item;
  padding: 2px 0;
}

.deep-scan-status {
  max-width: 100%;
  margin: 0;
  color: #101010;
  font-size: clamp(11px, 1.1vw, 14px);
  text-align: center;
}

.text-deepen-bottom .secondary-action {
  min-height: 42px;
  flex: 0 0 auto;
  border: 2px solid #101010;
  background: #f2f5e9;
  font-size: clamp(12px, 1.25vw, 16px);
}

.text-page .terminal-scene {
  height: 200vh;
}

.text-page .terminal-floor-top {
  top: 175vh;
}

.text-page .terminal-heading {
  top: 11vh;
}

.text-page .terminal-heading h1 {
  font-size: clamp(13px, 2.9vw, 22px);
  color: #101010;
}

.text-page .terminal-frame {
  top: 9vh;
  left: 11%;
  width: 78%;
  height: 72vh;
  padding-top: clamp(64px, 8vh, 86px);
}

.text-page .run-area {
  top: 84vh;
}

.text-page .analysis-status {
  top: 93vh;
}

.audio-page .run-area {
  top: 84vh;
}

.audio-page .analysis-status {
  top: 93vh;
}

.terminal-page {
  transition: transform 380ms ease, opacity 380ms ease;
  transform-origin: 50% 50%;
}

.terminal-page:not(.is-active) {
  display: none;
}

.terminal-page.is-transitioning-out {
  opacity: 0;
  transform: scale(.8);
}

.terminal-page.is-transitioning-in {
  animation: swim-in 460ms ease both;
}

.terminal-page .terminal-scene {
  pointer-events: none;
}

.analysis-result.error {
  border-color: #ff4a4a;
  color: #ff9999;
}

.analysis-result .retry-analysis {
  padding: 8px 16px;
  border: 2px solid var(--aqua);
  background: transparent;
  color: var(--aqua);
  font-weight: 900;
}

@media (max-width: 700px) {
  .audio-frame {
    top: 9vh;
    left: 5%;
    width: 90%;
    height: 73vh;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 8px;
    padding: 54px 10px 10px;
  }

  .audio-frame .phone-action {
    min-height: 32px;
    padding: 4px 7px;
    border-width: 2px;
    font-size: 9px;
  }

  .audio-frame .live-assessment-card,
  .audio-frame .transcript-terminal {
    padding: 10px;
  }

  .audio-frame .live-assessment-value {
    font-size: 12px;
  }

  .audio-ripple {
    width: clamp(150px, 30vw, 450px);
    height: clamp(150px, 30vw, 450px);
  }

  .deep-result-card {
    grid-template-columns: 1fr;
  }

  .deep-result-card .deep-reasons,
  .deep-result-card .deep-action {
    grid-column: 1;
  }

  .text-deepen-bottom {
    left: 5%;
    width: 90%;
    height: min(82svh, 760px);
    max-height: calc(100svh - 40px);
    padding: 14px;
  }

  .text-deepen-bottom h2 {
    font-size: 25px;
  }
}

@media (max-width: 700px) {
  .text-page .terminal-frame {
    top: 9vh;
    height: 72vh;
  }

  .text-page .run-area {
    top: 84vh;
  }

  .text-page .analysis-status {
    top: 93vh;
  }

  .audio-page .run-area {
    top: 84vh;
  }

  .audio-page .analysis-status {
    top: 93vh;
  }

  .text-frame {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .text-frame .dashboard-or { display: none; }
}
