:root {
  color-scheme: dark;
  --night: #0c1420;
  --panel: #152433;
  --line: #446074;
  --text: #f2f0e7;
  --muted: #bdced7;
  --mint: #a9ecd3;
  --gold: #ffce8e;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--text); background: radial-gradient(ellipse at 90% 25%, #1c3842, transparent 50%), var(--night); font: 1rem/1.65 system-ui, sans-serif; }
a { color: inherit; text-underline-offset: 5px; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .7; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; color: var(--night); background: var(--gold); }
.skip-link:focus { left: 12px; }
.demo-notice { padding: 12px 0; color: #172735; background: #f2dcc1; font-size: .88rem; line-height: 1.5; }
.demo-notice strong { font-weight: 800; }
.world-header { border-bottom: 1px solid #44607466; }
.header-row, .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header-row { padding-block: 18px; }
.logo { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; }
.brand-toucan { width: 48px; height: 48px; object-fit: contain; }
.brand-lockup { display: grid; line-height: 1; gap: 5px; }
.brand-lockup strong { font: 700 1.5rem/1 Georgia, serif; letter-spacing: -.04em; }
.brand-lockup .brand-can { color: var(--gold); }
.brand-lockup > span { font-size: .58rem; font-weight: 800; letter-spacing: .23em; text-transform: uppercase; }
.header-links { display: flex; gap: 24px; font-size: .9rem; }
.header-links a { padding-block: 8px; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font: 900 clamp(4.6rem, 10vw, 8.4rem)/.94 var(--mono); letter-spacing: -.08em; text-shadow: 4px 4px 0 #365466; }
h1 span { color: var(--mint); }
h2 { font: 850 clamp(1.6rem, 3vw, 2.5rem)/1.15 var(--mono); letter-spacing: -.05em; }
h3 { font-size: 1rem; }
p { margin: 14px 0; }
.pixel-label { color: var(--mint); font: 700 .7rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.world-intro { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 56px; padding: 64px 0 44px; }
.intro-copy > .pixel-label { margin: 0 0 24px; }
.intro-copy > p:not(.pixel-label) { color: var(--muted); max-width: 430px; }
.intro-copy .intro-lead { font-size: 1.3rem; color: var(--text); line-height: 1.4; margin-block: 26px 16px; }
.world-button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; border: 1px solid var(--mint); border-radius: 5px; padding: 12px 18px; background: var(--mint); color: #132d31; text-decoration: none; font-size: .95rem; font-weight: 800; box-shadow: 4px 4px 0 #395e60; }
.world-button:hover { background: #cbf5e6; }
.intro-copy .world-button { margin-top: 16px; }
.sky-panel { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #112030; box-shadow: 8px 8px 0 #070e18; overflow: hidden; }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border-bottom: 1px solid var(--line); }
.panel-top h2 { font-size: 1.1rem; }
.panel-top .pixel-label { font-size: .6rem; color: var(--muted); }
.sky-art { position: relative; isolation: isolate; display: block; width: 100%; height: 330px; padding: 0; border: 0; color: var(--text); background: radial-gradient(ellipse at 75% 70%, #266a6e, transparent 65%), #101827; touch-action: pan-y; cursor: crosshair; }
.sky-art:focus-visible { outline-offset: -6px; }
.sky-art canvas { position: absolute; width: 100%; height: 100%; inset: 0; image-rendering: pixelated; pointer-events: none; }
.pixel-planet { position: absolute; left: 50%; top: 48%; width: 112px; height: 112px; transform: translate(-50%, -50%); pointer-events: none; }
.pixel-planet > span { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(0deg, #efab77 0 14px, #c97b60 14px 24px, #ffce8e 24px 30px); clip-path: polygon(28% 0, 72% 0, 72% 8%, 86% 8%, 86% 18%, 94% 18%, 94% 30%, 100% 30%, 100% 70%, 94% 70%, 94% 82%, 86% 82%, 86% 92%, 72% 92%, 72% 100%, 28% 100%, 28% 92%, 14% 92%, 14% 82%, 6% 82%, 6% 70%, 0 70%, 0 30%, 6% 30%, 6% 18%, 14% 18%, 14% 8%, 28% 8%); box-shadow: inset -24px 0 #10212a33; }
.pixel-planet::after { content: ""; position: absolute; left: -34%; top: 34%; width: 168%; height: 32%; border: 9px solid #a9ecd3; border-left-color: #a9ecd355; border-top-color: #a9ecd355; border-radius: 50%; transform: rotate(-28deg); }
.sky-stamp { position: absolute; left: 16px; bottom: 16px; font: 700 .66rem var(--mono); letter-spacing: .14em; background: #0c1420; padding: 7px 10px; pointer-events: none; }
.sky-controls { display: flex; gap: 10px; padding: 14px 18px 0; flex-wrap: wrap; }
.small-button { min-height: 44px; padding: 8px 12px; border: 1px solid #7893a3; border-radius: 5px; color: var(--text); background: #102030; font-size: .85rem; }
.small-button:hover, .small-button[aria-pressed=true] { color: var(--night); background: var(--gold); border-color: var(--gold); }
.hint { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.sky-panel .hint { padding: 0 18px; margin: 10px 0 18px; }
.world-menu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 42px; }
.world-menu a { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; font-size: .87rem; text-decoration: none; background: #152433; }
.world-menu a:hover { border-color: var(--mint); }
.world-menu a > span:first-child { font: .7rem var(--mono); color: var(--mint); }
.world-menu a > span:last-child { margin-left: auto; }
.work-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: start; gap: 24px; }
.world-panel { padding: clamp(22px, 3vw, 34px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 6px 6px 0 #080f19; scroll-margin-top: 24px; min-width: 0; }
.world-panel > .pixel-label, .section-row .pixel-label { margin: 0 0 12px; }
.byline { color: var(--muted); font-size: .86rem; }
.match-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 18px 0; margin: 22px 0; border-block: 1px solid var(--line); font: 700 .7rem/1.4 var(--mono); }
.match-score span:last-child { text-align: right; }
.match-score strong { color: var(--gold); font-size: 2rem; white-space: nowrap; }
.published-piece { font-family: Georgia, serif; font-size: 1.14rem; line-height: 1.75; }
.published-piece p:first-child { margin-top: 0; }
.draft-toggle { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 16px; }
.draft-toggle summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-weight: 750; color: var(--mint); list-style: none; }
.draft-toggle summary::-webkit-details-marker { display: none; }
.draft-toggle summary span { font-size: 1.3rem; }
.draft-toggle[open] summary span { transform: rotate(45deg); }
.draft-comparison { display: grid; gap: 16px; margin-top: 16px; }
.draft-comparison > div { border-left: 3px solid var(--mint); padding-left: 16px; }
.draft-comparison > div:first-child { border-color: #97adbb; color: var(--muted); }
.draft-comparison p { font-size: .95rem; margin-bottom: 0; }
.tutor-note { color: var(--gold); font-size: .9rem; padding-top: 14px; }
.arcade-panel > p:not(.pixel-label, .feedback, .fuel-label) { color: var(--muted); }
.launch-pad { height: 146px; position: relative; overflow: hidden; margin-top: 22px; border: 1px solid #446074; border-radius: 6px; background: repeating-linear-gradient(0deg, transparent 0 23px, #44607422 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, #44607422 23px 24px), #0d1827; }
.moon-mark { position: absolute; top: 18px; right: 24px; width: 18px; height: 18px; background: var(--gold); box-shadow: -6px 0 #ffe3b8; }
.pixel-rocket { position: absolute; left: calc(50% - 15px); bottom: 24px; width: 30px; height: 54px; background: #eff6eb; clip-path: polygon(40% 0, 60% 0, 60% 10%, 80% 10%, 80% 65%, 100% 65%, 100% 100%, 70% 100%, 70% 88%, 30% 88%, 30% 100%, 0 100%, 0 65%, 20% 65%, 20% 10%, 40% 10%); }
.pixel-rocket i { position: absolute; width: 10px; height: 10px; top: 17px; left: 10px; background: #358ba2; }
.pad-line { position: absolute; bottom: 16px; left: 25%; right: 25%; border-top: 4px solid #7893a3; }
.launch-pad.is-launched .pixel-rocket { animation: rocket-lift 1.3s steps(16, end) forwards; }
@keyframes rocket-lift { to { transform: translateY(-160px); } }
.fuel-label { font: .8rem/1.5 var(--mono); }
.fuel-label strong { color: var(--mint); }
.fuel-cells { display: flex; gap: 8px; }
.fuel-cells span { height: 12px; flex: 1; border: 1px solid #7893a3; }
.fuel-cells span.is-full { background: var(--mint); border-color: var(--mint); }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
legend { font-size: .78rem; color: var(--muted); padding: 0; margin-top: 22px; }
.maths-question { font: 800 2rem/1.3 var(--mono); color: var(--gold); margin-block: 22px 14px; }
label { display: block; font-size: .87rem; font-weight: 700; margin-bottom: 8px; }
input { min-width: 0; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #7893a3; border-radius: 5px; color: var(--text); background: #0d1827; }
input::placeholder { color: #9db1bf; }
.answer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.answer-row .world-button { padding-inline: 12px; }
#rocket-form { margin-top: 20px; }
.feedback { color: var(--gold); font-size: .88rem; min-height: 2.9em; }
.ideas-panel { margin-top: 28px; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wall-badge { color: var(--gold); font: .7rem/1.5 var(--mono); border: 1px dashed var(--gold); padding: 10px; }
.ideas-panel > p { color: var(--muted); max-width: 760px; }
.idea-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.ideas-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; min-height: 350px; margin-top: 26px; padding: 20px; border: 1px dashed #7893a3; border-radius: 6px; background: radial-gradient(#446074 1px, transparent 1px) 0 0 / 20px 20px, #0d1827; }
.static-note, .idea-note { background: #ffe0a9; color: #24323a; padding: 16px; box-shadow: 4px 4px 0 #070e1899; overflow-wrap: anywhere; min-width: 0; align-self: start; }
.static-note { font-family: var(--mono); }
.static-note--mint, .idea-note:nth-child(3n+2) { background: #bbe8d9; }
.idea-note:nth-child(3n) { background: #d9c9ec; }
.idea-note { position: relative; min-height: 142px; }
.idea-note.is-dragging { z-index: 2; opacity: .9; outline: 3px solid var(--gold); }
.note-handle { display: block; min-height: 36px; width: 100%; margin: -8px 0 8px; padding: 5px; border: 1px dashed #465963; background: transparent; color: #24323a; cursor: grab; font: 700 .72rem var(--mono); touch-action: none; }
.note-handle:active { cursor: grabbing; }
.idea-note p { font: .9rem/1.5 var(--mono); margin: 8px 0 14px; }
.note-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.note-actions button { min-height: 36px; padding: 5px 10px; border: 1px solid #465963; background: transparent; color: #24323a; border-radius: 3px; font-size: .75rem; }
.idea-note button:focus-visible { outline-color: #1c4653; }
.note-actions button:hover, .note-handle:hover { background: #ffffff55; }
.wall-footer { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-top: 18px; }
.wall-footer .feedback { margin: 0; }
.wall-footer button { flex-shrink: 0; }
.report-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; padding: 64px 0; }
.report-intro p:not(.pixel-label) { color: var(--muted); }
.report-card { padding: 30px; border: 1px solid #ffce8e; border-radius: 8px; color: #24323a; background: #f0dcc1; box-shadow: 6px 6px 0 #875d4380; }
.sample-stamp { font: 800 .7rem var(--mono); letter-spacing: .1em; margin: 0 0 18px; }
.report-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 0; }
.report-card dl > div { border-top: 2px solid #876147; padding-top: 14px; }
.report-card dt { font-weight: 800; font-size: .92rem; line-height: 1.3; }
.report-card dd { margin: 10px 0 0; font-size: .88rem; }
.world-cta { padding: 40px 28px; margin-bottom: 56px; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: #1c3340; }
.world-cta > p:not(.pixel-label) { max-width: 620px; margin: 18px auto 26px; color: var(--muted); }
.home-link { display: block; width: fit-content; margin: 24px auto 0; font-size: .9rem; }
.site-footer { border-top: 1px solid #446074; padding: 26px 0; color: var(--muted); font-size: .8rem; }
.footer-row { flex-wrap: wrap; }
.footer-row p { margin: 0; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.no-script { padding: 20px; color: var(--gold); border: 1px solid var(--gold); }
@media (max-width: 900px) {
  .world-intro { gap: 30px; }
  .world-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-grid, .report-section { grid-template-columns: 1fr; }
  .report-section { gap: 26px; }
  .ideas-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 32px); }
  .header-row { gap: 14px; flex-wrap: wrap; }
  .header-links { gap: 16px; font-size: .8rem; }
  .world-intro { grid-template-columns: 1fr; padding-top: 38px; }
  h1 { font-size: clamp(4.6rem, 21vw, 7rem); }
  .sky-art { height: 280px; }
  .world-menu { gap: 8px; }
  .world-menu a { font-size: .8rem; padding: 12px; }
  .world-menu a > span:first-child { display: none; }
  .section-row { display: block; }
  .wall-badge { display: inline-block; margin-top: 16px; }
  .idea-input-row { grid-template-columns: 1fr; }
  .ideas-board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; }
  .idea-note { padding: 12px; }
  .wall-footer { flex-direction: column; }
  .report-card { padding: 24px; }
  .report-card dl { grid-template-columns: 1fr; }
  .world-cta { padding: 30px 20px; }
}
@media (max-width: 380px) {
  .ideas-board { grid-template-columns: 1fr; }
  .panel-top { flex-wrap: wrap; }
  .answer-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .launch-pad.is-launched .pixel-rocket { transform: translateY(-160px); }
}
body.is-calm *, body.is-calm *::before, body.is-calm *::after { animation: none !important; transition: none !important; }
body.is-calm .launch-pad.is-launched .pixel-rocket { transform: translateY(-160px); }
