/* demo/ — the Best CRM click-through and video page.
 * Scoped to .dm-root and prefixed dm-, the same arrangement guide-demo.css and viewers.css use, so
 * nothing here reaches another page. The site serves one dark theme to everybody, so the palette is
 * stated once as custom properties on .dm-root and is not left to prefers-color-scheme. */
.dm-root {
  --dm-surface: #12161f;
  --dm-line: #2a3242;
  --dm-fg: #e8ecf1;
  --dm-muted: #9aa5b3;
  --dm-hot: #ff8a3d;
  --dm-hot-soft: rgba(255, 138, 61, 0.2);
  --dm-accent: #2dd4bf;
  --dm-stage: #05070a;
  color: var(--dm-fg);
}
.dm-root .container-wide { padding-block: 8px; }
.dm-col { display: grid; gap: 18px; }
.dm-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; }
.dm-eyebrow { font: 500 12px/1 var(--font-mono, ui-monospace, monospace); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dm-muted); }
.dm-h1 { margin: 6px 0 0; font-size: clamp(1.6rem, 4.5vw, 2.4rem); line-height: 1.15; text-wrap: balance; }
.dm-h2 { margin: 0; text-wrap: balance; }
.dm-count { font: 500 14px/1 ui-monospace, Menlo, Consolas, monospace; color: var(--dm-muted); font-variant-numeric: tabular-nums; }
.dm-lede { margin: 12px 0 0; max-width: 65ch; line-height: 1.6; color: var(--dm-muted); }
.dm-lede a, .dm-foot a { color: var(--dm-accent); }

.dm-rail { display: flex; gap: 4px; margin: 18px 0; }
.dm-rail button { flex: 1; min-width: 0; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--dm-line); cursor: pointer; }
.dm-rail button.done { background: var(--dm-accent); opacity: 0.5; }
.dm-rail button.now { background: var(--dm-accent); opacity: 1; }

.dm-stage { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: var(--dm-stage); border: 1px solid var(--dm-line); border-radius: 10px; overflow: hidden; }
.dm-stage img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.dm-hot {
  position: absolute; border: 3px solid var(--dm-hot); border-radius: 8px; background: var(--dm-hot-soft);
  cursor: pointer; padding: 0; box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.25); animation: dm-pulse 1.6s ease-in-out infinite;
}
.dm-hot::after { content: ""; position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--dm-hot); border: 3px solid #fff; }
@keyframes dm-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25), 0 0 0 0 var(--dm-hot-soft); }
  50% { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25), 0 0 0 12px rgba(255, 138, 61, 0); }
}
.dm-nudge { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(8, 10, 20, 0.92); color: #fff; font-size: 14px; padding: 9px 14px; border-radius: 8px; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.dm-nudge.show { opacity: 1; }

.dm-panel { margin-top: 18px; background: var(--dm-surface); border: 1px solid var(--dm-line); border-radius: 10px; padding: 20px 22px; display: grid; gap: 10px; }
.dm-panel h2 { margin: 0; font-size: clamp(1.25rem, 3.4vw, 1.6rem); line-height: 1.2; text-wrap: balance; }
.dm-panel p { margin: 0; line-height: 1.6; max-width: 65ch; }
.dm-cta { font: 600 14px/1.3 ui-monospace, Menlo, Consolas, monospace; color: var(--dm-hot); }
.dm-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.dm-nav button:disabled { opacity: 0.45; cursor: default; }
.dm-foot { margin: 18px 0 0; font-size: 0.9rem; color: var(--dm-muted); line-height: 1.5; max-width: 80ch; }
.dm-root button:focus-visible, .dm-hot:focus-visible { outline: 3px solid var(--dm-accent); outline-offset: 2px; }

/* video page */
.dm-player { background: #000; border: 1px solid var(--dm-line); border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; }
.dm-player video { display: block; width: 100%; height: 100%; background: #000; }
.dm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.dm-meta, .dm-status { font: 400 13px/1.5 ui-monospace, Menlo, Consolas, monospace; color: var(--dm-muted); }
.dm-vo { display: grid; gap: 14px; margin-top: 12px; }
.dm-segs { border: 1px solid var(--dm-line); border-radius: 10px; background: var(--dm-surface); overflow: hidden; }
.dm-seg { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 16px 20px; border-top: 1px solid var(--dm-line); }
.dm-seg:first-child { border-top: 0; }
.dm-tc { font: 500 14px/1.3 ui-monospace, Menlo, Consolas, monospace; display: grid; align-content: start; gap: 2px; font-variant-numeric: tabular-nums; }
.dm-to { color: var(--dm-muted); font-size: 12px; }
.dm-seg h3 { margin: 0 0 6px; font: 600 13px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dm-muted); }
.dm-line { margin: 0; font-size: 1.1rem; line-height: 1.55; max-width: 65ch; }
.dm-pace { font: 400 12px/1.4 ui-monospace, Menlo, Consolas, monospace; color: var(--dm-muted); margin-top: 8px; }
.dm-tips-h { margin: 8px 0 0; font-size: 1.15rem; }
.dm-tips { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 1.5; }
.dm-tips li { min-width: 0; }
.dm-tips code { overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .dm-seg { grid-template-columns: 1fr; gap: 6px; }
  .dm-tc { grid-auto-flow: column; justify-content: start; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .dm-hot { animation: none; } .dm-nudge { transition: none; } }

/* slim page chrome: the demo pages carry a short bar and one-line footer, not the full site header */
.dm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid #2a3242; }
.dm-bar nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.95rem; }
.dm-bar nav a { color: #cbd5e1; text-decoration: none; }
.dm-bar nav a:hover, .dm-bar nav a:focus-visible { color: #fff; text-decoration: underline; }
.dm-end { padding: 28px max(16px, env(safe-area-inset-right, 0px)) 36px max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid #2a3242; text-align: center; font-size: 0.9rem; color: #9aa5b3; }
.dm-end p { margin: 0; }
.dm-end a { color: #2dd4bf; }
.dm-root section[id] { scroll-margin-top: 12px; }
