@font-face {
  font-family: 'DM Sans';
  src: url('./assets/dm-sans-normal.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: 'DM Serif Display';
  src: url('./assets/dm-serif-display.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  --ink: #21313d;
  --muted: #67717a;
  --accent: #856139;
  --orange: #c79b58;
  --navy: #263f54;
  --line: #dcdedb;
  --paper: #f4f2ec;
  --pale: #f3f4f0;
  --canvas: #fcfcf9;
  --slate: #8697a2;
  --stone: #e7ddca;
  --red: #a43d32;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --serif: Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 35px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
svg { display: block; }
p { margin: 0 0 1.25em; }
h1, h2, h3 { margin: 0; color: var(--ink); }
::selection { background: #f5d8b3; }
strong { font-weight: 700; }
sup { font-size: .65em; }
figure { margin: 0; }
button, a { touch-action: manipulation; }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: -100px; left: 12px; padding: 12px; background: white; z-index: 5; }
.skip-link:focus { top: 10px; }

/* Masthead and the illustrated opening. */
.site-header { border-bottom: 1px solid var(--line); background: var(--canvas); }
.header-inner { max-width: 1420px; margin: auto; min-height: 92px; display: flex; align-items: center; gap: 46px; padding: 0 32px; }
.brand { font: 31px/1 var(--display); display: flex; align-items: center; gap: 11px; letter-spacing: -.8px; }
.brand:hover { color: var(--ink); }
.brand svg { stroke: #605c54; stroke-width: 1; fill: white; width: 30px; height: 30px; }
.brand svg circle:first-of-type, .brand svg circle:nth-of-type(3) { fill: var(--orange); stroke: var(--orange); }
.site-header nav { display: flex; align-self: stretch; gap: 34px; margin-left: auto; font-size: 12px; font-weight: 550; }
.site-header nav a { display: flex; align-items: center; position: relative; }
.site-header nav a::after { content: ''; height: 3px; background: var(--orange); position: absolute; bottom: -1px; left: 0; right: 0; transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.site-header nav a:hover::after, .site-header nav a.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 23px; font-size: 12px; }
.header-actions button { font-size: 12px; padding: 8px; color: var(--muted); }
.cover-wrap { background: var(--paper); }
.cover { max-width: 1420px; padding: 54px 32px 30px; margin: auto; display: grid; grid-template-columns: minmax(0,.66fr) minmax(0,1.34fr); align-items: center; gap: 44px; }
.article-header { padding: 15px 0 24px; }
.eyebrow { font-size: 10px; line-height: 1.7; letter-spacing: 1.8px; font-weight: 600; color: var(--accent); margin-bottom: 20px; }
h1 { font: 56px/1.04 var(--display); letter-spacing: -1.7px; text-wrap: balance; }
.dek { font: 17px/1.7 var(--sans); margin: 25px 0 26px; color: #4b4944; max-width: 480px; }
.article-meta { font-size: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #6b665e; line-height: 1.6; }
.article-meta a { flex-basis: 100%; display: block; width: max-content; margin-top: 13px; font-size: 11px; color: var(--ink); font-weight: 600; }
.article-meta a:hover { color: var(--accent); }
.meta-dot { color: #a29a8e; }
.article-meta .meta-dot:nth-of-type(4) { display: none; }
.cover-art { min-width: 0; }
.cover-art img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; background: var(--navy); }
.cover-art figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 14px; padding-top: 13px; font-size: 9px; line-height: 1.6; color: #69747a; letter-spacing: 1px; }
.cover-art figcaption span:last-child { letter-spacing: 0; }
.cover-bottom { max-width: 1356px; margin: auto; padding: 12px 0 28px; display: flex; justify-content: space-between; gap: 20px; font-size: 11px; color: #727878; }
.cover-bottom a { color: #26231f; font-weight: 600; }

/* Interactive counting plate. */
.wide { max-width: 1120px; margin: 0 auto; }
.counting-figure { margin-top: 44px; padding: 30px 32px 0; background: var(--pale); scroll-margin-top: 28px; }
.figure-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #5d564d; font-size: 10px; font-weight: 600; letter-spacing: 1.2px; }
.interactive-label { display: flex; align-items: center; gap: 7px; letter-spacing: 0; font-size: 11px; color: var(--accent); font-weight: 500; }
.interactive-label i { width: 6px; height: 6px; background: var(--orange); border-radius: 50%; }
.figure-instruction { font: 20px/1.5 var(--display); color: #332c24; margin: 17px 0 26px; }
.counting-stage { display: grid; grid-template-columns: 240px 48px minmax(0,1fr) 140px; align-items: center; gap: 25px; padding: 5px 0 26px; }
.stage-label { font-size: 11px; color: #655e54; text-align: center; margin-bottom: 14px; }
.switch-graph { position: relative; width: 240px; height: auto; aspect-ratio: 240 / 208; }
.switch-graph > svg, #switch-nodes { position: absolute; inset: 0; width: 100%; height: 100%; }
.switch-node { position: absolute; transform: translate(-50%,-50%); width: 34px; height: 34px; border: 1.5px solid #9caab1; border-radius: 50%; background: var(--pale); box-shadow: 0 0 0 5px var(--pale); transition: background .16s,border-color .16s; color: #657580; font-size: 12px; display: grid; place-items: center; padding: 0; }
.switch-node[aria-pressed=true] { background: var(--orange); border-color: var(--orange); color: #2f2213; }
.switch-node:hover { box-shadow: 0 0 0 5px #fbefdf; }
.switch-node.conflict { border-color: var(--red); background: var(--red); color: white; }
.arrangement-status { font-size: 11px; color: var(--accent); text-align: center; margin: 5px 0 9px; min-height: 17px; }
.arrangement-status.conflict { color: var(--red); }
.quiet-button { font-size: 11px; color: #70665a; text-decoration: underline; text-underline-offset: 4px; display: block; margin: auto; padding: 5px; }
.quiet-button:hover { color: var(--accent); }
.diagram-arrow { font: 28px var(--serif); color: #a79a88; text-align: center; margin-top: -10px; }
.possibilities { width: 100%; max-width: 384px; margin: 0 auto; }
.patterns { display: grid; grid-template-columns: repeat(8,1fr); gap: 6px; }
.pattern { aspect-ratio: 1.35; border: 1px solid transparent; min-width: 0; padding: 3px; transition: background .15s,opacity .15s; position: relative; }
.pattern svg { width: 100%; height: 100%; }
.pattern.is-invalid { opacity: .4; }
.pattern[aria-pressed=true] { background: #e9ddc6; border-color: #b99159; opacity: 1; }
.pattern.is-invalid[aria-pressed=true] { background: #faf0ee; border-color: var(--red); }
.pattern:hover { opacity: 1; background: #f7f0e5; }
.pattern-legend { display: flex; align-items: center; gap: 14px; font-size: 10px; color: #756b5e; margin-top: 14px; flex-wrap: wrap; }
.pattern-legend > span { display: flex; align-items: center; gap: 5px; }
.valid-dot, .invalid-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.invalid-dot { background: #c5c1bb; }
.select-hint { margin-left: auto; font-size: 9px; }
.count-answer { text-align: center; padding-bottom: 12px; }
.answer-number { font: 100px/1 var(--display); color: var(--ink); display: block; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -5px; }
.answer-label { display: block; font-size: 12px; line-height: 1.5; color: #655a4d; margin-top: 12px; }
.count-fraction { font-size: 10px; margin-top: 20px; color: #7b7368; }
.figure-controls { display: flex; align-items: center; gap: 22px; padding: 21px 0 19px; border-top: 1px solid #e5e0d7; font-size: 11px; color: #726859; }
.rule-controls { display: flex; border: 1px solid #d6cfc3; gap: 0; }
.rule-controls button { padding: 10px 16px; font-size: 11px; color: #62584b; border-right: 1px solid #ded8ce; }
.rule-controls button:last-child { border-right: 0; }
.rule-controls button[aria-pressed=true] { background: var(--navy); color: #faf7ef; }
.reset-button { font-size: 11px; color: #766959; padding: 7px; }
.figure-controls > .reset-button { margin-left: auto; }
figcaption { font: 11px/1.65 var(--sans); color: #776e63; }
.counting-figure > figcaption { padding-bottom: 22px; }

/* Reading column, notes, and the weighted model. */
.narrative { width: 700px; margin: 0 auto; }
.reading-section { position: relative; margin-top: 90px; scroll-margin-top: 50px; }
.section-marker { display: flex; align-items: center; gap: 12px; font-size: 10px; letter-spacing: 1.6px; color: var(--accent); margin-bottom: 17px; font-weight: 600; }
.section-marker::before { content: ''; width: 25px; height: 1px; background: var(--orange); flex: 0 0 auto; }
.reading-section h2 { font: 36px/1.16 var(--display); letter-spacing: -.55px; margin-bottom: 27px; }
.reading-section > p { font: 19px/1.85 var(--serif); color: #37342f; }
.reading-section > p strong { color: var(--ink); }
.margin-note { position: absolute; left: calc(100% + 44px); width: 164px; top: 180px; display: flex; flex-direction: column; gap: 9px; font-size: 11px; line-height: 1.75; color: #766f65; border-top: 2px solid #d69c52; padding-top: 12px; }
.note-title { font-weight: 650; color: #4a4135; font-size: 11px; }
.margin-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.insight { display: flex; gap: 20px; background: var(--pale); border-left: 3px solid var(--orange); padding: 24px 26px; margin: 32px 0; }
.insight-mark { color: var(--accent); font-size: 23px; }
.insight p { font: 15px/1.8 var(--sans); color: #5b5144; margin: 0; }
.weight-figure { margin: 36px -40px 33px; padding: 28px 30px; background: var(--pale); }
.weight-groups { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; margin: 27px 0 15px; }
.weight-group { text-align: center; }
.weight-bars { height: 128px; position: relative; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid #cfc3b2; margin-bottom: 9px; }
.weight-bar { width: 46px; background: #dfd1b8; transition: height .25s; min-height: 0; position: relative; }
.weight-group:nth-child(2) .weight-bar { background: var(--orange); }
.weight-group:nth-child(3) .weight-bar { background: #7e94a2; }
.weight-group:nth-child(4) .weight-bar { background: var(--navy); }
.bar-value { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #685238; white-space: nowrap; }
.weight-group .mini-cycle { width: 48px; height: 40px; margin: 13px auto 9px; }
.weight-term { font: 18px var(--serif); color: #5b4023; margin-top: 9px; }
.group-label { font-size: 10px; line-height: 1.5; color: #776e60; margin-top: 8px; }
.weight-equation { display: flex; justify-content: center; align-items: baseline; gap: 17px; padding: 24px 0; border-top: 1px solid #ded5c8; margin-top: 25px; }
.math { font-family: var(--serif); font-style: italic; }
.weight-equation .math { font-size: 24px; }
.equals { color: #9c8d79; }
.weight-equation > output { font: 36px/1 var(--display); color: var(--accent); min-width: 54px; }
.weight-control { display: flex; align-items: center; gap: 22px; border-top: 1px solid #ded5c8; padding-top: 22px; }
.weight-control label { font-size: 11px; color: #746755; white-space: nowrap; }
.weight-control label .math { font-size: 16px; color: #674721; margin-left: 12px; }
.slider-row { display: flex; align-items: center; gap: 12px; flex: 1; font-size: 10px; color: #786853; }
.slider-row input { width: 100%; min-width: 40px; accent-color: var(--accent); cursor: ew-resize; height: 22px; }
.weight-figure figcaption { margin-top: 19px; min-height: 36px; }

/* Research reads as four illustrated editorial features. */
.research-section { width: 1040px; margin-left: -170px; padding-top: 18px; }
.research-section > .section-marker, .research-section > h2, .research-section > p { max-width: 700px; margin-left: auto; margin-right: auto; }
.research-section > .margin-note { position: static; width: auto; max-width: 700px; margin: 24px auto 36px; border-top: 0; border-left: 2px solid #d69c52; padding: 3px 0 3px 17px; font-size: 11px; gap: 5px; }
.research-list { display: grid; grid-template-columns: 1fr 1fr; gap: 38px 40px; margin-top: 38px; }
.research-entry { padding-bottom: 18px; min-width: 0; }
.research-diagram { height: 220px; background: var(--navy); margin-bottom: 24px; overflow: hidden; }
.research-diagram svg { width: 100%; height: 100%; }
.research-category { font-size: 10px; letter-spacing: 1.6px; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.research-entry h3 { font: 27px/1.13 var(--display); letter-spacing: -.3px; margin-bottom: 15px; max-width: 440px; }
.research-entry p:not(.research-category) { font: 14px/1.8 var(--sans); color: #666057; margin: 0; }
.research-links { display: flex; flex-wrap: wrap; gap: 17px; margin-top: 19px; font-size: 11px; color: #382a1a; }
.research-links a { border-bottom: 1px solid #cda372; padding-bottom: 3px; }
.reading-section .small-note, .small-note { font: 11px/1.8 var(--sans); color: #756e64; }
.research-section > .small-note { max-width: none; margin-top: 25px; }

/* Reusable foundations and the onward reading links. */
.architecture-figure { margin: 33px 0; }
.architecture-layer { display: flex; align-items: center; gap: 24px; padding: 27px 26px; border-bottom: 1px solid #d7deda; background: #f3f2ec; }
.architecture-layer:nth-child(2) { background: #ecf0ed; }
.architecture-layer:nth-child(3) { background: #e4ebeb; border-bottom: 0; }
.layer-number { font-size: 11px; color: #a27235; }
.architecture-layer h3 { font: 22px/1.2 var(--display); margin-bottom: 8px; }
.architecture-layer p { font-size: 11px; color: #786d5e; margin: 0; line-height: 1.7; }
.layer-symbol { font: 34px var(--serif); margin-left: auto; color: #607a89; }
.architecture-figure figcaption { margin: 15px 0; }
.library-links { display: flex; align-items: center; gap: 27px; margin-top: 36px; font-size: 12px; color: #493721; }
.primary-link { background: var(--navy); color: white; padding: 14px 20px; }
.primary-link:hover { background: #36566d; color: white; }
.further-reading { border-top: 1px solid var(--line); margin: 80px 0 75px; padding-top: 30px; }
.further-reading h2 { font: 29px/1.2 var(--display); margin-bottom: 23px; }
.further-reading > a { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e2ddd5; padding: 21px 0; color: #393025; }
.further-reading strong { font-size: 14px; font-weight: 550; }
.further-reading small { display: block; margin-top: 8px; font-size: 12px; color: #756c60; }
.further-reading .small-note { margin-top: 33px; }
.site-footer { background: var(--paper); padding: 38px max(30px,calc((100vw - 1120px)/2)); display: flex; justify-content: space-between; gap: 30px; color: #776e61; font-size: 11px; }
.site-footer > div { display: flex; align-items: center; gap: 23px; }
.footer-brand { font: 26px var(--display); color: var(--ink); }

/* Chinese uses the same editorial hierarchy with native serif headings. */
html[lang=zh-CN] h1, html[lang=zh-CN] .reading-section h2, html[lang=zh-CN] .research-entry h3 { font-family: 'Songti SC', 'Noto Serif CJK SC', 'SimSun', serif; font-weight: 700; letter-spacing: 0; }
html[lang=zh-CN] h1 { font-size: 51px; line-height: 1.32; }
html[lang=zh-CN] .dek { font-size: 16px; line-height: 1.9; }
html[lang=zh-CN] .reading-section > p { font-family: var(--sans); font-size: 16px; line-height: 2.05; }
html[lang=zh-CN] .reading-section h2 { font-size: 32px; line-height: 1.45; }
html[lang=zh-CN] .research-entry h3 { font-size: 25px; line-height: 1.45; }

@media (min-width: 1450px) {
  .cover { padding-top: 65px; padding-bottom: 45px; }
  h1 { font-size: 64px; }
}
@media (max-width: 1180px) {
  .header-inner { gap: 35px; }
  .cover { gap: 32px; padding-top: 38px; }
  h1 { font-size: clamp(36px,4vw,46px); }
  .cover-bottom { margin: 0 30px; }
  .wide { margin-left: 40px; margin-right: 40px; }
  .counting-stage { grid-template-columns: 210px 25px minmax(0,1fr) 95px; gap: 17px; }
  .switch-graph { width: 210px; }
  .switch-node { width: 30px; height: 30px; }
  .answer-number { font-size: 80px; }
  .select-hint { display: none; }
  .margin-note { position: static; width: auto; padding: 3px 0 3px 16px; margin: 25px 0; max-width: 550px; border-top: 0; border-left: 2px solid #d69c52; font-size: 12px; gap: 5px; }
  .research-section { width: calc(100vw - 80px); margin-left: calc((700px - (100vw - 80px))/2); }
  .research-list { gap: 32px; }
  .research-diagram { height: 200px; }
  .weight-figure { margin-left: 0; margin-right: 0; }
}
@media (max-width: 900px) {
  .header-inner { min-height: 78px; gap: 25px; padding: 0 25px; }
  .brand { font-size: 27px; }
  .site-header nav { gap: 22px; font-size: 11px; }
  .header-actions { gap: 12px; font-size: 11px; }
  .cover { grid-template-columns: minmax(0,.76fr) minmax(0,1.24fr); gap: 28px; padding: 35px 26px 28px; }
  h1 { font-size: clamp(34px,4.3vw,40px); }
  .eyebrow { font-size: 8px; letter-spacing: 1.3px; }
  .dek { font-size: 14px; line-height: 1.75; margin-top: 20px; }
  .cover-art figcaption { font-size: 8px; letter-spacing: .5px; }
  .article-meta { font-size: 9px; gap: 6px; }
  .article-meta a { font-size: 10px; }
  .counting-stage { grid-template-columns: 180px minmax(0,1fr) 80px; gap: 20px; }
  .diagram-arrow { display: none; }
  .switch-graph { width: 180px; }
  .switch-node { width: 28px; height: 28px; font-size: 10px; }
  .stage-label { font-size: 10px; }
  .patterns { gap: 3px; }
  .pattern { padding: 2px; }
  .answer-number { font-size: 68px; }
  .answer-label { font-size: 10px; }
  .figure-controls { gap: 16px; }
  .rule-controls button { padding: 9px 12px; }
  .narrative { width: auto; max-width: 660px; margin: 0 auto; }
  .research-section { width: calc(100vw - 70px); margin-left: calc((660px - (100vw - 70px))/2); }
  .research-section > .section-marker, .research-section > h2, .research-section > p, .research-section > .margin-note { max-width: 660px; }
  .research-entry h3 { font-size: 25px; }
  .site-footer { flex-wrap: wrap; }
  html[lang=zh-CN] h1 { font-size: 38px; }
}
@media (max-width: 740px) {
  .site-header nav a:first-child { display: none; }
  .cover { grid-template-columns: 1fr; gap: 28px; padding: 38px 28px 26px; }
  .article-header { padding: 0; max-width: 580px; }
  h1 { font-size: 54px; max-width: 620px; text-wrap: initial; }
  .eyebrow { font-size: 9px; margin-bottom: 17px; }
  .dek { font-size: 16px; max-width: 560px; margin: 22px 0; }
  .article-meta { font-size: 10px; gap: 10px; }
  .article-meta a { display: none; }
  .cover-art figcaption span:last-child { display: inline; }
  .cover-art figcaption { font-size: 8px; }
  .cover-bottom { margin: 0 28px; font-size: 10px; padding: 17px 0; }
  .narrative { margin: 0 35px; max-width: none; }
  .research-section { width: auto; margin-left: 0; }
  .reading-section { margin-top: 70px; }
  .reading-section h2 { font-size: 33px; }
  .reading-section > p { font-size: 18px; }
  .research-list { gap: 25px; }
  .research-diagram { height: 170px; }
  .research-entry h3 { font-size: 23px; }
  .research-category { font-size: 9px; letter-spacing: 1px; }
  .research-entry p:not(.research-category) { font-size: 13px; }
  .weight-control { flex-wrap: wrap; gap: 12px; }
  .weight-control label { width: 100%; }
  .weight-equation .math { font-size: 22px; }
  .wide { margin-left: 28px; margin-right: 28px; }
  .counting-figure { padding: 23px 20px 0; margin-top: 36px; }
  .figure-heading { font-size: 9px; letter-spacing: .7px; }
  .figure-instruction { font-size: 19px; }
  html[lang=zh-CN] h1 { font-size: 46px; }
}
@media (max-width: 580px) {
  .header-inner { padding: 0 22px; min-height: 74px; gap: 15px; }
  .brand { font-size: 27px; gap: 8px; }
  .brand svg { width: 25px; height: 25px; }
  .site-header nav { display: none; }
  .header-actions { margin-left: auto; gap: 8px; }
  .header-actions button { font-size: 11px; }
  .cover { padding: 33px 24px 22px; gap: 25px; }
  h1 { font-size: 43px; letter-spacing: -.9px; line-height: 1.07; }
  .eyebrow { font-size: 8px; letter-spacing: 1.2px; }
  .dek { font-size: 15px; line-height: 1.75; margin: 20px 0; }
  .article-meta { font-size: 9px; gap: 8px; }
  .cover-art figcaption { font-size: 8px; }
  .cover-bottom { margin: 0 24px; align-items: center; gap: 25px; font-size: 9px; line-height: 1.6; }
  .cover-bottom a { flex-shrink: 0; }
  .wide { margin-left: 24px; margin-right: 24px; }
  .figure-heading { font-size: 8px; gap: 10px; letter-spacing: .4px; }
  .interactive-label { font-size: 9px; }
  .figure-instruction { font-size: 20px; line-height: 1.35; margin: 17px 0 15px; }
  .counting-stage { grid-template-columns: minmax(0,1fr) 100px; gap: 23px 12px; padding: 12px 0 25px; }
  .configuration { grid-column: 1; grid-row: 1; max-width: 230px; }
  .switch-graph { width: 210px; height: auto; aspect-ratio: 240 / 208; max-width: 100%; margin: auto; }
  .configuration .stage-label { margin-bottom: 6px; }
  .possibilities { grid-column: 1/-1; grid-row: 2; max-width: 420px; }
  .count-answer { grid-column: 2; grid-row: 1; padding-bottom: 0; }
  .answer-number { font-size: 77px; letter-spacing: -3px; }
  .answer-label { font-size: 11px; }
  .count-fraction { margin-top: 12px; }
  .patterns { gap: 6px; }
  .pattern { aspect-ratio: 1.45; padding: 3px; }
  .stage-label { font-size: 11px; }
  .arrangement-status { margin: 0 0 4px; }
  .quiet-button { font-size: 10px; }
  .pattern-legend { font-size: 9px; }
  .select-hint { display: block; }
  .figure-controls { flex-wrap: wrap; gap: 10px; padding: 17px 0; }
  .figure-controls > span { flex-basis: 100%; font-size: 10px; }
  .rule-controls button { font-size: 10px; padding: 9px 10px; }
  .reset-button { font-size: 10px; padding: 6px 2px; }
  .counting-figure > figcaption { font-size: 10px; padding-bottom: 20px; }
  .narrative { margin: 0 24px; }
  .reading-section { margin-top: 58px; scroll-margin-top: 30px; }
  .reading-section h2 { font-size: 30px; letter-spacing: -.3px; margin-bottom: 23px; }
  .section-marker { font-size: 9px; letter-spacing: 1.1px; }
  .reading-section > p { font-size: 17px; line-height: 1.85; }
  .insight { padding: 20px; gap: 13px; }
  .insight p { font-size: 13px; }
  .margin-note { font-size: 11px; }
  .weight-figure { padding: 20px 15px; margin: 29px -8px; }
  .weight-groups { gap: 12px; margin-top: 24px; }
  .weight-bar { width: 32px; }
  .weight-bars { height: 112px; }
  .weight-term { font-size: 17px; }
  .group-label { font-size: 9px; }
  .weight-equation { gap: 9px; padding: 23px 0; }
  .weight-equation .math { font-size: 17px; }
  .weight-equation > output { font-size: 29px; min-width: 40px; }
  .weight-control label { font-size: 11px; }
  .weight-figure figcaption { font-size: 10px; }
  .research-section { padding-top: 27px; }
  .research-list { grid-template-columns: 1fr; gap: 35px; margin-top: 30px; }
  .research-diagram { height: 210px; margin-bottom: 20px; }
  .research-category { font-size: 9px; letter-spacing: 1.3px; }
  .research-entry h3 { font-size: 28px; margin-bottom: 13px; }
  .research-entry p:not(.research-category) { font-size: 14px; }
  .research-links { gap: 17px; font-size: 11px; }
  .architecture-layer { padding: 23px 16px; gap: 15px; }
  .architecture-layer h3 { font-size: 21px; }
  .architecture-layer p { font-size: 10px; }
  .layer-symbol { font-size: 26px; }
  .library-links { gap: 20px; font-size: 11px; }
  .primary-link { padding: 13px; }
  .further-reading { margin: 60px 0 55px; }
  .further-reading h2 { font-size: 27px; }
  .further-reading small { line-height: 1.7; font-size: 11px; }
  .site-footer { padding: 30px 24px; gap: 25px; }
  .site-footer > div { gap: 17px; flex-wrap: wrap; }
  .site-footer > div:first-child { flex-direction: column; align-items: flex-start; }
  html[lang=zh-CN] h1 { font-size: 40px; line-height: 1.35; }
  html[lang=zh-CN] .dek { font-size: 15px; }
  html[lang=zh-CN] .reading-section h2 { font-size: 28px; }
  html[lang=zh-CN] .reading-section > p { font-size: 15px; }
  html[lang=zh-CN] .research-entry h3 { font-size: 25px; }
}
@media (max-width: 360px) {
  .brand { font-size: 24px; }
  .brand svg { width: 22px; }
  .header-inner { padding: 0 18px; }
  .cover { padding-left: 20px; padding-right: 20px; }
  h1 { font-size: 38px; }
  .eyebrow { font-size: 7px; }
  .narrative, .wide { margin-left: 20px; margin-right: 20px; }
  .counting-stage { grid-template-columns: minmax(0,1fr) 75px; gap: 18px 6px; }
  .switch-graph { width: 180px; height: auto; }
  .rule-controls button { font-size: 9px; padding: 8px; }
  .patterns { gap: 3px; }
  .pattern { padding: 2px; }
  .weight-equation .math { font-size: 15px; }
  .library-links { gap: 12px; font-size: 10px; }
  .research-diagram { height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}


/* Links connecting the introduction, reference, and picture book. */
.cover-resources { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px 25px; }
.reading-format { font: 11px var(--sans); flex-shrink: 0; margin-left: 20px; color: var(--muted); }
@media (max-width: 740px) {
  .cover-bottom { align-items: flex-start; flex-direction: column; gap: 16px; }
  .cover-resources { justify-content: flex-start; gap: 12px 20px; }
}
