/* Deck website demo — a pretend Premiere beside the real Deck panel. Creators Packs brand: dark only; yellow is
   the interaction colour (selection, playhead, focus); red/blue/yellow/green only in the logo, streak and rainbow. */
:root {
  --bg: #111114; --panel: #1a1a1f; --panel-2: #202026; --raised: #24242b; --border: #2b2b33; --border-strong: #4a4a55;
  --text: #ececf0; --text-2: #9a9aa6; --text-3: #5c5c66;
  --accent: #ffe103; --accent-soft: rgba(255, 225, 3, 0.12); --accent-line: rgba(255, 225, 3, 0.7);
  --red: #ff211e; --blue: #019dff; --yellow: #ffe103; --green: #09ff80;
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.4 var(--font); }
button { font: inherit; color: inherit; }
svg { display: block; }

.demo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; padding: 14px; height: 760px; min-height: 0; }
.demo__premiere { display: grid; grid-template-rows: minmax(0, 1.15fr) minmax(0, 1fr) auto; gap: 10px; min-width: 0; min-height: 0; }
.demo__deck { min-height: 0; }
.demo__deck-frame { height: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-strong); background: #111114; position: relative; }
.demo__deck-frame::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 1;
  background: linear-gradient(90deg, var(--red), var(--blue), var(--yellow), var(--green)); }
#panel { display: block; width: 100%; height: 100%; border: 0; background: #111114; }

/* ---------- Premiere's panels ---------- */
.pp-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px; min-height: 0; }
.pp-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 650; color: var(--text-2); letter-spacing: 0.02em; white-space: nowrap; }
.pp-head > span:first-child { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.pp-head__tc { font-family: var(--mono); color: var(--accent); font-weight: 700; }
.pp-head__hint { font-weight: 500; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }

/* Project panel */
.pp-project__list { overflow: auto; padding: 6px; flex: 1; }
.pp-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 7px; border: 0; border-radius: 6px; background: none; text-align: left; cursor: pointer; font-size: 12px; color: var(--text); }
.pp-item:hover { background: var(--raised); }
.pp-item[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.pp-item__label { flex: none; width: 9px; height: 9px; border-radius: 2px; }
.pp-item__ico { flex: none; width: 14px; height: 14px; stroke: var(--text-2); fill: none; stroke-width: 1.8; }
.pp-item__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-bin { margin: 6px 0 2px; padding: 3px 7px; font-size: 11px; font-weight: 700; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.pp-bin svg { width: 13px; height: 13px; stroke: var(--text-2); fill: none; stroke-width: 1.8; }
.pp-bin + .pp-binitems { padding-left: 12px; }

/* Program monitor */
.pp-monitor__frame { flex: 1; min-height: 0; display: grid; place-items: center; padding: 10px; background: #0c0c0e; position: relative; }
.pp-screen { position: relative; aspect-ratio: 16 / 9; height: 100%; max-width: 100%; max-height: 100%; background: #000; overflow: hidden; border-radius: 2px; }
@supports not (aspect-ratio: 16 / 9) { .pp-screen { width: 100%; height: auto; padding-top: 56.25%; } }
.pp-layer { position: absolute; inset: 0; }
.pp-shot { position: absolute; left: 50%; top: 50%; transform-origin: center; }
.pp-shot svg { width: 100%; height: 100%; }
.pp-badge { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 5px; background: rgba(0, 0, 0, 0.6); font: 700 10px var(--mono); letter-spacing: 0.06em; color: #fff; }
.pp-badge--right { left: auto; right: 10px; }
.pp-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #555; font-size: 12px; }
.pp-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.7) 100%); pointer-events: none; }
.pp-flash { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 12px; border-radius: 8px; background: rgba(17, 17, 20, 0.92);
  border: 1px solid var(--border-strong); font-size: 11.5px; opacity: 0; transition: opacity 0.2s; pointer-events: none; white-space: nowrap; }
.pp-flash.is-on { opacity: 1; }
.pp-transport { display: flex; justify-content: center; gap: 6px; padding: 6px; border-top: 1px solid var(--border); }
.pp-btn { width: 30px; height: 26px; border-radius: 6px; border: 1px solid transparent; background: none; cursor: pointer; display: grid; place-items: center; }
.pp-btn:hover { background: var(--raised); }
.pp-btn svg { width: 15px; height: 15px; stroke: var(--text); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pp-btn--play svg { fill: var(--text); stroke: none; }

/* Timeline */
.pp-timeline__body { flex: 1; min-height: 0; overflow: auto; position: relative; user-select: none; }
.tl { position: relative; min-width: 100%; }
.tl-ruler { position: sticky; top: 0; z-index: 3; height: 26px; margin-left: 46px; background: var(--panel-2); border-bottom: 1px solid var(--border); cursor: pointer; }
.tl-tick { position: absolute; top: 0; height: 100%; border-left: 1px solid #3a3a44; font: 9px var(--mono); color: var(--text-3); padding: 2px 0 0 3px; }
.tl-inout { position: absolute; top: 0; height: 100%; background: rgba(255, 225, 3, 0.10); border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.tl-marker { position: absolute; bottom: 2px; width: 9px; height: 11px; margin-left: -4px; clip-path: polygon(0 0, 100% 0, 100% 65%, 50% 100%, 0 65%); }
.tl-track { position: relative; height: 34px; border-bottom: 1px solid #23232a; }
.tl-track--audio { height: 28px; }
.tl-track--split { border-top: 2px solid var(--border-strong); }
.tl-name { position: absolute; left: 0; top: 0; bottom: 0; width: 46px; display: grid; place-items: center; font: 700 10px var(--mono); color: var(--text-2); background: var(--panel-2); border-right: 1px solid var(--border); z-index: 2; }
.tl-lane { position: absolute; left: 46px; right: 0; top: 0; bottom: 0; cursor: default; }
.tl-clip { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; padding: 0 6px; overflow: hidden; cursor: pointer; font-size: 10.5px; font-weight: 600; color: #101012;
  display: flex; align-items: center; gap: 5px; white-space: nowrap; border: 1px solid rgba(0, 0, 0, 0.35); }
.tl-clip span { overflow: hidden; text-overflow: ellipsis; }
.tl-clip--audio { color: rgba(255, 255, 255, 0.85); background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 4px); }
.tl-clip--adjust { color: #fff; background: repeating-linear-gradient(135deg, #7a4fc9 0 6px, #6a42b5 6px 12px) !important; }
.tl-clip--nest { color: #0d2a12; background: #7fd27b !important; }
.tl-clip--freeze { color: #fff; background: #4a7ea8 !important; }
.tl-clip--off { opacity: 0.38; }
.tl-clip[aria-selected="true"] { box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px rgba(255, 225, 3, 0.18); z-index: 1; }
.tl-fx { flex: none; font: 700 9px var(--mono); padding: 0 3px; border-radius: 3px; background: rgba(0, 0, 0, 0.55); color: #ffe103; }
.tl-trans { position: absolute; top: 0; bottom: 0; width: 14px; background: linear-gradient(135deg, rgba(0, 0, 0, 0.55) 50%, transparent 50%); }
.tl-trans--in { left: 0; }
.tl-trans--out { right: 0; transform: scaleX(-1); }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--accent); z-index: 4; pointer-events: none; }
.tl-playhead::before { content: ""; position: absolute; top: 0; left: -7px; width: 12px; height: 12px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }

/* The strip under Premiere: what to try, Undo, Reset */
.demo__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.demo__try { display: flex; align-items: center; gap: 7px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.demo__try::-webkit-scrollbar { display: none; }
.demo__try-label { flex: none; font-size: 11px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.streak { display: inline-block; width: 20px; height: 12px; transform: skewX(-16deg);
  background: linear-gradient(90deg, transparent, var(--red)) 0 0 / 100% 2px no-repeat, linear-gradient(90deg, transparent, var(--blue)) 0 33.3% / 100% 2px no-repeat,
    linear-gradient(90deg, transparent, var(--yellow)) 0 66.6% / 100% 2px no-repeat, linear-gradient(90deg, transparent, var(--green)) 0 100% / 100% 2px no-repeat; }
.demo__tip { flex: none; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 11.5px; color: var(--text-2); background: none; cursor: pointer; }
.demo__tip:hover { border-color: var(--accent-line); color: var(--text); }
.demo__tip.is-done { color: var(--text); border-color: rgba(76, 195, 138, 0.6); }
.demo__tip.is-done::before { content: "✓ "; color: #4cc38a; }
.demo__tools { display: flex; gap: 6px; flex: none; }
.demo__chip { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--raised); font-size: 12px; font-weight: 600; cursor: pointer; }
.demo__chip:hover { border-color: var(--accent-line); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The panel on its own (the default view): it fills the frame it's embedded in. */
body[data-view="panel"] .demo { display: block; height: 100vh; padding: 0; }
body[data-view="panel"] .demo__premiere { display: none; }
body[data-view="panel"] .demo__deck { height: 100%; }
body[data-view="panel"] .demo__deck-frame { border: 0; border-radius: 0; }

/* Phones and narrow embeds: Premiere on top, the panel under it. */
@media (max-width: 900px) {
  body[data-view="panel"] .demo__deck { height: 100%; }
  .demo { grid-template-columns: 1fr; height: auto; }
  .demo__premiere { grid-template-rows: auto auto auto; }
  .pp-row { grid-template-columns: 1fr; }
  .pp-project { display: none; }
  .pp-monitor__frame { height: 46vw; min-height: 180px; }
  .pp-timeline { height: 230px; }
  .demo__deck { height: 640px; }
  .pp-head__hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
