/* Import demo, variation A: "Side by side". The app's Import a plan dialog on the
   left, the Gantt it builds on the right; on phones the Gantt slides in over the
   dialog. Everything is scoped to .idemo-a and prefixed ida-. The stage keeps the
   Sky Light palette in every theme, as the hero film does (site.css .film). */

.idemo-a {
  position: relative; margin: 0; border-radius: 20px; background: var(--surface);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .idemo-a {
    --canvas: #f4f9fd; --surface: #ffffff; --surface-2: #f7fbfe; --surface-3: #e9f2f9;
    --ink: #0f2236; --ink-2: #2f4a63; --muted: #557089; --line: #e3edf5; --line-strong: #c3d7e6;
    --sky: #0284c7; --sky-text: #0369a1; --sky-btn: #0369a1; --sky-btn-hover: #075985; --sky-on: #ffffff; --sky-wash: #e0f2fe; --task-line: #7cc3ec; --edge: #8fb3cc;
    --crit: #e8541c; --crit-text: #c2410c; --crit-wash: #fdeee7; --arrow: #e8541c;
    --shadow: 0 1px 2px rgba(15, 34, 54, .06), 0 8px 24px rgba(15, 34, 54, .08);
    --shadow-lg: 0 2px 6px rgba(15, 34, 54, .06), 0 24px 60px rgba(15, 34, 54, .14);
    color-scheme: light; color: var(--ink);
  }
}
:root[data-theme="dark"] .idemo-a {
  --canvas: #f4f9fd; --surface: #ffffff; --surface-2: #f7fbfe; --surface-3: #e9f2f9;
  --ink: #0f2236; --ink-2: #2f4a63; --muted: #557089; --line: #e3edf5; --line-strong: #c3d7e6;
  --sky: #0284c7; --sky-text: #0369a1; --sky-btn: #0369a1; --sky-btn-hover: #075985; --sky-on: #ffffff; --sky-wash: #e0f2fe; --task-line: #7cc3ec; --edge: #8fb3cc;
  --crit: #e8541c; --crit-text: #c2410c; --crit-wash: #fdeee7; --arrow: #e8541c;
  --shadow: 0 1px 2px rgba(15, 34, 54, .06), 0 8px 24px rgba(15, 34, 54, .08);
  --shadow-lg: 0 2px 6px rgba(15, 34, 54, .06), 0 24px 60px rgba(15, 34, 54, .14);
  color-scheme: light; color: var(--ink);
}
/* In dark mode the card sits on the night canvas: a hairline keeps its edge. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .idemo-a { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 60px rgba(0, 0, 0, .45); } }
:root[data-theme="dark"] .idemo-a { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 60px rgba(0, 0, 0, .45); }

/* Phones and small tablets get the compact cut (demo.js), at most 440 px wide. */
.idemo-a.ida-compact { max-width: 440px; margin-inline: auto; }

/* ── Stage: a fixed design canvas, scaled to the card's width by demo.js ──
   No desktop text is under 13 units, so it stays 11 px or more at a 1024 px
   landscape tablet (scale .87); the phone cut has none under 12.5 (11.4 px at 360). */
.idemo-a .ida-stage { position: relative; overflow: hidden; background: #f4f9fd; aspect-ratio: 1120 / 640; }
.idemo-a .ida-stage.ida-sized { aspect-ratio: auto; }
.idemo-a .ida-canvas {
  position: absolute; left: 0; top: 0; width: 1120px; height: 640px; transform-origin: 0 0;
  font-family: Outfit, system-ui, sans-serif; color: var(--ink); line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(60% 55% at 4% 0%, #fff1e8 0%, rgba(255, 248, 244, .55) 40%, rgba(244, 249, 253, 0) 75%),
    radial-gradient(circle at 1.5px 1.5px, rgba(195, 215, 230, .62) 1.2px, transparent 1.4px) 0 0 / 24px 24px,
    #f4f9fd;
}
.idemo-a .ida-num { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
/* Own layers for the cards and captions: their fades and builds then repaint only
   themselves, not the canvas's dotted gradient under them (and the page below it). */
.idemo-a .ida-dialog, .idemo-a .ida-gantt { will-change: transform; }
.idemo-a .ida-cap { will-change: opacity; }
.idemo-a .ida-pq { font-weight: 700; }

/* ── Captions ── */
.idemo-a .ida-cap { position: absolute; display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; }
.idemo-a .ida-cap-main { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.idemo-a .ida-cap-sub { margin: 0; height: 20px; font-size: 15px; line-height: 20px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.idemo-a .ida-cap-sub > span { display: inline-block; }
.idemo-a .ida-cap-sub > span + span { margin-left: 6px; }
.idemo-a .ida-cap .ida-dchip { font-size: .9em; padding: 0 4px; border-radius: 5px; background: var(--sky-wash); color: var(--sky-text); }
.idemo-a .ida-swatch { display: inline-block; width: 9px; height: 15px; margin-right: 7px; vertical-align: -2px; border-radius: 2px; background: #d6e7f3; }
.idemo-a .ida-dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); vertical-align: .24em; margin: 0 2px 0 7px; }
.idemo-a .ida-grp { white-space: nowrap; }

/* ── Dialog (a simplified mini of the app's Import a plan: it leaves out the intro line,
   the template buttons and the "Link deliverables" checkbox, and labels its fields) ── */
.idemo-a .ida-dialog {
  position: absolute; width: 430px; display: flex; flex-direction: column; gap: 14px;
  padding: 20px 22px 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
}
.idemo-a .ida-d-title { font-size: 19px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.idemo-a .ida-zone {
  position: relative; height: 68px; border-radius: 12px; border: 2px dashed var(--line-strong);
  background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.idemo-a .ida-zone-hi { position: absolute; inset: -2px; border-radius: 12px; border: 2px solid var(--sky); background: var(--sky-wash); opacity: 0; }
.idemo-a .ida-zone-main { position: relative; display: flex; align-items: center; gap: 9px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
.idemo-a .ida-zone-main svg { width: 18px; height: 18px; color: var(--sky-text); flex: none; }
.idemo-a .ida-zone-note { position: absolute; left: 0; right: 0; bottom: 9px; text-align: center; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--muted); opacity: 0; }
.idemo-a .ida-zone-note b { font-weight: 600; color: var(--ink-2); }
.idemo-a .ida-fields { display: grid; grid-template-columns: minmax(0, 1fr) 156px; gap: 12px; }
.idemo-a .ida-lbl { display: block; margin-bottom: 6px; font-size: 13px; line-height: 14px; font-weight: 500; color: var(--muted); }
.idemo-a .ida-input {
  position: relative; height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface);
  font-size: 15px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: visible;
}
.idemo-a .ida-input svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.idemo-a .ida-input .ida-num { font-size: 14.5px; }
.idemo-a .ida-ph { position: absolute; left: 12px; color: var(--muted); font-weight: 400; }
.idemo-a .ida-ring { position: absolute; inset: -1px; border-radius: inherit; border: 1.5px solid var(--sky); box-shadow: 0 0 0 3px rgba(2, 132, 199, .16); opacity: 0; pointer-events: none; }
.idemo-a .ida-text {
  position: relative; height: 176px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); font-size: 15px; line-height: 25px; font-weight: 400; color: var(--ink);
}
.idemo-a .ida-line { position: relative; height: 25px; white-space: nowrap; }
.idemo-a .ida-tok { display: inline-block; }
.idemo-a .ida-tok.ida-n { font-family: var(--mono); font-weight: 500; font-size: 14px; }
.idemo-a .ida-tok.ida-d { font-family: var(--mono); font-weight: 500; font-size: 13.5px; line-height: 20px; padding: 0 5px; border-radius: 5px; background: var(--sky-wash); color: var(--sky-text); }
.idemo-a .ida-caret { position: absolute; left: 0; top: 0; width: 2px; height: 19px; border-radius: 1px; background: var(--sky); opacity: 0; }
.idemo-a .ida-prev {
  position: relative; min-height: 40px; display: flex; align-items: center; padding: 9px 12px;
  border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13.5px; line-height: 20px; font-weight: 500; color: var(--ink-2);
}
.idemo-a .ida-prev-in { white-space: nowrap; }
.idemo-a .ida-prev .ida-num { display: inline-block; min-width: 9px; text-align: center; padding: 0 2px; border-radius: 4px; color: var(--ink); }
.idemo-a .ida-btns { display: flex; justify-content: flex-end; gap: 10px; }
.idemo-a .ida-btn { height: 40px; padding: 0 18px; border-radius: 10px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 600; white-space: nowrap; }
.idemo-a .ida-cancel { border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.idemo-a .ida-create { background: var(--sky-btn); color: var(--sky-on); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 6px 18px rgba(3, 105, 161, .28); transform-origin: center; }

/* ── The Word file ── */
.idemo-a .ida-doc { position: absolute; left: 0; top: 0; width: 178px; opacity: 0; transform-origin: center; will-change: transform; }
.idemo-a .ida-page {
  position: relative; height: 192px; padding: 14px 15px 0; border-radius: 10px; background: #ffffff;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); overflow: hidden;
}
.idemo-a .ida-page::after { /* folded corner */
  content: ''; position: absolute; right: -1px; top: -1px; width: 26px; height: 26px;
  background: linear-gradient(225deg, #f4f9fd 50%, var(--surface-3) 50%); border-bottom-left-radius: 6px; box-shadow: -1px 1px 0 var(--line-strong);
}
.idemo-a .ida-ext { display: inline-block; padding: 3px 7px 4px; border-radius: 6px; background: var(--sky-btn); color: #ffffff; font-size: 13px; line-height: 14px; font-weight: 600; letter-spacing: .02em; }
.idemo-a .ida-page p { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-2); white-space: nowrap; }
.idemo-a .ida-page p:first-of-type { margin-top: 11px; }
.idemo-a .ida-page .ida-num { font-size: 13px; }
.idemo-a .ida-fname { display: table; margin: 9px auto 0; padding: 2px 9px 3px; border-radius: 7px; background: var(--surface); box-shadow: 0 1px 2px rgba(15, 34, 54, .08), 0 0 0 1px var(--line); text-align: center; font-size: 13.5px; line-height: 18px; font-weight: 600; color: var(--ink); } /* its own surface: it crosses the dialog's edges as it flies */

/* ── Gantt ── */
.idemo-a .ida-gantt {
  position: absolute; width: 590px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.idemo-a .ida-g-head { position: relative; display: flex; align-items: center; justify-content: space-between; height: 36px; }
.idemo-a .ida-g-title { position: relative; font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.idemo-a .ida-g-ph { position: absolute; left: 0; top: 6px; width: 132px; height: 12px; border-radius: 6px; background: var(--line); }
.idemo-a .ida-fin {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 1px 2px rgba(15, 34, 54, .05);
  font-size: 14px; font-weight: 500; color: var(--ink-2); opacity: 0;
}
.idemo-a .ida-fin .ida-fin-k { font-weight: 600; color: var(--muted); }
.idemo-a .ida-fin .ida-num { color: var(--ink); font-size: 13.5px; }
.idemo-a .ida-g-chart { position: relative; margin-top: 14px; }
.idemo-a .ida-g-axis { position: relative; height: 28px; border-bottom: 1px solid var(--line-strong); }
.idemo-a .ida-g-wl { position: absolute; top: 5px; font-size: 13px; line-height: 16px; color: var(--muted); white-space: nowrap; }
.idemo-a .ida-g-body { position: relative; }
.idemo-a .ida-g-cal { position: absolute; top: 0; bottom: 0; }
.idemo-a .ida-we { position: absolute; top: 0; bottom: 0; background: var(--surface-3); } /* the demo's "Weekends skipped" cue (owner-approved); the app's Gantt draws no weekends */
.idemo-a .ida-wk { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.idemo-a .ida-g-row { position: relative; height: 74px; border-bottom: 1px solid var(--line); }
.idemo-a .ida-g-lab { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.idemo-a .ida-g-name { font-size: 15px; line-height: 19px; font-weight: 600; color: var(--ink); }
.idemo-a .ida-g-row.ida-sum .ida-g-name { font-weight: 700; }
.idemo-a .ida-g-dates { font-size: 13px; line-height: 17px; color: var(--ink-2); }
.idemo-a .ida-g-dur { position: absolute; top: 50%; margin-top: -9px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
/* The app's Gantt look (GanttView.jsx, index.css .gantt-bar): solid critical bars with
   3 px corners, --ida-bh tall (idemo.js: 10/32 of the row, as BAR_H in GROW); the
   deliverable's 6 px summary bar (SUM_H, 1.5 px corners) with a bracket tick down at
   each end, SUM_H + 5 deep and at most 6 px wide; the 14 px milestone diamond with a
   1 px surface outline. */
.idemo-a .ida-g-bar { position: absolute; top: 50%; height: var(--ida-bh, 24px); margin-top: calc(var(--ida-bh, 24px) / -2); border-radius: 3px; background: var(--crit); }
.idemo-a .ida-g-row.ida-sum .ida-g-bar { height: 6px; margin-top: -3px; border-radius: 1.5px; }
.idemo-a .ida-g-row.ida-sum .ida-g-bar::before, .idemo-a .ida-g-row.ida-sum .ida-g-bar::after { content: ''; position: absolute; top: 0; width: min(6px, 50%); height: 11px; background: inherit; }
.idemo-a .ida-g-row.ida-sum .ida-g-bar::before { left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.idemo-a .ida-g-row.ida-sum .ida-g-bar::after { right: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); }
/* The app draws its 14 px diamond over a 10 px bar; the bars here are --ida-bh, so the diamond keeps that 1.4. */
.idemo-a .ida-g-ms { position: absolute; top: 50%; width: calc(var(--ida-bh, 10px) * 1.4); height: calc(var(--ida-bh, 10px) * 1.4); margin: calc(var(--ida-bh, 10px) * -.7) 0 0 calc(var(--ida-bh, 10px) * -.7); overflow: visible; }
.idemo-a .ida-g-ms polygon { fill: var(--crit); stroke: var(--surface); stroke-width: 1; stroke-linejoin: round; }
/* Links as the app's Gantt draws them (idemo.js idemoLink): 1.5 px critical, default
   caps and joins, an unstroked head. */
.idemo-a .ida-g-links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.idemo-a .ida-g-links path { fill: none; stroke: var(--crit); stroke-width: 1.5; }
.idemo-a .ida-g-links path.ida-hd { fill: var(--crit); stroke: none; }

/* ── Controls, as the hero film's bar ── */
.idemo-a .ida-bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.idemo-a .ida-play { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.idemo-a .ida-play:hover { border-color: var(--sky); color: var(--sky); }
.idemo-a .ida-play svg { width: 14px; height: 14px; }
.idemo-a .ida-play:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.idemo-a .ida-chapters { flex: 1; display: grid; grid-template-columns: 7fr 6fr; gap: 14px; min-width: 0; }
.idemo-a .ida-chapters button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; align-content: center; gap: 6px; padding: 6px 0; min-width: 0; font: 500 13px/1.2 Outfit, sans-serif; color: var(--muted); }
.idemo-a .ida-chapters button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idemo-a .ida-chapters button i { display: block; height: 4px; border-radius: 4px; background: var(--line-strong); overflow: hidden; position: relative; }
.idemo-a .ida-chapters button i b { position: absolute; inset: 0; width: 0%; background: var(--sky); border-radius: 4px; }
.idemo-a .ida-chapters button.ida-on { color: var(--ink); }
.idemo-a .ida-chapters button:hover { color: var(--ink); }
.idemo-a .ida-chapters button:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
@media (forced-colors: active) {
  .idemo-a .ida-chapters button i { forced-color-adjust: none; background: GrayText; }
  .idemo-a .ida-chapters button i b { forced-color-adjust: none; background: Highlight; }
}
@media (pointer: coarse) {
  .idemo-a .ida-play { position: relative; }
  .idemo-a .ida-play::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
  .idemo-a .ida-chapters button { min-height: 44px; }
}
@media (max-width: 560px) {
  .idemo-a .ida-bar { padding: 0 12px; gap: 12px; }
  .idemo-a .ida-play { width: 44px; height: 44px; }
  .idemo-a .ida-chapters { gap: 12px; }
  .idemo-a .ida-chapters button { min-height: 56px; padding: 10px 0; }
  .idemo-a .ida-chapters button:focus-visible { outline-offset: -2px; }
}

/* ── Compact cut (phones): a 342-unit canvas, the Gantt over the dialog ── */
.idemo-a.ida-compact .ida-cap-main { font-size: 15.5px; line-height: 21px; }
.idemo-a.ida-compact .ida-cap-sub { font-size: 13.5px; line-height: 18px; height: 18px; }
.idemo-a.ida-compact .ida-dialog { width: 314px; gap: 12px; padding: 16px 16px 16px; border-radius: 16px; }
.idemo-a.ida-compact .ida-d-title { font-size: 17px; line-height: 22px; }
.idemo-a.ida-compact .ida-zone { height: 60px; }
.idemo-a.ida-compact .ida-zone-main { font-size: 14px; gap: 8px; }
.idemo-a.ida-compact .ida-zone-main svg { width: 16px; height: 16px; }
.idemo-a.ida-compact .ida-zone-note { bottom: 6px; font-size: 12.5px; }
.idemo-a.ida-compact .ida-fields { grid-template-columns: minmax(0, 1fr) 128px; gap: 10px; }
.idemo-a.ida-compact .ida-lbl { font-size: 12.5px; margin-bottom: 5px; }
.idemo-a.ida-compact .ida-input { height: 38px; padding: 0 10px; gap: 7px; font-size: 14px; }
.idemo-a.ida-compact .ida-ph { left: 10px; }
.idemo-a.ida-compact .ida-input .ida-num { font-size: 13.5px; }
.idemo-a.ida-compact .ida-input svg { width: 15px; height: 15px; }
.idemo-a.ida-compact .ida-text { height: 160px; padding: 10px 12px; font-size: 14px; line-height: 23px; }
.idemo-a.ida-compact .ida-line { height: 23px; }
.idemo-a.ida-compact .ida-tok.ida-n { font-size: 13px; }
.idemo-a.ida-compact .ida-tok.ida-d { font-size: 12.5px; line-height: 18px; }
.idemo-a.ida-compact .ida-caret { height: 17px; }
.idemo-a.ida-compact .ida-prev { min-height: 58px; padding: 8px 11px; font-size: 13px; line-height: 19px; }
.idemo-a.ida-compact .ida-prev-in { white-space: normal; }
.idemo-a.ida-compact .ida-btn { height: 40px; padding: 0 16px; font-size: 14.5px; }
.idemo-a.ida-compact .ida-doc { width: 164px; }
.idemo-a.ida-compact .ida-page { height: 182px; padding: 12px 13px 0; }
.idemo-a.ida-compact .ida-page p { font-size: 12.5px; line-height: 19px; }
.idemo-a.ida-compact .ida-page p:first-of-type { margin-top: 10px; }
.idemo-a.ida-compact .ida-page .ida-num { font-size: 12.5px; }
.idemo-a.ida-compact .ida-fname { font-size: 13px; margin-top: 7px; }
.idemo-a.ida-compact .ida-gantt { width: 314px; padding: 16px 14px 66px; }
.idemo-a.ida-compact .ida-g-head { height: 26px; }
.idemo-a.ida-compact .ida-g-title { font-size: 17px; line-height: 22px; }
.idemo-a.ida-compact .ida-g-chart { margin-top: 12px; }
.idemo-a.ida-compact .ida-g-axis { height: 24px; }
.idemo-a.ida-compact .ida-g-wl { top: 4px; font-size: 12.5px; }
.idemo-a.ida-compact .ida-g-row { height: 54px; }
.idemo-a.ida-compact .ida-g-lab { top: var(--ida-rt, 7px); transform: none; flex-direction: row; align-items: baseline; gap: 8px; }
.idemo-a.ida-compact .ida-g-lab.ida-side { flex-direction: column; align-items: flex-end; gap: 1px; }
.idemo-a.ida-compact .ida-g-name { font-size: 14px; line-height: 18px; }
.idemo-a.ida-compact .ida-g-dates { font-size: 12.5px; line-height: 17px; }
.idemo-a.ida-compact .ida-g-bar { top: var(--ida-rb, 38px); }
.idemo-a.ida-compact .ida-g-row.ida-sum .ida-g-bar { top: var(--ida-rb, 38px); }
.idemo-a.ida-compact .ida-g-dur { top: var(--ida-rb, 38px); margin-top: -9px; font-size: 12.5px; }
.idemo-a.ida-compact .ida-g-ms { top: var(--ida-rb, 38px); }
.idemo-a.ida-compact .ida-fin { align-self: flex-start; margin-top: auto; height: 34px; font-size: 13.5px; padding: 0 11px; gap: 6px; }
.idemo-a.ida-compact .ida-fin .ida-num { font-size: 13px; }

/* Import demo, variation B: one card where the typed list becomes the schedule.
   Everything is scoped to .idemo-b; class names start with idb-. */
.idemo-b { position: relative; margin: 0; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; }
/* The stage is Sky Light in every theme, as the hero film is: in Night Shift the
   card keeps the light tokens (bar, captions, buttons and focus rings too). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .idemo-b {
    --canvas: #f4f9fd; --surface: #ffffff; --surface-2: #f7fbfe; --surface-3: #e9f2f9;
    --ink: #0f2236; --ink-2: #2f4a63; --muted: #557089; --line: #e3edf5; --line-strong: #c3d7e6;
    --sky: #0284c7; --sky-text: #0369a1; --sky-btn: #0369a1; --sky-btn-hover: #075985; --sky-on: #ffffff; --sky-wash: #e0f2fe; --mark: #bae6fd; --task-line: #7cc3ec; --edge: #8fb3cc;
    --crit: #e8541c; --crit-text: #c2410c; --crit-wash: #fdeee7; --arrow: #e8541c;
    --shadow: 0 1px 2px rgba(15, 34, 54, .06), 0 8px 24px rgba(15, 34, 54, .08);
    color-scheme: light;
  }
}
:root[data-theme="dark"] .idemo-b {
  --canvas: #f4f9fd; --surface: #ffffff; --surface-2: #f7fbfe; --surface-3: #e9f2f9;
  --ink: #0f2236; --ink-2: #2f4a63; --muted: #557089; --line: #e3edf5; --line-strong: #c3d7e6;
  --sky: #0284c7; --sky-text: #0369a1; --sky-btn: #0369a1; --sky-btn-hover: #075985; --sky-on: #ffffff; --sky-wash: #e0f2fe; --mark: #bae6fd; --task-line: #7cc3ec; --edge: #8fb3cc;
  --crit: #e8541c; --crit-text: #c2410c; --crit-wash: #fdeee7; --arrow: #e8541c;
  --shadow: 0 1px 2px rgba(15, 34, 54, .06), 0 8px 24px rgba(15, 34, 54, .08);
  color-scheme: light;
}
.idemo-b .idb-stage { position: relative; aspect-ratio: 16 / 9; background: var(--canvas); overflow: hidden; }
@media (max-width: 700px) { .idemo-b .idb-stage { aspect-ratio: auto; height: 560px; } }
.idemo-b .idb-svg, .idemo-b .idb-back { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.idemo-b .idb-shade { position: absolute; left: 0; top: 0; pointer-events: none; } /* the card's shadow (idemo.js) */
.idemo-b .idb-svg text { white-space: pre; }
.idemo-b .idb-w { font-family: Outfit, system-ui, sans-serif; }
.idemo-b .idb-n { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }

/* Captions: page text over the stage's bottom band (aria-hidden; the stage's label says it all). */
.idemo-b .idb-cap { position: absolute; left: 30px; right: 30px; top: 0; pointer-events: none; }
.idemo-b .idb-cap p { margin: 0; will-change: opacity, transform; }
.idemo-b .idb-cap-t { font: 500 22px/1.3 Outfit, system-ui, sans-serif; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.idemo-b .idb-cap-s { margin-top: 6px; font: 500 16px/1.4 Outfit, system-ui, sans-serif; color: var(--muted); }
.idemo-b .idb-cap .idb-m { font-family: var(--mono); font-weight: 500; font-size: .92em; letter-spacing: 0; }
@media (max-width: 700px) {
  .idemo-b .idb-cap-t { font-size: 15.5px; line-height: 1.35; text-wrap: pretty; }
  .idemo-b .idb-cap-s { margin-top: 4px; font-size: 13px; }
}

/* Controls, as the hero film's bar. */
.idemo-b .idb-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.idemo-b .idb-play { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.idemo-b .idb-play:hover { border-color: var(--sky); color: var(--sky); }
.idemo-b .idb-play svg { width: 14px; height: 14px; }
.idemo-b .idb-play:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.idemo-b .idb-chapters { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.idemo-b .idb-chapters button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; align-content: center; gap: 6px; padding: 6px 0; font-size: 12px; font-weight: 500; line-height: 1.2; color: var(--muted); min-width: 0; }
.idemo-b .idb-chapters button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idemo-b .idb-chapters button i { display: block; height: 4px; border-radius: 4px; background: var(--line-strong); overflow: hidden; position: relative; }
.idemo-b .idb-chapters button i b { position: absolute; inset: 0; width: 0%; background: var(--sky); border-radius: 4px; }
.idemo-b .idb-chapters button.on { color: var(--ink); }
.idemo-b .idb-chapters button:hover { color: var(--ink); }
.idemo-b .idb-chapters button:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
/* Phones: two chapters keep their names; every control is a 44 px target. */
@media (max-width: 560px) {
  .idemo-b .idb-bar { padding: 0 12px 0 8px; gap: 10px; }
  .idemo-b .idb-play { width: 44px; height: 44px; }
  .idemo-b .idb-chapters { gap: 12px; }
  .idemo-b .idb-chapters button { min-height: 56px; padding: 8px 0; font-size: 13px; }
  .idemo-b .idb-chapters button:focus-visible { outline-offset: -2px; }
}
@media (pointer: coarse) and (min-width: 561px) {
  .idemo-b .idb-play { position: relative; }
  .idemo-b .idb-play::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
  .idemo-b .idb-chapters button { min-height: 44px; }
}
@media (forced-colors: active) {
  .idemo-b .idb-chapters button i { forced-color-adjust: none; background: GrayText; }
  .idemo-b .idb-chapters button i b { forced-color-adjust: none; background: Highlight; }
}

/* Laptops get A (side by side); phones and small tablets get B, where the list
   turns into the schedule in one card (owner, 19 Oct). A's own phone layout
   starts at the same 1023px, so A is only ever shown side by side. */
@media (max-width: 1023px) { .idemo-a { display: none; } }
@media (min-width: 1024px) { .idemo-b { display: none; } }
