@charset "UTF-8";
pre code.hljs {
  display: block;
  overflow-x: auto;
  padding: 1em
}
code.hljs {
  padding: 3px 5px
}
/*!
  Theme: GitHub
  Description: Light theme as seen on github.com
  Author: github.com
  Maintainer: @Hirse
  Updated: 2021-05-15

  Outdated base version: https://github.com/primer/github-syntax-light
  Current colors taken from GitHub's CSS
*/
.hljs {
  color: #24292e;
  background: #ffffff
}
.hljs-doctag,
.hljs-keyword,
.hljs-meta .hljs-keyword,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-variable.language_ {
  /* prettylights-syntax-keyword */
  color: #d73a49
}
.hljs-title,
.hljs-title.class_,
.hljs-title.class_.inherited__,
.hljs-title.function_ {
  /* prettylights-syntax-entity */
  color: #6f42c1
}
.hljs-attr,
.hljs-attribute,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-operator,
.hljs-variable,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id {
  /* prettylights-syntax-constant */
  color: #005cc5
}
.hljs-regexp,
.hljs-string,
.hljs-meta .hljs-string {
  /* prettylights-syntax-string */
  color: #032f62
}
.hljs-built_in,
.hljs-symbol {
  /* prettylights-syntax-variable */
  color: #e36209
}
.hljs-comment,
.hljs-code,
.hljs-formula {
  /* prettylights-syntax-comment */
  color: #6a737d
}
.hljs-name,
.hljs-quote,
.hljs-selector-tag,
.hljs-selector-pseudo {
  /* prettylights-syntax-entity-tag */
  color: #22863a
}
.hljs-subst {
  /* prettylights-syntax-storage-modifier-import */
  color: #24292e
}
.hljs-section {
  /* prettylights-syntax-markup-heading */
  color: #005cc5;
  font-weight: bold
}
.hljs-bullet {
  /* prettylights-syntax-markup-list */
  color: #735c0f
}
.hljs-emphasis {
  /* prettylights-syntax-markup-italic */
  color: #24292e;
  font-style: italic
}
.hljs-strong {
  /* prettylights-syntax-markup-bold */
  color: #24292e;
  font-weight: bold
}
.hljs-addition {
  /* prettylights-syntax-markup-inserted */
  color: #22863a;
  background-color: #f0fff4
}
.hljs-deletion {
  /* prettylights-syntax-markup-deleted */
  color: #b31d28;
  background-color: #ffeef0
}
.hljs-char.escape_,
.hljs-link,
.hljs-params,
.hljs-property,
.hljs-punctuation,
.hljs-tag {
  /* purposely ignored */
  
}
/* Latin faces are served from /fonts (SIL OFL, see /fonts/LICENSES.txt), so pages and
   scripts never wait on a third-party stylesheet. Chinese uses the reader's system face. */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/bebas-neue-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/bebas-neue-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Google Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/google-sans-italic-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Google Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/google-sans-italic-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/google-sans-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/google-sans-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Google Sans Code';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/fonts/google-sans-code-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Google Sans Code';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/fonts/google-sans-code-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  /* One ink for everything, as on alanzeng.com's text; greys carry the hierarchy. */
  --paper: #fff;
  --ink: #16171a; /* titles, wordmark, strong text */
  --accent: var(--ink); /* marks that were blue now share the ink */
  --accent-deep: #000;
  --body: #2a2c31; /* reading text */
  --muted: #6b6e76;
  --faint: #9b9ea6;
  --line: #e8e9ec;
  --line-strong: #d5d7dc;
  --soft: #f6f6f8;
  --sans:
    'Google Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC',
    'Source Han Sans SC', sans-serif; /* Chinese falls through to the system face */
  --display: 'Bebas Neue', var(--sans); /* Latin titles; Chinese falls back to --sans */
  --mono: 'Google Sans Code', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --reading: 17px;
  --page-width: 960px;
  --page-gutter: 40px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
#main {
  flex: 1 0 auto;
  min-width: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  background: none;
  border: 0;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button,
a,
input,
summary {
  outline-offset: 5px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
}
a:hover {
  color: var(--muted);
}
::selection {
  background: var(--accent);
  color: #fff;
}
svg {
  display: block;
  max-width: 100%;
}
p {
  margin: 0;
}
h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  font-weight: 400;
}
button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
}
.mono {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.03em;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.skip {
  position: fixed;
  top: -80px;
  left: 20px;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  z-index: 99;
}
.skip:focus {
  top: 10px;
}
.site-header {
  width: calc(100% - 2 * var(--page-gutter));
  flex-shrink: 0;
  max-width: var(--page-width);
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 40px;
}
.wordmark {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
  padding-top: 3px; /* Bebas sits high in its box */
  letter-spacing: 0.01em;
  color: var(--accent);
  white-space: nowrap;
}
.wordmark:hover {
  color: var(--accent-deep);
}
.brand-period {
  margin-left: 2px;
}
.site-nav {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-left: auto;
  font-size: 13px;
  height: 100%;
}
.site-nav > a {
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}
.site-nav > a.active:after {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  content: '';
}
.site-nav a.active {
  color: var(--accent);
}
.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0;
}
.icon-button:hover {
  background: var(--soft);
}
.search-trigger {
  margin-left: 6px;
}
.menu-toggle {
  display: none;
}
.reading-progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 2px;
  width: 100%;
  z-index: 40;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}
.site-footer {
  width: calc(100% - 2 * var(--page-gutter));
  flex-shrink: 0;
  max-width: var(--page-width);
  margin: 56px auto 0;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 11px;
  color: var(--muted);
}
.footer-name {
  font-family: var(--display);
  font-size: 18px;
  line-height: 1;
  padding-top: 2px;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.footer-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.prototype-label {
  font-family: var(--sans);
  font-size: 10px;
  border-left: 1px solid var(--line);
  padding-left: 25px;
}

/* Reading layout */
.article-shell {
  width: calc(100% - 2 * var(--page-gutter));
  max-width: var(--page-width);
  margin: auto;
  display: grid;
  grid-template-columns: 160px minmax(0, 720px) 1fr;
  column-gap: 48px;
}
.article-rail {
  padding-top: 40px;
}
.back-link {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  gap: 11px;
  align-items: center;
}
.article-index {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--faint);
  margin-top: 90px;
  display: flex;
  gap: 10px;
}
.article-index:before {
  width: 28px;
  height: 1px;
  background: var(--line-strong);
  content: '';
  align-self: center;
}
.article-header {
  grid-column: 2;
  padding: 30px 0 20px;
}
.article-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
}
.article-kicker .dot {
  width: 3px;
  height: 3px;
  background: var(--accent);
}
.article-header h1 {
  font-size: 40px;
  text-wrap: balance;
  line-height: 1.2;
  letter-spacing: -1.2px;
  font-weight: 400;
  color: var(--accent);
  margin: 14px 0 12px;
}
.article-header .deck {
  max-width: 650px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}
.title-phrase {
  display: inline-block;
  max-inline-size: 100%;
}
.article-meta {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 20px;
  flex-wrap: wrap;
}
.article-meta .author {
  color: var(--ink);
}
.article-meta .separator {
  color: var(--faint);
}
.article-tools {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 14px;
}
.text-tool {
  font-family: var(--sans);
  font-size: 12px;
  min-width: 26px;
  height: 30px;
  padding: 0;
}
.text-tool:hover {
  background: var(--soft);
}
.text-tool[aria-pressed='true'] {
  border-bottom: 1px solid var(--accent);
}
.content-rule {
  height: 1px;
  background: var(--line);
  margin-top: 20px;
}
.article-body {
  grid-column: 2;
  color: var(--body);
  font-size: var(--reading);
  line-height: 1.72;
  min-width: 0;
  letter-spacing: 0.01em;
}
.article-body .lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 24px;
}
.article-body p {
  margin: 0 0 14px;
}
.article-body h2 {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.3px;
  margin: 32px 0 14px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-weight: 700;
}
.article-body h2 .section-num {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--faint);
  font-weight: 400;
  letter-spacing: 0;
}
.article-body h3 {
  font-size: 17px;
  color: var(--ink);
  margin: 24px 0 10px;
  letter-spacing: -0.1px;
  font-weight: 700;
}
.article-body strong {
  font-weight: 700;
  color: var(--ink);
}
.article-body a:not(.button) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
}
.article-body a:hover {
  text-decoration-color: var(--accent);
}
.article-body code {
  font-family: var(--mono);
  font-size: 0.81em;
  background: var(--soft);
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 2px;
  letter-spacing: 0;
}
.article-body sup {
  font-family: var(--sans);
  font-size: 10px;
  padding-left: 3px;
}
.article-aside {
  grid-column: 3;
  grid-row: 2;
  align-self: start;
  position: sticky;
  top: 48px;
  padding-top: 3px;
  min-width: 0;
}
.toc-heading {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 16px;
}
.toc {
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.toc a {
  font-size: 11px;
  line-height: 1.6;
  padding: 6px 0 6px 18px;
  color: var(--muted);
  position: relative;
}
.toc a.active {
  color: var(--accent);
}
.toc a.active:before {
  content: '';
  position: absolute;
  left: -1px;
  top: 7px;
  bottom: 7px;
  width: 2px;
  background: var(--accent);
}
.toc a span {
  font-family: var(--sans);
  font-size: 9px;
  margin-right: 9px;
  color: var(--faint);
}
.aside-note {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 12px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.mobile-toc {
  display: none;
}
.code-block {
  margin: 22px 0 24px;
  background: #fff;
  border: 1px solid var(--line);
  position: relative;
  letter-spacing: 0;
}
.code-toolbar {
  background: var(--soft);
  padding: 0 16px;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
}
.code-tab {
  font-family: var(--sans);
  font-size: 11px;
  height: 38px;
  padding: 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
}
.code-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.code-file {
  font-size: 10px;
  font-family: var(--sans);
  color: var(--muted);
  margin-left: auto;
}
.copy-button {
  font-size: 10px;
  font-family: var(--sans);
  color: var(--muted);
  padding: 6px 0 6px 10px;
  min-width: 43px;
}
.copy-button:hover {
  color: var(--accent);
}
.code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font: 13px/1.65 var(--mono);
  tab-size: 4;
  overscroll-behavior-inline: contain;
}
.code-block pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font: inherit;
  display: block;
  min-width: max-content;
}
.code-line {
  display: block;
  white-space: pre;
}
.line-num {
  color: var(--faint);
  display: inline-block;
  width: 30px;
  user-select: none;
}
.syn-comment {
  color: #838993;
  font-style: italic;
}
.syn-key {
  font-weight: 700;
  color: #16181c;
}
.syn-string {
  color: #565e69;
}
.code-caption {
  font-family: var(--sans);
  font-size: 10px;
  color: var(--muted);
  margin: -14px 0 20px;
  line-height: 1.7;
}
.formula {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
  margin: 22px 0;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  color: var(--ink);
  min-width: 0;
}
.formula .katex {
  font-size: 1em;
}
.formula math {
  font-size: inherit;
  margin: auto;
  flex-shrink: 0;
}
.equation-number {
  font-family: var(--sans);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.article-body ul,
.article-body ol {
  padding-left: 23px;
  margin: 0 0 22px;
}
.article-body li {
  padding-left: 4px;
  margin-bottom: 6px;
}
.figure {
  margin: 26px 0;
}
.figure-button {
  display: block;
  background: var(--soft);
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  cursor: zoom-in;
  text-align: left;
}
.figure figcaption {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  display: flex;
  gap: 15px;
  margin-top: 10px;
}
.figure figcaption .mono {
  font-size: 9px;
  color: var(--faint);
  padding-top: 2px;
  white-space: nowrap;
}
.figure-zoom {
  font-family: var(--sans);
  font-size: 9px;
  padding: 0 15px 12px;
  display: block;
  text-align: right;
  color: var(--muted);
}
.figure svg text {
  font-family: var(--sans);
}
.article-body blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--accent);
  font-size: calc(var(--reading) * 0.95);
  line-height: 1.65;
  color: var(--body);
}
.article-body blockquote p,
.article-body blockquote .lead {
  font-size: inherit;
  line-height: inherit;
  margin-bottom: 12px;
}
.article-body blockquote cite {
  font: 11px/1.6 var(--sans);
  font-style: normal;
  color: var(--muted);
}
.table-scroll {
  overflow-x: auto;
  margin: 20px 0 24px;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  white-space: nowrap;
  line-height: 1.7;
}
.data-table th {
  text-align: left;
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink);
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.data-table td:not(:first-child),
.data-table th:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.data-table .best {
  font-weight: 700;
  color: var(--ink);
  background: var(--soft);
}
.article-callout {
  background: var(--soft);
  padding: 16px 20px;
  margin: 24px 0;
  border-left: 2px solid var(--accent);
  font-size: 14px;
  line-height: 1.7;
}
.article-callout strong {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.04em;
}
.article-footnotes {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 38px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.article-footnotes h3 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 10px;
  margin: 0 0 17px;
  color: var(--muted);
}
.article-footnotes ol {
  padding-left: 18px;
}
.article-end {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  font-size: 11px;
  color: var(--muted);
}
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tags > .tag,
.project-meta > .tag {
  font-size: 10px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  line-height: 1.7;
  color: var(--muted);
}
.next-article {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 16px;
  align-items: center;
  margin: 32px 0 0;
}
.next-article .eyebrow {
  display: block;
  margin-bottom: 10px;
}
.next-article h3 {
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.3px;
  color: var(--accent);
  margin: 0;
}
.next-article .arrow {
  font-size: 28px;
  color: var(--accent);
  text-align: right;
}
.article-detail-note {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--muted);
  margin-top: 20px;
  line-height: 1.6;
}

/* Indexes & supporting pages */
.page-wrap {
  width: calc(100% - 2 * var(--page-gutter));
  max-width: var(--page-width);
  margin: 0 auto;
}
.page-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
}
.page-number {
  font: 11px var(--sans);
  color: var(--faint);
}
.page-heading {
  display: grid;
  grid-template-columns: 208px 1fr;
  align-items: end;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}
.page-heading h1 {
  font-family: var(--display);
  font-size: 64px;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  color: var(--accent);
  grid-column: 2;
}
.page-heading .heading-note {
  grid-column: 2;
  margin-top: 12px;
  max-width: 520px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.list-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 48px;
  margin-top: 22px;
}
.list-aside {
  font-size: 12px;
  color: var(--muted);
}
.list-aside .eyebrow {
  margin: 4px 0 16px;
  display: block;
}
.filter-stack {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 5px;
}
.filter {
  font-size: 12px;
  color: var(--muted);
  padding: 7px 0;
  display: flex;
  justify-content: space-between;
  gap: 27px;
  min-width: 120px;
}
.filter span {
  font: 10px var(--sans);
  color: var(--faint);
}
.filter.active {
  color: var(--accent);
}
.filter.active:before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  margin-left: -12px;
  position: absolute;
  margin-top: 4px;
}
.list-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font: 10px var(--sans);
  color: var(--muted);
}
.list-controls select {
  border: none;
  background: white;
  font-size: 11px;
  cursor: pointer;
  max-width: 160px;
}
.post-row {
  padding: 16px 0 18px;
  display: grid;
  grid-template-columns: 105px 1fr 34px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.post-row:hover h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}
.post-date {
  font: 10px/1.8 var(--sans);
  color: var(--muted);
  padding-top: 5px;
}
.post-row h2 {
  font-size: 20px;
  letter-spacing: -0.3px;
  line-height: 1.4;
  color: var(--accent);
}
.post-row p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  margin: 8px 0 11px;
  max-width: 630px;
}
.post-row .post-meta {
  display: flex;
  gap: 15px;
  font: 10px var(--sans);
  color: var(--muted);
  align-items: center;
}
.row-arrow {
  font-size: 21px;
  text-align: right;
  padding-top: 3px;
}
.empty-state {
  padding: 60px 0;
  color: var(--muted);
  font-size: 14px;
}
.pagination {
  margin: 26px 0;
  display: flex;
  gap: 9px;
  align-items: center;
}
.pagination button {
  font: 11px var(--sans);
  height: 30px;
  min-width: 30px;
  border: 1px solid var(--line);
}
.pagination .current {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.pagination span {
  margin-left: auto;
  font: 10px var(--sans);
  color: var(--muted);
}
.home-intro {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 48px;
  padding: 34px 0 30px;
  border-bottom: 1px solid var(--line);
}
.home-intro .eyebrow {
  padding-top: 12px;
}
.home-title {
  font-family: var(--display);
  font-size: 104px;
  line-height: 0.88;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--accent);
  margin-left: -3px;
}
.home-intro .home-description {
  margin-top: 16px;
  max-width: 590px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.65;
}
.home-links {
  display: flex;
  gap: 26px;
  margin-top: 18px;
  font-size: 12px;
}
.text-link {
  display: inline-flex;
  gap: 20px;
  align-items: center;
}
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.home-feature {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 48px;
  margin-top: 24px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.home-feature .eyebrow {
  padding-top: 7px;
}
.home-feature h2 {
  font-size: 30px;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.8px;
  color: var(--accent);
  max-width: 650px;
}
.home-feature p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 12px 0 18px;
  max-width: 600px;
}
.home-section {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 48px;
  padding-top: 26px;
}
.home-section-title {
  font-size: 13px;
  font-weight: 400;
  padding-top: 5px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.home-section .post-row {
  grid-template-columns: 105px 1fr 28px;
  padding: 15px 0;
}
.home-section .post-row h2 {
  font-size: 18px;
}
.home-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin: 32px 0 0 208px;
}
.home-bottom h2 {
  font-size: 16px;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.mini-entry {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.mini-entry .eyebrow {
  font-size: 9px;
}
.mini-entry h3 {
  font-size: 16px;
  color: var(--accent);
  line-height: 1.45;
  letter-spacing: -0.4px;
  margin-top: 10px;
}
.mini-entry p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 8px;
}
.research-entry {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 75px 1fr;
  gap: 28px;
}
.entry-id {
  font: 10px/1.7 var(--sans);
  color: var(--faint);
  padding-top: 5px;
}
.research-entry h2 {
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -0.4px;
  color: var(--accent);
  max-width: 700px;
  margin: 10px 0 12px;
}
.research-entry p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 640px;
}
.entry-actions {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  font-size: 11px;
}
.entry-status {
  font-size: 9px;
  font-family: var(--sans);
  color: var(--muted);
  display: flex;
  gap: 12px;
  align-items: center;
}
.status-line {
  height: 1px;
  width: 18px;
  background: var(--accent);
}
.project-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 44px;
}
.project-item h2 {
  font-size: 31px;
  letter-spacing: -1px;
  margin: 10px 0;
}
.project-item p {
  max-width: 540px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.project-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.project-drawing {
  background: var(--soft);
  border: 1px solid var(--line);
  align-self: center;
  padding: 18px;
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-drawing pre {
  font: 11px/1.65 var(--mono);
  margin: 0;
  white-space: pre;
  color: var(--muted);
}
.project-detail {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.project-detail summary {
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  font-size: 11px;
}
.project-detail summary:after {
  content: '+';
  float: right;
  font-family: var(--sans);
}
.project-detail[open] summary:after {
  content: '−';
}
.project-detail p {
  font-size: 12px;
  margin: 12px 0 0;
}
.about-layout {
  display: grid;
  grid-template-columns: 160px 1fr 240px;
  gap: 48px;
  padding-top: 26px;
}
.about-prose {
  max-width: 630px;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.2px;
}
.about-prose p {
  margin-bottom: 14px;
}
.about-prose .text-link {
  color: var(--accent);
}
.about-prose h2 {
  font-size: 20px;
  margin: 28px 0 12px;
}
.about-prose .small-copy {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}
.about-info {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.about-info dl {
  margin: 0;
}
.about-info dt {
  font: 9px var(--sans);
  margin: 0 0 10px;
  color: var(--faint);
  letter-spacing: 0.06em;
}
.about-info dd a {
  color: var(--accent);
}
.about-info dd {
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--body);
}
.about-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Components & design notes */
.system-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 48px;
  margin-top: 30px;
}
.system-layout > div {
  min-width: 0;
}
.list-layout > section {
  min-width: 0;
}
.system-nav {
  font: 11px/2.2 var(--sans);
  display: flex;
  flex-direction: column;
  color: var(--muted);
  align-self: start;
  position: sticky;
  top: 35px;
}
.system-section {
  border-bottom: 1px solid var(--line);
  padding: 0 0 28px;
  margin-bottom: 28px;
  scroll-margin-top: 40px;
}
.system-section h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.system-section > p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 680px;
  margin: 12px 0 18px;
}
.type-specimen {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.type-specimen .spec-meta {
  font: 10px/1.8 var(--sans);
  color: var(--muted);
  white-space: nowrap;
}
.type-xl {
  font-size: 54px;
  letter-spacing: -2.4px;
  line-height: 1.25;
}
.type-lg {
  font-size: 29px;
  letter-spacing: -0.7px;
  font-weight: 700;
}
.type-body {
  font-size: 18px;
  line-height: 1.72;
}
.type-caption {
  font-size: 11px;
  color: var(--muted);
}
.swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.swatch-block {
  height: 65px;
  border: 1px solid var(--line);
  margin-bottom: 13px;
}
.swatch-label {
  font: 10px/1.8 var(--sans);
  color: var(--muted);
}
.component-row {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0;
}
.button {
  font-size: 11px;
  background: var(--accent);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 19px;
  border: 1px solid var(--accent);
  gap: 25px;
}
.button:hover {
  background: var(--accent-deep);
  color: white;
}
.button.secondary {
  background: white;
  color: var(--accent);
  border-color: var(--line-strong);
}
.button.secondary:hover {
  border-color: var(--accent);
}
.component-input {
  background: white;
  border: 1px solid var(--line-strong);
  min-height: 43px;
  width: 320px;
  max-width: 100%;
  padding: 10px 13px;
  font-size: 12px;
}
.state-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.state-panel {
  padding: 25px;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.8;
}
.state-panel h3 {
  font-size: 16px;
  margin: 0 0 10px;
}
.state-panel p {
  color: var(--muted);
  margin-bottom: 20px;
}
.rule-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.rule-list h3 {
  font-size: 17px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.rule-list p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.review-intro {
  font-size: 23px;
  line-height: 1.6;
  max-width: 750px;
  letter-spacing: -0.4px;
  margin-bottom: 24px;
}
.review-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.7;
}
.review-table td,
.review-table th {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.review-table th {
  font-weight: 400;
  color: var(--muted);
  width: 160px;
}
.review-list {
  font-size: 14px;
  line-height: 1.75;
  padding-left: 20px;
  color: var(--body);
}
.review-list li {
  margin-bottom: 10px;
}
.review-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 22px 0;
}
.review-links a {
  background: white;
  padding: 18px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}
.review-links a:hover {
  background: var(--soft);
}

/* Dialogs */
dialog {
  border: 1px solid var(--line-strong);
  padding: 0;
  color: var(--ink);
  background: #fff;
  max-width: calc(100vw - 36px);
}
dialog::backdrop {
  background: rgba(10, 10, 93, 0.22);
}
.search-dialog {
  width: 660px;
  top: 12vh;
  margin: 0 auto;
  box-shadow: 0 20px 80px rgba(10, 10, 93, 0.12);
}
.search-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  font: 10px var(--sans);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.dialog-close {
  font-size: 25px;
  font-weight: 300;
}
.search-dialog input {
  width: 100%;
  border: none;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 18px 23px;
  font-size: 20px;
  outline-offset: -5px;
}
.search-result {
  display: block;
  padding: 15px 23px;
  border-bottom: 1px solid var(--line);
}
.search-result:hover {
  background: var(--soft);
}
.search-result h3 {
  font-size: 16px;
  line-height: 1.6;
}
.search-result span {
  display: block;
  margin-top: 7px;
  font: 10px var(--sans);
  color: var(--muted);
}
.search-empty {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  padding: 30px 23px;
}
.search-foot {
  font: 10px var(--sans);
  color: var(--muted);
  padding: 14px 23px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-foot kbd {
  margin-left: auto;
  font: 9px var(--mono);
  border: 1px solid var(--line);
  padding: 3px 5px;
}
.image-dialog {
  width: 1050px;
  padding: 60px 28px 28px;
}
.image-dialog .dialog-close {
  position: absolute;
  right: 15px;
  top: 12px;
}
.image-dialog-content svg {
  width: 100%;
  height: auto;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  z-index: 80;
  pointer-events: none;
  font-size: 12px;
  opacity: 0;
  transition:
    opacity 0.15s,
    transform 0.15s;
  max-width: calc(100vw - 40px);
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 1600px) {
  .article-shell {
    grid-template-columns: 190px minmax(0, 720px) 1fr;
    column-gap: 62px;
  }
  .home-intro,
  .home-feature,
  .home-section,
  .list-layout,
  .system-layout,
  .about-layout {
    column-gap: 62px;
  }
  .home-bottom {
    margin-left: 222px;
  }
  .page-heading {
    grid-template-columns: 222px 1fr;
  }
}

@media (max-width: 1380px) {
  .article-shell {
    grid-template-columns: 128px minmax(0, 700px) minmax(145px, 1fr);
    column-gap: 35px;
  }
  .home-intro,
  .home-section,
  .list-layout,
  .system-layout {
    grid-template-columns: 128px 1fr;
    gap: 35px;
  }
  .home-feature {
    grid-template-columns: 128px 1fr;
    gap: 35px;
  }
  .home-bottom {
    margin-left: 163px;
  }
  .page-heading {
    grid-template-columns: 163px 1fr;
  }
  .about-layout {
    grid-template-columns: 128px 1fr 200px;
    gap: 35px;
  }
}

@media (max-width: 1100px) {
  .article-shell {
    grid-template-columns: minmax(0, 690px) 170px;
    column-gap: 45px;
  }
  .article-rail {
    grid-column: 1;
    grid-row: 1;
    padding-top: 26px;
  }
  .article-index {
    display: none;
  }
  .article-header {
    grid-column: 1;
    grid-row: 2;
    padding-top: 24px;
  }
  .article-body {
    grid-column: 1;
    line-height: 1.72;
  }
  .article-aside {
    grid-column: 2;
    grid-row: 3;
  }
  .article-header h1 {
    font-size: 38px;
  }
  .home-intro,
  .home-section,
  .list-layout,
  .system-layout {
    grid-template-columns: 110px 1fr;
    gap: 30px;
  }
  .home-feature {
    grid-template-columns: 110px 1fr;
    gap: 30px;
  }
  .home-title {
    font-size: 96px;
  }
  .home-feature h2 {
    font-size: 27px;
  }
  .page-heading {
    grid-template-columns: 140px 1fr;
  }
  .home-bottom {
    margin-left: 140px;
  }
  .about-layout {
    grid-template-columns: 110px 1fr;
    gap: 30px;
  }
  .about-info {
    grid-column: 2;
    display: flex;
    gap: 40px;
  }
  .about-info dl {
    display: contents;
  }
  .about-info dl > div {
    flex: 1;
  }
  .post-row {
    grid-template-columns: 85px 1fr 25px;
    gap: 16px;
  }
  .project-item {
    grid-template-columns: 1fr 190px;
    gap: 30px;
  }
  .prototype-label {
    font-size: 9px;
  }
  .site-footer {
    gap: 20px;
  }
  .footer-links {
    gap: 18px;
  }
}

@media (max-width: 850px) {
  :root {
    --page-gutter: 32px;
  }
  .site-header {
    height: 58px;
  }
  .site-nav {
    gap: 24px;
  }
  .article-shell {
    display: block;
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 28px;
    padding-right: 28px;
  }
  .article-rail {
    padding-top: 24px;
  }
  .article-header {
    padding-top: 24px;
    padding-bottom: 20px;
  }
  .article-header h1 {
    font-size: 34px;
    letter-spacing: -1px;
  }
  .article-aside {
    display: none;
  }
  .mobile-toc {
    display: block;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
  }
  .mobile-toc summary {
    font-size: 11px;
    color: var(--muted);
    padding: 12px 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    min-height: 44px;
    align-items: center;
  }
  .mobile-toc summary:after {
    content: '+';
    font-family: var(--sans);
    color: var(--accent);
  }
  .mobile-toc[open] summary:after {
    content: '−';
  }
  .mobile-toc .toc {
    border: 0;
    padding: 0 0 17px;
  }
  .mobile-toc .toc a {
    padding-left: 0;
    font-size: 12px;
  }
  .mobile-toc .toc a.active:before {
    display: none;
  }
  .article-body .lead {
    font-size: 17px;
  }
  .home-intro,
  .home-section,
  .list-layout,
  .system-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .home-feature {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .home-feature > .eyebrow {
    grid-column: 1/-1;
  }
  .home-title {
    font-size: 88px;
  }
  .home-intro {
    padding-top: 28px;
  }
  .home-feature h2 {
    font-size: 26px;
  }
  .page-heading {
    display: block;
    padding: 18px 0 20px;
  }
  .page-heading h1 {
    font-size: 56px;
  }
  .home-bottom {
    margin-left: 0;
    gap: 35px;
  }
  .home-section-title {
    margin-bottom: 0;
  }
  .list-layout {
    margin-top: 22px;
  }
  .filter-stack {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 22px;
  }
  .filter {
    min-width: 0;
    gap: 9px;
  }
  .filter.active:before {
    display: none;
  }
  .list-aside .eyebrow {
    display: none;
  }
  .about-layout {
    grid-template-columns: 1fr;
    padding-top: 26px;
  }
  .about-layout > .eyebrow {
    display: none;
  }
  .about-info {
    grid-column: 1;
  }
  .system-nav {
    position: static;
    flex-direction: row;
    gap: 25px;
    flex-wrap: wrap;
  }
  .system-section {
    scroll-margin-top: 25px;
  }
  .site-footer {
    flex-wrap: wrap;
    margin-top: 48px;
  }
  .prototype-label {
    width: 100%;
    padding: 0;
    border: 0;
  }
  .footer-links {
    margin-left: auto;
  }
  .swatches {
    gap: 12px;
  }
}

@media (max-width: 560px) {
  :root {
    --reading: 15.5px;
    --page-gutter: 23px;
  }
  .site-header {
    height: 56px;
    position: relative;
    z-index: 20;
  }
  .wordmark {
    font-size: 23px;
  }
  .menu-toggle {
    display: flex;
    margin-left: auto;
    flex-direction: column;
    gap: 5px;
    width: 36px;
    height: 36px;
  }
  .menu-toggle span {
    height: 1px;
    width: 19px;
    background: var(--ink);
  }
  .menu-toggle[aria-expanded='true'] span:first-child {
    transform: translateY(3px) rotate(45deg);
  }
  .menu-toggle[aria-expanded='true'] span:last-child {
    transform: translateY(-3px) rotate(-45deg);
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 55px;
    left: -23px;
    right: -23px;
    margin: 0;
    background: white;
    height: auto;
    border-bottom: 1px solid var(--line);
    padding: 15px 23px 23px;
    gap: 0;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 16px 20px #11100005;
  }
  .site-nav.open {
    display: flex;
  }
  .site-nav > a {
    font-size: 17px;
    padding: 11px 0;
    height: auto;
  }
  .site-nav > a.active:after {
    display: none;
  }
  .site-nav > a.active:before {
    content: '·';
    position: absolute;
    left: -14px;
  }
  .search-trigger {
    margin: 10px 0 0;
    width: 100%;
    justify-content: flex-start;
    border-top: 1px solid var(--line);
    height: 47px;
    padding: 20px 0 0;
  }
  .search-trigger:after {
    content: '搜索';
    margin-left: 14px;
    font-size: 13px;
  }
  .article-shell {
    padding: 0 23px;
  }
  .article-rail {
    padding-top: 18px;
  }
  .back-link {
    font-size: 10px;
    gap: 8px;
  }
  .article-header {
    padding-top: 22px;
    padding-bottom: 0;
  }
  .article-kicker {
    gap: 10px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 0.07em;
  }
  .article-header h1 {
    font-size: clamp(25px, 7.4vw, 29px);
    line-height: 1.25;
    letter-spacing: -0.8px;
    margin: 12px 0 10px;
  }
  .article-header .deck {
    font-size: 13px;
    line-height: 1.7;
  }
  .article-meta {
    font-size: 9px;
    gap: 10px;
    margin-top: 18px;
    line-height: 1.8;
  }
  .article-meta .separator {
    display: none;
  }
  .article-tools {
    gap: 9px;
  }
  .text-tool {
    font-size: 11px;
    min-width: 22px;
    height: 26px;
  }
  .article-meta .updated {
    display: none;
  }
  .content-rule {
    margin-top: 16px;
  }
  .mobile-toc {
    margin-bottom: 18px;
  }
  .mobile-toc summary {
    font-size: 10px;
    padding: 10px 0;
  }
  .article-body {
    line-height: 1.72;
    letter-spacing: 0.015em;
  }
  .article-body .lead {
    font-size: 16px;
    line-height: 1.72;
    margin-bottom: 18px;
  }
  .article-body p {
    margin-bottom: 12px;
  }
  .article-body h2 {
    font-size: 19px;
    letter-spacing: -0.3px;
    line-height: 1.4;
    margin: 26px 0 12px;
    gap: 11px;
    align-items: baseline;
  }
  .article-body h2 .section-num {
    font-size: 9px;
    flex-shrink: 0;
  }
  .article-body h3 {
    font-size: 16px;
    margin: 20px 0 9px;
  }
  .article-body ul,
  .article-body ol {
    padding-left: 20px;
  }
  .code-block {
    margin: 18px -3px 22px;
  }
  .code-toolbar {
    padding: 0 12px;
    gap: 16px;
    min-height: 38px;
  }
  .code-tab {
    font-size: 9px;
    height: 38px;
  }
  .code-file {
    display: none;
  }
  .copy-button {
    margin-left: auto;
    font-size: 9px;
  }
  .code-block pre {
    font-size: 11px;
    line-height: 1.65;
    padding: 13px 12px;
  }
  .line-num {
    width: 23px;
  }
  .code-caption {
    font-size: 9px;
  }
  .formula {
    padding: 16px 15px;
    gap: 15px;
    margin: 18px 0;
  }
  .equation-number {
    font-size: 8px;
  }
  .figure {
    margin: 22px 0;
  }
  .figure figcaption {
    font-size: 10px;
    gap: 10px;
  }
  .figure figcaption .mono {
    font-size: 8px;
  }
  .figure-zoom {
    font-size: 8px;
    padding-bottom: 9px;
  }
  .article-body blockquote {
    padding-left: 14px;
    margin: 18px 0;
  }
  .article-body blockquote cite {
    font-size: 10px;
  }
  .data-table {
    font-size: 11px;
  }
  .data-table th {
    font-size: 9px;
    padding: 10px;
  }
  .data-table td {
    padding: 11px 10px;
  }
  .article-callout {
    font-size: 12px;
    padding: 14px 16px;
  }
  .article-callout strong {
    font-size: 9px;
  }
  .article-footnotes {
    font-size: 10px;
  }
  .article-end {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    font-size: 10px;
  }
  .next-article h3 {
    font-size: 19px;
  }
  .next-article .eyebrow {
    font-size: 9px;
  }
  .article-detail-note {
    font-size: 8px;
  }
  .site-footer {
    margin-top: 40px;
    padding-top: 18px;
    gap: 18px;
  }
  .footer-name {
    font-size: 18px;
  }
  .footer-links {
    font-size: 10px;
    gap: 17px;
  }
  .prototype-label {
    font-size: 8px;
    margin-top: 2px;
    letter-spacing: 0;
  }
  .page-topline {
    padding-top: 22px;
  }
  .page-number {
    font-size: 9px;
  }
  .page-heading {
    padding: 20px 0;
  }
  .page-heading h1 {
    font-size: 46px;
  }
  .page-heading .heading-note {
    font-size: 13px;
    margin-top: 14px;
  }
  .home-intro {
    padding: 24px 0 26px;
    gap: 18px;
  }
  .home-title {
    font-size: clamp(60px, 18vw, 76px);
    margin-left: -2px;
  }
  .home-intro .home-description {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 16px;
  }
  .home-links {
    font-size: 11px;
    gap: 24px;
    margin-top: 20px;
  }
  .home-feature {
    grid-template-columns: 1fr;
    margin-top: 24px;
    padding-bottom: 26px;
    gap: 18px;
  }
  .home-feature h2 {
    font-size: 24px;
    letter-spacing: -0.6px;
    line-height: 1.3;
  }
  .home-feature p {
    font-size: 12px;
    margin: 10px 0 14px;
  }
  .home-section {
    padding-top: 24px;
    gap: 18px;
  }
  .home-section-title {
    font-size: 12px;
  }
  .section-header {
    font-size: 10px;
    padding-bottom: 12px;
  }
  .home-section .post-row,
  .post-row {
    grid-template-columns: 1fr 25px;
    gap: 9px;
    padding: 17px 0;
  }
  .post-row .post-date {
    grid-column: 1;
    font-size: 9px;
    padding-top: 0;
  }
  .post-row > div:not(.post-date) {
    grid-column: 1;
  }
  .post-row .row-arrow {
    grid-column: 2;
    grid-row: 2;
  }
  .post-row h2,
  .home-section .post-row h2 {
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: -0.3px;
  }
  .post-row p {
    font-size: 12px;
    line-height: 1.7;
    margin: 8px 0 11px;
  }
  .post-row .post-meta {
    font-size: 9px;
    gap: 12px;
  }
  .home-bottom {
    grid-template-columns: 1fr;
    margin-top: 28px;
    gap: 24px;
  }
  .home-bottom h2 {
    font-size: 15px;
    margin-bottom: 18px;
  }
  .mini-entry h3 {
    font-size: 17px;
  }
  .list-layout {
    gap: 16px;
  }
  .filter-stack {
    gap: 18px;
  }
  .filter {
    font-size: 11px;
    gap: 8px;
    padding: 7px 0;
  }
  .filter span {
    font-size: 8px;
  }
  .list-controls {
    font-size: 9px;
    padding-bottom: 12px;
  }
  .list-controls select {
    font-size: 10px;
  }
  .pagination {
    margin-top: 27px;
  }
  .pagination span {
    font-size: 8px;
  }
  .research-entry {
    grid-template-columns: 26px 1fr;
    gap: 17px;
    padding: 20px 0;
  }
  .entry-id {
    font-size: 8px;
  }
  .research-entry h2 {
    font-size: 20px;
    line-height: 1.4;
    letter-spacing: -0.6px;
    margin: 10px 0;
  }
  .research-entry p {
    font-size: 12px;
    line-height: 1.7;
  }
  .entry-status {
    font-size: 8px;
    gap: 8px;
  }
  .entry-actions {
    font-size: 10px;
    gap: 20px;
  }
  .project-item {
    grid-template-columns: 1fr;
    padding: 22px 0;
    gap: 20px;
  }
  .project-item h2 {
    font-size: 28px;
    margin: 10px 0;
  }
  .project-item p {
    font-size: 12px;
  }
  .project-drawing {
    min-height: 128px;
  }
  .about-prose {
    font-size: 16px;
    line-height: 1.7;
  }
  .about-prose h2 {
    font-size: 19px;
    margin-top: 28px;
  }
  .about-prose .small-copy {
    font-size: 13px;
  }
  .about-info {
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 20px;
  }
  .about-info dl > div {
    min-width: 130px;
  }
  .about-note {
    font-size: 10px;
  }
  .system-nav {
    font-size: 10px;
    gap: 18px;
    line-height: 1.8;
  }
  .system-layout {
    margin-top: 22px;
  }
  .system-section h2 {
    font-size: 20px;
    line-height: 1.5;
  }
  .system-section > p {
    font-size: 12px;
  }
  .type-specimen {
    flex-direction: column;
    gap: 14px;
    padding: 16px 0;
  }
  .type-xl {
    font-size: 36px;
    letter-spacing: -1.4px;
  }
  .type-lg {
    font-size: 24px;
  }
  .type-body {
    font-size: 16px;
  }
  .type-specimen .spec-meta {
    font-size: 8px;
  }
  .swatches {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 12px;
  }
  .swatch-block {
    height: 55px;
  }
  .swatch-label {
    font-size: 8px;
  }
  .state-demo,
  .rule-list {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .review-intro {
    font-size: 18px;
    line-height: 1.7;
  }
  .review-table {
    font-size: 11px;
  }
  .review-table th {
    width: 85px;
    padding-right: 15px;
  }
  .review-links {
    grid-template-columns: 1fr 1fr;
  }
  .review-links a {
    font-size: 11px;
    padding: 17px 14px;
  }
  .review-list {
    font-size: 12px;
    padding-left: 17px;
  }
  .search-dialog {
    top: 8vh;
  }
  .search-dialog input {
    font-size: 17px;
    padding: 21px;
  }
  .search-result {
    padding: 17px 21px;
  }
  .search-result h3 {
    font-size: 14px;
  }
  .search-result span {
    font-size: 9px;
  }
  .search-top {
    font-size: 9px;
    padding: 10px 16px;
  }
  .search-foot {
    font-size: 9px;
  }
  .image-dialog {
    padding: 55px 12px 20px;
  }
  .image-dialog-content {
    overflow-x: auto;
  }
  .image-dialog-content svg {
    min-width: 620px;
  }
  .toast {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .toast {
    transition: none;
  }
}

@media print {
  body {
    display: block;
    min-height: 0;
  }
  .article-shell {
    width: 100%;
  }
  .site-header,
  .site-footer,
  .article-rail,
  .article-aside,
  .article-tools,
  .mobile-toc,
  .reading-progress,
  .next-article,
  .toast {
    display: none;
  }
  .article-shell {
    display: block;
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
  }
  .article-header {
    padding-top: 20px;
  }
  .article-header h1 {
    font-size: 38px;
  }
  .article-body {
    font-size: 12px;
  }
  .article-body h2 {
    font-size: 22px;
    break-after: avoid;
  }
  .code-block,
  .formula,
  .figure,
  blockquote {
    break-inside: avoid;
  }
  a {
    color: #111 !important;
  }
}

/* Static page and generated content refinements. */
[hidden] {
  display: none !important;
}
main:focus {
  outline: none;
}
.article-body figure img {
  display: block;
  width: 100%;
  height: auto;
}
.figure figcaption {
  display: block;
}
.code-line::before {
  content: attr(data-line);
  display: inline-block;
  width: 32px;
  color: var(--faint);
  user-select: none;
}
.formula .katex-display {
  margin: 0;
}
/* Long inline expressions stay within narrow text and list columns. */
.article-body :not(.katex-display) > .katex {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  vertical-align: middle;
  padding-block: 0.2em;
  margin-block: -0.2em;
}
.image-dialog-content img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  margin: auto;
}
.toc .toc-subsection {
  padding-left: 28px;
  font-size: 11px;
}
.not-found {
  padding: 32px 0 80px;
}
.project-item {
  grid-template-columns: 1fr;
}
.article-footnotes {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 12px;
}
.article-footnotes ol {
  padding-left: 24px;
}
.article-footnotes p {
  margin: 8px 0;
}
.article-body h2,
.article-body h3 {
  scroll-margin-top: 24px;
}
.empty-state {
  padding: 24px 0;
  color: var(--muted);
}
.search-result {
  display: block;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.search-result h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
.search-result p {
  font-size: 13px;
  margin: 0;
  color: var(--muted);
}
.search-message {
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}
.article-body pre code {
  font-family: var(--mono);
}
.article-body :not(pre) > code {
  white-space: break-spaces;
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

.article-body.large-type {
  --reading: 19px;
}
.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.formula > .katex-display {
  margin: auto;
}
.text-tool[aria-pressed='true'] {
  border-bottom: 1px solid var(--accent);
}
@media (max-width: 560px) {
  .article-body.large-type {
    --reading: 17px;
  }
}

.code-line {
  min-height: 1.65em;
}

.article-body h4 {
  font-size: 1em;
  font-weight: 700;
  color: var(--ink);
  margin: 20px 0 10px;
}

.article-body h5 {
  font-size: 0.95em;
  font-weight: 700;
  color: var(--ink);
  margin: 16px 0 8px;
}

/* Compact single-column layout (2026-10-28): one 960px column, no empty
   left rail, section titles in Bebas Neue, controls on one line. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.page-heading,
.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 0 14px;
  border-bottom: 1px solid var(--line);
}
.page-heading {
  display: block;
}
.page-heading h1,
.list-head h1 {
  font-family: var(--display);
  font-size: 52px;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  color: var(--ink);
}
.page-heading .heading-note {
  margin-top: 10px;
  font-size: 14px;
}
.list-head .text-link {
  font-size: 12px;
  color: var(--muted);
}
.list-controls {
  padding: 12px 0;
  font: 12px var(--sans);
}
.filter-stack {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.filter {
  min-width: 0;
  gap: 6px;
  padding: 4px 0;
}
.filter.active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.filter.active:before {
  display: none;
}
.list-controls select {
  font-size: 12px;
  color: var(--muted);
}
.post-row,
.home-section .post-row {
  grid-template-columns: 92px minmax(0, 1fr) 24px;
  gap: 18px;
  padding: 15px 0 16px;
}
.post-row h2 {
  font-size: 19px;
  color: var(--ink);
}
.post-row p {
  margin: 6px 0 8px;
}
.post-date {
  padding-top: 4px;
}
.row-arrow {
  font-size: 18px;
}
.entry-list .research-entry {
  grid-template-columns: minmax(0, 1fr);
  padding: 18px 0;
}
.research-entry h2 {
  font-size: 20px;
  color: var(--ink);
  margin: 8px 0 8px;
}
.entry-status {
  font-size: 10px;
  letter-spacing: 0.04em;
}
.project-item h2 {
  font-size: 22px;
}
.article-shell {
  grid-template-columns: minmax(0, 1fr) 200px;
  column-gap: 48px;
}
.article-rail {
  grid-column: 1;
  grid-row: 1;
  padding-top: 26px;
}
.article-header {
  grid-column: 1;
  grid-row: 2;
  padding: 18px 0 16px;
}
.article-header h1 {
  font-size: 36px;
  color: var(--ink);
  margin: 12px 0 10px;
}
.article-meta {
  margin-top: 14px;
}
.content-rule {
  margin-top: 16px;
}
.article-body {
  grid-column: 1;
}
.article-aside {
  grid-column: 2;
  grid-row: 2 / span 2;
  padding-top: 64px;
}
.next-article h3 {
  color: var(--ink);
}
.about-prose {
  max-width: 640px;
  padding-top: 24px;
  font-size: 16px;
  line-height: 1.8;
}
.about-prose a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
}
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 6px;
  font-size: 13px;
}
.about-links a {
  text-decoration: none;
  color: var(--muted);
}
/* Display formulas fill the row and centre themselves; a \tag number sits
   after the formula instead of being laid over its right end. */
.formula > .katex-display {
  flex: 1 0 auto;
  margin: 0;
}
.formula .katex-display > .katex > .katex-html {
  display: flex;
  align-items: center;
}
.formula .katex-display > .katex > .katex-html > .base:first-child {
  margin-left: auto;
}
.formula .katex-display > .katex > .katex-html > .base:last-child,
.formula .katex-display > .katex > .katex-html > .base:has(+ .tag) {
  margin-right: auto;
}
.formula .katex-display > .katex > .katex-html > .tag {
  position: static;
  flex: none;
  padding-left: 1.5em;
}

@media (max-width: 1100px) {
  .article-shell {
    grid-template-columns: minmax(0, 1fr) 170px;
    column-gap: 40px;
  }
}
@media (max-width: 850px) {
  .page-heading h1,
  .list-head h1 {
    font-size: 46px;
  }
  .article-header h1 {
    font-size: 32px;
  }
}
@media (max-width: 560px) {
  .page-heading,
  .list-head {
    padding: 22px 0 12px;
  }
  .page-heading h1,
  .list-head h1 {
    font-size: 40px;
  }
  .post-row,
  .home-section .post-row {
    grid-template-columns: minmax(0, 1fr) 22px;
    gap: 8px;
    padding: 14px 0;
  }
  .post-row h2,
  .home-section .post-row h2 {
    font-size: 17px;
  }
  .article-header h1 {
    font-size: clamp(24px, 7vw, 28px);
  }
  .about-prose {
    font-size: 15px;
  }
  /* filters take the whole line; sort drops below them */
  .list-controls {
    flex-wrap: wrap;
    gap: 6px;
  }
  .filter-stack {
    width: 100%;
    gap: 4px 16px;
  }
}

/* Tighter rhythm (2026-10-28): shorter lines, paragraphs, list items and
   gaps between blocks, on every width. */
.site-header {
  height: 54px;
}
.page-heading,
.list-head {
  padding: 22px 0 10px;
}
.list-controls {
  padding: 8px 0;
}
.post-row,
.home-section .post-row {
  padding: 11px 0 12px;
}
.post-row p {
  margin: 3px 0 5px;
  line-height: 1.55;
}
.post-date {
  padding-top: 3px;
}
.entry-list .research-entry {
  padding: 13px 0;
}
.research-entry h2 {
  margin: 4px 0 5px;
}
.entry-actions {
  margin-top: 10px;
}
.article-rail {
  padding-top: 18px;
}
.article-header {
  padding: 12px 0 10px;
}
.article-header h1 {
  margin: 8px 0 6px;
  line-height: 1.15;
}
.article-meta {
  margin-top: 10px;
}
.content-rule {
  margin-top: 12px;
}
.article-aside {
  padding-top: 48px;
}
.toc a {
  padding: 4px 0 4px 18px;
}
.article-body {
  line-height: 1.62;
}
.article-body .lead {
  line-height: 1.6;
  margin-bottom: 14px;
}
.article-body p {
  margin: 0 0 10px;
}
.article-body h2 {
  margin: 26px 0 10px;
}
.article-body h3 {
  margin: 18px 0 8px;
}
.article-body h4 {
  margin: 14px 0 6px;
}
.article-body h5 {
  margin: 12px 0 6px;
}
.article-body ul,
.article-body ol {
  margin: 0 0 12px;
}
.article-body li {
  margin-bottom: 3px;
}
.article-body li > p {
  margin-bottom: 4px;
}
.code-block {
  margin: 14px 0 16px;
}
.code-block pre {
  padding: 12px 16px;
  line-height: 1.55;
}
.formula {
  margin: 14px 0;
  padding: 10px 16px;
}
.figure {
  margin: 18px 0;
}
.article-body blockquote {
  margin: 14px 0;
  padding: 2px 0 2px 16px;
  line-height: 1.58;
}
.article-body blockquote p {
  margin-bottom: 8px;
}
.table-scroll {
  margin: 14px 0 16px;
}
.article-callout {
  margin: 16px 0;
  padding: 12px 16px;
}
.article-end {
  margin-top: 22px;
  padding: 12px 0;
}
.next-article {
  margin-top: 20px;
}
.about-prose {
  padding-top: 18px;
  line-height: 1.7;
}
.about-prose p {
  margin-bottom: 10px;
}
.site-footer {
  margin-top: 40px;
  padding: 14px 0 18px;
}

@media (max-width: 1100px) {
  .article-body {
    line-height: 1.62;
  }
}
@media (max-width: 850px) {
  .site-header {
    height: 52px;
  }
  .article-header {
    padding: 10px 0 8px;
  }
  .mobile-toc {
    margin-bottom: 14px;
  }
  .site-footer {
    margin-top: 36px;
  }
}
@media (max-width: 560px) {
  .site-header {
    height: 50px;
  }
  .site-nav {
    top: 49px;
  }
  .page-heading,
  .list-head {
    padding: 16px 0 8px;
  }
  .post-row,
  .home-section .post-row {
    padding: 10px 0 11px;
    gap: 4px;
  }
  .article-rail {
    padding-top: 14px;
  }
  .article-header h1 {
    margin: 6px 0 4px;
  }
  .article-body {
    line-height: 1.62;
  }
  .article-body .lead {
    margin-bottom: 12px;
  }
  .article-body p {
    margin-bottom: 9px;
  }
  .article-body h2 {
    margin: 22px 0 9px;
  }
  .article-body h3 {
    margin: 16px 0 7px;
  }
  .code-block {
    margin: 12px -3px 14px;
  }
  .formula {
    margin: 12px 0;
    padding: 10px 12px;
  }
  .article-body blockquote {
    margin: 12px 0;
  }
  .site-footer {
    margin-top: 32px;
    padding-top: 12px;
  }
}

/* Interface language (2026-10-28): both languages are in the page, one shows.
   Without the head script the Chinese text is the default. */
html:not([data-ui='en']) [data-l='en'],
html[data-ui='en'] [data-l='zh'] {
  display: none !important;
}
.lang-toggle {
  margin-left: 6px;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  color: var(--muted);
}
.lang-toggle:hover {
  color: var(--ink);
  border-color: var(--ink);
}
/* Bebas has no Chinese: a Chinese title falls to the system face, bold, sized to the capitals. */
.page-heading h1 [data-l='zh'] {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.7em;
  letter-spacing: 0.02em;
}
@media (max-width: 560px) {
  .lang-toggle {
    order: 2;
    margin-left: auto;
  }
  .menu-toggle {
    order: 3;
    margin-left: 6px;
  }
}

/* Reading aids (2026-10-28): a note on Chinese articles for English readers, and a side
   contents list that unfolds only the section being read. */
.lang-note {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.article-aside .toc.folding .toc-subsection:not(.open) {
  display: none;
}

/* Tags (2026-10-28): a second, quieter filter row under the categories, and tags in list meta. */
.tag-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
  font: 11px var(--sans);
  color: var(--muted);
}
.tag-filters-label {
  color: var(--faint);
}
.tag-filter {
  padding: 2px 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
}
.tag-filter span {
  margin-left: 4px;
  color: var(--faint);
}
.tag-filter:hover,
.tag-filter.active {
  color: var(--ink);
}
.tag-filter.active {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.post-row .post-tag {
  color: var(--faint);
}
.list-controls:has(+ .tag-filters) {
  border-bottom: 0;
  padding-bottom: 2px;
}
