/* "A peek inside ZTD Office": the self-playing product demo (markup in src/showcase.mjs, driven by demo.js).
   One workspace with a left app-rail and five app screens drawn in HTML. Base colours suit the current and
   light looks; look-dark.css re-flavours it. The tabs are radio buttons so they switch with no JavaScript; the
   little in-screen animations only run while a screen is showing (switching a screen on restarts them) and
   freeze when the demo is paused. Everything runs at 1.5 times its first speed (Samuel, 2026-11-26): each app gets
   4 seconds and every timing below is two thirds of what it was. */

.demo {
  --d-ink: #101a2c; --d-muted: #64748b; --d-line: #e7ecf3; --d-soft: #f5f8fc; --d-win: #fff;
  --d-accent: #00427c; --d-accent2: #2563eb; --d-ok: #15803d; --d-sel: #eef4fb; --d-rail: #f7f9fc;
  --d-shadow: 0 40px 90px -50px rgba(8, 25, 48, 0.5); --dur: 4s; --screen-h: 460px;
  max-width: 1040px; margin: 8px auto 0;
}

/* The radio buttons that remember which app is open (so the tabs work without JavaScript) */
.demo-r { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* The workspace shell: a left app-rail and the open app beside it */
.demo-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); border: 1px solid var(--d-line); border-radius: 18px; background: var(--d-win); box-shadow: var(--d-shadow); overflow: hidden; }
.demo-rail { display: flex; flex-direction: column; padding: 16px 12px; background: var(--d-rail); border-right: 1px solid var(--d-line); }
.demo-brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 16px; font-weight: 700; color: var(--d-ink); }
.demo-brand img { border-radius: 7px; }
.demo-apps { display: flex; flex-direction: column; gap: 2px; }
.demo-app { position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--d-muted); font-weight: 600; cursor: pointer; overflow: hidden; transition: color 0.15s, background 0.15s; }
.demo-app:hover { color: var(--d-ink); background: rgba(0, 66, 124, 0.06); }
.demo-app-ic { display: inline-grid; place-items: center; }
.demo-app-ic svg { width: 19px; height: 19px; }
#demo-mail:checked ~ .demo-shell .demo-app[for='demo-mail'],
#demo-cal:checked ~ .demo-shell .demo-app[for='demo-cal'],
#demo-meet:checked ~ .demo-shell .demo-app[for='demo-meet'],
#demo-docs:checked ~ .demo-shell .demo-app[for='demo-docs'],
#demo-contacts:checked ~ .demo-shell .demo-app[for='demo-contacts'] { color: var(--d-accent); background: var(--d-sel); }
#demo-mail:focus-visible ~ .demo-shell .demo-app[for='demo-mail'],
#demo-cal:focus-visible ~ .demo-shell .demo-app[for='demo-cal'],
#demo-meet:focus-visible ~ .demo-shell .demo-app[for='demo-meet'],
#demo-docs:focus-visible ~ .demo-shell .demo-app[for='demo-docs'],
#demo-contacts:focus-visible ~ .demo-shell .demo-app[for='demo-contacts'] { outline: 3px solid var(--d-accent2); outline-offset: 2px; }
@keyframes demo-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.demo-you { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; }
.demo-you .dav { width: 30px; height: 30px; font-size: 0.64rem; }
.demo-you-t { min-width: 0; }
.demo-you-t b { display: block; font-size: 0.82rem; color: var(--d-ink); }
.demo-you-t small { display: block; color: var(--d-muted); font-size: 0.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.demo-main { display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-width: 0; }
.demo-topbar { display: flex; align-items: center; gap: 12px; padding: 13px 18px; }
/* The line under the header doubles as the progress bar: it fills while an app plays, then the next app opens.
   It only runs once JS is in (demo-js); demo.js restarts it each time an app opens. */
.demo-progress { height: 2px; background: var(--d-line); overflow: hidden; }
.demo-prog { display: block; height: 100%; background: var(--d-accent); transform: scaleX(0); transform-origin: left; }
.demo.demo-js .demo-prog { animation: demo-fill var(--dur) linear both; }
.demo-heads { flex: 1; min-width: 0; }
.demo-h { display: none; }
.demo-h b { font-size: 1rem; color: var(--d-ink); }
.demo-h span { color: var(--d-muted); font-size: 0.8rem; margin-left: 10px; }
#demo-mail:checked ~ .demo-shell .demo-h[data-h='mail'],
#demo-cal:checked ~ .demo-shell .demo-h[data-h='cal'],
#demo-meet:checked ~ .demo-shell .demo-h[data-h='meet'],
#demo-docs:checked ~ .demo-shell .demo-h[data-h='docs'],
#demo-contacts:checked ~ .demo-shell .demo-h[data-h='contacts'] { display: block; }
.demo-tools { display: flex; align-items: center; gap: 10px; }
.demo-search { display: inline-flex; align-items: center; gap: 7px; color: var(--d-muted); font-size: 0.82rem; background: var(--d-soft); border: 1px solid var(--d-line); border-radius: 8px; padding: 7px 14px; }
.demo-search svg { width: 15px; height: 15px; }
.demo-play { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--d-line); background: var(--d-win); color: var(--d-ink); display: grid; place-items: center; cursor: pointer; }
.demo-play:hover { border-color: var(--d-accent); }
.demo-ic-pause, .demo-ic-play { display: block; }
.demo-ic-pause { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.demo-ic-play { width: 0; height: 0; margin-left: 2px; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.demo-play[aria-pressed='true'] .demo-ic-play, .demo-play[aria-pressed='false'] .demo-ic-pause { display: none; }

.demo-screen { position: relative; }
/* Every app gets the same screen height, so the demo never jumps as it moves between apps */
.demo-panel { display: none; height: var(--screen-h); overflow: hidden; padding: 0; font-size: 0.86rem; color: var(--d-ink); } /* they are <section>s: drop the site's section padding */
#demo-mail:checked ~ .demo-shell #p-mail,
#demo-cal:checked ~ .demo-shell #p-cal,
#demo-meet:checked ~ .demo-shell #p-meet,
#demo-docs:checked ~ .demo-shell #p-docs,
#demo-contacts:checked ~ .demo-shell #p-contacts { display: grid; }

/* Shared avatars */
.dav { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.02em; }
.dav.a1 { background: #00427c; } .dav.a2 { background: #6d28d9; } .dav.a3 { background: #0e7490; } .dav.a4 { background: #b45309; } .dav.a5 { background: #be185d; } .dav.a6 { background: #15803d; }
.dav.big { width: 64px; height: 64px; font-size: 1.1rem; }

/* ---- Mail ---- */
.dp-mail { grid-template-columns: 148px minmax(0, 1fr) minmax(0, 1.25fr); }
.dm-side { border-right: 1px solid var(--d-line); padding: 14px 12px; background: var(--d-soft); }
.dm-acct { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--d-ink); margin-bottom: 14px; white-space: nowrap; overflow: hidden; }
.dm-acct .dav { width: 24px; height: 24px; font-size: 0.6rem; }
.dm-acct b { overflow: hidden; text-overflow: ellipsis; font-size: 0.72rem; }
.dm-side ul { list-style: none; margin: 0; padding: 0; }
.dm-side li { display: flex; justify-content: space-between; align-items: center; padding: 6px 9px; border-radius: 7px; color: var(--d-muted); font-weight: 550; }
.dm-side li.on { background: var(--d-sel); color: var(--d-accent); font-weight: 700; }
.dm-side li span { font-size: 0.7rem; background: var(--d-accent); color: #fff; border-radius: 999px; padding: 0 6px; }
.dm-grp { display: block; margin: 14px 9px 6px; font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--d-muted); }
.dm-list { list-style: none; margin: 0; padding: 8px; border-right: 1px solid var(--d-line); overflow: hidden; }
.dmsg { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px; border-radius: 10px; margin: 0; }
.dmsg > div { min-width: 0; }
.dmsg b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dmsg.unread .dm-sub, .dmsg.sel .dm-sub { color: var(--d-ink); font-weight: 600; }
.dm-snip { display: block; color: var(--d-muted); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dmsg time { color: var(--d-muted); font-size: 0.72rem; }
.dmsg.sel { background: var(--d-sel); }
.dmsg.unread b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--d-accent2); margin-right: 6px; vertical-align: middle; }
.dm-read { padding: 18px 20px; overflow: hidden; }
.dm-read h4 { font-size: 1.05rem; margin: 0 0 12px; color: var(--d-ink); }
.dm-from { display: flex; align-items: center; gap: 10px; font-size: 0.76rem; color: var(--d-muted); padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--d-line); }
.dm-from b { color: var(--d-ink); }
.dm-from div > span { display: block; }
.dm-read p { margin: 0 0 10px; line-height: 1.5; }
.dm-reply { margin-top: 14px; border: 1px solid var(--d-line); border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; background: var(--d-soft); }
.dm-caret { flex: 1; white-space: nowrap; overflow: hidden; border-right: 2px solid transparent; }
.dm-send { flex: none; margin-left: auto; /* stays put while the reply types out */ display: inline-flex; align-items: center; gap: 6px; background: var(--d-accent); color: #fff; font-weight: 600; font-size: 0.78rem; padding: 7px 13px; border-radius: 8px; }
.dm-send svg { width: 14px; height: 14px; }

/* ---- Calendar ---- */
.dp-cal { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0; }
.dc-day { position: relative; padding: 16px 18px; border-right: 1px solid var(--d-line); }
.dc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.dc-head b { font-size: 0.98rem; }
.dc-head span { color: var(--d-muted); font-size: 0.76rem; }
.dc-hours { list-style: none; margin: 0; padding: 0; }
.dc-hours li { height: 44px; border-top: 1px solid var(--d-line); position: relative; }
.dc-hours li span { position: absolute; left: 0; top: -8px; font-size: 0.68rem; color: var(--d-muted); width: 18px; }
.dc-ev { position: absolute; left: 44px; right: 18px; border-radius: 8px; padding: 6px 11px; color: #fff; font-size: 0.76rem; line-height: 1.25; box-shadow: 0 6px 16px -8px rgba(8, 25, 48, 0.4); }
.dc-ev b { display: block; font-weight: 600; }
.dc-ev span { opacity: 0.85; font-size: 0.68rem; }
.dc-ev.e1 { top: 52px; height: 42px; background: #0e7490; }
.dc-ev.e2 { top: 140px; height: 42px; background: #6d28d9; }
.dc-ev.e3 { top: 320px; height: 42px; background: var(--d-accent); }
.dc-new { padding: 20px; }
.dc-tag { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--d-accent); background: var(--d-sel); border-radius: 999px; padding: 3px 10px; }
.dc-new h4 { font-size: 1.1rem; margin: 12px 0 10px; }
.dc-when { color: var(--d-muted); display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.dc-when svg { width: 16px; height: 16px; }
.dc-ppl { display: flex; align-items: center; margin: 0 0 16px; }
.dc-ppl .dav { width: 28px; height: 28px; font-size: 0.62rem; margin-right: -8px; box-shadow: 0 0 0 2px var(--d-win); }
.dc-ppl > span:not(.dav) { margin-left: 16px; color: var(--d-muted); font-size: 0.78rem; }
.dc-link { border: 1px solid var(--d-line); border-radius: 10px; padding: 12px 14px; }
.dc-link-row { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dc-link-row svg { width: 17px; height: 17px; color: var(--d-accent); }
.dc-toggle { margin-left: auto; width: 38px; height: 22px; border-radius: 999px; background: #cfd8e3; position: relative; transition: background 0.3s; }
.dc-toggle i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.dc-link-url { display: block; margin-top: 10px; font-size: 0.74rem; color: var(--d-accent); opacity: 0; }
.dc-save { display: inline-block; margin-top: 16px; background: var(--d-accent); color: #fff; font-weight: 600; font-size: 0.8rem; padding: 8px 18px; border-radius: 8px; }

/* ---- Meet (video) ---- */
.dp-meet { position: relative; background: #0d1219; padding: 14px 16px; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.dv-top { display: flex; justify-content: space-between; align-items: center; color: #e8edf3; margin-bottom: 12px; }
.dv-top b { font-weight: 600; }
.dv-live { display: inline-flex; align-items: center; gap: 7px; font-size: 0.78rem; color: #cbd5e1; }
.dv-live i { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.dv-clock { font-variant-numeric: tabular-nums; }
.dv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 1fr 1fr; gap: 10px; min-height: 0; } /* 8 callers: near-square tiles */
.dv-tile { position: relative; min-height: 0; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(160deg, #1e293b, #0f172a); overflow: hidden; }
.dv-tile .dav { width: 46px; height: 46px; font-size: 0.95rem; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08); }
.dv-name { position: absolute; left: 10px; bottom: 8px; font-size: 0.72rem; color: #e8edf3; background: rgba(0, 0, 0, 0.45); padding: 2px 8px; border-radius: 6px; }
.dv-mic { position: absolute; right: 10px; bottom: 8px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); }
.dv-mic.off { background: #ef4444; }
.dv-tile.t3 { outline: 2px solid #22c55e; outline-offset: -2px; }
.dv-speaking { position: absolute; inset: 0; border-radius: 12px; box-shadow: inset 0 0 0 2px #22c55e; }
.dv-bar { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.dv-ctrl { position: relative; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #e8edf3; display: grid; place-items: center; }
.dv-ctrl svg { width: 19px; height: 19px; }
.dv-ctrl.leave { background: #ef4444; color: #fff; }
.dv-ctrl.leave svg { transform: rotate(135deg); }
.dv-count { position: absolute; top: -3px; right: -3px; background: var(--d-accent2); color: #fff; font-size: 0.6rem; font-weight: 700; font-style: normal; min-width: 16px; height: 16px; border-radius: 999px; display: grid; place-items: center; padding: 0 3px; }
.dv-note { display: block; text-align: center; color: #94a3b8; font-size: 0.72rem; margin-top: 8px; }

/* ---- Files ---- */
.dp-files { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.df-list { border-right: 1px solid var(--d-line); padding: 12px; overflow: hidden; }
.df-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 10px; }
.df-head b { font-size: 0.9rem; color: var(--d-ink); }
.df-up { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 600; color: var(--d-accent); }
.df-up svg { width: 14px; height: 14px; }
.df-list ul { list-style: none; margin: 0; padding: 0; }
.df-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; }
.df-item.on { background: var(--d-sel); }
.df-item > div { min-width: 0; }
.df-item b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.df-item div > span { display: block; color: var(--d-muted); font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.df-ic { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.6rem; letter-spacing: 0.03em; }
.df-ic.doc { background: #1d4ed8; } .df-ic.xls { background: #15803d; } .df-ic.ppt { background: #c2410c; } .df-ic.pdf { background: #b91c1c; } .df-ic.img { background: #7c3aed; }
.df-doc { display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--d-soft); min-width: 0; overflow: hidden; }
.dd-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--d-win); border-bottom: 1px solid var(--d-line); }
.dd-tools { display: inline-flex; align-items: center; gap: 12px; color: var(--d-ink); font-size: 0.86rem; }
.dd-tools b, .dd-tools i, .dd-tools u { font-style: normal; font-weight: 700; }
.dd-tools i { font-style: italic; } .dd-tools u { text-decoration: underline; }
.dd-sep { width: 1px; height: 16px; background: var(--d-line); }
.dd-saved { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--d-ok); font-weight: 600; }
.dd-saved svg { width: 14px; height: 14px; }
.dd-page { background: var(--d-win); margin: 18px; border: 1px solid var(--d-line); border-radius: 8px; box-shadow: 0 10px 30px -18px rgba(8, 25, 48, 0.3); padding: 24px 30px; }
.dd-page h3 { font-size: 1.3rem; margin: 0 0 4px; color: var(--d-ink); }
.dd-meta { color: var(--d-muted); font-size: 0.74rem; margin: 0 0 16px; }
.dd-page p { line-height: 1.55; margin: 0 0 10px; }
.dd-h { font-weight: 700; color: var(--d-ink); margin-top: 16px; }
.dd-ul { margin: 0; padding-left: 18px; }
.dd-ul li { margin: 4px 0; line-height: 1.5; }
.dd-type { border-right: 2px solid transparent; }
.dd-cursor2 { position: relative; display: inline-block; width: 2px; height: 1em; vertical-align: text-bottom; background: #be185d; margin-left: 1px; }
.dd-cursor2 i { position: absolute; top: -18px; left: 0; background: #be185d; color: #fff; font-size: 0.62rem; font-style: normal; padding: 1px 6px; border-radius: 4px 4px 4px 0; white-space: nowrap; }

/* ---- Contacts ---- */
.dp-contacts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.dk-list { border-right: 1px solid var(--d-line); padding: 12px; }
.dk-search { display: flex; align-items: center; gap: 8px; color: var(--d-muted); font-size: 0.8rem; background: var(--d-soft); border: 1px solid var(--d-line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.dk-search svg { width: 15px; height: 15px; }
.dk-list ul { list-style: none; margin: 0; padding: 0; }
.dk-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; }
.dk-list li.on { background: var(--d-sel); }
.dk-list li b { display: block; font-weight: 600; }
.dk-list li div > span { color: var(--d-muted); font-size: 0.76rem; }
.dk-card { padding: 28px 24px; text-align: center; }
.dk-card .dav.big { margin: 0 auto 14px; }
.dk-card h4 { font-size: 1.2rem; margin: 0 0 4px; }
.dk-role { color: var(--d-muted); margin: 0 0 20px; }
.dk-card dl { text-align: left; max-width: 280px; margin: 0 auto 22px; display: grid; gap: 12px; }
.dk-card dl div { display: flex; align-items: center; gap: 12px; color: var(--d-ink); }
.dk-card dl svg { width: 17px; height: 17px; color: var(--d-accent); flex: none; }
.dk-actions { display: flex; justify-content: center; gap: 10px; }
.dk-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--d-accent); color: #fff; font-weight: 600; font-size: 0.82rem; padding: 9px 16px; border-radius: 9px; }
.dk-btn svg { width: 15px; height: 15px; }
.dk-btn.ghost { background: var(--d-win); color: var(--d-ink); border: 1px solid var(--d-line); }

/* ---------- Animations (play when a screen is shown; pause when the demo is paused) ---------- */
.demo.paused .demo-panel *, .demo.paused .demo-prog { animation-play-state: paused !important; }

@keyframes d-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes d-drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes d-pop { 0% { opacity: 0; transform: scale(0.8); } 60% { opacity: 1; transform: scale(1.04); } 100% { opacity: 1; transform: scale(1); } }
@keyframes d-type { from { max-width: 0; } to { max-width: 100%; } }
@keyframes d-caret { 0%, 100% { border-color: var(--d-accent2); } 50% { border-color: transparent; } }
@keyframes d-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes d-toggle-on { to { background: var(--d-ok); } }
@keyframes d-knob { to { transform: translateX(16px); } }
@keyframes d-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes d-ring { 0%, 100% { box-shadow: inset 0 0 0 2px #22c55e; } 50% { box-shadow: inset 0 0 0 4px rgba(34, 197, 94, 0.6); } }

/* Mail: list slides in, the new message drops, the reply types itself */
.dp-mail .dmsg { opacity: 0; animation: d-rise 0.33s ease both; }
.dp-mail .dmsg:nth-child(1) { animation-name: d-drop; animation-delay: 0.33s; }
.dp-mail .dmsg:nth-child(2) { animation-delay: 0.07s; }
.dp-mail .dmsg:nth-child(3) { animation-delay: 0.13s; }
.dp-mail .dmsg:nth-child(4) { animation-delay: 0.2s; }
.dp-mail .dmsg:nth-child(5) { animation-delay: 0.27s; }
.dp-mail .dm-read > * { opacity: 0; animation: d-fade 0.33s ease 0.33s both; }
.dp-mail .dm-caret { max-width: 0; animation: d-type 1.6s steps(42) 0.73s both, d-caret 0.47s step-end 0.73s 5; }

/* Calendar: the new event drops in and the meeting link switches on */
.dp-cal .dc-drop { opacity: 0; animation: d-drop 0.4s ease 0.27s both; }
.dp-cal .dc-new > * { opacity: 0; animation: d-rise 0.33s ease both; }
.dp-cal .dc-new .dc-tag { animation-delay: 0.07s; }
.dp-cal .dc-new h4 { animation-delay: 0.13s; }
.dp-cal .dc-when { animation-delay: 0.2s; }
.dp-cal .dc-ppl { animation-delay: 0.27s; }
.dp-cal .dc-link { animation-delay: 0.33s; }
.dp-cal .dc-save { animation-delay: 0.4s; }
.dp-cal .dc-toggle { animation: d-toggle-on 0.2s ease 1.47s both; }
.dp-cal .dc-toggle i { animation: d-knob 0.2s ease 1.47s both; }
.dp-cal .dc-link-url { animation: d-fade 0.33s ease 1.73s both; }

/* Meet: tiles settle, a fourth person joins, the speaker ring pulses */
.dp-meet .dv-tile { opacity: 0; animation: d-pop 0.33s ease both; }
.dp-meet .dv-tile.t1 { animation-delay: 0.07s; }
.dp-meet .dv-tile.t2 { animation-delay: 0.13s; }
.dp-meet .dv-tile.t3 { animation-delay: 0.2s; }
.dp-meet .dv-tile.t4 { animation-delay: 0.27s; }
.dp-meet .dv-tile.t5 { animation-delay: 0.33s; }
.dp-meet .dv-tile.t6 { animation-delay: 0.4s; }
.dp-meet .dv-tile.t7 { animation-delay: 0.47s; }
.dp-meet .dv-tile.dv-join { animation-delay: 1.6s; }
.dp-meet .dv-speaking { animation: d-ring 1.07s ease-in-out 0.53s infinite; }
.dp-meet .dv-bar, .dp-meet .dv-note { opacity: 0; animation: d-fade 0.33s ease 0.33s both; }

/* Files: the list slides in, the open document types its line, the collaborator cursor blinks */
.dp-files .df-item { opacity: 0; animation: d-rise 0.3s ease both; }
.dp-files .df-item:nth-child(2) { animation-delay: 0.05s; }
.dp-files .df-item:nth-child(3) { animation-delay: 0.09s; }
.dp-files .df-item:nth-child(4) { animation-delay: 0.14s; }
.dp-files .df-item:nth-child(5) { animation-delay: 0.19s; }
.dp-files .df-item:nth-child(6) { animation-delay: 0.23s; }
.dp-files .dd-page > * { opacity: 0; animation: d-rise 0.33s ease 0.2s both; }
.dp-files .dd-page > :nth-child(2) { animation-delay: 0.27s; }
.dp-files .dd-page > :nth-child(3) { animation-delay: 0.33s; }
.dp-files .dd-page > :nth-child(4) { animation-delay: 0.4s; }
.dp-files .dd-page > :nth-child(5) { animation-delay: 0.47s; }
.dp-files .dd-type { display: inline-block; max-width: 0; overflow: hidden; white-space: nowrap; vertical-align: bottom; animation: d-type 1.47s steps(38) 0.8s both, d-caret 0.47s step-end 0.8s 4; }
.dp-files .dd-cursor2 { animation: d-blink 0.67s step-end 0.87s infinite; }

/* Contacts: list and card ease in */
.dp-contacts .dk-list li { opacity: 0; animation: d-rise 0.3s ease both; }
.dp-contacts .dk-list li:nth-child(2) { animation-delay: 0.05s; }
.dp-contacts .dk-list li:nth-child(3) { animation-delay: 0.11s; }
.dp-contacts .dk-list li:nth-child(4) { animation-delay: 0.16s; }
.dp-contacts .dk-list li:nth-child(5) { animation-delay: 0.21s; }
.dp-contacts .dk-list li:nth-child(6) { animation-delay: 0.27s; }
.dp-contacts .dk-card > * { opacity: 0; animation: d-rise 0.33s ease 0.2s both; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .demo-shell { grid-template-columns: 1fr; }
  /* The rail becomes a strip of apps across the top */
  .demo-rail { flex-direction: row; align-items: center; gap: 4px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--d-line); overflow-x: auto; }
  .demo-brand { display: none; }
  .demo-apps { flex-direction: row; gap: 4px; }
  .demo-app { flex-direction: column; gap: 4px; padding: 8px 12px; font-size: 0.78rem; white-space: nowrap; }
  .demo-you { display: none; }
  .dp-mail { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .dm-side { display: none; }
}
@media (max-width: 600px) {
  .demo-app-name { display: none; }
  .demo-search { display: none; }
  .demo { --screen-h: 500px; }
  .dp-mail { grid-template-columns: 1fr; }
  .dp-mail .dm-list { display: none; }
  .dp-cal, .dp-contacts { grid-template-columns: 1fr; }
  .dp-cal .dc-day { display: none; }
  .dk-list { display: none; }
  .dv-grid { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 1fr); }
  .dv-tile .dav { width: 34px; height: 34px; font-size: 0.7rem; margin-bottom: 18px; }
  .dp-files { grid-template-columns: 1fr; }
  .df-list { display: none; }
  .dd-page { margin: 14px; padding: 20px; }
}

/* No motion: show every screen settled, no auto-play, no progress underline */
@media (prefers-reduced-motion: reduce) {
  .demo-panel *, .demo-prog { animation: none !important; }
  .dp-mail .dmsg, .dp-mail .dm-read > *, .dp-cal .dc-new > *, .dp-cal .dc-drop, .dp-meet .dv-tile, .dp-meet .dv-bar, .dp-meet .dv-note, .dp-files .df-item, .dp-files .dd-page > *, .dp-contacts .dk-list li, .dp-contacts .dk-card > * { opacity: 1; }
  .dm-caret, .dd-type { max-width: 100%; }
  .dc-toggle { background: var(--d-ok); } .dc-toggle i { transform: translateX(16px); } .dc-link-url { opacity: 1; }
  .demo-prog { transform: none; opacity: 0; }
}
