/* Lab detail pages: case page type and layout (cases.css) plus live demos. */
.case-page .lab-hero { margin: 24px 0 8px; }
.case-page .lab-hero .shot { margin: 0 auto; }
.demo { margin: 24px 0 32px; border: 1px solid #ececec; border-radius: 20px; overflow: hidden; background: #fff; }
.demo-stage { display: grid; place-items: center; min-height: 240px; padding: 40px 32px; background: #f7f7f8; background-image: radial-gradient(#e4e4e7 1px, transparent 1px); background-size: 16px 16px; }
.demo-text { max-width: 420px; margin: 0; font-size: 22px; line-height: 32px; text-align: center; color: #0a0a0a; }
.demo-text .hl { padding: 0 2px; }
.demo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 12px 16px; border-top: 1px solid #ececec; font-size: 13px; color: #6e6e73; }
.demo-field { display: inline-flex; align-items: center; gap: 8px; }
.demo-label { color: #8a8a8e; }
.demo-value { min-width: 48px; font-variant-numeric: tabular-nums; color: #0a0a0a; }
.demo-field input[type="range"] { width: 110px; accent-color: #0a0a0a; }
.demo-segment { display: inline-flex; padding: 2px; border-radius: 9px; background: #f1f1f3; }
.demo-segment button { padding: 4px 10px; border: 0; border-radius: 7px; font: inherit; color: #6e6e73; background: none; cursor: pointer; }
.demo-segment button[aria-checked="true"] { color: #0a0a0a; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.demo-toggle { accent-color: #0a0a0a; }
.demo-replay { margin-left: auto; padding: 5px 12px; border: 1px solid #e4e4e7; border-radius: 8px; font: inherit; color: #0a0a0a; background: #fff; cursor: pointer; }
.demo-replay:hover { background: #f7f7f8; }
.case-page .lab-code { margin: 16px 0 24px; overflow: hidden; border: 1px solid #ececec; border-radius: 14px; background: #f7f7f8; }
.case-page .lab-code-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; font-size: 12px; color: #8a8a8e; border-bottom: 1px solid #ececec; }
.case-page .lab-copy { padding: 2px 8px; font: inherit; color: inherit; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.case-page .lab-copy:hover { color: #0a0a0a; background: #ececec; }
.case-page .lab-code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13px/20px ui-monospace, SFMono-Regular, Menlo, monospace; color: #0a0a0a; }
@media (max-width: 640px) { .demo-replay { margin-left: 0; } }

/* ── Smooth state demos ───────────────────────────────
   --d duration, --e curve, --stag 1/0 (stagger on/off), set per demo. */
.demo-stage:has(.ss) { display: block; padding: 24px; }
.ss { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; --dly: calc(var(--d) * .07 * var(--stag)); }
.ss-side { display: grid; gap: 10px; justify-items: center; }
.ss-pane { position: relative; width: 100%; min-height: 220px; box-sizing: border-box; padding: 20px 12px; display: grid; place-items: center; background: #fff; border: 1px solid #ececee; border-radius: 14px; overflow: hidden; color: #424346; font-size: 13px; }
.ss-cap { display: flex; gap: 6px; align-items: center; font-size: 12px; color: #8a8a8e; }
.ss-cap i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #b9babd; }
.ss-cap.is-on i { border-color: #fe9600; background: #fe9600; }
.ss-snap, .ss-snap * { transition: none !important; animation: none !important; }
.ss .enter { animation: ss-enter calc(var(--d) * .86) var(--e) calc(var(--d) * .14 * var(--stag)) both; }
@keyframes ss-enter { from { opacity: 0; translate: 0 6px; filter: blur(2px); } }
.ss .group { position: relative; display: flex; }
.ss .ind { position: absolute; top: 0; left: 0; pointer-events: none; transition: transform var(--d) var(--e) var(--dly), width var(--d) var(--e) var(--dly), height var(--d) var(--e) var(--dly), opacity 200ms; }
.ss .item { position: relative; z-index: 1; cursor: pointer; user-select: none; transition: color calc(var(--d) * .65) ease calc(var(--d) * .2 * var(--stag)); }
.ss .tabs { gap: 2px; font-size: 13px; }
.ss .tabs .item { padding: 5px 10px; border-radius: 999px; color: #8a8a8e; }
.ss .tabs .item.on { color: #1d1d1f; }
.ss .tabs .ind { border-radius: 999px; background: rgb(0 0 0 / .05); }
.ss-snap .tabs .item.on { background: rgb(0 0 0 / .05); }
.ss .tab-body { margin-top: 20px; width: 220px; max-width: 100%; display: grid; gap: 8px; }
.ss .tab-body span { height: 10px; border-radius: 4px; background: #f0f0f2; }
.ss .tab-body span:first-child { height: 12px; background: #e6e6e9; }
.ss .seg-wrap { display: grid; justify-items: center; }
.ss .seg { padding: 3px; background: #f0f0f2; border-radius: 10px; }
.ss .seg .item { width: 60px; text-align: center; padding: 5px 0; border-radius: 8px; color: #8a8a8e; }
.ss .seg .item.on { color: #1d1d1f; }
.ss .seg .ind { border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 2px 6px rgb(0 0 0 / .04); }
.ss-snap .seg .item.on { background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 2px 6px rgb(0 0 0 / .04); }
.ss .bars { display: flex; gap: 5px; align-items: end; height: 70px; margin-top: 20px; }
.ss .bars span { width: 10px; border-radius: 3px; background: #e6e6e9; transition: height var(--d) var(--e) calc(var(--d) * .14 * var(--stag)); }
.ss .rows { width: 100%; max-width: 240px; display: grid; }
.ss .row { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px; border-bottom: 1px solid #ececee; cursor: pointer; user-select: none; }
.ss .row:last-child { border-bottom: 0; }
.ss .sw { position: relative; width: 34px; height: 20px; flex: none; border-radius: 999px; background: #e4e4e7; transition: background var(--d) var(--e); }
.ss .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform var(--d) var(--e); }
.ss .sw.on { background: #424346; }
.ss .sw.on::after { transform: translateX(14px); }
.ss .menu { width: 180px; padding: 6px; border: 1px solid #ececee; border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .06); flex-direction: column; }
.ss .menu .item { padding: 7px 10px; border-radius: 7px; color: #424346; transition: none; }
.ss .menu .item:last-child { color: #d14343; }
.ss .menu .ind { border-radius: 7px; background: #f2f2f4; opacity: 0; }
.ss .menu .ind.show { opacity: 1; }
.ss-snap .menu .item.on { background: #f2f2f4; }
.ss .acc { width: 100%; max-width: 250px; }
.ss .q { border-bottom: 1px solid #ececee; }
.ss .q-head { display: flex; justify-content: space-between; gap: 8px; padding: 10px 2px; color: #1d1d1f; cursor: pointer; user-select: none; }
.ss .q-head i { font-style: normal; color: #8a8a8e; transition: rotate var(--d) var(--e); }
.ss .q.open .q-head i { rotate: 45deg; }
.ss .q-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--d) var(--e); }
.ss .q.open .q-wrap { grid-template-rows: 1fr; }
.ss .q-body { overflow: hidden; min-height: 0; color: #8a8a8e; line-height: 1.5; opacity: 0; translate: 0 6px; transition: opacity calc(var(--d) * .7) ease, translate var(--d) var(--e); }
.ss .q.open .q-body { opacity: 1; translate: 0 0; transition-delay: calc(var(--d) * .2 * var(--stag)); }
.ss .q-body p { margin: 0 2px 12px; }
.case-page .lab-hero .lab-embed { margin: 0 auto; }
@media (max-width: 560px) { .ss { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ss .ind, .ss .sw, .ss .sw::after, .ss .q-wrap { transition: none; } }
.ss .tabs { gap: 0; font-size: 12px; }
.ss .tabs .item { padding: 4px 7px; }
.ss-pane:has(.tabs) { padding-inline: 6px; }
/* one pane now: let it sit on the dotted stage */
.ss { display: block; }
.ss-pane { max-width: 360px; margin: 0 auto; }

/* ── Component picker (replaces the old control bar) ─── */
.demo { position: relative; overflow: visible; }
.demo-stage { border-radius: 19px; }
.demo-pick { position: absolute; top: 12px; left: 12px; z-index: 5; font-size: 13px; }
.demo-pick-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 10px; border: 1px solid #ececee; border-radius: 9px; font: inherit; color: #1d1d1f; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .04); cursor: pointer; }
.demo-pick-btn:hover { border-color: #dcdce0; }
.demo-pick-btn svg { color: #6e6e73; }
.demo-pick-chev { transition: rotate 280ms cubic-bezier(.22,1,.36,1); }
.demo-pick-btn[aria-expanded="true"] .demo-pick-chev { rotate: 180deg; }
.demo-pick-menu { position: absolute; top: 36px; left: 0; display: flex; flex-direction: column; min-width: 168px; padding: 4px; border: 1px solid #ececee; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgb(0 0 0 / .08); transform-origin: top left; animation: pick-in 220ms cubic-bezier(.22,1,.36,1); }
.demo-pick-menu[hidden] { display: none; }
@keyframes pick-in { from { opacity: 0; scale: .96; translate: 0 -4px; } }
.demo-pick-ind { position: absolute; top: 0; left: 0; border-radius: 8px; background: #f2f2f4; opacity: 0; pointer-events: none; transition: transform 320ms cubic-bezier(.22,1,.36,1), width 320ms cubic-bezier(.22,1,.36,1), height 320ms cubic-bezier(.22,1,.36,1), opacity 150ms; }
.demo-pick-ind.show { opacity: 1; }
.demo-pick-opt { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-radius: 8px; font: inherit; text-align: left; color: #424346; background: none; cursor: pointer; outline: none; }
.demo-pick-opt svg { color: #8a8a8e; }
.demo-pick-opt[aria-selected="true"] { color: #1d1d1f; }
.demo-pick-opt[aria-selected="true"] svg { color: #1d1d1f; }
.demo-stage:has(.ss) { padding: 32px 24px; }
.demo:has(.demo-pick) .demo-stage { padding-top: 56px; }
.ss.enter-soft { animation: ss-enter 420ms cubic-bezier(.22,1,.36,1) both; }
@media (prefers-reduced-motion: reduce) { .demo-pick-ind, .demo-pick-menu, .ss.enter-soft { transition: none; animation: none; } }
.ss .row { gap: 16px; }
.ss .rows { max-width: 260px; }
/* tabs never move: the body below always holds four lines of room */
.ss .tab-body { height: 66px; align-content: start; }

/* ── Code blocks (Figma 771:4912) ──────────────────────── */
.case-page .lab-code { position: relative; margin: 16px 0 24px; overflow: visible; background: #fff; border: 0.5px solid rgba(0, 0, 0, .12); border-radius: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.case-page .lab-code-head { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: #fafafa; border: 0; border-bottom: 0.5px solid rgba(0, 0, 0, .12); border-radius: 12px 12px 0 0; font-size: 13px; line-height: 20px; color: #71717a; }
.case-page .lab-code-name { flex: 1; min-width: 0; }
.case-page .lab-code-btn { display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 0; background: none; cursor: pointer; opacity: .8; transition: opacity 150ms ease, scale 150ms ease; }
.case-page .lab-code-btn:hover { opacity: 1; }
.case-page .lab-code-btn:active { scale: .9; }
.case-page .lab-copy.is-done { opacity: .35; }
.case-page .lab-code-more-wrap { position: relative; display: grid; }
.case-page .lab-code-menu { position: absolute; top: 24px; right: -8px; z-index: 5; display: flex; flex-direction: column; min-width: 120px; padding: 4px; background: #fff; border: 0.5px solid rgba(0, 0, 0, .12); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); animation: pick-in 200ms cubic-bezier(.22, 1, .36, 1); }
.case-page .lab-code-menu[hidden] { display: none; }
.case-page .lab-code-menu button { padding: 6px 10px; border: 0; border-radius: 6px; font: inherit; text-align: left; color: #18181b; background: none; cursor: pointer; }
.case-page .lab-code-menu button:hover { background: #f4f4f5; }
.case-page .lab-code-body { display: flex; gap: 16px; padding: 16px; overflow-x: auto; font: 13px/28px "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.case-page .lab-code-nums { flex: none; width: 24px; margin: 0; padding: 0; list-style: none; text-align: right; color: #a1a1aa; user-select: none; }
.case-page .lab-code pre { flex: 1; min-width: 0; margin: 0; padding: 0; overflow: visible; font: inherit; color: #18181b; }
.lab-code .tk-k { color: #a855f7; }
.lab-code .tk-f, .lab-code .tk-n { color: #f97316; }
.lab-code .tk-s { color: #16a34a; }
.lab-code .tk-c { color: #a1a1aa; }
.case-page .lab-code-nums li { margin: 0; padding: 0; font: inherit; line-height: 28px; }
.case-page .lab-code-nums li::before, .case-page .lab-code-nums li::marker { content: none; }
/* compact pass: tighter padding, matching 24px icon buttons */
.case-page .lab-code-head { gap: 2px; padding: 6px 6px 6px 12px; line-height: 20px; }
.case-page .lab-code-name { margin-right: 8px; }
.case-page .lab-code-more-wrap { display: flex; align-items: center; }
.case-page .lab-code-btn { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 24px; height: 24px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; opacity: .75; transition: opacity 150ms ease, background-color 150ms ease, scale 150ms ease; }
.case-page .lab-code-btn:hover, .case-page .lab-code-btn[aria-expanded="true"] { opacity: 1; background: rgba(0, 0, 0, .05); }
.case-page .lab-code-btn img { display: block; width: 16px; height: 16px; }
.case-page .lab-code-menu { top: 28px; right: 0; }
.case-page .lab-code-body { gap: 12px; padding: 10px 12px; line-height: 22px; }
.case-page .lab-code-nums { width: 16px; }
.case-page .lab-code-nums li { line-height: 22px; }
/* more room between sections on Lab pages */
.case-page .prose h2 { margin-top: 72px; }
.case-page .prose .lab-code:last-child, .case-page .prose .demo:last-child { margin-bottom: 0; }

/* ── Sidenav demo (approach from theyso, styling from this site) ──
   The column animates its width; the panel keeps its place underneath and the
   page slides over it. Nav still, surface moving. */
.demo-stage:has(.sn-window) { display: block; padding: 32px 24px; }
.sn-window { --sn-w: 200px; --sn-t: 300ms cubic-bezier(.4, 0, .2, 1); --bg: #f4f4f5; --fg: #18181b; --side-fg: #3f3f46; --muted-fg: #71717a; --accent: rgb(0 0 0 / .05); --accent-hover: rgb(0 0 0 / .08);
  position: relative; display: flex; max-width: 640px; height: 360px; margin: 0 auto; overflow: hidden; background: var(--bg); border: 0.5px solid rgba(0, 0, 0, .12); border-radius: 14px; box-shadow: 0 8px 28px rgb(0 0 0 / .07); font-size: 12px; letter-spacing: -.02em; color: var(--side-fg); text-align: left; }
/* macOS window controls, then the toolbar at 86px, both on the 21px line */
.sn-lights { position: absolute; top: 16px; left: 14px; z-index: 3; display: flex; gap: 8px; }
.sn-lights i { width: 10px; height: 10px; border-radius: 50%; background: #e4e4e7; }
.sn-toolbar { position: absolute; top: 9px; left: 86px; z-index: 3; display: flex; align-items: center; gap: 4px; }
.sn-toggle { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; color: var(--side-fg); background: transparent; cursor: pointer; outline: none; transition: background-color 150ms; }
.sn-toggle:hover, .sn-toggle:focus-visible { background: var(--accent); }
.sn-toggle svg { width: 14px; height: 14px; }
.sn-toggle .ic-closed, .sn-window.closed .sn-toggle .ic-open { display: none; }
.sn-window.closed .sn-toggle .ic-closed { display: block; }
.sn-side { position: relative; flex: none; width: var(--sn-w); height: 100%; transition: width var(--sn-t); }
.sn-window.closed .sn-side { width: 0; }
.sn-frame { position: absolute; inset: 0 auto 0 0; width: var(--sn-w); overflow: hidden; }
/* visibility flips at the end, so the panel shows until the page covers it */
.sn-panel { display: flex; flex-direction: column; gap: 16px; box-sizing: border-box; width: var(--sn-w); height: 100%; padding: 44px 10px 10px; overflow: hidden; background: var(--bg); transition: visibility 0s 0s; }
.sn-window.closed .sn-panel { visibility: hidden; transition-delay: 300ms; }
.sn-nav { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 8px; margin: -2px; padding: 2px; overflow-y: auto; scrollbar-width: none; }
.sn-item { display: flex; align-items: center; gap: 8px; box-sizing: border-box; width: 100%; height: 26px; padding: 0 8px; border-radius: 8px; color: var(--side-fg); text-decoration: none; white-space: nowrap; outline: none; transition: background-color 150ms, opacity 150ms; }
.sn-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sn-item svg { flex: none; width: 14px; height: 14px; }
.sn-item:hover, .sn-item:focus-visible, .sn-item.on { background: var(--accent); }
.sn-item.on:hover, .sn-item.on:focus-visible { background: var(--accent-hover); }
.sn-primary { color: #fff; background: #18181b; }
.sn-primary:hover, .sn-primary:focus-visible { background: #27272a; }
.sn-group { display: flex; flex-direction: column; flex: none; }
.sn-group-head { display: inline-flex; align-self: flex-start; align-items: center; gap: 2px; height: 26px; padding: 0; border: 0; font: inherit; letter-spacing: inherit; color: #a1a1aa; background: none; cursor: pointer; outline: none; }
.sn-group-head:hover, .sn-group-head:focus-visible { color: var(--side-fg); }
.sn-group-head svg { width: 14px; height: 14px; rotate: -90deg; transition: rotate 200ms; }
.sn-group.open .sn-group-head svg { rotate: 0deg; }
.sn-group-wrap { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 200ms, opacity 200ms; }
.sn-group.open .sn-group-wrap { grid-template-rows: 1fr; opacity: 1; }
.sn-group-body { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.sn-workspace { display: flex; flex: none; align-items: center; gap: 8px; height: 32px; padding: 4px 8px 4px 4px; border-radius: 10px; color: var(--side-fg); white-space: nowrap; cursor: pointer; transition: background-color 150ms; }
.sn-workspace:hover { background: var(--accent); }
.sn-workspace .name { display: flex; flex: 1; min-width: 0; align-items: center; gap: 2px; }
.sn-workspace .name svg { width: 14px; height: 14px; flex: none; color: #a1a1aa; }
.sn-avatar { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 8px; font-weight: 600; color: #0f766e; background: #ccfbf1; }
/* the page: 10px gutter on its end side and below; on its start side only when the sidebar hides */
.sn-inset { position: relative; z-index: 1; display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 1px; padding: 7px 10px 10px 0; background: var(--bg); transition: padding var(--sn-t); }
.sn-window.closed .sn-inset { padding-left: 10px; }
/* the title clears the window controls and the toolbar when the sidebar hides */
.sn-head { flex: none; height: 28px; padding: 2px 8px; box-sizing: border-box; line-height: 24px; font-size: 13px; font-weight: 500; color: var(--muted-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: padding var(--sn-t); }
.sn-window.closed .sn-head { padding-left: 144px; }
.sn-card { display: grid; align-content: start; gap: 10px; flex: 1; min-height: 0; padding: 24px; background: #fff; border: 0.5px solid rgba(0, 0, 0, .1); border-radius: 14px; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.sn-card span { height: 10px; width: 70%; border-radius: 4px; background: #f0f0f2; }
.sn-card span:first-child { height: 14px; width: 40%; background: #e6e6e9; }
.sn-card span:last-child { width: 55%; }
@media (max-width: 560px) { .sn-window { --sn-w: 168px; } }
@media (prefers-reduced-motion: reduce) { .sn-side, .sn-inset, .sn-head, .sn-group-wrap, .sn-group-head svg { transition: none; } .sn-window.closed .sn-panel { transition-delay: 0s; } }
.case-page .sn-window a, .case-page .sn-window a:hover { text-decoration: none; border: 0; color: inherit; }
.case-page .sn-window a.sn-primary { color: #fff; }
/* skeleton pass: wider stage that breaks out of the text column, nav drawn as mock lines */
.case-page .demo:has(.sn-window) { width: min(880px, calc(100vw - 32px)); margin-left: 50%; translate: -50% 0; }
.sn-window { max-width: 800px; height: 400px; }
.sn-window b { display: block; height: 8px; border-radius: 4px; background: #e4e4e7; }
.sn-item i { flex: none; width: 14px; height: 14px; border-radius: 4px; background: #e4e4e7; }
.sn-item b { flex: none; }
.sn-item.on b, .sn-item.on i { background: #d4d4d8; }
.case-page .sn-window a.sn-primary b { background: rgb(255 255 255 / .35); }
.sn-group-head b { background: #ececee; height: 6px; }
.sn-group-head:hover b { background: #d4d4d8; }
.sn-avatar { background: #e4e4e7; }
.sn-workspace b { flex: none; }
.sn-card { padding: 28px 32px; gap: 12px; }
.sn-card span:nth-child(4) { width: 82%; } .sn-card span:nth-child(5) { width: 64%; } .sn-card span:nth-child(6) { width: 48%; }
.sn-window { width: 100%; box-sizing: border-box; }
/* one toggle icon: its bar slides to the right edge while the sidebar is hidden */
.sn-toggle svg { display: block !important; }
.sn-toggle .sn-bar { transition: transform var(--sn-t); }
.sn-window.closed .sn-toggle .sn-bar { transform: translateX(6px); }
@media (prefers-reduced-motion: reduce) { .sn-toggle .sn-bar { transition: none; } }
/* toggle sits right after the window dots; the hidden-state title clears both */
.sn-toolbar { left: 66px; }
.sn-window.closed .sn-head { padding-left: 92px; }
/* dashboard skeleton in the page card */
.sn-card.db { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; overflow: hidden; }
.db b { display: block; height: 8px; border-radius: 4px; background: #ececee; }
.db .db-title { width: 140px; height: 12px; background: #e4e4e7; flex: none; }
.db-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; flex: none; }
.db-kpi { display: grid; gap: 10px; padding: 12px; border: 0.5px solid rgba(0, 0, 0, .1); border-radius: 10px; }
.db .db-num { height: 14px; background: #e4e4e7; }
.db-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; flex: 1; min-height: 0; }
.db-chart, .db-donut { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 12px; border: 0.5px solid rgba(0, 0, 0, .1); border-radius: 10px; }
.db-bars { display: flex; align-items: flex-end; gap: 6px; flex: 1; min-height: 40px; }
.db-bars i { flex: 1; border-radius: 3px 3px 1px 1px; background: #e4e4e7; }
.db-bars i:nth-child(n+10) { background: #d4d4d8; }
.db-ring { align-self: center; flex: none; width: 64px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(#d4d4d8 0 62%, #ececee 0); -webkit-mask: radial-gradient(closest-side, transparent 62%, #000 63%); mask: radial-gradient(closest-side, transparent 62%, #000 63%); margin: auto; }
.db-table { display: grid; flex: none; border-top: 0.5px solid rgba(0, 0, 0, .1); }
.db-row { display: grid; grid-template-columns: 14px minmax(0, 2fr) minmax(0, 1.4fr) 44px; align-items: center; gap: 12px; height: 26px; border-bottom: 0.5px solid rgba(0, 0, 0, .06); }
.db-row b { max-width: 100%; }
.db-dot { width: 14px; height: 14px; border-radius: 50%; background: #ececee; }
.db .db-pill { width: 44px; height: 14px; border-radius: 999px; }
.sn-inset { height: 100%; box-sizing: border-box; min-height: 0; }
.sn-card.db { flex: 1 1 0; min-height: 0; }
.db-main { flex: 1 1 0; }
.sn-window { height: 460px; }
.db-ring { width: auto; height: 100%; max-height: 72px; min-height: 40px; }
.db-ring { width: 64px; height: 64px; max-height: none; min-height: 0; flex: none; aspect-ratio: auto; }
.db-donut { align-items: stretch; }
.sn-card.db .db-ring { display: block; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(#d4d4d8 0 62%, #ececee 0); }
/* in the Lab list the card keeps the size of every other preview; the window just fills more of it */
.lab-preview .demo-stage:has(.sn-window) { padding: 20px; }
.lab-preview .sn-window { height: 380px; }
/* page card: one centered skeleton paragraph */
.sn-card.sc-text { display: grid; place-items: center; align-content: center; padding: 24px; }
.sc-lines { display: grid; justify-items: center; gap: 12px; width: min(240px, 80%); }
.sc-lines b, .sc-lines i { display: block; height: 10px; border-radius: 5px; background: #ececee; }
.sc-lines b { width: 55%; height: 14px; margin-bottom: 4px; background: #e4e4e7; }
.sc-lines i { width: 100%; }
.sc-lines i:last-child { width: 72%; }
