/* Animated product mockups shown inside .shot frames on the marketing site.
   Everything is sized in em off a font-size tied to the frame width, so a demo
   scales like a screenshot: the canvas is --w em wide and 16:10. */

.demo-box { container-type: inline-size; }
.demo {
  --w: 62.5;
  position: relative; overflow: hidden; aspect-ratio: 16 / 10;
  font-size: 10px; font-size: calc(100cqw / var(--w));
  line-height: 1.35; color: var(--text); background: var(--bg-2); text-align: left;
  user-select: none; -webkit-user-select: none; pointer-events: none;
}
.demo *, .demo *::before, .demo *::after { box-sizing: border-box; }
.demo-hero { --w: 80; }

/* Timeline states (driven by static/demos.js) */
.demo [data-at] { transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .demo [data-at]:not(.on) { opacity: 0; transform: translateY(0.8em); transition-delay: 0s; }
.js .demo [data-at][data-fx="pop"]:not(.on) { transform: scale(0.85); }
.js .demo [data-at][data-fx="fade"]:not(.on) { transform: none; }
.js .demo [data-at][data-fx="left"]:not(.on) { transform: translateX(1.5em); }
.js .demo [data-at][data-fx="msg"]:not(.on) { display: none; }
.demo [data-fx="msg"].on { animation: rise 0.4s var(--ease) both; }
.demo [data-until].off, html:not(.js) .demo [data-until] { display: none; }
.demo .typing::after {
  content: ""; display: inline-block; width: 0.1em; height: 1em; margin-left: 0.08em; vertical-align: -0.15em;
  background: currentColor; animation: blink 0.8s steps(1) infinite;
}

/* Shared pieces */
.d-muted { color: var(--muted); font-weight: 400; }
.d-mono { font-family: var(--mono); }
.d-stack { display: grid; justify-items: end; align-items: center; }
.d-stack > * { grid-area: 1 / 1; }
.d-card { background: var(--surface); border: 1px solid var(--border); border-radius: 0.8em; box-shadow: 0 0.1em 0.3em rgba(15, 23, 42, 0.05); }
.d-label { font-size: 0.72em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.d-line { display: block; height: 0.55em; border-radius: 999px; background: var(--bg-3); }
.d-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.55em 1.1em; border-radius: 0.6em; background: var(--accent); color: #fff; font-weight: 600; font-size: 0.9em; white-space: nowrap; box-shadow: 0 0.3em 0.8em -0.3em rgba(79, 70, 229, 0.6); transition: transform 0.2s var(--ease), filter 0.2s; }
.d-badge {
  display: inline-flex; align-items: center; gap: 0.4em; padding: 0.22em 0.7em; border-radius: 999px; border: 1px solid;
  font-size: 0.78em; font-weight: 600; line-height: 1.3; white-space: nowrap;
}
.d-badge::before { content: ""; width: 0.5em; height: 0.5em; border-radius: 50%; background: currentColor; }
.d-badge.is-running { color: var(--info); background: var(--info-soft); border-color: #bae6fd; }
.d-badge.is-running::before { animation: blink 1.2s ease-in-out infinite; }
.d-badge.is-done { color: var(--success); background: var(--success-soft); border-color: #a7f3d0; }
.d-chips { display: flex; flex-wrap: wrap; gap: 0.35em; }
.d-chips span { padding: 0.2em 0.6em; border-radius: 999px; background: var(--bg-3); color: var(--text-2); font-size: 0.78em; font-weight: 550; }
.d-price { font-size: 1.6em; font-weight: 650; letter-spacing: -0.03em; }
.d-src { font-size: 0.75em; color: var(--muted); }

.d-photo { position: relative; overflow: hidden; border-radius: 0.5em; background: var(--bg-3); }
.d-photo svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.d-tag {
  position: absolute; left: 0.45em; bottom: 0.45em; display: inline-flex; align-items: center; gap: 0.35em;
  padding: 0.2em 0.6em 0.2em 0.22em; border-radius: 999px; background: rgba(15, 23, 42, 0.74); color: #fff;
  font-size: 0.72em; font-weight: 550; white-space: nowrap;
}
.d-tag b { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; border-radius: 50%; background: #fff; color: var(--text); font-size: 0.85em; }

.d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1em; }
.d-crumbs { font-size: 0.78em; color: var(--muted); }
.d-title { font-size: 1.45em; font-weight: 650; letter-spacing: -0.025em; margin-top: 0.1em; white-space: nowrap; }

/* App sidebar */
.d-side { position: absolute; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 11em; padding: 1.3em 0.9em; background: var(--surface); border-right: 1px solid var(--border); }
.d-logo { display: flex; align-items: center; gap: 0.5em; margin: 0 0 1.4em 0.4em; font-size: 1.1em; font-weight: 650; letter-spacing: -0.02em; }
.d-logo i { width: 1.35em; height: 1.35em; border-radius: 0.4em; background: var(--gradient); }
.d-nav { display: grid; gap: 0.2em; }
.d-nav span { display: flex; align-items: center; gap: 0.6em; padding: 0.5em 0.6em; border-radius: 0.5em; color: var(--text-2); font-size: 0.85em; font-weight: 500; white-space: nowrap; }
.d-nav span::before { content: ""; flex: none; width: 0.9em; height: 0.9em; border-radius: 0.25em; border: 0.15em solid currentColor; opacity: 0.55; }
.d-nav .is-active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.d-quota { margin-top: auto; padding: 0.8em; border-radius: 0.6em; background: var(--bg-2); border: 1px solid var(--border); font-size: 0.75em; }
.d-quota span { display: block; color: var(--muted); }
.d-quota b { display: block; margin: 0.1em 0 0.5em; font-weight: 600; }
.d-quota i { display: block; height: 0.45em; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.d-quota em { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.d-main { position: absolute; inset: 0 0 0 11em; padding: 1.5em; }

/* Chat bits */
.d-chat-head { display: flex; align-items: center; gap: 0.5em; padding: 0.8em 1em; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.9em; }
.d-chat-head i { width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0.25em var(--success-soft); }
.d-chat-head .d-muted { margin-left: auto; font-size: 0.9em; }
.d-msgs { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.6em; padding: 0.9em 1em; overflow: hidden; }
.d-msg { max-width: 86%; padding: 0.6em 0.85em; border-radius: 0.9em; font-size: 0.86em; line-height: 1.45; }
.d-msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 0.25em; }
.d-msg.ai { align-self: flex-start; background: var(--bg-2); border: 1px solid var(--border); border-bottom-left-radius: 0.25em; }
.d-tool { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.5em; padding: 0.3em 0.7em 0.3em 0.3em; border-radius: 0.6em; background: var(--accent-soft); border: 1px solid var(--accent-soft-2); color: var(--accent-text); font-size: 0.76em; font-weight: 550; }
.d-tool .d-photo { flex: none; width: 2.8em; height: 2em; border-radius: 0.35em; }
.d-input { position: relative; display: flex; align-items: center; gap: 0.5em; margin: 0 0.9em 0.9em; padding: 0.55em 0.55em 0.55em 0.9em; border: 1px solid var(--border-strong); border-radius: 0.7em; background: var(--surface); font-size: 0.85em; }
.d-input .ph { color: var(--faint); }
.d-input .d-q { position: absolute; left: 0.9em; right: 3em; overflow: hidden; white-space: nowrap; color: var(--text); background: var(--surface); }
.d-input b { margin-left: auto; display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 0.5em; background: var(--accent); color: #fff; font-size: 0.9em; }

/* Hero: listing view */
.demo-hero .d-main { display: flex; flex-direction: column; gap: 0.9em; padding: 1.6em; }
.d-progress { height: 0.3em; border-radius: 999px; background: var(--bg-3); overflow: hidden; transition: opacity 0.4s; }
.d-progress i { display: block; width: 4%; height: 100%; border-radius: inherit; background: var(--gradient); transition: width 0.9s var(--ease); }
.demo-hero.s1 .d-progress i { width: 22%; }
.demo-hero.s2 .d-progress i { width: 50%; }
.demo-hero.s3 .d-progress i { width: 76%; }
.demo-hero.s4 .d-progress i { width: 90%; }
.demo-hero.s5 .d-progress i { width: 100%; }
.demo-hero.s6 .d-progress, html:not(.js) .d-progress { opacity: 0; }
.d-hero-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 19em; gap: 1.2em; }
.d-left { display: flex; flex-direction: column; gap: 1em; min-height: 0; }
.d-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 8.6em); gap: 0.6em; }
.d-gallery .d-photo:first-child { grid-column: span 2; grid-row: span 2; }
.d-gallery .d-photo:first-child .d-tag { font-size: 0.85em; }
.d-desc { flex: 1; min-height: 0; padding: 1em 1.1em; overflow: hidden; position: relative; }
.d-desc p { margin: 0.5em 0 0; font-size: 0.86em; line-height: 1.6; color: var(--text-2); }
.d-aside { display: flex; flex-direction: column; gap: 1em; min-height: 0; }
.d-facts { padding: 1em 1.1em; display: grid; gap: 0.55em; }
.d-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Live agent console */
.demo-live { padding: 1.2em; display: flex; flex-direction: column; gap: 1em; }
.d-bar { display: flex; align-items: center; justify-content: space-between; }
.d-bar-title { display: flex; align-items: center; gap: 0.6em; font-weight: 650; font-size: 1.1em; }
.d-bar-title .d-muted { font-size: 0.8em; }
.d-live-dot { width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0.25em var(--danger-soft); animation: blink 1.2s ease-in-out infinite; }
.demo-live.s8 .d-live-dot { background: var(--success); box-shadow: 0 0 0 0.25em var(--success-soft); animation: none; }
.d-live-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 34em 1fr; gap: 1em; }
.d-browser { display: flex; flex-direction: column; overflow: hidden; }
.d-browser-bar { display: flex; align-items: center; gap: 0.35em; padding: 0.55em 0.7em; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.d-browser-bar i { width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--border-strong); }
.d-browser-bar span { margin-left: 0.6em; flex: 1; padding: 0.15em 0.7em; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 0.7em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-page { position: relative; flex: 1; overflow: hidden; background: var(--surface); }
.d-site { position: absolute; inset: 0; padding: 0.9em; display: grid; grid-template-columns: 1fr 10em; grid-template-rows: auto 1fr; gap: 0.8em; }
.d-site-nav { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.6em; }
.d-site-nav b { width: 4.5em; height: 1.1em; border-radius: 0.25em; background: #dc2626; }
.d-site-nav i { width: 3em; height: 0.5em; border-radius: 999px; background: var(--bg-3); }
.d-site-nav i:first-of-type { margin-left: auto; }
.d-site-hero { position: relative; border-radius: 0.5em; overflow: hidden; }
.d-site-hero svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.d-site-btn { position: absolute; right: 0.7em; bottom: 0.7em; padding: 0.45em 0.8em; border-radius: 0.4em; background: #fff; font-size: 0.75em; font-weight: 650; box-shadow: 0 0.2em 0.6em rgba(15, 23, 42, 0.25); transition: transform 0.2s, background 0.2s; }
.demo-live.s3 .d-site-btn { background: #fef2f2; transform: scale(1.05); }
.d-site-info { display: flex; flex-direction: column; gap: 0.55em; }
.d-site-info b { font-size: 1.2em; letter-spacing: -0.02em; }
.d-site-info span { font-size: 0.72em; color: var(--text-2); margin-bottom: 0.4em; }
.d-site-gallery { position: absolute; inset: 0; background: var(--surface); overflow: hidden; }
.d-site-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 7em; gap: 0.5em; padding: 0.7em; transition: transform 1.6s var(--ease); }
.demo-live.s5 .d-site-grid { transform: translateY(-9em); }
.demo-live.s7 .d-site-grid { transform: translateY(-4em); }
.d-site-grid .d-photo { border-radius: 0.35em; }
.d-x { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(220, 38, 38, 0.72); color: #fff; font-size: 0.8em; font-weight: 650; }
.d-sweep { position: absolute; left: 0; right: 0; top: -20%; height: 20%; background: linear-gradient(transparent, rgba(79, 70, 229, 0.28) 85%, var(--accent) 86%, transparent 88%); opacity: 0; }
.demo-live.s6:not(.s7) .d-sweep { animation: sweep 1.3s ease-in-out both; }
@keyframes sweep { 0% { opacity: 1; top: -20%; } 90% { opacity: 1; } 100% { opacity: 0; top: 100%; } }
.d-cursor { position: absolute; left: 82%; top: 30%; width: 1.7em; height: 1.7em; transition: left 0.9s var(--ease), top 0.9s var(--ease), opacity 0.4s; filter: drop-shadow(0 0.1em 0.2em rgba(0, 0, 0, 0.3)); }
.demo-live.s2 .d-cursor { left: 50%; top: 52%; }
.demo-live.s3 .d-cursor { left: 54%; top: 82%; }
.demo-live.s4 .d-cursor { left: 60%; top: 60%; }
.demo-live.s6 .d-cursor, html:not(.js) .d-cursor { opacity: 0; }
.d-ripple { position: absolute; left: 54%; top: 82%; width: 3em; height: 3em; margin: -1em 0 0 -1em; border-radius: 50%; border: 0.2em solid var(--accent); opacity: 0; }
.demo-live.s4 .d-ripple { animation: ripple 0.6s ease-out; }
@keyframes ripple { from { opacity: 1; transform: scale(0.3); } to { opacity: 0; transform: scale(1.4); } }
.d-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45em; }
.d-log li { display: grid; grid-template-columns: 2.6em 1.4em 1fr; align-items: start; gap: 0.5em; padding: 0.5em 0.7em; border-radius: 0.6em; background: var(--surface); border: 1px solid var(--border); }
.d-log time { font-family: var(--mono); font-size: 0.72em; color: var(--faint); padding-top: 0.25em; }
.d-log li > b { width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--success-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23059669' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 10.5 3.2 3L15 7'/%3E%3C/svg%3E") center / 0.9em no-repeat; border: 1px solid #a7f3d0; }
.demo-live:not(.s8) .d-log li.on:not(:has(~ li.on)) { border-color: var(--accent-soft-2); box-shadow: 0 0 0 0.2em var(--accent-soft); }
.demo-live:not(.s8) .d-log li.on:not(:has(~ li.on)) > b { background: none; border: 0.18em solid var(--accent); border-right-color: transparent; animation: spin 0.7s linear infinite; }
.d-log strong { display: block; font-size: 0.8em; font-weight: 600; }
.d-log span { display: block; font-size: 0.7em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-log div { min-width: 0; }

/* Chat */
.demo-chat { padding: 1.2em; display: grid; grid-template-columns: 18em 1fr; gap: 1em; }
.d-prop { overflow: hidden; display: flex; flex-direction: column; }
.d-prop-hero { height: 11em; border-radius: 0; }
.d-prop-body { padding: 0.9em 1em; display: grid; gap: 0.55em; }
.d-prop-addr { font-size: 0.85em; color: var(--text-2); margin-top: -0.3em; }
.d-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35em; margin-top: 0.3em; }
.d-thumbs .d-photo { aspect-ratio: 4 / 3; border-radius: 0.35em; transition: box-shadow 0.3s; }
.demo-chat.s3:not(.s5) .d-thumbs .is-ref { box-shadow: 0 0 0 0.2em var(--accent); }
.d-chatpane { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

/* Dashboard */
.demo-dash .d-main { display: flex; flex-direction: column; gap: 0.85em; padding: 1.3em; }
.d-command { position: relative; padding: 1em 1.1em; background: radial-gradient(30em 10em at 100% 0%, rgba(79, 70, 229, 0.08), transparent 70%), var(--surface); }
.d-command-title { font-size: 1.1em; font-weight: 650; letter-spacing: -0.02em; }
.d-command .d-muted { font-size: 0.78em; margin: 0.15em 0 0.8em; }
.d-form { display: flex; gap: 0.6em; }
.d-field { position: relative; flex: 1; display: flex; align-items: center; padding: 0 0.8em; border: 1px solid var(--border-strong); border-radius: 0.6em; font-size: 0.82em; overflow: hidden; }
.d-field .ph { color: var(--faint); }
.d-field .d-q { position: absolute; inset: 0 0.8em; display: flex; align-items: center; justify-content: flex-end; white-space: nowrap; overflow: hidden; background: var(--surface); }
.demo-dash.s1:not(.s3) .d-field { border-color: var(--accent); box-shadow: 0 0 0 0.25em rgba(79, 70, 229, 0.15); }
.demo-dash.s2:not(.s3) .d-btn { transform: scale(0.93); filter: brightness(0.88); }
.d-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6em; }
.d-kpi { padding: 0.6em 0.8em; display: grid; gap: 0.1em; }
.d-kpi .k { display: flex; align-items: center; gap: 0.45em; font-size: 0.7em; color: var(--muted); font-weight: 500; white-space: nowrap; }
.d-kpi .k::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--faint); }
.d-kpi.is-done .k::before { background: var(--success); }
.d-kpi.is-running .k::before { background: var(--info); }
.d-kpi.is-failed .k::before { background: var(--danger); }
.d-num { display: grid; justify-items: start; font-size: 1.35em; font-weight: 650; letter-spacing: -0.03em; }
.d-num b { grid-area: 1 / 1; font-weight: inherit; }
.d-toolbar { display: flex; align-items: center; justify-content: space-between; font-size: 0.9em; }
.d-chipset { display: flex; gap: 0.3em; }
.d-chipset span { padding: 0.2em 0.65em; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 0.8em; }
.d-chipset .is-on { background: var(--text); border-color: var(--text); color: #fff; }
.d-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 0.7em; }
.d-cell { display: grid; }
.d-cell > * { grid-area: 1 / 1; }
.d-empty { display: grid; place-items: center; padding: 1em; border: 0.12em dashed var(--border-strong); border-radius: 0.8em; color: var(--faint); font-size: 0.75em; text-align: center; }
.d-lcard { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.d-lcard.is-new { transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s; }
.demo-dash.s5 .d-lcard.is-new { box-shadow: 0 0 0 0.2em var(--accent-soft-2), 0 0.6em 1.4em -0.6em rgba(79, 70, 229, 0.5); }
.d-thumb { position: relative; flex: 1; min-height: 0; background: var(--bg-3); }
.d-thumb > .d-photo { position: absolute; inset: 0; border-radius: 0; }
.d-thumb.is-loading { background: linear-gradient(90deg, var(--bg-3) 25%, var(--surface-3) 50%, var(--bg-3) 75%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
.d-thumb .d-badge { position: absolute; top: 0.5em; right: 0.5em; font-size: 0.65em; }
.d-lbody { padding: 0.5em 0.7em 0.6em; display: grid; gap: 0.05em; }
.d-lbody .d-stack { justify-items: start; }
.d-lprice { font-weight: 650; font-size: 0.88em; letter-spacing: -0.02em; }
.d-laddr { font-size: 0.72em; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-lmeta { font-size: 0.66em; color: var(--muted); }
.d-toast { position: absolute; top: 1.2em; right: 1.2em; display: flex; gap: 0.6em; align-items: flex-start; padding: 0.7em 0.9em; border-radius: 0.7em; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 0.8em; }
.d-toast i { width: 0.6em; height: 0.6em; margin-top: 0.35em; border-radius: 50%; background: var(--success); }
.d-toast b { display: block; }
.d-toast span { color: var(--muted); font-size: 0.9em; }

/* Listing: sort and clean the photo set */
.demo-listing { padding: 1.4em; }
.demo-listing .d-head { height: 3em; }
.d-board { position: absolute; left: 1.4em; right: 1.4em; top: 5.2em; bottom: 1.4em; }
.d-slot {
  position: absolute; left: 0; top: 0; width: 14.325em; height: 10.27em;
  transform: translate(calc(var(--c0) * 15.125em), calc(var(--r0) * 11.07em));
  transition: transform 0.9s var(--ease) calc(var(--d, 0) * 50ms);
}
.demo-listing.s4 .d-slot, html:not(.js) .d-slot { transform: translate(calc(var(--c1) * 15.125em), calc(var(--r1) * 11.07em)); }
.d-pop, .d-slot .d-photo { width: 100%; height: 100%; }
.d-slot .d-photo { transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.demo-listing.s3 .is-junk .d-photo, html:not(.js) .is-junk { opacity: 0; transform: scale(0.8); }
.d-reject { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3em; background: rgba(220, 38, 38, 0.74); color: #fff; font-weight: 650; font-size: 0.85em; }
.d-reject b { display: grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 50%; background: #fff; color: var(--danger); font-size: 1.1em; }
.d-factbar { position: absolute; left: 0; right: 0; top: 22.14em; height: 10.27em; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5em; padding: 1em 1.3em; }
.d-factbar .d-chips { margin-top: 0.5em; }
.d-factbar p { margin: 0; font-size: 0.8em; line-height: 1.55; color: var(--text-2); }

/* Run log */
.demo-runlog { padding: 1.4em; display: flex; flex-direction: column; gap: 0.9em; }
.d-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6em; }
.d-stats .d-card { padding: 0.6em 0.8em; }
.d-stats span { display: block; font-size: 0.7em; color: var(--muted); }
.d-stats b { font-size: 1.15em; font-weight: 650; letter-spacing: -0.02em; }
.d-table { flex: 1; min-height: 0; overflow: hidden; }
.d-tr { display: grid; grid-template-columns: 4.6em 9.6em 1fr 15em; align-items: center; gap: 0.7em; padding: 0 1em; height: 2.55em; border-bottom: 1px solid var(--border); font-size: 0.8em; }
.d-tr:last-child { border-bottom: 0; }
.d-th { height: 2.2em; background: var(--bg-2); color: var(--muted); font-size: 0.7em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.d-tr code { font-family: var(--mono); font-size: 0.9em; color: var(--accent-text); background: var(--accent-soft); padding: 0.1em 0.45em; border-radius: 0.35em; }
.d-tr .d-mono { font-size: 0.9em; }
.d-detail { display: flex; align-items: center; gap: 0.5em; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.d-detail .d-photo { flex: none; width: 2.4em; height: 1.6em; border-radius: 0.25em; }
.d-gantt { position: relative; height: 0.6em; border-radius: 999px; background: var(--bg-3); }
.d-gantt i { position: absolute; top: 0; bottom: 0; left: var(--x); width: 0; border-radius: inherit; background: var(--gradient); transition: width 0.7s var(--ease) 0.15s; }
.d-tr.on .d-gantt i, html:not(.js) .d-gantt i { width: max(var(--w), 0.5em); }
.d-tr.is-picked { transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), background 0.4s; }
.demo-runlog.s10 .d-tr.is-picked { background: var(--accent-soft); }
.d-reason { position: absolute; right: 2.4em; bottom: 1.9em; width: 25em; padding: 0.9em 1.1em; box-shadow: var(--shadow-xl); border-color: var(--accent-soft-2); }
.d-reason p { margin: 0.4em 0 0; font-size: 0.8em; line-height: 1.5; color: var(--text-2); }
