/* Round 10 · 白底图解, made quieter in round 11: the shell around every page.
   A top bar with the four places and search in the middle; a sidebar that is always there on wide screens,
   with three views of the same notes (Topics, Recent, Saved) and four marks on each note; the note in the
   middle; its contents on the right. Loaded last, so these rules win over the older layers they replace.
   One colour: the tokens in style.css and the blue accent. No card shadows: hairlines separate things. */

:root {
  --top-h: 60px;
  --side-w: 268px;
  --rail-w: 232px;
  --side-bg: #EEEAE1;
  --side-hover: #E5E0D4;
  --star: #E2A100;
  --good: #1E9A69;
  --radius-card: 12px;
  --site-header-height: var(--top-h);
}
:root[data-theme="dark"] {
  --side-bg: #15171B;
  --side-hover: rgba(255, 255, 255, .05);
  --star: #F4C553;
  --good: #3FCB91;
}
:root:root body { background: var(--paper); }
:root:root .reading-progress { display: none; }

/* ---------------------------------------------------------------- top bar */
:root:root .topbar {
  display: flex; align-items: center;          /* the search field takes the free middle (the older layers made this a grid) */
  height: var(--top-h); gap: 20px; padding: 0 20px 0 22px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--rule);
}
:root:root .topbar-brand { display: inline-flex; align-items: center; gap: 10px; min-width: calc(var(--side-w) - 42px); color: var(--ink); font-size: 15.5px; font-weight: 600; }
:root:root .topbar-brand svg { width: 26px; height: 26px; padding: 4px; border-radius: 8px; background: var(--ember); color: #fff; }
:root:root .topbar-brand .brand-short { display: none; }
:root:root .topbar .topbar-tabs { display: flex; flex: none; align-self: center; align-items: center; height: auto; gap: 2px; margin: 0; padding: 0; border: 0; background: none; }
:root:root .topbar .topbar-tabs a {
  display: inline-flex; align-items: center; height: 34px; padding: 0 11px; border-radius: 8px;
  color: var(--muted); font: 400 14px/1 var(--body); text-decoration: none; border: 0; background: none;
}
:root:root .topbar .topbar-tabs a:hover { color: var(--ink); background: var(--side-hover); }
:root:root .topbar .topbar-tabs a.active { color: var(--ink); background: var(--side-hover); font-weight: 500; }
:root:root .topbar .topbar-tabs a::after, :root:root .topbar .topbar-tabs a::before { display: none; }
:root:root .topbar-right { flex: 1; min-width: 0; gap: 6px; }
:root:root .topbar .search-toggle:not([hidden]) {
  display: flex; align-items: center; gap: 10px; flex: 0 1 440px; width: auto; min-width: 0; height: 38px; padding: 0 12px; margin: 0 auto;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); color: var(--muted);
  font: 400 14px/1 var(--body); cursor: text;
}
:root:root .topbar .search-toggle:hover { border-color: color-mix(in srgb, var(--ember) 45%, var(--rule)); background: var(--paper); color: var(--ink-soft); }
:root:root .topbar .search-toggle .search-label { display: inline; flex: 1; text-align: left; }
:root:root .topbar .search-toggle kbd { font: 12px var(--mono); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--rule); color: var(--faint); background: none; }
:root:root .topbar .icon-btn { width: 36px; height: 36px; border-radius: 9px; color: var(--muted); }
:root:root .topbar .icon-btn:hover { color: var(--ink); background: var(--side-hover); }
:root:root .topbar .icon-btn.menu { display: none; }

/* ---------------------------------------------------------------- the three columns */
:root:root .shell {
  display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--rail-w);
  gap: 0; max-width: none; margin: 0; padding: 0; align-items: start;
}
:root:root .shell > .side { grid-column: 1; grid-row: 1; }
:root:root .shell > main { grid-column: 2; grid-row: 1; min-width: 0; padding: 30px 56px 0 64px; }
:root:root .shell > .rail { grid-column: 3; grid-row: 1; display: block; position: sticky; top: var(--top-h); width: auto; padding: 34px 20px 24px 8px; }
:root:root .shell > .side-open { display: none !important; }
:root:root .page-reading article.prose, :root:root article.prose { max-width: 720px; margin-inline: auto; }
:root:root .page-reading .mobile-toc { display: none; }

/* ---------------------------------------------------------------- sidebar */
:root:root .side {
  position: sticky; top: var(--top-h); z-index: 30; display: flex; flex-direction: column;
  width: var(--side-w); height: calc(100dvh - var(--top-h)); padding: 14px 12px 10px;
  overflow: hidden; transform: none; mask-image: none;
  background: var(--side-bg); border-right: 1px solid var(--rule);
  --ink: var(--ink); --link: var(--ink-soft);
}
:root:root .side .side-primary { display: none; }
:root:root .side .side-nav { display: flex; flex-direction: column; min-height: 0; flex: 1; margin: 0; }
:root:root .side .side-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 0 12px; scrollbar-width: thin; }
:root:root .side-scrim { display: none !important; }

.lib-views { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--side-hover); flex: none; }
.lib-views button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0;
  border: 0; border-radius: 7px; background: none; color: var(--muted); font: 400 13px/1 var(--body); cursor: pointer;
}
.lib-views button svg { flex: none; }
.lib-views button:hover { color: var(--ink); }
.lib-views button[aria-selected="true"] { background: var(--paper); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--rule); }
.lib-views button:focus-visible { outline: 2px solid var(--ember); outline-offset: 1px; }
.lib-panel[hidden] { display: none; }
.lib-panel { padding-top: 10px; }

.lib-tree, .lib-tree ul { list-style: none; margin: 0; padding: 0; }
.lib-tree summary { list-style: none; cursor: pointer; }
.lib-tree summary::-webkit-details-marker { display: none; }
.lib-topic > details > summary {
  display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 4px 10px 4px 24px; border-radius: 8px;
  position: relative; color: var(--ink-soft); font-size: 14px;
}
.lib-topic > details[open] > summary { color: var(--ink); font-weight: 500; }
.lib-tree summary::before {
  content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -4px;
  border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(-45deg); transition: transform .12s ease;
}
.lib-tree details[open] > summary::before { transform: rotate(45deg); margin-top: -5px; }
.lib-tree summary:hover { background: var(--side-hover); }
.lib-tree summary:focus-visible, .lib-tree a:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }
.lib-name { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.lib-topic-link { display: block; color: inherit; text-decoration: none; }
.lib-topic-link:hover { color: var(--ember); }
.lib-topic-link[aria-current] { color: var(--ember); }
.lib-count { flex: none; color: var(--faint); font: 12px var(--mono); }
.lib-groups { margin: 2px 0 6px !important; }
.lib-group > summary {
  display: flex; align-items: center; gap: 8px; min-height: 30px; margin-left: 14px; padding: 4px 10px 4px 24px; border-radius: 8px;
  position: relative; color: var(--muted); font-size: 13px;
}
.lib-group[open] > summary { color: var(--ink-soft); }
.lib-group > summary::before { left: 10px; }
.lib-notes { margin: 0 0 4px !important; }
.lib-notes a, .lib-item {
  display: flex; align-items: center; gap: 9px; min-height: 30px; margin-left: 28px; padding: 5px 10px; border-radius: 8px;
  color: var(--ink-soft); font-size: 13.5px; line-height: 1.35; text-decoration: none;
}
.lib-notes a:hover, .lib-item:hover { background: var(--side-hover); color: var(--ink); }
.lib-notes a.active, .lib-item.is-here { background: var(--ember-bg); color: var(--ink); font-weight: 500; }
.lib-notes .drawer-name { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.lib-notes .stop-n { display: none; }
.side-measure { display: none; }
@media (min-width: 1081px) {
  .side-measure:not([hidden]) {
    display: grid; flex: none; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px;
    margin: 6px 4px 0; padding: 8px 0 0; border-top: 1px solid var(--rule);
    color: var(--muted); font-size: 12px;
  }
  .side-measure input { grid-column: 1 / -1; grid-row: 2; width: min(180px, 100%); height: 24px; margin: 0; accent-color: var(--ink-soft); }
  .side-measure button { grid-column: 2; grid-row: 1; min-height: 24px; padding: 0 4px; font: inherit; color: inherit; background: none; border: 0; text-decoration: underline; cursor: pointer; }
  .side-measure :is(input, button):focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
  :root:root .shell > main { padding-inline: clamp(28px, 3.5vw, 64px) clamp(24px, 3vw, 56px); }
}
.lib-notes a.is-done:not(.active) { color: var(--muted); }

/* ---------------------------------------------------------------- the four marks (library.js sets the classes) */
.lib-mark { flex: none; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; }
.is-half > .lib-mark { background: conic-gradient(var(--ember) calc(var(--p, .5) * 1turn), var(--rule) 0); -webkit-mask: radial-gradient(circle, transparent 3.6px, #000 4px); mask: radial-gradient(circle, transparent 3.6px, #000 4px); }
.is-done > .lib-mark::before { content: ""; width: 8px; height: 4.5px; margin-top: -2px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.lib-flags { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.is-new > .lib-flags::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); }
.is-saved > .lib-flags::after {
  content: ""; width: 13px; height: 13px; background: var(--star);
  clip-path: polygon(50% 4%, 61.5% 36%, 96% 37%, 69% 58%, 79% 92%, 50% 72%, 21% 92%, 31% 58%, 4% 37%, 38.5% 36%);
}

/* Recent and Saved, drawn by library.js */
.lib-section { margin: 12px 10px 2px; color: var(--faint); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.lib-item { margin-left: 0; align-items: flex-start; }
.lib-item .lib-mark { margin-top: 3px; }
.lib-item-text { flex: 1; min-width: 0; }
.lib-item-text strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: inherit; }
.side .lib-item-text strong { white-space: normal; overflow-wrap: anywhere; }
.lib-item-text small { display: flex; align-items: center; gap: 5px; margin-top: 1px; color: var(--faint); font-size: 11.5px; }
.lib-item time { flex: none; color: var(--faint); font-size: 11.5px; margin-top: 2px; }
.lib-empty { margin: 14px 10px; padding: 12px; border: 1px dashed var(--rule); border-radius: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.lib-empty[hidden] { display: none; }

/* ---------------------------------------------------------------- a note's head */
:root:root .page-reading .prose .article-head { margin: 0 0 6px; padding: 0 0 20px; border-bottom: 1px solid var(--rule); }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ember); }
.crumb-sep { color: var(--faint); }
:root:root .page-reading .prose .article-head h1 { margin: 14px 0 0; font-size: 36px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; }
:root:root .page-reading:lang(zh) .prose .article-head h1 { line-height: 1.32; }
.head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 16px; color: var(--muted); font-size: 13.5px; }
.head-meta .note-tools { display: flex; align-items: center; gap: 12px; margin: 0 0 0 auto; padding: 0; border: 0; }
.head-meta .note-tools[hidden] { display: none; }
.read-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.read-state .lib-mark { width: 14px; height: 14px; }
.head-meta [data-side-save] {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink-soft); font: 400 13px/1 var(--body); cursor: pointer;
}
.head-meta [data-side-save]::before {
  content: ""; width: 13px; height: 13px; background: var(--rule);
  clip-path: polygon(50% 4%, 61.5% 36%, 96% 37%, 69% 58%, 79% 92%, 50% 72%, 21% 92%, 31% 58%, 4% 37%, 38.5% 36%);
}
.head-meta [data-side-save][aria-pressed="true"]::before { background: var(--star); }
.head-meta [data-side-save]:hover { border-color: color-mix(in srgb, var(--star) 50%, var(--rule)); color: var(--ink); }
.head-meta .note-tool-status:empty { display: none; }
.head-meta .note-resume { font-size: 13px; }

/* ---------------------------------------------------------------- the end of a note */
:root:root .page-turn-context a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); text-decoration: none; }
:root:root .page-turn-context a span { color: var(--muted); }

/* ---------------------------------------------------------------- the contents rail */
:root:root .rail .rail-title { display: block; margin: 0 0 10px; color: var(--faint); font: 400 12px/1.5 var(--body); text-transform: none; letter-spacing: 0; }
:root:root .rail .toc ul { border-left: 1px solid var(--rule); margin: 0; padding: 0; }
:root:root .rail .toc li a { display: block; margin-left: -1px; padding: 5px 0 5px 12px; border-left: 2px solid transparent; color: var(--muted); font-size: 13px; line-height: 1.5; font-weight: 400; text-decoration: none; }
:root:root .rail .toc li a:hover { color: var(--ink); }
:root:root .rail .toc li a.active { color: var(--ink); border-left-color: var(--ember); font-weight: 500; }

/* ---------------------------------------------------------------- topic pages */
.topic-index { margin-top: 18px; }
.topic-progress { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.topic-progress[hidden] { display: none; }
.topic-bar { width: 240px; height: 6px; border-radius: 3px; background: var(--side-hover); overflow: hidden; }
.topic-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--ember); border-radius: 3px; }
.topic-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.topic-filters { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.topic-filters button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink-soft); font: 400 13px/1 var(--body); cursor: pointer;
}
.topic-filters button[aria-pressed="true"] { border-color: var(--ember); background: var(--ember-bg); color: var(--ember); }
.topic-sort select {
  height: 32px; padding: 0 30px 0 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper);
  color: var(--ink-soft); font: 400 13px/1 var(--body); cursor: pointer;
}
:root:root .page-reading .prose .topic-group h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 30px 0 4px; font-size: 18px; }
.topic-group h2 span { color: var(--faint); font-size: 13px; font-weight: 400; }
:root:root .prose .topic-group-line { margin: 0 0 12px; max-width: 46em; color: var(--muted); font-size: 14px; line-height: 1.6; }
:root:root .prose .topic-rows { list-style: none; margin: 0; padding: 0; }
:root:root .prose .topic-row {
  display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto 16px; align-items: center; gap: 14px;
  margin: 0; padding: 11px 10px; border-top: 1px solid var(--rule); border-radius: 0;
}
:root:root .prose .topic-row::marker { content: none; }
.topic-row > a { min-width: 0; text-decoration: none; }
.topic-row > a strong { display: block; color: var(--ink); font-size: 15.5px; font-weight: 500; line-height: 1.45; }
.topic-row > a span { display: block; margin-top: 2px; overflow-wrap: anywhere; color: var(--muted); font-size: 13px; line-height: 1.5; }
.topic-row > a:hover strong { color: var(--ember); }
.topic-row.is-done > a strong { color: var(--muted); }
.topic-row-min { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.topic-none { color: var(--muted); }
.topic-none[hidden], .topic-flat[hidden], [data-topic-groups][hidden] { display: none; }

/* ---------------------------------------------------------------- home (round 11)
   One column in reading order: start here (five notes as one path), every topic as a plain list, 例 01,
   saved, what changed lately. No cards: hairlines and type do the grouping. */
:root:root .page-home .shell > main { padding: 34px 48px 48px; }
:root:root .page-home article.prose { max-width: 860px; }
:root:root .page-home .article-body { font-size: 16px; }
@media (min-width: 1081px) {
  :root:root .page-home .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }   /* the home has no contents rail */
}
:root:root .page-home .shell > .rail { display: none; }
.home-head h1 { margin: 0; font-size: 30px; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; color: var(--ink); }
.home-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.home h2 { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.home-continue, .home-start, .home-topics, .home-saved, .home-updates { margin-top: 40px; }
.home-continue[hidden], .home-saved[hidden] { display: none; }
.home-continue-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--rule); }
.home-continue-card { display: block; padding: 14px 0 4px; text-decoration: none; color: var(--ink); }
.home-continue-card small { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12.5px; }
.home-continue-card small time { margin-left: auto; }
.home-continue-card strong { display: block; margin-top: 6px; font-size: 16px; font-weight: 600; }
.home-continue-card .home-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font: 12px var(--body); font-variant-numeric: tabular-nums; }
.home-continue-card .home-bar i { flex: 1; height: 4px; border-radius: 2px; background: var(--side-hover); overflow: hidden; }
.home-continue-card .home-bar i::before { content: ""; display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--ember); border-radius: 2px; }
.home-continue-card:hover strong { color: var(--ember); }
:root:root .home-start ol, :root:root .home-updates ol { list-style: none; margin: 0; padding: 0; }
:root:root .home-start li, :root:root .home-updates li { margin: 0; }
/* start here: five notes left to right, a path rather than a list */
:root:root .home-start ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
:root:root .home-start li + li { border-left: 1px solid var(--rule); }
:root:root .prose .home-start a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 14px 14px 4px 0; color: var(--ink-soft); font-size: 14px; line-height: 1.45; text-decoration: none; }
:root:root .prose .home-start li + li a { padding-left: 14px; }
:root:root .prose .home-start a:hover { color: var(--ember); }
.home-start-n { color: var(--faint); font: 12px var(--body); font-variant-numeric: tabular-nums; }
.home-start a.is-done .home-start-n, .home-start a.is-half .home-start-n { color: var(--ember); }
/* every topic: two columns of name, count and its first groups */
.home-topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.home-topic { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.home-topic strong { font-size: 15px; font-weight: 600; }
.home-topic:hover strong { color: var(--ember); }
.home-topic-n { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.home-topic-groups { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.home-updates li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--rule); }
.home-updates a { color: var(--ink-soft); font-size: 14px; text-decoration: none; }
.home-updates a:hover { color: var(--ember); }
.home-updates span { grid-column: 1; color: var(--faint); font-size: 12px; }
.home-updates time { grid-column: 2; grid-row: 1; color: var(--faint); font-size: 12px; }
.home-saved .lib-item { padding-inline: 0; margin-left: 0; }

/* ---------------------------------------------------------------- search (round 11)
   The dialog opens where the top bar's field is (search.js places it): one field, a count with the
   language switch, then one-line results. The arrows move the highlighted row; the cursor stays in the field. */
:root:root .note-search {
  width: min(680px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 24px)); margin: 10px auto auto; padding: 0;
  border: 0; border-radius: 14px; background: var(--paper); box-shadow: 0 24px 64px rgba(16, 24, 40, .22), 0 0 0 1px var(--rule);
}
:root:root .note-search::backdrop { background: rgba(16, 20, 30, .22); }
:root:root .note-search-field { gap: 12px; height: 56px; margin: 0; padding: 0 14px 0 18px; border-bottom: 1px solid var(--rule); }
:root:root .note-search-field:focus-within { border-bottom-color: var(--rule); }
:root:root .note-search-field svg { color: var(--faint); }
:root:root .note-search-field input { height: 100%; font-size: 17px; }
:root:root .note-search-close { flex: none; width: auto; height: auto; padding: 0; border: 0; background: none; cursor: pointer; }
:root:root .note-search-close kbd { display: block; padding: 3px 7px; border: 1px solid var(--rule); border-radius: 6px; color: var(--faint); font: 11.5px var(--mono); }
:root:root .note-search-close:hover kbd { color: var(--ink); border-color: var(--muted); }
:root:root .note-search-tools { display: flex; align-items: center; gap: 8px 16px; padding: 8px 18px 6px; }
:root:root #note-search-status { color: var(--faint); font-size: 12px; }
:root:root .note-search-scopes { display: inline-flex; gap: 2px; margin-left: auto; padding: 2px; border-radius: 8px; background: var(--side-hover); }
:root:root .note-search-scopes button { height: 24px; min-height: 0; padding: 0 9px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: 12px/1 var(--body); }
:root:root .note-search-scopes button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); }
:root:root .note-search-body { padding: 0 8px 8px; }
.note-search-group { list-style: none; margin: 8px 10px 4px; padding: 0; color: var(--faint); font-size: 12px; }
:root:root #note-search-results li + li { border-top: 0; }
:root:root .note-search-result {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 1px 16px;
  padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none;
}
:root:root [role="option"].is-active > .note-search-result { background: var(--ember-bg); }
:root:root .note-search-result:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }
:root:root .note-search-title { grid-column: 1; grid-row: 1; min-width: 0; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; font-weight: 500; line-height: 1.5; }
:root:root .note-search-context { grid-column: 2; grid-row: 1; display: flex; gap: 8px; max-width: 240px; overflow: hidden; white-space: nowrap; color: var(--faint); font-size: 12px; }
:root:root .note-search-category { overflow: hidden; text-overflow: ellipsis; }
:root:root .note-search-section { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
:root:root .note-search-excerpt { grid-column: 1 / -1; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 13px; line-height: 1.55; }
:root:root .note-search mark { color: var(--ember); background: none; font-weight: 500; }
.note-search-tail { list-style: none; padding: 12px 12px 4px; }
:root:root .note-search-tail p, :root:root .note-search-empty p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
:root:root .note-search-topics { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0 6px; vertical-align: middle; }
:root:root .note-search-topics button { height: 26px; min-height: 0; padding: 0 10px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ink-soft); font: 12.5px/1 var(--body); cursor: pointer; }
:root:root .note-search-topics button:hover { border-color: var(--muted); color: var(--ink); }
:root:root .note-search-empty { min-height: 0; padding: 26px 12px 18px; }
:root:root .note-search-empty h3 { margin: 0 0 4px; font-size: 15px; font-weight: 500; }
:root:root .note-search-footer { padding: 8px 18px; border-top: 1px solid var(--rule); color: var(--faint); font-size: 12px; }

/* ---------------------------------------------------------------- iPad and narrower: the sidebar slides over */
@media (max-width: 1279px) {
  :root:root .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  :root:root .shell > .rail { display: none; }
  :root:root .page-reading .mobile-toc { display: block; }
  :root:root .topbar .search-toggle:not([hidden]) { flex-basis: 320px; }
}
@media (max-width: 1080px) {
  :root:root .shell { grid-template-columns: minmax(0, 1fr); }
  :root:root .shell > main { grid-column: 1; padding: 28px 40px 0; }
  :root:root .page-home .shell > main { padding: 24px 32px 32px; }
  :root:root .topbar .icon-btn.menu {
    display: inline-flex; width: auto; gap: 7px; padding: 0 11px; height: 34px; border: 1px solid var(--rule); border-radius: 9px; color: var(--ink);
  }
  :root:root .topbar .icon-btn.menu .menu-text { display: inline; font-size: 14px; }
  :root:root .topbar-brand { min-width: 0; }
  :root:root .topbar .topbar-tabs { display: none; }
  :root:root .side {
    position: fixed; left: 0; top: var(--top-h); width: 320px; height: calc(100dvh - var(--top-h)); z-index: 50;
    transform: translateX(-102%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); box-shadow: 12px 0 40px rgba(16, 24, 40, .18);
  }
  :root:root .side.open { transform: none; }
  :root:root .side-scrim:not([hidden]) { display: block !important; position: fixed; inset: var(--top-h) 0 0; z-index: 45; background: rgba(16, 20, 30, .28); }
  :root:root .side .side-primary { display: block; flex: none; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid var(--rule); }
  :root:root .side-primary .topbar-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; border: 0; background: none; }
  :root:root .side-primary .topbar-tabs a { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: 8px; border: 0; background: none; color: var(--muted); font: 400 14px/1 var(--body); text-decoration: none; }
  :root:root .side-primary .topbar-tabs a.active { background: var(--side-hover); color: var(--ink); font-weight: 500; }
  :root:root .side-primary .topbar-tabs a::before, :root:root .side-primary .topbar-tabs a::after { display: none; }
  :root:root .side-primary .side-search { display: none !important; }
}
@media (max-width: 640px) {
  :root:root .shell > main { padding: 20px 18px 0; }
  :root:root .topbar .search-toggle:not([hidden]) { width: auto; }
  :root:root .topbar .search-toggle .search-label, :root:root .topbar .search-toggle kbd { display: none; }
  .home-continue-list, .home-topic-grid { grid-template-columns: minmax(0, 1fr); }
  :root:root .home-start ol { grid-template-columns: minmax(0, 1fr); }
  :root:root .home-start li + li { border-left: 0; border-top: 1px solid var(--rule); }
  :root:root .prose .home-start li + li a { padding-left: 0; }
  :root:root .prose .topic-row { grid-template-columns: 16px minmax(0, 1fr) auto 16px; }
  .topic-row-min { display: none; }
}
@media (max-width: 440px) {
  :root:root .topbar { gap: 8px; padding-inline: 8px; }
  :root:root .topbar-right { justify-content: flex-end; gap: 4px; }
  :root:root .topbar .search-toggle:not([hidden]) {
    flex: 0 0 44px; height: 44px; justify-content: center; margin: 0; padding: 0;
  }
}
@media (max-width: 380px) {
  :root:root .topbar-brand .brand-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  :root:root .topbar-brand .brand-short { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  :root:root .side, .lib-tree summary::before { transition: none; }
}

/* ---------------------------------------------------------------- older layers this shell retires */
/* cards and rows are whole links: no underline on their text */
:root:root .prose :is(.home, .topic-index) a { text-decoration: none; }
:root:root .prose .home h2::before, :root:root .prose .home h2::after { content: none; display: none; }
:root:root .prose .home h2 { margin: 0 0 14px; padding: 0; border: 0; font-size: 15px; }
/* the top bar stays put while reading; it holds the way to every note */
:root:root[data-bar-hidden] .topbar, :root:root[data-bar-hidden] .page-reading .topbar { transform: none; }
:root:root[data-bar-hidden] .side { top: var(--top-h); }
@media (max-width: 1080px) {
  :root:root .topbar .icon-btn.menu { order: -1; }
}
:root:root .prose .topic-row[hidden], :root:root .prose .topic-group[hidden] { display: none; }
.lib-item-text small { white-space: nowrap; overflow: hidden; }
:root:root .prose .topic-row > a strong { color: var(--ink); }
:root:root .prose .topic-row.is-done > a strong { color: var(--muted); }
:root:root .prose .topic-row > a:hover strong { color: var(--ember); }
:root:root .prose .topic-row > a span { color: var(--muted); }
:root:root .prose .home-start a, :root:root .prose .home-updates a { color: var(--ink-soft); text-decoration: none; }
/* the top bar's "My reading" tab and the sidebar's Recent and Saved cover the reading drawer's button on wide screens */
@media (min-width: 1081px) {
  :root:root .topbar .reader-hub-toggle { display: none; }
}
/* the older .prose .home-foot (style.css) made it a 16px row; this is the quiet footer */
:root:root .prose .home-foot { display: block; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; line-height: 1.7; }
:root:root .prose .home-foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 6px; }
:root:root .prose .home-foot a, :root:root .prose .home-foot nav a, :root:root .prose .home-foot p a { margin: 0; border: 0; color: var(--muted); text-decoration: none; }
:root:root .prose .home-foot a:hover { color: var(--ember); }
:root:root .prose .home-foot p { margin: 0; }

/* ---------------------------------------------------------------- home: 例 01 (build.example_html, static/home-example.js)
   Two linked drawings in one white panel: the line and its errors as squares, the loss curve and one step.
   Predictions take the accent, squared errors the key colour, so the arithmetic under each reads like its marks. */
.home-ex { margin-top: 40px; }
.home-ex-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
:root:root .prose .home-ex-tag { margin: 0 0 4px; color: var(--ember); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
:root:root .prose .home .home-ex h2 { margin: 0; font-size: 20px; line-height: 1.35; }
:root:root .prose .home-ex-lead { max-width: 46em; margin: 6px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
:root:root .prose .home-ex-read { flex: none; color: var(--ember); font-size: 14px; }
:root:root .prose .home-ex-read:hover { text-decoration: underline; text-underline-offset: .2em; }
.ex1 { --ex-pred: var(--ember); --ex-err: var(--c-k); }
:root:root .prose .ex1 { margin: 0; border: 1px solid var(--rule); border-radius: var(--radius-card); background: var(--paper); overflow: hidden; }
:root:root .prose .ex1-static { padding: 18px 22px 4px; }
:root:root .prose .ex1-static[hidden] { display: none; }
:root:root .prose .ex1 figcaption { margin: 0; padding: 10px 22px 14px; border-top: 1px solid var(--rule); color: var(--faint); font-size: 12.5px; line-height: 1.6; }
.ex1-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ex1-panel { min-width: 0; padding: 18px 22px 16px; }
.ex1-panel + .ex1-panel { border-left: 1px solid var(--rule); }
:root:root .prose .ex1-panel-title { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.ex1-n { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ember-bg); color: var(--ember); font-size: 11.5px; font-weight: 600; }
.ex1-plot { display: block; width: 100%; height: auto; margin-top: 6px; overflow: visible; cursor: grab; user-select: none; -webkit-user-select: none; }
.ex1-plot.is-dragging { cursor: grabbing; }
.ex1-plot-0 { touch-action: none; }       /* the line turns with an up-and-down drag */
.ex1-plot-1 { touch-action: pan-y; }      /* the weight follows a sideways drag; the page still scrolls */
.ex1-grid { stroke: var(--rule); stroke-width: 1; }
.ex1-axis { stroke: var(--muted); stroke-width: 1; }
.ex1-tick { fill: var(--faint); font: 11px var(--body); font-variant-numeric: tabular-nums; }
.ex1-axis-name { fill: var(--muted); font: 11.5px var(--body); }
.ex1-sq { fill: color-mix(in srgb, var(--ex-err) 13%, transparent); stroke: color-mix(in srgb, var(--ex-err) 70%, transparent); stroke-width: 1.25; }
.ex1-res { stroke: var(--ex-err); stroke-width: 1.5; }
.ex1-line { stroke: var(--ex-pred); stroke-width: 2.25; stroke-linecap: round; }
.ex1-target { fill: var(--ink); }
.ex1-pred { fill: var(--paper); stroke: var(--ex-pred); stroke-width: 2; }
.ex1-curve { fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linejoin: round; }
.ex1-tangent { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.ex1-trail { fill: color-mix(in srgb, var(--ex-pred) 30%, var(--paper)); }
.ex1-move { fill: none; stroke: var(--ex-pred); stroke-width: 1.75; }
.ex1-move.is-going { stroke-dasharray: 3 4; opacity: .55; }
.ex1-head { fill: var(--ex-pred); }
.ex1-ghost { fill: var(--paper); stroke: var(--ex-pred); stroke-width: 1.75; stroke-dasharray: 3 2.5; }
.ex1-now { fill: var(--ex-pred); stroke: var(--paper); stroke-width: 2.5; }
.ex1-off { fill: var(--ex-pred); font: 600 11.5px var(--body); font-variant-numeric: tabular-nums; }
:root:root .prose .ex1-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12.5px; }
:root:root .prose .ex1-key li { display: flex; align-items: center; gap: 6px; margin: 0; }
.ex1-sw { flex: none; width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; }
.ex1-sw-target { background: var(--ink); }
.ex1-sw-pred { border: 2px solid var(--ex-pred); background: var(--paper); }
.ex1-sw-sq { border-radius: 2px; border: 1.25px solid var(--ex-err); background: color-mix(in srgb, var(--ex-err) 13%, transparent); }
.ex1-sw-now { background: var(--ex-pred); }
.ex1-sw-ghost { border: 1.5px dashed var(--ex-pred); }
.ex1-sw-slope { width: 16px; height: 0; border-radius: 0; border-top: 1.5px dashed var(--muted); }
.ex1-sw-trail { width: 8px; height: 8px; background: color-mix(in srgb, var(--ex-pred) 30%, var(--paper)); }
:root:root .prose .ex1-math { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--rule); font-size: 14px; line-height: 1.55; font-variant-numeric: tabular-nums; }
:root:root .prose .ex1-math dt { margin: 0; color: var(--muted); font-weight: 400; white-space: nowrap; }
:root:root .prose .ex1-math dd { margin: 0; color: var(--ink-soft); }
:root:root .prose .ex1-math b { color: var(--ink); font-weight: 600; }
:root:root .prose .ex1-math b.is-pred, :root:root .prose .ex1-math b.is-new { color: var(--ex-pred); }
:root:root .prose .ex1-math b.is-err { color: var(--ex-err); }
.ex1-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 22px; border-top: 1px solid var(--rule); background: var(--panel); }
.ex1-weight { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 13.5px; }
:root:root .prose .ex1-weight input { width: 200px; min-height: 0; margin: 0; accent-color: var(--ember); }
.ex1-weight output { min-width: 3.2em; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ex1-rates { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; }
.ex1-rates span { margin-right: 4px; }
.ex1-rates .lab-btn { min-width: 48px; }
.ex1-go { display: flex; gap: 8px; margin-left: auto; }
:root:root .prose .ex1-status { min-height: 1.6em; margin: 0; padding: 0 22px 14px; background: var(--panel); color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
:root:root .prose .ex1-status:empty { display: none; }
:root:root .prose .home-ex-more { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; margin: 12px 0 0; color: var(--muted); font-size: 13.5px; }
:root:root .prose .home-ex-more a { color: var(--ink-soft); }
:root:root .prose .home-ex-more a:hover { color: var(--ember); }
@media (max-width: 1080px) {
  :root:root .prose .ex1-weight input { width: 140px; }
  .ex1-controls { gap: 12px 18px; }
}
@media (max-width: 640px) {
  .ex1-panels { grid-template-columns: minmax(0, 1fr); }
  .ex1-panel + .ex1-panel { border-left: 0; border-top: 1px solid var(--rule); }
  .home-ex-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------------------------------------------------------------- core and deep (depth.toml)
   Core notes (基础) list first; each deep dive (深入) folds under the core note it extends, on the topic
   page and in the sidebar. A core note ends with its deep dives; a deep dive's head names its core note. */
:root:root .prose .topic-depth {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.6;
}
.topic-depth span { flex: 1 1 24em; }
.topic-depth button, .topic-deep-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink-soft); font: 400 12.5px/1 var(--body); cursor: pointer; white-space: nowrap;
}
.topic-deep-toggle::after {
  content: ""; width: 5px; height: 5px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .12s ease;
}
.topic-deep-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }
.topic-depth button:hover, .topic-deep-toggle:hover { border-color: var(--ember); color: var(--ember); }
.topic-depth button[hidden], .topic-deep-toggle[hidden] { display: none; }
.topic-depth button[aria-pressed="true"], .topic-deep-toggle[aria-expanded="true"] { border-color: var(--ember); background: var(--ember-bg); color: var(--ember); }
.topic-row-deep:empty { display: none; }
:root:root .prose .topic-row-deep:empty + .topic-row-min { grid-column: 4; }
:root:root .prose [data-topic-groups] .topic-row--deep:not(.is-open) { display: none; }
:root:root .prose .topic-row--deep { padding-left: 36px; border-top-style: dashed; }
:root:root .prose .topic-row--deep > a strong { font-size: 14.5px; font-weight: 400; color: var(--ink-soft); }
:root:root .prose .topic-row--deep > a:hover strong { color: var(--ember); }
/* the sidebar fold: a small "深入 N" tag at the end of the core note's row; deep dives hang under it on a dashed line */
:root:root .lib-notes li.lib-has-deep { position: relative; }
:root:root .lib-group > .lib-notes > li > a { color: var(--ink); font-weight: 500; }
:root:root .lib-group > .lib-notes > li > a.active { font-weight: 600; }
:root:root .lib-notes li.lib-has-deep > a { padding-right: 60px; }
:root:root .lib-notes li.lib-has-deep > .lib-deep > summary {
  position: absolute; top: 5px; right: 6px; display: flex; align-items: center; height: 21px; margin: 0; padding: 0 8px;
  border: 1px solid var(--rule); border-radius: 11px; background: var(--paper); color: var(--muted);
  font-size: 11.5px; font-weight: 500; cursor: pointer; list-style: none;
}
:root:root .lib-notes li.lib-has-deep > .lib-deep > summary::-webkit-details-marker { display: none; }
:root:root .lib-notes li.lib-has-deep > .lib-deep > summary::before { display: none; }
:root:root .lib-notes li.lib-has-deep > .lib-deep > summary:hover { border-color: var(--ember); color: var(--ember); }
:root:root .lib-notes li.lib-has-deep > .lib-deep[open] > summary { border-color: transparent; background: var(--ember-bg); color: var(--ember); }
:root:root .lib-deep > .lib-notes { margin: 0 0 4px 42px !important; border-left: 1px dashed var(--rule); }
:root:root .lib-deep .lib-notes a { min-height: 27px; margin-left: 2px; padding: 3px 10px; color: var(--muted); font-size: 13px; font-weight: 400; }
:root:root .lib-deep .lib-notes a.active { color: var(--ink); font-weight: 500; }
.crumb-deep { color: var(--muted); }
.crumb-deep a { color: inherit; }

/* ---------------------------------------------------------------- round 12 · reading
   Warm paper (the light tokens in style.css). Under the title, what the note answers; under each section
   heading, its conclusion in one line, also listed in the right rail (site/glance). Bold sentences are
   marked like a highlighter, so skimming the marks gives the argument. Sections are numbered; tables sit on
   lighter cards. A note ends in one block: its deep dives, its own reading list, and the next note. */
:root { --key-mark: rgba(126, 155, 255, .22); }
:root[data-theme="light"] { --key-mark: rgba(46, 91, 234, .15); }
:root:root .page-reading .article-body strong { padding: 0 1px; background: linear-gradient(transparent 60%, var(--key-mark) 60%); color: var(--ink); }
:root:root .page-reading .article-body :is(th, td, summary, h2, h3, h4, a, figure, .method-map, .widget-body, .sec-line) strong { padding: 0; background: none; }

:root:root .page-reading .article-body { counter-reset: sec; }
:root:root .page-reading .prose .article-body > h2 { padding-top: 26px; border-top: 1px solid var(--rule); }
:root:root .page-reading .prose .article-body > h2:not(.sec-ref) { counter-increment: sec; }
:root:root .page-reading .prose .article-body > h2:not(.sec-ref)::before {
  content: counter(sec, decimal-leading-zero); display: block; position: static; width: auto; height: auto; margin: 0 0 4px;
  border: 0; background: none; color: var(--ember); font: 600 12.5px var(--mono); letter-spacing: .08em;
}
:root:root .page-reading .prose .article-body p.sec-line {
  margin: -4px 0 22px; padding: 10px 14px 10px 16px; border-left: 3px solid var(--ember); border-radius: 0 8px 8px 0;
  background: var(--ember-bg); color: var(--ink); font-size: 17px; line-height: 1.7;
}
:root:root .page-reading .prose .sec-line span { display: block; margin-bottom: 2px; color: var(--ember); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
:root:root .page-reading .article-body .table-wrap { padding: 6px 18px; border: 1px solid var(--rule); border-radius: 12px !important; background: var(--panel); }

:root:root .page-reading .prose .note-brief { margin: 22px 0 4px; padding: 18px 22px; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); }
:root:root .page-reading .prose .note-brief p { max-width: none; margin: 0; }
:root:root .page-reading .prose .note-brief .brief-label { color: var(--ember); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; line-height: 1.5; }
:root:root .page-reading .prose .note-brief .brief-then { margin-top: 14px; color: var(--muted); }
:root:root .page-reading .prose .note-brief .brief-answers { margin-top: 4px; color: var(--ink); font-size: 18px; font-weight: 600; line-height: 1.6; }
:root:root .page-reading .prose .brief-points { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; counter-reset: point; }
:root:root .page-reading .prose .brief-points li { display: flex; gap: 10px; margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; counter-increment: point; }
:root:root .page-reading .prose .brief-points li::before {
  content: counter(point); flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 3px;
  border-radius: 50%; background: var(--ember-bg); color: var(--ember); font: 600 11.5px var(--mono);
}

:root:root :is(.rail .toc, .mobile-toc) li.has-line a { display: block; padding-top: 6px; padding-bottom: 6px; }
:root:root :is(.rail .toc, .mobile-toc) li.has-line b { display: block; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; line-height: 1.45; }
:root:root :is(.rail .toc, .mobile-toc) li.has-line a > span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
:root:root :is(.rail .toc, .mobile-toc) li.has-line a.active b { color: var(--ember); }
:root:root :is(.rail .toc, .mobile-toc) li.has-line a.active > span { color: var(--ink-soft); }

:root:root .prose .note-end { margin: 48px 0 8px; padding: 22px 24px 18px; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); }
:root:root .prose .note-end h2.note-end-title { margin: 0 0 12px; padding: 0; border: 0; font-size: 18px; }
:root:root .prose .note-end h2::before, :root:root .prose .note-end h2::after { content: none; display: none; }
:root:root .prose .note-end-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 28px; margin-bottom: 14px; }
:root:root .prose .note-end-label { margin: 0 0 4px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
:root:root .prose .note-end ul { margin: 0; padding: 0; list-style: none; }
:root:root .prose .note-end li { margin: 0; padding: 8px 0; border-top: 1px solid var(--rule-soft); color: var(--muted); font-size: 13.5px; line-height: 1.55; }
:root:root .prose .note-end .note-deep a { display: block; text-decoration: none; }
:root:root .prose .note-end .note-deep a strong { display: block; color: var(--ink); font-size: 14.5px; font-weight: 600; line-height: 1.45; }
:root:root .prose .note-end .note-deep a span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
:root:root .prose .note-end :is(.note-deep a:hover strong, .note-related a:hover) { color: var(--ember); }
:root:root .prose .note-end .note-related a { color: var(--ink); font-weight: 600; text-decoration: none; }
:root:root .prose .note-end .page-turn { max-width: none; gap: 6px 12px; margin: 0; padding-top: 12px; border-top: 1px solid var(--rule-soft); }
:root:root .prose .note-end .page-turn-context { grid-column: 1 / -1; font-size: 13px; }
:root:root .prose .note-end .page-turn a { min-height: 0; gap: 2px; padding: 10px 14px; border-radius: 10px !important; background: none; box-shadow: none !important; }
:root:root .prose .note-end .page-turn a:hover { transform: none; background: var(--rule-soft); }
:root:root .prose .note-end .page-turn .page-turn-next { background: var(--ember-bg); }
:root:root .prose .note-end .page-turn strong { max-width: none; font-size: 15px; }
:root:root .prose .note-end .page-turn-context a { display: inline; }
