/* Site layout, typography and results. Canvas styles are in ocean.css. */
@font-face {
  font-family: VT323;
  src: url("/assets/vt323.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --font-display: VT323, monospace;
  --font-mono-ui: VT323, monospace;
  --color-abyss: #050a14;
  --color-foam: #e8f1ff;
  --color-drift: #7d93b8;
  --color-lumen-pink: #ff5d8f;
  --color-lumen-orange: #ff9a45;
  --color-shallow: #101d33;
  --color-tier-tooclever: #ff9f43;
  --tier-plankton: #8fa3c4;
  --tier-tooclever: #ff9f43;
  --tier-schooler: #4de3ff;
  --tier-rare: #ff5252;
  --tier-deepcut: #9d7bff;
  --tier-krillion: #ffd166;
  --tier-miss: #3d4f6e;
  --hairline: #7d93b838;
  --color-hairline: var(--hairline);
  font-family: var(--font-mono-ui);
  line-height: 1.5;
  color: var(--color-foam);
  background: var(--color-abyss);
}

:root.colorblind {
  --color-drift: #dbe5f5;
  --tier-plankton: #d7e1f2;
  --tier-tooclever: #ffb35c;
  --tier-schooler: #7deaff;
  --tier-rare: #ff7bac;
  --tier-deepcut: #bfa7ff;
  --tier-krillion: #ffe08a;
  --tier-miss: #a3b6d6;
  --hairline: #c6d5ec80;
}

*, ::before, ::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
a.privacy { font-size: 15px; color: var(--color-drift); text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 2px solid var(--color-lumen-orange); outline-offset: 3px; }

.ocean { position: absolute; inset: 0; }
.ds-root:not([data-phase="intro"]) .ds-surface {
  visibility: hidden;
}
.ds-done {
  background: linear-gradient(#08111ef5, #050a14 75%);
}
.ds-input:focus-visible { outline: none; }
#countdown {
  width: max-content;
  max-width: calc(100% - 24px);
  text-align: center;
  white-space: normal;
}
.ds-intro-meta, .ds-intro-meta nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.surface-tools {
  position: absolute;
  top: 116px;
  right: 10px;
  z-index: 31;
  display: grid;
  gap: 6px;
}

.surface-tools button {
  width: 34px;
  height: 26px;
  padding: 0;
  background: #0b1526bf;
  border: 0;
  box-shadow: 0 0 0 2px #060d1ae6;
  color: var(--color-drift);
  opacity: .85;
  display: grid;
  place-items: center;
}

.surface-tools button:hover { color: var(--color-lumen-orange); }
.surface-tools svg { width: 18px; height: 18px; }
@media (max-width: 699px) { .surface-tools { top: 102px; } }
@media (max-width: 699px) {
  .ds-root[data-phase="intro"] .surface-tools {
    top: calc(16px + env(safe-area-inset-top));
    grid-auto-flow: column;
  }
  .ds-root[data-phase="intro"] .ds-mute {
    top: calc(16px + env(safe-area-inset-top));
    right: 90px;
  }
}

.game-dialog label { display: block; margin: 12px 0; font-size: 18px; }
.game-dialog #characters { display: grid; gap: 6px; }
.game-dialog #characters button { padding: 5px; text-align: left; }

.results-heading, .result-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.results-heading > span, .fathom {
  color: var(--color-drift);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.result-total { justify-content: flex-start; margin-top: 16px; }
#result-score { font-size: 80px; font-weight: 400; line-height: 1; }
#result-depth { color: var(--color-lumen-orange); margin-left: 8px; }
.result-tier { margin-top: 10px; font-size: 26px; letter-spacing: .12em; }
.result-actions { margin-top: 16px; }

.fathom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}

.fathom::after { content: ""; flex: 1; border-top: 1px solid var(--hairline); }
.fathom-depth { opacity: .68; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.result-footer { margin-top: 12px; }
.result-actions #copy-result, .ds-done .result-button-quiet {
  min-height: 48px; padding: 8px 15px; text-transform: uppercase; letter-spacing: .12em;
  border: 2px solid var(--color-abyss); box-shadow: 0 0 0 1px var(--hairline);
}
.result-actions #copy-result { flex: 1; background: var(--color-lumen-pink); color: var(--color-abyss); }
.ds-done .result-button-quiet { background: #101d33; color: var(--color-foam); }
.next-dive, .result-feedback > label, .result-feedback legend {
  color: var(--color-drift); text-transform: uppercase; letter-spacing: .12em;
}
.next-dive { margin-top: 24px; }
.next-dive time { color: #72cee4; }
.result-feedback { margin-top: 28px; font-size: .85em; font-weight: 400; }
.launch-welcome { max-width: 440px; margin: 0 auto 18px; font-size: 20px; line-height: 1.35; font-weight: 400; text-align: center; }
.launch-welcome p { margin: 0 0 8px; }
.news-entry, .privacy-page { font-size: 18px; line-height: 1.55; font-weight: 400; font-synthesis: none; text-shadow: none; }
.news-entry time { color: var(--color-drift); font-size: 16px; }
.news-entry h3 { font-size: 22px; font-weight: 400; margin: 10px 0 8px; }
.news-entry p, .privacy-page p { margin: 0; color: #9aaecb; font-weight: 400; letter-spacing: .01em; text-shadow: none; }
.colorblind .news-entry p, .colorblind .privacy-page p { color: var(--color-drift); }
#news .news-entry + .news-entry { border-top: 1px solid var(--hairline); padding-top: 20px; margin-top: 20px; }
.personal-statistics { margin: 0; font-size: 20px; font-weight: 400; }
.personal-statistics > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.personal-statistics dt { color: var(--color-drift); }
.personal-statistics dd { margin: 0; }
.result-feedback > label, .result-feedback legend { letter-spacing: .07em; font-weight: 400; }
.result-feedback fieldset { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.result-feedback legend { padding: 0; }
#dive-feedback fieldset { margin-top: 14px; }
#developer-date { font: inherit; color: inherit; background: var(--color-abyss); }
.feedback-entry, .feedback-ratings { display: flex; gap: 8px; margin-top: 6px; }
.feedback-entry input { flex: 1; min-width: 0; padding: 7px 0; border: 0; border-bottom: 1px solid var(--hairline); background: transparent; }
.feedback-ratings label { position: relative; cursor: pointer; }
.feedback-ratings input { position: absolute; opacity: 0; }
.feedback-ratings span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--hairline); color: var(--color-drift); }
.feedback-ratings input:checked + span, .feedback-ratings input:focus-visible + span { border-color: #72cee4; color: #72cee4; }
.result-feedback [role="status"] { color: #72cee4; }

.result-section { margin-top: 30px; }
.result-section > h2 { font-weight: 400; }
.result-section:last-child { margin-bottom: 24px; }
.result-chart svg { display: block; width: 100%; height: auto; }
.result-chart text { fill: var(--color-drift); font-size: 12px; }
.result-chart .chart-grid { stroke: var(--hairline); }
.result-chart .chart-line { fill: none; stroke: var(--color-lumen-orange); stroke-width: 1.4; }
.result-chart .chart-point { fill: var(--color-lumen-orange); }
.result-chart .chart-current { fill: var(--color-lumen-pink); }
.result-list li, .catch-round { border-bottom: 1px solid var(--hairline); }
.result-list li { display: flex; align-items: baseline; gap: 14px; padding: 4px 6px; color: var(--color-drift); }
.result-list li span { width: 4rem; flex-shrink: 0; }
.result-list li.current { background: #101d3380; color: var(--color-foam); }
.catch-round { padding: 8px 0; color: var(--color-drift); }
.catch-round summary { cursor: pointer; color: var(--color-foam); }
.catch-round p { margin: 5px 0 0 14px; }
.score-distribution { margin-top: 24px; }
.distribution-curve { fill: none; stroke: #72cee4; stroke-width: 1.8; stroke-linejoin: round; }
#ranked-score-shade stop { stop-color: #72cee4; }
.distribution-axis { stroke: var(--color-drift); opacity: .45; }
.distribution-marker { stroke: var(--color-lumen-pink); stroke-width: 1.5; }
.score-distribution text { font-size: 10px; }
#score-percentile { color: #72cee4; letter-spacing: .11em; text-transform: uppercase; }
.result-chart .distribution-you { fill: var(--color-lumen-pink); letter-spacing: .08em; }
#dive-log .chart-grid { stroke-dasharray: 2 3; }
#dive-log image, .bearing-icon, .catch-list img { image-rendering: pixelated; }
.dive-trail { opacity: .55; }
.bearing-icon { width: 18px; height: 18px; align-self: center; }
.catch-round .catch-summary { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; gap: 8px; align-items: center; list-style: none; }
.catch-summary::-webkit-details-marker { display: none; }
.catch-answer > * { display: block; }
.catch-prompt { color: var(--color-drift); text-transform: uppercase; letter-spacing: .07em; }
.catch-count { color: var(--color-lumen-orange); }
.catch-count:empty { display: none; }
.catch-description { display: block; color: var(--color-drift); font-weight: 400; }
.catch-index { color: var(--color-drift); }
.catch-points::after { content: " +"; color: var(--color-drift); }
.catch-round[open] .catch-points::after { content: " −"; }
.catch-key { padding: 10px 0 4px 2rem; }
.catch-tabs { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.catch-tabs button, .catch-search { background: #101d3380; border: 1px solid var(--hairline); padding: 4px 8px; }
.catch-tabs button[aria-pressed="true"] { border-color: var(--color-foam); }
.catch-search { width: 100%; margin-bottom: 5px; }
.catch-list { max-height: 18rem; overflow-y: auto; overscroll-behavior: contain; }
.catch-list li { display: flex; align-items: center; gap: 8px; padding: 4px; color: var(--color-foam); }
.catch-list li strong { margin-left: auto; flex-shrink: 0; }
.catch-list img { width: 16px; height: 16px; flex-shrink: 0; }
.privacy-page a { text-decoration: underline; }
.privacy-page { max-width: 42rem; margin: 0 auto; padding: 32px 20px 48px; }
.privacy-page h1 { margin: 20px 0 12px; font-size: 28px; font-weight: 400; }
.privacy-page h2 { margin: 20px 0 8px; font-size: 22px; font-weight: 400; }
.privacy-page p + p { margin-top: 8px; }
.logbook { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.logbook div { display: flex; align-items: baseline; gap: 6px; }
.logbook dt { color: var(--color-drift); text-transform: uppercase; letter-spacing: .12em; }
.logbook dd { color: var(--color-foam); margin: 0; }


/* Autocorrect suggestion: a tappable CRT pill. ocean.css keeps the wrapper click-through. */
.ds-correction { filter: drop-shadow(0 0 10px #ff9a4559); }
.ds-correction-confirm {
  pointer-events: auto;
  display: block;
  border: 0;
  margin: 0;
  color: var(--color-drift);
  background:
    repeating-linear-gradient(#0000 0 2px, #e8f1ff0a 2px 3px),
    #0b1526f5;
  box-shadow: inset 0 0 0 2px var(--color-lumen-orange), inset 0 0 18px #ff9a4526;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  animation: ds-correction-in .18s steps(3) both;
}
.ds-correction-confirm:hover { color: var(--color-foam); background-color: #101d33f5; }
.ds-correction-confirm:active { transform: translateY(2px); }
.ds-correction-confirm:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--color-foam), inset 0 0 18px #ff9a4540; }
.ds-correction-ask {
  display: block;
  font-size: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
#correction-to {
  color: var(--color-lumen-orange);
  font-weight: 400;
  font-size: 24px;
  text-shadow: 0 0 6px #ff9a4580;
}
.ds-correction-q { color: var(--color-lumen-orange); font-size: 24px; }
.ds-correction-typed { display: block; font-size: 14px; opacity: .7; text-decoration: line-through; }
.ds-correction-hint { color: var(--color-foam); text-transform: uppercase; }
.ds-correction-key {
  display: inline-block;
  color: var(--color-lumen-orange);
  animation: ds-correction-blink 1s steps(1) infinite;
}
@keyframes ds-correction-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes ds-correction-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ds-correction-confirm, .ds-correction-key { animation: none; }
}
