@font-face {
  font-family: VT323;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/vt323/v18/pxiKyp0ihIEF2isfFJU.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #101918;
  --surface: #162725;
  --raised: #1c302d;
  --border: #45645b;
  --ink: #e6f5e9;
  --dim: #acc2b6;
  --teal: #9beada;
  --amber: #ffce75;
  --font: VT323, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.35rem / 1.2 var(--font); }
button, input, summary { font: inherit; }
button, summary { cursor: pointer; }
a { color: var(--teal); text-underline-offset: .17em; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
h1, h2, p { margin-block: 0 1rem; }
h1, h2, b, strong { font-weight: 400; }
h1, h2 { line-height: .96; }
p, li { overflow-wrap: anywhere; }
.wrap { width: min(66rem, calc(100% - 2rem)); margin-inline: auto; }
.skip-link { position: absolute; top: .75rem; left: .75rem; transform: translateY(-200%); z-index: 5; color: var(--bg); background: var(--amber); padding: .5rem; }
.skip-link:focus { transform: none; }
.masthead { border-bottom: 1px solid #2b4946; }
.masthead-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.masthead-inner { min-height: 3.35rem; width: min(106rem, calc(100% - 2.5rem)); }
.brand { color: var(--ink); display: inline-flex; align-items: center; gap: .65rem; font-size: clamp(1.2rem, 3vw, 1.65rem); text-decoration: none; }
.signal { display: block; width: .63rem; height: .63rem; background: var(--teal); outline: 1px solid var(--teal); outline-offset: 3px; transform: rotate(45deg); }
.masthead nav, .site-footer nav { display: flex; gap: .85rem; align-items: center; }
.menu { position: relative; }
.menu summary { list-style: none; color: var(--teal); padding: .35rem 0; white-space: nowrap; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; z-index: 4; top: calc(100% + .3rem); right: 0; min-width: 8.6rem; background: var(--surface); border: 1px solid var(--border); box-shadow: .25rem .25rem #0a1411; }
.menu-panel a { display: block; padding: .45rem .7rem; text-decoration: none; }
.menu-panel a:hover, .menu-panel a[aria-current] { color: var(--bg); background: var(--teal); }
.game-wrap { width: min(106rem, calc(100% - 2.5rem)); margin-block-start: .75rem; scroll-margin-top: 1rem; }
.game { border: 1px solid #4a736b; background: #112523; border-radius: .65rem; overflow: clip; box-shadow: 0 1rem 3rem #060f10a6; }
.game-top { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem clamp(1rem, 3vw, 2.8rem); padding: .6rem 1rem; border-bottom: 1px solid #4a736b; }
.game-top h1 { color: #e7f7ea; font-size: clamp(1.85rem, 3.5vw, 3rem); line-height: .95; margin: 0; }
.mode-tabs { display: flex; flex-wrap: wrap; gap: .35rem; }
.mode-tabs a { padding: .22rem .65rem .28rem; text-decoration: none; color: #bacfc8; border: 1px solid #396059; border-radius: .25rem; line-height: 1; }
.mode-tabs small { display: block; margin-top: .18rem; color: inherit; font-size: .94rem; }
.mode-tabs a[aria-current] { border-color: #f6d483; color: #201b16; background: #f6d483; }
.mode-tabs a:not([aria-current]):hover { color: var(--teal); border-color: var(--teal); }
.playfield { position: relative; display: grid; grid-template-rows: minmax(18.5rem, 1fr) auto; align-items: end; min-height: clamp(29rem, 74svh, 58rem); isolation: isolate; }
.dive-world { position: absolute; inset: 0; overflow: hidden; background: #0c4353; }
.ocean { position: absolute; inset: 0; display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.dive-hud { position: absolute; top: 1rem; left: 1rem; right: 1rem; display: flex; align-items: flex-start; justify-content: space-between; gap: .35rem; color: #f0fcff; pointer-events: none; }
.depth-readout { display: flex; gap: .35rem; }
.depth-readout > div, .dive-zone { padding: .33rem .65rem; background: #071d2cec; border: 1px solid #96e7d285; border-radius: .3rem; box-shadow: 0 .2rem #08232c75; }
.depth-readout span, .dive-hud strong { display: block; }
.depth-readout span { color: #b4eee6; font-size: .95rem; }
.dive-hud strong { font-size: clamp(1.4rem, 3.4vw, 2.35rem); line-height: 1; }
.answer-depth { min-width: 6rem; }
.answer-depth strong { color: var(--amber); white-space: nowrap; }
.dive-zone { font-size: clamp(.95rem, 2vw, 1.35rem); max-width: 55%; text-align: right; }
.depth-scale { position: absolute; top: 24%; bottom: 17%; right: 1.3rem; border-right: 1px solid #c2f5ecaa; color: #e1fff3; font-size: .93rem; pointer-events: none; }
.depth-scale span { position: absolute; top: var(--tick); right: .46rem; transform: translateY(-50%); white-space: nowrap; padding: .12rem .27rem; background: #071d2cd9; border-radius: .18rem; }
.depth-scale span::after { content: ''; position: absolute; width: .45rem; height: 1px; right: -.45rem; top: 50%; background: #d8fff3b5; }
.depth-scale i { position: absolute; width: .48rem; height: .48rem; right: -.27rem; top: var(--depth-progress, 0%); transform: translateY(-50%) rotate(45deg); background: var(--amber); box-shadow: 0 0 .55rem #ffd17a; transition: top .65s ease; }
.dive-steps { position: absolute; bottom: .7rem; left: 50%; transform: translateX(-50%); display: flex; gap: .26rem; padding: .38rem; background: #081e2ded; border: 1px solid #96e7d270; border-radius: .3rem; }
[data-stage="setup"] .dive-steps { display: none; }
.dive-step { min-width: 2.55rem; padding: .15rem .18rem; border-top: 2px solid #526978; color: #c7e2e9; text-align: center; font-size: .9rem; line-height: 1; }
.dive-step span, .dive-step strong { display: block; }
.dive-step span { color: #a1bcc4; font-size: .8rem; }
.dive-step[data-tier="1"], .dive-profile i[data-tier="1"] { --tier: #7dc7bd; }
.dive-step[data-tier="2"], .dive-profile i[data-tier="2"] { --tier: #4edce2; }
.dive-step[data-tier="3"], .dive-profile i[data-tier="3"] { --tier: #b39bff; }
.dive-step[data-tier="4"], .dive-profile i[data-tier="4"] { --tier: #ffce75; }
.dive-step[data-tier="0"] { --tier: #a9bfd3; }
.dive-step[data-tier] { border-top-color: var(--tier); color: var(--tier); }
.dive-step[data-active] { outline: 1px solid #fff0b6; outline-offset: 1px; }
.dive-console { position: relative; grid-row: 2; justify-self: center; width: min(calc(100% - 9rem), 48rem); margin: 0 0 4.2rem; min-width: 0; background: linear-gradient(120deg, #102b38f5, #0a2032f7); border: 1px solid #a0ebd993; border-radius: .45rem; box-shadow: 0 .45rem 0 #0716278c, 0 .75rem 1.45rem #061c2d55; }
[data-stage="done"] .playfield { grid-template-rows: auto auto; min-height: 0; }
[data-stage="done"] .dive-world { position: relative; height: clamp(17.5rem, 29vw, 25rem); border-bottom: 1px solid var(--border); }
[data-stage="done"] .dive-console { width: min(calc(100% - 2rem), 65rem); margin: 1rem 0; border-color: #3a6c67; box-shadow: none; }
.game-board { padding: clamp(.9rem, 2.2vw, 1.5rem); }
[data-stage="setup"] .dive-console { width: min(calc(100% - 9rem), 35rem); margin-bottom: 1.9rem; }
[data-screen="setup"] { display: grid; align-items: center; }
.game-date, .category { color: var(--teal); }
.game-date { min-height: 1.2em; margin-bottom: .55rem; }
.setup h2, .summary-board h2 { font-size: clamp(2.65rem, 5vw, 4.1rem); margin-bottom: .6rem; }
.setup p:not(.game-date) { color: var(--dim); max-width: 45ch; }
.timer-option { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; color: var(--dim); }
.timer-option input { accent-color: var(--amber); width: 1.1rem; height: 1.1rem; }
.primary { border: 1px solid var(--amber); background: var(--amber); color: #171a11; padding: .45rem .82rem; min-height: 2.75rem; box-shadow: 3px 3px #101918; border-radius: .12rem; }
.primary:hover { background: #ffe5aa; }
.telemetry { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem 1rem; margin-bottom: .65rem; color: var(--teal); border-bottom: 1px solid var(--border); }
.telemetry :last-child { margin-inline-start: auto; }
.question-board h2 { font-size: clamp(1.9rem, 3.25vw, 2.8rem); margin-bottom: .7rem; overflow-wrap: anywhere; }
.category { margin-bottom: .3rem; }
.answer-line { display: flex; gap: .5rem; margin: .2rem 0 0; }
.answer-line input { flex: 1; min-width: 0; min-height: 2.9rem; color: var(--ink); background: #081b28; border: 1px solid #679c91; border-radius: .2rem; padding: .25rem .65rem; }
.answer-line input::placeholder { color: #a1c0bc; }
.answer-line input:focus-visible { outline: 2px solid #b3f4de; outline-offset: 1px; }
.text-control { color: var(--teal); border: 0; background: transparent; padding: .2rem; min-height: 2.5rem; text-decoration: underline; }
.answer-line .text-control { padding-inline: .55rem; border: 1px solid var(--border); text-decoration: none; }
.notice:empty { margin: 0; }
.notice, .feedback-score, .final-score { color: var(--amber); }
.feedback { border-left: 2px solid var(--teal); padding-left: 1rem; }
.feedback p { margin-bottom: .5rem; }
.feedback-score { font-size: 1.8rem; }
.final-score { font-size: clamp(3rem, 8vw, 6rem); line-height: .9; }
.summary-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .9rem; margin-bottom: 1.25rem; }
.profile-label { color: var(--teal); margin-bottom: .3rem; }
.dive-profile { display: grid; grid-template-columns: repeat(7, 1fr); gap: .32rem; height: 4rem; padding: .3rem; align-items: start; border-top: 1px solid var(--border); background: repeating-linear-gradient(to bottom, #2d5a55 0 1px, transparent 1px 18px); margin-bottom: .85rem; }
.dive-profile i { display: block; height: max(3px, var(--bar)); background: var(--tier, #66738c); }
.review { margin: 0 0 1.5rem; padding-left: 1.45rem; }
.review li { border-top: 1px solid var(--border); padding: .45rem 0; }
.review strong { display: block; color: var(--teal); }
.more { display: inline-block; margin: .3rem .6rem .3rem 0; }
.post-game-ad { width: min(61rem, calc(100% - 2.5rem)); text-align: center; margin-block: 1.4rem 0; color: #9eb5ae; font-size: 1rem; }
.ad-banner { min-height: 90px; margin-top: .3rem; border: 1px solid #34504c; border-radius: .3rem; background: #131f20; }
.reading { margin-block: clamp(2rem, 5vw, 4.5rem); max-width: 49rem; }
.reading h1 { font-size: clamp(3rem, 6vw, 5rem); }
.reading h2 { font-size: clamp(2.4rem, 4vw, 3.5rem); }
.reading p, .reading li { color: var(--dim); }
.reading li { margin-bottom: .6rem; }
.game-content { width: min(72rem, calc(100% - 2.5rem)); display: grid; gap: 1rem; margin-block: clamp(2rem, 5vw, 4.5rem); }
.content-panel { min-width: 0; border: 1px solid #365b54; border-radius: .6rem; padding: clamp(1rem, 2.4vw, 2rem); background: linear-gradient(130deg, #172b2b, #142226); }
.content-panel h2 { font-size: clamp(1.95rem, 3.5vw, 3rem); margin-bottom: .65rem; }
.content-panel p, .content-panel li { color: var(--dim); }
.game-rules { display: grid; align-items: start; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.4rem clamp(1rem, 4vw, 3rem); }
.game-rules .game-lead { color: var(--ink); }
.game-rules ol { margin: 0 0 .8rem; padding-inline-start: 1.6rem; }
.game-rules li { margin-bottom: .43rem; }
.game-guide-link, .game-faq > p { margin: .8rem 0 0; }
.example-card { margin-top: .25rem; min-width: 0; padding: 1.05rem; background: #101f25; border: 1px solid #3a6b63; border-top: .2rem solid var(--amber); border-radius: .35rem; }
.example-card h3 { color: var(--amber); font-size: 1.12rem; margin: 0 0 .65rem; font-weight: 400; }
.example-card p { font-size: clamp(1.35rem, 2.6vw, 2.1rem); color: var(--ink); }
.example-card .example-answer { margin: 0; color: var(--teal); font-size: 1.3rem; }
.example-answer span { display: block; color: var(--dim); font-size: 1rem; }
.game-faq details { padding: 0 .85rem; margin-block: .45rem; border: 1px solid #355953; border-radius: .35rem; background: #101f23; }
.game-faq summary { display: list-item; padding-block: .62rem; padding-inline-start: .22rem; color: var(--ink); }
.game-faq summary::marker { color: var(--teal); }
.game-faq details p { margin: 0 0 .75rem; max-width: 65ch; padding-inline-start: .22rem; }
.variant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: .65rem; }
.variant-card { display: grid; align-content: start; gap: .32rem; min-width: 0; padding: .8rem .9rem; background: #101f25; border: 1px solid #3a6b63; border-left: .19rem solid #6fc4b0; border-radius: .35rem; text-decoration: none; }
.variant-card:hover { border-color: var(--teal); color: var(--ink); }
.variant-card strong { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: 1.42rem; }
.variant-card > span { color: var(--dim); font-size: 1.12rem; }
.archive-link { text-decoration: none; }
.archive-link:hover, .archive-link[aria-current], .menu summary[aria-current] { color: var(--amber); }
.index-content h1 { font-size: clamp(2.5rem, 5.5vw, 4.4rem); margin-bottom: .6rem; }
.index-content .content-panel > p { max-width: 64ch; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: .65rem; padding: 0; margin: 1.15rem 0 0; list-style: none; }
.archive-grid[data-daily-schedule] { grid-template-columns: minmax(0, 1fr); }
.archive-card time { white-space: nowrap; }
.archive-card[data-today] { border-left-color: var(--amber); }
[data-archive-more] { margin-top: 1rem; }
.inner-page h1 { padding-bottom: .8rem; border-bottom: 1px solid var(--border); }
.inner-page h2 { font-size: clamp(1.75rem, 3.3vw, 2.45rem); margin: 2rem 0 .45rem; line-height: 1; }
.support-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1.5rem; }
.support-links a { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: .36rem .65rem; border: 1px solid var(--border); border-radius: .25rem; text-decoration: none; }
.support-links a:hover, .site-footer a[aria-current] { color: var(--amber); border-color: var(--amber); }
.dive-variants { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1.1rem; }
.dive-variants a { padding: .24rem .4rem; border: 1px solid var(--border); text-decoration: none; background: var(--bg); font-size: .98rem; }
.dive-variants a[aria-current], .dive-variants a:hover { border-color: var(--amber); color: var(--amber); }
.site-footer { padding-block: 1.5rem; border-top: 1px solid var(--border); }
.site-footer p { margin: .3rem 0 0; color: var(--dim); }
.site-footer nav { flex-wrap: wrap; }

@media (max-width: 46rem) {
  body { font-size: 1.2rem; }
  .masthead-inner, .game-wrap { width: calc(100% - 1.2rem); }
  .masthead-inner { flex-wrap: wrap; gap: .35rem .6rem; }
  .masthead nav { gap: .5rem; }
  .game-top { padding: .62rem .7rem; }
  .mode-tabs { flex: 1 1 auto; }
  .mode-tabs a { flex: 1 1 8rem; padding-block: .4rem; min-height: 2.75rem; }
  .playfield { grid-template-rows: auto auto; min-height: 0; }
  .dive-world { position: relative; aspect-ratio: 1.19; min-height: 280px; max-height: 430px; border-bottom: 1px solid var(--border); }
  .dive-hud { top: .6rem; left: .65rem; right: .65rem; }
  .answer-depth { min-width: 0; }
  .depth-scale { top: 27%; bottom: 23%; right: .6rem; font-size: .8rem; }
  .dive-steps { right: .65rem; left: .65rem; bottom: .55rem; transform: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .dive-step { min-width: 0; font-size: .78rem; padding-inline: 0; }
  .dive-console, [data-stage="setup"] .dive-console, [data-stage="done"] .dive-console { justify-self: stretch; width: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .game-board { min-height: 0; }
  .answer-line input, .answer-line button { min-height: 2.75rem; }
  .post-game-ad { width: calc(100% - 1.2rem); }
  .game-content { width: calc(100% - 1.2rem); }
  .game-rules { grid-template-columns: 1fr; }
  .ad-banner { min-height: 64px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 28rem) {
  .answer-line { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .answer-line input { grid-column: 1 / -1; width: 100%; }
  .dive-zone { max-width: 44%; }
}
@media (prefers-reduced-motion: reduce) { .depth-scale i { transition: none; } }
