/* Treasure Map site styles. Black ink on white paper, drawn like an old map:
   double-ruled frames, dashed trails, hand-drawn X marks, one compass rose.
   No colour anywhere: meaning is carried by fill, outline and dash.
     filled  = yes        open ring = no        dashed ring with ? = unknown
     dashed outline and italic type = the agent's side of the work */

/* ── fonts (self-hosted: no third-party requests) ───────────────────────── */
/* IM Fell English only has old-style figures, which read badly in headings
   ("CVE-2021-26614", "11 minutes"). These two files carry just the digits 0–9,
   from EB Garamond 500 (lining figures), and the display stack below uses them
   for digits only. */
@font-face {
  font-family: "TM Digits";
  src: url("../fonts/tm-digits-normal.woff2") format("woff2");
  font-style: normal;
  font-display: swap;
  unicode-range: U+0030-0039;
}
@font-face {
  font-family: "TM Digits";
  src: url("../fonts/tm-digits-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
  unicode-range: U+0030-0039;
}
@font-face {
  font-family: "IM Fell English";
  src: url("../fonts/im-fell-english.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IM Fell English";
  src: url("../fonts/im-fell-english-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var-italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-500-normal.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  /* Chart paper and ink. Everything is ink on paper except the X that marks a
     finding, which is the one colour on the site (the red X of a treasure map). */
  --bg: #fbfaf6;
  --bg-2: #f2f0ea;
  --bg-3: #e6e3db;
  --ink: #141310;
  --ink-2: #3a3832;
  --ink-3: #66625a;
  --rule: #cbc7bd;
  --rule-2: #e3e0d7;
  --mark: #c2381f;
  --code-bg: #15140f;
  --code-ink: #f2f0ea;
  --code-dim: #9a968c;
  --code-line: transparent;

  --display: "TM Digits", "IM Fell English", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Chinese pages use one family throughout, Latin included, so nothing switches mid-line. */
  --zh: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC",
    "Source Han Sans SC", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "PingFang SC",
    "Microsoft YaHei", monospace;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.1875rem;
  --fs-lg: 1.375rem;
  --fs-xl: clamp(2rem, 1.35rem + 2vw, 3rem);
  --fs-2xl: clamp(2.6rem, 1.5rem + 3.7vw, 4.5rem);

  /* The hand-drawn X, as a mask: painted with background-color, so it follows the theme. */
  /* One dash of the dashed trail, centred in its tile (see .sec + .sec). */
  --trail: linear-gradient(90deg, transparent 4px, var(--ink) 4px 13px, transparent 13px);
  --x-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3.2 3.4c3.1 3.3 7.4 7.9 11.5 11.3M14.6 3.1c-3.6 3.9-7.6 7.7-11.3 11.7' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E");

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 48px);
  --head-h: 64px;
  --sec-pad: clamp(52px, 6.5vw, 88px);
  color-scheme: light;
}
/* Dark follows the system unless the reader picks a mode in the header (stored as data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0c0b;
    --bg-2: #171614;
    --bg-3: #23211e;
    --ink: #f1efe9;
    --ink-2: #cfccc4;
    --ink-3: #a19d94;
    --rule: #3b3833;
    --rule-2: #26241f;
    --mark: #ff7a5c;
    --code-bg: #000000;
    --code-ink: #f1efe9;
    --code-dim: #8a867d;
    --code-line: #33312c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0c0b;
  --bg-2: #171614;
  --bg-3: #23211e;
  --ink: #f1efe9;
  --ink-2: #cfccc4;
  --ink-3: #a19d94;
  --rule: #3b3833;
  --rule-2: #26241f;
  --mark: #ff7a5c;
  --code-bg: #000000;
  --code-ink: #f1efe9;
  --code-dim: #8a867d;
  --code-line: #33312c;
  color-scheme: dark;
}

/* ── base ───────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html:lang(zh) body {
  font-family: var(--zh);
  line-height: 1.75;
}
::selection {
  background: var(--ink);
  color: var(--bg);
}
img,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 640;
  line-height: 1.15;
  text-wrap: balance;
}
h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.005em;
}
h3 {
  font-stretch: 94%;
  letter-spacing: -0.01em;
}
:lang(zh) h1,
:lang(zh) h2,
:lang(zh) h3 {
  font-family: var(--zh);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}
/* Article titles break at spaces and punctuation, never inside a word
   ("后 / 门"); a run too long for the line still wraps instead of overflowing.
   (Not the home title: there the break inside "的 / 固件藏宝图" is the right one.) */
/* One sentence of a two-sentence heading stays together where it fits (see the
   "sentences" filter); a sentence longer than the line still wraps inside. */
.sentence {
  display: inline-block;
}
.nobr {
  white-space: nowrap;
}
:lang(zh) .art-head h1,
:lang(zh) .feat-title,
:lang(zh) .finding-h,
:lang(zh) .fd-t {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-color: currentColor;
}
code,
pre,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
  font-variant-ligatures: none;
}
:not(pre) > code {
  overflow-wrap: anywhere;
}
/* Code inside a block takes the block's size. Without this the 0.9em above
   applied twice, and every Markdown code block (pre > code) came out near 12px
   instead of the 13.5px its pre sets. */
pre code {
  font-size: inherit;
}
b,
strong {
  font-weight: 640;
}
:lang(zh) b,
:lang(zh) strong {
  font-weight: 600;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
main:focus {
  outline: none;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The map's double-ruled frame */
.frame,
.arch-tool,
.cand,
.converge,
.pview {
  border: 1px solid var(--ink);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--ink);
}

/* The agent's voice: italic in Latin script; Chinese stays upright in the same family. */
.agent-does,
.agent-qs li,
.flow-up {
  font-style: italic;
}
:lang(zh) .agent-does,
:lang(zh) .agent-qs li,
:lang(zh) .flow-up {
  font-style: normal;
}

/* Hand-drawn marks */
.xmark {
  flex: none;
  width: 14px;
  height: 14px;
  overflow: visible;
}
.xmark path {
  fill: none;
  stroke: var(--mark);
  stroke-width: 2.1;
  stroke-linecap: round;
}
.compass {
  flex: none;
  width: 54px;
  height: 58px;
  margin-bottom: -6px;
  overflow: visible;
}
.c-ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.9;
}
.c-ring-in {
  stroke-dasharray: 1.2 1.6;
}
.c-dark {
  fill: var(--ink);
}
.c-light {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 0.9;
  stroke-linejoin: round;
}
.c-n {
  fill: var(--ink);
  font-family: var(--display);
  font-size: 8px;
}

/* ── tri-state glyphs ───────────────────────────────────────────────────── */
.tri {
  --s: 14px;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  vertical-align: -2px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 760;
  font-style: normal;
  line-height: 1;
  color: var(--ink);
}
.tri-yes {
  background: var(--ink);
}
.tri-no {
  border: 1.5px solid var(--ink);
}
.tri-unknown {
  border: 1.5px dashed var(--ink);
}

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 560;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover {
  background: var(--bg-2);
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--ink-2);
}

/* ── header ─────────────────────────────────────────────────────────────── */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-head.is-scrolled {
  border-bottom-color: var(--ink);
}
.site-head-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--head-h);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.brand-name {
  font-family: var(--display);
  font-size: 1.625rem;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 11px;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 520;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--ink);
}
.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--ink);
}
/* The light switch: a lamp hanging from the top edge of the page on its cord.
   Lit in light mode (warm glow, rays); out in dark mode (empty bulb). Pulling
   the bead tugs the cord, the lamp swings, and the light changes a beat later. */
.nav-theme {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 44px;
  height: var(--head-h);
  margin-left: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-theme:focus-visible {
  outline: none;
}
.nav-theme:focus-visible .lamp {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.lamp {
  width: 30px;
  height: 43px;
  overflow: visible;
}
.lamp-swing {
  transform-box: view-box;
  transform-origin: 16px 0;
  transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.lamp-cord,
.lamp-string {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
}
.lamp-string {
  stroke-width: 1;
}
.lamp-cap,
.lamp-bead {
  fill: var(--ink);
}
.lamp-shade {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.lamp-bulb {
  fill: #fff4d6;
  stroke: var(--ink);
  stroke-width: 1.3;
  transition: fill 0.3s;
}
.lamp-rays {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-linecap: round;
  transition: opacity 0.25s;
}
.lamp-glow {
  transition: opacity 0.4s;
}
.lamp-pull {
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.nav-theme:hover .lamp-swing {
  transform: rotate(3deg);
}
.nav-theme:hover .lamp-pull {
  transform: translateY(1.5px);
}
.nav-theme.is-pulled .lamp-pull {
  animation: lamp-tug 0.45s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.nav-theme.is-pulled .lamp-swing {
  animation: lamp-swing 1.1s cubic-bezier(0.3, 0.6, 0.3, 1);
}
@keyframes lamp-tug {
  30% {
    transform: translateY(5px);
  }
}
@keyframes lamp-swing {
  18% {
    transform: rotate(-7deg);
  }
  40% {
    transform: rotate(5deg);
  }
  60% {
    transform: rotate(-2.6deg);
  }
  80% {
    transform: rotate(1deg);
  }
}
/* Off: the bulb empties, the rays and the glow go. Hovering an unlit lamp
   warms it a little, a hint of what the cord does. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lamp-bulb {
    fill: transparent;
  }
  :root:not([data-theme="light"]) .lamp-rays,
  :root:not([data-theme="light"]) .lamp-glow {
    opacity: 0;
  }
  :root:not([data-theme="light"]) .nav-theme:hover .lamp-glow {
    opacity: 0.3;
  }
}
:root[data-theme="dark"] .lamp-bulb {
  fill: transparent;
}
:root[data-theme="dark"] .lamp-rays,
:root[data-theme="dark"] .lamp-glow {
  opacity: 0;
}
:root[data-theme="dark"] .nav-theme:hover .lamp-glow {
  opacity: 0.3;
}
/* The page itself: the new light spreads from the bulb, or the dark closes in on it
   (site.js runs the clip; these rules only switch off the default cross-fade). */
:root.vt-lamp::view-transition-old(root),
:root.vt-lamp::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
:root.vt-off::view-transition-old(root) {
  z-index: 2;
}
@media (prefers-reduced-motion: reduce) {
  .lamp-swing,
  .lamp-pull,
  .lamp-bulb,
  .lamp-rays,
  .lamp-glow {
    transition: none;
  }
  .nav-theme:hover .lamp-swing,
  .nav-theme:hover .lamp-pull {
    transform: none;
  }
  .nav-theme.is-pulled .lamp-swing,
  .nav-theme.is-pulled .lamp-pull {
    animation: none;
  }
}
.no-js .nav-theme-li {
  display: none;
}
.subnav {
  display: none;
}
@media (max-width: 760px) {
  .nav-hide-sm {
    display: none;
  }
}
@media (max-width: 640px) {
  .nav-sec {
    display: none;
  }
  .subnav {
    display: block;
    border-top: 1px solid var(--rule-2);
  }
  .subnav-in {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .subnav a {
    flex: none;
    padding: 10px 10px 9px;
    font-size: var(--fs-sm);
    font-weight: 520;
    color: var(--ink);
    text-decoration: none;
  }
  .subnav a:first-child {
    margin-left: -10px;
  }
  .subnav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--ink);
  }
}
/* The smallest phones: GitHub is still in the hero and the footer. */
@media (max-width: 359px) {
  .nav-gh-li {
    display: none;
  }
}
@media (max-width: 400px) {
  .brand-name {
    font-size: 1.375rem;
  }
  .site-nav a {
    padding-inline: 7px;
  }
  .nav-theme {
    width: 36px;
  }
  .lamp {
    width: 25px;
    height: 36px;
  }
}

/* ── shared panel bits ──────────────────────────────────────────────────── */
.panel-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--ink);
}
.panel-label {
  font-size: var(--fs-xs);
  font-weight: 640;
  color: var(--ink);
}
.panel-note {
  font-size: 13px;
  font-style: italic;
  color: var(--ink-3);
}
:lang(zh) .panel-note {
  font-style: normal;
  font-size: 13px;
}

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding-block: clamp(36px, 4.4vw, 56px) clamp(48px, 7vw, 96px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(44px, 6vw, 76px);
  align-items: start;
}
@media (min-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  }
}
.hero h1 {
  font-size: var(--fs-2xl);
  line-height: 1;
  max-width: 15ch;
}
:lang(zh) .hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem);
  font-weight: 700;
  max-width: 11em;
  line-height: 1.2;
}
/* The tagline: two plain lines under a short ink rule, set lighter than the title. */
.hero-tagline {
  margin-top: 28px;
  padding-top: 22px;
  background: linear-gradient(var(--ink), var(--ink)) top left / 52px 1px no-repeat;
  font-family: var(--display);
  font-size: clamp(1.45rem, 1.25rem + 0.7vw, 1.875rem);
  line-height: 1.38;
}
.hero-tagline > span {
  display: block;
}
:lang(zh) .hero-tagline {
  font-family: var(--zh);
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.95rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.6;
}
.hero-lede {
  margin-top: 20px;
  color: var(--ink-2);
  max-width: 60ch;
}
:lang(zh) .hero-lede {
  max-width: 36em;
}
.install {
  margin-top: 30px;
  max-width: 640px;
}
.install-label {
  margin-bottom: 8px;
  font-size: var(--fs-xs);
  font-weight: 640;
}
.install-note {
  margin-top: 10px;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  max-width: 60ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.hero-works {
  margin-top: 18px;
  font-size: var(--fs-sm);
  color: var(--ink-3);
}

/* ── architecture diagram ───────────────────────────────────────────────── */
.arch {
  margin: 0;
  font-size: var(--fs-sm);
}
@media (min-width: 1080px) {
  .arch {
    margin-top: 6px;
  }
}
.arch-cap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  font-size: var(--fs-base);
  font-weight: 620;
  color: var(--ink);
}
.arch-zone {
  padding: 16px;
}
.arch-tool {
  background: var(--bg);
}
.arch-agent {
  border: 1.5px dashed var(--ink);
}
.zone-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin-bottom: 14px;
  font-weight: 640;
  font-size: var(--fs-sm);
}
.zone-note {
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-3);
}
.arch-agent .zone-name {
  align-items: center;
  margin-bottom: 6px;
}
.xmark-agent {
  width: 16px;
  height: 16px;
  margin-right: 2px;
}
.agent-does {
  color: var(--ink-2);
  max-width: 52ch;
}
.arch-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "in1 in2"
    "e1  e2"
    "atlas atlas"
    "mcp mcp";
  gap: 0 12px;
}
.node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  background: var(--bg);
  min-width: 0;
}
.node-k {
  font-weight: 620;
  font-size: 13.5px;
  line-height: 1.3;
}
.node code {
  font-size: 12.5px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.node-in-1 {
  grid-area: in1;
}
.node-in-2 {
  grid-area: in2;
}
.edge-1 {
  grid-area: e1;
}
.edge-2 {
  grid-area: e2;
}

/* Scan and diff run downward into the fact layer. */
.edge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  padding: 4px 0 4px 18px;
  min-width: 0;
}
.edge-cmd {
  align-self: end;
  font-size: 13px;
  font-weight: 500;
}
.edge-line {
  position: relative;
  grid-row: 1 / 3;
  width: 1.5px;
  min-height: 50px;
  background: var(--ink);
}
.edge-line::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  border: 5px solid transparent;
  border-top: 7px solid var(--ink);
  border-bottom: 0;
  transform: translateX(-50%);
}
.edge-note {
  align-self: start;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink-3);
}

/* Atlas: two stacked layers. Solid ink is the tool's hand, dashed ink the agent's. */
.node-atlas {
  grid-area: atlas;
  position: relative;
  gap: 0;
  padding: 12px 14px 14px;
  background: var(--bg-2);
  border-width: 1.5px;
}
.node-atlas::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -24px;
  height: 22px;
  border-left: 1.5px solid var(--ink);
}
.atlas-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin-bottom: 10px;
}
.atlas-head .node-k {
  font-size: 15px;
}
.layer {
  padding: 9px 12px 10px;
  background: var(--bg);
}
.layer-facts {
  border: 1px solid var(--ink);
}
.layer-notes {
  border: 1.5px dashed var(--ink);
}
.layer-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-weight: 640;
  font-size: 13.5px;
  line-height: 1.3;
}
.layer-tag {
  padding: 0 6px;
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0.04em;
}
.layer-notes .layer-tag {
  border-style: dashed;
}
.layer-note {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}
.layer-rel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px 16px;
  padding-left: 18px;
}
.rel {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-2);
}
.rel-block {
  font-weight: 620;
  color: var(--ink);
}
.rel > span:last-child {
  align-self: center;
  padding-block: 4px;
  text-wrap: balance;
}
.rel-arrow {
  position: relative;
  flex: none;
  width: 11px;
  min-height: 36px;
}
.rel-arrow::before {
  content: "";
  position: absolute;
  left: 4.75px;
  width: 1.5px;
}
/* Facts flow down into a judgment… */
.rel-down .rel-arrow::before {
  top: 0;
  bottom: 2px;
  background: var(--ink);
}
.rel-down .rel-arrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  border: 5.5px solid transparent;
  border-top: 7px solid var(--ink);
  border-bottom: 0;
}
/* …and nothing climbs back: the agent's dashed line stops at a bar short of the facts. */
.rel-block .rel-arrow::before {
  top: 7px;
  bottom: 0;
  background: repeating-linear-gradient(0deg, var(--ink) 0 4px, transparent 4px 7px);
}
.rel-block .rel-arrow::after {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 11px;
  height: 2px;
  background: var(--ink);
}
.node-mcp {
  grid-area: mcp;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 22px;
  border-width: 1.5px;
}
.arch-bridge {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 16px;
}
.flow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
}
.flow-arrow {
  position: relative;
  flex: none;
  width: 10px;
  height: 48px;
}
/* The trail between the map and the agent is dashed, as on a treasure map. */
.flow-arrow::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: repeating-linear-gradient(180deg, var(--ink) 0 5px, transparent 5px 9px);
}
.flow-arrow::after {
  content: "";
  position: absolute;
  left: 0;
  border: 5px solid transparent;
}
.flow-down .flow-arrow::after {
  bottom: -2px;
  border-top: 7px solid var(--ink);
  border-bottom: 0;
}
.flow-up .flow-arrow::after {
  top: -2px;
  border-bottom: 7px solid var(--ink);
  border-top: 0;
}
/* Chinese below 13px loses strokes on ordinary screens: lift the diagram's
   small print one step on the Chinese page. */
:lang(zh) .zone-note,
:lang(zh) .edge-note,
:lang(zh) .layer-note,
:lang(zh) .rel,
:lang(zh) .flow {
  font-size: 13.5px;
}
@media (max-width: 620px) {
  .node code {
    font-size: 11.5px;
  }
  .arch-flow {
    gap: 0 10px;
  }
  .edge {
    padding-left: 14px;
  }
  .layer-rel {
    gap: 0 12px;
    padding-left: 12px;
  }
  .arch-bridge {
    gap: 10px;
    padding: 0 10px;
  }
}

/* ── two things ─────────────────────────────────────────────────────────── */
.does {
  padding-bottom: clamp(8px, 2vw, 16px);
}
.does-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 clamp(28px, 4vw, 56px);
}
@media (min-width: 760px) {
  .does-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.does-item {
  display: block;
  padding: 22px 0 26px;
  border-top: 2px solid var(--ink);
  color: inherit;
  text-decoration: none;
}
.does-item h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.75rem;
  letter-spacing: 0;
}
:lang(zh) .does-item h3 {
  font-family: var(--zh);
  font-weight: 600;
  font-size: var(--fs-lg);
}
.does-item p {
  margin-top: 10px;
  color: var(--ink-2);
  max-width: 58ch;
}
.does-link {
  display: inline-block;
  margin-top: 14px;
  font-size: var(--fs-sm);
  font-weight: 560;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--rule);
}
.does-item:hover .does-link {
  text-decoration-color: currentColor;
}

/* ── sections, joined by a dashed trail ─────────────────────────────────── */
.sec {
  padding-block: var(--sec-pad);
}
.sec + .sec {
  padding-top: 0;
}
.sec + .sec > .wrap::before {
  content: "";
  display: block;
  height: 1.5px;
  margin-bottom: var(--sec-pad);
  background-image: var(--trail);
  background-size: 17px 100%;
  background-repeat: round no-repeat;
  opacity: 0.5;
  grid-column: 1 / -1;
}
.sec-head {
  max-width: 820px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.sec-head h2 {
  font-size: var(--fs-xl);
}
:lang(zh) .sec-head h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.375rem);
}
.sec-intro {
  margin-top: 16px;
  color: var(--ink-2);
  max-width: 68ch;
}
:lang(zh) .sec-intro {
  max-width: 40em;
}

/* ── candidate widget ───────────────────────────────────────────────────── */
.cand {
  background: var(--bg);
  overflow: hidden;
}
.cand-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 10px 18px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
}
.lens {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
}
.lens-label {
  color: var(--ink-2);
}
.lens select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 38px;
  padding: 6px 34px 6px 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background-color: var(--bg);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 16px center, right 11px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 540;
  cursor: pointer;
}
.cand-count {
  font-size: 13px;
  color: var(--ink-3);
}
.cand-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1000px) {
  .cand-body {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
  .cand-detail {
    border-left: 1px solid var(--ink);
  }
}
.cand-listwrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cand-cols,
.cand-btn {
  display: grid;
  grid-template-columns: 26px minmax(0, 1.25fr) minmax(0, 0.9fr) auto;
  align-items: center;
  gap: 12px;
  padding-inline: 18px;
}
.cand-cols {
  padding-block: 10px 8px;
  font-size: 12.5px;
  font-weight: 560;
  font-stretch: 92%;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
}
.cc-layers,
.cr-layers {
  display: grid;
  grid-template-columns: repeat(6, 44px);
  justify-items: center;
}
.cc-layers span {
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
}
.cc-layers span.is-lens {
  color: var(--ink);
  font-weight: 700;
}
.cand-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cand-row {
  border-bottom: 1px solid var(--rule-2);
}
.cand-btn {
  width: 100%;
  min-height: 66px;
  padding-block: 10px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.cand-btn:hover {
  background: var(--bg-2);
}
.cand-btn[aria-pressed="true"] {
  background: var(--bg-3);
}
.cand-btn[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ink);
}
.cand-btn:focus-visible {
  outline-offset: -3px;
}
.cr-rank {
  font-size: var(--fs-sm);
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.cr-call {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cr-call code {
  font-size: 14.5px;
  font-weight: 500;
}
.cr-class {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.35;
}
.cr-bin code {
  font-size: 13px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.cand-row.is-safe .cr-call code,
.cand-row.is-safe .cr-bin code,
.cand-row.is-safe .cr-rank {
  color: var(--ink-3);
}
.cr-layers .tri.is-lens {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--ink-3);
}
.cand-rules {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px 18px 4px;
  list-style: none;
}
.cand-rules li {
  position: relative;
  padding-left: 24px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.cand-rules li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.4em;
  width: 12px;
  height: 12px;
  background-color: var(--mark);
  -webkit-mask: var(--x-mark) center / contain no-repeat;
  mask: var(--x-mark) center / contain no-repeat;
}
.cand-rules b {
  color: var(--ink);
  font-weight: 640;
}
.tri-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: auto 0 0;
  padding: 14px 18px;
  list-style: none;
  font-size: 13px;
  color: var(--ink-2);
}
.tri-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cand-detail {
  padding: 18px 20px 20px;
  min-width: 0;
  border-top: 1px solid var(--ink);
}
@media (min-width: 1000px) {
  .cand-detail {
    border-top: 0;
  }
}
.cd-rank {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.cd-call {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 1.375rem;
  font-weight: 500;
}
.cd-call code {
  font-size: 1.25rem;
  font-weight: 500;
}
.cd-class {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0;
}
.cd-where {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-2);
}
.cd-off {
  color: var(--ink-3);
}
.cd-layers {
  margin: 16px 0 0;
  border-top: 1px solid var(--rule);
}
.cd-layer {
  padding: 7px 0 8px;
  border-bottom: 1px solid var(--rule-2);
}
.cd-layer dt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 560;
}
.cd-q {
  flex: 1;
  min-width: 0;
}
.cd-state {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.cd-layer.is-unknown .cd-state {
  color: var(--ink);
  text-decoration: underline dashed;
  text-underline-offset: 3px;
}
.cd-layer dd {
  margin: 2px 0 0 24px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}
.cd-why,
.cd-ref {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  font-size: var(--fs-sm);
}
.cd-k {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
}
.cd-ref code {
  display: block;
  padding: 7px 10px;
  background: var(--bg-2);
  font-size: 12.5px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.cand-detail.is-swapping > * {
  animation: fade-in 0.18s ease-out;
}
@keyframes fade-in {
  from {
    opacity: 0.25;
  }
}
.cand-row > .cand-detail {
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
@media (max-width: 640px) {
  .cand-cols {
    display: none;
  }
  .cand-btn {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank call bin"
      "rank layers layers";
    gap: 6px 10px;
    padding-inline: 14px;
  }
  .cr-rank {
    grid-area: rank;
    align-self: start;
    padding-top: 1px;
  }
  .cr-call {
    grid-area: call;
  }
  .cr-bin {
    grid-area: bin;
    justify-self: end;
    align-self: start;
  }
  .cr-layers {
    grid-area: layers;
    grid-template-columns: repeat(6, 26px);
    justify-items: start;
  }
  .panel-top,
  .cand-bar,
  .cand-rules,
  .tri-legend {
    padding-inline: 14px;
  }
  .cand-detail {
    padding-inline: 16px;
  }
}
.coverage {
  margin-top: clamp(28px, 3.5vw, 36px);
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--ink);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  max-width: 82ch;
}

/* ── diff ───────────────────────────────────────────────────────────────── */
.agent-qs {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.agent-qs li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
}
.agent-qs li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border: 1.5px dashed var(--ink);
  border-radius: 50%;
}
.diff-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 4vw, 52px);
  margin-top: clamp(36px, 4.5vw, 52px);
}
@media (min-width: 960px) {
  .diff-lower {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
/* Four points, set as a ruled column of equal bands. On a wide screen the column
   and the patch view beside it share one height: each band takes a quarter, and
   the last rule lands on the patch view's bottom edge, so neither side trails off. */
.points {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--rule);
}
.points > div {
  flex: 1 1 auto;
  padding: 20px 0 22px;
  border-top: 1px solid var(--rule);
}
.points dt {
  font-family: var(--display);
  font-size: clamp(1.3rem, 1.12rem + 0.55vw, 1.6rem);
  line-height: 1.2;
  color: var(--ink);
}
:lang(zh) .points dt {
  font-family: var(--zh);
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 640;
  line-height: 1.4;
}
.points dd {
  max-width: 64ch;
  margin: 10px 0 0;
  font-size: clamp(15.5px, 13.4px + 0.22vw, 16.5px);
  line-height: 1.62;
  color: var(--ink-2);
}
:lang(zh) .points dd {
  max-width: 34em;
  font-size: 16px;
  line-height: 1.8;
}
.points dd code {
  font-size: 0.86em;
  white-space: nowrap;
}
@media (min-width: 960px) {
  .diff-lower {
    align-items: stretch;
  }
  .points > div:first-child {
    padding-top: 0;
    border-top: 0;
  }
  /* The patch view stretches to the same height; its blind-spot footer sits at the bottom. */
  .diff-lower .pview {
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }
  .diff-lower .pv-blind {
    margin-top: auto;
  }
}
/* The patch view example: one entry per changed function pair, each showing
   the change itself as a two-line diff. Old line greyed with the changed part
   struck through; new line with the changed part circled in ink. */
.pview {
  margin: 0;
  align-self: start;
  background: var(--bg);
}
.pv-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pv-group {
  padding: 14px 18px 16px;
  border-bottom: 1px solid var(--rule-2);
}
.pv-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 640;
  color: var(--ink);
}
.pv-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.pv-what,
.pv-where,
.pv-diff,
.pv-flag,
.pv-brow {
  margin-left: 29px;
}
.pv-what {
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.pv-where {
  margin-top: 6px;
}
.pv-where code {
  font-size: 12.5px;
  color: var(--ink-2);
}
.pv-diff {
  margin-top: 6px;
  margin-bottom: 0;
  padding: 8px 12px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  font-size: 12.5px;
  line-height: 1.75;
  overflow-x: auto;
}
.pv-line {
  display: block;
  white-space: pre;
}
.pv-sign {
  display: inline-block;
  width: 1.5em;
  color: var(--ink-3);
  user-select: none;
}
.pv-del {
  color: var(--ink-3);
}
.pv-del del {
  color: var(--ink-2);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.pv-add {
  color: var(--ink);
}
/* The changed part is circled, the way a spot is marked on a map. */
.pv-add mark {
  padding: 0 4px;
  margin: 0 -1px;
  background: none;
  color: var(--ink);
  font-weight: 600;
  border: 1.5px solid var(--mark);
  border-radius: 48% 52% 45% 55% / 58% 46% 54% 42%;
}
.pv-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 4px 10px;
  border: 1px dashed var(--ink-3);
  font-size: 13px;
  color: var(--ink-2);
}
.pv-blind {
  padding: 14px 18px 16px;
}
.pv-blind .pv-name {
  color: var(--ink-2);
}
.pv-brow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  padding-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.pv-brow code {
  font-size: 12.5px;
  color: var(--ink);
}

/* ── how one real diff narrowed down ────────────────────────────────────── */
/* A unit chart: every mark is one real item. Hollow or faint = set aside at that
   step; solid = carried on to the next step. */
.converge {
  margin: 0;
  background: var(--bg);
}
.cv-stages {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.cv-stage {
  position: relative;
  display: grid;
  align-content: start;
  padding: 18px 18px 20px;
}
/* The hand-off between steps: a dashed rule with a chevron on it. */
.cv-stage + .cv-stage {
  border-top: 1px dashed var(--ink-3);
}
.cv-stage + .cv-stage::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--bg);
  transform: rotate(45deg);
}
.cv-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rule-2);
  font-size: 13px;
  font-weight: 640;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
/* Who did this step: the tool, or the agent. */
.cv-who {
  padding: 1px 7px;
  border: 1px solid var(--ink-3);
  font-weight: 560;
  letter-spacing: 0;
  white-space: nowrap;
}
.cv-stage-3 .cv-who {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.cv-n {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 14px;
  font-family: var(--mono);
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.03em;
}
.cv-from {
  color: var(--ink-3);
}
.cv-to-arrow {
  font-size: 0.7em;
  color: var(--ink-3);
}
.cv-to {
  font-weight: 640;
}
.cv-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 0 12px;
}
.cv-svg {
  display: block;
  width: 100%;
  height: auto;
}
.cv-stage-1 .cv-svg {
  max-width: 280px;
}
.cv-stage-3 .cv-svg {
  max-width: 252px;
}
.cv-off {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.cv-on {
  fill: var(--ink);
}
.cv-dot {
  fill: var(--ink-3);
  opacity: 0.5;
}
/* A gap of background round each solid dot keeps it clear of its neighbours. */
.cv-ring {
  stroke: var(--bg);
  stroke-width: 2.4;
  paint-order: stroke;
}
.cv-hit path {
  fill: none;
  stroke: var(--mark);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.cv-unit {
  padding-bottom: 8px;
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}
.cv-body {
  padding-top: 10px;
  border-top: 1px solid var(--rule-2);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
:lang(zh) .cv-unit {
  font-size: 13.5px;
}
:lang(zh) .cv-body {
  font-size: 14px;
  line-height: 1.7;
}
.cv-foot {
  padding: 13px 18px 15px;
  border-top: 1px solid var(--ink);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
@media (min-width: 900px) {
  /* Side by side, with the rows of every column lined up. */
  .cv-stages {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto auto;
  }
  .cv-stage {
    grid-row: span 5;
    grid-template-rows: subgrid;
    padding: 18px clamp(18px, 2.2vw, 30px) 20px;
  }
  .cv-stage + .cv-stage {
    border-top: 0;
    border-left: 1px dashed var(--ink-3);
  }
  .cv-stage + .cv-stage::before {
    top: 50%;
    left: -6px;
    margin: -5px 0 0;
    border-right: 1px solid var(--ink);
    border-top: 1px solid var(--ink);
    border-bottom: 0;
  }
  .cv-chart {
    padding: 22px 0 14px;
  }
}

/* ── featured showcase ──────────────────────────────────────────────────── */
.feat-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px clamp(32px, 4vw, 56px);
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--ink);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--ink);
  background: var(--bg);
  color: inherit;
  text-decoration: none;
}
.feat-card:hover {
  background: var(--bg-2);
}
.feat-main {
  display: grid;
  align-content: start;
  gap: 9px;
}
/* The article's three findings, set beside the title so the card is not half empty. */
.feat-points {
  display: grid;
  align-content: center;
  padding-top: 6px;
  border-top: 1px dashed var(--ink-3);
}
@media (min-width: 900px) {
  .feat-card.has-points {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
  .feat-points {
    padding: 0 0 0 clamp(24px, 3vw, 40px);
    border-top: 0;
    border-left: 1px dashed var(--ink-3);
  }
}
/* Each finding is marked with the X, as in the article it leads to. */
.feat-point > .x-mark {
  width: 15px;
  height: 15px;
  transform: translateY(2px);
}
.feat-point {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  font-size: var(--fs-base);
  line-height: 1.45;
  color: var(--ink);
}
.feat-point + .feat-point {
  border-top: 1px solid var(--rule-2);
}
.feat-point {
  color: var(--ink-2);
  text-wrap: pretty;
}
.fp-head {
  font-weight: 640;
  color: var(--ink);
}
.feat-mark .xmark {
  width: 17px;
  height: 17px;
}
/* When the card lists its findings, each already carries an X: drop the extra one. */
.has-points .feat-mark {
  display: none;
}
.feat-title {
  font-family: var(--display);
  font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem);
  line-height: 1.22;
  text-wrap: balance;
}
:lang(zh) .feat-title {
  font-family: var(--zh);
  font-weight: 600;
}
.feat-desc {
  max-width: 68ch;
  font-size: var(--fs-base);
  color: var(--ink-2);
}
.feat-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 560;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.feat-stats > span {
  padding-right: 14px;
  margin-right: 14px;
  border-right: 1px solid var(--rule);
  white-space: nowrap;
}
.feat-stats > span:last-child {
  margin-right: 0;
  padding-right: 0;
  border-right: 0;
}
/* On a phone the three would wrap with a rule left hanging at a line's end: stack them. */
@media (max-width: 599px) {
  .feat-stats {
    flex-direction: column;
    gap: 3px;
  }
  .feat-stats > span {
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
  }
}
.feat-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-3);
}
.feat-cta {
  font-weight: 620;
  color: var(--ink);
}
.feat-card:hover .feat-cta {
  text-decoration: underline;
}
.feat-more {
  margin-top: 24px;
}
.feat-all {
  margin-top: 14px;
  font-size: var(--fs-sm);
}

/* ── showcase article bits ──────────────────────────────────────────────── */
/* A row of headline figures at the top of a walkthrough. */
.prose .stat-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 1.8em 0;
  padding: 0;
  list-style: none;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (min-width: 720px) {
  .prose .stat-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.prose .stat-strip li {
  margin: 0;
  padding: 14px 16px 16px;
  background: var(--bg);
}
.prose .stat-strip li::marker {
  content: none;
}
/* A figure never breaks across lines ("771 / 2376" stays whole). */
.stat-n {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.55rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.stat-t {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
:lang(zh) .stat-t {
  font-size: 14px;
}

/* Long tool output is folded: the reader opens it when they want the evidence. */
.prose details {
  border: 1px solid var(--rule);
  background: var(--bg-2);
}
.prose summary {
  display: block;
  padding: 11px 16px;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.prose summary::-webkit-details-marker {
  display: none;
}
.prose summary::before {
  content: "+";
  display: inline-block;
  width: 1ch;
  margin-right: 10px;
  font-family: var(--mono);
  color: var(--ink-3);
}
.prose details[open] summary::before {
  content: "−";
}
.prose summary:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.prose details[open] summary {
  border-bottom: 1px solid var(--rule);
}
.prose details > pre,
.prose details > pre[class*="language-"] {
  margin: 0;
  border: 0;
  /* Logs wrap instead of running off the right edge. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Where a real screenshot goes once it is taken. */
.shot-slot {
  margin: 1.8em 0;
  padding: 22px 20px;
  border: 1.5px dashed var(--ink-3);
  background: var(--bg-2);
}
.shot-slot p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
}
.shot-what {
  font-weight: 640;
  color: var(--ink-2) !important;
}
.shot-file {
  margin-top: 6px !important;
}

/* ── case-study components ──────────────────────────────────────────────────
   Written as HTML inside the Markdown of a showcase. They share the map's
   vocabulary: solid ink = present and reached, dashed = present but nothing
   reaches it, a struck or cut line = removed, the hand-drawn X = a finding,
   an empty cell = not read. */

.x-mark {
  display: inline-block;
  flex: none;
  width: 18px;
  height: 18px;
  background-color: var(--mark);
  -webkit-mask: var(--x-mark) center / contain no-repeat;
  mask: var(--x-mark) center / contain no-repeat;
}

/* Every boxed figure in an article wears the map's double-ruled frame. */
.prose .findings,
.prose .run,
.prose .ledger,
.prose .pchart,
.prose .versus {
  margin-top: 1.8em;
  margin-bottom: 2em;
  border: 1px solid var(--ink);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--ink);
  background: var(--bg);
}

/* The three findings, as an index at the top of the page. */
.prose .findings {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  list-style: none;
}
.prose .findings li {
  margin: 0;
}
.prose .findings li + li {
  border-top: 1px dashed var(--ink-3);
}
@media (min-width: 760px) {
  .prose .findings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .prose .findings li + li {
    border-top: 0;
    border-left: 1px dashed var(--ink-3);
  }
}
.findings a {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 100%;
  padding: 20px 22px 22px;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s;
}
.findings a:hover {
  background: var(--bg-2);
}
.findings .x-mark {
  width: 20px;
  height: 20px;
}
.fd-t {
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.2;
  text-wrap: balance;
}
:lang(zh) .fd-t {
  font-family: var(--zh);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.45;
}
.findings a:hover .fd-t {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.fd-d {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* The run's particulars, then three figures from it. */
.run-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
}
.run-facts > div {
  padding: 14px 20px 15px;
  border-bottom: 1px solid var(--rule-2);
}
@media (min-width: 680px) {
  .run-facts {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .run-facts > div {
    grid-column: span 2;
  }
  .run-facts > .run-wide {
    grid-column: span 4;
  }
  .run-facts > div + div {
    border-left: 1px solid var(--rule-2);
  }
  .run-facts > div:nth-child(3) {
    border-left: 0;
  }
}
.run-facts dt {
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-3);
}
.run-facts dd {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.run-facts dd b {
  display: block;
  margin-bottom: 1px;
  font-size: 1.0625rem;
  font-weight: 620;
  color: var(--ink);
}
:lang(zh) .run-facts dd b {
  font-weight: 600;
}
/* Firmware: the two versions, old greyed, new in ink. */
.fw-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-top: 2px;
}
.fw {
  display: grid;
}
.prose .fw code {
  padding: 0;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.prose .fw:first-child code {
  color: var(--ink-3);
}
.fw small {
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.fw-arrow {
  color: var(--ink-3);
  font-family: var(--mono);
}
.prose .run-nums {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--bg-2);
}
.prose .run-nums li {
  margin: 0;
  padding: 16px 20px 18px;
}
.prose .run-nums li + li {
  border-top: 1px solid var(--rule);
}
@media (min-width: 680px) {
  .prose .run-nums {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .prose .run-nums li + li {
    border-top: 0;
    border-left: 1px solid var(--rule);
  }
}
.rn-n {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.5rem, 1.25rem + 0.8vw, 1.875rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.rn-of {
  font-size: 0.6em;
  letter-spacing: 0;
  color: var(--ink-3);
}
.rn-t {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* The coverage ledger: one cell per must-read item. */
.prose .ledger {
  padding: 20px 22px 18px;
}
/* Two-panel coverage ledger: the must-read layer (finished) beside the
   declared, unswept second tier. Not drawn to scale — they are different
   kinds of set (required vs. deferred tail), so each panel is a labelled
   tile, and the counts carry the proportion. */
.prose .ledger .lg-head {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 560;
  color: var(--ink-3);
}
.lg-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--rule);
}
@media (min-width: 620px) {
  .lg-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.lg-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px 20px 20px;
  background: var(--bg-2);
}
.lg-panel + .lg-panel {
  border-top: 1px solid var(--rule);
}
@media (min-width: 620px) {
  .lg-panel + .lg-panel {
    border-top: 0;
    border-left: 1px solid var(--rule);
  }
}
.lg-panel .lg-n {
  font-family: var(--mono);
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.lg-panel .lg-of {
  font-size: 0.5em;
  letter-spacing: 0;
  color: var(--ink-3);
}
.lg-cap {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.lg-cap b {
  font-weight: 700;
}
/* The status bar: solid ink when the layer is done, a hollow hatch when deferred. */
.lg-bar {
  height: 10px;
  margin-top: 4px;
}
.lg-panel.is-done .lg-bar {
  background: var(--ink);
}
.lg-panel.is-tail .lg-bar {
  background: repeating-linear-gradient(135deg, var(--ink-3) 0 1.5px, transparent 1.5px 6px);
  border: 1px solid var(--rule-2);
}
.lg-panel.is-done .lg-cap b {
  color: var(--ink);
}
.prose .lg-key {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 32px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.prose .lg-key li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}
.lg-key .lg-n {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.prose .lg-key .lg-total {
  margin-left: auto;
  color: var(--ink-3);
}
.lg-swatch {
  flex: none;
  align-self: center;
  width: 12px;
  height: 12px;
  border: 1px solid var(--ink-3);
}
.lg-swatch.is-on {
  border-color: var(--ink);
  background: var(--ink);
}
.lg-svg {
  width: 100%;
  height: auto;
}
.lg-on {
  fill: var(--ink);
}
.lg-off {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 0.8;
  opacity: 0.6;
}
/* Phones get the same 2376 cells in a coarser grid (44 wide), so they stay cells. */
.lg-svg-narrow {
  display: none;
}
@media (max-width: 640px) {
  .lg-svg-wide {
    display: none;
  }
  .lg-svg-narrow {
    display: block;
  }
  .prose .lg-key .lg-total {
    width: 100%;
    margin-left: 0;
  }
}
.prose .ledger figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* What the patch did, drawn as two columns: the old version and the new. */
.pc-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 600px) {
  .pc-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.pc-col {
  min-width: 0;
  padding: 16px 22px 22px;
}
.pc-col + .pc-col {
  border-top: 1px dashed var(--ink-3);
}
@media (min-width: 600px) {
  .pc-col + .pc-col {
    border-top: 0;
    border-left: 1px dashed var(--ink-3);
  }
}
.pc-ver {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-2);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}
.pc-col:last-child .pc-ver,
.pc-merge .pc-ver {
  color: var(--ink);
}
.prose .pc-chain {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, 340px);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.prose .pc-chain li + li {
  margin-top: 0;
}
.pc-n {
  position: relative;
  max-width: 100%;
  padding: 8px 12px 9px;
  border: 1px solid var(--ink);
  background: var(--bg);
  font-size: 14px;
  font-weight: 560;
  line-height: 1.4;
  color: var(--ink);
}
:lang(zh) .pc-n {
  font-weight: 500;
}
.pc-n small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-3);
}
:lang(zh) .pc-n small {
  font-size: 13px;
}
.prose .pc-n code {
  padding: 0;
  background: none;
  font-size: 0.95em;
}
/* Present, but nothing calls it. */
.pc-n.is-idle {
  border-style: dashed;
  color: var(--ink-2);
}
/* The finding: the box is drawn heavier and its title carries the X. */
.pc-n.is-hit {
  border-width: 2px;
  padding: 7px 11px 8px;
}
.pc-n > .x-mark {
  width: 14px;
  height: 14px;
  margin-right: 7px;
  vertical-align: -1px;
}
.pc-e {
  position: relative;
  min-height: 38px;
  margin-left: 18px;
  padding: 8px 0 12px 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-3);
}
.pc-e::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 6px;
  width: 1.5px;
  background: var(--ink);
}
.pc-e::after {
  content: "";
  position: absolute;
  left: -4.25px;
  bottom: 0;
  border: 5px solid transparent;
  border-top: 7px solid var(--ink);
  border-bottom: 0;
}
.pc-e.is-idle::before {
  background: repeating-linear-gradient(180deg, var(--ink-3) 0 4px, transparent 4px 7px);
}
.pc-e.is-idle::after {
  border-top-color: var(--ink-3);
}
/* The step this version added. */
.pc-e.is-new {
  font-weight: 600;
  color: var(--ink);
}
.pc-e.is-new::before {
  left: -1px;
  width: 3.5px;
}
/* A branch that was deleted: a stub of line, then the cut. */
.pc-e.is-cut::before {
  bottom: auto;
  height: 12px;
}
.pc-e.is-cut::after {
  top: 12px;
  bottom: auto;
  left: -6px;
  width: 13.5px;
  height: 2px;
  border: 0;
  background: var(--ink);
}
.pc-e.is-cut {
  min-height: 44px;
  padding-top: 6px;
  color: var(--ink-2);
}
.pc-e > .x-mark {
  width: 15px;
  height: 15px;
  margin-right: 6px;
  vertical-align: -2px;
}
/* One version, two ways in, one destination. */
.pc-merge {
  padding: 16px 22px 22px;
}
.pc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  max-width: 600px;
  margin-inline: auto;
}
.pc-grid > .pc-n {
  justify-self: start;
}
.pc-grid > .pc-dst {
  grid-column: 1 / -1;
  justify-self: stretch;
}
.prose .pchart figcaption,
.prose .versus + p.vs-note {
  margin: 0;
  padding: 12px 22px 14px;
  border-top: 1px solid var(--rule-2);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-3);
}
.prose .pc-merge figcaption {
  margin: 18px -22px -22px;
}

/* A heading for a finding carries the X. */
.prose .finding-h {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.prose .finding-h > .x-mark {
  width: 0.82em;
  height: 0.82em;
  transform: translateY(0.06em);
}

/* With and without: an open ring for the guess, a filled dot for the fact. */
.prose .versus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.versus p {
  margin: 0;
  padding: 13px 20px 14px 44px;
  position: relative;
  font-size: 15px;
  line-height: 1.55;
  border-top: 1px solid var(--rule-2);
}
.versus p:nth-child(even) {
  border-left: 1px solid var(--ink);
  color: var(--ink);
}
.versus p:nth-child(odd) {
  color: var(--ink-2);
}
.versus p::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 1.15em;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-3);
}
.versus p:nth-child(even)::before {
  border-color: var(--ink);
  background: var(--ink);
}
.versus .vs-h {
  padding-block: 12px;
  border-top: 0;
  border-bottom: 1px solid var(--ink);
  font-size: 13.5px;
  font-weight: 640;
  color: var(--ink);
}
.versus .vs-h + .vs-h + p,
.versus .vs-h + .vs-h + p + p {
  border-top: 0;
}
@media (max-width: 560px) {
  .versus p {
    padding: 11px 12px 12px 32px;
    font-size: 14px;
  }
  .versus p::before {
    left: 12px;
  }
}

/* Blind spots: the dashed ring with a question mark, as everywhere on the site. */
.prose .blind {
  padding: 0;
  list-style: none;
}
.prose .blind li {
  position: relative;
  padding-left: 34px;
}
.prose .blind li + li {
  margin-top: 0.7em;
}
.prose .blind li::before {
  content: "?";
  position: absolute;
  left: 0;
  top: 0.3em;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px dashed var(--ink);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
}

/* ── principles ─────────────────────────────────────────────────────────── */
.why-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px clamp(24px, 3vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Four questions: two by two, so each answer gets a comfortable line length. */
@media (min-width: 760px) {
  .why-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px clamp(32px, 5vw, 72px);
  }
}
.why-sym svg {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  overflow: visible;
}
.u-ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-dasharray: 4 3.2;
}
.why-sym-unknown text {
  fill: var(--ink);
  font-family: var(--display);
  font-size: 22px;
}
.l-trail {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-dasharray: 3.5 3;
  stroke-linecap: round;
}
.l-x {
  fill: none;
  stroke: var(--mark);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.n-sheet {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-dasharray: 3 2.5;
}
.n-top {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-dasharray: none;
}
.n-line {
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-linecap: round;
}
.t-root {
  fill: var(--ink);
}
.t-edge {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-dasharray: 3 2.6;
}
.t-kid {
  stroke-width: 1.4;
}
.d-mark {
  stroke: var(--mark);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.why-item h3 {
  font-size: var(--fs-md);
}
.why-item p {
  max-width: 60ch;
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 15.5px;
}
.why-item code {
  white-space: nowrap;
}
.why-outro {
  max-width: 62ch;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: var(--fs-md);
  line-height: 1.55;
  text-wrap: balance;
}
:lang(zh) .why-outro {
  max-width: 40em;
}
/* Developer preview: a quiet ruled note under the Quick start heading. */
.preview-note {
  max-width: 72ch;
  margin-top: 14px;
  padding-left: 14px;
  border-left: 2px solid var(--ink);
  font-size: 15px;
  color: var(--ink-2);
}
.preview-note b {
  color: var(--ink);
  font-weight: 640;
}

/* ── code blocks ────────────────────────────────────────────────────────── */
.codeblock {
  position: relative;
}
.codeblock pre {
  margin: 0;
  padding: 14px 80px 14px 16px;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  color: var(--code-ink);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
}
.codeblock .ln {
  display: block;
}
/* Wrap at spaces first, so a URL moves to the next line whole instead of
   splitting as "instal / l.sh"; only a token wider than the line breaks inside. */
.codeblock-wrap pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.codeblock-wrap .ln {
  padding-left: 1.3em;
  text-indent: -1.3em;
}
.codeblock .prompt {
  color: var(--code-dim);
  user-select: none;
}
.codeblock-prompt pre {
  background: var(--bg);
  color: var(--ink);
  border: 1.5px dashed var(--ink);
  font-style: italic;
  white-space: pre-wrap;
}
/* The Chinese prompts are Chinese prose: CJK has no real italic, and in the mono
   stack the Chinese falls back to a small, thin face. Set them in the page's own
   Chinese family at reading size. */
:lang(zh) .codeblock-prompt pre,
:lang(zh) .codeblock-prompt pre code {
  font-family: var(--zh);
  font-style: normal;
  font-size: 14.5px;
  line-height: 1.85;
}
.codeblock-prompt pre {
  line-height: 1.75;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--code-ink) 40%, transparent);
  background: var(--code-bg);
  box-shadow: -10px 0 10px -2px var(--code-bg);
  color: var(--code-ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 560;
  cursor: pointer;
}
:lang(zh) .copy-btn {
  font-family: var(--zh);
}
.copy-btn:hover {
  background: color-mix(in srgb, var(--code-ink) 14%, var(--code-bg));
}
.copy-btn:focus-visible {
  outline-color: var(--code-ink);
}
.codeblock-prompt .copy-btn,
.prose pre .copy-btn {
  border-color: var(--ink);
  background: var(--bg);
  box-shadow: -10px 0 10px -2px var(--bg);
  color: var(--ink);
}
.prose pre .copy-btn {
  background: var(--bg-2);
  box-shadow: -10px 0 10px -2px var(--bg-2);
}
.codeblock-prompt .copy-btn:hover,
.prose pre .copy-btn:hover {
  background: var(--bg-3);
}
.codeblock-prompt .copy-btn:focus-visible,
.prose pre .copy-btn:focus-visible {
  outline-color: var(--ink);
}
.no-js .copy-btn {
  display: none;
}
@media (max-width: 640px) {
  .codeblock pre {
    font-size: 12.5px;
    padding-right: 72px;
  }
}

/* ── quick start ────────────────────────────────────────────────────────── */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px clamp(28px, 4vw, 56px);
  padding-block: 26px;
  border-top: 1px solid var(--rule);
}
@media (min-width: 960px) {
  .step {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}
.step h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-lg);
}
.step-n {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
}
:lang(zh) .step-n {
  font-family: var(--zh);
  font-weight: 600;
}
.step-text p {
  margin-top: 10px;
  color: var(--ink-2);
  max-width: 54ch;
}
.step-code {
  min-width: 0;
}
.prompt-label {
  margin: 16px 0 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-2);
}
/* The rule runs the full width like the step rules above it; the text keeps its measure. */
.start-after {
  padding-top: 22px;
  padding-right: max(0px, calc(100% - 88ch));
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 15.5px;
}
.start-after p + p {
  margin-top: 10px;
}

/* ── install details ────────────────────────────────────────────────────── */
/* A spec sheet: one full-width row per subject, the label in a left margin and
   the content beside it. Every row sits under the same rule and every item uses
   the same pattern (name, value, note), so the four subjects read as one table. */
.spec {
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.spec-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 24px 0 28px;
}
.spec-row + .spec-row {
  border-top: 1px solid var(--rule);
}
@media (min-width: 900px) {
  .spec-row {
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: 40px;
    padding: 30px 0 34px;
  }
}
.spec-k {
  font-size: var(--fs-md);
  line-height: 1.3;
}
.spec-v {
  min-width: 0;
}
.spec-text {
  max-width: 72ch;
  color: var(--ink-2);
  font-size: 15.5px;
}
.spec-text + .spec-text {
  margin-top: 10px;
}
/* A flag such as --dry-run never splits at its hyphens. */
.spec-text code,
.cmds dd code {
  white-space: nowrap;
}
:lang(zh) .spec-text {
  max-width: 46em;
}

/* Platforms: two by two. */
.plat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) {
  .plat {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.plat li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 3px 12px;
  /* Centred, not baseline: the "?" glyph gives the unknown mark a baseline the
     plain marks lack, which would drop its row out of line with the others. */
  align-items: center;
  /* Packed at the top: beside a neighbour with a two-line note, an item would
     otherwise be stretched and its name and note pushed apart. */
  align-content: start;
}
.plat-name {
  font-weight: 600;
  font-size: 15.5px;
}
.plat-state {
  grid-column: 2;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* Setup: three steps in a row, joined by arrows: pinned source → checked → your go-ahead. */
.setup-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.setup-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 3px 12px;
  align-content: start;
}
.sf-n {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-size: 12.5px;
  font-weight: 640;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.sf-name {
  align-self: center;
  font-weight: 640;
  font-size: 15.5px;
}
.sf-note {
  grid-column: 2;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}
.sf-note code {
  white-space: nowrap;
}
@media (min-width: 760px) {
  .setup-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }
  .setup-flow li {
    padding-right: 44px;
  }
  /* No arrow after the last step, so no room kept for one. */
  .setup-flow li:last-child {
    padding-right: 0;
  }
  /* The arrow to the next step sits level with the step's number. */
  .setup-flow li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 11.5px;
    right: 10px;
    width: 22px;
    height: 1.5px;
    background: var(--ink);
  }
  .setup-flow li:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 8px;
    right: 9px;
    width: 7px;
    height: 7px;
    border-top: 1.5px solid var(--ink);
    border-right: 1.5px solid var(--ink);
    transform: rotate(45deg);
  }
}
.setup-note {
  margin-top: 20px;
  font-size: 14.5px;
}

/* Upkeep: two columns of command + what it does. */
.cmds {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px 32px;
  margin: 0;
}
@media (min-width: 700px) {
  .cmds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.cmds > div {
  display: grid;
  gap: 4px;
  align-content: start;
}
.cmds dt code {
  font-size: 13px;
  font-weight: 560;
  color: var(--ink);
}
.cmds dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ── tables (articles render markdown tables with these) ─────────────────── */
.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
th,
td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--rule-2);
  text-align: left;
  vertical-align: top;
}
thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  border-bottom-color: var(--ink);
}
tbody th {
  font-weight: 620;
  white-space: nowrap;
}
td {
  color: var(--ink-2);
}

/* ── article lists ──────────────────────────────────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px clamp(28px, 4vw, 56px);
}
@media (min-width: 900px) {
  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.art-col h2 {
  font-size: var(--fs-xl);
}
.art-col h2 a {
  text-decoration: none;
}
.art-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.art-list a {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}
.art-title {
  font-size: var(--fs-md);
  font-weight: 620;
  line-height: 1.3;
}
.art-list a:hover .art-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.art-desc {
  color: var(--ink-2);
  font-size: 15.5px;
}
.art-list time {
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.list-page {
  padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 104px);
}
.list-head h1 {
  font-size: var(--fs-2xl);
}
.art-list-full {
  margin-top: 40px;
  max-width: 820px;
}
.empty {
  margin-top: 32px;
  color: var(--ink-3);
}

/* ── intended use ───────────────────────────────────────────────────────── */
.sec-use h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}
:lang(zh) .sec-use h2 {
  font-size: var(--fs-lg);
}
.sec-use p {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 88ch;
}
.sec-use p + p {
  margin-top: 10px;
}

/* ── footer ─────────────────────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--ink);
  box-shadow: inset 0 3px 0 var(--bg), inset 0 4px 0 var(--ink);
}
.site-foot-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px 40px;
  padding-block: 44px 44px;
}
@media (min-width: 820px) {
  .site-foot-in {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}
.foot-preview {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--ink-3);
  max-width: 52ch;
}
.foot-links {
  display: grid;
  align-content: start;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
}
.foot-links a {
  color: var(--ink-2);
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.foot-legal {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-3);
}

/* ── article page ───────────────────────────────────────────────────────── */
.art-head {
  padding-block: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 40px);
}
.art-crumb {
  font-size: var(--fs-sm);
  font-weight: 560;
}
.art-crumb a {
  color: var(--ink-2);
  text-decoration: none;
}
.art-crumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.art-head h1 {
  margin-top: 14px;
  font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem);
  max-width: 26ch;
}
/* A touch smaller on phones, so a first clause like "CVE-2021-26614“已修复”，"
   fits one line instead of splitting. */
:lang(zh) .art-head h1 {
  font-size: clamp(1.6rem, 0.95rem + 2.6vw, 3.25rem);
  font-weight: 700;
  max-width: 18em;
}
.art-lede {
  margin-top: 18px;
  font-size: var(--fs-md);
  color: var(--ink-2);
  max-width: 62ch;
}
.art-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.art-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 40px;
}
@media (min-width: 1100px) {
  .has-toc .art-grid {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 64px;
  }
}
.art-toc {
  display: none;
  font-size: 13.5px;
}
@media (min-width: 1100px) {
  .art-toc {
    display: block;
    position: sticky;
    top: calc(var(--head-h) + 24px);
    align-self: start;
    max-height: calc(100vh - var(--head-h) - 48px);
    overflow-y: auto;
  }
}
.toc-title {
  font-weight: 640;
  margin-bottom: 10px;
}
.art-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--rule);
}
.art-toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.4;
}
.art-toc .toc-l3 a {
  padding-left: 26px;
  font-size: 13px;
}
.art-toc a:hover {
  color: var(--ink);
}
.art-toc a.is-active {
  color: var(--ink);
  border-left-color: var(--ink);
}
.art-foot {
  padding-bottom: clamp(56px, 8vw, 96px);
}
.art-foot a {
  font-size: var(--fs-sm);
  font-weight: 560;
}

/* Long-form text.
   Text keeps a reading measure; figures, code and logs (and anything marked
   .wide) may run the full width of the column. The two widths are set in rem
   so a heading's larger font does not stretch its measure. */
.prose {
  --measure: 43rem;
  --wide: 60rem;
  font-size: 1.09375rem;
  line-height: 1.72;
}
:lang(zh) .prose {
  --measure: 43.75rem;
  line-height: 1.85;
}
.prose > * {
  max-width: var(--measure);
}
.prose > .wide,
.prose > pre,
.prose > details,
.prose > h2 {
  max-width: var(--wide);
}
.prose > * + * {
  margin-top: 1.1em;
}
/* Sections are joined by the same dashed trail as the home page. */
.prose h2 {
  margin-top: 3.4rem;
  padding-top: 2.4rem;
  background-image: linear-gradient(90deg, transparent 4px, color-mix(in srgb, var(--ink) 50%, transparent) 4px 13px, transparent 13px);
  background-position: left top;
  background-size: 17px 1.5px;
  background-repeat: round no-repeat;
  font-size: 2.125rem;
}
:lang(zh) .prose h2 {
  font-size: 1.625rem;
}
.prose h3 {
  margin-top: 2.2rem;
  font-size: 1.3125rem;
}
.prose h2 + *,
.prose h3 + * {
  margin-top: 0.8em;
}
/* An article that opens on a heading needs no trail above it. */
.prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  background: none;
}
.prose h2 a,
.prose h3 a {
  text-decoration: none;
}
.prose h2 a:hover::after,
.prose h3 a:hover::after {
  content: " #";
  color: var(--ink-3);
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 0.35em;
}
.prose li::marker {
  color: var(--ink-3);
}
.prose :not(pre) > code {
  padding: 0.1em 0.35em;
  background: var(--bg-2);
  font-size: 0.86em;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--ink);
  font-size: 1.14em;
  line-height: 1.62;
  color: var(--ink);
}
.prose hr {
  border: 0;
  height: 1.5px;
  margin-block: 2.4em;
  background-image: var(--trail);
  background-size: 17px 100%;
  background-repeat: round no-repeat;
  opacity: 0.5;
}
.prose img {
  height: auto;
  border: 1px solid var(--rule);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .prose img {
    filter: brightness(0.86);
  }
}
:root[data-theme="dark"] .prose img {
  filter: brightness(0.86);
}
.prose figure {
  margin-inline: 0;
}
.prose figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.prose table {
  font-size: 15px;
}
.prose .table-wrap {
  margin-top: 1.2em;
}
.prose pre[class*="language-"],
.prose pre {
  position: relative;
  margin-top: 1.3em;
  padding: 16px 18px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
  tab-size: 4;
}
/* Code tokens in black and grey only: structure by weight, comments by grey italic. */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: var(--ink-3);
  font-style: italic;
}
.token.keyword,
.token.selector,
.token.important,
.token.atrule,
.token.function,
.token.class-name {
  font-weight: 600;
}
.token.punctuation,
.token.operator {
  color: var(--ink-3);
}
/* In shell, Prism marks known command names ("diff", "cat") as functions; bolding
   them made "tmap diff" look different from "tmap scan". Keep commands plain. */
.language-bash .token.function,
.language-shell .token.function,
.language-sh .token.function {
  font-weight: inherit;
}
.token.deleted {
  text-decoration: line-through;
}

/* 404 */
.nf {
  padding-block: clamp(64px, 10vw, 140px);
  max-width: 720px;
}
.nf h1 {
  font-size: var(--fs-xl);
}
.nf p {
  margin-top: 14px;
  color: var(--ink-2);
}
.nf-zh {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--zh);
}
.nf-zh h2 {
  font-family: var(--zh);
  font-weight: 600;
  font-size: var(--fs-lg);
}

/* ── one load moment: the diagram's arrows draw in the order data flows ── */
@media (prefers-reduced-motion: no-preference) {
  .js .arch .edge-line,
  .js .arch .node-atlas::after,
  .js .arch .rel-down .rel-arrow,
  .js .arch .flow-arrow {
    transform-origin: top center;
    animation: draw-y 0.5s cubic-bezier(0.3, 0.6, 0.2, 1) both;
  }
  .js .arch .rel-down .rel-arrow {
    animation-delay: 0.5s;
  }
  .js .arch .edge-1 .edge-line {
    animation-delay: 0.15s;
  }
  .js .arch .edge-2 .edge-line {
    animation-delay: 0.3s;
  }
  .js .arch .node-atlas::after {
    animation-delay: 0.7s;
  }
  .js .arch .flow-down .flow-arrow {
    animation-delay: 0.9s;
  }
  .js .arch .flow-up .flow-arrow {
    transform-origin: bottom center;
    animation-delay: 1.15s;
  }
  .cand-row {
    transition: transform 0.28s cubic-bezier(0.3, 0.6, 0.2, 1);
  }
}
/* The narrowing chart: what each step carries on fills in after the rest is laid out. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .cv-stage[data-reveal] .cv-on {
    opacity: 0;
    transform: scale(0.2);
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity 0.3s ease-out, transform 0.55s cubic-bezier(0.3, 1.6, 0.5, 1);
  }
  .reveal-ready .cv-stage[data-reveal] .cv-hit {
    opacity: 0;
    transition: opacity 0.35s ease-out;
  }
  .reveal-ready .cv-stage.is-in .cv-on {
    opacity: 1;
    transform: none;
  }
  /* The X is placed by its own transform attribute: fade it only, never transform it. */
  .reveal-ready .cv-stage.is-in .cv-hit {
    opacity: 1;
  }
  .reveal-ready .cv-stage-1.is-in .cv-on {
    transition-delay: 0.15s;
  }
  .reveal-ready .cv-stage-2.is-in .cv-on {
    transition-delay: 0.55s;
  }
  .reveal-ready .cv-stage-3.is-in .cv-hit {
    transition-delay: 0.95s;
  }
}
@keyframes draw {
  from {
    transform: scaleX(0);
  }
}
@keyframes draw-y {
  from {
    transform: scaleY(0);
  }
}

@media print {
  .site-head,
  .site-foot,
  .copy-btn,
  .art-toc {
    display: none;
  }
}
