/* Presentation tab, chapters 17–19: slide canvas (1920 × 1080, scaled by --dk-s), slide pieces,
   viewer, gallery, presenter overlay and the deck-rules plates. Everything is prefixed dk-. */

/* ─── frame + canvas ────────────────────────────────────────────────────── */
.dk-frame { --dk-s: .2; position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; contain: layout paint; }
.dk-layer { position: absolute; inset: 0; transition: opacity .45s cubic-bezier(.2, .7, .2, 1); }
.dk-layer.is-enter { opacity: 0; }
.dk-layer.is-leave { opacity: 0; pointer-events: none; }
.dk-layer + .dk-layer:not(.is-leave) { z-index: 1; }

.dk-slide {
  --s-bg: #000; --s-ink: #f5f5f7; --s-muted: #a1a1a6; --s-faint: #86868b;
  --s-line: rgb(255 255 255 / .12); --s-line2: rgb(255 255 255 / .22); --s-card: #0b0b0d; --s-card2: #141416;
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden; isolation: isolate;
  transform-origin: 0 0; transform: scale(var(--dk-s)); background: var(--s-bg); color: var(--s-ink);
  font-family: var(--sans); font-weight: 400; text-align: left; -webkit-font-smoothing: antialiased; line-height: 1.3;
}
.dk-slide *, .dk-slide *::before, .dk-slide *::after { box-sizing: border-box; }
.dk-slide { --s-horizon: linear-gradient(0deg, rgb(139 123 255 / .3) 0%, rgb(118 140 255 / .11) 24%, rgb(0 0 0 / 0) 54%); --s-edge: linear-gradient(90deg, transparent, rgb(139 123 255 / .7) 30%, rgb(79 179 255 / .55) 70%, transparent); }
/* glow ground: one horizon of light rising from the bottom edge, violet-led, gone by the middle; a 2px lit line on the edge */
.dk-slide.is-glow { background: var(--s-edge) 50% 100% / 100% 2px no-repeat, var(--s-horizon), #000; }
.dk-slide.is-light {
  --s-bg: #f5f5f7; --s-ink: #1d1d1f; --s-muted: #515154; --s-faint: #6e6e73;
  --s-line: rgb(0 0 0 / .1); --s-line2: rgb(0 0 0 / .18); --s-card: #fff; --s-card2: #ebebef;
}
.dk-a { position: absolute; }
.dk-sg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.dk-sg > svg { display: block; width: 100%; height: 100%; }
/* the supergraphic SVG paints its own ground, so the horizon light is laid over it on glow slides */
.dk-slide.is-glow .dk-sg::after { content: ""; position: absolute; inset: 0; background: var(--s-edge) 50% 100% / 100% 2px no-repeat, var(--s-horizon); }
.dk-sg.is-fallback { display: none; }
.dk-wm, .dk-mk { display: block; color: var(--s-ink); overflow: visible; }

/* type at slide scale */
.dk-eb { margin: 0; font: 500 18px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--s-faint); }
.dk-disp { margin: 0; font-size: 120px; line-height: .98; font-weight: 700; letter-spacing: -.05em; text-wrap: balance; }
.dk-h1 { margin: 0; font-size: 76px; line-height: 1.04; font-weight: 700; letter-spacing: -.042em; text-wrap: balance; }
.dk-h2 { font-size: 48px; line-height: 1.1; font-weight: 650; letter-spacing: -.03em; text-wrap: balance; }
.dk-h3 { font-size: 32px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; }
.dk-lead { margin: 0; font-size: 30px; line-height: 1.45; color: var(--s-muted); text-wrap: pretty; }
.dk-body { font-size: 24px; line-height: 1.5; color: var(--s-muted); text-wrap: pretty; }
.dk-small { font-size: 20px; line-height: 1.45; color: var(--s-faint); text-wrap: pretty; }
.dk-mono { font-family: var(--mono); }
.dk-dim { color: var(--s-faint); }
.dk-stmt { font-size: 92px; line-height: 1.06; font-weight: 700; letter-spacing: -.045em; text-wrap: balance; }
.dk-stmt span { color: var(--s-faint); }
.dk-num { display: block; font: 600 150px/1 var(--mono); letter-spacing: -.04em; color: var(--s-ink); font-variant-numeric: tabular-nums; }
.dk-head { position: absolute; left: 120px; top: 104px; }
.dk-head .dk-h1 { margin-top: 28px; }
.dk-head .dk-lead { margin-top: 24px; max-width: 1200px; }
/* shared vertical grid: header from 104, content band from the header's last line + 56 down to 920 */
.dk-col { position: absolute; left: 120px; right: 120px; top: 104px; bottom: 160px; display: flex; flex-direction: column; }
.dk-col > .dk-head { position: relative; left: auto; top: auto; flex: none; }
.dk-band { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; padding-top: 56px; }
.dk-band.is-start { justify-content: flex-start; padding-top: 64px; }
.dk-band > * { flex: none; }
.dk-2 { display: grid; gap: 60px; align-items: stretch; }

/* footer: mark + label left, page number right */
.dk-foot { position: absolute; left: 120px; right: 120px; bottom: 52px; z-index: 3; display: flex; align-items: center; gap: 22px; font: 400 18px/1 var(--mono); letter-spacing: .04em; color: var(--s-faint); white-space: nowrap; }
.dk-foot .dk-mk { width: 30px; height: 30px; flex: none; }
.dk-foot-n { margin-left: auto; font-variant-numeric: tabular-nums; }

/* cards, chips, tags */
.dk-card { position: relative; border-radius: 24px; background: var(--s-card); box-shadow: inset 0 0 0 1.5px var(--s-line); padding: 40px; color: var(--s-ink); }
/* lit = light falling from the top edge plus a 2px lit line; no blob, no coloured shadow */
.dk-card.is-lit, .dk-ag.on { background: linear-gradient(180deg, rgb(139 123 255 / .17), rgb(139 123 255 / 0) 62%), var(--s-card2); box-shadow: inset 0 0 0 1.5px var(--s-line2); }
.dk-card.is-lit::before, .dk-ag.on::before { content: ""; position: absolute; left: 32px; right: 32px; top: 0; height: 2px; background: var(--s-edge); pointer-events: none; }
.is-light .dk-card.is-lit, .is-light .dk-ag.on { background: linear-gradient(180deg, rgb(139 123 255 / .1), rgb(139 123 255 / 0) 62%), #fff; }
.dk-chip { display: inline-flex; align-items: center; height: 52px; padding: 0 24px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--s-line2); font: 500 20px var(--mono); color: var(--s-ink); letter-spacing: .02em; background: rgb(0 0 0 / .2); }
.is-light .dk-chip { background: #fff; }
.dk-tag { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 8px; border: 2px dashed var(--s-line2); font: 500 18px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--s-muted); }
.dk-pill { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--s-ink); color: var(--s-bg); font: 600 18px var(--sans); margin-left: auto; }
.dk-pill.is-off { background: none; color: var(--s-faint); box-shadow: inset 0 0 0 1.5px var(--s-line); font: 500 18px var(--mono); }
.dk-arrow { display: block; width: 40px; height: 24px; color: var(--s-faint); flex: none; }

/* problem slide */
.dk-pr-row { display: flex; align-items: center; gap: 18px; height: 56px; border-top: 1.5px solid var(--s-line); font-size: 22px; }
.dk-pr-row i { width: 36px; height: 36px; border-radius: 8px; background: var(--s-card2); box-shadow: inset 0 0 0 1.5px var(--s-line); }
.dk-pr-row b { font-weight: 500; }
.dk-pr-row.off b, .dk-pr-row.off i { opacity: .45; }
.dk-nest, .dk-nest div { border-radius: 18px; border: 2px dashed var(--s-line2); padding: 16px 18px 18px; }
.dk-nest { flex: 1; }
.dk-nest div { margin-top: 12px; }
.dk-nest span { display: block; font: 500 18px/24px var(--mono); color: var(--s-faint); text-transform: uppercase; letter-spacing: .06em; }
.dk-nest div div div { border-style: solid; background: var(--s-card2); }
.dk-nest div div div span { color: var(--s-ink); }

/* pipeline */
.dk-node { height: 100%; display: grid; align-content: start; gap: 18px; padding: 36px 30px; }
.dk-node .dk-h3 { margin-top: 36px; }
.dk-node > .dk-mono { font-size: 20px; }
/* 5 nodes, 64 px lanes for the arrows (12 px clear each side), brace inset 8 px under WineCX + D3DMetal */
.dk-stack { display: grid; grid-template-columns: 1fr 64px 1fr 64px 1fr 64px 1fr 64px 1fr; grid-template-rows: 330px auto; row-gap: 28px; }
.dk-node-arrow { display: grid; place-items: center; }
.dk-brace-wrap { grid-column: 5 / 8; grid-row: 2; margin: 0 8px; }
.dk-brace { height: 28px; border: 2px solid var(--s-line2); border-top: 0; border-radius: 0 0 16px 16px; }

/* window illustrations */
.dk-win { position: absolute; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: #111113; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .14), 0 50px 110px -40px rgb(0 0 0 / .9); color: #f5f5f7; }
.is-light .dk-win { box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / .12), 0 50px 110px -50px rgb(0 0 0 / .45); }
.dk-win-bar { position: relative; flex: none; height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 22px; background: #1a1a1d; border-bottom: 1.5px solid rgb(255 255 255 / .08); }
.dk-win-bar i { width: 16px; height: 16px; border-radius: 50%; background: rgb(255 255 255 / .22); }
.dk-win-bar span { position: absolute; left: 0; right: 0; text-align: center; font: 600 18px var(--sans); color: #a1a1a6; pointer-events: none; }
.dk-win-body { position: relative; flex: 1; min-height: 0; }
.dk-st { position: absolute; inset: 0; display: grid; grid-template-columns: 31% 1fr; }
.dk-st-xside { padding: 18px 16px; background: #0d0d0f; border-right: 1.5px solid rgb(255 255 255 / .06); overflow: hidden; }
.dk-st-xsearch { height: 38px; border-radius: 8px; background: rgb(255 255 255 / .06); padding: 0 14px; display: flex; align-items: center; font-size: 15px; color: #6e6e73; }
.dk-st-lab { margin: 20px 4px 10px; font: 500 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #6e6e73; }
.dk-st-row { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 8px; border-radius: 6px; }
.dk-st-row i { width: 20px; height: 20px; border-radius: 4px; background: rgb(255 255 255 / .16); flex: none; }
.dk-st-row b { height: 9px; border-radius: 5px; background: rgb(255 255 255 / .2); }
.dk-st-row.on { background: rgb(255 255 255 / .1); }
.dk-st-row.on b { background: rgb(255 255 255 / .6); }
.dk-st-xmain { position: relative; display: flex; flex-direction: column; }
.dk-st-xhero { flex: 1; display: flex; align-items: flex-end; padding: 28px 30px; background: linear-gradient(180deg, rgb(139 123 255 / .2), rgb(139 123 255 / 0) 70%), linear-gradient(0deg, #0e0e11, #17171b); }
.dk-st-xhero b { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.dk-st-xplay { display: flex; align-items: center; gap: 30px; padding: 22px 30px; background: #18181b; border-top: 1.5px solid rgb(255 255 255 / .08); }
.dk-st-btn { display: inline-flex; align-items: center; height: 52px; padding: 0 30px; border-radius: 8px; background: #f5f5f7; color: #000; font: 700 20px var(--sans); letter-spacing: .02em; }
.dk-st-xmeta { display: grid; gap: 4px; font-size: 16px; font-weight: 500; }
.dk-st-xmeta em { font: 500 12px var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: .08em; color: #86868b; }
.dk-st-ovl { position: absolute; right: 24px; top: 24px; width: 240px; padding: 16px 18px; border-radius: 14px; background: rgb(20 20 22 / .85); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .16); display: grid; gap: 6px; font-size: 18px; }
.dk-st-ovl span { font: 14px var(--mono); color: #a1a1a6; }
.dk-callout { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--s-ink); color: var(--s-bg); font: 600 22px var(--mono); box-shadow: 0 0 0 6px var(--s-bg); position: relative; z-index: 1; }
.dk-ldr { background: var(--s-ink); opacity: .55; border-radius: 2px; }
.dk-legend { display: flex; gap: 40px; font-size: 26px; font-weight: 600; }
.dk-legend div { display: flex; align-items: center; gap: 16px; }
.dk-legend .dk-callout { width: 44px; height: 44px; font-size: 18px; box-shadow: none; }

/* setup assistant */
.dk-su { padding: 0; }
.dk-su-top { display: flex; align-items: center; gap: 22px; padding: 30px 34px; }
.dk-su-top img { width: 72px; height: 72px; border-radius: 16px; display: block; }
.dk-su-top b { display: block; font-size: 26px; font-weight: 650; }
.dk-su-top span { font: 16px var(--mono); color: #86868b; }
.dk-su-line { height: 4px; background: linear-gradient(90deg, #f5f5f7 55%, rgb(255 255 255 / .08) 55%); }
.dk-su-row { display: flex; align-items: center; gap: 18px; height: 72px; padding: 0 34px; border-top: 1.5px solid rgb(255 255 255 / .07); font-size: 20px; color: #6e6e73; }
.dk-su-row b { font-weight: 600; }
.dk-su-row em { margin-left: auto; font-style: normal; }
.dk-su-row.done { color: #f5f5f7; }
.dk-su-dot { width: 28px; height: 28px; border-radius: 50%; background: rgb(255 255 255 / .12); display: grid; flex: none; color: #f5f5f7; --s-bg: #111113; }
.dk-su-row.done .dk-su-dot { background: none; }
.dk-su-dot svg { width: 28px; height: 28px; }

/* steps */
.dk-step { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 26px 0; border-top: 1.5px solid var(--s-line); }
.dk-step .dk-body { margin-top: 8px; }
.dk-step-n { font: 500 24px var(--mono); color: var(--s-faint); padding-top: 4px; }

/* settings illustration */
.dk-set { padding: 10px 34px; }
.dk-set-row { display: flex; align-items: center; justify-content: space-between; height: 88px; border-top: 1.5px solid rgb(255 255 255 / .07); font-size: 22px; }
.dk-set-row:first-child { border-top: 0; }
.dk-set-row b { font-weight: 500; }
.dk-segm { display: inline-flex; padding: 5px; border-radius: 12px; background: rgb(255 255 255 / .06); }
.dk-segm i { font: 500 18px var(--mono); font-style: normal; padding: 10px 20px; border-radius: 8px; color: #a1a1a6; }
.dk-segm i.on { background: #f5f5f7; color: #000; }
.dk-tog { width: 64px; height: 36px; border-radius: 999px; background: rgb(255 255 255 / .14); position: relative; }
.dk-tog::after { content: ""; position: absolute; left: 4px; top: 4px; width: 28px; height: 28px; border-radius: 50%; background: #86868b; }
.dk-tog.on { background: rgb(255 255 255 / .85); }
.dk-tog.on::after { left: 32px; background: #000; }

/* flows */
.dk-flow { display: flex; align-items: center; gap: 18px; }
.dk-flow .dk-card { flex: 1; padding: 30px 26px; font-size: 26px; font-weight: 650; letter-spacing: -.01em; text-align: center; }
.dk-flow.is-wide .dk-card { text-align: left; display: grid; gap: 12px; padding: 34px 36px; }
.dk-flow.is-wide .dk-card b { font-size: 34px; font-weight: 650; letter-spacing: -.02em; }
.dk-flow.is-col { flex-direction: column; align-items: stretch; gap: 14px; }
.dk-flow.is-col .dk-arrow { transform: rotate(90deg); align-self: center; margin: 8px 0; }
.dk-flow.is-col .dk-card { flex: none; }
.dk-flow .dk-mono { font-size: 18px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.dk-px-row { display: flex; align-items: center; gap: 32px; margin-top: 56px; }
.dk-px-row .dk-arrow { margin-bottom: 36px; }
.dk-pxf { display: grid; gap: 14px; flex: none; }
.dk-pxf .dk-mono { font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: var(--s-faint); }
.dk-px { position: relative; width: 320px; height: 180px; flex: none; border-radius: 16px; overflow: hidden; background: var(--s-card2); box-shadow: inset 0 0 0 1.5px var(--s-line); }
.dk-px i { position: absolute; background: var(--s-line2); }
.dk-px i.v { top: 0; bottom: 0; width: 2px; }
.dk-px i.h { left: 0; right: 0; height: 2px; }
.dk-px b { position: absolute; inset: 0; display: grid; place-items: center; }
.dk-px b .dk-mk { width: 110px; height: 110px; }
.dk-px.is-low b .dk-mk { filter: blur(3px); opacity: .8; }

/* frame generation */
.dk-fg { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 20px; margin-bottom: 26px; }
.dk-fg > span { font-size: 26px; color: var(--s-ink); }
.dk-fg div { display: flex; gap: 10px; }
.dk-fg i, .dk-fg-key i { display: block; width: 92px; height: 58px; border-radius: 10px; flex: none; }
.dk-fg i.r, .dk-fg-key i.r { background: var(--s-ink); }
.dk-fg i.g, .dk-fg-key i.g { border: 2.5px dashed var(--s-line2); background: var(--s-card2); }
.dk-fg div i { flex: 1 1 0; width: auto; min-width: 0; }
.dk-fg-key { display: flex; align-items: center; gap: 40px; margin-top: 40px; font-size: 22px; color: var(--s-muted); }
.dk-fg-key span { display: flex; align-items: center; gap: 14px; }
.dk-fg-key i { width: 44px; height: 28px; border-radius: 6px; }
.dk-fg-key .dk-tag { margin-left: auto; }

.dk-pad { display: block; width: 100%; height: auto; }

/* what runs */
.dk-game { font-size: 46px; font-weight: 650; letter-spacing: -.03em; line-height: 1.12; padding: 12px 0; border-top: 1.5px solid var(--s-line); }
.dk-games { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.dk-games span { font-size: 25px; color: var(--s-muted); padding: 13px 0; border-top: 1.5px solid var(--s-line); }

/* misc slide pieces */
.dk-term { font: 500 30px var(--mono); color: var(--s-ink); overflow-wrap: anywhere; }
.dk-term span { color: var(--s-faint); margin-right: 14px; }
.dk-link { display: grid; grid-template-columns: 300px 1fr; align-items: baseline; padding: 22px 0; border-top: 1.5px solid var(--s-line); }
.dk-link .dk-mono { font-size: 20px; letter-spacing: .06em; text-transform: uppercase; color: var(--s-faint); }
.dk-link b { font-size: 44px; font-weight: 650; letter-spacing: -.03em; }
.dk-link.is-tight { grid-template-columns: 260px 1fr; padding: 20px 0; }
.dk-link.is-tight b { font-size: 36px; }
.dk-portrait { position: relative; width: 100%; height: 100%; border-radius: 32px; display: grid; place-items: center; color: var(--s-ink);
  background: linear-gradient(180deg, rgb(139 123 255 / .16), rgb(139 123 255 / 0) 60%), var(--s-card2); box-shadow: inset 0 0 0 1.5px var(--s-line2); }
.is-light .dk-portrait { background: linear-gradient(180deg, rgb(139 123 255 / .1), rgb(139 123 255 / 0) 60%), #fff; }
.dk-face { display: block; width: 128px; height: 128px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px var(--s-line2); }
.dk-portrait.is-sm { height: 380px; border-radius: 24px; }
.dk-rows div { display: grid; grid-template-columns: 180px 1fr; align-items: baseline; padding: 20px 0; border-top: 1.5px solid var(--s-line); }
.dk-rows .dk-mono { font-size: 18px; text-transform: uppercase; letter-spacing: .06em; color: var(--s-faint); }
.dk-rows b { font-size: 32px; font-weight: 600; letter-spacing: -.015em; }
.dk-site { display: grid; justify-items: center; gap: 22px; padding: 56px 40px; text-align: center; }
.dk-site img { display: block; width: 148px; height: 148px; }
.dk-site b { font-size: 52px; font-weight: 700; letter-spacing: -.035em; }
.dk-site .dk-mono { font-size: 20px; letter-spacing: .06em; text-transform: uppercase; color: var(--s-faint); }
.dk-ag { position: relative; display: grid; grid-template-columns: 110px 1fr auto; align-items: baseline; padding: 30px 32px; border-top: 1.5px solid var(--s-line); border-radius: 0; }
.dk-ag .dk-mono { font-size: 24px; color: var(--s-faint); }
.dk-ag b { font-size: 44px; font-weight: 650; letter-spacing: -.03em; color: var(--s-faint); }
.dk-ag em { font-style: normal; font-size: 22px; color: var(--s-faint); }
.dk-ag.on { border-radius: 20px; border-top-color: transparent; }
.dk-ag.on b, .dk-ag.on .dk-mono { color: var(--s-ink); }
.dk-ag.on + .dk-ag { border-top-color: transparent; }
.dk-proc { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 28px; position: relative; }
/* connectors run circle to circle (8 px clear) and stop at the last step */
.dk-proc div:not(:last-child)::after { content: ""; position: absolute; left: 72px; right: -20px; top: 31px; height: 2px; background: var(--s-line2); }
.dk-proc div { position: relative; display: grid; gap: 14px; align-content: start; }
.dk-proc span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--s-bg); box-shadow: inset 0 0 0 2px var(--s-line2); font: 500 22px var(--mono); color: var(--s-ink); margin-bottom: 18px; }
.dk-proc .on span { background: var(--s-ink); color: var(--s-bg); box-shadow: 0 0 0 6px var(--s-bg), 0 0 0 8px var(--s-ink); }
.dk-proc b { font-size: 40px; font-weight: 650; letter-spacing: -.025em; }
.dk-proc em { font-style: normal; font-size: 23px; line-height: 1.45; color: var(--s-muted); max-width: 380px; text-wrap: balance; }
.dk-pane { position: absolute; inset: 0; overflow: hidden; border-radius: 32px; background: linear-gradient(180deg, rgb(139 123 255 / .22), rgb(118 140 255 / .08) 26%, rgb(0 0 0 / 0) 56%), #0b0b0d; box-shadow: inset 0 0 0 1.5px var(--s-line); }
.dk-pane::before { content: ""; position: absolute; left: 48px; right: 48px; top: 0; height: 2px; background: var(--s-edge); }
.is-light .dk-pane { background: linear-gradient(180deg, rgb(139 123 255 / .16), rgb(118 140 255 / .05) 26%, rgb(0 0 0 / 0) 56%), #e8e8ed; }
.dk-cmp > div { display: grid; grid-template-columns: 1fr 400px 400px 470px; align-items: center; height: 120px; border-top: 1.5px solid var(--s-line); }
.dk-cmp > div.hd { height: 110px; border-top: 0; }
.dk-cmp b { font-size: 30px; font-weight: 650; letter-spacing: -.02em; padding-left: 40px; }
.dk-cmp span { font-size: 28px; font-weight: 600; }
.dk-cmp em { font-style: normal; font-size: 26px; color: var(--s-muted); padding-left: 40px; }
.dk-cmp em.me { color: var(--s-ink); font-weight: 600; }
.dk-tl { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; }
.dk-tl::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 2px; background: var(--s-line2); }
.dk-tl div { position: relative; display: grid; gap: 12px; padding-right: 24px; }
.dk-tl i { width: 32px; height: 32px; border-radius: 50%; background: var(--s-bg); box-shadow: inset 0 0 0 2px var(--s-line2); margin-bottom: 26px; }
.dk-tl .on i { background: var(--s-ink); box-shadow: 0 0 0 6px var(--s-bg), 0 0 0 8px var(--s-ink); }
.dk-tl .dk-mono { font-size: 20px; color: var(--s-faint); letter-spacing: .04em; }
.dk-tl b { font-size: 34px; font-weight: 650; letter-spacing: -.02em; }
.dk-qmark { font-size: 260px; line-height: .7; font-weight: 700; color: var(--s-faint); height: 150px; }

/* rules annotations */
.dk-guide.v { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed #4fb3ff; height: 1080px; }
.dk-guide.h { position: absolute; left: 0; width: 1920px; border-top: 2px dashed #4fb3ff; }
.dk-dimln { position: relative; height: 48px; display: grid; place-items: center; font: 500 30px var(--mono); color: #4fb3ff; }
.dk-dimln::before { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; border-top: 2px solid #4fb3ff; }
.dk-dimln span { position: relative; padding: 0 10px; background: var(--s-bg); }
.dk-ann { font: 500 34px var(--mono); color: #4fb3ff; letter-spacing: .02em; }
.dk-foot-mark .dk-mk { box-shadow: 0 0 0 10px rgb(79 179 255 / .25); border-radius: 4px; }

/* ─── viewer ────────────────────────────────────────────────────────────── */
.dk-viewer { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0 0 24px; }
.dk-stage { position: relative; border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--bp-line), 0 40px 100px -40px rgb(0 0 0 / .9); outline: none; background: #000; }
.dk-stage .dk-frame { border-radius: inherit; }
.dk-stage:focus-visible { box-shadow: 0 0 0 2px var(--bp-blue); }
.dk-nav { position: absolute; top: 50%; z-index: 4; width: 44px; height: 44px; margin-top: -22px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgb(0 0 0 / .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--bp-line-strong); color: var(--bp-white); cursor: pointer; opacity: 0; transition: opacity .2s, background .15s; }
.dk-nav svg, .dk-p-ui svg, .dk-bar .bb-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dk-bar .bb-btn svg { width: 13px; height: 13px; }
.dk-prev { left: 14px; } .dk-next { right: 14px; }
.dk-stage:hover .dk-nav, .dk-nav:focus-visible { opacity: 1; }
.dk-nav:hover { background: rgb(0 0 0 / .8); }
.dk-nav:focus-visible { outline: 2px solid var(--bp-blue); outline-offset: 2px; }
.dk-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 14px 2px 12px; }
.dk-bar-l { display: flex; align-items: baseline; gap: 14px; min-width: 0; flex: 1 1 320px; }
.dk-count { font: 12px var(--mono); color: var(--bp-grey-quiet); font-variant-numeric: tabular-nums; flex: none; }
.dk-name { font-size: 15px; font-weight: 600; color: var(--bp-white); white-space: nowrap; flex: none; }
.dk-use { font-size: 13px; color: var(--bp-grey-quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dk-bar-r { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dk-bar .bb-btn[disabled] { opacity: .75; cursor: progress; }
.dk-bar .bb-btn span { font-variant-numeric: tabular-nums; }
.dk-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--bp-line); overflow: hidden; }
.dk-prog i { display: block; height: 100%; width: 0; background: rgb(245 245 247 / .7); transition: width .3s var(--bb-ease); }
.dk-strip { position: relative; display: flex; gap: 10px; overflow-x: auto; padding: 4px 3px 12px; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .16) transparent; }
.dk-thumb { flex: 0 0 152px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #000; cursor: pointer; opacity: .5; box-shadow: 0 0 0 1px var(--bp-line); transition: opacity .15s, box-shadow .15s; }
.dk-thumb:hover { opacity: .85; }
.dk-thumb.on { opacity: 1; box-shadow: 0 0 0 2px var(--bp-white); }
.dk-thumb:focus-visible, .dk-p-thumb:focus-visible { outline: 2px solid var(--bp-blue); outline-offset: 2px; }
.dk-keys { margin-top: 4px; }
.dk-keys kbd, .dk-check kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 5px; background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px var(--bp-line-strong); font: 11.5px var(--mono); color: var(--bp-white); }

/* gallery plates */
.dk-plate .bb-stage { place-items: stretch; }
.dk-plate .dk-frame { border-radius: 12px; }
.dk-cap-row { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }

/* minis in the rules */
.dk-mini { width: 84%; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--bp-line), 0 18px 40px -14px rgb(0 0 0 / .8); }
.dk-mini-full { width: 100%; align-self: stretch; }
.bb-stage > .dk-mini-full { place-self: stretch; }
.dk-grid-svg { display: block; width: 100%; height: 100%; }
.dk-spec-col { grid-template-columns: minmax(0, 1fr); align-content: start; }
.dk-dd-col { grid-template-columns: minmax(0, 1fr); margin: 0; align-content: start; }
.dk-check { margin: 0; padding: 0 0 0 22px; display: grid; gap: 10px; max-width: 760px; font-size: 15px; line-height: 1.6; color: var(--bp-grey); }
.dk-check li::marker { font: 12px var(--mono); color: var(--bp-grey-quiet); }

/* off-screen host for PDF rendering */
.dk-render { position: fixed; left: -30000px; top: 0; width: 1920px; height: 1080px; overflow: hidden; pointer-events: none; --dk-s: 1; }

/* ─── presenter ─────────────────────────────────────────────────────────── */
.dk-present { position: fixed; inset: 0; z-index: 2147483000; background: #000; color: var(--bp-white); color-scheme: dark; overflow: hidden; }
.dk-present.is-idle { cursor: none; }
.dk-p-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); aspect-ratio: auto; width: auto; cursor: pointer; }
.dk-p-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; height: 3px; background: rgb(255 255 255 / .08); }
.dk-p-bar i { display: block; height: 100%; width: 0; background: rgb(245 245 247 / .7); transition: width .45s var(--bb-ease); }
.dk-p-ui { position: absolute; top: 16px; right: 16px; z-index: 6; display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 14px; border-radius: 999px;
  background: rgb(20 20 22 / .7); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--bp-line-strong); transition: opacity .3s; }
.dk-present.is-idle .dk-p-ui { opacity: 0; }
.dk-p-ui:focus-within { opacity: 1 !important; }
.dk-p-count { font: 12px var(--mono); color: var(--bp-grey); margin-right: 6px; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.dk-p-ui button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--bp-white); cursor: pointer; }
.dk-p-ui button:hover, .dk-p-ui button[aria-pressed="true"] { background: rgb(255 255 255 / .12); }
.dk-p-ui button:focus-visible { outline: 2px solid var(--bp-blue); outline-offset: 1px; }
.dk-p-hint { position: absolute; left: 16px; top: 16px; z-index: 6; padding: 8px 14px; border-radius: 999px; background: rgb(20 20 22 / .7);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 12px var(--sans); color: var(--bp-grey); white-space: nowrap; pointer-events: none; animation: dk-hint 3.5s both; }
@keyframes dk-hint { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.dk-p-grid { position: absolute; inset: 0; z-index: 7; overflow-y: auto; padding: 72px clamp(16px, 4vw, 56px) 48px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); align-content: start; gap: 22px 16px; background: rgb(0 0 0 / .94); }
.dk-p-grid[hidden] { display: none; }
.dk-present.is-grid .dk-p-ui { opacity: 1; }
.dk-p-thumb { display: grid; gap: 8px; padding: 0; border: 0; background: none; color: var(--bp-grey); font: 12px var(--mono); text-align: left; cursor: pointer; }
.dk-p-thumb .dk-frame { border-radius: 8px; box-shadow: 0 0 0 1px var(--bp-line); transition: box-shadow .15s; }
.dk-p-thumb:hover .dk-frame { box-shadow: 0 0 0 1px var(--bp-line-strong); }
.dk-p-thumb.on { color: var(--bp-white); }
.dk-p-thumb.on .dk-frame { box-shadow: 0 0 0 2px var(--bp-white); }

@media (max-width: 720px) {
  .dk-use { display: none; }
  .dk-nav { opacity: 1; width: 34px; height: 34px; margin-top: -17px; }
  .dk-prev { left: 8px; } .dk-next { right: 8px; }
  .dk-thumb { flex-basis: 108px; }
  .dk-bar-r { width: 100%; }
  .dk-bar-r .bb-seg { width: 100%; justify-content: space-between; }
  .dk-bar-r .bb-seg button { flex: 1; padding: 0 6px; }
  .dk-p-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dk-layer, .dk-p-bar i, .dk-prog i { transition: none; }
  .dk-p-hint { animation: none; opacity: 0; }
}
