:root {
  color-scheme: light;
  --gutter: 24px;
  --nav-height: 78px;
  scroll-padding-top: var(--nav-height);
  --ink: #243349;
  --muted: #506075;
  --paper: #faf9f5;
  --line: #d4d8d9;
  --blue: #3558c9;
  --sky: #baceff;
  --cream: #fff0d9;
  --sans: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: Baskerville, "Iowan Old Style", Georgia, serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p, ul { margin: 0; }
body { -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, summary { font: inherit; cursor: pointer; color: inherit; }
button { border: none; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #294abe; outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }
.skip { position: fixed; inset: 8px auto auto 8px; z-index: 5; padding: .75rem 1rem; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.wrap { width: min(90%, 80rem); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 4; background: var(--paper); }
.mast, .foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mast { min-height: 78px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; min-height: 44px; align-items: center; gap: .65rem; font-weight: 800; font-size: 1.35rem; letter-spacing: -.045em; white-space: nowrap; }
.wordmark img { border-radius: 23%; }
nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.7rem); }
nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .96rem; font-weight: 550; }
nav a:hover { text-decoration: underline; text-underline-offset: .4em; }
.hero-grid, .exercise-grid, .companion-grid, .library-grid { display: grid; align-items: center; }
.hero-grid {
  min-height: calc(100svh - var(--nav-height));
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-block: clamp(3rem, 6vh, 5rem);
}
.eyebrow { font-size: .94rem; font-weight: 610; letter-spacing: .03em; color: var(--muted); margin-bottom: 1.1rem; }
.platform { display: flex; align-items: center; gap: .65em; line-height: 1.5; letter-spacing: .015em; }
.platform::before { content: ""; width: 1.9em; height: 3px; background: var(--blue); }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(3.05rem, 4.95vw, 4.9rem); letter-spacing: -.085em; line-height: 1.17; font-weight: 720; }
h1 i { font-family: var(--serif); font-size: 1.27em; color: var(--blue); letter-spacing: -.078em; font-weight: 500; white-space: nowrap; }
.lead { max-width: 29em; margin-top: 1.4rem; font-size: clamp(1rem, 1.22vw, 1.14rem); line-height: 1.88; color: var(--muted); text-wrap: pretty; }
.hero-action { grid-column: span 2; }
.intro { grid-column: span 4; }
.folio { grid-column: span 6; }
.hero-action p { margin-bottom: 1.1rem; line-height: 1.8; font-weight: 560; }
.btn {
  display: inline-flex; justify-content: center; align-items: center; padding: .8rem 1.45rem;
  min-height: 50px; border-radius: 100px; font-weight: 660; font-size: 1rem; white-space: nowrap;
}
.primary { color: #fff; background: var(--ink); }
.primary:hover { background: #344867; }
.secondary { background: #e5eaf3; color: var(--ink); }
.folio {
  position: relative; isolation: isolate; display: flex; flex-direction: column; overflow: hidden;
  height: clamp(27rem, 61svh, 37rem); border-radius: 6px 17px 17px 6px;
  padding: clamp(1.25rem, 2.3vw, 2.45rem) clamp(1.4rem, 2.4vw, 2.55rem) 1.6rem;
  background:
    linear-gradient(90deg, #648bed 0 5px, #adc7ff 5px 12px, #7297e4 13px, transparent 14px),
    linear-gradient(159deg,#dce8ff 0%,#b4ccff 50%,#91aff4 100%);
  border: 1px solid #92abdc;
  box-shadow: 0 4px 0 -1px #e8eef9, 0 6px 0 -1px #9dabc7, 0 18px 40px -30px #475c90;
}
.folio::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(0deg, transparent 0 35px, #516f9926 35px 36px);
  mask-image: linear-gradient(0deg, black 0%, transparent 78%);
}
.folio-head, .exercise-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-weight: 620; font-size: .88rem; }
.folio-head { padding-bottom: .8rem; border-bottom: 1px solid #5071ab78; }
.folio-en { font: italic 500 clamp(3.5rem, 6.25vw, 6.9rem)/.88 var(--serif); letter-spacing: -.072em; margin: clamp(1.2rem, 3.3vh, 2.6rem) 0 .75rem; }
.folio-zh { font-weight: 650; font-size: 1rem; }
.folio-cat { position: absolute; right: 3%; bottom: 4%; width: min(62%, 17rem); height: auto; }
.paper-next {
  position: relative; align-self: flex-start; margin-top: auto; min-height: 44px; padding: .2rem .1rem;
  color: var(--ink); font-size: .9rem; font-weight: 650; background: none;
  text-decoration: underline; text-decoration-color: #46628c80; text-underline-offset: .35em;
}
.paper-next:hover { text-decoration-color: currentColor; }
h2 { font-weight: 670; font-size: clamp(2.6rem, 4.4vw, 4.35rem); letter-spacing: -.07em; line-height: 1.2; }
.practice { background: #25364f; color: #fff7e9; }
.exercise-grid, .companion-grid, .library-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter);
  min-height: calc(100svh - var(--nav-height)); padding-block: clamp(4rem, 9vh, 7rem);
}
.section-intro, .library-copy { grid-column: span 5; }
.exercise-card, .decks { grid-column: 7 / 13; }
.library-start { margin-top: 1.6rem; }
.practice .eyebrow { color: #bad0ff; }
.practice .lead { color: #d3dbe6; }
.exercise-card {
  display: flex; flex-direction: column; min-height: clamp(26rem, 58svh, 36rem);
  position: relative; color: var(--ink); background: var(--paper);
  border-radius: 15px; padding: clamp(1.3rem, 3.3vw, 3.2rem);
  box-shadow: 0 5px 0 -1px #9ab6ef, 0 12px 0 -3px #526e9b;
}
.exercise-head { color: var(--muted); }
.step-count { font-variant-numeric: tabular-nums; }
.rule-meter { display: flex; gap: 5px; margin-top: .85rem; }
.rule-meter i { height: 4px; flex: 1; border-radius: 3px; background: #d8dfe7; }
.rule-meter i:first-child, .exercise-card[data-full] .rule-meter i { background: var(--blue); }
.exercise-face { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 36%; align-items: center; gap: .6rem; min-height: 17.4rem; padding-block: 1.4rem; }
.exercise-face img { height: auto; width: 100%; }
.exercise-words > p:first-child { color: var(--muted); font-size: .92rem; font-weight: 550; margin-bottom: .65rem; }
.exercise-words h3 { font-size: clamp(2.1rem, 3.6vw, 3.55rem); line-height: 1.25; letter-spacing: -.055em; }
.exercise-words .answer { color: var(--blue); font: italic 500 clamp(2.15rem, 3.6vw, 3.8rem)/1.12 var(--serif); margin-top: .45rem; }
.exercise-card[data-done] h3 { font-size: clamp(1.45rem, 2.45vw, 2.4rem); line-height: 1.46; }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.actions button { flex: 1; }
@keyframes settle { from { transform: translate(-3px, 5px); opacity: .55; } to { transform: none; opacity: 1; } }
@keyframes wave { from { transform: rotate(-7deg); } to { transform: none; } }
.settle { animation: settle 240ms ease-out; }
.wave { animation: wave 240ms ease-out; transform-origin: center bottom; }
.companions { background: #f6f4ed; }
.companion-copy { grid-column: span 6; }
.screen-stage { grid-column: 8 / 13; }
.cat-list { list-style: none; padding: 0; margin-top: 1.75rem; max-width: 33rem; }
.cat-list li { display: grid; grid-template-columns: 4.6rem 1fr; gap: 1rem; align-items: center; padding-block: .6rem; border-top: 1px solid #cdd0c9; }
.cat-list li img { width: 100%; height: auto; }
.cat-list h3 { font-size: 1.13rem; line-height: 1.6; }
.cat-list p { color: var(--muted); font-size: 1rem; line-height: 1.6; }
.screen-stage {
  isolation: isolate; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  height: clamp(30rem, 69svh, 42rem); padding: 1.5rem;
  background: #c5d8fa; border-radius: 13rem 13rem .45rem .45rem;
}
.screen-stage::before { content: ""; position: absolute; z-index: -1; bottom: -16%; width: 125%; aspect-ratio: 1; border-radius: 50%; background: #a6c0f3; box-shadow: 0 0 0 32px #d5e3fa66, 0 0 0 33px #90ade0; }
.library { background: #f1eadb; color: #253449; }
.library h2 { font-size: clamp(2.1rem, 3.35vw, 3.35rem); }
.big-count { display: inline-block; color: var(--blue); font: 500 clamp(4.75rem, 8.9vw, 8.65rem)/1 var(--serif); letter-spacing: -.05em; font-variant-numeric: lining-nums; }
.decks details { border-top: 1px solid #9b9d96; }
.decks details:last-child { border-bottom: 1px solid #9b9d96; }
.decks summary {
  display: flex; gap: 1rem; justify-content: space-between; align-items: center; padding: 1.4rem .25rem;
  list-style: none; font-size: clamp(1.15rem, 1.7vw, 1.6rem); font-weight: 650;
}
.decks summary::-webkit-details-marker { display: none; }
.decks summary::after { content: "+"; font: 400 1.6rem/1 var(--sans); color: var(--blue); }
.decks details[open] summary::after { content: "−"; }
.deck-example { padding: .15rem .25rem 1.4rem; }
.deck-example p[lang="en"] { font: italic 500 clamp(1.6rem, 2.4vw, 2.4rem)/1.18 var(--serif); letter-spacing: -.025em; }
.deck-example p + p { color: var(--muted); margin-top: .6rem; line-height: 1.65; }
footer { background: #1d2a3d; color: #fff8eb; }
.support, .policy { padding-block: clamp(2.5rem, 6vw, 5rem); }
.policy { max-width: 42rem; }
.policy h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.policy h2 { margin-top: 2rem; font-size: 1.4rem; }
.support p, .policy p { margin-top: .85rem; line-height: 1.85; }
.support a, .policy a { color: var(--blue); text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 490px) {
  .mast nav a[href="#about"], .mast nav a[href="#library"] { display: none; }
}
.foot { min-height: 5.6rem; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.foot > * { grid-column: span 6; }
.foot > span { text-align: right; font-size: .9rem; }
@media (min-width: 761px) and (max-width: 1100px) {
  .intro { grid-column: 1; }
  .hero-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-rows: auto auto; align-content: center; row-gap: 1.4rem; }
  .intro { align-self: end; }
  .folio { grid-column: 2; grid-row: 1 / 3; }
  .hero-action { grid-column: 1; grid-row: 2; align-self: start; justify-self: start; }
  .hero-action p { display: none; }
  .screen-stage { grid-column: 7 / 13; }
}
@media (max-width: 760px) {
  :root { --nav-height: 66px; }
  .intro, .folio, .hero-action, .section-intro, .exercise-card, .companion-copy, .screen-stage, .library-copy, .decks { grid-column: 1; }
  .exercise-card { min-height: 20rem; }
  .wrap { width: 89%; }
  .mast { min-height: 66px; }
  .wordmark { gap: .45rem; font-size: 1.18rem; }
  .wordmark img { width: 32px; height: 32px; }
  nav { gap: .85rem; }
  nav a { font-size: .86rem; }
  .hero-grid, .exercise-grid, .library-grid, .companion-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .hero-grid { min-height: calc(100svh - 66px); padding-block: 2rem; align-content: center; gap: 1.3rem; }
  .hero h1 { font-size: clamp(3.15rem, 10.9vw, 4.5rem); line-height: 1.06; }
  .hero .eyebrow { margin-bottom: .8rem; }
  .lead { font-size: 1rem; line-height: 1.78; margin-top: .95rem; }
  .folio { height: clamp(16rem, 33svh, 22rem); padding: 1.1rem 1.4rem; }
  .folio-head { padding-bottom: .5rem; }
  .folio-en { margin: .8rem 0 .35rem; font-size: clamp(3rem, 11.5vw, 4.6rem); }
  .folio-cat { width: min(40%, 11rem); bottom: 4%; }
  .paper-next { font-size: .88rem; }
  .hero-action { justify-self: stretch; }
  .hero-action p { display: none; }
  .hero-action .btn { width: 100%; }
  h2 { font-size: clamp(2.4rem, 8.7vw, 3.4rem); }
  .exercise-grid, .companion-grid, .library-grid { padding-block: 4rem; min-height: calc(100svh - var(--nav-height)); align-content: center; }
  .exercise-face { min-height: 12.8rem; }
  .cat-list { margin-top: 1.15rem; }
  .cat-list li { grid-template-columns: 3.6rem 1fr; }
  .screen-stage { height: clamp(25rem, 65svh, 33rem); border-radius: 8rem 8rem .45rem .45rem; padding: 1.2rem; }
  .foot { padding-block: .75rem; gap: .5rem; }
}
@media (max-width: 390px) {
  .mast { gap: .5rem; }
  nav { gap: .65rem; }
  .eyebrow { font-size: .88rem; }
  .exercise-card { padding: 1.15rem; }
  .actions .btn { padding-inline: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.partner-print { margin: 0; width: min(85%, 22rem); text-align: center; }
.partner-print img { width: 100%; height: auto; }
.partner-print figcaption { font-size: 1.2rem; font-weight: 650; margin-top: 1rem; }
