:root {
  color-scheme: light;
  --paper: #f4f1e7;
  --card: #faf8ee;
  --ink: #173536;
  --sub: #45615e;
  --rule: #aeb2a2;
  --rust: #a63725;
  --navy: #102d3a;
  --accent: #e8b564;
  --serif: "STIX Two Text", "Baskervville", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.45 var(--sans); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-thickness: .07em; text-underline-offset: .16em; }
a:hover { color: var(--rust); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid #007b80; outline-offset: 4px;
}
.page { max-width: 1300px; margin: auto; padding: 0 clamp(16px, 4.8vw, 68px) 24px; }
.skip-link { position: fixed; z-index: 4; top: 4px; left: 4px; padding: .6em; color: var(--ink); background: white; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.masthead {
  min-height: 64px; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; border-bottom: 1px solid var(--rule);
}
.home-link { display: inline-flex; align-items: center; gap: .48rem; text-decoration: none; }
.home-link b { font: 800 1.24rem/1 var(--sans); letter-spacing: -.055em; }
.arcade-word { border-left: 1px solid var(--rule); margin-left: .18rem; padding-left: .65rem; color: var(--sub); }
.pennants { display: inline-grid; grid-template-columns: repeat(3, 6px); gap: 2px; align-items: start; margin-right: .25rem; }
.pennants i { display: block; width: 6px; height: 14px; background: var(--rust); transform: skew(-12deg); }
.pennants i:nth-child(2) { margin-top: 2px; height: 10px; }
.pennants i:last-child { margin-top: 4px; height: 6px; }
.source-nav, .arcade-word { font-size: .88rem; font-weight: 600; }
.source-nav { text-decoration: none; }
.game-intro { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin: clamp(24px, 4.7vw, 65px) 0 clamp(22px, 3vw, 42px); }
h1, h2, p, figure { margin: 0; }
h1 { font: 500 clamp(3.2rem, 7.7vw, 6.6rem)/.96 var(--serif); letter-spacing: -.073em; }
h1 em { font-weight: 400; }
.game-intro > p { max-width: 23ch; padding-bottom: .22em; font-size: clamp(1rem, 1.65vw, 1.3rem); line-height: 1.33; }
.instrument { display: grid; grid-template-columns: minmax(0, 1.86fr) minmax(275px, 1fr); background: var(--card); border: 1px solid #8c9a8e; box-shadow: 0 4px 0 -1px #c9c8b9; }
.watch { display: flex; flex-direction: column; min-width: 0; margin: 0; background: var(--navy); color: #f8f5e7; }
.seascape {
  flex: 1; width: 100%; aspect-ratio: 3 / 2; position: relative;
  background-color: var(--navy);
  background-image: url("./coast.webp");
  /* The art is composed for the instrument. Keep the lantern coordinate
     registered to the complete scene at every stage size. */
  background-size: 100% 100%; background-position: center; background-repeat: no-repeat;
  overflow: hidden;
}
.lamp {
  position: absolute; left: 71.3%; top: 31.6%;
  width: clamp(7px, 1.2vw, 14px); aspect-ratio: 1.3; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--signal-colour, #fff1b5); opacity: 0;
}
#hl-game[data-lit="on"][data-steady="false"] .lamp {
  box-shadow: 0 0 5px 3px var(--signal-colour, #fff1b5), 0 0 20px 9px var(--signal-colour, #fff1b5);
  opacity: 1;
}
.watch-caption {
  display: flex; align-items: center; justify-content: space-between; min-height: 44px;
  padding: 7px clamp(14px, 2vw, 26px); border-top: 1px solid #77908d;
  background: #122e37; color: #e7e9dd; font: 600 .86rem/1.3 var(--mono);
}
.light-state, .watch-time { display: inline-flex; align-items: center; gap: .55rem; }
.state-dot { width: 9px; height: 9px; border: 1px solid #a5bcb5; border-radius: 50%; }
#hl-game[data-lit="on"][data-steady="false"] .state-dot { background: var(--signal-colour, #fff1b5); border-color: var(--signal-colour, #fff1b5); }
.clock-icon { display: inline-block; width: 13px; height: 13px; border: 1.1px solid currentColor; border-radius: 50%; position: relative; }
.clock-icon::after { content: ""; position: absolute; left: 5px; top: 2px; width: 3px; height: 4px; border-left: 1px solid; border-bottom: 1px solid; }
.console { display: flex; flex-direction: column; justify-content: center; border-left: 1px solid #627b78; }
.console-inner { margin: auto 0; padding: clamp(23px, 3vw, 45px); }
.round {
  color: var(--rust); font: 700 .79rem/1.3 var(--mono);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: .75rem;
}
.console h2 { font: normal clamp(2rem, 3.5vw, 3.15rem)/1.05 var(--serif); letter-spacing: -.051em; }
#hl-prompt { color: var(--sub); margin: .75rem 0 1.2rem; font-size: 1rem; max-width: 33ch; }
.controls { display: grid; gap: .65rem; }
.controls button {
  min-height: 46px; padding: .65rem .9rem; border-radius: 3px;
  font-size: 1rem; line-height: 1.2; font-weight: 700;
}
.watch-button, .next-button { border: 1px solid var(--rust); background: var(--rust); color: white; }
.watch-button:hover:not(:disabled), .next-button:hover:not(:disabled) { background: #852d20; }
.watch-button::before { content: ""; display: inline-block; width: 0; height: 0; margin-right: .55rem; border: .31rem solid transparent; border-left: .5rem solid currentColor; border-right: 0; vertical-align: .06em; }
.signal-key { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; border: 1px solid #263e39; color: #f7f8eb; background: #264a43; box-shadow: 0 2px 0 #142c28; }
.signal-key:disabled { border-color: #c4c6b7; color: #54625c; background: #eeeee4; box-shadow: none; }
.signal-key kbd { border: 1px solid currentColor; border-radius: 3px; padding: .05em .32em; margin-left: .45em; font: 600 .72rem/1.3 var(--mono); vertical-align: .05em; }
#hl-game[data-state="record"][data-lit="on"] .signal-key:not(:disabled) { transform: translateY(2px); box-shadow: none; }
#hl-game:is([data-state="ready"], [data-state="record"], [data-state="result"], [data-state="complete"]) .watch-button {
  border-color: #909e92; color: var(--ink); background: transparent;
}
#hl-game:is([data-state="ready"], [data-state="record"], [data-state="result"], [data-state="complete"]) .watch-button:hover:not(:disabled) { background: #eeeede; }
.preferences { display: flex; flex-wrap: wrap; gap: 3px 1.25rem; padding: 5px clamp(16px, 3vw, 45px); border-top: 1px solid #c4c6b7; }
.option { display: flex; align-items: center; min-height: 34px; gap: .44rem; cursor: pointer; font-size: .87rem; font-weight: 600; }
.option input { margin: 0; width: 16px; height: 16px; accent-color: #286252; }
.result { padding: clamp(20px, 3vw, 40px); margin-top: 23px; background: var(--card); border: 1px solid var(--rule); }
.result-header { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.result h2 { font: 500 clamp(1.8rem, 3.3vw, 2.8rem)/1.08 var(--serif); letter-spacing: -.04em; }
#hl-score { color: var(--rust); font-size: clamp(1.1rem, 2.8vw, 1.85rem); }
#hl-detail, .evidence-text { margin: .7rem 0; max-width: 85ch; }
.traces { display: grid; gap: .45rem; margin: 1.2rem 0; max-width: 760px; }
.trace-row { display: grid; grid-template-columns: minmax(105px, max-content) minmax(0, 1fr); gap: .65rem; align-items: center; font-size: .88rem; }
.trace { display: flex; overflow: hidden; background: #d9e0d8; min-height: 16px; border: 1px solid #687d75; border-radius: 2px; }
.trace span { flex-basis: 0; min-width: 0; }
.trace span[data-lit="empty"] { background: repeating-linear-gradient(135deg, #f4f2e9 0 4px, #c3cbc3 4px 5px); }
.trace span[data-lit="on"] { background: #966128; }
.trace span[data-lit="off"] { background: #d9e0d8; }
.evidence-links { display: flex; gap: .45rem 1.3rem; flex-wrap: wrap; font-weight: 650; font-size: .92rem; }
.game-footer { display: flex; align-items: start; justify-content: space-between; gap: .5rem 1.5rem; color: var(--sub); margin: 22px 0 0; font-size: .875rem; }
.game-footer > p { max-width: 60ch; }
.footer-notes { display: flex; flex-wrap: wrap; justify-content: end; gap: .5rem 1.25rem; }
@media (max-width: 760px) { .footer-notes { justify-content: start; } }
.game-footer details { flex-shrink: 0; max-width: min(100%, 43ch); }
.game-footer summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.game-footer details > p { margin-top: .45rem; }
.noscript { padding: 1rem 0; }
@media (max-width: 760px) {
  .game-intro { display: block; margin: 24px 0 19px; }
  .game-intro > p { max-width: none; padding: 0; margin-top: .65rem; }
  .instrument { grid-template-columns: 1fr; }
  .console { border-left: 0; }
  .console-inner { padding: 20px clamp(16px, 4.6vw, 36px); }
  .console-inner .round { margin-bottom: .35rem; }
  .console h2 { font-size: 2.15rem; }
  #hl-prompt { margin: .45rem 0 .9rem; max-width: none; }
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .next-button { grid-column: 1 / -1; }
  .preferences { padding-inline: clamp(16px, 4.6vw, 36px); }
  .game-footer { flex-direction: column; }
}
@media (max-width: 450px) {
  .masthead { min-height: 46px; }
  .page { padding-inline: 13px; }
  .game-intro { margin-top: 20px; }
  .game-intro h1 { font-size: clamp(2.72rem, 12vw, 3.3rem); }
  .watch-caption { min-height: 32px; font-size: .8rem; }
  .arcade-word, .source-nav { font-size: .78rem; }
  .console-inner { padding: 16px; }
  .signal-key kbd { display: none; }
  .game-footer { margin-top: 17px; }
}
@media (forced-colors: active) {
  .lamp { forced-color-adjust: none; }
  .trace span[data-lit="on"] { background: Highlight; }
  .state-dot { border: 1px solid CanvasText; }
}
