:root {
  color-scheme: only light;
  --ink: #102128;
  --muted: #30454c;
  --accent: #17545e;
  --paper: #f8faf8;
  --line: #cad9d6;
  --on-dark: #f3fbf8;
  --muted-on-dark: #d4e9e4;
  --accent-on-dark: #a8e3d7;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .24em; }
a:focus-visible { outline: 3px solid #28818c; outline-offset: 5px; }
.wrap { width: min(1152px, calc(100% - 48px)); margin-inline: auto; }
.top, .foot, .tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.top, .foot { padding-block: 22px; }
.top { border-bottom: 1px solid var(--line); }
nav { display: flex; flex-wrap: wrap; gap: 18px; font-size: .9rem; }
nav a, .brand, .button { text-decoration: none; }
nav a:hover { text-decoration: underline; }
.languages { gap: 4px; }
.languages a { padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; font-weight: 700; }
.languages a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-dark); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { display: block; width: 116px; height: auto; }
.brand span, .eyebrow, .screen-label, figcaption { font: 700 .75rem/1.4 ui-monospace, monospace; letter-spacing: .12em; }
.brand span, .eyebrow { color: var(--accent); }
.skip { position: fixed; top: 12px; left: 12px; transform: translateY(-150%); background: white; padding: 12px; z-index: 10; }
.skip:focus { transform: none; }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(28px, 6vw, 88px); padding-block: clamp(54px, 8vw, 104px); }
h1, h2, h3, p { margin: 0 0 .55em; }
h1, h2, h3 { line-height: 1; letter-spacing: -.055em; }
h1 { font-size: clamp(2.8rem, 6.6vw, 6rem); margin-bottom: .27em; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: 1.42rem; }
p { color: var(--muted); line-height: 1.65; }
.eyebrow { margin-bottom: 15px; }
.eyebrow i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: #398b91; }
em { color: var(--accent); font-style: normal; }
.lead { max-width: 39ch; margin-bottom: 24px; font-size: clamp(1.06rem, 2vw, 1.24rem); }
.button { display: inline-flex; align-items: center; gap: 16px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 4px; font-weight: 720; background: #eef8f4; color: var(--ink); white-space: nowrap; }
.button:hover { background: #cde7df; }
.primary { background: #1e5860; border-color: #1e5860; color: white; }
.primary:hover { background: #17454c; }
.workbench { margin: 0; padding: 11px; border: 1px solid #789597; border-radius: 8px; background: #d2e0dc; box-shadow: 7px 7px 0 #203f4420; }
.screen { overflow: hidden; background: #152830; border: 1px solid #243c44; border-radius: 3px; }
.screen-label, figcaption { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px; color: var(--muted); }
.screen .screen-label, .screen figcaption { color: var(--muted-on-dark); }
.screen-label { border-bottom: 1px solid #315058; }
figcaption { border-top: 1px solid #315058; }
.mascot { display: block; width: 100%; background: linear-gradient(#182e38, #1d3942); }
.signal { opacity: .65; transition: opacity .2s; animation: pulse 2.3s steps(2, end) 2; }
.workbench:hover .signal { opacity: 1; }
@keyframes pulse { 50% { opacity: .18; } }
.section { padding-block: clamp(45px, 7vw, 86px); }
.workflow { border-block: 1px solid #315058; background: #192c34; color: var(--on-dark); }
.workflow p { color: var(--muted-on-dark); }
.workflow .eyebrow { color: var(--accent-on-dark); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.steps article { padding: 22px; border: 1px solid #47616a; border-radius: 5px; background: #253e47; }
.step-head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.step-head .eyebrow { margin: 0; }
.pixel-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; background: #dfede8; border: 1px solid #c1d8d1; }
.pixel-icon svg { width: 36px; height: 36px; transition: transform .18s steps(3); }
.steps article:hover svg { transform: translateY(-4px); }
.steps p, .tools p:last-child { margin-bottom: 0; }
.tools { margin-top: 42px; padding: clamp(20px, 4vw, 36px); border-radius: 5px 5px 0 0; background: #192c34; color: var(--on-dark); }
.tools p { color: var(--muted-on-dark); }
.tools .eyebrow { color: var(--accent-on-dark); }
.foot { padding-inline: clamp(20px, 4vw, 36px); border-top: 1px solid #47616a; border-radius: 0 0 5px 5px; background: #192c34; color: var(--on-dark); }
.foot .brand img { filter: brightness(0) invert(1); }
.foot .brand span { color: var(--accent-on-dark); }
.legal p { max-width: 62ch; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
@media (max-width: 650px) { .hero { grid-template-columns: 1fr; } .workbench { max-width: 470px; } }
@media (max-width: 430px) { .wrap { width: calc(100% - 30px); } .tools, .foot { align-items: flex-start; flex-direction: column; } .screen-label, figcaption { font-size: .65rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #28818c; outline-offset: 4px; }
.top { flex-wrap: wrap; }
.arcade-lead { max-width: 52ch; }
details { margin-top: 22px; padding: 12px; border: 1px solid var(--line); }
details p { margin-top: 10px; }
.arcade-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.arcade-tile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: clamp(12px, 2.5vw, 22px); text-align: left; border: 1px solid #47616a; border-radius: 5px; color: var(--on-dark); background: #192c34; }
.arcade-tile:nth-child(2n) { background: #253e47; }
.arcade-tile:hover, .arcade-tile:focus-visible { border-color: #6cb5ac; background: #2b4951; }
.arcade-tile:hover svg, .arcade-tile:focus-visible svg { transform: translateY(-4px); }
.arcade-tile-copy { display: grid; gap: 4px; }
.arcade-tile-copy strong { font-size: 1.24rem; }
.arcade-tile-copy span { color: var(--muted-on-dark); }
.arcade-tile-copy .eyebrow, .arcade-arrow { margin: 0; color: var(--accent-on-dark); }
.arcade-dialog { width: min(620px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: clamp(16px, 4vw, 28px); color: var(--on-dark); background: #192c34; border: 1px solid #648889; border-radius: 6px; }
.arcade-dialog::backdrop { background: #091a22cc; }
.arcade-dialog-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.arcade-dialog-head h3 { margin: 0; font-size: clamp(1.4rem, 4vw, 2.15rem); }
.arcade-dialog p { color: var(--muted-on-dark); }
.arcade-dialog :focus-visible, .tools :focus-visible, .foot :focus-visible, .workflow :focus-visible, .screen :focus-visible { outline-color: var(--accent-on-dark); }
.arcade-status { min-height: 1.65em; margin-top: 12px; }
.arcade-controls, .packet-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px; }
.arcade-controls button[aria-pressed="true"], .code-line.correct { background: #a8e3d7; color: #102128; }
.arcade-display { padding: 10px; border: 1px solid #55777e; background: #10252c; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.code-lines { padding-left: 2.25em; }
.code-lines li { padding-left: 4px; margin-block: 4px; }
.code-line { display: block; width: 100%; min-height: 38px; padding: 6px 8px; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; font: .86rem/1.45 ui-monospace, monospace; color: var(--on-dark); background: #253e47; border: 1px solid #55777e; border-radius: 4px; }
.code-line:enabled:hover { background: #345660; }
.packet-board { width: min(100%, 310px); table-layout: fixed; border-spacing: 4px; }
.packet-board td { height: 40px; text-align: center; background: #253e47; border: 1px solid #55777e; font-weight: 700; }
.packet-board .wall { background: #10252c; color: #a6bdbd; }
.packet-board .packet-current { background: #a8e3d7; color: #102128; }
.packet-current::after { content: ' ◆'; }
.text-button { border: 0; padding: 0; background: none; color: inherit; }
.text-button:hover { text-decoration: underline; }
.cookie-panel { position: fixed; z-index: 5; bottom: 12px; right: 12px; width: min(425px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 18px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 8px 30px #10262b40; }
.cookie-panel h2 { font-size: 1.4rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
#feedback-form { max-width: 580px; margin-top: 24px; }
#feedback-form label { display: grid; gap: 6px; margin-bottom: 15px; font-weight: 650; }
#feedback-form input, #feedback-form select, #feedback-form textarea { padding: 10px; border: 1px solid #789597; background: white; color: var(--ink); border-radius: 4px; }
#feedback-status { margin-top: 10px; }
.gallery figure { margin: 12px 0; }
.gallery img { max-width: 100%; height: auto; }
.gallery figcaption { color: var(--muted); padding-left: 0; }
.app-list { padding-left: 22px; }
@media (max-width: 650px) { .arcade-grid { grid-template-columns: 1fr; } }

.section-heading, .tools-actions { display: flex; align-items: center; gap: 16px; }
.section-heading { justify-content: space-between; }
.tools-actions { flex-wrap: wrap; }
.creature {
  --hop: -7px;
  --lean: -7deg;
  display: block;
  flex: none;
  width: 60px;
  padding: 4px;
  border: 1px solid #789597;
  border-radius: 5px;
  background: #d8eae4;
  color: inherit;
}
.creature svg { display: block; width: 100%; }
.creature-sprite { transform-box: fill-box; transform-origin: center bottom; }
.creature.is-arriving .creature-sprite, .creature:enabled:hover .creature-sprite, .creature:enabled:focus-visible .creature-sprite { animation: creature-hop .55s steps(4); }
.creature:enabled.is-reacting .creature-sprite { animation: creature-react .55s steps(5); }
.creature.is-reacting { box-shadow: inset 0 0 0 3px #4eaaa0; }
.creature--workbench { width: 100%; padding: 0; border: 0; border-radius: 0; background: #152830; }
.screen .creature--workbench:focus-visible { outline-offset: -4px; }
.creature--pip { --hop: -11px; --lean: 6deg; }
.creature--nib { --hop: -4px; --lean: 14deg; }
@keyframes creature-hop { 50% { transform: translateY(-4px); } }
@keyframes creature-react {
  32% { transform: translateY(var(--hop)) rotate(var(--lean)); }
  62% { transform: translateY(2px) scale(1.08, .92); }
  82% { transform: translateY(-3px); }
}
