:root {
  color-scheme: light;
  --paper: #f7f6f5;
  --ink: #242038;
  --muted: #514c61;
  --purple: #5632a7;
  --deep: #251843;
  --lilac: #e4dafa;
  --lime: #dff28b;
  --white: #fff;
  --tile: #3b2a5d;
  --subhead: clamp(22px, 2.5vw, 32px);
  --heading: clamp(34px, 4.4vw, 64px);
  --lead: clamp(18px, 1.65vw, 23px);
  --page: min(1280px, calc(100% - clamp(32px, 9vw, 144px)));
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 5px; }
.wrap { width: var(--page); margin-inline: auto; }
.skip { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--white); padding: 12px; }
.skip:not(:focus) { clip-path: inset(50%); }
.header { min-height: 85px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.brand { display: inline-flex; justify-self: start; align-items: center; gap: 9px; font-size: 24px; font-weight: 800; letter-spacing: -.055em; text-decoration: none; }
.brand img { border-radius: 9px; }
.brand span { color: var(--purple); margin-left: -8px; }
.header nav { display: flex; gap: clamp(16px, 3vw, 42px); align-items: center; }
.header nav a, .footer-links a { font-size: 15px; font-weight: 650; text-decoration: none; }
.header nav a:hover, .footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.language { color: var(--purple); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 48px; padding: 10px 18px; border: 0; color: var(--white); background: var(--deep); font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: background-color .2s, transform .2s; }
.button:hover { background: var(--purple); }
.header-download { justify-self: end; background: transparent; color: var(--ink); padding-inline: 4px; }
.header-download:hover { background: transparent; color: var(--purple); }
.primary { background: var(--purple); }
.primary:hover { background: var(--deep); }
details { background: #eeebf2; }
details + details { margin-top: 5px; }
summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 20px; font-size: clamp(17px, 2vw, 22px); font-weight: 750; cursor: pointer; list-style: none; }
summary:hover, details[open] summary { color: var(--purple); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--purple); flex: none; }
details[open] summary::after { content: "−"; }
details p { padding: 0 20px 20px; max-width: 65ch; line-height: 1.7; color: var(--muted); }
footer { background: var(--deep); color: var(--white); overflow: hidden; }
footer :focus-visible { outline-color: var(--lime); }
.footer-inner { padding-top: 56px; display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 28px; }
.footer-inner .button { margin-top: 22px; background: var(--lime); color: var(--deep); }
.footer-inner .button:hover { background: var(--white); }
.footer-links { display: grid; gap: 10px; padding-top: 4px; font-size: 15px; }
.footer-wordmark { grid-column: 1 / -1; margin-bottom: -.25em; font-size: min(25vw, 340px); font-weight: 800; letter-spacing: -.085em; line-height: 1; color: var(--lilac); white-space: nowrap; }

.hero { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr); align-items: center; gap: clamp(24px, 5vw, 72px); padding-block: clamp(36px, 6vw, 96px) clamp(58px, 8vw, 120px); }
h1, h2, h3 { font-weight: 750; letter-spacing: -.05em; line-height: 1.08; }
h1 { font-size: clamp(50px, 7.65vw, 112px); }
:lang(en) h1 { font-size: clamp(42px, 6.15vw, 90px); }
h1 span { display: block; white-space: nowrap; }
h1 span:last-child { color: var(--purple); }
h2 { font-size: var(--heading); text-wrap: balance; }
h3 { font-size: var(--subhead); }
.lede { max-width: 28em; margin-block: 26px; font-size: var(--lead); line-height: 1.55; }
.hero-copy .primary { min-height: 52px; }
.platform { margin-top: 12px; color: var(--muted); font-size: 15px; }

.demo { padding: clamp(18px, 3vw, 42px); background: var(--deep); color: var(--white); scroll-margin-block-start: 16px; }
.demo-top, .demo-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.demo h2 { font-size: var(--subhead); text-wrap: wrap; }
.timer { flex: none; color: var(--lime); font-size: var(--subhead); line-height: 1; font-weight: 650; font-variant-numeric: tabular-nums; }
.rules, .demo-controls p, .demo noscript p { font-size: 15px; line-height: 1.5; color: var(--lilac); }
.rules { margin-block: 9px 19px; }
.demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.demo-grid button { aspect-ratio: 1.55; min-height: 44px; border: 0; background: var(--tile); color: var(--white); font-size: clamp(26px, 4vw, 58px); line-height: 1; font-weight: 650; cursor: pointer; transition: background-color .18s, transform .18s; }
.demo-grid button:disabled, .demo-grid button[aria-disabled="true"] { cursor: default; }
.demo-grid button:not(:disabled, [aria-disabled="true"], .missed):hover { background: var(--purple); }
.button:active { transform: translateY(2px); }
.demo-grid button:not(:disabled, [aria-disabled="true"]):active { transform: scale(.95); }
.demo-grid button[aria-disabled="true"] { color: var(--lilac); background: #52446d; }
.demo-grid button.missed { background: #693757; }
.demo[data-phase="complete"] .demo-grid button { color: var(--deep); background: var(--lilac); }
.demo :focus-visible { outline-color: var(--lime); outline-offset: 2px; }
.demo-controls { margin-top: 16px; min-height: 48px; }
.game-start { flex: none; color: var(--deep); background: var(--lime); }
.game-start:hover { background: var(--white); }
.demo[data-phase="running"] .game-start { color: var(--white); background: var(--tile); }
.demo[data-phase="running"] .game-start:hover { background: var(--purple); }
.demo[data-phase="complete"] [data-status] { color: var(--lime); }
.demo noscript p { margin-top: 8px; }

.training { background: #eeebf2; }
.training-layout { display: grid; grid-template-columns: .75fr 1.25fr; align-items: start; gap: clamp(24px, 6vw, 88px); padding-block: clamp(52px, 7vw, 100px); }
.section-heading p, .history p { max-width: 31em; margin-top: 18px; font-size: var(--lead); line-height: 1.55; }
.training-overview { width: min(100%, 335px); margin-top: 30px; }
.training-list { display: grid; gap: clamp(25px, 3.6vw, 48px); }
.exercise { display: grid; grid-template-columns: minmax(0, .77fr) minmax(0, 1.23fr); align-items: center; gap: clamp(17px, 3.2vw, 46px); }
.exercise-art { position: relative; width: 100%; aspect-ratio: 1.28; background: var(--paper); }
.exercise-art img { position: absolute; width: 100%; height: 100%; object-fit: contain; }
.exercise p, .faq p { font-size: 17px; line-height: 1.55; }
.exercise p { max-width: 44ch; margin-top: 9px; }
.exercise-link { display: inline-block; margin-top: 12px; font-size: 15px; font-weight: 700; text-underline-offset: 4px; }
.exercise-link:hover { color: var(--purple); text-decoration-thickness: 2px; }

.history { background: var(--lilac); }
.history-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(30px, 10vw, 140px); padding-block: clamp(54px, 8vw, 112px); }
.history-art { width: min(100%, 480px); justify-self: end; }
.history-art img { width: 100%; height: auto; }
.history-art figcaption { font-size: 15px; color: var(--muted); margin-top: 9px; }

.faq { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(22px, 6vw, 88px); padding-block: clamp(52px, 7vw, 100px); align-items: start; }
.footer-inner h2 { text-wrap: wrap; }

@media (max-width: 900px) {
  .header { grid-template-columns: 1fr auto auto; }
  .header nav .section-link { display: none; }
  .hero { gap: 22px; }
  .training-layout, .faq { grid-template-columns: 1fr; }
  .training-overview { display: none; }
}
@media (max-width: 700px) {
  .header { gap: 12px; min-height: 66px; }
  .header-download { min-height: 44px; }
  .header-download span { display: none; }
  .hero, .history-layout { grid-template-columns: 1fr; }
  .hero { gap: 24px; padding-block: 23px 48px; }
  h1 { font-size: clamp(49px, 14vw, 86px); }
  :lang(en) h1 { font-size: clamp(39px, 12.2vw, 79px); }
  .lede { margin-block: 14px 16px; }
  .platform { margin-top: 7px; }
  .demo { padding: 18px; }
  .history-art { width: 100%; justify-self: start; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { display: flex; flex-wrap: wrap; gap: 8px 17px; }
  .footer-wordmark { font-size: 25vw; }
}
@media (max-width: 440px) {
  .exercise { grid-template-columns: 34% minmax(0, 1fr); align-items: start; gap: 14px; }
  .exercise-art { aspect-ratio: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .arrived { animation: rise .45s ease-out both; }
  .hero h1 span { animation: title-in .72s cubic-bezier(.15,.68,.28,1) both; }
  .hero h1 span + span { animation-delay: .1s; }
  .demo-grid button { animation: rise .48s ease-out both; }
  .demo-grid button:nth-child(n+4) { animation-delay: .06s; }
  .demo-grid button:nth-child(n+7) { animation-delay: .12s; }
}
@keyframes rise {
  from { opacity: .6; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes title-in {
  from { opacity: .5; translate: 0 20px; }
  to { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .demo-grid button { transition: none; }
  .button:active, .demo-grid button:active { transform: none; }
}
