/* Demo videos page. Uses the tokens in site.css. */
.demo { padding-block: 28px 48px; font-size: 15px; line-height: 1.5; }
.demo-intro { max-width: 760px; display: grid; gap: 8px; margin-bottom: 22px; }
.demo-intro h1 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(28px, 4.4vw, 40px); line-height: 1.1; letter-spacing: -0.01em; }
.demo-intro p { margin: 0; color: var(--ink-2); font-size: 16px; }

.demo-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 920px) { .demo-grid { grid-template-columns: minmax(0, 1fr); } .demo-list { order: 2; } }

.demo-list { display: grid; gap: 10px; }
.dl-item { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; }
.dl-item:hover { border-color: var(--line-strong); }
.dl-item[aria-current="true"] { border-color: #E0661F; box-shadow: 0 0 0 2px rgba(224, 102, 31, .25); }
.dl-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-thumb .dur { position: absolute; right: 5px; bottom: 5px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.dl-item b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.dl-item small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.dl-num { color: #C9441E; font-weight: 700; margin-right: 4px; }

.demo-main { min-width: 0; display: grid; gap: 14px; }
.player { border-radius: 14px; overflow: hidden; background: #0f1222; box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; display: block; background: #0f1222; }
.demo-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.demo-info h2 { margin: 0; font-family: var(--f-display); font-size: 24px; font-weight: 600; }
.demo-info p { margin: 4px 0 0; color: var(--ink-2); max-width: 64ch; }
.steps-h { margin: 6px 0 0; font-size: 16px; font-weight: 600; }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
@media (max-width: 640px) { .chapters { grid-template-columns: minmax(0, 1fr); } }
.chapters button { width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: baseline; text-align: left; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: 14.5px; cursor: pointer; }
.chapters button:hover { background: var(--surface); border-color: var(--line); }
.chapters button.on { background: #FFF1E6; border-color: #F3C9A9; }
.chapters .tm { font-variant-numeric: tabular-nums; color: #C9441E; font-weight: 600; font-size: 13.5px; }
@media (prefers-color-scheme: dark) { .chapters button.on { background: rgba(236, 122, 38, .16); border-color: rgba(236, 122, 38, .4); } }

.demo-help { margin-top: 30px; max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.demo-help h2 { margin: 0 0 4px; font-family: var(--f-display); font-size: 19px; font-weight: 600; }
.demo-help p { margin: 0; color: var(--ink-2); }

/* voice */
.voice-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.voice-lbl { font-weight: 600; font-size: 14px; }
.vseg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; padding: 3px; gap: 3px; background: var(--surface-2); }
.vseg label { position: relative; padding: 6px 14px; border-radius: 7px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--muted); }
.vseg input { position: absolute; opacity: 0; pointer-events: none; }
.vseg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.vseg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.voice-row .hint { margin: 0; }
.live { margin: 8px 0 0; min-height: 1.5em; font-size: 15.5px; font-weight: 500; color: var(--ink); }
.live:empty::before { content: "\00a0"; }
.voice-note { margin: 6px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-soft); font-size: 13.5px; }
#dmSteps [lang=hi], .live[lang=hi] { font-family: 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', var(--f-body, sans-serif); }
