/* Scrivio interview library. Scrivio's own colours: purple is the primary and marks where you are,
   amber marks a question to come back to, green marks known. Code sits in dark panes with a line gutter.
   Type: Newsreader for titles and long reading, Instrument Sans for controls and labels, JetBrains Mono for code.
   Navigation is a dock at the bottom that opens upward. */

.lib {
  --paper: #F8F7FC; --surface: #FFFFFF; --surface-2: #F1EEF8; --surface-3: #EAE6F4;
  --border: #E7E3F0; --border-strong: #8C8899;
  --text: #1D1830; --muted: #5C5870;
  --primary: #5B3FE0; --primary-hover: #4C31CC; --on-primary: #FFFFFF;
  --primary-soft: #EFEBFF; --primary-text: #4A31B0;
  --mark: #5B3FE0; --mark-hover: #4C31CC; --on-mark: #FFFFFF;
  --ok: #1F7A4D; --ok-soft: #E7F5EC; --ok-bar: #1F7A4D;
  --warn: #8A5A00; --warn-soft: #FFF3D6; --warn-bar: #C98A00;
  --none-bar: #D9D4E6; --focus: #5B3FE0;
  --pane: #1B1824; --pane-2: #24202F; --pane-text: #ECEAF4; --pane-muted: #A9A3C2; --pane-line: #2E2A3A; --pane-gutter: #6F6A85;
  --dock: #2E1F6B; --dock-line: transparent; --dock-text: #E9E4FF; --dock-muted: #BDB2EE; --dock-hover: rgba(255, 255, 255, 0.12);
  --dock-sel: #6A4DF4; --dock-accent: #C4B8FF; --dock-go: #FFFFFF; --on-dock-go: #2E1F6B;
  --shadow-rgb: 29, 24, 48;
  --display: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --reading: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --read: 18.5px;
  --ease: cubic-bezier(.3, .7, .2, 1);
  box-sizing: border-box; min-height: 100%;
  background: var(--paper); color: var(--text);
  font-family: var(--display); font-size: 14px; line-height: 1.5; font-optical-sizing: auto; -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
.lib.theme-dark {
  --paper: #121019; --surface: #1B1824; --surface-2: #24202F; --surface-3: #2C2739;
  --border: #2E2A3A; --border-strong: #7A7590;
  --text: #ECEAF4; --muted: #B3AEC4;
  --primary: #6A4DF4; --primary-hover: #7B61FF; --on-primary: #FFFFFF;
  --primary-soft: #231E3D; --primary-text: #C4B8FF;
  --mark: #6A4DF4; --mark-hover: #7B61FF; --on-mark: #FFFFFF;
  --ok: #7FD9A8; --ok-soft: #16302A; --ok-bar: #2F9566;
  --warn: #F2C46B; --warn-soft: #33280F; --warn-bar: #F2C46B;
  --none-bar: #3A3549; --focus: #C4B8FF;
  --pane: #0E0C15; --pane-2: #17141F; --pane-line: #2E2A3A;
  --dock: #2A2346; --dock-line: #3A3160;
  --shadow-rgb: 0, 0, 0;
  color-scheme: dark;
}
.lib.read-s { --read: 17px; }
.lib.read-m { --read: 18.5px; }
.lib.read-l { --read: 20.5px; }

.lib body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.lib *, .lib *::before, .lib *::after { box-sizing: border-box; }
.lib :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.lib a { color: var(--primary-text); text-decoration: none; }
.lib a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lib button { font: inherit; color: inherit; cursor: pointer; }
.lib h1, .lib h2, .lib h3, .lib p, .lib figure { margin: 0; }
.lib [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--primary); color: #fff !important; }
.skip:focus { top: 12px; }

/* ---------- top line: only the name; navigation lives in the dock ---------- */
.topline { width: 100%; max-width: 1320px; margin: 0 auto; padding: 22px 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--text) !important; text-decoration: none !important; }
.brand small { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.brand svg path { transition: transform .35s var(--ease); }
.brand:hover svg path:nth-child(1) { transform: translateX(-2px); }
.brand:hover svg path:nth-child(3) { transform: translateX(2px); transition-delay: .06s; }
.theme-dark .brand svg g { fill: #9C86FF; }

/* ---------- the dock ---------- */
.dock-wrap { position: sticky; bottom: 0; z-index: 30; margin-top: auto; padding: 0 12px 16px; display: flex; justify-content: center; pointer-events: none; }
.dock { pointer-events: auto; width: min(1060px, 100%); background: var(--dock); color: var(--dock-text); border: 1px solid var(--dock-line);
  border-radius: 24px; overflow: hidden; box-shadow: 0 2px 4px rgba(var(--shadow-rgb), 0.2), 0 18px 40px -12px rgba(var(--shadow-rgb), 0.55);
  transition: box-shadow .3s ease; }
.dock.is-open { box-shadow: 0 2px 4px rgba(var(--shadow-rgb), 0.25), 0 32px 80px -16px rgba(var(--shadow-rgb), 0.7); }
.dock-row { display: flex; align-items: center; gap: 6px; padding: 8px; min-height: 60px; }
.dock-home { position: relative; width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: #ffffff !important;
  transition: background-color .2s ease; }
.dock-home:hover { background: var(--dock-hover); }
.dock-home .ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.dock-home .ring circle { fill: none; stroke-width: 2.5; }
.dock-home .ring .bg { stroke: rgba(255, 255, 255, 0.16); }
.dock-home .ring .fg { stroke: var(--dock-accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: var(--ring, 100); }

.tabs { position: relative; flex: 0 0 auto; display: flex; gap: 2px; }
.tabs .ind { position: absolute; top: 0; bottom: 0; left: 0; width: var(--w, 0); border-radius: 14px; opacity: 0; transform: translateX(var(--x, 0));
  transition: transform .34s var(--ease), opacity .2s ease; }
.tabs .ind-hover { background: var(--dock-hover); }
.tabs .ind-sel { background: var(--dock-sel); }
.tabs .ind-hover { --x: var(--hx); --w: var(--hw); }
.tabs .ind-sel { --x: var(--sx); --w: var(--sw); }
.tabs.has-hov .ind-hover, .tabs.has-sel .ind-sel { opacity: 1; }
.tab { position: relative; z-index: 1; flex: 0 0 auto; min-height: 44px; padding: 0 12px; border: 0; background: transparent; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 14px; font-weight: 500; color: var(--dock-text);
  white-space: nowrap; transition: color .2s ease; }
.tab:hover, .tab.is-on { color: #ffffff; }
.tab svg { transition: transform .3s var(--ease); opacity: .75; }
.tab.is-open svg { transform: rotate(180deg); }
.dock-sep { width: 1px; height: 24px; background: rgba(255, 255, 255, 0.18); flex: 0 0 auto; margin: 0 4px; }
.dock-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; width: 150px; flex: 0 1 auto; min-width: 44px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.1); border: 1.5px solid transparent; color: var(--dock-text);
  transition: width .34s var(--ease), background-color .2s ease, border-color .2s ease; }
.dock-search:hover { background: rgba(255, 255, 255, 0.15); }
.dock-search:focus-within { width: 250px; border-color: var(--dock-accent); background: rgba(255, 255, 255, 0.06); }
.dock-search input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; color: #ffffff; font: inherit; font-size: 14px; }
.dock-search input::placeholder { color: var(--dock-muted); }
.dock-btn { position: relative; min-width: 44px; height: 44px; padding: 0 10px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; border: 0; border-radius: 14px; background: transparent; color: var(--dock-text) !important; font-size: 14px; font-weight: 500;
  text-decoration: none !important; transition: background-color .2s ease, color .2s ease, transform .15s ease; }
.dock-btn:hover { background: var(--dock-hover); color: #ffffff !important; }
.dock-btn:active { transform: scale(.96); }
.dock-btn.is-go { background: var(--dock-go); color: var(--on-dock-go) !important; padding: 0 16px; }
.dock-btn.is-go:hover { background: #E9E4FF; color: var(--on-dock-go) !important; }
.dock-btn.is-done { background: #2F9566; color: #ffffff !important; }
.dock-btn.grow { flex: 1 1 auto; }
.bp { width: 11px; height: 11px; border-radius: 999px; background: #F2C46B; box-shadow: 0 0 0 3px rgba(242, 196, 107, 0.25); flex: 0 0 auto; }
.theme-btn svg { position: absolute; inset: 0; margin: auto; transition: transform .45s var(--ease), opacity .25s ease; }
.theme-light .theme-btn .moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
.theme-dark .theme-btn .sun { opacity: 0; transform: rotate(90deg) scale(.4); }

.dock-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.dock-panel > div { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s linear .4s; }
.dock.is-open .dock-panel { grid-template-rows: 1fr; }
.dock.is-open .dock-panel > div { visibility: visible; transition-delay: 0s; }
.panel-in { padding: 22px 20px 14px; display: flex; flex-wrap: wrap; gap: 16px 28px; border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  max-height: min(64vh, 560px); overflow-y: auto; }
.panel-in.swap { animation: panel-a .32s ease-out both; }
@keyframes panel-a { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.panel-aside { flex: 1 1 200px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.panel-title { font-family: var(--reading); font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; color: #ffffff; }
.panel-note { font-size: 14px; color: var(--dock-muted); }
.panel-note b { color: #ffffff; font-variant-numeric: tabular-nums; }
.panel-grid { flex: 3 1 440px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 18px; align-content: start; }
.panel-list { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.panel-link { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 8px 12px;
  border-radius: 10px; color: #F3F0FF !important; text-decoration: none !important; font-size: 14px; font-weight: 500; border: 0; background: transparent;
  text-align: left; width: 100%; transition: background-color .15s ease, color .15s ease; }
.panel-link:hover { background: var(--dock-hover); color: #ffffff !important; }
.panel-link .n { color: var(--dock-muted); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.panel-link.is-here, .panel-link.is-here:hover { background: #ffffff; color: var(--on-dock-go) !important; font-weight: 600; }
.panel-link.is-here .n { color: var(--on-dock-go); }
.panel-link i { position: absolute; left: 8px; bottom: 5px; height: 3px; border-radius: 3px; background: var(--dock-accent); max-width: calc(100% - 16px);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s var(--ease) .1s; }
.dock.is-open .panel-link i { transform: scaleX(1); }
.panel-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important; font-size: 13px; font-weight: 500; text-decoration: none !important; transition: background-color .15s ease; }
.panel-btn:hover { background: var(--dock-hover); }
.panel-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.1); color: var(--dock-text); flex: 1 1 100%; }
.panel-search input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: 16px; }
.panel-search input::placeholder { color: var(--dock-muted); }
.scrim { position: fixed; inset: 0; z-index: 25; border: 0; padding: 0; background: rgba(20, 14, 48, 0.45); opacity: 0;
  pointer-events: none; transition: opacity .3s ease; cursor: default; }
.scrim.is-on { opacity: 1; pointer-events: auto; }
.only-phone { display: none !important; }

/* ---------- page frame ---------- */
.frame { width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px 24px 56px; }
.cols { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.side { flex: 1 1 300px; max-width: 100%; display: flex; flex-direction: column; gap: 16px; }
.side.sticks { position: sticky; top: 20px; max-height: calc(100vh - 110px); overflow-y: auto; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.crumbs a { color: var(--muted); }
.page-title { font-family: var(--reading); font-size: 34px; line-height: 1.15; font-weight: 500; letter-spacing: -0.015em; text-wrap: balance; }
.lead { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 60ch; }
.lead b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.sub-h { font-family: var(--reading); font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; }
.group { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; scroll-margin-top: 20px; }
.group-h { font-size: 16px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 12px; }
.group-h::after { content: ""; flex: 1; height: 1.5px; background: var(--border); }

/* ---------- cards, chips, buttons ---------- */
.card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 18px; }
.card.pad { padding: 18px 20px; }
.card.clip { overflow: hidden; }
.card-h { font-size: 15px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 7px;
  font-size: 12px; font-weight: 500; line-height: 1; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.is-primary { background: var(--primary-soft); color: var(--primary-text); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 18px;
  border-radius: 999px; border: 1.5px solid var(--border-strong); background: transparent; color: var(--text);
  font-size: 14px; font-weight: 500; text-decoration: none !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .12s ease; }
.btn:hover { border-color: var(--primary); color: var(--primary-text) !important; background: var(--primary-soft); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .35; cursor: default; pointer-events: none; }
.btn.is-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary) !important; }
.btn.is-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary) !important; }
.btn.is-soft { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary-text) !important; }
.btn.is-soft:hover { border-color: var(--primary); }
.btn.is-quiet { border-color: transparent; color: var(--muted); padding: 0 12px; }
.btn.is-quiet:hover { background: var(--surface-2); color: var(--text) !important; border-color: transparent; }
.btn.is-on-ok, .btn.is-on-ok:hover { background: var(--ok-bar); border-color: var(--ok-bar); color: #ffffff !important; }
.btn.is-on-warn, .btn.is-on-warn:hover { background: var(--warn-soft); border-color: var(--warn-bar); color: var(--warn) !important; }
.btn.wide { width: 100%; }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface-2); flex-wrap: wrap; }
.seg button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 500; transition: background-color .22s ease, color .22s ease; }
.seg button:hover { color: var(--text); }
.seg button.is-on { background: var(--primary); color: var(--on-primary); }
.seg button span { font-family: var(--mono); font-size: 12px; font-weight: 400; margin-left: 6px; opacity: .8; }
.filter { min-height: 34px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--border); background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 500; transition: background-color .18s ease, color .18s ease, border-color .18s ease; }
.filter:hover { border-color: var(--primary); color: var(--primary-text); }
.filter.is-on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.filter span { font-family: var(--mono); font-size: 12px; font-weight: 400; margin-left: 5px; opacity: .8; }
.row-gap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.meter { height: 6px; border-radius: 999px; background: var(--none-bar); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .4s ease; }
.note { font-size: 13px; line-height: 1.45; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { padding: 10px; border-radius: 10px; background: var(--surface-2); }
.stat b { display: block; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat.is-ok { background: var(--ok-soft); } .stat.is-ok b { color: var(--ok); }
.stat.is-warn { background: var(--warn-soft); } .stat.is-warn b { color: var(--warn); }

/* ---------- code: dark panes with a line gutter ---------- */
.ic { font-family: var(--mono); font-size: 0.78em; padding: 1px 5px; border-radius: 6px; background: var(--surface-2); color: var(--text);
  overflow-wrap: anywhere; font-weight: 500; }
.codeblock { border-radius: 16px; background: var(--pane); color: var(--pane-text); overflow: hidden; border: 1px solid var(--pane-line); }
.codeblock-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 16px;
  background: var(--pane-2); font-family: var(--mono); font-size: 12px; color: var(--pane-muted); }
.codeblock-bar .btn { min-height: 30px; padding: 0 12px; font-size: 12px; color: var(--pane-text) !important; border-color: transparent; background: transparent; }
.codeblock-bar .btn:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff !important; }
.codeblock .pre { margin: 0; padding: 14px 16px 14px 0; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.65;
  color: var(--pane-text); counter-reset: ln; }
.cl { white-space: pre; min-height: 1.65em; position: relative; padding-left: 3.4em; counter-increment: ln; }
.cl::before { content: counter(ln); position: absolute; left: 0; width: 2.4em; text-align: right; color: var(--pane-gutter); font-size: 12px; }
.cl .c { color: var(--pane-muted); }
.qrow .codeblock .pre { font-size: 13px; padding: 10px 14px 10px 0; }

/* ---------- question rows ---------- */
.qrow { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; color: var(--text) !important; text-decoration: none !important;
  transition: border-color .2s ease, transform .25s var(--ease), box-shadow .25s ease; }
.qrow:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 10px 24px -16px rgba(var(--shadow-rgb), 0.5); }
.qrow .q { font-size: 16px; line-height: 1.45; font-weight: 500; letter-spacing: -0.01em; text-wrap: pretty; }
.qrow .q .ic { font-size: 13px; font-weight: 500; }
.qrow .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dot { width: 11px; height: 11px; border-radius: 999px; border: 2px solid var(--none-bar); flex: 0 0 auto; }
.dot.is-known { background: var(--ok-bar); border-color: var(--ok-bar); }
.dot.is-review { background: var(--warn-bar); border-color: var(--warn-bar); box-shadow: 0 0 0 3px var(--warn-soft); }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); }

/* ---------- the answer ---------- */
.q-head { display: flex; flex-direction: column; gap: 14px; }
.q-head .codeblock { max-width: 780px; }
.detail-title { font-family: var(--reading); font-size: 27px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; max-width: 34em; }
.detail-title .ic { font-size: 0.8em; }
.prose { display: flex; flex-direction: column; gap: 18px; font-family: var(--reading); font-size: var(--read); line-height: 1.6; transition: font-size .25s ease; }
.prose p { text-wrap: pretty; }
.prose p, .prose h2, .prose .say { max-width: 66ch; }
.prose .codeblock { max-width: 780px; }
.prose .faq { max-width: 700px; }
.prose .walk, .prose .dg { max-width: 860px; }
.prose section { display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 24px; }
.prose h2 { font-family: var(--reading); font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; margin-top: 26px;
  display: flex; gap: 12px; align-items: baseline; }
.prose h2 .n { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--primary-text); background: var(--primary-soft);
  min-width: 26px; height: 26px; padding: 0 4px; border-radius: 8px; display: inline-grid; place-items: center; transform: translateY(-3px); flex: 0 0 auto; }
.prose .codeblock, .prose .walk, .prose .dg, .prose .faq, .prose .pager { font-family: var(--display); font-size: 14px; line-height: 1.5; }
.summary { font-size: 1.08em; line-height: 1.5; font-weight: 500; }
.say { padding: 24px 26px; border-radius: 20px; background: var(--dock); color: #F3F0FF; display: flex; flex-direction: column; gap: 14px; }
.say .card-h { font-family: var(--display); color: var(--dock-accent); display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 780px; }

/* ---------- diagrams and walk-throughs ---------- */
.dg, .walk { border: 1.5px solid var(--border); border-radius: 20px; background: var(--surface); overflow: hidden; }
.walk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1.5px solid var(--border); }
.walk-bar .card-h { flex: 1 1 220px; font-size: 16px; }
.walk-ctl { display: flex; align-items: center; gap: 8px; }
.walk-count { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 56px; text-align: right; }
.walk-note { padding: 14px 18px; border-top: 1.5px solid var(--border); background: var(--surface-2); font-family: var(--reading); font-size: 16px; line-height: 1.5; min-height: 52px; }
.dg-cap { padding: 12px 18px; border-top: 1.5px solid var(--border); color: var(--muted); font-size: 13px; }
.dg-scroll { overflow-x: auto; }

.dg-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dg-table th { text-align: left; padding: 10px 16px; background: var(--surface-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.dg-table td { padding: 10px 16px; border-top: 1.5px solid var(--border); vertical-align: top; min-width: 120px; }
.dg-table td:first-child { font-weight: 500; }
.dg-table tr.on td { background: var(--primary-soft); }
.dg-table tr.on td:first-child { box-shadow: inset 3px 0 0 var(--primary); }

.dg-layers { list-style: none; margin: 0; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.dg-layers li { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.dg-layers li span { color: var(--muted); font-size: 13px; }
.dg-layers li.on { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }

.dg-flow { list-style: none; margin: 0; padding: 18px 18px 14px; display: flex; flex-direction: column; counter-reset: st; }
.dg-step { position: relative; padding: 2px 0 18px 44px; counter-increment: st; transition: opacity .3s ease; }
.dg-step::before { content: counter(st); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted); font-family: var(--mono); font-size: 12px; font-weight: 500; transition: background-color .3s ease, color .3s ease, transform .35s var(--ease); }
.dg-step::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--none-bar); }
.dg-step:last-child { padding-bottom: 4px; } .dg-step:last-child::after { display: none; }
.dg-step.decision::before { border-radius: 8px; }
.dg-step b { display: block; font-weight: 500; }
.dg-step > span { display: block; color: var(--muted); font-size: 13px; }
.dg-step.on::before { background: var(--primary-soft); color: var(--primary-text); }
.dg-branches { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 8px; }
.dg-branches span { padding: 4px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.dg-branches b { display: inline; margin-right: 4px; }
.dg-branches .yes b { color: var(--ok); } .dg-branches .no b { color: var(--warn); }
.dg-step.is-todo { opacity: .3; }
.dg-step.is-done { opacity: .7; }
.dg-step.is-now::before { background: var(--mark); color: var(--on-mark); transform: scale(1.12); }
.dg-step.is-now b { color: var(--primary-text); }

.seq { padding: 16px 12px 10px; }
.seq-actors { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; }
.seq-actors span { justify-self: center; max-width: 100%; padding: 5px 12px; border-radius: 999px; background: var(--text); color: var(--paper);
  font-size: 12px; font-weight: 500; text-align: center; overflow-wrap: anywhere; }
.seq-body { position: relative; padding: 12px 0 6px; }
.seq-body .life { position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--none-bar); }
.seq-msg { position: relative; margin-left: var(--l); width: var(--w); padding: 7px 0; transition: opacity .3s ease; }
.seq-msg .lbl { display: block; text-align: center; padding: 0 10px 4px; font-family: var(--mono); font-size: 12px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.seq-msg .lbl span { background: var(--surface); padding: 1px 4px; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.seq-msg .ln { display: block; position: relative; height: 0; border-top: 2px solid var(--text); }
.seq-msg .ln::after { content: ""; position: absolute; top: -6px; width: 9px; height: 9px; border-top: 2px solid var(--text); border-right: 2px solid var(--text); }
.seq-msg.to-right .ln { transform-origin: 0 50%; } .seq-msg.to-right .ln::after { right: 0; transform: rotate(45deg); }
.seq-msg.to-left .ln { transform-origin: 100% 50%; } .seq-msg.to-left .ln::after { left: 0; transform: rotate(-135deg); }
.seq-msg.dashed .ln { border-top-style: dashed; } .seq-msg.dashed .lbl { color: var(--muted); }
.seq-msg.self .lbl { text-align: left; padding: 6px 10px; margin-left: 10px; border-left: 3px solid var(--text); }
.seq-msg.self .ln { display: none; }
.seq-msg.is-todo { opacity: .14; } .seq-msg.is-done { opacity: .55; }
.seq-msg.is-now .ln { border-top-color: var(--primary); animation: seq-draw .5s ease-out both; }
.seq-msg.is-now .ln::after { border-color: var(--primary); }
.seq-msg.is-now .lbl { color: var(--primary-text); font-weight: 600; }
.seq-msg.is-now.self .lbl { border-left-color: var(--primary); }
@keyframes seq-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- follow-up questions ---------- */
.faq { border-top: 1.5px solid var(--border-strong); }
.faq details { border-bottom: 1.5px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 4px;
  font-size: 17px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.35; transition: color .15s ease; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--primary-text); }
.faq summary svg { flex: 0 0 auto; transition: transform .3s var(--ease); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 4px 18px; font-family: var(--reading); font-size: var(--read); line-height: 1.65; max-width: 66ch; animation: lib-rise .3s var(--ease) both; }

/* ---------- side column ---------- */
.outline { display: flex; flex-direction: column; gap: 2px; position: relative; }
.ol-item { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 10px; color: var(--muted) !important;
  font-size: 14px; font-weight: 500; line-height: 1.35; text-decoration: none !important; transition: color .2s ease, background-color .2s ease, transform .25s var(--ease); }
.ol-item:hover { color: var(--text) !important; background: var(--surface-2); }
.ol-item.is-here { color: var(--primary-text) !important; background: var(--primary-soft); font-weight: 600; transform: translateX(4px); }
.ol-item .n { font-family: var(--mono); font-size: 12px; min-width: 14px; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok);
  font-size: 13px; font-weight: 500; animation: lib-rise .3s var(--ease) both; }
.toast.is-warn { background: var(--warn-soft); color: var(--warn); }
@keyframes lib-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.next-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 16px; background: var(--surface);
  border: 1.5px solid var(--border); color: var(--text) !important; text-decoration: none !important; transition: transform .25s var(--ease), border-color .2s ease; }
.next-card:hover { transform: translateX(4px); border-color: var(--primary); }
.next-card .q { font-size: 15px; line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; }

/* ---------- home and lists ---------- */
.search { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 18px; border: 1.5px solid var(--border-strong);
  border-radius: 999px; background: var(--surface); color: var(--muted); transition: box-shadow .2s ease, border-color .2s ease; }
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.hit { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 20px; color: var(--text) !important; text-decoration: none !important; }
.hit + .hit { border-top: 1.5px solid var(--border); }
.hit:hover, .hit.is-active { background: var(--surface-2); }
.hit b { font-weight: 500; }
.hit .note { white-space: nowrap; }
.dock .hit { padding: 9px 8px; border-radius: 10px; color: #F3F0FF !important; }
.dock .hit + .hit { border-top: 0; }
.dock .hit:hover, .dock .hit.is-active { background: var(--dock-hover); }
.dock .hit .note { color: var(--dock-muted); }
.area { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 14px 20px; color: var(--text) !important; text-decoration: none !important;
  transition: background-color .18s ease, padding-left .25s var(--ease); }
.area + .area { border-top: 1.5px solid var(--border); }
.area:hover { background: var(--surface-2); padding-left: 28px; }
.area .t { flex: 1 1 260px; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.area .s { flex: 2 1 280px; color: var(--muted); font-size: 13px; }
.area .n { font-size: 13px; color: var(--muted); white-space: nowrap; }
.area .n b { font-family: var(--mono); color: var(--text); font-size: 14px; font-weight: 500; }
.area:hover .n b { color: var(--primary-text); }
.foot { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px 28px; color: var(--muted); font-size: 13px; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .frame { padding: 18px 16px 32px; } .topline { padding: 16px 16px 0; } .foot { padding: 0 16px 24px; }
  .side.sticks { position: static; max-height: none; }
  .page-title { font-size: 28px; }
  .detail-title { font-size: 23px; }
  .prose h2 { font-size: 21px; }
  .qrow .q { font-size: 15.5px; }
  .sub-h { font-size: 22px; }
  .not-phone { display: none !important; }
  .only-phone { display: inline-flex !important; }
  .dock-wrap { padding: 0 10px 12px; }
  .panel-in { padding: 18px 14px 10px; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .codeblock .pre { font-size: 12.5px; }
  .say { padding: 20px 18px; }
  .btn, .seg button, .filter { min-height: 44px; }
  .lib.read-m { --read: 17.5px; }
  .seg { border-radius: 18px; }
  .seg button { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .lib, .lib * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .dock-wrap, .scrim, .side, .skip { display: none !important; }
  .lib { background: #fff; }
}

/* ---------- additions for the built site ---------- */
.pv { display: contents; }
.seq-msg.self-left .lbl { text-align: right; margin-left: 0; margin-right: 10px; border-left: 0; border-right: 3px solid var(--text); }
.level-row { justify-content: space-between; margin-top: 4px; }
.subject-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.subject-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden;
  transition: border-color .2s ease, transform .25s var(--ease), box-shadow .25s ease; }
.subject-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--primary);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ease); }
.subject-card:hover, .subject-card:focus-within { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 16px 32px -20px rgba(var(--shadow-rgb), 0.55); }
.subject-card:hover::before, .subject-card:focus-within::before { transform: scaleX(1); }
.sc-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 10px; }
.sc-top a { color: var(--text) !important; text-decoration: none !important; }
.sc-top a::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 64px; }
.sc-count { font-size: 14px; color: var(--muted); }
.sc-count b { color: var(--text); font-variant-numeric: tabular-nums; }
.sc-areas { display: flex; flex-direction: column; border-top: 1.5px solid var(--border); }
.sc-areas a { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1.5px solid var(--border);
  color: var(--text) !important; font-weight: 500; text-decoration: none !important; transition: color .15s ease, padding-left .25s var(--ease); }
.sc-areas a:hover { color: var(--primary-text) !important; padding-left: 8px; }
.sc-areas .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.sc-areas .more { color: var(--muted) !important; border-bottom: 0; }
.sc-foot { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.sc-foot .btn { align-self: flex-start; }

/* ---------- articles, the reading page and the author ---------- */
.top-links { display: flex; gap: 2px; }
.top-links a { padding: 8px 12px; border-radius: 10px; color: var(--muted) !important; font-weight: 500; text-decoration: none !important; white-space: nowrap; transition: background-color .15s ease, color .15s ease; }
.top-links a:hover { background: var(--surface-2); color: var(--text) !important; }
.dock-btn.is-cur { background: var(--dock-sel); color: #ffffff !important; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--primary); color: #ffffff; display: inline-grid; place-items: center;
  font-weight: 600; font-size: 14px; letter-spacing: .02em; flex: 0 0 auto; }
.avatar.is-lg { width: 52px; height: 52px; font-size: 17px; }
.avatar.is-xl { width: 88px; height: 88px; font-size: 28px; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.post-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--text) !important; text-decoration: none !important;
  transition: border-color .2s ease, transform .25s var(--ease), box-shadow .25s ease; }
.post-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 16px 32px -20px rgba(var(--shadow-rgb), 0.55); }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-title { margin: 0; font-family: var(--reading); font-size: 21px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
.pc-title .ic { font-size: .8em; }
.pc-dek { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1.5px solid var(--border); }
.pc-go { font-size: 13px; font-weight: 500; color: var(--primary-text); transition: transform .25s var(--ease); }
.post-card:hover .pc-go { transform: translateX(4px); }
.home-posts { margin-top: 22px; }

.post { display: flex; flex-direction: column; gap: 28px; }
.post-head { display: flex; flex-direction: column; gap: 14px; padding-bottom: 22px; border-bottom: 1.5px solid var(--border); }
.post-head .chip { text-decoration: none !important; }
.post-title { max-width: 24em; font-family: var(--reading); font-size: 38px; line-height: 1.12; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
.post-title .ic { font-size: .78em; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.by-text { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 0; }
.by-name { font-size: 15px; font-weight: 600; color: var(--text) !important; }
.post-body { gap: 20px; }
.post-body h2 { display: block; font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; margin-top: 30px; scroll-margin-top: 24px; }
.post-body > h2:first-child { margin-top: 0; }
.post-body h3 { font-family: var(--display); font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; margin-top: 12px; max-width: 66ch; scroll-margin-top: 24px; }
.post-body h4 { font-family: var(--display); font-size: 17px; line-height: 1.3; font-weight: 600; margin: 0; max-width: 66ch; }
.anchor { margin-left: 8px; color: var(--muted) !important; font-weight: 500; opacity: 0; text-decoration: none !important; transition: opacity .15s ease; }
.post-body h2:hover .anchor, .post-body h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
.post-body ul, .post-body ol { margin: 0; padding-left: 1.3em; max-width: 64ch; display: flex; flex-direction: column; gap: 8px; }
.post-body li > ul, .post-body li > ol { margin-top: 8px; }
.post-body li::marker { color: var(--primary-text); font-family: var(--display); font-weight: 500; }
.post-body blockquote { margin: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--primary); color: var(--muted); max-width: 62ch; display: flex; flex-direction: column; gap: 12px; }
.post-body hr { border: 0; height: 1.5px; width: 100%; max-width: 66ch; margin: 6px 0; background: var(--border); }
.post-body p a, .post-body li a { text-decoration: underline; text-decoration-color: var(--none-bar); text-underline-offset: 3px; }
.post-body p a:hover, .post-body li a:hover { text-decoration-color: var(--primary); }
.post-body strong { font-weight: 600; }
.cite { font-family: var(--display); font-size: .64em; font-weight: 500; line-height: 0; margin-left: 2px; }
.cite a { padding: 1px 4px; border-radius: 5px; background: var(--primary-soft); color: var(--primary-text) !important; text-decoration: none !important; transition: background-color .15s ease, color .15s ease; }
.cite a:hover { background: var(--primary); color: #ffffff !important; }
.sources { list-style: none; padding: 0 !important; max-width: 780px !important; gap: 0 !important; border-top: 1.5px solid var(--border); font-family: var(--display); font-size: 14px; line-height: 1.45; counter-reset: src; }
.sources li { counter-increment: src; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 8px; padding: 12px 8px; border-bottom: 1.5px solid var(--border); border-radius: 8px; scroll-margin-top: 30px; transition: background-color .3s ease; }
.sources li::before { content: counter(src); grid-row: span 2; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); font-family: var(--mono); font-size: 12px; font-weight: 500; }
.sources li a { color: var(--text) !important; font-weight: 500; text-decoration: none !important; overflow-wrap: anywhere; }
.sources li a:hover { color: var(--primary-text) !important; }
.sources li .note { grid-column: 2; }
.sources li:target { background: var(--primary-soft); }
.mm { max-width: 860px; border: 1.5px solid var(--border); border-radius: 20px; background: var(--surface); overflow: hidden; font-family: var(--display); font-size: 14px; line-height: 1.5; }
.mm-out { min-height: 64px; padding: 18px; overflow-x: auto; display: flex; justify-content: center; }
.mm-out svg { max-width: 100%; height: auto; }
.mm-out:empty::before { content: "Drawing the diagram"; color: var(--muted); font-size: 13px; align-self: center; }
.mm.is-failed .mm-out { display: none; }
.mm details { border-top: 1.5px solid var(--border); }
.mm summary { padding: 10px 16px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 500; }
.mm-src { margin: 0; padding: 0 16px 14px; overflow-x: auto; color: var(--muted); font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
.author-card { display: flex; align-items: flex-start; gap: 14px; max-width: 780px; }
.author-card .btn { align-self: flex-start; margin-top: 4px; }
.post-more { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }

.about { gap: 30px; }
.about-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.about-bio { max-width: 70ch; }
.skill-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 8px 16px; align-items: baseline; }
.skill-row + .skill-row { padding-top: 14px; border-top: 1.5px solid var(--border); }
.skill-row .chip { height: auto; min-height: 24px; padding: 4px 8px; white-space: normal; line-height: 1.3; }
@media (max-width: 760px) {
  .post-title { font-size: 30px; }
  .post-body h2 { font-size: 22px; }
  .post-body h3 { font-size: 18px; }
  .skill-row { grid-template-columns: minmax(0, 1fr); }
  .top-links a { padding: 8px; }
  .brand small { display: none; }
}

/* ---------- overviews before questions ---------- */
.q-over { margin: 0; color: var(--muted); font-family: var(--reading); font-size: 15.5px; line-height: 1.5; max-width: 68ch; }
.q-over .ic { font-size: .8em; }
.q-lede { margin: 0; max-width: 62ch; padding-left: 14px; border-left: 3px solid var(--primary); color: var(--muted);
  font-family: var(--reading); font-size: 18px; line-height: 1.55; }
.sub-over { margin: -2px 0 2px; color: var(--muted); font-family: var(--reading); font-size: 16px; line-height: 1.55; max-width: 70ch; }
.topic-over { display: flex; flex-direction: column; gap: 8px; max-width: 780px; }
.topic-over p { margin: 0; font-family: var(--reading); font-size: 17px; line-height: 1.6; }

/* ---------- companies and reported questions ---------- */
.co-logo { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; font-weight: 600; font-size: 15px;
  letter-spacing: .02em; color: hsl(var(--h) 55% 28%); background: hsl(var(--h) 70% 92%); border: 1.5px solid hsl(var(--h) 45% 80%); }
.theme-dark .co-logo { color: hsl(var(--h) 75% 82%); background: hsl(var(--h) 30% 20%); border-color: hsl(var(--h) 30% 32%); }
.co-logo.is-xl { width: 76px; height: 76px; border-radius: 20px; font-size: 26px; }
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.co-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; color: var(--text) !important; text-decoration: none !important;
  transition: border-color .2s ease, transform .25s var(--ease), box-shadow .25s ease; }
.co-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 12px 26px -18px rgba(var(--shadow-rgb), 0.55); }
.co-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.co-name { font-family: var(--reading); font-size: 19px; line-height: 1.2; font-weight: 500; }
.co-name + .note b { color: var(--text); font-variant-numeric: tabular-nums; }
.co-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.co-tags .chip { height: auto; min-height: 22px; padding: 3px 7px; white-space: normal; line-height: 1.25; font-size: 11.5px; }
.co-small { line-height: 1.7; }
.co-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.co-head .chip b { color: var(--text); margin-left: 3px; font-variant-numeric: tabular-nums; }
.co-bars { display: flex; flex-direction: column; gap: 2px; }
.co-bar { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 8px 8px 12px; border-radius: 10px;
  color: var(--text) !important; font-size: 14px; font-weight: 500; text-decoration: none !important; }
.co-bar:hover { background: var(--surface-2); }
.co-bar .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.co-bar i { position: absolute; left: 8px; bottom: 5px; height: 3px; border-radius: 3px; background: var(--primary); max-width: calc(100% - 16px); }
.rq-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rq { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.rq-strip .rq { background: var(--surface-2); border-color: transparent; }
.rq-t { margin: 0; font-family: var(--reading); font-size: 17px; line-height: 1.45; }
.rq-meta, .rq-foot { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.rq-meta .chip { text-decoration: none !important; }
.rq-meta .note a, .rq-foot .note a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--none-bar); text-underline-offset: 3px; }
.rq-ans { font-size: 13px; font-weight: 600; }
.rq-src { margin-left: auto; }
.rq-strip { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
@media (max-width: 760px) { .rq-src { margin-left: 0; } .co-logo.is-xl { width: 60px; height: 60px; font-size: 21px; } }

/* ---------- popular topics on Home ---------- */
.pop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pop-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--surface);
  border: 1.5px solid var(--border); color: var(--text) !important; text-decoration: none !important;
  transition: border-color .2s ease, transform .25s var(--ease), background-color .2s ease; }
.pop-card:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-2px); }
.pop-t { font-family: var(--reading); font-size: 19px; line-height: 1.2; font-weight: 500; }
.pop-n { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.pop-n b { color: var(--primary-text); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .pop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pop-t { font-size: 17px; } }

/* ---------- companies card on Home and the dock button ---------- */
.co-promo { padding: 22px; display: flex; flex-direction: column; gap: 14px; background: var(--primary-soft); border-color: transparent; }
.co-promo-head { display: flex; gap: 14px; align-items: flex-start; }
.co-promo-icon { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary); color: #ffffff; }
.co-promo-icon svg { width: 24px; height: 24px; }
.co-promo .note b { color: var(--text); font-variant-numeric: tabular-nums; }
.co-find { background: var(--surface); }
.co-hits { display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--border); overflow: hidden; }
.co-hits a { display: flex; align-items: center; gap: 10px; padding: 9px 14px; color: var(--text) !important; text-decoration: none !important; }
.co-hits a + a { border-top: 1.5px solid var(--border); }
.co-hits a:hover, .co-hits a.is-active { background: var(--surface-2); }
.co-hits .n, .co-chip .n { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.co-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.co-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 999px; background: var(--surface);
  border: 1.5px solid var(--border); color: var(--text) !important; font-size: 13.5px; font-weight: 500; text-decoration: none !important;
  transition: border-color .2s ease, transform .2s var(--ease); }
.co-chip:hover { border-color: var(--primary); transform: translateY(-1px); }
.co-chip .n { margin-left: 2px; }
.co-logo.is-sm { width: 26px; height: 26px; border-radius: 999px; font-size: 10.5px; border-width: 1px; }
.co-all { align-self: flex-start; }
.dock-co svg, .dock-ds svg { flex: 0 0 auto; }
@media (max-width: 760px) { .co-promo { padding: 18px; } .co-all { align-self: stretch; } }

.mm.is-wide .mm-out { justify-content: flex-start; }
.mm.is-wide::before { content: "Wide diagram: scroll sideways to see all of it"; display: block; padding: 10px 16px 0; color: var(--muted); font-size: 12.5px; }


/* ---------- Home: the library at a glance ---------- */
.glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.glance a, .glance div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2);
  color: var(--text) !important; text-decoration: none !important; transition: background-color .15s ease; }
.glance a:hover { background: var(--primary-soft); }
.glance b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--primary-text); }
.glance .wide { grid-column: 1 / -1; }
.home-glance-phone { display: none; }
@media (max-width: 760px) {
  .home-glance-phone { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13.5px; }
  .home-glance-phone b { color: var(--text); font-variant-numeric: tabular-nums; }
}

/* ---------- bottom bar that adapts to its contents ----------
   Nothing in the row shrinks. When the row does not fit, app.js adds c1, c2 ... to the dock until it does:
   c1 Articles into the menu, Companies as an icon; c2 search field becomes a search button; c3 tab arrows go;
   c4 subject tabs fold into one Subjects button; c5 review and theme move to the menu; c6 Companies moves to the menu; c7 the Known tick leaves the bar (it is also on the page). */
.dock-row > * { flex-shrink: 0; }
.dock-row > .grow { flex: 1 0 auto; }
.dock-row > .push { margin-left: auto; }
.dock-search { flex: 0 0 auto; }
.dock-find { display: none; }
.dock.c0 .dock-articles, .dock.c1 .dock-articles, .dock.c1 .dock-co span, .dock.c1 .dock-ds span { display: none !important; }
.dock.c2 .dock-search { display: none !important; }
.dock.c2 .dock-find { display: inline-flex; }
.dock.c3 .tab svg { display: none; }
.dock.c3 .tab { padding: 0 9px; }
.dock.c4 .tabs, .dock.c4 .dock-sep, .dock.c4 .dock-find { display: none !important; }
.dock.c4 .dock-menu { display: inline-flex !important; }
.dock.c5 .dock-review, .dock.c5 .dock-theme { display: none !important; }
.dock.c6 .dock-co, .dock.c6 .dock-ds { display: none !important; }
.dock.c7 .dock-row [data-mark="known"] { display: none !important; }
@media (max-width: 760px) { .dock-find { display: none !important; } }

/* ---------- company page: topic navigator, filters, compact questions ---------- */
.co-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 18px; }
.co-nav { position: sticky; top: 16px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; padding: 12px; gap: 8px; }
.co-nav-find input { width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 14px; outline: 0; }
.co-nav-find input:focus { border-color: var(--primary); }
.co-topics { overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding-right: 2px; }
.co-nav-h { padding: 12px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.co-topic { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text) !important;
  font-size: 14px; line-height: 1.3; text-decoration: none !important; transition: background-color .15s ease; }
.co-topic:hover { background: var(--surface-2); }
.co-topic .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.co-topic.is-on { background: var(--primary); color: var(--on-primary) !important; font-weight: 500; }
.co-topic.is-on .n { color: var(--on-primary); }
.co-topic.is-off { display: none; }
.co-body { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.co-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.co-q { flex: 1 1 260px; min-height: 42px; }
.co-q input { height: 38px; font-size: 15px; }
.co-sec { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.co-sec[hidden] { display: none !important; }
.co-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.co-sec-head b { color: var(--text); font-variant-numeric: tabular-nums; }
.rq-c { padding: 12px 16px; gap: 6px; }
.rq-c .rq-t { font-size: 16.5px; }
.rq-facts { margin: 0; color: var(--muted); font-size: 13px; }
.rq-c .rq-foot { gap: 6px 16px; }
.rq-c.is-extra, .rq-c.is-out { display: none; }
.co-sec.is-open .rq-c.is-extra { display: flex; }
.co-sec .rq-c.is-out { display: none !important; }
.co-sec.is-open .co-more { display: none; }
.co-more { align-self: flex-start; }
.rq-more-info summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.rq-more-info[open] summary { margin-bottom: 6px; }
.rq-more-info .note { margin: 0 0 4px; }
.rq-more-info a { color: var(--primary-text); }
@media (max-width: 900px) {
  .co-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .co-nav { position: sticky; top: 0; z-index: 5; max-height: none; flex-direction: row; padding: 8px; border-radius: 14px; }
  .co-nav-find { display: none; }
  .co-topics { flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 6px; scrollbar-width: none; }
  .co-topics::-webkit-scrollbar { display: none; }
  .co-nav-h { display: none; }
  .co-topic { flex: 0 0 auto; white-space: nowrap; border: 1.5px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; }
}

/* ---------- data structures ---------- */
.ds-card { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.ds-card .co-promo-icon { background: var(--primary-soft); color: var(--primary-text); }
.ds-card .note b { color: var(--text); font-variant-numeric: tabular-nums; }
.ds-steps { columns: 250px 3; column-gap: 14px; }
.ds-step { display: flex; break-inside: avoid; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--text) !important;
  text-decoration: none !important; min-width: 0; }
.ds-step:hover { background: var(--surface-2); }
.ds-k { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; background: var(--primary-soft); color: var(--primary-text); }
.ds-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-step .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ds-head { gap: 8px; }
.ds-blurb { font-family: var(--reading); font-size: 19px; line-height: 1.4; color: var(--muted); margin: 0; }
.ds-chips .filter .n { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-left: 2px; }
.ds-chips .filter.is-on .n { color: inherit; }
.ds-sec[hidden] { display: none !important; }
@media (max-width: 760px) { .ds-card { padding: 18px; } .ds-blurb { font-size: 17px; } }
@media (max-width: 600px) { .top-links .tl-ds { display: none; } }
.rq-t a { color: var(--text) !important; text-decoration: none !important; }
.rq-t a:hover { color: var(--primary-text) !important; text-decoration: underline !important; text-underline-offset: 3px; }

/* ---------- step-by-step pictures (data structures solutions) ---------- */
.prose .pc { max-width: 860px; font-family: var(--display); font-size: 14px; line-height: 1.5; }
.pc { border: 1.5px solid var(--border); border-radius: 20px; background: var(--surface); overflow: hidden; margin: 22px 0; }
.pc-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-ctl .btn { min-width: 64px; justify-content: center; }
.pc-count { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 84px; text-align: right; }
.pc-cap { margin: 0; padding: 12px 18px 0; font-family: var(--reading); font-size: 16px; color: var(--muted); }
.pc-frames { list-style: none; margin: 0; padding: 0; }
.pc-frame { padding: 14px 18px 16px; }
.pc-frame + .pc-frame { border-top: 1.5px dashed var(--border); }
.pc.is-js .pc-frame { display: none; border-top: 0; }
.pc.is-js .pc-frame.is-on { display: block; }
.pc-stage { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 22px; }
.pc-draw { max-width: 100%; overflow-x: auto; padding: 2px 0 4px; }
.pc-svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.pc-svg text { font-family: var(--mono); font-size: 15px; text-anchor: middle; fill: var(--text); }
.pc-cell rect, .pc-cell circle { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; transition: fill .25s var(--ease), stroke .25s var(--ease); }
.pc-cell.is-now rect, .pc-cell.is-now circle { fill: var(--mark); stroke: var(--mark); }
.pc-cell.is-now text { fill: var(--on-mark); font-weight: 600; }
.pc-cell.is-cmp rect, .pc-cell.is-cmp circle { fill: var(--warn-soft); stroke: var(--warn-bar); stroke-width: 2; }
.pc-cell.is-done rect, .pc-cell.is-done circle { fill: var(--surface-3); stroke: var(--border); }
.pc-cell.is-done text { fill: var(--muted); }
.pc-cell.is-found rect, .pc-cell.is-found circle { fill: var(--ok-soft); stroke: var(--ok-bar); stroke-width: 2.5; }
.pc-cell.is-found text { fill: var(--ok); font-weight: 600; }
.pc-cell.is-dim { opacity: .35; }
.pc-svg .pc-idx { font-size: 11px; fill: var(--muted); }
.pc-svg .pc-ptr { font-size: 12px; font-weight: 600; fill: var(--primary-text); }
.pc-ptr-ln { fill: var(--primary-text); }
.pc-svg .pc-ptr-side { text-anchor: end; }
.pc-arrow { stroke: var(--muted); stroke-width: 1.6; fill: none; }
.pc-arrow.is-back { stroke: var(--primary-text); stroke-width: 1.8; }
.pc-headp { fill: var(--muted); }
.pc-div { stroke: var(--border-strong); stroke-width: 1.2; }
.pc-cell.is-now .pc-div { stroke: var(--on-mark); opacity: .6; }
.pc-nil { stroke: var(--muted); stroke-width: 1.6; }
.pc-dot { fill: var(--muted); }
.pc-svg .pc-null { font-size: 12px; fill: var(--muted); text-anchor: start; }
.pc-edge { stroke: var(--border-strong); stroke-width: 1.5; }
.pc-base { stroke: var(--border-strong); stroke-width: 1.5; }
.pc-extra { fill: var(--primary-soft); stroke: var(--primary); stroke-width: 1; stroke-dasharray: 3 2; }
.pc-svg .pc-val { font-size: 12px; fill: var(--muted); }
.pc-vars { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; align-content: flex-start; }
.pc-vars div { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--border); min-width: 64px; }
.pc-vars dt { font-size: 12px; color: var(--muted); }
.pc-vars dd { margin: 0; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.pc-note { margin: 16px 0 0; display: flex; gap: 10px; align-items: baseline; font-family: var(--reading); font-size: 17px; line-height: 1.5; }
.pc.is-js .pc-note { min-height: 3em; }
.pc-n { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-family: var(--display); font-size: 12px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .pc-cell rect, .pc-cell circle { transition: none; } }

/* subject pages use the data structures layout; the area in view is marked as the reader scrolls */
.co-topic.is-here { background: var(--primary-soft); color: var(--primary-text) !important; font-weight: 500; }
.co-topic.is-here .n { color: var(--primary-text); }
.subj-sec { scroll-margin-top: 16px; }
.subj-sec + .subj-sec { margin-top: 18px; }
@media (max-width: 900px) { .subj-sec { scroll-margin-top: 76px; } }
.pop-card { min-width: 0; }
.pop-card .note, .pop-t { overflow-wrap: break-word; }

/* done and saved marks on the data structures lists */
.chip.is-done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.is-saved { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.rq-t .chip { font-family: var(--display); font-size: 12px; padding: 1px 8px; vertical-align: 2px; }
.ds-prog { margin: 2px 0 0; }

/* ---------- Home: what this is, one answer playing, where to start ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-bottom: 32px; }
.hero.has-demo { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
.hero-text { display: flex; flex-direction: column; gap: 18px; padding-top: 10px; min-width: 0; }
.hero-h { font-family: var(--reading); font-size: 44px; line-height: 1.08; font-weight: 500; letter-spacing: -0.022em; text-wrap: balance; max-width: 17em; }
.hero-lead { font-family: var(--reading); font-size: 19px; line-height: 1.5; color: var(--muted); max-width: 34em; text-wrap: pretty; }
.hero-lead b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-cta .btn { min-height: 46px; padding: 0 22px; font-size: 15px; }
.hero-search { gap: 10px; margin-top: 6px; }
.hero-demo { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hero-demo-top { display: flex; flex-direction: column; gap: 2px; }
.hero-demo-q { font-family: var(--reading); font-size: 22px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; color: var(--text) !important; }
.hero-demo .pc { margin: 0; box-shadow: 0 24px 48px -32px rgba(var(--shadow-rgb), 0.45); }
.hero-demo .pc-cap { display: none; }
.hero-demo .pc.is-js .pc-note { min-height: 4.6em; }
.hero-demo > .btn { align-self: flex-start; }
@media (max-width: 1040px) {
  .hero.has-demo { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-h { font-size: 38px; }
}
@media (max-width: 760px) {
  .hero { margin-bottom: 24px; gap: 24px; }
  .hero-text { gap: 14px; padding-top: 0; }
  .hero-h { font-size: 30px; line-height: 1.12; }
  .hero-lead { font-size: 17px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-demo-q { font-size: 19px; }
}

.path-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.path-card { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; min-width: 0; }
.path-card .sub-h a { color: var(--text) !important; }
.path-steps { margin: 6px 0 2px; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 9px; }
.path-steps li { counter-increment: step; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 14px; line-height: 1.4; }
.path-steps li::before { content: counter(step); font-family: var(--mono); font-size: 12px; color: var(--primary-text); }
.path-steps a { color: var(--text) !important; }
.path-steps a:hover { color: var(--primary-text) !important; }
.path-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.path-foot .btn { align-self: flex-start; }
.start { scroll-margin-top: 20px; }
.level-block { margin-top: 6px; }
.level-block .sub-h { scroll-margin-top: 20px; }
#lvl-about { max-width: 78ch; min-height: 2.9em; }

/* ---------- a place to start, as its own page ---------- */
.path-now { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.path-list { margin: 0; padding: 0; list-style: none; counter-reset: row; display: flex; flex-direction: column; gap: 8px; }
.path-row { counter-increment: row; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  padding: 14px 18px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); transition: border-color .2s ease; }
.path-row:hover { border-color: var(--primary); }
.path-row::before { content: counter(row); grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-text); font-family: var(--mono); font-size: 13px; font-weight: 500; }
.path-row.is-done::before { content: "\2713"; background: var(--ok-bar); color: #fff; font-family: var(--display); font-weight: 700; }
.path-q { grid-column: 2; font-size: 16px; line-height: 1.4; font-weight: 500; letter-spacing: -0.01em; color: var(--text) !important; text-wrap: pretty; }
.path-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.path-row > .chip { grid-column: 3; grid-row: 1 / span 2; }
.path-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 8px 8px 16px;
  border-radius: 14px; background: var(--primary-soft); color: var(--text); font-size: 14px; }
.path-strip a:not(.btn) { font-weight: 600; }
.path-strip .btn { min-height: 34px; background: var(--surface); border-color: var(--surface); }
@media (max-width: 760px) {
  .path-row { grid-template-columns: 30px minmax(0, 1fr); padding: 12px 14px; }
  .path-row > .chip { grid-column: 2; grid-row: auto; justify-self: start; }
  .path-now .btn { flex: 1 1 100%; }
}

/* ---------- three ways to read one answer ---------- */
.mode-seg { align-self: flex-start; margin-top: 2px; }
.is-held { display: none !important; }
body[data-mode="quick"] #article > [data-part]:not(#faq):not(#say) { display: none; }
body[data-mode="quick"] .side .outline, body[data-mode="practice"] .side .outline { opacity: .45; }
.quick, .practice { padding: 24px 26px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--surface); max-width: 860px; }
.prose .quick h2, .prose .practice h2 { margin-top: 0; }
.quick h3 { font-family: var(--display); font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--muted); margin: 6px 0 -8px; }
.quick .summary { font-size: 1em; }
.quick .dg, .quick .codeblock { font-family: var(--display); font-size: 14px; line-height: 1.5; }
.quick-more { margin-top: 4px; font-family: var(--display); }
.practice { background: var(--primary-soft); border-color: transparent; }
.practice textarea { width: 100%; max-width: 66ch; min-height: 132px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-family: var(--reading); font-size: 17px; line-height: 1.5; resize: vertical; }
.practice textarea:focus-visible { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(91, 63, 224, 0.18); }
.practice .row-gap { font-family: var(--display); font-size: 14px; }
.practice .btn:not(.is-primary) { background: var(--surface); }
@media (max-width: 760px) {
  .mode-seg { align-self: stretch; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mode-seg button { padding: 0 6px; display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
  .mode-seg button span { margin-left: 0; }
  .quick, .practice { padding: 18px; }
}

/* ---------- what to say: the opening first, the rest in short paragraphs ---------- */
.say-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.say-time { font-family: var(--display); font-size: 13px; color: var(--dock-muted); }
.say-h { font-family: var(--display); font-size: 12.5px; font-weight: 600; color: var(--dock-accent); margin-bottom: -8px; }
.say-lead { font-size: 1.1em; line-height: 1.5; color: #ffffff; }
.say p + .say-h { margin-top: 6px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.16); }

/* ---------- about this answer ---------- */
.facts { max-width: 860px; padding: 22px 24px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--surface);
  font-family: var(--display); font-size: 14px; line-height: 1.5; gap: 14px !important; margin-top: 18px; }
.facts-list { margin: 0; display: grid; gap: 10px; }
.facts-list div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 4px 16px; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; text-wrap: pretty; }
.report { border-top: 1.5px solid var(--border); padding-top: 14px; }
.report summary { cursor: pointer; font-weight: 600; color: var(--primary-text); width: fit-content; border-radius: 6px; }
.report[open] summary { margin-bottom: 10px; }
.report-line { margin: 8px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-family: var(--mono); font-size: 13px;
  overflow-wrap: anywhere; user-select: all; }
@media (max-width: 760px) { .facts { padding: 18px; } .facts-list div { grid-template-columns: minmax(0, 1fr); } }

/* ---------- search results in groups ---------- */
.hit-h { margin: 0; padding: 12px 20px 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-top: 1.5px solid var(--border); }
.hit-h + .hit { border-top: 0; }
.dock .hit-h { padding: 10px 8px 2px; color: var(--dock-muted); border-top: 1px solid rgba(255, 255, 255, 0.14); margin-top: 6px; }

/* ---------- how this library is made ---------- */
.method { max-width: 70ch; }
.method section { scroll-margin-top: 24px; }
.method ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 10px; }
.foot a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--none-bar); text-underline-offset: 3px; }
.foot { line-height: 1.55; max-width: 1320px; }

/* ---------- the dock steps aside while the reader moves down the page ---------- */
.lib { scroll-padding-bottom: 96px; }
.dock-wrap { transition: transform .34s var(--ease); }
.dock-wrap.is-away { transform: translateY(calc(100% + 12px)); }
.dock { box-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.16), 0 12px 28px -14px rgba(var(--shadow-rgb), 0.45); }
.dock-row { min-height: 56px; padding: 6px; }
@media print { .mode-seg, .practice, .quick, .report, .path-strip { display: none !important; } }

/* second review: the path a question belongs to, written into the page */
.path-end { display: grid; gap: 10px; max-width: 780px; margin-top: 8px; }
.pager-h { margin: 18px 0 0; font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--muted); }
.path-end .pager-h { margin-top: 0; }
.path-end .pager-h a { margin-left: 10px; font-weight: 500; }
.next-card.is-next { background: var(--primary-soft); border-color: transparent; }
.next-card.is-next .note { color: var(--primary-text); }
/* Practice: a coding question shows its heading and the picture of its example, nothing that explains the method */
.is-held-text > :not(h2):not(.pc):not(.assume) { display: none !important; }
body[data-holding] [data-spoils], body[data-holding] #facts { display: none !important; }
body[data-mode="practice"] .side .outline { opacity: 1; }
/* a short link to another page stays in one piece, so it is never split across two lines */
.facts-list a[href^="/"], .method a[href^="/"], .note a[href^="/"], .lead a[href^="/"] { white-space: nowrap; }
.prose .pager-h + .pager { margin-top: 10px; }
/* what a coding solution assumes: part of the problem in Practice, hidden once the prose that says the same is shown */
.assume { display: none; max-width: 860px; padding: 18px 22px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface);
  font-family: var(--display); font-size: 14.5px; line-height: 1.5; }
.is-held-text > .assume { display: block; }
.prose .assume h3 { margin: 0 0 10px; font-size: 15px; }
.prose .assume dl { margin: 0; }
.prose .assume dt { margin: 12px 0 0; font-weight: 600; }
.prose .assume dt:first-child { margin-top: 0; }
.prose .assume dd { margin: 2px 0 0; color: var(--muted); }
body[data-mode="practice"] #article > .practice { margin-top: 24px; }
@media print { .assume { display: none !important; } }

/* 2026-11-21: Step by step starts at the first section. The short answer belongs to Quick revision and to Practice,
   where it is the first part revealed; it is not repeated at the top of the full explanation. */
.opening { display: none; }
body[data-mode="practice"] .opening { display: block; }
.why { max-width: 860px; margin: 0 0 6px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); font-family: var(--display); }
.why > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 14px 8px 16px;
  font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; list-style: none; }
.why > summary::-webkit-details-marker { display: none; }
.why > summary svg { flex: none; transition: transform .2s var(--ease); }
.why[open] > summary svg { transform: rotate(45deg); }
.why > summary:hover { color: var(--text); }
.prose .why > p { margin: 0; padding: 0 16px 14px; font-family: var(--reading); font-size: 16px; line-height: 1.6; color: var(--muted); }
body[data-mode="quick"] .why { display: none; }
@media print { .why { display: none; } }

/* ---------- live examples (2026-11-21): a simulation the reader operates, beside the answer it explains ----------
   An example is a stage of its own, not another card: a dark, dotted top half where the system is drawn and moves,
   and a paper half under it that says what just happened. The stage keeps its colours in both themes. */
.lab { --st-bg: #21174F; --st-bg-2: #2C2068; --st-line: rgba(255, 255, 255, 0.16); --st-text: #F4F1FF; --st-muted: #C6BCF0;
  --st-ask: #CFC4FF; --st-answer: #63E6A6; --st-warn: #FFD27A; --st-dots: radial-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1.5px);
  max-width: 860px; border: 1.5px solid var(--border); border-radius: 22px; background: var(--surface); overflow: hidden; scroll-margin-top: 16px;
  box-shadow: 0 26px 48px -34px rgba(var(--shadow-rgb), 0.6); }
.theme-dark .lab { --st-bg: #1B1540; --st-bg-2: #251C52; border-color: #3A3160; }
.lab + .prose, .lab + .lab-more { margin-top: 18px; }
.lab-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 20px 18px 22px;
  background: var(--st-dots) 0 0 / 18px 18px, var(--st-bg); color: var(--st-text); }
.lab-intro { flex: 1 1 320px; display: grid; gap: 5px; min-width: 0; }
.lab-tag { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.14);
  color: #fff; font-size: 12px; font-weight: 600; }
.lab-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--st-answer); animation: lab-pulse 1.8s ease-in-out infinite; }
@keyframes lab-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(99, 230, 166, 0.55); } 60% { box-shadow: 0 0 0 7px rgba(99, 230, 166, 0); } }
.lab .lab-title { margin: 2px 0 0; font-family: var(--reading); font-size: 23px; line-height: 1.22; font-weight: 500; letter-spacing: -0.01em; color: #fff; }
.lab-goal { color: var(--st-muted); font-size: 14.5px; line-height: 1.5; max-width: 60ch; }
.lab .lab-open { min-width: 116px; min-height: 46px; justify-content: center; font-weight: 600; background: #fff; border-color: #fff; color: var(--st-bg) !important; }
.lab .lab-open:hover { background: var(--st-ask); border-color: var(--st-ask); color: var(--st-bg) !important; }
.lab.is-open .lab-open { background: transparent; border-color: rgba(255, 255, 255, 0.45); color: #fff !important; }
.lab.is-open .lab-open:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
.lab-head :focus-visible, .lab-dark :focus-visible { outline-color: #fff; }
.lab-body { display: grid; }
.lab-body > .lab-text { margin: 16px 20px 0; }
.lab-body > .lab-assume { margin: 14px 20px 20px; }
.lab-app { display: grid; }

/* the dark half: what the reader can set, then the stage */
.lab-dark { display: grid; gap: 14px; padding: 0 20px 20px; background: var(--st-dots) 0 0 / 18px 18px, var(--st-bg); color: var(--st-text); }
.lab-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 22px; padding-top: 14px; border-top: 1px solid var(--st-line); }
.lab-control { display: grid; gap: 6px; min-width: 0; }
.lab-label { font-size: 12.5px; font-weight: 600; color: var(--st-muted); }
.lab-dark .seg { flex-wrap: wrap; background: rgba(255, 255, 255, 0.1); }
.lab-dark .seg button { min-height: 40px; color: var(--st-text); }
.lab-dark .seg button:hover { color: #fff; }
.lab-dark .seg button.is-on { background: #fff; color: var(--st-bg); }
.lab-num { display: inline-flex; align-items: center; gap: 6px; }
.lab-num .btn { min-width: 44px; min-height: 44px; padding: 0; justify-content: center; font-size: 19px; line-height: 1; background: transparent;
  border-color: rgba(255, 255, 255, 0.4); color: #fff !important; }
.lab-num .btn:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
.lab-num output { min-width: 34px; text-align: center; font-family: var(--mono); font-size: 19px; font-weight: 600; color: #fff; }
.lab-run { margin-left: auto; display: flex; gap: 8px; }
.lab-runbtn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; min-width: 92px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.4); background: transparent; color: #fff; font-size: 14px; font-weight: 600; transition: background .2s, border-color .2s; }
.lab .lab-runbtn { color: #fff; }
.lab-runbtn:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
.lab .lab-runbtn[data-play] { background: #fff; border-color: #fff; color: var(--st-bg); }
.lab .lab-runbtn[data-play]:hover { background: var(--st-ask); border-color: var(--st-ask); }
.lab .lab-runbtn[data-play].is-on { background: transparent; border-color: #fff; color: #fff; }

/* the stage. What is drawn on it is light, in both themes, so the palette of the light theme is fixed here. */
.lab-stage { --surface: #FFFFFF; --surface-2: #F1EEF8; --surface-3: #EAE6F4; --border: #E7E3F0; --text: #1D1830; --muted: #5C5870;
  --primary: #5B3FE0; --on-primary: #FFFFFF; --primary-soft: #EFEBFF; --primary-text: #4A31B0;
  --ok: #1F7A4D; --ok-soft: #E7F5EC; --ok-bar: #1F7A4D; --warn: #8A5A00; --warn-soft: #FFF3D6; --warn-bar: #C98A00;
  container-type: inline-size; display: grid; gap: 14px; padding: 16px; border-radius: 18px; background: var(--st-bg-2); border: 1px solid var(--st-line);
  color: var(--st-text); min-width: 0; }
.lab-stage code, .lab-panel code, .lab-side code { font-family: var(--mono); font-size: .86em; }
.lab-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.lab-tile { flex: 1 1 104px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--st-line); min-width: 0; }
.lab-tile dt { font-size: 11.5px; color: var(--st-muted); }
.lab-tile dd { margin: 0; font-family: var(--mono); font-size: 20px; line-height: 1.3; font-weight: 600; color: #fff; }
.lab-tile.is-warn dd { color: var(--st-warn); }
.lab-tile.is-bump { animation: lab-bump .6s var(--ease); }
@keyframes lab-bump { 0% { background: rgba(255, 255, 255, 0.34); transform: scale(1.05); } 100% { background: rgba(255, 255, 255, 0.08); transform: none; } }
.lab-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--st-muted); }
.lab-key span { display: inline-flex; align-items: center; gap: 6px; }
.lab-key span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--st-ask); }
.lab-key .k-answer::before, .lab-key .k-ok::before { background: var(--st-answer); }
.lab-key .k-warn::before { background: var(--st-warn); }

/* cache, service, database: stacked on a narrow stage, in a row on a wide one */
.lab-chain { display: grid; }
.lab-node { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 10px; padding: 12px 14px; border-radius: 16px;
  background: var(--surface); color: var(--text); transition: box-shadow .25s var(--ease), transform .25s var(--ease); min-width: 0; }
.lab-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--primary); }
.n-cache .lab-ico { background: #1B8A9A; }
.n-db .lab-ico { background: #3D7BD9; }
.lab-nname { display: grid; min-width: 0; }
.lab-nname b { font-size: 15px; line-height: 1.25; }
.lab-nname small { color: var(--muted); font-size: 12.5px; }
.lab-node.is-now { box-shadow: 0 0 0 3px var(--st-ask), 0 16px 30px -14px rgba(0, 0, 0, 0.7); transform: translateY(-2px); }
.lab-entry { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 7px 10px; border-radius: 10px;
  background: var(--surface-2); font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.lab-entry small { color: var(--muted); font-size: 12.5px; }
.lab-entry.is-none { color: var(--muted); font-style: italic; background: transparent; border: 1.5px dashed #C9C3DA; }
.lab-entry.is-ok, .lab-entry.is-new { background: var(--ok-soft); color: var(--ok); }
.lab-entry.is-ok small, .lab-entry.is-new small { color: var(--ok); }
.lab-entry.is-new { outline: 2px solid var(--ok-bar); outline-offset: -2px; animation: lab-in .28s var(--ease); }
.lab-entry.is-stale { background: var(--warn-soft); color: var(--warn); }
.lab-entry.is-gone { color: var(--muted); text-decoration: line-through; }
.lab-wire { position: relative; display: flex; align-items: center; min-height: 54px; padding-left: 56px; }
.lab-track { position: absolute; left: 31px; top: 5px; bottom: 5px; width: 3px; border-radius: 3px;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.34) 0 5px, transparent 5px 10px); }
.lab-wire.is-on .lab-track { background: var(--st-ask); }
.lab-wire.is-on.is-answer .lab-track { background: var(--st-answer); }
.lab-track i { display: none; position: absolute; left: 50%; top: 0; width: 12px; height: 12px; margin: 0 0 0 -6px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25); }
.lab-wire.is-on .lab-track i { display: block; animation: lab-down 1.15s var(--ease) infinite; }
.lab-wire.is-on.is-back .lab-track i { animation-name: lab-up; }
@keyframes lab-down { 0% { top: -4px; opacity: 0; } 15%, 80% { opacity: 1; } 100% { top: calc(100% - 8px); opacity: 0; } }
@keyframes lab-up { 0% { top: calc(100% - 8px); opacity: 0; } 15%, 80% { opacity: 1; } 100% { top: -4px; opacity: 0; } }
@keyframes lab-right { 0% { left: -4px; opacity: 0; } 15%, 80% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
@keyframes lab-left { 0% { left: calc(100% - 8px); opacity: 0; } 15%, 80% { opacity: 1; } 100% { left: -4px; opacity: 0; } }
.lab-msg { padding: 5px 10px; border-radius: 10px; background: var(--st-ask); color: #1D1830; font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere;
  animation: lab-in .28s var(--ease); }
.lab-wire.is-answer .lab-msg { background: var(--st-answer); color: #0F2A1D; }
@keyframes lab-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@container (min-width: 600px) {
  .lab-chain { grid-template-columns: minmax(0, 1fr) minmax(92px, 0.6fr) minmax(0, 1fr) minmax(92px, 0.6fr) minmax(0, 1fr); align-items: stretch; }
  .lab-node { align-content: start; }
  .lab-wire { display: grid; grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; min-height: 0; padding: 0 4px; }
  .lab-msg { grid-row: 1; align-self: end; justify-self: center; margin-bottom: 9px; text-align: center; max-width: 100%; }
  .lab-track { grid-row: 2; position: relative; left: auto; top: auto; bottom: auto; width: 100%; height: 3px;
    background: repeating-linear-gradient(to right, rgba(255, 255, 255, 0.34) 0 5px, transparent 5px 10px); }
  .lab-track i { left: 0; top: 50%; margin: -6px 0 0; }
  .lab-wire.is-on .lab-track i { animation-name: lab-right; }
  .lab-wire.is-on.is-back .lab-track i { animation-name: lab-left; }
}

/* two transactions and the row they share */
.lab-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--surface); color: var(--text); }
.lab-row > b { flex: 1 1 100%; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.lab-ver { padding: 5px 10px; border-radius: 10px; font-size: 13.5px; background: var(--surface-2); }
.lab-ver.is-ok { background: var(--ok-soft); color: var(--ok); }
.lab-ver.is-warn { background: var(--warn-soft); color: var(--warn); }
.lab-ver.is-snap { background: var(--primary-soft); color: var(--primary-text); }
.lab-lanes { display: grid; gap: 7px; }
.lab-lane-h, .lab-lane-r { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.lab-lane-h b { justify-self: start; padding: 4px 14px; font-size: 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: var(--st-text); }
.lab-lane-h b.is-now { background: #fff; color: var(--st-bg); }
.lab-stmt { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--surface); color: var(--text); border-left: 6px solid #A996FF;
  font-size: 13px; min-width: 0; }
.lab-stmt[data-who="t2"] { border-left-color: #5CD4E6; }
.lab-stmt code { overflow-wrap: anywhere; }
.lab-stmt span { color: var(--muted); }
.lab-stmt.is-new { box-shadow: 0 0 0 3px var(--st-ask); animation: lab-in .28s var(--ease); }
.lab-stmt.is-new span { color: var(--text); font-weight: 600; }
.lab-lane-r.is-later, .lab-ver.is-later { visibility: hidden; }

/* a topic's partitions and the group's consumers; each consumer has a colour, always its name, and a line to what it reads */
.lab-stage .c0 { --c: #A996FF; } .lab-stage .c1 { --c: #63E6A6; } .lab-stage .c2 { --c: #FFD27A; }
.lab-stage .c3 { --c: #5CD4E6; } .lab-stage .c4 { --c: #FF8CC6; } .lab-stage .c5 { --c: #7DB4FF; }
.lab-assign { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px 76px; align-items: start; }
.lab-col { position: relative; z-index: 1; display: grid; gap: 8px; min-width: 0; }
.lab-col > b { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--st-muted); font-weight: 600; }
.lab-part, .lab-con { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 46px; padding: 7px 10px; border-radius: 12px;
  background: var(--surface); color: var(--text); font-size: 13px; min-width: 0; transition: box-shadow .25s var(--ease); }
.lab-part { border-right: 7px solid var(--c); }
.lab-con { border-left: 7px solid var(--c); }
.lab-part.is-now, .lab-con.is-now { box-shadow: 0 0 0 3px #fff, 0 14px 26px -14px rgba(0, 0, 0, 0.7); }
.lab-pname { font-family: var(--mono); font-weight: 600; }
.lab-cname { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #1D1830;
  font-family: var(--mono); font-size: 12px; font-weight: 700; }
.lab-recs { display: inline-flex; flex-wrap: wrap; gap: 4px; flex: 1 1 60px; min-width: 0; }
.lab-recs i { font-style: normal; font-family: var(--mono); font-size: 12px; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); }
.lab-recs i.is-new { background: var(--primary); color: var(--on-primary); animation: lab-in .28s var(--ease); }
.lab-recs em { color: var(--muted); font-size: 12px; }
.lab-owner { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lab-con.is-idle { background: var(--warn-soft); color: var(--warn); outline: 2px dashed var(--warn-bar); outline-offset: -2px; }
.lab-con small { flex: 1 1 100%; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.lab-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.lab-links path { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linecap: round; opacity: .8; }
.lab-links path.is-now { stroke-width: 4.5; opacity: 1; stroke-dasharray: 1 10; animation: lab-dash .7s linear infinite; }
@keyframes lab-dash { to { stroke-dashoffset: -22; } }
@container (max-width: 470px) { .lab-assign { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

/* the paper half: where the reader is, what this step did, and the way on */
.lab-light { display: grid; gap: 16px; padding: 18px 20px 20px; }
.lab-line { display: flex; flex-wrap: wrap; row-gap: 8px; margin: 0; padding: 0; list-style: none; }
.lab-line li { display: flex; align-items: center; }
.lab-line li + li::before { content: ""; width: 16px; height: 3px; background: var(--none-bar); }
.lab-line li.is-done + li::before { background: var(--primary); }
.lab-line button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); font-family: var(--mono); font-size: 13px; }
.lab-line button.is-done { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); }
.lab-line button.is-now { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; box-shadow: 0 0 0 4px var(--primary-soft); }
.lab-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.lab-panel, .lab-side { display: grid; gap: 10px; align-content: start; min-width: 0; }
.lab-step-n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.lab .lab-step-t { margin: 0; font-family: var(--reading); font-size: 22px; line-height: 1.25; font-weight: 500; outline-offset: 4px; }
.lab-step-x { font-family: var(--reading); font-size: 16.5px; line-height: 1.55; }
.lab-changed { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; }
.lab-changed > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.lab-changed ul, .lab-assume ul { margin: 4px 0 0; padding-left: 18px; }
.lab-predict { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); font-size: 14.5px; }
.lab-predict > p:first-child { font-weight: 600; }
.lab-options { display: flex; flex-wrap: wrap; gap: 8px; }
.lab-options .btn { background: var(--surface); min-height: 44px; }
.lab-options .btn.is-chosen { background: var(--primary); border-color: var(--primary); color: var(--on-primary) !important; }
.lab-wait { color: var(--primary-text); }
.lab-verdict.is-ok b { color: var(--ok); }
.lab-verdict.is-no b { color: var(--warn); }
.lab-result { padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--ok-bar); background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 14.5px; }
.lab-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lab-nav .btn { min-height: 46px; padding: 8px 20px; }
.lab-nav [data-back] { min-width: 88px; justify-content: center; }
.lab-nav [data-next] { flex: 0 1 auto; min-width: 180px; justify-content: center; white-space: normal; text-align: center; line-height: 1.3; }
.lab-keys { color: var(--muted); font-size: 12.5px; margin-left: 4px; }

/* the same example as text, and what it leaves out */
.lab-text { border: 1.5px solid var(--border); border-radius: 14px; }
.lab-text > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 14px 8px 16px; cursor: pointer;
  list-style: none; font-size: 14px; font-weight: 500; }
.lab-text > summary::-webkit-details-marker { display: none; }
.lab-text > summary svg { flex: none; transition: transform .2s var(--ease); }
.lab-text[open] > summary svg { transform: rotate(45deg); }
.lab-text-in { padding: 0 18px 14px; font-family: var(--reading); font-size: 16px; line-height: 1.55; }
.lab-text-in h4 { margin: 12px 0 4px; font-family: var(--display); font-size: 14.5px; }
.lab-text-in ol { margin: 0 0 6px; padding-left: 22px; }
.lab-text-in li { margin: 2px 0; }
.lab-text-in p { color: var(--muted); }
.lab-assume { font-size: 13.5px; color: var(--muted); }
.lab-assume > span { font-weight: 600; font-size: 12.5px; }
.lab-more { max-width: 860px; margin-bottom: 26px; display: grid; gap: 6px; }
.lab-more ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14.5px; }

/* the short form on Home: the picture, the step and Next */
.lab.is-mini { max-width: none; }
.lab.is-mini .lab-head { padding: 16px 18px 14px 20px; }
.lab.is-mini .lab-title { font-size: 20px; }
.lab.is-mini .lab-light { gap: 12px; padding: 16px 20px 18px; }
.lab.is-mini .lab-tiles { display: none; }
.lab.is-mini .lab-main { grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; min-height: 172px; }
.lab.is-mini .lab-panel { min-height: 0; gap: 8px; }
.lab.is-mini .lab-changed { padding: 0; background: none; color: var(--muted); }
.lab.is-mini .lab-changed > span::after { content: ": "; }
.lab.is-mini .lab-changed ul { display: inline; margin: 0; padding: 0; }
.lab.is-mini .lab-changed li { display: inline; }
.lab.is-mini .lab-changed li + li::before { content: "; "; }
.lab.is-mini .lab-step-t { font-size: 19px; }
.lab.is-mini .lab-step-x { font-size: 15.5px; }
.lab-more-link { color: #fff !important; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 760px) {
  .lab-main { grid-template-columns: minmax(0, 1fr); }
  .lab-head { padding: 16px; }
  .lab-dark { padding: 0 14px 16px; }
  .lab-light { padding: 16px 14px 18px; }
  .lab-body > .lab-text { margin: 14px 14px 0; }
  .lab-body > .lab-assume { margin: 12px 14px 18px; }
  .lab-stage { padding: 12px; }
  .lab .lab-open { flex: 1 1 100%; }
  .lab-run { margin-left: 0; flex: 1 1 100%; }
  .lab-runbtn { flex: 1 1 0; }
  .lab-nav [data-next] { flex: 1 1 180px; }
  .lab-keys { display: none; }
  .lab-panel { min-height: 168px; }
  .lab.is-mini .lab-panel { min-height: 0; }
}
@media (max-width: 520px) { .lab-line button { width: 33px; height: 33px; } .lab-line li + li::before { width: 8px; } }
@media (prefers-reduced-motion: reduce) {
  .lab-msg, .lab-stmt.is-new, .lab-recs i.is-new, .lab-entry.is-new, .lab-tile.is-bump, .lab-tag::before, .lab-links path.is-now { animation: none; }
  .lab-wire.is-on .lab-track i { display: none; animation: none; }
  .lab-node, .lab-part, .lab-con { transition: none; }
}
@media print { .lab-app, .lab-open { display: none !important; } .lab-body[hidden] { display: grid !important; } }

/* ---------- Back / Next rows (2026-11-21): one layout wherever the reader steps ----------
   Every stepping button is at least 44 px high, sits 8 px from its neighbour, and keeps its place: on a narrow screen
   the row becomes a grid of equal buttons under the title instead of wrapping one button at a time. */
.walk-ctl, .pc-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.walk-ctl .btn, .pc-ctl .btn { min-height: 44px; min-width: 76px; padding: 0 18px; justify-content: center; }
.walk-ctl .btn.is-quiet { min-width: 0; padding: 0 14px; }
.walk-count, .pc-count { min-width: 0; margin-left: 4px; text-align: left; white-space: nowrap; }
.lib .pc-note { margin-top: 16px; }
.path-strip { padding: 8px 8px 8px 16px; }
.path-strip .btn { min-height: 44px; padding: 0 18px; }
.dock-btn.is-go { min-width: 64px; padding: 0 18px; margin-left: 4px; }
.next-card { min-height: 76px; justify-content: flex-start; }
.next-card.is-next .note::after { content: " \2192"; }
.pager { gap: 12px; }
@media (max-width: 560px) {
  .walk-bar { padding: 12px 14px; gap: 10px; }
  .walk-bar .card-h { flex: 1 1 100%; }
  .walk-ctl, .pc-ctl { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .walk-ctl .btn, .pc-ctl .btn { min-width: 0; padding: 0 8px; }
  .walk-ctl [data-walk-start] { grid-column: 1 / -1; }
  .walk-count, .pc-count { grid-column: 1 / -1; margin-left: 2px; }
  .path-strip { padding: 10px 10px 10px 14px; }
  .path-strip .btn { flex: 1 1 100%; }
}

/* ---------- Home (2026-11-21): one dark band that says what this is and runs one flow, then everything as cards ----------
   The band is the same stage material the flows are drawn on. Its two halves share one top edge and one bottom
   edge: the title starts where the flow starts, and the facts end where its Next button ends. One filled button on
   the page, in the band; cards carry the soft button, so nothing competes with it. */
.hero3 { --st-bg: #21174F; --st-bg-2: #2C2068; --st-line: rgba(255, 255, 255, 0.16); --st-text: #F4F1FF; --st-muted: #C6BCF0; --st-ask: #CFC4FF; --st-answer: #63E6A6;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); align-items: stretch; gap: 0; margin: 6px 0 52px; padding: 38px 0;
  border-radius: 30px; background: radial-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1.5px) 0 0 / 18px 18px, var(--st-bg); color: var(--st-text);
  box-shadow: 0 40px 70px -46px rgba(var(--shadow-rgb), 0.8); }
.theme-dark .hero3 { --st-bg: #1B1540; --st-bg-2: #251C52; box-shadow: none; outline: 1.5px solid #3A3160; outline-offset: -1.5px; }
.hero3-text { display: flex; flex-direction: column; gap: 22px; min-width: 0; padding: 0 48px 0 52px; }
.hero3-demo { min-width: 0; padding: 0 52px 0 48px; border-left: 1px solid var(--st-line); }
.hero3 .hero-h { font-size: 52px; line-height: 1.05; letter-spacing: -0.028em; max-width: none; color: #fff; }
.hero3 .hero-lead { font-size: 19px; line-height: 1.5; max-width: 30em; color: #DCD5FB; }
.hero3 .hero-lead b { color: #fff; }
.hero3 .hero-search { margin-top: 2px; gap: 12px; }
.hero3 .search { min-height: 58px; padding: 0 20px; border-color: transparent; background: #fff; color: #1D1830; }
.hero3 .search:focus-within { border-color: var(--st-ask); box-shadow: 0 0 0 4px rgba(207, 196, 255, 0.35); }
.hero3 .search input { font-size: 17px; color: #1D1830; }
.hero3 .search input::placeholder { color: #5C5870; }
.hero3 .note { color: var(--st-muted); }
.hero3 .filter { border-color: rgba(255, 255, 255, 0.32); color: #fff; }
.hero3 .filter:hover { border-color: #fff; background: rgba(255, 255, 255, 0.14); color: #fff; }
.hero3 :focus-visible { outline-color: #fff; }
.home-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.home-go .btn { min-height: 52px; padding: 0 28px; font-size: 15.5px; font-weight: 600; }
.hero3 .home-go .btn { background: transparent; border-color: rgba(255, 255, 255, 0.45); color: #fff !important; }
.hero3 .home-go .btn:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
.hero3 .home-go .btn.is-primary { background: #fff; border-color: #fff; color: var(--st-bg) !important; }
.hero3 .home-go .btn.is-primary:hover { background: var(--st-ask); border-color: var(--st-ask); }
.home-go .note { flex: 1 1 200px; min-width: 0; font-size: 13.5px; }
.hero3 .home-counts a { margin-left: 4px; white-space: nowrap; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hero-facts { list-style: none; margin: auto 0 0; padding: 20px 0 0; border-top: 1px solid var(--st-line); display: grid; grid-template-columns: repeat(4, minmax(0, auto));
  justify-content: space-between; gap: 10px 18px; }
.hero-facts li { display: grid; gap: 1px; min-width: 0; }
.hero-facts b { font-family: var(--reading); font-size: 26px; line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; color: #fff; font-variant-numeric: tabular-nums; }
.hero-facts span { font-size: 13px; color: var(--st-muted); }

/* the flow inside the band has no card of its own: its edges are the band's */
.hero3 .lab.is-mini { height: 100%; display: flex; flex-direction: column; max-width: none; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.hero3 .lab.is-mini .lab-head { padding: 0 0 14px; background: none; }
.hero3 .lab.is-mini .lab-title { font-size: 22px; }
.hero3 .lab-body, .hero3 .lab-app { flex: 1 1 auto; display: flex; flex-direction: column; }
.hero3 .lab-dark { padding: 0; background: none; }
.hero3 .lab.is-mini .lab-light { flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; padding: 18px 0 0; color: var(--st-text); }
.hero3 .lab.is-mini .lab-main { min-height: 124px; }
.hero3 .lab-step-n { color: var(--st-muted); }
.hero3 .lab .lab-step-t { color: #fff; }
.hero3 .lab-step-x { color: #EDE9FF; }
.hero3 .lab.is-mini .lab-changed { color: var(--st-muted); }
.hero3 .lab-result { border-color: transparent; background: rgba(99, 230, 166, 0.16); color: var(--st-answer); }
.hero3 .lab-nav .btn { background: transparent; border-color: rgba(255, 255, 255, 0.45); color: #fff !important; }
.hero3 .lab-nav .btn:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
.hero3 .lab-nav .btn.is-primary { background: var(--primary); border-color: var(--primary); color: #fff !important; }
.theme-dark .hero3 .lab-nav .btn.is-primary { background: #6A4DF4; border-color: #6A4DF4; }
.hero3 .lab-nav .btn.is-primary:hover { background: #7C5CFF; border-color: #7C5CFF; }
.lab-more-link { color: #fff !important; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: underline !important; text-underline-offset: 3px; }
.lab-noscript { margin: 0; padding: 4px 0; font-size: 14.5px; color: var(--st-muted); }
.lab-noscript a { color: #fff; text-decoration: underline; }

.home-main { display: grid; gap: 46px; min-width: 0; }
.home-sec { display: grid; gap: 14px; min-width: 0; scroll-margin-top: 16px; }
.home-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 44px; }
.home-sec-head .sub-h { font-size: 28px; }
.home-level { gap: 10px; }
.home-main .subject-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-main .subject-card { padding: 20px; }
.home-main .subject-card .sub-h { font-size: 22px; }
.home-main .path-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-main .path-card .sub-h { font-size: 22px; }
.home-main .pop-grid, .home-main .post-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-main .home-posts { margin-top: 0; }
.home-main .ds-card .sub-h { font-size: 24px; }
.home-last { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.home-last .author-card { max-width: none; }

@media (max-width: 1180px) {
  .hero3 { grid-template-columns: minmax(0, 1fr); padding: 40px 0; row-gap: 34px; margin-bottom: 42px; }
  .hero3-text { padding: 0 40px; }
  .hero3-demo { padding: 34px 40px 0; border-left: 0; border-top: 1px solid var(--st-line); }
  .hero3 .hero-h { font-size: 46px; max-width: 15em; }
  .hero-facts { margin-top: 6px; }
  .home-main .subject-grid, .home-main .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .home-main .path-grid, .home-last { grid-template-columns: minmax(0, 1fr); }
  .home-main .pop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .hero3 { margin: 0 0 34px; padding: 26px 0; border-radius: 22px; row-gap: 26px; }
  .hero3-text { gap: 18px; padding: 0 18px; }
  .hero3-demo { padding: 26px 18px 0; }
  .hero3 .hero-h { font-size: 34px; line-height: 1.08; }
  .hero3 .hero-lead { font-size: 17px; }
  .hero3 .search { min-height: 54px; }
  .home-go .btn { flex: 1 1 140px; padding: 0 14px; }
  .home-go .note { flex: 1 1 100%; }
  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .hero-facts b { font-size: 23px; }
  .home-main { gap: 36px; }
  .home-sec-head .sub-h { font-size: 24px; }
  .home-main .subject-grid, .home-main .post-grid { grid-template-columns: minmax(0, 1fr); }
  .home-level { width: 100%; }
  .home-level .seg { border-radius: 18px; }
}

/* ---------- flows (2026-11-21): every stepped diagram and picture is a stage the reader plays ----------
   The same material as a live example: a dark, dotted top where the thing is drawn and moves, and paper under it
   for what the step says and the way on. A table stays a table; anything with an order is played. */
.walk, .pc { --st-bg: #21174F; --st-bg-2: #2C2068; --st-line: rgba(255, 255, 255, 0.16); --st-text: #F4F1FF; --st-muted: #C6BCF0;
  --st-ask: #CFC4FF; --st-answer: #63E6A6; --st-warn: #FFD27A; --st-dots: radial-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1.5px);
  border: 1.5px solid var(--border); border-radius: 22px; background: var(--surface); overflow: hidden;
  box-shadow: 0 26px 48px -34px rgba(var(--shadow-rgb), 0.6); }
.theme-dark .walk, .theme-dark .pc { --st-bg: #1B1540; --st-bg-2: #251C52; border-color: #3A3160; }
.walk .walk-bar, .pc .walk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 16px 18px 14px 20px; border-bottom: 0;
  background: var(--st-dots) 0 0 / 18px 18px, var(--st-bg); color: var(--st-text); }
.walk-head { flex: 1 1 240px; display: grid; gap: 6px; justify-items: start; min-width: 0; }
.walk .walk-bar .card-h, .pc .walk-bar .card-h { flex: none; font-family: var(--reading); font-size: 20px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; color: #fff; }
.walk-run { margin-left: auto; display: flex; gap: 8px; }
.walk-bar :focus-visible, .walk-stage :focus-visible, .pc-stage :focus-visible { outline-color: #fff; }

/* what is drawn on the stage is light in both themes, so the light palette is fixed here */
.walk-stage, .pc .pc-stage { --surface: #FFFFFF; --surface-2: #F1EEF8; --surface-3: #EAE6F4; --border: #E7E3F0; --border-strong: #8C8899; --text: #1D1830; --muted: #5C5870;
  --primary: #5B3FE0; --on-primary: #FFFFFF; --primary-soft: #EFEBFF; --primary-text: #4A31B0; --mark: #7C5CFF; --on-mark: #FFFFFF;
  --ok: #1F7A4D; --ok-soft: #E7F5EC; --ok-bar: #1F7A4D; --warn: #8A5A00; --warn-soft: #FFF3D6; --warn-bar: #C98A00; --none-bar: rgba(255, 255, 255, 0.28);
  background: var(--st-dots) 0 0 / 18px 18px, var(--st-bg); color: var(--st-text); }
.walk-stage { padding: 6px 20px 22px; }
.walk .dg-scroll { scrollbar-color: rgba(255, 255, 255, 0.4) transparent; }

/* a flow: numbered cards down a line; the one being read is lit, the ones to come are faint */
.walk .dg-flow { padding: 4px 0 0; }
.walk .dg-step { padding: 0 0 14px 46px; transition: opacity .3s ease; }
.walk .dg-step:last-child { padding-bottom: 0; }
.walk .dg-step::before { top: 8px; width: 30px; height: 30px; background: rgba(255, 255, 255, 0.14); color: #fff; font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  transition: transform .25s var(--ease), background .25s var(--ease); }
.walk .dg-step::after { left: 14px; top: 42px; bottom: -6px; width: 2px; background: rgba(255, 255, 255, 0.24); }
.walk .dg-step.on::before { background: var(--st-ask); color: #1D1830; }
.dg-card { display: block; padding: 11px 14px; border-radius: 14px; background: var(--surface); color: var(--text); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.walk .dg-step b { color: var(--text); font-weight: 600; }
.walk .dg-step .dg-card > span { display: block; color: var(--muted); font-size: 13px; }
.walk .dg-step.is-todo { opacity: .34; }
.walk .dg-step.is-done { opacity: .8; }
.walk .dg-step.is-done::after { background: var(--st-ask); }
.walk .dg-step.is-done::before { background: var(--st-ask); color: #1D1830; }
.walk .dg-step.is-now::before { background: #fff; color: var(--st-bg); transform: scale(1.14); }
.walk .dg-step.is-now b { color: var(--primary-text); }
.walk .dg-step.is-now .dg-card { box-shadow: 0 0 0 3px var(--st-ask), 0 16px 30px -14px rgba(0, 0, 0, 0.7); transform: translateX(3px); animation: lab-in .28s var(--ease); }

/* layers: one card each, top to bottom */
.walk .dg-layers { padding: 4px 0 0; gap: 8px; }
.walk .dg-layers li { padding: 11px 16px; border-radius: 14px; background: var(--surface); color: var(--text); transition: opacity .3s ease, box-shadow .25s var(--ease), transform .25s var(--ease); }
.walk .dg-layers li b { font-weight: 600; }
.walk .dg-layers li span { color: var(--muted); }
.walk .dg-layers li.on { background: var(--surface); box-shadow: inset 6px 0 0 var(--primary); }
.walk .dg-layers li.is-todo { opacity: .34; }
.walk .dg-layers li.is-done { opacity: .8; }
.walk .dg-layers li.is-now { box-shadow: 0 0 0 3px var(--st-ask), 0 16px 30px -14px rgba(0, 0, 0, 0.7); transform: translateX(3px); animation: lab-in .28s var(--ease); }
.walk .dg-layers li.is-now b { color: var(--primary-text); }

/* messages between actors: the one being read is lit and a dot travels along it */
.walk .seq { padding: 6px 2px 4px; }
.walk .seq-actors span { padding: 7px 14px; border-radius: 12px; background: #fff; color: #1D1830; font-weight: 600; box-shadow: 0 10px 20px -12px rgba(0, 0, 0, 0.7); }
.walk .seq-body { padding: 14px 0 6px; }
.walk .seq-body .life { width: 2px; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0 5px, transparent 5px 10px); }
.walk .seq-msg { padding: 8px 0; }
.walk .seq-msg .lbl { color: var(--st-text); font-size: 12.5px; }
.walk .seq-msg .lbl span { background: var(--st-bg); color: inherit; padding: 2px 7px; border-radius: 7px; }
.walk .seq-msg .ln { border-top-color: rgba(255, 255, 255, 0.72); }
.walk .seq-msg .ln::after { border-color: rgba(255, 255, 255, 0.72); }
.walk .seq-msg.dashed .lbl { color: var(--st-muted); }
.walk .seq-msg.self .lbl { border-left-color: rgba(255, 255, 255, 0.72); }
.walk .seq-msg.self-left .lbl { border-right-color: rgba(255, 255, 255, 0.72); }
.walk .seq-msg.is-todo { opacity: .2; }
.walk .seq-msg.is-done { opacity: .62; }
.walk .seq-msg.is-now .ln { border-top-color: var(--st-ask); }
.walk .seq-msg.is-now .ln::after { border-color: var(--st-ask); }
.walk .seq-msg.is-now.dashed .ln { border-top-color: var(--st-answer); }
.walk .seq-msg.is-now.dashed .ln::after { border-color: var(--st-answer); }
.walk .seq-msg.is-now .lbl { color: #1D1830; font-weight: 600; }
.walk .seq-msg.is-now .lbl span { background: var(--st-ask); }
.walk .seq-msg.is-now.dashed .lbl span { background: var(--st-answer); color: #0F2A1D; }
.walk .seq-msg.is-now.self .lbl { border-left-color: var(--st-ask); }
.walk .seq-msg.is-now.self-left .lbl { border-right-color: var(--st-ask); }
.walk .seq-msg.is-now .ln::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25); animation: lab-right 1.15s var(--ease) .45s infinite both; }
.walk .seq-msg.is-now.to-left .ln::before { animation-name: lab-left; }

/* the paper half */
.walk-foot, .pc-foot2 { display: grid; gap: 14px; padding: 16px 20px 18px; }
.walk .walk-note { margin: 0; padding: 0; border: 0; background: none; min-height: 3em; font-family: var(--reading); font-size: 17px; line-height: 1.5; }
.walk-cap { margin: 0; padding-top: 12px; border-top: 1.5px solid var(--border); color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* step pictures: the drawing on the stage, its sentence on paper */
.pc { margin: 22px 0; }
.pc .pc-cap { margin: 0; padding: 0 20px 14px; background: var(--st-dots) 0 0 / 18px 18px, var(--st-bg); color: var(--st-muted); font-family: var(--display); font-size: 14.5px; line-height: 1.5; }
.pc .pc-frame { padding: 0; }
.pc .pc-frame + .pc-frame { border-top: 0; }
.pc .pc-stage { padding: 8px 20px 22px; gap: 14px 22px; }
.pc .pc-svg text { fill: var(--text); }
.pc .pc-svg .pc-idx, .pc .pc-svg .pc-val, .pc .pc-svg .pc-null { fill: var(--st-muted); }
.pc .pc-svg .pc-ptr { fill: var(--st-ask); }
.pc .pc-ptr-ln { fill: var(--st-ask); }
.pc .pc-arrow, .pc .pc-nil { stroke: var(--st-muted); }
.pc .pc-arrow.is-back { stroke: var(--st-ask); }
.pc .pc-headp, .pc .pc-dot { fill: var(--st-muted); }
.pc .pc-edge, .pc .pc-base { stroke: rgba(255, 255, 255, 0.5); }
.pc .pc-cell rect, .pc .pc-cell circle { stroke: transparent; }
.pc .pc-cell.is-now rect, .pc .pc-cell.is-now circle { fill: var(--mark); stroke: var(--st-ask); stroke-width: 3; }
.pc .pc-cell.is-now text { fill: #fff; }
.pc .pc-cell.is-cmp rect, .pc .pc-cell.is-cmp circle { fill: var(--warn-soft); stroke: var(--st-warn); stroke-width: 3; }
.pc .pc-cell.is-found rect, .pc .pc-cell.is-found circle { fill: var(--ok-soft); stroke: var(--st-answer); stroke-width: 3; }
.pc .pc-cell.is-done rect, .pc .pc-cell.is-done circle { fill: #CFC8E4; stroke: transparent; }
.pc .pc-vars div { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--st-line); }
.pc .pc-vars dt { color: var(--st-muted); }
.pc .pc-vars dd { color: #fff; }
.lib .pc .pc-note { margin: 0; padding: 16px 20px 0; }
.lib .pc .pc-note { display: block; max-width: none; }
.pc .pc-n { margin-right: 10px; vertical-align: 1px; }
.pc .pc-cap, .walk-cap, .walk .walk-note { max-width: none; }
.pc.is-one .pc-note { padding-bottom: 18px; }
.pc:not(.is-js) .pc-note { padding-bottom: 16px; }
.pc-foot2 { padding-top: 14px; }

@media (max-width: 560px) {
  .walk .walk-bar, .pc .walk-bar { padding: 14px 14px 12px; }
  .walk-head { flex: 1 1 100%; }
  .walk-run { margin-left: 0; flex: 1 1 100%; }
  .walk-run .lab-runbtn { flex: 1 1 0; }
  .walk-stage { padding: 6px 14px 18px; }
  .pc .pc-stage { padding: 8px 14px 18px; }
  .pc .pc-cap { padding: 0 14px 12px; }
  .walk-foot, .pc-foot2 { padding: 14px 14px 16px; }
  .lib .pc .pc-note { padding: 14px 14px 0; }
  .walk .dg-step { padding-left: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .walk .dg-step.is-now .dg-card, .walk .dg-layers li.is-now { animation: none; transform: none; }
  .walk .seq-msg.is-now .ln::before { display: none; animation: none; }
  .walk .dg-step, .walk .dg-step::before, .dg-card, .walk .dg-layers li { transition: none; }
}
@media print {
  .walk-run, .walk-ctl, .pc-foot2, .walk .lab-line { display: none !important; }
  .walk .dg-step, .walk .dg-layers li, .walk .seq-msg { opacity: 1 !important; }
}

/* ---------- one column (2026-11-21): on an answer, everything shares one left edge and one right edge ----------
   Text, code, flows, the interview script, follow-up questions, the facts and the pager were five different widths.
   Here they are one column, and that column and the side panel sit centred as a pair under the top line. */
body[data-page="answer"] { --col: 720px; }
body[data-page="answer"] .cols { justify-content: center; gap: 32px 56px; }
body[data-page="answer"] .cols > .main { flex: 1 1 560px; max-width: var(--col); }
body[data-page="answer"] .cols > .side { flex: 0 1 300px; }
body[data-page="answer"] .main :is(.detail-title, .codeblock, .prose p, .prose h2, .prose .say, .prose .faq, .walk, .dg, .pc, .pager, .facts, .why, .lab, .assume,
  .quick, .practice, .path-end, .author-card, .faq details p, .practice textarea, .mm) { max-width: none; }
@media (max-width: 963px) { body[data-page="answer"] .cols > .side { flex: 1 1 100%; max-width: var(--col); } }

/* ---------- the way through a flow (2026-11-21): a step line whose marker glides, and three buttons that never change size ----------
   The buttons say Back, Play and Next and nothing else; the name of the step Next leads to is on one quiet line under
   them. The line and the buttons sit straight under the drawing, centred, so they stay where they are from step to step. */
.flowbar { display: grid; justify-items: center; gap: 12px; min-width: 0; }
.lab-steps { position: relative; max-width: 100%; }
.lab-steps .lab-line { justify-content: center; }
.lab-at { position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft);
  opacity: 0; pointer-events: none; }
.lab-steps.is-ready .lab-at { transition: transform .42s cubic-bezier(.34, 1.3, .5, 1), opacity .2s ease; }
.lab-steps .lab-line li + li::before { transition: background .35s ease; }
.lab-steps .lab-line button { position: relative; z-index: 1; transition: background .25s ease, color .25s ease, border-color .25s ease; }
.lab-steps .lab-line button.is-now { background: transparent; border-color: transparent; color: var(--on-primary); box-shadow: none; }
.flow-ctl { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 10px; max-width: 100%; }
.lib .flow-ctl .btn { flex: none; min-height: 48px; min-width: 0; padding: 0 14px; gap: 8px; justify-content: center; white-space: nowrap; line-height: 1.2; font-weight: 600; }
.lib .flow-ctl .btn:nth-child(1) { width: 104px; }
.lib .flow-ctl .btn:nth-child(2) { width: 124px; }
.lib .flow-ctl .btn:nth-child(3) { width: 144px; }
.flow-ctl .btn svg { flex: none; }
.flow-up { margin: 0; max-width: 100%; min-height: 1.5em; font-family: var(--display); font-size: 13.5px; line-height: 1.5; color: var(--muted); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-up b { color: var(--text); font-weight: 600; }
.walk .walk-count { display: block; margin: 0 0 -8px; font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: left; }
.walk .walk-ctl, .pc .pc-ctl { flex: none; }
.pc .pc-foot2 { padding-top: 16px; }
.lab-light > .flowbar { padding-bottom: 2px; }
.lab.is-mini .flowbar { justify-items: stretch; padding-bottom: 0; }
.lab.is-mini .flow-ctl { order: 2; }
.lab.is-mini .flow-up { order: 1; text-align: left; }
.hero3 .flowbar { margin-top: auto; }
.hero3 .flow-up { color: var(--st-muted); }
.hero3 .flow-up b { color: #fff; }
.lab.is-mini .flow-ctl { justify-content: flex-start; }
@media (max-width: 520px) {
  .flow-ctl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr); width: 100%; }
  .lib .flow-ctl .btn:nth-child(n) { width: auto; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { .lab-steps.is-ready .lab-at, .lab-steps .lab-line li + li::before, .lab-steps .lab-line button { transition: none; } }
@media print { .flowbar { display: none !important; } }

/* ---------- the top of Home in depth (2026-11-21) ----------
   Behind the band a space is drawn (assets/hero3d.js): the band's dots as a floor that rolls and runs to a horizon,
   with records travelling over it. On a wide screen with a mouse the flow beside the title is a panel that floats in
   that space; it lands flat when the pointer or the keyboard reaches it, so it is used flat and, landed, shares its
   top and bottom edge with the text. Everything below is added by that script's classes: without it the band is flat. */
.hero3 { position: relative; isolation: isolate; }
.hero3-bg { position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; border-radius: inherit; opacity: 0; transition: opacity 1.4s ease;
  pointer-events: none; }
.hero3.has-scene .hero3-bg { opacity: 1; }
.hero3-motion { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px 0 13px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(20, 13, 60, 0.5); color: #DCD5FB; font-family: var(--display); font-size: 13px;
  font-weight: 600; line-height: 1; cursor: pointer; }
.hero3-motion[hidden] { display: none; }
.hero3-motion:hover { border-color: #fff; color: #fff; }
.hero3-motion svg { flex: none; }
.hero3-motion .i-play, .hero3-motion.is-off .i-pause { display: none; }
.hero3-motion.is-off .i-play { display: block; }
@media (min-width: 1181px) {
  .hero3 { padding: 46px 0; }
  .hero3-motion { position: absolute; left: 12px; bottom: 9px; z-index: 2; width: 32px; height: 32px; min-height: 32px; padding: 0; }
  .hero3-motion span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  .hero3.is-3d .hero3-demo { border-left-color: transparent; perspective: 1500px; }
  .hero3.is-3d .lab.is-mini { --k: 0; position: relative; transform-style: preserve-3d; will-change: transform; }
  .hero3.is-3d .lab-body, .hero3.is-3d .lab-app, .hero3.is-3d .lab-dark, .hero3.is-3d .lab-light, .hero3.is-3d .lab-stage, .hero3.is-3d .lab-assign { transform-style: preserve-3d; }
  /* the plate the flow lies on, and a second one under it that gives the panel its thickness */
  .hero3.is-3d .lab.is-mini::before, .hero3.is-3d .lab.is-mini::after { content: ""; position: absolute; inset: -22px -26px; border-radius: 26px; pointer-events: none; }
  .hero3.is-3d .lab.is-mini::before { border: 1px solid rgba(255, 255, 255, 0.2);
    background: radial-gradient(560px circle at var(--gx, 22%) var(--gy, 0%), rgba(255, 255, 255, 0.15), transparent 62%), linear-gradient(155deg, rgba(72, 54, 172, 0.46), rgba(27, 18, 78, 0.62));
    -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 70px -12px rgba(124, 92, 255, calc(0.25 + var(--k) * 0.4)), 0 calc(16px + var(--k) * 46px) calc(30px + var(--k) * 64px) calc(var(--k) * -24px - 8px) rgba(5, 2, 24, 0.8);
    transform: translateZ(-1px); animation: hero-plate .9s ease both; }
  .hero3.is-3d .lab.is-mini::after { border: 1px solid rgba(169, 150, 255, 0.4); background: rgba(14, 8, 50, 0.5); opacity: var(--k);
    transform: translateZ(calc(var(--k) * -30px - 2px)); }
  .hero3.is-3d .lab-head { transform: translateZ(calc(var(--k) * 24px)); }
  .hero3.is-3d .lab-controls { transform: translateZ(calc(var(--k) * 32px)); }
  .hero3.is-3d .lab-stage { transform: translateZ(calc(var(--k) * 48px)); box-shadow: 0 calc(var(--k) * 28px) calc(var(--k) * 44px) calc(var(--k) * -16px) rgba(5, 2, 24, 0.7); }
  .hero3.is-3d .lab-assign > .lab-col, .hero3.is-3d .lab-assign > .lab-links { transform: translateZ(calc(var(--k) * 20px)); }
  .hero3.is-3d .lab-main { transform: translateZ(calc(var(--k) * 20px)); }
  .hero3.is-3d .flowbar { transform: translateZ(calc(var(--k) * 38px)); }
}
@keyframes hero-plate { from { opacity: 0; } }
@media (max-width: 1180px) {
  /* stacked, the band is tall: the space is drawn behind the title and fades out before the flow */
  .hero3-bg { height: min(100%, 760px); -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .hero3-bg { transition: none; } .hero3.is-3d .lab.is-mini::before { animation: none; } }
@media print { .hero3-bg, .hero3-motion { display: none !important; } .hero3 .lab.is-mini { transform: none !important; } }

/* ---------- movement while reading (2026-11-21) ----------
   Five small movements, each an answer to something the reader did or a sign of where they are. Nothing here loops
   and nothing moves beside the text by itself. Under "reduce motion" all of it is off: the rule above stops
   transitions and animations, and the move between pages is declared only where motion is welcome. */

/* 1. from one page to the next: the new page comes in from the side the reader is going to; the top line and the
      dock stay where they are */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .topline { view-transition-name: topline; }
  .dock-wrap { view-transition-name: dock; }
  ::view-transition-old(root) { animation: vt-out .14s ease both; }
  ::view-transition-new(root) { animation: vt-in .32s cubic-bezier(.2, .7, .2, 1) both; }
  .go-next::view-transition-old(root) { animation-name: vt-out-next; }
  .go-next::view-transition-new(root) { animation-name: vt-in-next; }
  .go-prev::view-transition-old(root) { animation-name: vt-out-prev; }
  .go-prev::view-transition-new(root) { animation-name: vt-in-prev; }
  ::view-transition-group(topline), ::view-transition-group(dock) { animation-duration: .2s; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes vt-out-next { to { opacity: 0; transform: translateX(-24px); } }
@keyframes vt-in-next { from { opacity: 0; transform: translateX(36px); } }
@keyframes vt-out-prev { to { opacity: 0; transform: translateX(24px); } }
@keyframes vt-in-prev { from { opacity: 0; transform: translateX(-36px); } }

/* 2. a flow below the fold waits, and draws itself in once when the reader reaches it. It does not play. */
.walk.is-asleep .walk-stage [data-step], .pc.is-asleep .pc-frames, .is-asleep .lab-line li, .is-asleep .lab-at { opacity: 0 !important; }
.walk.is-awake .walk-stage [data-step] { animation: wake-in .55s var(--ease) backwards; animation-delay: calc(var(--nth, 0) * 70ms); }
.pc.is-awake .pc-frames { animation: wake-in .6s var(--ease) backwards; }
.is-awake .lab-line li { animation: dot-in .4s var(--ease) backwards; animation-delay: calc(120ms + var(--i, 0) * 45ms); }
@keyframes wake-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes dot-in { from { opacity: 0; transform: scale(.4); } }

/* 3. from one step to the next: the words and the picture ease in, to go with the marker that glides */
.walk .walk-note.is-in, .lab-panel { animation: note-in .32s var(--ease); }
.pc.is-js .pc-frame.is-on { animation: frame-in .3s ease; }
@keyframes note-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes frame-in { from { opacity: 0; } }

/* 4. how far through the answer the reader is: a line along the top of the window, green at the end */
.read-line { position: fixed; left: 0; right: 0; top: 0; z-index: 60; height: 3px; pointer-events: none; }
.read-line i { display: block; height: 100%; border-radius: 0 3px 3px 0; background: var(--primary); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .14s linear, background-color .3s ease; }
.read-line.is-full i { background: var(--ok-bar); }

/* 5. marking a question: the button answers, the tick draws, the count it changed jumps; meters fill from empty */
.btn.is-pop, .dock-btn.is-pop { animation: mark-pop .5s var(--ease); }
[data-mark="review"].is-pop { --ring-c: var(--warn-bar); }
[data-mark="known"].is-pop svg path { stroke-dasharray: 40; animation: mark-draw .4s .05s ease-out backwards; }
@keyframes mark-pop { 0% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ring-c, var(--ok-bar)) 55%, transparent); }
  40% { transform: scale(1.07); } 100% { transform: scale(1); box-shadow: 0 0 0 14px transparent; } }
@keyframes mark-draw { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
.is-bump { display: inline-block; animation: stat-bump .5s var(--ease); }
@keyframes stat-bump { 35% { transform: scale(1.35); color: var(--primary); } }
.meter i { animation: meter-in .9s var(--ease) backwards; }
@keyframes meter-in { from { width: 0; } }
@media print { .read-line { display: none !important; } .is-asleep [data-step], .is-asleep .pc-frames, .is-asleep .lab-line li { opacity: 1 !important; } }
