Files

307 lines
26 KiB
CSS

/* Dashboards (v2): see Dashboards.jsx. Built on components/v2/Keynote*, on Hanzo's deck (docs/build-notes/MASTER.md section 3):
ink #0a0a0a, greys #525252 / #737373, whites and silvers; the one graphite room is the close. The marker that used to
be yellow is silver #e5e5e5 (fills and marks only; text stays ink). Sizes 12 13 14 16 17 21 26 44 52; weights 220 /
400 / 497 / 606. Outline or fill, never both; no shadows. Entrance and pinned states apply only under .js. */
.db { --db-m: light-dark(#e5e5e5, var(--secondary)); --db-f: light-dark(#f5f5f5, var(--muted)); }
/* ---------- charts (shared by the hero, the board and the monitor) ---------- */
.db-ch { position: relative; width: 100%; height: 100%; min-height: 0; }
.db-ch-line svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.db-ch .g { stroke: light-dark(#ededed, var(--secondary)); stroke-width: 1; }
.db-ch .area { fill: var(--db-f); }
.db-ch .ln { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; }
.db-ch .zone { fill: var(--db-f); }
.db-ch .th { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 6; }
.db-ch .pt { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--x-raised); border: 2px solid var(--ink); transition: background-color .15s var(--e-out), transform .3s var(--e-move); }
/* over the line is told by shape: the point fills and grows */
.db-ch .pt.hot { background: var(--ink); transform: scale(1.3); }
.db-ch-bars { display: flex; align-items: flex-end; gap: clamp(6px, .9vw, 12px); }
.db-ch-bars span { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.db-ch-bars i { display: block; height: calc(var(--db-h) * 100%); border-radius: 8px 8px 4px 4px; background: light-dark(#d4d4d4, var(--secondary-hover)); transform-origin: 50% 100%; }
.db-ch-bars.score i { background: var(--ink); }
.db-ch-bars.score span:nth-child(4) i { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, transparent 2px 7px); }
.db-ch-bars em { margin-top: 8px; text-align: center; font: 497 13px/1 var(--mono); font-style: normal; color: var(--faint); }
/* a widget draws itself (CSS from first paint, no script needed) */
.js .db-ch.draw .ln { animation: db-draw 1.2s var(--e-in) .2s both; }
.js .db-ch-bars.draw i { animation: db-grow .5s var(--e-in) both; animation-delay: calc(.2s + var(--db-i) * 60ms); }
@keyframes db-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes db-grow { from { transform: scaleY(0); } }
/* ---------- hero: the saved query and its widget ---------- */
.db-hero { width: 100%; aspect-ratio: 16 / 7; display: flex; flex-direction: column; }
.db-hero-bar { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px clamp(24px, 4vw, 64px); border-bottom: 1px solid var(--line); background: var(--x-sunk); }
.db-hero-bar > i { width: 10px; height: 10px; border-radius: 50%; background: light-dark(#e5e5e5, var(--secondary)); }
.db-hero-t { margin-left: 12px; font: 497 16px/1 var(--sans); color: var(--ink); }
.db-tabs { margin-left: auto; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: light-dark(#ededed, var(--secondary)); }
.db-tabs button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: light-dark(#525252, var(--muted-foreground)); font: 497 14px/1 var(--mono); cursor: pointer; transition: background-color .15s var(--e-out), color .15s var(--e-out), transform .15s var(--e-out); }
@media (hover: hover) { .db-tabs button:hover { color: var(--ink); } }
.db-tabs button:active { transform: scale(.97); transition-duration: 90ms; }
.db-tabs button[aria-selected='true'] { background: var(--x-raised); color: var(--ink); }
.db-hero-b { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.db-q { display: flex; flex-direction: column; gap: 17px; padding: clamp(27px, 3.4vw, 44px) clamp(24px, 3vw, 44px) clamp(27px, 3.4vw, 44px) clamp(24px, 4vw, 64px); border-right: 1px solid var(--line); background: var(--x-sunk); }
.db-q pre { margin: 0; font: 497 17px/1.8 var(--mono); color: light-dark(#525252, var(--muted-foreground)); white-space: pre; }
.db-l { display: block; width: max-content; max-width: 100%; }
/* the query types itself: each line wipes in by character steps */
.js .db-l { animation: db-type .4s steps(16, end) both; animation-delay: calc(.2s + var(--db-i) * .3s); }
@keyframes db-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.db-q pre em { font-style: normal; padding: 1px 8px; border-radius: 6px; background: var(--db-m); color: var(--ink); }
.db-q pre b { font-weight: 606; color: var(--ink); }
.db-q-say { margin: auto 0 0; font-size: 14px; color: var(--soft); }
.db-w { display: flex; flex-direction: column; gap: 17px; padding: clamp(27px, 3.4vw, 44px) clamp(27px, 4.4vw, 72px) clamp(24px, 3vw, 44px) clamp(27px, 4vw, 64px); min-width: 0; }
.db-w-h { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--soft); }
.db-w-h b { color: var(--ink); font-weight: 497; }
.db-w-h span, .db-ph span { margin-left: auto; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); font: 497 13px/1 var(--mono); color: light-dark(#525252, var(--muted-foreground)); white-space: nowrap; }
.db-w-h span.on, .db-ph span.on { background: var(--db-m); border-color: transparent; color: var(--ink); }
.db-w-c { flex: 1; }
/* ---------- the signature: the board builds itself ---------- */
.db-build { position: relative; padding-top: clamp(44px, 6vw, 96px); }
.db-build-h { align-items: end; row-gap: 17px; }
.db-build-t { grid-column: 1 / span 6; }
.db-build-l { grid-column: 8 / -1; }
/* with JS off (and before it runs) the parts stand stacked beside a finished board */
.db-pin { padding: 44px 0 72px; }
.db-pin-g { align-items: start; }
.db-say { grid-column: 1 / span 4; position: relative; display: flex; flex-direction: column; gap: 44px; }
.db-say-a { display: flex; flex-direction: column; gap: 17px; }
.db-say-a .kn-headline { max-width: 13ch; }
.db-n { margin: 0; font: 606 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--quiet); }
.db-d { margin: 0; font-size: 16px; line-height: 1.6; color: var(--soft); max-width: 40ch; text-wrap: pretty; }
.db-rail { display: none; }
.db-board { grid-column: 5 / -1; position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 12px; height: min(72svh, 680px); }
.db-slot { border-radius: 16px; border: 1.5px dashed light-dark(rgba(0, 0, 0, .1), var(--border)); }
.db-panel { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; padding: clamp(14px, 1.4vw, 20px); border-radius: 16px; background: var(--x-raised); border: 1px solid var(--line); outline: 2px solid transparent; outline-offset: -1px; transform-origin: 50% 50%; transition: outline-color .3s var(--e-out); }
.db-panel[data-on] { outline-color: var(--ink); z-index: 2; }
.db-ph { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); min-width: 0; }
.db-ph b { color: var(--ink); font-weight: 497; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-panel .db-ch { flex: 1; }
.db-store { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.db-store li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--db-f); font: 400 14px/1 var(--sans); color: var(--ink); text-transform: capitalize; }
.db-store i { width: 12px; height: 12px; border-radius: 4px; background: var(--ink); }
.db-store li:nth-child(2) i { background: #737373; }
.db-store li:nth-child(3) i { background: transparent; border: 2px solid var(--ink); }
.db-tbl { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.db-tbl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.db-tbl-chips span { padding: 6px 10px; border-radius: 999px; background: var(--db-f); font: 497 13px/1 var(--mono); color: light-dark(#525252, var(--muted-foreground)); }
.db-tbl-chips span:first-child { background: var(--ink); color: var(--x-on-ink); }
.db-tbl p { margin: 0; display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.db-tbl p:first-of-type i { background: light-dark(#d4d4d4, var(--secondary-hover)); }
.db-tbl i { display: block; height: 8px; border-radius: 4px; background: light-dark(#ededed, var(--secondary)); }
.db-perm { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.db-perm li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 2px; border-bottom: 1px solid var(--line); font: 497 14px/1 var(--mono); color: var(--ink); }
.db-perm li:last-child { border-bottom: 0; }
/* the pinned layout: wide screens, once the script runs */
@media (min-width: 900px) {
.js .db-run { position: relative; height: 560svh; }
.js .db-pin { position: sticky; top: 0; height: 100svh; padding: 0; display: flex; align-items: center; overflow: hidden; }
.js .db-pin-g { align-items: center; width: min(100% - 48px, 1440px); }
.js .db-say { display: grid; align-self: stretch; align-content: center; padding-bottom: 72px; gap: 0; }
.js .db-say-a { grid-area: 1 / 1; opacity: 0; transform: translate3d(0, 44px, 0); visibility: hidden; transition: opacity .3s var(--e-move), transform .4s var(--e-move), visibility 0s linear .4s; }
.js .db-say-a[data-pos='past'] { transform: translate3d(0, -44px, 0); }
.js .db-say-a[data-on] { opacity: 1; transform: none; visibility: visible; transition: opacity .5s var(--e-in) .1s, transform .5s var(--e-in) .08s, visibility 0s; }
.js .db-rail { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 2px; padding-bottom: 10px; }
.db-track { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); overflow: hidden; }
.db-track i { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; }
.db-rail button { min-width: 44px; height: 44px; border: 0; background: none; font: 497 13px/1 var(--mono); color: var(--soft); cursor: pointer; transition: color .15s var(--e-out), transform .15s var(--e-out); }
.db-rail button[aria-current] { color: var(--ink); }
.db-rail button:active { transform: scale(.97); transition-duration: 90ms; }
.db-build .db-narrow { display: none; }
}
@media (min-width: 900px) and (hover: hover) { .db-rail button:hover { color: var(--ink); } }
.db-rail button:focus-visible, .db-tabs button:focus-visible, .db-kind button:focus-visible, .db-rel-a:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 2px; }
/* phones: each part and its panel */
.db-list { list-style: none; margin: 0 auto; padding: 44px 0 0; display: flex; flex-direction: column; }
.db-li { display: flex; flex-direction: column; gap: 12px; padding: 44px 0; border-top: 1px solid var(--line); }
.db-li:first-child { border-top: 0; padding-top: 17px; }
/* ---------- Beyond: watch it instead ---------- */
.db-watch-g { align-items: center; row-gap: 44px; }
.db-watch-t { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: 17px; }
.db-watch-t .kn-body { max-width: 46ch; }
.db-kind { display: inline-flex; align-self: flex-start; gap: 2px; margin-top: 10px; padding: 4px; border-radius: 999px; background: light-dark(#ededed, var(--secondary)); }
.db-kind button { min-height: 44px; padding: 0 21px; border: 0; border-radius: 999px; background: transparent; color: light-dark(#525252, var(--muted-foreground)); font: 497 16px/1 var(--mono); cursor: pointer; transition: background-color .15s var(--e-out), color .15s var(--e-out), transform .15s var(--e-out); }
@media (hover: hover) { .db-kind button:hover { color: var(--ink); } }
.db-kind button:active { transform: scale(.97); transition-duration: 90ms; }
.db-kind button[aria-checked='true'] { background: var(--x-raised); color: var(--ink); }
.db-watch-o { grid-column: 7 / -1; display: flex; flex-direction: column; }
.db-watch-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; padding: clamp(21px, 2.6vw, 32px); border-bottom: 1px solid var(--line); }
.db-watch-top pre { margin: 0; font: 497 14px/1.7 var(--mono); color: light-dark(#525252, var(--muted-foreground)); }
.db-watch-top pre em { display: inline-block; font-style: normal; padding: 0 8px; border-radius: 6px; background: var(--db-m); color: var(--ink); animation: db-type .3s steps(8, end) both; }
.db-watch-top pre b { color: var(--ink); font-weight: 606; }
.db-plot { position: relative; height: clamp(240px, 24vw, 340px); margin: clamp(21px, 2.6vw, 32px); touch-action: pan-y; }
.db-plot.mon { cursor: ns-resize; }
/* the alert line's knob, on the line at the chart's edge (the real control is the slider below) */
.db-handle { position: absolute; right: -10px; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: var(--x-raised); border: 2px solid var(--ink); pointer-events: none; display: grid; place-items: center; }
.db-handle i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.db-watch-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px clamp(21px, 2.6vw, 32px); border-top: 1px solid var(--line); }
.db-th { display: flex; align-items: center; gap: 14px; min-height: 44px; font: 497 14px/1 var(--mono); color: light-dark(#525252, var(--muted-foreground)); }
.db-th.off { color: var(--faint); }
/* the slider, drawn on the deck (no browser-default control) */
.db-th input { -webkit-appearance: none; appearance: none; width: clamp(140px, 16vw, 220px); height: 44px; margin: 0; background: transparent; cursor: pointer; }
.db-th input:disabled { cursor: not-allowed; }
.db-th input::-webkit-slider-runnable-track { height: 2px; border-radius: 1px; background: light-dark(#d4d4d4, var(--secondary-hover)); }
.db-th input::-moz-range-track { height: 2px; border-radius: 1px; background: light-dark(#d4d4d4, var(--secondary-hover)); }
.db-th input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -9px; border-radius: 50%; background: var(--ink); border: 0; transition: transform .15s var(--e-out); }
.db-th input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); border: 0; }
.db-th input:active::-webkit-slider-thumb { transform: scale(.97); }
.db-th input:disabled::-webkit-slider-thumb { background: light-dark(#d4d4d4, var(--secondary-hover)); }
.db-th input:disabled::-moz-range-thumb { background: light-dark(#d4d4d4, var(--secondary-hover)); }
.db-th input:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 2px; border-radius: 8px; }
.db-hot { margin: 0; display: inline-flex; align-items: center; gap: 8px; font: 497 14px/1 var(--mono); color: light-dark(#525252, var(--muted-foreground)); }
.db-hot i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); transition: background-color .15s var(--e-out); }
.db-hot i.on { background: var(--ink); }
/* ---------- the four words, marked (the proof strip) ---------- */
.db-figs-s { padding: 0 0 clamp(56px, 7vw, 112px); }
.db-figs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.db-figs li { display: flex; flex-direction: column; gap: 12px; padding: 27px 24px 0 0; }
.db-figs li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.db-figs b { position: relative; align-self: flex-start; font-size: 44px; line-height: 1.05; font-weight: 220; letter-spacing: -.035em; isolation: isolate; }
.db-figs b span { position: relative; }
.db-figs b i { position: absolute; left: -4px; right: -6px; bottom: .04em; height: .34em; border-radius: 4px; background: var(--db-m); z-index: -1; transform-origin: 0 50%; }
.js .db-figs b i { transform: scaleX(0); transition: transform .5s var(--e-in); transition-delay: calc(.15s + var(--db-i) * 60ms); }
.js .db-figs[data-in] b i { transform: none; }
.db-figs-d { font-size: 16px; color: var(--soft); }
/* ---------- start from a trace (quiet room #f5f5f5: text #525252 or darker) ---------- */
.db-start { background: light-dark(#f5f5f5, var(--muted)); --faint: light-dark(#525252, var(--muted-foreground)); --quiet: light-dark(#525252, var(--muted-foreground)); }
.db-start-g { align-items: center; row-gap: 44px; }
.db-start-t { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: 27px; }
.db-start-o { grid-column: 7 / -1; display: flex; flex-direction: column; gap: 12px; }
.db-note { margin: 0; font-size: 13px; color: light-dark(#525252, var(--muted-foreground)); }
/* ---------- close (graphite room) ---------- */
.db-rel { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.db-rel ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.db-rel-a { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 4px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); color: #fafafa; text-decoration: none; transition: transform 90ms var(--e-out); }
.db-rel-a b { font-size: 17px; font-weight: 497; }
.db-rel-a span { grid-row: 2; font-size: 16px; color: #a3a3a3; }
.db-rel-a svg { grid-column: 2; grid-row: 1 / span 2; align-self: center; transition: transform .3s var(--e-move); }
@media (hover: hover) { .db-rel-a:hover svg { transform: translateX(4px); } }
.db-rel-a:active { transform: scale(.97); }
@media (max-width: 899px) {
.db-build .db-wide { display: none; }
.db-hero { aspect-ratio: auto; }
.db-hero-bar { flex-wrap: wrap; padding: 12px 14px; row-gap: 10px; }
.db-hero-bar > i { display: none; }
.db-hero-t { margin-left: 2px; }
.db-tabs { margin-left: 0; width: 100%; }
.db-tabs button { flex: 1 1 auto; padding: 0 6px; white-space: nowrap; }
.db-hero-b { grid-template-columns: minmax(0, 1fr); }
.db-q { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; gap: 12px; }
.db-q pre { font-size: 16px; }
.db-q-say { display: none; }
.db-w { padding: 20px; gap: 14px; }
.db-w-c { height: 200px; flex: none; }
.db-w-h { font-size: 16px; }
.db-ph { font-size: 14px; }
.db-w-h span, .db-ph span, .db-ch-bars em, .db-tbl-chips span { font-size: 14px; }
.db-build-t, .db-build-l { grid-column: 1 / -1; }
.db-watch-t, .db-watch-o { grid-column: 1 / -1; }
.db-watch-top { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 17px; }
.db-plot { height: 220px; margin: 20px 27px 20px 17px; }
.db-watch-foot { flex-wrap: wrap; padding: 12px 17px; }
.db-th input { width: 150px; }
.db-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.db-figs li, .db-figs li + li { padding: 27px 12px 27px 0; border-left: 0; }
.db-figs li:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.db-figs li:nth-child(n + 3) { border-top: 1px solid var(--line); }
.db-figs b { font-size: 32px; }
.db-start-t, .db-start-o { grid-column: 1 / -1; }
.db-note { font-size: 14px; }
/* the close's kit CodeBlock: its label and Copy at the 14px phone floor */
.db .x-codeblock-h, .db .x-copy { font-size: 14px; }
}
/* ---------- hover preview on the hero tabs, the chapter number as the moment ---------- */
.db-w-c { position: relative; min-height: 0; }
.db-ghost { position: absolute; inset: 0; opacity: .28; pointer-events: none; }
.js .db-say-a[data-on] .db-n { transform-origin: 0 0; animation: db-big 1.2s var(--e-in) both; }
@keyframes db-big { from { transform: scale(3.4); color: var(--ink); } 55% { transform: scale(3.4); color: var(--ink); } }
/* ---------- entrances (arrive.js sets data-arm below the fold, then data-in) ---------- */
/* 1 diagonal-wipe: the hero object, from the first paint */
.js .db-hero { animation: db-wipe 1s cubic-bezier(.65, 0, .35, 1) .1s both; }
@keyframes db-wipe { from { clip-path: polygon(0 0, 0 0, 0 0, 0 0); } 99% { clip-path: polygon(0 0, 200% 0, 0 200%, 0 0); } to { clip-path: none; } }
/* 2 curtain-rise: the board's heading rises from behind its own lower edge */
[data-enter='curtain'][data-arm]:not([data-in]) > * { transform: translateY(105%); clip-path: inset(0 0 100% 0); }
[data-enter='curtain'][data-in] > * { animation: db-curtain .9s cubic-bezier(.16, 1, .3, 1) both; }
[data-enter='curtain'][data-in] > :nth-child(2) { animation-delay: .12s; }
@keyframes db-curtain { from { transform: translateY(105%); clip-path: inset(0 0 100% 0); } to { transform: none; clip-path: inset(0 0 0 0); } }
/* 3 stack-drop: the monitor's query, chart and footer drop in one after another and stack */
[data-enter='stack'][data-arm]:not([data-in]) > * { opacity: 0; transform: translateY(-60px); }
[data-enter='stack'][data-in] > * { animation: db-drop .7s cubic-bezier(.34, 1.4, .64, 1) both; }
[data-enter='stack'][data-in] > :nth-child(2) { animation-delay: .14s; }
[data-enter='stack'][data-in] > :nth-child(3) { animation-delay: .28s; }
@keyframes db-drop { from { opacity: 0; transform: translateY(-60px); } 40% { opacity: 1; } to { opacity: 1; transform: none; } }
/* 4 explode-gather: the four words start thrown apart and pull into their row */
[data-enter='explode'][data-arm]:not([data-in]) li { opacity: 0; }
[data-enter='explode'][data-in] li { animation: db-gather 1s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--db-i) * 50ms); }
[data-enter='explode'] li:nth-child(1) { --db-gx: -90px; --db-gy: -60px; --db-gr: -9deg; }
[data-enter='explode'] li:nth-child(2) { --db-gx: -30px; --db-gy: 80px; --db-gr: 7deg; }
[data-enter='explode'] li:nth-child(3) { --db-gx: 40px; --db-gy: -70px; --db-gr: -6deg; }
[data-enter='explode'] li:nth-child(4) { --db-gx: 100px; --db-gy: 50px; --db-gr: 10deg; }
@keyframes db-gather { from { opacity: 0; transform: translate(var(--db-gx), var(--db-gy)) rotate(var(--db-gr)) scale(.8); } 30% { opacity: 1; } to { opacity: 1; transform: none; } }
/* 5 cursor-lens (MqEntrances' Lens; its look here, on the light console) */
.db .mq-lens-box { position: relative; min-width: 0; }
.db .mq-lens { position: absolute; left: 0; top: 0; width: 176px; height: 176px; margin: -88px 0 0 -88px; border-radius: 50%; overflow: hidden; pointer-events: none; background: var(--x-raised); transform: translate(var(--x, 0px), var(--y, 0px)); opacity: 0; transition: opacity .3s cubic-bezier(0, 0, .2, 1); z-index: 2; box-shadow: 0 0 0 1px var(--ink); }
.db .mq-lens[data-on='1'] { opacity: 1; }
.db .mq-lens-copy { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: translate(calc(88px - var(--x, 0px) * 1.6), calc(88px - var(--y, 0px) * 1.6)) scale(1.6); }
/* ---------- phones: one sticky board, the parts scroll under it ---------- */
.db-mob-board { position: sticky; top: 60px; z-index: 2; height: 44svh; gap: 6px; padding: 10px 0; background: var(--bg); }
.db-mob-p { padding: 8px; gap: 6px; border-radius: 12px; overflow: hidden; transition: opacity .4s var(--e-in), transform .5s var(--e-in), outline-color .3s var(--e-out); }
.js .db-mob-p:not([data-in]) { opacity: 0; transform: translateY(16px) scale(.92); }
.db-mob-p .db-ph span, .db-mob-p .db-tbl-chips, .db-mob-p .db-ch-bars em { display: none; }
.db-mob-p .db-store li { padding: 6px 8px; overflow: hidden; white-space: nowrap; }
.db-mob-p .db-store i { flex: none; }
.db-mob-p .db-perm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.db-mob-p .db-perm svg { flex: none; }
.db-mob .db-li { padding: 32px 0; }
@media (min-width: 900px) { .db-mob { display: none; } }
/* the first screen: the saved query and its chart sit inside 1470x801 (the shared stage starts lower) */
@media (min-width: 900px) {
.db > .kns { padding-top: clamp(32px, calc(26svh - 128px), 120px); }
.db > .kns .kns-g { row-gap: 36px; }
.db > .kns { padding-bottom: clamp(44px, 5vw, 72px); }
.db-hero { aspect-ratio: 16 / 6.4; }
}
@media (prefers-reduced-motion: reduce) {
.db-hero, .db-say-a[data-on] .db-n, .db .kns-in, .db .kns-obj-in, .db .knl-t { animation: none !important; }
.db-mob-p { opacity: 1 !important; transform: none !important; transition: none; }
.db-l, .db-ch .ln, .db-ch-bars i, .db-watch-top pre em { animation: none !important; }
.db-say-a, .db-say-a[data-on], .db-li-p, .db-figs b i, .db-panel, .db-ch .pt { transition: none !important; }
}
/* ---------- dark mode (8 Nov, docs/DARK-MODE.md): the Keynote deck pins its tokens light on .kn, so this page points
them at Hanzo's dark tokens; every light value above is unchanged ---------- */
html:not(.light) .db { --ink: var(--foreground); --soft: var(--muted-foreground); --faint: var(--text-tertiary); --line: var(--border); --body: var(--muted-foreground); --quiet: var(--text-tertiary); --hair: var(--border); background: var(--background); }
/* the shared example console (ExampleConsole.css is drawn light only): its dark, page-locally */
html:not(.light) .db .exc { border-color: var(--border); background: var(--card); color: var(--foreground); }
html:not(.light) .db :is(.exc-bar, .exc-side, .exc-cap p, .exc-foot) { border-color: var(--border); }
html:not(.light) .db .exc-bar > i { background: var(--secondary); }
html:not(.light) .db :is(.exc-title, .exc-nav, .exc-st, .exc-cap p) { color: var(--muted-foreground); }
html:not(.light) .db :is(.exc-nav[aria-current], .exc-name, .exc-foot b, .exc-open) { color: var(--foreground); }
html:not(.light) .db .exc-nav[aria-current]::before, html:not(.light) .db .exc-dot { background: var(--foreground); }
html:not(.light) .db .exc-dot.b { background: transparent; border-color: var(--foreground); border-right-color: transparent; }
html:not(.light) .db .exc-rows li[aria-selected='true'] { background: var(--muted); }
html:not(.light) .db .exc-foot { color: var(--text-tertiary); }
html:not(.light) .db .exc-open { border-color: var(--border); }
@media (hover: hover) {
html:not(.light) .db .exc-title:hover, html:not(.light) .db .exc-nav:hover { color: var(--foreground); }
html:not(.light) .db .exc-nav:hover, html:not(.light) .db .exc-rows li[aria-selected='true']:hover { background: var(--muted); }
html:not(.light) .db .exc-rows li:hover { background: var(--surface-card-quiet); }
html:not(.light) .db .exc-open:hover { background: var(--primary); color: var(--primary-foreground); }
}
/* dark: the score bars are drawn in Hanzo's muted grey, not a white slab */
html:not(.light) .db .db-ch-bars.score i { background: var(--muted-foreground); }
html:not(.light) .db .db-ch-bars.score span:nth-child(4) i { background: repeating-linear-gradient(135deg, var(--muted-foreground) 0 2px, transparent 2px 7px); }