/* qijingzhao.com — Apple-style design system (see DESIGN.md). Tokens first. */

:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Segoe UI", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #fff;
  --bg-alt: #f5f5f7;
  --tile: #fff;
  --tile-on-white: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: #d2d2d7;
  --link: #0066cc;
  --btn: #0071e3;
  --btn-hover: #0077ed;
  --grad: linear-gradient(90deg, #0a84ff, #5e5ce6 55%, #bf5af2);

  --ease: cubic-bezier(.28, .11, .32, 1);   /* Apple's standard curve */
  --t-fast: 160ms;
  --t: 320ms;
  --t-slow: 700ms;

  --wrap: 1024px;
  --measure: 692px;
  --radius: 28px;
  --nav-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --bg-alt: #0b0b0c;
    --tile: #1c1c1e;
    --tile-on-white: #1c1c1e;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #86868b;
    --line: #424245;
    --link: #2997ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.47 var(--font); -webkit-font-smoothing: antialiased; }
html[lang="en"] body { letter-spacing: -.022em; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }
.more::after { content: "\00a0›"; }

.wrap { max-width: calc(var(--wrap) + 44px); margin: 0 auto; padding: 0 22px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--bg); padding: 4px 10px; }

/* ---------------- Global nav (frosted) ---------------- */
.gnav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: rgba(22, 22, 23, .86); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.gnav .in { max-width: calc(var(--wrap) + 44px); height: 100%; margin: 0 auto; padding: 0 22px; display: flex; align-items: center; gap: 8px; }
.gnav a { color: rgba(255, 255, 255, .9); font-size: 16px; font-weight: 500; letter-spacing: -.01em; transition: color var(--t-fast) var(--ease); }
.gnav a:hover { color: #fff; text-decoration: none; }
.gnav .brand { font-size: 19px; font-weight: 600; color: #fff; white-space: nowrap; }
.gnav .links { display: flex; justify-content: space-between; flex: 1; max-width: 640px; margin: 0 auto; padding: 0 32px; }
.gnav .links a { position: relative; padding: 6px 0; }
.gnav .links a[aria-current] { color: #fff; font-weight: 600; }
.gnav .links a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 1px; background: #fff; }
.gnav .lang { font-size: 14px; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 980px; padding: 3px 14px; white-space: nowrap; }
.gnav .lang:hover { border-color: #fff; }
.menu-btn { display: none; width: 44px; height: 44px; margin-right: -12px; border: 0; background: none; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 14px; width: 17px; height: 1.2px; background: #f5f5f7; transition: transform var(--t) var(--ease); }
.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn span { width: 19px; height: 1.5px; }
.nav-open .menu-btn span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-open .menu-btn span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------------- Hero (home) ---------------- */
.hero { position: relative; height: calc(100svh - var(--nav-h)); min-height: 620px; max-height: 1000px; background: #000; color: #f5f5f7; overflow: hidden; text-align: center; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .copy { position: relative; padding: clamp(52px, 9vh, 110px) 22px 0; pointer-events: none; }
.hero .eyebrow { font-size: 21px; font-weight: 600; color: #86868b; }
.hero h1 { font-size: clamp(56px, 9vw, 112px); line-height: 1.05; letter-spacing: -.005em; margin-top: 6px;
  background: linear-gradient(180deg, #fff 30%, #a8b8d8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .tag { font-size: clamp(21px, 2.2vw, 28px); font-weight: 500; line-height: 1.25; margin: 14px 0 0; }
.hero .ctas { margin-top: 26px; display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; font-size: 19px; pointer-events: auto; }
.hero .ctas a { color: #2997ff; }
.hero .note { position: absolute; bottom: 22px; left: 22px; right: 22px; margin: 0; font-size: 12px; color: #6e6e73; letter-spacing: 0; }
.rise { animation: rise 1.2s var(--ease) both; }
.rise.d1 { animation-delay: .12s; } .rise.d2 { animation-delay: .26s; } .rise.d3 { animation-delay: .44s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ---------------- Sections ---------------- */
.section { padding: 110px 0; }
.section.alt { background: var(--bg-alt); }
.shead { text-align: center; margin: 0 auto 56px; max-width: 820px; }
.shead h2 { font-size: clamp(40px, 5vw, 56px); line-height: 1.07; letter-spacing: -.005em; }
.shead p { font-size: 21px; line-height: 1.38; color: var(--ink-2); margin: 14px 0 0; }

.page-head { text-align: center; padding: 96px 22px 72px; }
.page-head .eyebrow { font-size: 21px; font-weight: 600; color: var(--ink-2); }
.page-head h1 { font-size: clamp(48px, 7vw, 80px); line-height: 1.05; letter-spacing: -.015em; margin-top: 6px; }
.page-head .lede { font-size: clamp(19px, 2vw, 24px); line-height: 1.38; color: var(--ink-2); max-width: 760px; margin: 18px auto 0; }

/* scroll-driven reveal where supported; content is always visible otherwise */
@supports (animation-timeline: view()) {
  .rv { animation: rv linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
  @keyframes rv { from { opacity: 0; transform: translateY(36px) scale(.985); } }
}

/* ---------------- Bento tiles ---------------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.tile { grid-column: span 2; background: var(--tile); border-radius: var(--radius); padding: 40px 36px 34px; display: flex; flex-direction: column; color: var(--ink); min-height: 300px;
  transition: transform var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease); }
.section:not(.alt) .tile { background: var(--tile-on-white); }
a.tile:hover { text-decoration: none; transform: scale(1.012); box-shadow: 0 24px 60px rgba(0, 0, 0, .08); }
.tile.w3 { grid-column: span 3; }
.tile.w6 { grid-column: span 6; min-height: 0; }
.tile .k { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.tile h3 { font-size: 28px; line-height: 1.14; margin-top: 8px; }
.tile p { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 12px 0 0; }
.tile .num { font-size: 64px; font-weight: 600; line-height: 1; margin-top: auto; padding-top: 28px; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile .num small { font-size: 17px; -webkit-text-fill-color: var(--ink-2); margin-left: 6px; letter-spacing: 0; }
.tile .go { margin-top: 12px; font-size: 17px; color: var(--link); }
.tile.w6 .row6 { display: flex; align-items: flex-end; gap: 48px; }
.tile.w6 .row6 > div { flex: 1; }
.tile.w6 .num { padding-top: 0; }

/* ---------------- Feature card (dark) ---------------- */
.feature { background: #000; color: #f5f5f7; border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: 1fr 1.1fr; align-items: stretch; }
.feature + .feature { margin-top: 20px; }
.feature .txt { padding: 60px 52px; display: flex; flex-direction: column; justify-content: center; }
.feature .k { font-size: 17px; font-weight: 600; color: #86868b; }
.feature h3 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.12; margin-top: 10px; }
.feature p { font-size: 17px; color: #a1a1a6; margin: 18px 0 0; line-height: 1.53; }
.feature .meta { font-size: 14px; color: #86868b; margin-top: 18px; }
.feature .pic { background: #fff; display: flex; align-items: center; padding: 32px; }
.feature .pic img { width: 100%; display: block; }
.btn { display: inline-block; align-self: flex-start; background: var(--btn); color: #fff; border-radius: 980px; padding: 11px 22px; font-size: 17px; line-height: 1.2; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.btn:hover { background: var(--btn-hover); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.btn.ghost:hover { background: var(--link); color: #fff; }
.feature .btn { margin-top: 28px; }

/* ---------------- Stats ---------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 20px; margin-bottom: 96px; }
.stats .n { font-size: clamp(64px, 8vw, 96px); font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats .l { font-size: 17px; color: var(--ink-2); margin-top: 10px; }

/* ---------------- List card (recent papers) ---------------- */
.list-card { background: var(--tile); border-radius: var(--radius); padding: 8px 40px; }
.list-card .entry { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.list-card .entry:last-child { border-bottom: 0; }
.list-card .entry:hover { text-decoration: none; }
.list-card .entry:hover .t { color: var(--link); }
.entry .y { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.entry .t { font-size: 19px; font-weight: 500; line-height: 1.35; transition: color var(--t-fast) var(--ease); }
.entry .v { font-size: 14px; color: var(--ink-2); text-align: right; }
.center-link { text-align: center; margin-top: 32px; font-size: 19px; }

/* ---------------- Cards (research, about, writing) ---------------- */
.cards2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--tile); border-radius: var(--radius); padding: 40px 36px; }
.section:not(.alt) .card { background: var(--tile-on-white); }
.card .k { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.card h3 { font-size: 24px; line-height: 1.2; margin: 8px 0 12px; }
.card p { font-size: 16px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.card .v { font-size: 19px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; margin-top: 8px; display: block; }
.card a.v { color: var(--link); }
.note { text-align: center; font-size: 14px; color: var(--ink-3); margin: 28px 0 0; }
.bio { max-width: var(--measure); margin: 0 auto; font-size: 21px; line-height: 1.6; }
.bio p { margin-bottom: 1.1em; }

/* ---------------- Publications ---------------- */
.filters { position: sticky; top: var(--nav-h); z-index: 20; padding: 16px 0; margin-bottom: 8px;
  background: color-mix(in srgb, var(--bg-alt) 85%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.filters[hidden] { display: none; }
.filters .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 14px; color: var(--ink); background: var(--tile); border: 0; border-radius: 980px; padding: 7px 15px; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip .n { opacity: .6; margin-left: 5px; font-variant-numeric: tabular-nums; }
.search-box { position: relative; flex: 1 1 260px; max-width: 360px; }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-3); pointer-events: none; }
.search { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--tile); border: 0; border-radius: 12px; padding: 9px 14px 9px 36px;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--t-fast) var(--ease); }
.search:focus { outline: none; box-shadow: inset 0 0 0 2px var(--link); }
.status { font-size: 14px; color: var(--ink-2); margin-left: auto; font-variant-numeric: tabular-nums; }
.status button { font: inherit; color: var(--link); background: none; border: 0; padding: 0; margin-left: 10px; cursor: pointer; }
.status button:hover { text-decoration: underline; }

.year-group { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding: 28px 0 8px; }
.year-group[hidden] { display: none; }
.year-group > h2 { font-size: 40px; line-height: 1; letter-spacing: -.02em; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 18px; }
.pubs { list-style: none; margin: 0; padding: 4px 32px; background: var(--tile); border-radius: 22px; }
.pub { padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 100px); }
.pub:last-child { border-bottom: 0; }
.pub[hidden] { display: none; }
.pub:target .pub-title a { color: var(--link); }
.pub-title { font-size: 19px; line-height: 1.35; }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--link); text-decoration: none; }
.pub-authors { font-size: 14px; line-height: 1.5; color: var(--ink); margin: 6px 0 0; }
.pub-authors b { font-weight: 600; }
.pub-venue { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 2px 0 0; }
.pub-links { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; font-size: 14px; margin-top: 8px; }
.tag-guide { color: #fff !important; background: var(--btn); border-radius: 980px; padding: 1px 10px; font-size: 12px; }
.tag-guide:hover { background: var(--btn-hover); text-decoration: none !important; }
details.cite { display: contents; }
details.cite::details-content { flex-basis: 100%; }
details.cite > summary { color: var(--link); cursor: pointer; list-style: none; }
details.cite > summary::-webkit-details-marker { display: none; }
details.cite > summary::after { content: "\00a0›"; display: inline-block; transition: transform var(--t-fast) var(--ease); }
details.cite[open] > summary::after { transform: rotate(90deg); }
.bib { position: relative; margin: 10px 0 2px; flex-basis: 100%; }
.bib pre { margin: 0; padding: 16px 18px; background: var(--bg-alt); border-radius: 14px; font: 12.5px/1.55 var(--mono); overflow-x: auto; color: var(--ink); letter-spacing: 0; }
.bib button { position: absolute; top: 10px; right: 10px; font: 12px var(--font); color: var(--ink); background: var(--tile); border: 0; border-radius: 980px; padding: 4px 12px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.bib button:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }

/* ---------------- Article (paper guide) ---------------- */
.article-head { text-align: center; padding: 88px 22px 56px; max-width: 980px; margin: 0 auto; }
.kicker { font-size: 17px; font-weight: 600; color: var(--ink-2); }
.article-head h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.1; letter-spacing: -.01em; margin-top: 8px; }
.article-head .paper { font-size: 19px; color: var(--ink-2); margin: 20px auto 0; max-width: 720px; font-style: italic; }
.article-head .authors { font-size: 15px; color: var(--ink-3); margin: 8px 0 0; }
.actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.article-layout { display: grid; grid-template-columns: 220px minmax(0, var(--measure)); gap: 72px; justify-content: center; padding: 56px 22px 0; border-top: 1px solid var(--line); max-width: 1120px; margin: 0 auto; }
.toc { font-size: 13px; line-height: 1.5; }
.toc-side { position: sticky; top: calc(var(--nav-h) + 24px); max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; }
.toc-fold { display: none; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc ul ul { display: none; }
.toc li { margin-bottom: 10px; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--ink); text-decoration: none; }
.toc-title { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 14px; }
.article { font-size: 19px; line-height: 1.75; min-width: 0; }
html[lang="en"] .article { line-height: 1.6; letter-spacing: -.01em; }
.article h2 { font-size: 32px; line-height: 1.15; margin: 64px 0 18px; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 22px; line-height: 1.25; margin: 40px 0 12px; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 1em; }
.article li { margin-bottom: .4em; }
.article blockquote { margin: 0 0 2em; padding: 24px 28px; background: var(--bg-alt); border-radius: 18px; color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.article blockquote p:last-child { margin-bottom: 0; }
.article img { display: block; margin: 36px auto 12px; background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 0 0 1px var(--line); }
.article p:has(> img:only-child) { margin: 0; }
.article p:has(> img:only-child) + p { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin-bottom: 2em; }
.article p:has(> img:only-child) + p strong { color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 12px 0 32px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.article table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.5; }
.article th { text-align: left; font-weight: 600; background: var(--bg-alt); padding: 10px 14px; }
.article td { padding: 9px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.article td:first-child { min-width: 8em; }
.article td:not(:first-child), .article th:not(:first-child) { white-space: nowrap; }
.article math { font-size: 1.05em; }
.article math[display="block"] { display: block math; overflow-x: auto; overflow-y: hidden; margin: 1.3em 0; padding: 2px 0; }
.article-end { border-top: 1px solid var(--line); margin-top: 64px; padding-top: 24px; font-size: 17px; }
.page-end { height: 110px; }

/* ---------------- Footer ---------------- */
.gfoot { background: var(--bg-alt); color: var(--ink-2); font-size: 12px; line-height: 1.33; letter-spacing: -.01em; padding: 36px 0 26px; }
.gfoot .cols { display: flex; flex-wrap: wrap; gap: 20px 64px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.gfoot h4 { font-size: 12px; font-weight: 600; color: var(--ink); margin: 0 0 10px; }
.gfoot a { color: var(--ink-2); display: block; line-height: 2; }
.gfoot a:hover { color: var(--ink); text-decoration: underline; }
.gfoot .base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 16px; }
.gfoot .base a { display: inline; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1068px) {
  .article-layout { grid-template-columns: minmax(0, var(--measure)); gap: 0; }
  .toc-side { display: none; }
  .toc-fold { display: block; background: var(--bg-alt); border-radius: 14px; padding: 14px 18px; margin-bottom: 36px; }
  .toc-fold > summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ink); }
  .toc-fold[open] > summary { margin-bottom: 14px; }
  .toc-fold li { margin-bottom: 8px; font-size: 14px; }
}
@media (max-width: 833px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile, .tile.w3, .tile.w6 { grid-column: auto; min-height: 0; }
  .tile.w6 .row6 { display: block; }
  .tile.w6 .num { padding-top: 24px; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature .txt { padding: 44px 28px; }
  .feature .pic { padding: 20px; }
  .cards2 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .list-card { padding: 4px 24px; }
  .list-card .entry { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .entry .v { text-align: left; }
  .section { padding: 80px 0; }
  .year-group { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .year-group > h2 { font-size: 32px; padding-top: 0; }
  .pubs { padding: 4px 22px; }
  .status { margin-left: 0; width: 100%; }
  .search-box { max-width: none; }
  .filters { position: static; -webkit-backdrop-filter: none; backdrop-filter: none; background: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -22px; padding: 2px 22px; scrollbar-width: none; flex-basis: calc(100% + 44px); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; flex: none; }
}
@media (max-width: 760px) {
  .js .gnav .in { justify-content: space-between; }
  .js .gnav .links { position: fixed; top: var(--nav-h); left: 0; right: 0; height: 0; overflow: hidden; flex-direction: column; justify-content: flex-start; max-width: none;
    margin: 0; padding: 0 44px; background: #161617; visibility: hidden;
    transition: height var(--t-slow) var(--ease), padding var(--t-slow) var(--ease), visibility 0s linear var(--t-slow); }
  .js .gnav .links a[aria-current]::after { display: none; }
  .js .gnav .links a { font-size: 28px; font-weight: 600; color: #e8e8ed; padding: 8px 0; opacity: 0; transform: translateY(-8px); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
  .js.nav-open .gnav .links { height: calc(100svh - var(--nav-h)); padding-top: 24px; visibility: visible; transition-delay: 0s; }
  .js.nav-open .gnav .links a { opacity: 1; transform: none; }
  .js.nav-open .gnav .links a:nth-child(2) { transition-delay: 40ms; }
  .js.nav-open .gnav .links a:nth-child(3) { transition-delay: 80ms; }
  .js.nav-open .gnav .links a:nth-child(4) { transition-delay: 120ms; }
  .js .menu-btn { display: block; }
  .js .gnav .lang { margin-left: auto; margin-right: 8px; }
  .js.nav-open body { overflow: hidden; }
  .js.nav-open .gnav { background: #161617; }
  html:not(.js) .gnav { height: auto; }
  html:not(.js) .gnav .in { flex-wrap: wrap; padding: 10px 22px; }
  html:not(.js) .gnav .links { order: 3; flex-basis: 100%; padding: 6px 0 0; justify-content: flex-start; gap: 20px; }
  .page-head { padding: 64px 22px 48px; }
  .article-head { padding: 56px 22px 40px; }
  .article { font-size: 17px; }
  .article h2 { font-size: 26px; margin-top: 48px; }
  .hero .note { font-size: 11px; }
}

/* ---------------- Motion & print ---------------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--t); animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@media print {
  .gnav, .gfoot, .filters, .toc, .actions, details.cite, .skip, .hero canvas { display: none !important; }
  body { background: #fff; color: #000; }
  .article-layout { display: block; border: 0; }
}
