/* Shared design tokens and layouts for the Chinese and English pages. */
@font-face {
  font-family:TableSerif;
  src:url('assets/table-serif.woff2') format('woff2');
  font-display:swap;
  font-style:normal;
  font-weight:500
}

@font-face {
  font-family:TableScript;
  src:url('assets/table-script.woff2') format('woff2');
  font-display:swap;
  font-style:normal;
  font-weight:400
}

:root {
  --paper:#f5f1e7;
  --paper-deep:#ebe6d8;
  --ink:#202e28;
  --jade:#163e34;
  --jade-light:#285446;
  --walnut:#765443;
  --gold:#a17a42;
  --muted:#667168;
  --line:#d4d5c8;
  --serif:TableSerif,'Songti SC','Noto Serif CJK SC','Source Han Serif SC','SimSun',serif;
  --script:TableScript,'Kaiti SC','STKaiti',serif;
  --sans:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif
}

* {
  box-sizing:border-box
}

html {
  scroll-behavior:smooth;
  scroll-padding-top:32px
}

body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  font-size:16px;
  line-height:1.85;
  -webkit-font-smoothing:antialiased
}

a {
  color:inherit;
  text-decoration:none
}

button,input {
  font:inherit
}

button {
  cursor:pointer
}

button:disabled {
  cursor:default
}

img {
  display:block;
  max-width:100%
}

figure,h1,h2,h3,p {
  margin:0
}

a,button,summary {
  -webkit-tap-highlight-color:transparent
}

a:focus-visible,button:focus-visible,summary:focus-visible {
  outline:3px solid #bc8c45;
  outline-offset:5px;
  border-radius:2px
}

::selection {
  background:#cbd6b9;
  color:var(--jade)
}

.section-wrap {
  width:min(1216px,calc(100% - 112px));
  margin-inline:auto
}

.skip-link {
  position:fixed;
  top:10px;
  left:14px;
  padding:12px 24px;
  background:var(--jade);
  color:var(--paper);
  z-index:20;
  transform:translateY(-150%)
}

.skip-link:focus {
  transform:translateY(0)
}

.site-header {
  height:120px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  width:min(1328px,calc(100% - 88px));
  margin-inline:auto;
  border-bottom:1px solid var(--line)
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0;
  min-height:66px;
  padding:4px 8px 4px 0;
  border-radius:12px;
  background:radial-gradient(ellipse at 37% 52%,rgba(231,234,223,.68),rgba(231,234,223,.22) 58%,transparent 79%)
}

.brand-image {
  width:248px;
  height:auto;
  object-fit:contain;
  display:block
}

.has-script .brand-image:not(.is-ready) {
  display:none
}

.brand-type {
  display:none;
  font-family:var(--serif);
  font-size:30px;
  line-height:1.25;
  letter-spacing:.08em;
  color:var(--jade)
}

.has-script .brand-image:not(.is-ready)+.brand-type {
  display:block
}

.brand-type small {
  display:block;
  font:10px/1.7 var(--sans);
  letter-spacing:.31em;
  margin-top:5px
}

.site-header nav {
  display:flex;
  gap:36px;
  align-items:center
}

.nav-link {
  position:relative;
  display:inline-flex;
  align-items:center;
  min-height:48px;
  gap:10px;
  font-size:14px
}

.nav-link:not(.nav-try)::after {
  content:'';
  position:absolute;
  bottom:5px;
  left:0;
  right:0;
  height:1px;
  background:var(--jade);
  transform:scaleX(0);
  transition:transform .2s
}

.nav-link:hover::after,.nav-link[aria-current]::after {
  transform:scaleX(1)
}

.nav-try {
  padding-left:30px;
  border-left:1px solid var(--line)
}

.hero {
  display:grid;
  grid-template-columns:1fr 1.14fr;
  align-items:center;
  gap:58px;
  padding-top:64px;
  padding-bottom:74px
}

.eyebrow {
  display:flex;
  gap:15px;
  align-items:center;
  color:var(--walnut);
  font-size:12px;
  letter-spacing:.15em
}

.tiny-rule {
  width:30px;
  height:1px;
  background:var(--gold);
  display:inline-block
}

h1,h2,h3 {
  font-family:var(--serif);
  font-weight:500;
  font-synthesis:none
}

h1 {
  font-size:clamp(48px,5.4vw,76px);
  line-height:1.32;
  letter-spacing:.015em
}

h2 {
  font-size:clamp(31px,3.3vw,46px);
  line-height:1.53;
  letter-spacing:.025em;
  text-wrap:balance
}

h3 {
  font-family:var(--sans);
  font-size:22px;
  line-height:1.55
}

.hero h1 {
  margin:31px 0 36px;
  font-size:clamp(64px,5.8vw,84px);
  line-height:1.3;
  letter-spacing:.035em
}

.title-line {
  display:block;
  width:max-content;
  white-space:nowrap
}

.title-line-offset {
  margin-top:.13em;
  margin-left:.6em
}

.title-lead {
  font-size:.82em;
  letter-spacing:.075em;
  margin-right:.08em
}

.hanging-mark {
  display:inline-block;
  width:.45em;
  letter-spacing:0
}

.title-keyword {
  position:relative;
  color:var(--jade)
}

.title-keyword::after {
  content:'';
  position:absolute;
  left:.04em;
  right:.51em;
  bottom:-.12em;
  height:1px;
  background:var(--gold)
}

.title-emphasis {
  color:var(--jade)
}

.hero-intro {
  font-family:var(--script);
  font-size:23px;
  line-height:1.7
}

.hero-description {
  color:var(--muted);
  font-size:15px;
  margin-top:15px;
  line-height:2
}

.hero-actions {
  display:flex;
  align-items:center;
  gap:28px;
  margin-top:35px
}

.button {
  min-height:52px;
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:42px;
  padding:12px 25px;
  font-size:15px;
  letter-spacing:.045em;
  transition:background .18s,transform .18s;
  border:1px solid transparent
}

.button:hover {
  transform:translateY(-2px)
}

.button-primary {
  background:var(--jade);
  color:var(--paper)
}

.button-primary:hover {
  background:var(--jade-light)
}

.button-paper {
  background:var(--paper);
  color:var(--jade)
}

.button-paper:hover {
  background:#fffaf0
}

.text-link {
  display:inline-flex;
  align-items:center;
  gap:16px;
  min-height:44px;
  font-size:14px;
  border-bottom:1px solid var(--gold)
}

.text-link:hover {
  color:var(--walnut)
}

.development-note {
  margin-top:24px;
  font-size:11px;
  letter-spacing:.07em;
  color:var(--muted)
}

.development-note span {
  padding-inline:7px
}

.visual-frame {
  position:relative;
  overflow:hidden;
  background:var(--paper-deep)
}

.visual-frame>img {
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:1;
  transition:opacity .35s
}

.has-script .visual-frame:not(.is-ready)>img {
  opacity:0
}

.visual-placeholder {
  position:absolute;
  inset:0;
  display:none;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:var(--walnut);
  background:linear-gradient(135deg,#e5dcc8,#ede9de)
}

.visual-placeholder span {
  font:500 42px var(--serif);
  letter-spacing:.12em
}

.visual-placeholder small {
  margin-top:18px;
  font-size:12px
}

.has-script .visual-frame:not(.is-ready) .visual-placeholder {
  display:flex
}

.concept-frame {
  aspect-ratio:1.2;
  border-radius:2px 2px 80px 2px
}

.concept-frame>img {
  object-position:right center
}

.hero-figure {
  position:relative
}

.hero-figure::before {
  content:'';
  position:absolute;
  top:-15px;
  left:18px;
  bottom:54px;
  right:-15px;
  border:1px solid #c5b697;
  pointer-events:none;
  z-index:-1
}

.hero-figure figcaption {
  margin-top:20px
}

figcaption {
  font-size:11px;
  color:var(--muted);
  line-height:1.7;
  letter-spacing:.03em
}

.caption-index {
  font-family:var(--serif);
  color:var(--walnut);
  font-size:13px;
  margin-right:15px
}

.mobile-break {
  display:none
}

.section-number {
  display:flex;
  align-items:center;
  gap:15px;
  font-size:12px;
  color:var(--walnut);
  letter-spacing:.12em
}

.section-number span {
  color:#b3ae99;
  margin:0 10px
}

.section-number .section-index {
  display:inline-grid;
  place-items:center;
  margin:0;
  width:26px;
  height:30px;
  border:1px solid #c9bda1;
  border-bottom:3px solid #92a08b;
  border-radius:3px;
  font:500 14px var(--serif);
  color:var(--jade)
}

.light-number .section-index {
  color:var(--paper);
  border-color:#6c8069;
  border-bottom-color:#a8b498
}

.opening {
  display:grid;
  grid-template-columns:1fr 2.4fr .5fr;
  gap:56px;
  border-top:1px solid var(--line);
  padding-top:78px;
  padding-bottom:92px
}

.opening-body {
  max-width:610px
}

.opening-body>p {
  margin:27px 0 18px;
  color:var(--muted);
  max-width:535px;
  font-size:16px;
  line-height:2
}

.margin-note {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:9px;
  writing-mode:vertical-rl;
  align-self:center;
  height:178px;
  font-family:var(--script);
  font-size:15px;
  letter-spacing:.3em;
  color:var(--walnut)
}

.note-line {
  width:1px;
  height:62px;
  background:var(--line);
  margin-top:14px
}

.table-story {
  padding:74px 0 65px;
  background:var(--paper-deep)
}

.table-story-heading {
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:50px
}

.table-story-heading h2 {
  margin-top:20px
}

.table-story-heading>p {
  color:var(--muted);
  font-size:15px;
  max-width:460px;
  line-height:2
}

.gameplay-gallery {
  margin-top:39px
}

.gallery-track {
  display:flex;
  gap:24px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
  scrollbar-color:var(--muted) transparent
}

.gallery-slide {
  flex:0 0 100%;
  min-width:0;
  margin:0;
  scroll-snap-align:start
}

.gameplay-frame {
  aspect-ratio:1.6;
  background:#173d34;
  box-shadow:0 20px 42px -32px #172e25
}

.gameplay-frame img {
  object-fit:contain
}

.screenshot-link {
  display:block;
  cursor:zoom-in
}

.screenshot-caption {
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-top:12px;
  font-size:13px
}

.screenshot-caption>span:last-child {
  white-space:nowrap
}

.gallery-controls {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:20px;
  margin-top:18px
}

.gallery-controls[hidden] {
  display:none
}

.gallery-controls button {
  width:44px;
  height:44px;
  border:1px solid var(--line);
  border-radius:50%;
  background:transparent;
  color:inherit;
  font:inherit;
  font-size:23px;
  cursor:pointer
}

.gallery-controls button:disabled {
  opacity:.3;
  cursor:default
}

.gallery-status {
  min-width:52px;
  text-align:center;
  font-size:13px;
  font-variant-numeric:tabular-nums
}

.gameplay-video {
  margin-top:40px
}

.gameplay-video video {
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:1.6;
  background:#173d34
}

.rhythm {
  padding-block:99px;
  display:grid;
  grid-template-columns:.9fr 1.2fr;
  gap:90px
}

.rhythm h2 {
  margin-top:21px
}

.editorial-list {
  list-style:none;
  padding:0;
  margin:0
}

.editorial-list li {
  display:grid;
  grid-template-columns:32px 1fr;
  gap:24px;
  padding:27px 0;
  border-bottom:1px solid var(--line)
}

.editorial-list li:first-child {
  padding-top:0
}

.list-number {
  color:var(--gold);
  font:italic 18px Georgia,serif;
  padding-top:9px
}

.editorial-list p {
  color:var(--muted);
  font-size:15px;
  line-height:1.95;
  margin-top:11px
}

.try-section {
  background:var(--jade);
  color:var(--paper);
  padding-block:78px
}

.try-layout {
  display:grid;
  grid-template-columns:.8fr 2.5fr .6fr;
  gap:65px
}

.light-number {
  color:#c6ba99
}

.try-layout h2 {
  font-size:42px
}

.try-layout p:not(.section-number) {
  color:#c7d0c4;
  max-width:580px;
  margin:25px 0 30px;
  font-size:14px;
  line-height:2
}

.platform-note {
  display:flex;
  flex-direction:column;
  gap:11px;
  align-self:end;
  color:#ded8c3;
  font:13px/1.5 Georgia,var(--sans);
  letter-spacing:.12em;
  border-left:1px solid #567064;
  padding-left:25px
}

.platform-note small {
  margin-top:12px;
  font:11px var(--sans);
  white-space:nowrap;
  letter-spacing:.05em;
  color:#b7c4b7
}

.site-footer {
  min-height:146px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px
}

.footer-brand {
  display:block;
  width:220px;
  min-width:0;
  max-width:100%
}

.footer-brand img {
  width:100%;
  height:auto
}

.site-footer p {
  color:var(--muted);
  font-family:var(--script);
  font-size:16px
}

.site-footer>a:last-child {
  font-size:12px;
  min-height:44px;
  display:flex;
  align-items:center;
  gap:20px
}

.manual-heading {
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:40px;
  padding-top:68px;
  padding-bottom:65px;
  border-bottom:1px solid var(--line)
}

.manual-heading h1 {
  font-size:clamp(44px,4.8vw,64px);
  margin-top:24px;
  letter-spacing:.025em;
  line-height:1.52
}

.manual-heading>p {
  color:var(--walnut);
  font-family:var(--script);
  font-size:22px;
  line-height:1.9
}

.manual-heading>p span {
  font:13px/1.8 var(--sans);
  color:var(--muted);
  display:block;
  margin-top:16px
}

.manual-layout {
  display:grid;
  grid-template-columns:210px minmax(0,1fr);
  gap:85px;
  align-items:start;
  padding-top:50px
}

.chapter-nav {
  position:sticky;
  top:32px;
  padding-top:15px
}

.chapter-nav p {
  font-family:var(--serif);
  font-size:21px;
  margin-bottom:22px
}

.chapter-nav a {
  display:flex;
  gap:16px;
  align-items:center;
  font-size:13px;
  min-height:47px;
  color:var(--muted)
}

.chapter-nav a:hover {
  color:var(--jade)
}

.chapter-nav a span {
  font-family:var(--serif);
  color:var(--gold);
  font-size:14px
}

.manual-body {
  max-width:815px
}

.manual-section {
  padding-top:10px;
  padding-bottom:55px;
  margin-bottom:52px;
  border-bottom:1px solid var(--line);
  scroll-margin-top:25px
}

.manual-section>h2 {
  font-size:35px;
  margin-top:17px;
  margin-bottom:24px
}

.manual-section p {
  font-size:15px;
  color:var(--muted);
  line-height:2.05;
  margin-top:16px
}

.manual-section .section-number {
  margin-top:0;
  font-size:12px;
  color:var(--walnut)
}

.manual-section .lead {
  font-size:18px;
  color:var(--ink);
  line-height:1.9
}

.manual-section .side-note {
  font-size:13px;
  border-left:2px solid var(--gold);
  padding-left:19px;
  margin-top:28px;
  color:#677167
}

.rule-equation {
  display:flex;
  gap:45px;
  align-items:center;
  justify-content:flex-start;
  margin:34px 0;
  padding:26px 0;
  border-block:1px solid var(--line)
}

.rule-equation>span:not(.equation-arrow) {
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:60px
}

.rule-equation strong {
  font:43px/1.2 var(--serif);
  color:var(--jade)
}

.rule-equation small {
  font-size:12px;
  margin-top:11px;
  color:var(--muted)
}

.equation-arrow {
  color:var(--gold);
  font-size:22px
}

.word-demo {
  margin-top:33px;
  background:#e8e8dc;
  padding:30px 32px
}

.demo-heading {
  display:flex;
  gap:20px;
  align-items:center;
  justify-content:space-between
}

.demo-heading h3 {
  font-size:24px
}

.demo-label {
  font-size:10px;
  color:var(--walnut);
  letter-spacing:.04em;
  white-space:nowrap
}

.word-demo #demo-instructions {
  font-size:12px;
  line-height:1.9;
  margin-top:9px;
  max-width:570px
}

.demo-pool {
  display:flex;
  gap:13px;
  flex-wrap:wrap;
  margin-top:25px;
  margin-bottom:27px
}

.word-tile {
  width:65px;
  min-height:81px;
  border:1px solid #c8c6b7;
  border-bottom:5px solid #51816c;
  border-radius:5px;
  background:#fffcf3;
  color:var(--jade);
  font:34px var(--script);
  box-shadow:0 4px 4px -3px #61726545;
  transition:transform .15s,background .15s
}

.word-tile:hover {
  transform:translateY(-4px)
}

.word-tile[aria-pressed=true] {
  background:#c8d6c9;
  border-color:#708e78;
  color:#40664d;
  transform:translateY(-5px);
  box-shadow:none
}

.demo-expression {
  display:flex;
  align-items:center;
  gap:22px;
  border-top:1px solid #ccd0bf;
  padding-top:24px;
  flex-wrap:wrap
}

.demo-expression-label {
  font-size:12px;
  color:var(--muted)
}

.demo-output {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  min-width:125px;
  max-width:100%
}

.demo-output>span,.demo-output>button {
  display:grid;
  place-items:center;
  width:57px;
  height:67px;
  font:29px var(--script);
  border:1px dashed #b3b9a6;
  border-radius:3px;
  background:transparent;
  color:#929f89
}

.demo-output>button {
  border-style:solid;
  background:var(--paper);
  border-color:#adbb9d;
  color:var(--jade)
}

.text-button {
  border:0;
  background:none;
  color:var(--jade);
  min-height:44px;
  padding:4px 0;
  font-size:12px;
  margin-left:auto;
  text-decoration:underline;
  text-underline-offset:5px
}

.text-button:disabled {
  color:#8a9385;
  text-decoration:none
}

.word-demo .demo-status {
  font-size:12px;
  min-height:52px;
  color:var(--jade);
  margin-top:18px
}

.priority-line {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:22px 0;
  margin-block:25px!important;
  border-block:1px solid var(--line)
}

.priority-line strong {
  font:27px var(--serif);
  color:var(--jade)
}

.priority-line span {
  color:var(--gold)
}

.rules-definitions {
  margin:28px 0 0
}

.rules-definitions>div {
  display:grid;
  grid-template-columns:74px 1fr;
  gap:24px;
  padding:19px 0;
  border-bottom:1px solid #e1e1d4
}

.rules-definitions dt {
  font:23px/1.8 var(--serif);
  color:var(--jade)
}

.rules-definitions dd {
  margin:0;
  font-size:14px;
  line-height:2;
  color:var(--muted)
}

.subheading {
  font-size:24px;
  margin-top:34px
}

.vote-example {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
  margin-top:28px;
  padding-block:26px;
  border-block:1px solid var(--line)
}

.vote-example>div {
  display:flex;
  flex-direction:column;
  gap:9px;
  border-right:1px solid var(--line);
  padding-left:12px
}

.vote-example>div:last-child {
  border-right:0
}

.vote-example span {
  font-size:12px;
  color:var(--muted)
}

.vote-example strong {
  font:32px Georgia,serif;
  color:var(--jade)
}

.vote-example small {
  font-size:11px;
  color:var(--muted)
}

.questions details {
  border-bottom:1px solid var(--line);
  padding-block:16px
}

.questions summary {
  font-size:15px;
  cursor:pointer;
  min-height:44px;
  line-height:1.8;
  padding-block:10px;
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px
}

.questions summary::-webkit-details-marker {
  display:none
}

.questions summary::after {
  content:'+';
  color:var(--gold);
  font-size:22px;
  font-weight:300
}

.questions details[open] summary::after {
  content:'−'
}

.questions details>p {
  font-size:14px;
  margin:0 0 15px
}

.questions .text-link {
  margin-bottom:13px
}

.questions .manual-end {
  font-family:var(--serif);
  font-size:22px;
  color:var(--jade);
  margin:42px 0 26px
}

.play-page .site-footer {
  border-top:1px solid var(--line)
}

/* English keeps the same paper-and-jade palette, with shorter line spacing. */
html:lang(en) {
  --serif:Georgia,'Times New Roman',serif
}

.language-link {
  white-space:nowrap
}

.hanzi {
  font-family:var(--script)
}

html:lang(en) h1,html:lang(en) h2 {
  letter-spacing:-.035em;
  line-height:1.18
}

html:lang(en) .hero h1 {
  font-size:clamp(43px,5.4vw,78px);
  letter-spacing:-.045em;
  line-height:1.13
}

html:lang(en) .hero-intro,html:lang(en) .manual-heading>p {
  font-family:var(--sans);
  font-size:20px;
  line-height:1.6
}

html:lang(en) .hero-actions {
  flex-wrap:wrap
}

html:lang(en) .brand-type,html:lang(en) .footer-brand {
  letter-spacing:-.025em
}

html:lang(en) .brand-type small {
  letter-spacing:.12em
}

html:lang(en) .margin-note {
  writing-mode:horizontal-tb;
  height:auto;
  font-family:var(--serif);
  letter-spacing:0;
  text-align:center;
  line-height:1.5
}

html:lang(en) .manual-heading h1 {
  font-size:clamp(40px,4.5vw,62px);
  line-height:1.2
}

html:lang(en) .manual-heading>div,html:lang(en) .manual-heading>p {
  flex:1;
  min-width:0
}

html:lang(en) .priority-line {
  flex-wrap:wrap
}

html:lang(en) .site-footer p,html:lang(en) .questions .manual-end {
  font-family:var(--serif)
}

@media(min-width:1600px) {
  .hero {
    padding-top:83px;
    padding-bottom:90px
  }
}

@media(max-width:1100px) {
  .section-wrap {
    width:calc(100% - 72px)
  }
  .site-header {
    width:calc(100% - 64px)
  }
  .hero {
    gap:34px;
    grid-template-columns:1fr 1fr;
    padding-top:54px
  }
  .hero h1 {
    font-size:55px
  }
  .hero-intro {
    font-size:22px
  }
  .mobile-break {
    display:block
  }
  .hero-actions {
    gap:18px
  }
  .hero-description {
    font-size:14px
  }
  .hero-figure::before {
    display:none
  }
  .concept-frame {
    aspect-ratio:1.2;
    border-bottom-right-radius:60px
  }
  .opening {
    grid-template-columns:.6fr 2fr .3fr;
    gap:34px
  }
  .rhythm {
    gap:50px
  }
  .try-layout {
    grid-template-columns:.7fr 2.3fr;
    gap:38px
  }
  .platform-note {
    grid-column:2;
    flex-direction:row;
    align-items:center;
    gap:20px;
    padding-left:0;
    border:0
  }
  .platform-note small {
    margin-top:0
  }
  .manual-layout {
    grid-template-columns:170px minmax(0,1fr);
    gap:40px
  }
  .manual-heading>p {
    font-size:19px
  }
  .word-demo {
    padding:25px
  }
  .demo-heading {
    display:block
  }
  .demo-label {
    display:block;
    margin-top:8px
  }
  .demo-pool {
    gap:10px
  }
  .word-tile {
    width:57px;
    min-height:75px
  }
  .rule-equation {
    gap:30px
  }
}

@media(max-width:760px) {
  .section-wrap {
    width:calc(100% - 40px)
  }
  .site-header {
    width:calc(100% - 40px);
    height:auto;
    min-height:112px;
    flex-wrap:wrap;
    gap:0 14px;
    padding-block:10px
  }
  .brand-image {
    width:178px
  }
  .brand {
    gap:7px
  }
  .brand-type {
    font-size:24px
  }
  .brand-type small {
    font-size:8px;
    letter-spacing:.24em
  }
  .site-header nav {
    gap:20px;
    margin-left:auto;
    flex-wrap:wrap
  }
  .nav-link {
    font-size:12px
  }
  .nav-try {
    display:none
  }
  .hero {
    display:flex;
    flex-direction:column;
    gap:40px;
    align-items:stretch;
    padding-top:43px;
    padding-bottom:52px
  }
  .hero h1 {
    font-size:clamp(50px,13.8vw,68px);
    margin:24px 0 32px
  }
  html:lang(en) .hero h1 {
    font-size:clamp(42px,12vw,66px)
  }
  html:lang(en) .hero-intro,html:lang(en) .manual-heading>p {
    font-size:18px
  }
  html:lang(en) .hero h1,html:lang(en) .manual-heading h1 {
    overflow-wrap:normal
  }
  .hero-copy {
    padding:0 6px
  }
  .eyebrow {
    font-size:10px;
    gap:12px;
    letter-spacing:.08em
  }
  .tiny-rule {
    width:22px
  }
  .hero-intro {
    font-size:23px
  }
  .hero-description {
    font-size:14px;
    line-height:1.9
  }
  .hero-actions {
    margin-top:26px;
    gap:24px;
    flex-wrap:wrap
  }
  .button {
    min-height:50px;
    gap:30px;
    padding:12px 22px;
    font-size:14px
  }
  .text-link {
    font-size:13px
  }
  .development-note {
    font-size:10px;
    margin-top:19px
  }
  .concept-frame {
    aspect-ratio:1.2;
    border-radius:1px 1px 50px 1px
  }
  .hero-figure figcaption {
    margin-top:12px;
    font-size:10px
  }
  .opening {
    grid-template-columns:1fr;
    gap:23px;
    padding-block:48px
  }
  .opening h2 {
    font-size:35px
  }
  .opening-body>p {
    font-size:14px;
    margin-top:22px
  }
  .margin-note {
    display:none
  }
  .table-story {
    padding:45px 0 36px
  }
  .table-story-heading {
    display:block
  }
  .table-story-heading h2 {
    font-size:35px;
    margin-top:18px
  }
  .table-story-heading>p {
    font-size:13px;
    margin-top:21px;
    line-height:1.95
  }
  .gameplay-gallery {
    margin-top:26px;
    width:100%
  }
  .gameplay-video {
    width:100%;
    margin-top:30px
  }
  .gameplay-video .screenshot-caption {
    flex-direction:column;
    gap:4px
  }
  .gameplay-frame {
    box-shadow:none
  }
  .screenshot-caption {
    padding-inline:20px;
    font-size:12px
  }
  .rhythm {
    grid-template-columns:1fr;
    gap:30px;
    padding-block:51px
  }
  .rhythm-heading h2 {
    font-size:35px;
    margin-top:18px
  }
  .editorial-list li {
    gap:16px;
    padding-block:24px
  }
  .editorial-list h3 {
    font-size:23px
  }
  .editorial-list p {
    font-size:14px
  }
  .try-section {
    padding-block:45px
  }
  .try-layout {
    grid-template-columns:1fr;
    gap:24px
  }
  .try-layout h2 {
    font-size:33px
  }
  .try-layout p:not(.section-number) {
    font-size:13px;
    margin-top:19px
  }
  .platform-note {
    grid-column:1;
    margin-top:8px;
    font-size:11px;
    gap:17px
  }
  .platform-note small {
    font-size:10px
  }
  .site-footer {
    min-height:160px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    padding-block:29px
  }
  .footer-brand {
    width:176px
  }
  .site-footer p {
    font-size:13px;
    grid-column:1;
    grid-row:2
  }
  .site-footer>a:last-child {
    grid-column:2;
    grid-row:1 / span 2;
    font-size:11px
  }
  .manual-heading {
    padding-top:43px;
    padding-bottom:34px;
    display:block
  }
  .manual-heading h1 {
    font-size:46px;
    margin-top:22px
  }
  .manual-heading>p {
    font-size:19px;
    margin-top:25px
  }
  .manual-heading>p br {
    display:none
  }
  .manual-heading>p span {
    font-size:12px;
    margin-top:11px
  }
  .manual-layout {
    display:block;
    padding-top:26px
  }
  .chapter-nav {
    position:static;
    padding:0 0 20px;
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:0 20px;
    border-bottom:1px solid var(--line);
    margin-bottom:38px
  }
  .chapter-nav p {
    grid-column:1/-1;
    font-size:19px;
    margin-bottom:10px
  }
  .chapter-nav a {
    font-size:12px;
    min-height:42px;
    gap:12px
  }
  .manual-section {
    padding-bottom:37px;
    margin-bottom:35px
  }
  .manual-section>h2 {
    font-size:29px;
    margin-top:13px;
    margin-bottom:18px
  }
  .manual-section p {
    font-size:14px
  }
  .manual-section .lead {
    font-size:16px
  }
  .manual-section .side-note {
    font-size:12px;
    padding-left:14px
  }
  .rule-equation {
    justify-content:space-between;
    gap:12px;
    margin:26px 0;
    padding:22px 8px
  }
  .rule-equation strong {
    font-size:37px
  }
  .rule-equation small {
    font-size:11px
  }
  .word-demo {
    margin-inline:-8px;
    padding:22px 17px;
    margin-top:26px
  }
  .demo-heading h3 {
    font-size:23px
  }
  .demo-label {
    font-size:10px
  }
  .word-demo #demo-instructions {
    font-size:12px
  }
  .demo-pool {
    gap:10px;
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    margin-top:21px;
    margin-bottom:22px
  }
  .word-tile {
    width:100%;
    min-width:0;
    min-height:64px;
    font-size:28px
  }
  .demo-expression {
    gap:15px
  }
  .demo-expression-label {
    font-size:11px
  }
  .demo-output {
    min-width:100px;
    gap:8px
  }
  .demo-output>span,.demo-output>button {
    width:47px;
    height:58px;
    font-size:26px
  }
  .word-demo .demo-status {
    min-height:76px;
    font-size:12px
  }
  .priority-line strong {
    font-size:23px
  }
  .rules-definitions>div {
    grid-template-columns:52px 1fr;
    gap:15px
  }
  .rules-definitions dt {
    font-size:22px
  }
  html:lang(en) .rules-definitions>div {
    grid-template-columns:55px minmax(0,1fr)
  }
  html:lang(en) .priority-line {
    gap:9px
  }
  html:lang(en) .priority-line strong {
    font-size:18px
  }
  .rules-definitions dd {
    font-size:13px
  }
  .subheading {
    font-size:23px;
    margin-top:27px
  }
  .vote-example {
    gap:10px
  }
  .vote-example>div {
    padding-left:3px;
    gap:9px
  }
  .vote-example strong {
    font-size:28px
  }
  .vote-example small {
    font-size:10px
  }
  .questions summary {
    font-size:14px
  }
  .questions details>p {
    font-size:13px
  }
  .questions .manual-end {
    font-size:21px
  }
  html:lang(en) .site-footer {
    grid-template-columns:minmax(0,1fr) auto
  }
  html:lang(en) .site-footer p {
    grid-column:1/-1;
    grid-row:2
  }
  html:lang(en) .site-footer>a:last-child {
    grid-row:1
  }
}

@media(max-width:540px) {
  .site-header {
    flex-direction:column;
    align-items:flex-start
  }
  .site-header nav {
    width:100%;
    justify-content:space-between;
    margin-left:0;
    gap:12px
  }
}

@media(max-width:360px) {
  .section-wrap,.site-header {
    width:calc(100% - 32px)
  }
  .brand-image {
    width:168px
  }
  .brand-type {
    font-size:22px
  }
  .site-header nav {
    gap:13px
  }
  .hero h1 {
    font-size:50px
  }
  .hero-actions {
    gap:15px
  }
  .demo-pool {
    grid-template-columns:repeat(3,56px);
    justify-content:center;
    gap:12px
  }
  .word-tile {
    min-height:70px
  }
  .demo-expression-label {
    width:100%
  }
  .manual-heading h1 {
    font-size:41px
  }
  .priority-line strong {
    font-size:20px
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto
  }
  *,*::before,*::after {
    transition:none!important;
    animation:none!important
  }
  .button:hover,.word-tile:hover {
    transform:none
  }
}
