/* More places: six invented products past the landing page, each a layered composite (a dimmed back panel, a lighter
   front panel with a hairline and a soft shadow, cropped by its stage and faded at the edges), after Linear's product
   composites (website/LINEAR-STUDY.md). Self-contained: it needs only home/base.css (nav, footer, .win, tokens).
   The page speaks IBM Plex; the mock products speak Inter at 13 px so they read as someone else's product. Orange is only
   the figure's hero and each product's one primary pill (.k-btn); every other colour is data (status dots, a chart). */

/* ---------- the mock products' tokens: designed dark first, light as good ---------- */
:root {
  --m-back: #fbfbfc; --m-back-line: #e7e7eb; --m-front: #ffffff; --m-line: #e4e4e8; --m-line-2: #d4d4da; --m-raise: #f4f4f6;
  --m-ink: #18181b; --m-2: #3f3f46; --m-3: #62626b; --m-4: #a1a1a9;
  --m-shadow: 0 1px 2px rgba(24, 24, 27, .05), 0 28px 70px -18px rgba(24, 24, 27, .22);
  --m-scrim: rgba(247, 247, 248, .66);
  --d-blue: #f5821f; --d-green: #1f9d63; --d-violet: #a1a1a9; --d-amber: #d29a12; --d-red: #d64545;
  /* a figure's plate is opaque (#f7f7f8 here): lifted to white and multiplied, it takes the colour of any surface under it */
  --blend: multiply; --blend-f: brightness(1.0325);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --m-back: #141415; --m-back-line: #222225; --m-front: #1b1b1d; --m-line: #2b2b30; --m-line-2: #3a3a40; --m-raise: #242427;
  --m-ink: #f4f4f6; --m-2: #d2d2d8; --m-3: #8f8f98; --m-4: #5e5e66;
  --m-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 28px 70px -14px rgba(0, 0, 0, .7);
  --m-scrim: rgba(10, 10, 11, .62);
  --d-blue: #f5821f; --d-green: #4cb782; --d-violet: #5e5e66; --d-amber: #f2c94c; --d-red: #eb5757;
  /* dark: the plate (#111111) is darker than every surface, so lighten drops it and keeps the lines */
  --blend: lighten; --blend-f: none; } }
:root[data-theme="dark"] {
  --m-back: #141415; --m-back-line: #222225; --m-front: #1b1b1d; --m-line: #2b2b30; --m-line-2: #3a3a40; --m-raise: #242427;
  --m-ink: #f4f4f6; --m-2: #d2d2d8; --m-3: #8f8f98; --m-4: #5e5e66;
  --m-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 28px 70px -14px rgba(0, 0, 0, .7);
  --m-scrim: rgba(10, 10, 11, .62);
  --d-blue: #f5821f; --d-green: #4cb782; --d-violet: #5e5e66; --d-amber: #f2c94c; --d-red: #eb5757;
  --blend: lighten; --blend-f: none;
}

::selection { background: color-mix(in srgb, #f5821f 30%, transparent); }
[hidden] { display: none !important; }

/* ---------- the page ---------- */
.sf { padding-top: 96px; }
.sf-head { max-width: 900px; }
.sf-head h1 { font-weight: 500; font-size: 56px; line-height: 1.02; letter-spacing: -0.035em; }
.sf-head p { margin-top: 24px; font-size: 22px; line-height: 1.4; letter-spacing: -0.012em; color: var(--soft); max-width: 40ch; text-wrap: pretty; }
.sf-head p span { color: var(--ink); }

/* an example: a heading row, the composite, then the figure's name and its embed line */
.ex { margin-top: 168px; }
.sf-head + .ex { margin-top: 96px; }
.ex-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.ex-head h2 { grid-column: 1 / span 5; font-size: 32px; line-height: 1.1; font-weight: 500; letter-spacing: -0.028em; text-wrap: balance; }
.ex-head > div { grid-column: 7 / span 6; }
.ex-head .why { font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 52ch; text-wrap: pretty; }
.ex-head .style { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--soft); max-width: 56ch; }
.ex-head .style b { font-weight: 500; color: var(--ink); }
.ex-stage { position: relative; margin-top: 40px; height: var(--h, 620px); }
.ex-foot { margin-top: 20px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.fig-line { grid-column: 1 / span 5; padding-top: 9px; font-size: 13px; color: var(--soft); display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.fig-line a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
.fig-line a:hover { text-decoration-color: var(--ink); }
.fig-line span:empty { display: none; }
.fig-line .tier { padding: 1px 7px; background: var(--hover); border-radius: 999px; font-size: 11px; line-height: 16px; }
.code { grid-column: 7 / span 6; min-width: 0; border-radius: 10px; overflow: hidden; background: var(--hover); }
.code-head { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px 0 12px; font-size: 12px; color: var(--soft); }
.copy { height: 24px; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 6px; background: none; font: inherit; color: var(--soft); cursor: pointer; }
.copy:hover { background: var(--hover); color: var(--ink); }
.copy i { font-size: 13px; }
.code pre { padding: 0 12px 12px; font: 400 11px/1.7 var(--mono); color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid color-mix(in srgb, #f5821f 70%, var(--ink)); outline-offset: 2px; border-radius: 4px; }

/* ---------- the composite: panels laid over each other, cropped and faded by the stage ---------- */
.cmp { position: absolute; inset: 0; overflow: hidden; color: var(--m-ink);
  font: 400 13px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; font-feature-settings: 'cv11', 'ss03'; letter-spacing: -0.003em;
  -webkit-mask: linear-gradient(#000 calc(100% - var(--fb, 110px)), transparent), linear-gradient(90deg, #000 calc(100% - var(--fr, 0px)), transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.cmp p { margin: 0; }
.cmp button { font: inherit; letter-spacing: inherit; }
.pn { position: absolute; border: 1px solid var(--m-line); border-radius: 12px; background: var(--m-front); overflow: hidden; }
.pn.back { background: var(--m-back); border-color: var(--m-back-line); }
.pn.back > * { opacity: .58; }
.pn.front { box-shadow: var(--m-shadow); }
.grow { flex: 1; }
.cmp b { font-weight: 510; color: var(--m-ink); }
.cmp .m-h { font-size: 17px; line-height: 1.3; font-weight: 510; letter-spacing: -0.014em; color: var(--m-ink); text-wrap: balance; }
.cmp .sub { color: var(--m-3); }
.num, .cmp td, .cmp time, .a-stats b { font-variant-numeric: tabular-nums; }
.dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--m-4)); }
.av { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--c, #555); color: #fff; font-size: 11px; font-weight: 600; font-style: normal; }
.av.sq { width: 20px; height: 20px; border-radius: 5px; font-size: 11px; }
.av.ink { background: var(--m-ink); color: var(--m-front); }
.chip { height: 26px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; border-radius: 7px; background: var(--m-raise); color: var(--m-2); font-size: 12.5px; white-space: nowrap; }
.chip.ghost { background: none; color: var(--m-3); }
.chip i.ph { font-size: 14px; color: var(--m-3); }
.tag { height: 22px; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: var(--m-raise); color: var(--m-2); font-size: 12px; white-space: nowrap; }
.tag .dot { width: 6px; height: 6px; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.row.end { justify-content: space-between; }
.hint { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--m-3); }
kbd { font: 500 11px/1 Inter, system-ui, sans-serif; padding: 3px 5px; background: var(--m-raise); border-radius: 4px; color: var(--m-3); }
/* the one primary action on each screen: a pill in the brand orange, ink text (7.4:1) */
.k-btn { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: #f5821f; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; font-weight: 510; cursor: pointer; white-space: nowrap; transition: filter .15s, background-color .2s, color .2s; }
.k-btn:hover { filter: brightness(1.07); }
.k-btn:active { filter: brightness(.94); }
.k-btn:disabled { background: var(--m-raise); color: var(--m-3); cursor: default; filter: none; }
.k-btn.done { background: var(--m-raise); color: var(--m-ink); }
.k-btn i { font-size: 15px; }
.m-link { border: 0; background: none; padding: 0; color: var(--m-3); font-size: 13px; cursor: pointer; }
.m-link:hover { color: var(--m-ink); }
.m-x { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--m-3); cursor: pointer; }
.up { color: var(--d-green); } .down { color: var(--d-red); }

/* the figure: its page fills .fig, cropped; .blend drops the figure's plate into the surface under it */
.fig { position: relative; flex: none; }
.fig .win { inset: 0; }
.win.blend :is(iframe, .kl-svg) { mix-blend-mode: var(--blend); filter: var(--blend-f); }
.swap { animation: swap .36s cubic-bezier(.2, .7, .2, 1); }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } }

/* shared app chrome: the side list (workspace, search, sections with counts) and a top bar */
.a-side { padding: 12px 10px; display: grid; align-content: start; gap: 1px; }
.a-side > span { height: 28px; padding: 0 8px; display: flex; align-items: center; gap: 9px; border-radius: 6px; color: var(--m-2); white-space: nowrap; }
.a-side > span i.ph { font-size: 15px; color: var(--m-3); }
.a-side > span.cur { background: var(--m-raise); color: var(--m-ink); }
.a-side em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--m-3); }
.a-side em.live { color: var(--d-green); }
.a-ws { height: 32px; padding: 0 6px; display: flex; align-items: center; gap: 8px; font-weight: 510; color: var(--m-ink) !important; }
.a-ws i { margin-left: auto; color: var(--m-3); }
.a-search { margin: 6px 0 10px; height: 28px; padding: 0 8px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--m-back-line); border-radius: 7px; color: var(--m-3) !important; }
.a-search kbd { margin-left: auto; }
.a-sec { margin: 14px 0 4px !important; padding: 0 8px; font-size: 12px; color: var(--m-3) !important; }
.a-top { height: 52px; padding: 0 20px; display: flex; align-items: center; gap: 8px; }
.a-h { font-size: 14px; font-weight: 510; color: var(--m-ink); margin-right: 8px !important; }

/* ---------- 1. dashboard: Halyard ---------- */
.ex:has(.dash) .ex-stage { --h: 620px; }
.dash { --fr: 150px; }
.dash .back { left: 0; top: 0; width: calc(100% + 160px); height: 700px; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.a-main { min-width: 0; }
.a-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 8px; }
.a-stats > div { padding: 16px 20px 18px; display: grid; gap: 4px; }
.a-stats p { color: var(--m-3); }
.a-stats b { font-size: 22px; font-weight: 510; letter-spacing: -0.02em; }
.a-stats b.none { color: var(--m-4); }
.a-stats span { font-size: 12px; color: var(--m-3); }
.a-table { width: 100%; border-collapse: collapse; }
.a-table th { height: 36px; padding: 0 20px; text-align: left; font-weight: 400; font-size: 12px; color: var(--m-3); border-bottom: 1px solid var(--m-back-line); }
.a-table td { height: 40px; padding: 0 20px; color: var(--m-2); }
.a-table td:first-child { display: flex; align-items: center; gap: 9px; color: var(--m-ink); }
.a-table :is(th, td):not(:first-child) { text-align: right; width: 110px; }
.d-rev { left: 300px; top: 176px; width: 840px; height: 470px; }
.p-head { height: 52px; padding: 0 20px; display: flex; align-items: center; gap: 10px; }
.p-h { font-size: 14px; font-weight: 510; color: var(--m-ink); }
.p-meta { font-size: 12.5px; color: var(--m-3); }
.d-empty { display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: center; gap: 24px; padding: 20px 40px 20px 20px; }
.d-empty .fig { width: 320px; height: 256px; }
.d-empty .fig .win :is(iframe, .kl-svg) { left: -12%; top: -12%; width: 124%; height: 124%; }
.d-empty-t { display: grid; gap: 8px; max-width: 360px; }
.d-empty-t > p:not(.m-h) { color: var(--m-3); }
.d-empty-t .row { margin-top: 10px; }
.d-filled { padding: 18px 20px 16px; }
.d-legend { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.d-legend p { display: flex; align-items: baseline; gap: 10px; margin-right: auto !important; }
.d-legend p b { font-size: 24px; letter-spacing: -0.02em; }
.d-legend p .up { font-size: 12.5px; }
.d-legend > span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--m-3); }
.sw { width: 14px; height: 2px; border-radius: 1px; background: var(--c); }
.sw.dash { background: repeating-linear-gradient(90deg, var(--m-4) 0 3px, transparent 3px 6px); }
.d-chart { display: block; width: 100%; height: 180px; margin-top: 16px; overflow: visible; }
.d-chart .grid line:not(:last-child) { display: none; }
.d-chart .grid line { stroke: var(--m-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.d-chart .prev { fill: none; stroke: var(--m-4); stroke-width: 1.5; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.d-chart .area { fill: color-mix(in srgb, var(--d-blue) 13%, transparent); }
.d-chart .line { fill: none; stroke: var(--d-blue); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.d-filled.swap .d-chart { animation: reveal .9s cubic-bezier(.3, .7, .2, 1); }
@keyframes reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.d-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--m-3); }
.d-filled .row { margin-top: 14px; }

/* ---------- 2. docs: Relaykit ---------- */
.ex:has(.docs) .ex-stage { --h: 660px; }
.dc { left: 0; top: 0; right: 0; height: 760px; }
.dc-top { height: 52px; padding: 0 20px; display: flex; align-items: center; gap: 16px; color: var(--m-3); }
.dc-top b { display: flex; align-items: center; gap: 8px; }
.dc-top em { font-style: normal; color: var(--m-3); margin-left: -8px; }
.dc-search { width: 260px; margin-left: 24px; height: 30px; padding: 0 8px 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--m-line); border-radius: 8px; background: var(--m-raise); }
.dc-search kbd { margin-left: auto; }
.dc-main { display: grid; grid-template-columns: 228px minmax(0, 1fr) 210px; }
.dc-nav { min-height: 720px; padding: 18px 12px; display: grid; align-content: start; gap: 1px; }
.dc-nav p { margin: 14px 0 4px !important; padding: 0 8px; font-size: 12px; font-weight: 510; color: var(--m-ink); }
.dc-nav p:first-child { margin-top: 0 !important; }
.dc-nav span { height: 28px; padding: 0 8px; display: flex; align-items: center; border-radius: 6px; color: var(--m-3); }
.dc-nav span.cur { background: var(--m-raise); color: var(--m-ink); }
.dc-nav em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--d-green); }
.dc-page { min-width: 0; padding: 22px 48px 40px; }
.dc-crumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--m-3); }
.dc-crumb i { font-size: 11px; }
.dc-title { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: center; margin-top: 6px; }
.dc-h1 { font-size: 30px; line-height: 1.15; font-weight: 510; letter-spacing: -0.024em; color: var(--m-ink); }
.dc-lede { margin-top: 10px !important; font-size: 15px; line-height: 1.55; color: var(--m-2); max-width: 54ch; }
.dc-meta { margin-top: 14px !important; display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--m-3); }
.dc-meta span:not(.tag) { display: inline-flex; align-items: center; gap: 5px; }
.dc-title .fig { width: 260px; height: 208px; }
.dc-title .fig .win :is(iframe, .kl-svg) { left: -10%; top: -10%; width: 120%; height: 120%; }
.dc-p { margin-top: 6px !important; color: var(--m-2); font-size: 14px; }
.dc-code { margin-top: 12px; border: 1px solid var(--m-line); border-radius: 10px; overflow: hidden; background: var(--m-back); }
.dc-code-head { height: 38px; padding: 0 6px 0 4px; display: flex; align-items: center; gap: 2px; background: var(--m-raise); }
.dc-code-head > span:not(.grow) { height: 38px; padding: 0 10px; display: flex; align-items: center; font-size: 12.5px; color: var(--m-3); }
.dc-code-head > span.cur { color: var(--m-ink); font-weight: 510; }
.dc-btn { height: 26px; min-width: 26px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 6px; background: none; color: var(--m-3); font-size: 12.5px; cursor: pointer; }
.dc-btn:hover { background: var(--m-raise); color: var(--m-ink); }
.dc-btn.run { background: var(--m-back); color: var(--m-ink); padding: 0 9px; border-radius: 999px; }
.dc-btn i { font-size: 13px; }
.dc-lines { margin: 0; padding: 12px 0; list-style: none; counter-reset: ln; font: 400 12.5px/22px 'IBM Plex Mono', ui-monospace, monospace; color: var(--m-ink); }
.dc-lines li { counter-increment: ln; padding-right: 16px; white-space: pre; }
.dc-lines li::before { content: counter(ln); display: inline-block; width: 40px; padding-right: 16px; text-align: right; color: var(--m-4); }
.dc-lines .pr { color: var(--m-3); }
.dc-lines .out { color: var(--m-3); }
.dc-lines .out.ok { color: var(--d-green); }
.dc-lines .out.swap { animation-duration: .25s; }
.dc-note { margin-top: 12px !important; min-height: 20px; display: flex; align-items: center; gap: 7px; color: var(--m-2); }
.dc-note i { color: var(--d-green); font-size: 15px; }
.dc-toc { padding: 24px 20px; display: grid; align-content: start; gap: 8px; font-size: 12.5px; color: var(--m-3); }
.dc-toc p { font-weight: 510; color: var(--m-ink); margin-bottom: 2px !important; }
.dc-toc span.cur { color: var(--m-ink); }

/* ---------- 3. shipping email in Larkmail ---------- */
.ex:has(.mail) .ex-stage { --h: 760px; }
.ml-list { left: 0; top: 0; width: 400px; height: 800px; }
.ml-lhead { height: 52px; padding: 0 18px; display: flex; align-items: center; gap: 10px; }
.ml-lhead em { font-style: normal; font-size: 12px; color: var(--m-3); }
.ml-lhead i { color: var(--m-3); font-size: 15px; }
.ml-row { display: flex; gap: 12px; margin: 0 8px 2px; padding: 11px 10px; border-radius: 8px; max-width: 324px; }
.ml-row > div { flex: 1; min-width: 0; }
.ml-row p { display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--m-3); }
.ml-row p b { font-weight: 400; color: var(--m-2); }
.ml-row.unread p b, .ml-row.unread .s { font-weight: 510; color: var(--m-ink); }
.ml-row .s { color: var(--m-2); display: block; }
.ml-row .x { display: block; }
.ml-row time { font-size: 12px; color: var(--m-3); }
.ml-row.cur { background: var(--m-raise); }
.ml-open { left: 340px; top: 28px; width: 900px; height: 820px; }
.ml-bar { height: 48px; padding: 0 16px; display: flex; align-items: center; color: var(--m-3); font-size: 16px; }
.ml-bar span { display: flex; gap: 16px; }
.ml-subj { padding: 18px 28px 0; font-size: 19px; font-weight: 510; letter-spacing: -0.016em; color: var(--m-ink); }
.ml-from { padding: 12px 28px 16px; display: flex; align-items: center; gap: 12px; }
.ml-from .av { width: 32px; height: 32px; font-size: 13px; }
.ml-from p { flex: 1; line-height: 1.4; color: var(--m-3); }
.ml-from time { font-size: 12.5px; color: var(--m-3); }
/* the email itself is a light canvas in both themes, as mail clients render most mail */
.em { width: min(560px, calc(100% - 40px)); margin: 0 auto; padding: 26px 32px 28px; background: #ffffff; border: 1px solid #e6e6ea; border-radius: 10px; color: #18181b; }
.em-brand { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; color: #7a3d1c; }
.em-hero { margin: 16px 0 0; border-radius: 8px; background: #f7f7f8; display: grid; place-items: center; height: 168px; overflow: hidden; }
.em-hero img { display: block; width: 230px; height: 184px; object-fit: contain; }
.em-h { margin-top: 20px !important; font-size: 20px; font-weight: 600; letter-spacing: -0.018em; color: #18181b; }
.em-p { margin-top: 6px !important; color: #4a4a52; line-height: 1.55; }
.em-track { margin-top: 16px !important; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #f4f4f6; border-radius: 10px; color: #4a4a52; font-size: 12.5px; }
.em-track .pill { height: 22px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: #e8f5ee; color: #17633f; font-weight: 510; }
.em-track a { margin-left: auto; height: 28px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; background: #18181b; color: #fff; font-weight: 510; text-decoration: none; }
.em-items { width: 100%; margin-top: 14px; border-collapse: collapse; color: #18181b; }
.em-items td { padding: 6px 0; vertical-align: middle; }
.em-items td:first-child { display: flex; align-items: center; gap: 12px; }
.em-items td:last-child { text-align: right; }
.em-items small { display: block; font-size: 12px; color: #6a6a73; }
.em-items .th { width: 36px; height: 36px; border-radius: 6px; background: var(--c); flex: none; }
.em-items .sum td { color: #4a4a52; }
.em-items .tot td { padding-top: 12px; font-weight: 600; }

/* ---------- 4. changelog: Basalt ---------- */
.ex:has(.log) .ex-stage { --h: 700px; }
.lg { left: 0; top: 0; right: 0; height: 820px; }
.lg-top { height: 52px; padding: 0 20px; display: flex; align-items: center; gap: 20px; color: var(--m-3); }
.lg-top b { display: flex; align-items: center; gap: 8px; margin-right: 12px; }
.lg-top .cur { color: var(--m-ink); }
.lg-page { max-width: 1060px; margin: 0 auto; padding: 32px 40px; }
.lg-headrow { display: flex; align-items: center; justify-content: space-between; }
.lg-h1 { font-size: 30px; font-weight: 510; letter-spacing: -0.026em; color: var(--m-ink); }
.lg-list { margin: 22px 0 0; padding: 0; list-style: none; }
.lg-entry { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 28px 0; }
.lg-ver { display: grid; gap: 2px; align-content: start; padding-top: 2px; }
.lg-ver time { color: var(--m-3); }
.lg-ver span { font: 500 12px/1.6 'IBM Plex Mono', ui-monospace, monospace; color: var(--m-2); }
.tags { display: flex; gap: 6px; }
.lg-card { position: relative; height: 340px; border: 1px solid var(--m-line); border-radius: 12px; background: var(--m-back); overflow: hidden; }
.lg-card .fig { position: absolute; right: -170px; top: -120px; width: 780px; height: 624px; }
.lg-card .fig .win :is(iframe, .kl-svg) { left: 0; top: 0; width: 100%; height: 100%; }
.lg-card-t { position: relative; z-index: 1; width: 47%; padding: 24px 26px; display: grid; gap: 8px; align-content: start; pointer-events: none; }
.lg-card-t > * { pointer-events: auto; }
.lg-card-t > p:not(.tags):not(.lg-h2) { color: var(--m-3); line-height: 1.55; }
.lg-h2 { margin-top: 6px !important; font-size: 20px; font-weight: 510; letter-spacing: -0.02em; color: var(--m-ink); }
.lg-h3 { margin-top: 8px !important; font-size: 15px; font-weight: 510; letter-spacing: -0.012em; color: var(--m-ink); }
.lg-entry ul { margin: 8px 0 0; padding-left: 18px; color: var(--m-3); display: grid; gap: 4px; }
.lg-entry code { font: 400 12px 'IBM Plex Mono', ui-monospace, monospace; padding: 1px 5px; border-radius: 4px; background: var(--m-raise); color: var(--m-2); }
.lg-bench { margin-top: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 10px; background: color-mix(in srgb, var(--m-raise) 88%, transparent); }
.lg-bench p { padding: 10px 12px; display: grid; gap: 2px; }
.lg-bench span { font-size: 12px; color: var(--m-3); }
.lg-bench b { font-size: 18px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; transition: color .3s; }
.lg-bench b.fast { color: var(--d-green); }
.lg-card .row { margin-top: 8px; }

/* ---------- 5. security: Kestrel ---------- */
.ex:has(.sec) .ex-stage { --h: 600px; }
.sec { --fr: 120px; }
.s-app { left: 0; top: 0; width: 1100px; height: 680px; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.s-rows { padding: 8px 20px; }
.s-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.s-rows p { display: grid; gap: 2px; }
.s-rows p span { color: var(--m-3); }
.s-sheet { left: 420px; top: 90px; width: 760px; height: 560px; display: grid; grid-template-columns: 290px minmax(0, 1fr); align-items: start; }
.s-fig { height: 100%; background: var(--m-back); display: grid; place-items: start center; padding-top: 34px; }
.s-fig .fig { width: 270px; height: 216px; }
.s-fig .fig .win :is(iframe, .kl-svg) { left: -14%; top: -14%; width: 128%; height: 128%; }
.s-text { padding: 30px 32px; display: grid; gap: 8px; }
.s-steps { margin: 12px 0 8px; padding: 0; list-style: none; display: grid; gap: 2px; }
.s-steps li { min-height: 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 4px 0; color: var(--m-2); }
.s-steps i { font-size: 18px; color: var(--m-4); }
.s-steps li.ok i { color: var(--d-green); }
.s-steps li.ok > span { color: var(--m-3); }
.s-steps em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--m-3); }
.s-code { width: 100%; margin: 4px 0 2px 28px; display: flex; align-items: center; gap: 6px; }
.s-code b { width: 32px; height: 38px; display: grid; place-items: center; border: 1px solid var(--m-line-2); border-radius: 8px; background: var(--m-back); font-size: 17px; font-weight: 510; font-variant-numeric: tabular-nums; }
.s-code i { width: 8px; height: 1px; background: var(--m-4); }
li.ok .s-code b { border-color: var(--m-line); color: var(--m-3); }
.s-steps li.flash { animation: flash .9s ease-out; }
@keyframes flash { from { background: color-mix(in srgb, var(--d-green) 14%, transparent); } }
.s-text .row { margin-top: 4px; }

/* ---------- 6. upgrade modal: Quillnote ---------- */
.ex:has(.wall) .ex-stage { --h: 640px; }
.q-app { left: 0; top: 0; right: 0; height: 720px; display: grid; grid-template-columns: 220px 300px minmax(0, 1fr); }
.q-quota { margin: 18px 8px 0 !important; display: grid; gap: 8px; font-size: 12px; color: var(--m-3); }
.q-quota i { display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--d-amber) var(--w), var(--m-raise) var(--w)); }
.q-list > div { margin: 0 8px 2px; padding: 12px 12px; border-radius: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
.q-list > div.cur { background: var(--m-raise); }
.q-list p { grid-column: 1; color: var(--m-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-list time { grid-column: 2; grid-row: 1; font-size: 12px; color: var(--m-3); }
.q-doc { padding: 44px 56px; max-width: 640px; display: grid; gap: 14px; color: var(--m-2); font-size: 14px; line-height: 1.65; }
.q-h { font-size: 26px; font-weight: 510; letter-spacing: -0.022em; color: var(--m-ink); }
.w-scrim { position: absolute; inset: 0; background: var(--m-scrim); }
.w-modal { left: 50%; top: 56px; width: 430px; transform: translateX(-50%); padding: 28px 32px 24px; display: grid; justify-items: center; text-align: center; gap: 8px; border-radius: 16px; }
.w-modal .m-x { position: absolute; right: 12px; top: 12px; }
.w-fig .fig { width: 240px; height: 192px; margin: -6px 0 2px; }
.w-fig .fig .win :is(iframe, .kl-svg) { left: -24%; top: -24%; width: 148%; height: 148%; }
.w-modal .sub { max-width: 34ch; line-height: 1.5; }
.w-plan { width: 100%; margin-top: 10px !important; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--m-raise); border-radius: 10px; text-align: left; }
.w-plan span { color: var(--m-3); }
.w-said { min-height: 20px; margin-top: 4px !important; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--m-3); }
.w-said i { color: var(--d-green); font-size: 15px; }
.w-go { width: 100%; height: 38px; margin-top: 4px; font-size: 14px; }

/* ---------- narrower screens: the back panels crop further, the front panels take the width ---------- */
@media (max-width: 1240px) {
  .d-rev { left: 220px; width: 780px; }
  .s-sheet { left: 330px; }
  .ml-open { left: 300px; }
}
@media (max-width: 1000px) {
  .ex-head h2 { grid-column: 1 / -1; }
  .ex-head > div { grid-column: 1 / -1; margin-top: 14px; }
  .fig-line, .code { grid-column: 1 / -1; }
  .code { margin-top: 12px; }
  .dc-main { grid-template-columns: 200px minmax(0, 1fr); }
  .dc-toc { display: none; }
  .d-rev { left: 120px; }
  .s-sheet { left: 200px; }
  .ml-open { left: 180px; width: auto; right: 0; }
}
@media (max-width: 760px) {
  .sf { padding-top: 56px; }
  .sf-head h1 { font-size: 40px; }
  .sf-head p { font-size: 18px; }
  .ex { margin-top: 80px; padding-top: 36px; }
  .sf-head + .ex { margin-top: 64px; }
  .ex-head h2 { font-size: 26px; }
  .ex-stage { margin-top: 28px; margin-inline: calc(var(--gutter) * -1 + 8px); }
  .cmp { --fr: 0px !important; }
  .cmp .pn.front { left: 8px; right: 8px; width: auto; transform: none; }
  /* dashboard: the empty state stacks, the figure above its words */
  .ex:has(.dash) .ex-stage { --h: 700px; }
  .dash .back { width: 760px; }
  .d-rev { top: 150px; height: 600px; }
  .d-empty { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 8px 18px 20px; gap: 4px; }
  .d-empty .fig { width: 260px; height: 208px; }
  .d-empty-t .row { justify-content: center; }
  .p-meta { display: none; }
  .d-chart { height: 170px; }
  .d-axis span:nth-child(even) { display: none; }
  /* docs: no side list, the figure above the title */
  .ex:has(.docs) .ex-stage { --h: 760px; }
  .dc { height: 860px; }
  .dc-top { gap: 12px; padding: 0 14px; }
  .dc-top .opt, .dc-search kbd { display: none; }
  .dc-search { width: 30px; flex: none; margin-left: auto; padding: 0; justify-content: center; font-size: 0; }
  .dc-search i { font-size: 14px; }
  .d-legend p { flex-basis: 100%; }
  .dc-top .grow { display: none; }
  .dc-main { grid-template-columns: minmax(0, 1fr); }
  .dc-nav { display: none; }
  .dc-page { padding: 16px 16px 28px; }
  .dc-title { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dc-title .fig { order: -1; width: 220px; height: 176px; margin: 0 auto; }
  .dc-h1 { font-size: 24px; }
  .dc-lede { font-size: 14px; }
  .dc-lines { font-size: 11px; }
  .dc-lines li { white-space: pre-wrap; padding-left: 34px; text-indent: -34px; }
  .dc-lines li::before { width: 26px; padding-right: 8px; text-indent: 0; }
  /* mail: the open email over the cropped list */
  .ex:has(.mail) .ex-stage { --h: 820px; }
  .ml-open { top: 84px; height: 820px; }
  .ml-subj { padding: 14px 16px 0; font-size: 17px; }
  .ml-from { padding: 10px 16px 12px; }
  .ml-from span:not(.av) { display: none; }
  .em { width: calc(100% - 16px); padding: 18px 16px 20px; }
  .em-hero { height: 150px; }
  .em-hero img { width: 190px; height: 152px; }
  .em-track { flex-wrap: wrap; }
  .em-track a { margin-left: 0; }
  /* changelog: the version above its notes, the chip under the words */
  .ex:has(.log) .ex-stage { --h: 760px; }
  .lg { height: 860px; }
  .lg-top .opt { display: none; }
  .lg-page { padding: 20px 14px; }
  .lg-h1 { font-size: 24px; }
  .lg-entry { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .lg-ver { display: flex; gap: 10px; }
  .lg-card { height: 560px; }
  .lg-card-t { width: auto; padding: 18px; }
  .lg-card .fig { right: -100px; top: auto; bottom: -50px; width: 440px; height: 352px; }
  /* security: the sheet stacks, the vault above the steps */
  .ex:has(.sec) .ex-stage { --h: 800px; }
  .s-sheet { top: 110px; height: 640px; grid-template-columns: minmax(0, 1fr); }
  .s-fig { height: auto; background: none; padding-top: 12px; }
  .s-fig .fig { width: 220px; height: 176px; }
  .s-text { padding: 4px 18px 20px; }
  .s-code { margin-left: 0; }
  .s-code b { width: 30px; }
  /* modal */
  .ex:has(.wall) .ex-stage { --h: 660px; }
  .q-app { grid-template-columns: 200px 260px 400px; right: auto; }
  .w-modal { top: 32px; padding: 26px 18px 20px; }
  .w-plan { flex-direction: column; align-items: flex-start; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .swap, .s-steps li.flash, .d-filled.swap .d-chart { animation: none; }
  .k-btn, .lg-bench b { transition: none; }
}
