/* Palette and type follow anthropic.com: ivory paper, slate ink, clay / sky / olive / fig accents,
   a serif reading face and a sans for headings and interface. */
:root {
  --bg: #faf9f5;
  --panel: #f5f4ed;
  --panel-2: #f0eee6;
  --card: #ffffff;
  --line: #e8e6dc;
  --line-2: #d1cfc5;
  --text: #141413;
  --body: #141413;
  --muted: #5e5d59;
  --faint: #87867f;
  --tick: #73726c;
  --accent: #d97757;
  --accent-ink: #b0583b;
  --focus: #2c84db;
  --band: rgba(20, 20, 19, 0.035);
  --c-src: #b0aea5;
  --c-off: #d97757;
  --c-v1: #c46686;
  --c-v2: #6a9bcc;
  --c-v3: #788c5d;
  --c-sr: #6f5b8a;
  --c-sr1: #3f7d78;
  --radius: 12px;
  --col: 700px;
  --fig: 960px;
  --wide: 1120px;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Source Serif 4", "Source Serif Pro", Georgia, Cambria,
    "Songti SC", "STSong", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; counter-reset: fig; }
html[data-lang="zh"] [lang="en"],
html[data-lang="en"] [lang="zh"] { display: none !important; }
::selection { background: rgba(217, 119, 87, 0.24); }
button, select, input { font: inherit; color: inherit; }
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--line-2);
}
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mono { font-family: var(--mono); }

/* top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  background: rgba(250, 249, 245, 0.9);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .name {
  min-width: 0;
  margin-right: auto;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar .name:hover { color: var(--text); }
.topbar .name small { margin-left: 12px; color: var(--faint); font-size: 13px; font-weight: 400; letter-spacing: 0; }

/* section links in the top bar; the Method entry opens its subsections */
.nav { display: flex; align-self: stretch; margin-right: 4px; }
.nav-item { position: relative; display: flex; }
.nav > a, .nav-item > a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.nav > a:hover, .nav-item:hover > a, .nav > a.on, .nav-item > a.on { color: var(--text); }
.nav > a.on::after, .nav-item > a.on::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -1px; height: 2px; border-radius: 1px; background: var(--text); }
.nav-item svg { width: 9px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.5; opacity: 0.7; }
.nav-sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(20, 20, 19, 0.12), 0 1px 3px rgba(20, 20, 19, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0s linear 0.15s;
}
.nav-item:hover .nav-sub, .nav-item:has(:focus-visible) .nav-sub { opacity: 1; visibility: visible; transform: none; transition: opacity 0.15s, transform 0.15s; }
.nav-item.closed .nav-sub { opacity: 0; visibility: hidden; }
.nav-sub a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.nav-sub a:hover { background: var(--panel-2); color: var(--text); }
.nav-sub a.on { color: var(--text); font-weight: 600; }
.toc-btn {
  display: none;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  flex: none;
}
.toc-btn:hover, .toc-btn[aria-expanded="true"] { color: var(--text); }
.toc-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

/* shared controls */
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  vertical-align: middle;
  flex: none;
}
.segmented button {
  padding: 3px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  cursor: pointer;
}
.segmented button:hover { color: var(--text); }
.segmented button.on { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(20, 20, 19, 0.06); }
.btn {
  display: inline-grid;
  place-items: center;
  height: 32px;
  min-width: 32px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  flex: none;
}
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.primary:hover { background: #3d3d3a; border-color: #3d3d3a; }
.btn svg { width: 16px; height: 16px; fill: currentColor; display: block; }
.btn-row { display: flex; gap: 6px; }
.scrub { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.scrub input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 7px 0 5px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 2px;
  background: linear-gradient(to right, var(--text) var(--fill, 0%), var(--line-2) var(--fill, 0%));
  outline: none;
  cursor: pointer;
}
.scrub input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--text);
}
.scrub input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--text); }
.readout { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.readout b { color: var(--text); font-weight: 600; }
.control-group { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 12px; line-height: 1.4; }
.toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.toggle input { accent-color: var(--text); }
.hints { margin-top: 10px; color: var(--faint); font-size: 12px; line-height: 1.9; }
kbd {
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--card);
  color: var(--muted);
  font-family: inherit;
  font-size: 11.5px;
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.src { background: var(--c-src); }
.dot.official { background: var(--c-off); }
.dot.v1 { background: var(--c-v1); }
.dot.v2 { background: var(--c-v2); }
.dot.v3 { background: var(--c-v3); }
.dot.sr { background: var(--c-sr); }
.dot.sr1 { background: var(--c-sr1); }

/* page */
main { padding: 76px 24px 120px; }
.post { max-width: var(--col); margin: 0 auto; }
.post > .fig {
  width: min(var(--fig), calc(100vw - 48px));
  margin-left: calc((100% - min(var(--fig), calc(100vw - 48px))) / 2);
}
.post > .wide {
  width: min(var(--wide), calc(100vw - 48px));
  margin-left: calc((100% - min(var(--wide), calc(100vw - 48px))) / 2);
}

.post-head {
  width: min(920px, calc(100vw - 48px));
  margin: 0 0 64px calc((100% - min(920px, calc(100vw - 48px))) / 2);
  text-align: center;
}
.post-head .eyebrow { margin: 0 0 24px; color: var(--text); font-size: 15px; font-weight: 600; }
.post-head h1 {
  margin: 0 0 22px;
  color: var(--text);
  font-size: clamp(36px, 5.4vw, 58px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.028em;
}
.post-head .kw { margin: 0; color: var(--muted); font-size: 15px; }
.post-head .by { margin: 10px 0 0; color: var(--text); font-size: 15px; }

/* reading column: serif body like anthropic.com */
.post > p,
.post > ul,
.post > ol { font-family: var(--serif); font-size: 18px; line-height: 1.62; }
html[data-lang="zh"] .post > p,
html[data-lang="zh"] .post > ul,
html[data-lang="zh"] .post > ol { font-size: 17px; line-height: 1.9; }
.post > p { margin: 0 0 1.1em; }
.post h2 {
  margin: 88px 0 20px;
  color: var(--text);
  font-size: 30px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.post h3 { margin: 56px 0 14px; color: var(--text); font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.post b, .post strong { color: var(--text); font-weight: 650; }
.post > ul, .post > ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.post > ul li, .post > ol li { margin: 0.4em 0; padding-left: 4px; }
.post li::marker { color: var(--faint); }
.post code {
  padding: 0.12em 0.36em;
  border-radius: 4px;
  background: var(--panel-2);
  color: #3d3d3a;
  font-family: var(--mono);
  font-size: 0.8em;
  white-space: nowrap;
}
.post pre {
  margin: 0 0 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
}
.post pre code { padding: 0; background: none; color: #3d3d3a; font-size: inherit; white-space: pre; }
.post sub { font-size: 0.75em; }

/* citations */
.cite { color: var(--muted); font-family: var(--sans); font-size: 0.78em; font-weight: 400; white-space: nowrap; }
.cite a { color: inherit; text-decoration: none; }
.cite a:hover { color: var(--accent-ink); }
.cite-pop {
  position: absolute;
  z-index: 50;
  top: 0;
  left: 0;
  max-width: min(420px, calc(100vw - 24px));
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(20, 20, 19, 0.12), 0 1px 3px rgba(20, 20, 19, 0.06);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  opacity: 0;
  visibility: hidden;
  transform: translateY(3px);
  transition: opacity 0.12s, transform 0.12s, visibility 0s linear 0.12s;
}
.cite-pop.show { opacity: 1; visibility: visible; transform: none; transition: opacity 0.12s, transform 0.12s; }
.cite-pop .n { color: var(--faint); margin-right: 2px; }
.cite-pop .ti { color: var(--text); }
.cite-pop a { overflow-wrap: anywhere; }

/* references */
.refs ol { margin: 0; padding: 0; list-style: none; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.refs li { display: grid; grid-template-columns: 2.7em minmax(0, 1fr); margin: 0 -10px; padding: 7px 10px; border-radius: 8px; transition: background 0.4s; }
.refs li .n { color: var(--faint); font-variant-numeric: tabular-nums; }
.refs li .ti { color: var(--text); }
.refs li a { overflow-wrap: anywhere; }
.refs li:target { background: rgba(217, 119, 87, 0.12); }

/* contents (only where there is room beside the wide figures) */
.toc { position: fixed; top: 112px; left: calc(50% - var(--wide) / 2 - 236px); width: 200px; display: none; font-size: 13px; line-height: 1.45; }
.toc a { display: block; padding: 5px 0 5px 14px; border-left: 1px solid var(--line); color: var(--faint); text-decoration: none; }
.toc a.sub { padding-left: 26px; font-size: 12.5px; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--text); border-left-color: var(--text); }
@media (min-width: 1620px) { .toc { display: block; } }
@media (max-width: 1259px) { .topbar .name small { display: none; } }
/* below the width where the top-bar links fit, the same contents open as a panel from the top bar */
@media (max-width: 999px) {
  .nav { display: none; }
  .toc-btn { display: inline-flex; }
  .toc.open {
    display: block;
    top: 64px;
    left: auto;
    right: 12px;
    z-index: 35;
    width: min(300px, calc(100vw - 24px));
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 12px 16px 12px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    box-shadow: 0 10px 30px rgba(20, 20, 19, 0.12), 0 1px 3px rgba(20, 20, 19, 0.06);
  }
}

/* tables */
.table { margin: 28px 0 32px; overflow-x: auto; }
.post table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.post th, .post td { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.post th:first-child, .post td:first-child { padding-left: 0; text-align: left; }
.post th:last-child, .post td:last-child { padding-right: 0; }
.post thead th { color: var(--muted); font-weight: 500; vertical-align: bottom; border-bottom-color: var(--text); white-space: normal; word-break: keep-all; }
.post thead th small { display: block; color: var(--faint); font-size: 11.5px; font-weight: 400; }
.post td .dot { margin-right: 8px; vertical-align: 1px; }
.post tr.final td { color: var(--text); font-weight: 650; }
.post tr.sep td { color: var(--muted); font-size: 13px; text-align: left; white-space: normal; }

/* figures */
.post figure { margin: 44px 0 52px; }
.post figure.num { counter-increment: fig; }
.post figcaption.cap { max-width: 820px; margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.post figcaption.cap::before { content: "图 " counter(fig); margin-right: 0.8em; color: var(--text); font-weight: 600; }
html[data-lang="en"] .post figcaption.cap::before { content: "Figure " counter(fig) "."; margin-right: 0.5em; }

.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--tick); font-size: 11.5px; font-family: var(--sans); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .zero { stroke: var(--faint); stroke-width: 1; opacity: 0.8; }
.chart .t-title { fill: var(--muted); font-size: 12px; }
.chart .t-strong { fill: var(--text); }
.fig-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { display: inline-block; width: 16px; height: 2px; border-radius: 1px; flex: none; }
.legend i.dot { width: 8px; height: 8px; border-radius: 50%; }
.legend i.box { width: 10px; height: 10px; border-radius: 2px; }
.legend i.hollow { width: 9px; height: 9px; border-radius: 50%; background: none !important; border: 1.5px solid var(--faint); }
.readings { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 12px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.readings b { font-weight: 600; }

/* animations */
.anim { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.anim .stage { padding: 22px 24px 10px; }
.anim .stage svg { display: block; width: 100%; height: auto; }
.anim svg text { font-family: var(--sans); }
.anim svg .mono { font-family: var(--mono); }
.anim .bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--panel-2); }
.anim .bar .scrub { min-width: 180px; }
.anim .say { margin: 0; padding: 14px 18px 14px; min-height: 4.6em; color: var(--body); font-size: 14.5px; line-height: 1.7; background: var(--panel-2); }
.anim .say b { color: var(--text); font-weight: 600; }
.anim .legend { margin: 0; padding: 0 18px 14px; background: var(--panel-2); }

/* video comparison (layout from the SolarWM showcase) */
.vp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 14px; }
.vp-crumbs { display: flex; gap: 10px; align-items: center; color: var(--faint); font-size: 13px; line-height: 1.5; }
.vp-tag { padding: 1px 9px; border-radius: 6px; background: var(--card); border: 1px solid var(--line-2); color: var(--text); font-weight: 600; }
.vp-title { margin-top: 5px; color: var(--muted); font-size: 12.5px; line-height: 1.4; font-family: var(--mono); word-break: break-all; }
.vp-facts { display: flex; gap: 22px; margin: 0; }
.vp-facts div { display: flex; flex-direction: column; }
.vp-facts dt { color: var(--faint); font-size: 11.5px; line-height: 1.4; }
.vp-facts dd { margin: 0; color: var(--text); font-size: 13.5px; font-weight: 600; line-height: 1.5; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vp-picker { display: flex; gap: 6px; margin: 0 0 14px; padding: 0 0 6px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.vp-pick {
  flex: none;
  width: 116px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.vp-pick:hover { background: var(--panel-2); }
.vp-pick.active { background: var(--card); border-color: var(--line-2); box-shadow: 0 1px 2px rgba(20, 20, 19, 0.05); }
.vp-pick img { display: block; width: 100%; aspect-ratio: 7 / 4; object-fit: cover; border-radius: 6px; background: var(--panel-2); }
.vp-pick .nm { margin-top: 5px; overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 11.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.vp-pick .mt { color: var(--faint); font-size: 11px; line-height: 1.35; white-space: nowrap; }
.vp-pick.active .nm { color: var(--text); }
.vp-stage { position: relative; }
.vp .tiles { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 10px; grid-auto-flow: dense; }
.vp .tiles.focus { grid-template-columns: 2fr 1fr; }
.vp .tiles.focus .tile.is-focus { grid-column: 1; grid-row: 1 / span var(--rest, 2); }
.vp .tile { margin: 0; min-width: 0; }
.vp .tile video, .vp .wipe { display: block; width: 100%; aspect-ratio: 7 / 4; border-radius: 8px; background: #1a1918; }
.vp .tile video { cursor: zoom-in; object-fit: contain; }
.vp .tiles.focus .tile.is-focus video { cursor: zoom-out; }
.vp .tile figcaption, .vp .wipe-label { display: flex; align-items: center; gap: 7px; margin-top: 7px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.vp .tile figcaption .name { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp .tile figcaption .metric { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vp .wipe { position: relative; overflow: hidden; cursor: ew-resize; touch-action: none; user-select: none; }
.vp .wipe-wrap .wipe { width: min(100%, calc((100vh - 260px) * 7 / 4)); min-width: 320px; margin: 0 auto; }
.vp .wipe-wrap .wipe-label { justify-content: center; flex-wrap: wrap; }
.vp .wipe video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.vp .wipe video.top { clip-path: inset(0 0 0 var(--pos, 50%)); }
.vp .wipe .divider { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: rgba(250, 249, 245, 0.9); pointer-events: none; }
.vp .wipe .divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  background: rgba(20, 20, 19, 0.72);
  border: 2px solid rgba(250, 249, 245, 0.9);
}
.vp .wipe .divider span::before { content: "‹ ›"; position: absolute; inset: 0; display: grid; place-items: center; color: #faf9f5; font-size: 13px; line-height: 1; }
.vp .wipe-tag {
  position: absolute;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(20, 20, 19, 0.72);
  color: #faf9f5;
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
}
.vp .wipe-tag.left { left: 10px; }
.vp .wipe-tag.right { right: 10px; }
.vp .wipe-label select { padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--card); }
.vp .buffering {
  position: absolute;
  top: 12px;
  left: 50%;
  display: none;
  padding: 5px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(250, 249, 245, 0.92);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  transform: translateX(-50%);
}
.vp .buffering.show { display: block; }
.vp .controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.vp-body:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 24px; background: var(--bg); overflow: auto; }
.vp-body:fullscreen .wipe-wrap .wipe { width: min(100%, calc((100vh - 170px) * 7 / 4)); }

/* footer */
footer { padding: 30px 24px 44px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; text-align: center; }
footer .authors { margin: 0 0 8px; color: var(--muted); font-size: 14px; }

@media (max-width: 860px) {
  main { padding: 44px 18px 80px; }
  .topbar { padding: 0 16px; }
  .topbar .name small { display: none; }
  .post-head { width: auto; margin: 0 0 48px; }
  .post-head h1 { font-size: 36px; }
  .post > p, .post > ul, .post > ol { font-size: 17px; }
  html[data-lang="zh"] .post > p, html[data-lang="zh"] .post > ul, html[data-lang="zh"] .post > ol { font-size: 16.5px; }
  .post h2 { margin-top: 64px; font-size: 25px; }
  .post h3 { margin-top: 44px; font-size: 19px; }
  .post > .fig, .post > .wide { width: auto; margin-left: 0; }
  .post td:first-child { white-space: normal; }
  .chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .chart-scroll > svg { min-width: 640px; }
  .anim .stage { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 14px 12px 8px; }
  .anim .stage > svg { min-width: 760px; }
  .vp-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .vp .tiles, .vp .tiles.focus { grid-template-columns: 1fr; }
  .vp .tiles.focus .tile.is-focus { grid-row: auto; }
}

@media (max-width: 520px) {
  .topbar { gap: 10px; padding: 0 14px; }
  .topbar .name { font-size: 14px; }
  .topbar .segmented button { padding: 3px 8px; }
  .toc-btn { padding: 0 9px; }
  .toc-btn [lang] { display: none; }
}
