/* ------------------------------------------------------------------------
   Try it: the click-around demo (#try). Loaded after styles.css.
   It reuses the site's Finder (.finder, .fs, .ftb, .cap, .grid, .it, .ib,
   .fpath, .fstatus, .lights, .player, .pctl, .copy, .cbar) and adds what
   clicking needs: selection, drop targets, menus, the strip of drives at
   home, and the Studio Mac's share-link picker, alerts and menu. Everything on the laptop's screen is sized in --u,
   one Finder point; the desktop is 940 points wide and scales with its
   column. demo.js only sets classes, data attributes and custom properties.
   ------------------------------------------------------------------------ */

.demo { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(1.5rem, 3.5vw, 3rem); align-items: start; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.demo-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.demo button:focus-visible { outline: 2px solid var(--brand-tint); outline-offset: 2px; }

/* The checklist */
.demo-guide { position: sticky; top: 5.5rem; }
.demo-kick { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 0.6rem; font-size: 0.8125rem; color: var(--ink-3); }
.demo-kick b { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.demo-steps { list-style: none; margin: 0; padding: 0; }
.demo-steps li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: 0.85rem; padding: 0.95rem 0; border-top: 1px solid var(--line); }
.ds-n { position: relative; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 1px solid color-mix(in srgb, var(--brand-tint) 55%, transparent); border-radius: 50%; font-size: 0.8125rem; font-weight: 600; color: var(--brand-tint); transition: background 0.2s, border-color 0.2s, box-shadow 0.2s; }
.ds-n svg { position: absolute; width: 1rem; height: 1rem; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.demo-steps .now .ds-n { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 28%, transparent); }
.demo-steps .done .ds-n { background: var(--brand); border-color: var(--brand); color: transparent; }
.demo-steps .done .ds-n svg { opacity: 1; }
.demo-steps b { display: block; font-size: 1rem; font-weight: 600; letter-spacing: -0.015em; color: var(--ink-2); }
.demo-steps .now b { color: var(--ink); }
.ds-hint { display: none; margin: 0.3rem 0 0; font-size: 0.875rem; line-height: 1.45; color: var(--ink-2); }
.demo-steps .now .ds-hint { display: block; }
.ds-hint em { font-style: normal; font-weight: 500; color: var(--ink); }
.ds-link { padding: 0; border: 0; background: none; font: inherit; font-weight: 500; color: var(--brand-tint); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.t-touch { display: none; }
@media (hover: none) { .t-mouse { display: none; } .t-touch { display: inline; } }
.demo-done { padding: 1rem 0 0.25rem; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink-2); }
.demo-done b { display: block; font-size: 1rem; color: var(--ink); }
.demo-done p { margin: 0.2rem 0 0.9rem; }
.demo-reset { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1rem; padding: 0.45rem 0.9rem; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; font: 500 0.8125rem/1 var(--sans); color: var(--ink-2); cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.demo-reset svg { width: 0.9rem; height: 0.9rem; }
.demo-reset:hover { color: var(--ink); border-color: var(--mark); }

/* The desktop. --u is one point: the screen is 940 points wide. */
.demo-stage { display: grid; gap: 12px; min-width: 0; }
.demo-desk {
  --u: calc(100cqw / 940);
  container-type: inline-size;
  position: relative;
  aspect-ratio: 940 / 580;
  overflow: hidden;
  border-radius: 18px;
  /* A desktop picture drawn for this page (media/wallpaper.svg). */
  background: #0b2747 url(/media/wallpaper.svg) center / cover no-repeat;
  box-shadow: 0 0 0 1px var(--line-2), 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  cursor: default;
}
.dm-screen { position: absolute; inset: 0; font: 400 calc(13 * var(--u)) / 1.25 var(--sans); letter-spacing: -0.006em; color: #f5f5f5; }
.dm-screen svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.dm-screen button:focus-visible { outline: 2px solid #0a84ff; outline-offset: 1px; }
.demo-desk .finder { --u: inherit; }

/* Menu bar: clear over the desktop picture, as in current macOS. */
.dm-bar { position: absolute; z-index: 40; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; height: calc(24 * var(--u)); padding: 0 calc(14 * var(--u)); color: #fff; text-shadow: 0 0 calc(6 * var(--u)) rgba(0, 0, 0, 0.35); white-space: nowrap; }
.dm-bar > span, .dm-menus { display: flex; align-items: center; gap: calc(18 * var(--u)); }
.dm-bar .dm-status { gap: calc(13 * var(--u)); }
.dm-menus i { font-style: normal; }
.dm-bar svg { width: calc(15 * var(--u)); height: calc(15 * var(--u)); filter: drop-shadow(0 0 calc(3 * var(--u)) rgba(0, 0, 0, 0.3)); }
.dm-bar .dm-mx { width: calc(19 * var(--u)); height: calc(19 * var(--u)); --logo-l: currentColor; }
.dm-bar .dm-batt { width: calc(25 * var(--u)); height: calc(17 * var(--u)); }
.dm-bar b { font-weight: 700; }

/* Windows */
.dw { position: absolute; left: 0; top: 0; z-index: var(--z, 1); translate: calc(var(--x, 0) * var(--u)) calc(var(--y, 0) * var(--u)); }
.dw[hidden] { display: none; }
.dw-main { width: calc(640 * var(--u)); height: calc(440 * var(--u)); }
.dw .fm { min-height: 0; }
.dw .dg { position: relative; flex: 1; min-height: 0; overflow: hidden auto; outline: none; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
.dw .ftitle { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dw .ftb-right { flex: none; }

/* A window that isn't in front: grey lights, grey selection. */
.dw:not(.key) .lights i, .dw:not(.key) .lights .lc { background: #4c4c4f; box-shadow: none; }
.dw:not(.key) .ftitle { color: #98989c; }

/* The close light is a real button. */
.lights .lc { flex: none; width: calc(13 * var(--u)); height: calc(13 * var(--u)); padding: 0; border: 0; border-radius: 50%; background: linear-gradient(180deg, #f7948d 0%, #f55a4d 18%, #f2574a 52%, #ef6a61 84%, #ed817a 100%); box-shadow: inset 0 0 0 calc(0.5 * var(--u)) rgba(0, 0, 0, 0.28); cursor: default; }
.lights .lc:hover { background: radial-gradient(circle, #7a1b14 0 18%, transparent 20%), linear-gradient(180deg, #f7948d 0%, #f55a4d 18%, #f2574a 52%, #ef6a61 84%, #ed817a 100%); }

/* Sidebar rows hold a button (and an eject button). */
.dw .fs > .si { padding: 0; }
.dw .fs > .si:hover { background: rgba(255, 255, 255, 0.05); }
.dw .fs > .si.on { background: #47474a; }
.sb { display: flex; align-items: center; gap: calc(7 * var(--u)); flex: 1; min-width: 0; height: 100%; padding: 0 calc(8 * var(--u)) 0 calc(7 * var(--u)); border: 0; border-radius: inherit; background: none; font: inherit; color: inherit; text-align: left; white-space: nowrap; cursor: default; }
.dm-screen .sb:focus-visible { outline: 0; box-shadow: inset 0 0 0 calc(2 * var(--u)) #0a84ff; }
.sb.drop-on { background: #0a63d6; color: #fff; }
.dw .fs .sb.drop-on svg { color: #fff; }
.ej { display: grid; place-items: center; flex: none; width: calc(22 * var(--u)); height: calc(22 * var(--u)); margin-right: calc(3 * var(--u)); padding: 0; border: 0; border-radius: 50%; background: none; color: #a9a9ad; cursor: default; }
.ej:hover { background: rgba(255, 255, 255, 0.12); }
.dw .fs .ej .eject { margin: 0; }
.dw .fs svg.ms, .dm-screen svg.ms, .demo-home svg.ms { color: var(--logo); }
.demo[data-studio="off"] .si-studio { display: none; }

/* Toolbar buttons inside the site's capsules. */
.dw .cap.nav, .dw .cap.acts { width: auto; padding: 0 calc(3 * var(--u)); }
.dw .cap .cb { display: inline-grid; place-items: center; width: calc(31 * var(--u)); height: calc(26 * var(--u)); padding: 0; border: 0; border-radius: 999px; background: none; color: inherit; cursor: default; }
.dw .cap .cb svg { margin: 0; }
.dw .cap .cb:hover, .dw .cap .cb.on { background: rgba(255, 255, 255, 0.12); }
.dw .cap .cb:active { background: rgba(255, 255, 255, 0.2); }
.dw .cap .cb[aria-disabled="true"] { color: #8a8a8e; }
.dw .cap .cb[aria-disabled="true"]:hover { background: none; }
.dw .cap.round { width: calc(32 * var(--u)); padding: 0; justify-content: center; }
.dw .cap.round svg { margin: 0; }
button.cap { padding: 0 calc(14 * var(--u)); border: 0; font: inherit; font-weight: 500; color: #f2f2f2; white-space: nowrap; cursor: default; }
button.cap:hover { background: #4e4e51; }
button.cap:active { background: #5a5a5e; }
button.cap:disabled { color: #8a8a8e; background: #434345; }
.dm-open { display: none; }
@media (hover: none) { .dw-main .dm-open { display: inline-flex; } .dw-main .cap.views { display: none; } }

/* Icons: Finder's grey box behind a selected icon and blue pill on its name. */
.dw .ib { position: relative; border-radius: calc(6 * var(--u)); }
.dw .it:hover .ib { background: rgba(255, 255, 255, 0.05); }
.dw .it.sel .ib { background: rgba(255, 255, 255, 0.15); }
.dw .it.sel span { background: #0a63d6; color: #fff; }
.dw:not(.key) .it.sel span { background: #4c4c4f; }
.dw .dg:focus-visible .it.cur .ib { box-shadow: 0 0 0 calc(2 * var(--u)) #0a84ff; }
.dw .dg:focus-visible:not(:has(.cur)) { box-shadow: inset 0 0 0 calc(2 * var(--u)) rgba(10, 132, 255, 0.7); }
.dw .it small { display: block; margin-top: calc(1 * var(--u)); font-size: calc(10.5 * var(--u)); line-height: 1.2; color: #5aa7ff; }
.dw .it .vt { pointer-events: none; }
.dg-empty { grid-column: 1 / -1; margin: calc(60 * var(--u)) calc(20 * var(--u)) 0; font-size: calc(12 * var(--u)); text-align: center; color: rgba(255, 255, 255, 0.45); }

/* A copy in progress: dimmed, with a bar under the icon. */
.it.pending .ib > :first-child { opacity: 0.4; }
.ip { position: absolute; left: calc(12 * var(--u)); right: calc(12 * var(--u)); bottom: calc(4 * var(--u)); height: calc(5 * var(--u)); overflow: hidden; border-radius: 999px; background: rgba(0, 0, 0, 0.6); box-shadow: 0 0 0 calc(0.75 * var(--u)) rgba(255, 255, 255, 0.4); }
.ip i { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); background: #0a84ff; }

/* Drop targets while dragging. */
.it.drop-on .ib { background: rgba(10, 132, 255, 0.42); }
.fm.drop-on::after { content: ""; position: absolute; z-index: 3; inset: calc(47 * var(--u)) calc(5 * var(--u)) calc(52 * var(--u)); border-radius: calc(10 * var(--u)); background: rgba(10, 132, 255, 0.08); box-shadow: inset 0 0 0 calc(2 * var(--u)) #0a84ff; pointer-events: none; }
.dm-band { position: absolute; z-index: 2; left: var(--l); top: var(--t); width: var(--w); height: var(--h); border: 1px solid rgba(255, 255, 255, 0.55); border-radius: calc(2 * var(--u)); background: rgba(255, 255, 255, 0.12); pointer-events: none; }
.dm-ghost { position: absolute; z-index: 95; left: 0; top: 0; width: calc(64 * var(--u)); height: calc(56 * var(--u)); pointer-events: none; translate: calc(var(--gx, 0px) - 32 * var(--u)) calc(var(--gy, 0px) - 28 * var(--u)); }
.dm-ghost > span { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0.85; }
.dm-ghost > span:nth-child(2) { transform: translate(calc(5 * var(--u)), calc(-4 * var(--u))) rotate(5deg); }
.dm-ghost > span:nth-child(3) { transform: translate(calc(-5 * var(--u)), calc(-6 * var(--u))) rotate(-5deg); }
.dm-ghost b { position: absolute; z-index: 1; right: calc(-6 * var(--u)); top: calc(-6 * var(--u)); display: grid; place-items: center; min-width: calc(18 * var(--u)); height: calc(18 * var(--u)); padding: 0 calc(4 * var(--u)); border-radius: 999px; background: #ff3b30; font-size: calc(11 * var(--u)); font-weight: 700; color: #fff; }
.dm-ghost em { position: absolute; z-index: 1; left: calc(36 * var(--u)); top: calc(34 * var(--u)); display: none; place-items: center; width: calc(18 * var(--u)); height: calc(18 * var(--u)); border-radius: 50%; background: #30d158; box-shadow: 0 0 0 calc(1.5 * var(--u)) #fff; font: 700 calc(15 * var(--u)) / 1 var(--sans); font-style: normal; color: #fff; }
.dm-ghost.ok em { display: grid; }
.dm-ghost.back { opacity: 0; transition: opacity 0.2s; }

/* Path bar segments are buttons and drop targets. Middle ones fold into
   "…" when the path is too long, and the last one ellipsizes. */
.dw .fpath { overflow: hidden; }
.fpath .pc { flex: none; gap: calc(6 * var(--u)); }
.fpath .pc:last-child { flex: 0 1 auto; min-width: calc(70 * var(--u)); overflow: hidden; }
.fpath .pc.gone { display: none; }
.fpath .pn { overflow: hidden; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.fpath .pc:last-child .ps { min-width: 0; max-width: 100%; }
.fpath .ps { display: inline-flex; align-items: center; gap: calc(5 * var(--u)); padding: calc(2 * var(--u)) calc(4 * var(--u)); margin: 0 calc(-4 * var(--u)); border: 0; border-radius: calc(5 * var(--u)); background: none; font: inherit; color: inherit; white-space: nowrap; cursor: default; }
.fpath .ps:hover { background: rgba(255, 255, 255, 0.08); }
.fpath .ps.drop-on { background: #0a63d6; color: #fff; }

/* Nudges toward the next step. */
.demo[data-next="open"] .dw-main:not([data-loc="studio"]) .si-studio,
.demo[data-next="open"] .dw-main[data-loc="studio"] .it[data-id="media"] .ib,
.demo[data-next="play"] .dw-main[data-loc="media"] .it[data-id="film"] .ib,
.demo[data-next="play"] .dw-main[data-loc="film"] .it[data-id="coast"] .ib { box-shadow: inset 0 0 0 calc(1.5 * var(--u)) rgba(143, 176, 255, 0.85); animation: dm-ring 1.8s ease-in-out infinite; }
.demo[data-next="copy"] .dw-main[data-loc="film"] .sb[data-go="downloads"] { box-shadow: inset 0 0 0 calc(1.5 * var(--u)) rgba(143, 176, 255, 0.85); animation: dm-ring 1.8s ease-in-out infinite; }
.demo[data-next="share"] .dh-mb { box-shadow: 0 0 0 1.5px rgba(143, 176, 255, 0.85); animation: dm-ring-o 1.8s ease-in-out infinite; }
@keyframes dm-ring-o { 50% { box-shadow: 0 0 0 1.5px rgba(143, 176, 255, 0.2); } }
@keyframes dm-ring { 50% { box-shadow: inset 0 0 0 calc(1.5 * var(--u)) rgba(143, 176, 255, 0.2); } }

/* QuickTime. The site's .player is a looping scene; here it's a window. */
.demo .dplayer { left: 0; top: 0; width: calc(600 * var(--u)); height: calc(338 * var(--u)); background: #000; animation: none; opacity: 0; transform: scale(0.94); transition: opacity 0.18s ease, transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); }
.demo .dplayer.open { opacity: 1; transform: none; }
.demo .dplayer:focus { outline: 0; }
.demo .dplayer:focus-visible { box-shadow: 0 0 0 2px #0a84ff, 0 calc(24 * var(--u)) calc(48 * var(--u)) rgba(0, 0, 0, 0.6); }
.demo .dplayer video, .dp-still { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.demo .dplayer:not([data-kind="video"]) video, .dplayer:not([data-kind="still"]) .dp-still { display: none; }
.dplayer.playing[data-kind="still"] .dp-still { animation: dm-pan 26s ease-in-out infinite alternate; }
@keyframes dm-pan { from { transform: scale(1.02); } to { transform: scale(1.14) translate(-2%, -1%); } }
.dp-audio { display: none; position: absolute; left: 50%; top: 44%; width: calc(96 * var(--u)); height: calc(96 * var(--u)); translate: -50% -50%; }
.dplayer[data-kind="audio"] { background: radial-gradient(circle at 50% 40%, #3a3a3e, #101012); }
.dplayer[data-kind="audio"] .dp-audio { display: block; }
.dplayer .ptitle { z-index: 2; height: calc(32 * var(--u)); font-size: calc(12 * var(--u)); }
.dp-src, .dp-sent { position: absolute; z-index: 2; left: calc(12 * var(--u)); margin: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; white-space: nowrap; }
.dp-src { top: calc(40 * var(--u)); display: flex; align-items: center; gap: calc(6 * var(--u)); padding: calc(4 * var(--u)) calc(10 * var(--u)) calc(4 * var(--u)) calc(8 * var(--u)); font-size: calc(11 * var(--u)); font-weight: 600; }
.dp-src i { width: calc(7 * var(--u)); height: calc(7 * var(--u)); border-radius: 50%; background: var(--brand-tint); box-shadow: 0 0 calc(6 * var(--u)) var(--brand-tint); }
.dplayer.playing[data-from="studio"] .dp-src i { animation: dm-blink 1.1s steps(2) infinite; }
.dplayer:not([data-from="studio"]) .dp-src i { background: #a9a9ad; box-shadow: none; }
.dp-sent { top: calc(66 * var(--u)); padding: calc(3 * var(--u)) calc(9 * var(--u)); font-size: calc(10.5 * var(--u)); font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.88); }
.dp-sent:empty { display: none; }
@keyframes dm-blink { 50% { opacity: 0.3; } }
.demo .dplayer .pctl { z-index: 2; width: calc(440 * var(--u)); }
.pp { display: grid; place-items: center; flex: none; width: calc(24 * var(--u)); height: calc(24 * var(--u)); margin-left: calc(-6 * var(--u)); padding: 0; border: 0; border-radius: 50%; background: none; color: #fff; cursor: default; }
.pp:hover { background: rgba(255, 255, 255, 0.15); }
.demo .dplayer .played { animation: none; width: calc(var(--t, 0) * 100%); }
.demo .dplayer .head { animation: none; left: calc(var(--t, 0) * 100%); }
.dplayer .track::before { content: ""; position: absolute; inset: calc(-9 * var(--u)) 0; }

/* Copy progress, Finder style. The site's .copy is a looping scene too. */
.demo .copy.dm-copy { z-index: 60; left: 50%; top: auto; bottom: calc(16 * var(--u)); display: grid; gap: calc(14 * var(--u)); width: calc(340 * var(--u)); translate: -50% 0; opacity: 1; animation: none; }
.demo .copy.dm-copy[hidden] { display: none; }
.cjob { position: relative; padding-right: calc(28 * var(--u)); }
.demo .copy .cbar i { width: calc(var(--p, 0) * 100%); animation: none; }
.cxb { position: absolute; right: 0; top: calc(-1 * var(--u)); display: grid; place-items: center; width: calc(18 * var(--u)); height: calc(18 * var(--u)); padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.75); cursor: default; }
.cxb:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }
.cxb svg { width: calc(12 * var(--u)); height: calc(12 * var(--u)); stroke-width: 1.8; }

/* Menus and panels: Liquid Glass. */
.dm-menu, .dh-menu, .dm-panel, .dm-alert { background: rgba(44, 44, 46, 0.95); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); box-shadow: inset 0 calc(0.5 * var(--u)) 0 rgba(255, 255, 255, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.6), 0 calc(16 * var(--u)) calc(36 * var(--u)) rgba(0, 0, 0, 0.5); }
.dm-menu[hidden], .dh-menu[hidden], .dm-away[hidden], .dm-panel[hidden], .dm-alert[hidden] { display: none; }
.dbtn { height: calc(24 * var(--u)); padding: 0 calc(13 * var(--u)); border: 0; border-radius: 999px; background: #5b5b5f; box-shadow: inset 0 calc(0.5 * var(--u)) 0 rgba(255, 255, 255, 0.2); font: inherit; font-size: calc(12.5 * var(--u)); font-weight: 500; color: #fff; white-space: nowrap; cursor: default; }
.dbtn:hover { background: #68686c; }
.dbtn.pri { background: #0a84ff; }
.dbtn.pri:hover { background: #2a95ff; }

/* On the Studio Mac: the screen dims, says whose screen this is, and
   shows the app's picker or alert. */
.dm-away { position: absolute; z-index: 72; inset: 0; display: grid; grid-template-rows: auto minmax(0, auto); align-content: center; justify-items: center; gap: calc(10 * var(--u)); padding: calc(34 * var(--u)) calc(16 * var(--u)) calc(16 * var(--u)); background: rgba(8, 10, 14, 0.74); }
.dm-away-k { margin: 0; font-size: calc(13 * var(--u)); font-weight: 600; color: rgba(255, 255, 255, 0.86); }
.dm-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; width: min(calc(560 * var(--u)), 100%); height: min(calc(420 * var(--u)), 100%); overflow: hidden; border-radius: calc(16 * var(--u)); background: rgba(38, 38, 40, 0.97); font-size: calc(12.5 * var(--u)); }
.pk-msg { margin: 0; padding: calc(12 * var(--u)) calc(18 * var(--u)) calc(10 * var(--u)); font-size: calc(12 * var(--u)); line-height: 1.4; text-align: center; color: rgba(255, 255, 255, 0.72); border-bottom: calc(0.5 * var(--u)) solid rgba(255, 255, 255, 0.09); }
.pk-main { display: grid; grid-template-columns: calc(150 * var(--u)) minmax(0, 1fr); min-height: 0; }
.pk-side { display: grid; align-content: start; gap: calc(2 * var(--u)); padding: calc(10 * var(--u)) calc(8 * var(--u)); background: rgba(255, 255, 255, 0.03); border-right: calc(0.5 * var(--u)) solid rgba(255, 255, 255, 0.07); }
.pk-side p { margin: 0 0 calc(4 * var(--u)) calc(6 * var(--u)); font-size: calc(11 * var(--u)); font-weight: 600; color: #8e8e93; }
.pk-loc { display: flex; align-items: center; gap: calc(7 * var(--u)); height: calc(26 * var(--u)); padding: 0 calc(7 * var(--u)); border: 0; border-radius: calc(7 * var(--u)); background: none; font: inherit; color: #f2f2f2; text-align: left; white-space: nowrap; cursor: default; }
.pk-loc svg { flex: none; width: calc(16 * var(--u)); height: calc(16 * var(--u)); color: #5aa7ff; stroke-width: 1.4; }
.pk-loc:hover { background: rgba(255, 255, 255, 0.06); }
.pk-loc.on { background: rgba(255, 255, 255, 0.12); }
.pk-list { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; }
.pk-bar { display: flex; align-items: center; gap: calc(8 * var(--u)); height: calc(36 * var(--u)); padding: 0 calc(10 * var(--u)); font-weight: 600; }
.pk-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-back { display: grid; place-items: center; width: calc(26 * var(--u)); height: calc(24 * var(--u)); padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #fff; cursor: default; }
.pk-back svg { width: calc(14 * var(--u)); height: calc(14 * var(--u)); stroke-width: 1.8; }
.pk-back:disabled { color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); }
.pk-rows { display: grid; align-content: start; overflow: hidden auto; padding: 0 calc(8 * var(--u)) calc(8 * var(--u)); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
.pk-row { display: grid; grid-template-columns: calc(26 * var(--u)) minmax(0, 1fr) auto; align-items: center; gap: calc(8 * var(--u)); height: calc(28 * var(--u)); padding: 0 calc(8 * var(--u)); border: 0; border-radius: calc(6 * var(--u)); background: none; font: inherit; color: #f2f2f2; text-align: left; cursor: default; }
.pk-row:nth-child(even) { background: rgba(255, 255, 255, 0.03); }
.pk-row.sel { background: #0a63d6; color: #fff; }
.pk-row img { width: calc(26 * var(--u)); height: calc(15 * var(--u)); object-fit: cover; border-radius: calc(2 * var(--u)); }
.pk-row .pk-f { width: calc(20 * var(--u)); height: calc(16 * var(--u)); justify-self: center; stroke: none; }
.pk-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-row small { font-size: calc(11 * var(--u)); color: rgba(255, 255, 255, 0.5); }
.pk-row.sel small { color: rgba(255, 255, 255, 0.85); }
.pk-acc { display: flex; align-items: center; justify-content: center; gap: calc(8 * var(--u)); padding: calc(10 * var(--u)); border-top: calc(0.5 * var(--u)) solid rgba(255, 255, 255, 0.09); color: rgba(255, 255, 255, 0.85); }
.pk-pop { display: inline-flex; align-items: center; gap: calc(6 * var(--u)); height: calc(22 * var(--u)); padding: 0 calc(6 * var(--u)) 0 calc(10 * var(--u)); border: 0; border-radius: calc(6 * var(--u)); background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 calc(0.5 * var(--u)) 0 rgba(255, 255, 255, 0.14); font: inherit; color: #fff; cursor: default; }
.pk-pop:hover { background: rgba(255, 255, 255, 0.18); }
.pk-pop svg { width: calc(12 * var(--u)); height: calc(12 * var(--u)); stroke-width: 1.8; }
.pk-foot { display: flex; justify-content: flex-end; gap: calc(8 * var(--u)); padding: 0 calc(14 * var(--u)) calc(14 * var(--u)); }

/* The app's alerts: icon on top, centred text, the default button on the right. */
.dm-alert { display: grid; justify-items: center; width: min(calc(270 * var(--u)), 100%); padding: calc(18 * var(--u)) calc(16 * var(--u)) calc(16 * var(--u)); border-radius: calc(18 * var(--u)); background: rgba(44, 44, 46, 0.97); text-align: center; }
.dm-screen .al-icon { width: calc(56 * var(--u)); height: calc(56 * var(--u)); stroke: none; }
.al-t { margin: calc(10 * var(--u)) 0 0; font-size: calc(13 * var(--u)); font-weight: 700; line-height: 1.3; }
.al-b p { margin: calc(6 * var(--u)) 0 0; font-size: calc(11 * var(--u)); line-height: 1.4; color: rgba(255, 255, 255, 0.85); }
.al-act { display: flex; flex-direction: row-reverse; gap: calc(8 * var(--u)); justify-self: stretch; margin-top: calc(14 * var(--u)); }
.al-act .dbtn { flex: 1; height: calc(28 * var(--u)); }

.dm-menu { position: absolute; z-index: 75; left: 0; top: 0; translate: var(--mx, 0) var(--my, 0); display: grid; min-width: calc(200 * var(--u)); padding: calc(5 * var(--u)); border-radius: calc(12 * var(--u)); }
.dm-menu button { display: flex; align-items: center; height: calc(24 * var(--u)); padding: 0 calc(10 * var(--u)); border: 0; border-radius: calc(7 * var(--u)); background: none; font: inherit; color: #f2f2f2; text-align: left; white-space: nowrap; cursor: default; }
.dm-menu button:hover, .dm-menu button:focus-visible { background: #0a63d6; color: #fff; outline: 0; }
.dm-menu hr { width: calc(100% - 20 * var(--u)); margin: calc(4 * var(--u)) auto; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }

/* Hints from the demo itself. Styled like the site, not like macOS, so
   nobody mistakes them for something the app shows. */
.dm-tip { position: absolute; z-index: 80; right: calc(14 * var(--u)); top: calc(36 * var(--u)); width: calc(250 * var(--u)); margin: 0; padding: 0.6rem 0.8rem; border-radius: 10px; background: #fff; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.55); font: 500 max(12px, calc(12.5 * var(--u))) / 1.4 var(--sans); color: #15171c; text-shadow: none; opacity: 0; translate: 0 calc(-6 * var(--u)); transition: opacity 0.2s, translate 0.25s; pointer-events: none; }
.dm-tip.show { opacity: 1; translate: 0 0; }

/* At home: the Studio Mac and its drives, with activity lights. */
.demo-home { display: grid; grid-template-columns: auto minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 0.5rem 1rem; padding: 0.85rem 1.1rem; border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); font-size: 0.8125rem; color: var(--ink-3); }
.dh-k { margin: 0; font-size: 0.8125rem; font-weight: 600; }
.dh-mac, .dh-drive { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.dh-mac svg { flex: none; width: 1.75rem; height: 1.75rem; fill: none; }
.dh-mac > div, .dh-drive > div { min-width: 0; }
.dh-drive span { white-space: nowrap; }
.dh-mac b, .dh-drive b { display: block; overflow: hidden; font-size: 0.875rem; font-weight: 600; color: var(--ink); white-space: nowrap; text-overflow: ellipsis; }
.dh-mac em, .dh-drive em { font-style: normal; }
.dh-mac em { display: block; }
.dh-re { flex: none; margin-left: auto; --u: 1px; }
.dh-mb { display: inline-flex; flex: none; align-items: center; gap: 0.3rem; justify-self: end; height: 2rem; padding: 0 0.45rem 0 0.55rem; border: 1px solid var(--line-2); border-radius: 8px; background: rgba(255, 255, 255, 0.04); font: 500 0.8125rem/1 var(--sans); color: var(--ink); white-space: nowrap; cursor: default; }
.dh-mb:hover, .dh-mb[aria-expanded="true"] { background: rgba(255, 255, 255, 0.09); }
.demo-home .dh-mb svg { width: 1.2rem; height: 1.2rem; fill: none; }
.demo-home .dh-mb .dh-chev { width: 0.8rem; height: 0.8rem; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--ink-3); }
.demo-stage { position: relative; }
.dh-menu { --u: 1px; position: absolute; z-index: 30; left: 0; top: 0; translate: var(--hx, 0) var(--hy, 0); display: grid; min-width: 250px; padding: 5px; border-radius: 12px; font: 400 13px/1.25 var(--sans); color: #f2f2f2; }
.dh-sub { z-index: 31; min-width: 170px; }
.dh-menu button { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 24px; padding: 0 10px; border: 0; border-radius: 7px; background: none; font: inherit; color: inherit; text-align: left; white-space: nowrap; cursor: default; }
.dh-menu button.off { color: #8e8e93; }
.dh-menu button:not(.off):hover, .dh-menu button:not(.off):focus-visible, .dh-menu button[aria-expanded="true"] { background: #0a63d6; color: #fff; outline: 0; }
.dh-menu button svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dh-menu hr { width: calc(100% - 20px); margin: 4px auto; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.demo[data-studio="on"] .dh-re { display: none; }
.dh-drive { position: relative; padding-left: 1rem; border-left: 1px solid var(--line); }
.dh-led { flex: none; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--brand-tint) 35%, #23262c); }
.dh-drive[data-state="stream"] .dh-led, .dh-drive[data-state="read"] .dh-led { background: var(--brand-tint); box-shadow: 0 0 8px 1px var(--brand-tint); animation: dm-flick 0.26s steps(2) infinite; }
.dh-drive[data-state="stream"] em, .dh-drive[data-state="read"] em { color: var(--brand-tint); }
@keyframes dm-flick { 50% { opacity: 0.3; } }

/* Narrower: the checklist goes above the demo. */
@media (max-width: 60rem) {
  .demo { grid-template-columns: minmax(0, 1fr); }
  .demo-guide { position: static; }
  .demo-steps li { padding: 0.7rem 0; }
  .demo-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .demo-home .dh-mac { grid-column: 1 / 3; grid-row: 1; }
  .dh-mb { grid-column: 3; grid-row: 1; }
  .dh-k { display: none; }
  .dh-drive:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* Phone: the windows stack instead of floating, a little smaller. */
@media (max-width: 44rem) {
  .demo-desk { --u: min(1px, calc(100cqw / 380)); aspect-ratio: auto; border-radius: 14px; }
  .dm-screen { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: calc(500 * var(--u)); padding: calc(34 * var(--u)) 8px 12px; }
  .dm-menus, .dm-bar .dm-status > svg:not(.dm-batt) { display: none; }
  .dw { position: relative; translate: none; }
  .dw-main { width: auto; height: calc(440 * var(--u)); grid-template-columns: calc(132 * var(--u)) minmax(0, 1fr); }
  .dw .fs { padding-inline: calc(6 * var(--u)); }
  .dw .fs > span { font-size: calc(12 * var(--u)); }
  .dw .fs > span .sb { gap: calc(6 * var(--u)); padding-right: calc(4 * var(--u)); }
  .dw .dg { grid-template-columns: repeat(auto-fill, minmax(calc(84 * var(--u)), 1fr)); padding-left: 0; }
  .dw .cap.views, .dw .cap.search, .dw-main .ftitle { display: none; }
  .dw-main .dm-open { display: inline-flex; }
  .demo .dplayer { position: absolute; left: 8px; right: 8px; top: calc(30 * var(--u)); width: auto; height: auto; aspect-ratio: 16 / 9; }
  .demo .dplayer .pctl { width: calc(100% - 20 * var(--u)); }
  .dm-panel { height: calc(440 * var(--u)); }
  .pk-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .pk-side { grid-auto-flow: column; justify-content: start; gap: calc(4 * var(--u)); padding: calc(6 * var(--u)); border-right: 0; border-bottom: calc(0.5 * var(--u)) solid rgba(255, 255, 255, 0.07); overflow-x: auto; }
  .pk-side p { display: none; }
  .dm-away { align-content: start; padding-top: calc(36 * var(--u)); }
  .demo .copy.dm-copy { left: 8px; right: 8px; bottom: 8px; width: auto; translate: none; }
  .dm-screen:has(.cjob) { padding-bottom: calc(96 * var(--u)); }
  .dm-tip { left: 8px; right: 8px; top: calc(30 * var(--u)); width: auto; }
  .demo-home { gap: 0.6rem 0.75rem; padding: 0.75rem 0.85rem; }
  .dh-drive { padding-left: 0.6rem; gap: 0.45rem; }
  .dh-drive b { font-size: 0.8125rem; white-space: normal; }
  .dh-drive span { white-space: normal; }
  .dh-drive span { font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .demo .dplayer, .dm-tip, .dm-ghost.back { transition: none; }
  .demo .dplayer { transform: none; }
}
