/* ==========================================================================
   Piper OS — app contents
   ========================================================================== */
.appicon .g2 { opacity: 0.62; }
[data-material="flat"] .appicon svg g { fill: var(--tint); }

.h-display { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: 1.04; margin: 0; }
.eyebrow { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-3); }
.muted { color: var(--fg-2); }

/* Shared split layout: sidebar + main */
.split { display: grid; grid-template-columns: 200px 1fr; height: 100%; }
.side { background: var(--win-sidebar); border-right: 0.5px solid var(--separator); padding: 10px 8px; overflow: auto; font-size: var(--text-sm); }
.side h5 { margin: 12px 10px 4px; font-size: var(--text-2xs); font-weight: 700; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; }
.side button, .side a { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r-sm); text-align: left; cursor: pointer; font-weight: 500; transition: background var(--d-1); }
.side button:hover, .side a:hover { background: var(--hover); }
.side [aria-current="true"] { background: var(--press); font-weight: 600; }
.side .count { margin-left: auto; font-size: var(--text-2xs); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.side .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }
.main { overflow: auto; min-width: 0; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .side { display: none; } }

/* ---------- Work (Finder) ---------- */
.finder-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 22px 24px 6px; }
.finder-head h2 { font-size: var(--text-2xl); }
picture { display: contents; }
html img.project-cover--contain { object-fit: contain; object-position: center; background: #e8f4ff; }
html :is(.file, .s-card):hover img.project-cover--contain { transform: none; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; padding: 14px 24px 28px; }
.file {
  display: grid; gap: 10px; padding: 8px; border-radius: var(--r-xl); text-align: left; cursor: pointer; color: var(--fg);
  transition: background var(--d-1), transform var(--d-3) var(--ease-spring);
  animation: file-in var(--d-4) var(--ease-out) backwards; animation-delay: calc(var(--i) * 35ms);
}
@keyframes file-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.file:hover { background: var(--hover); }
.file:active { transform: scale(0.98); }
.file:focus-visible { background: rgb(var(--accent-rgb) / 0.14); outline: none; }
.file__thumb { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; background: var(--field); border: 0.5px solid var(--card-border); box-shadow: 0 4px 14px -6px rgb(0 0 0 / 0.25); }
[data-material="flat"] .file__thumb { box-shadow: none; }
.file__thumb img, .file__thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform var(--d-5) var(--ease-out), opacity var(--d-3); }
.file:hover .file__thumb img { transform: scale(1.05); }
.file__thumb video { position: absolute; inset: 0; opacity: 0; }
.file:hover .file__thumb video[data-ready] { opacity: 1; }
.file__name { font-weight: 600; font-size: var(--text-md); line-height: 1.3; padding: 0 4px; }
.file__sub { font-size: var(--text-xs); color: var(--fg-3); padding: 0 4px; display: flex; gap: 6px; align-items: center; }
/* Thumbnail on a wallpaper stage (data: thumbStage) */
.thumb-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 9%; background: center / cover no-repeat; overflow: hidden; container-type: size; }
.thumb-stage__shot { display: block; width: 100%; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 12px 32px rgb(0 0 0 / 0.28); transition: transform var(--d-5) var(--ease-out); }
html .thumb-stage__shot img { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: initial; transform: none; }
:is(.s-card, .file):hover .thumb-stage__shot { transform: scale(1.03); }
html :is(.s-card, .file):hover .thumb-stage__shot img { transform: none; }
.thumb-stage__card { display: grid; justify-items: start; gap: 10px; width: 100%; padding: clamp(14px, 7%, 28px); border-radius: 8px; background: rgb(255 255 255 / 0.78); border: 1px solid rgb(255 255 255 / 0.6); box-shadow: 0 12px 32px rgb(0 0 0 / 0.16); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); color: #1a1a1a; font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; transition: transform var(--d-5) var(--ease-out); }
:is(.s-card, .file):hover .thumb-stage__card { transform: scale(1.02); }
.thumb-stage__card small { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #616161; }
.thumb-stage__card b { font: 600 clamp(24px, min(13cqw, 22cqh), 64px)/1 "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; letter-spacing: -0.03em; white-space: nowrap; }
@container (max-height: 200px) { .thumb-stage__card > span { display: none; } .thumb-stage__card { gap: 6px; } }
.thumb-stage__card b span { color: #005fb8; }
.thumb-stage__card > span { display: flex; flex-wrap: wrap; gap: 6px; }
.thumb-stage__card i { font-style: normal; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; background: #fff; border: 1px solid #e0e0e0; }
.thumb-stage--pair { background-image: var(--wl); }
html[data-mode="dark"] .thumb-stage--pair { background-image: var(--wd); }
html[data-mode="dark"] .thumb-stage__card { background: rgb(32 32 32 / 0.78); border-color: rgb(255 255 255 / 0.1); color: #fff; }
html[data-mode="dark"] .thumb-stage__card small { color: #c5c5c5; }
html[data-mode="dark"] .thumb-stage__card b span { color: #60cdff; }
html[data-mode="dark"] .thumb-stage__card i { background: #2b2b2b; border-color: #3d3d3d; }
.project-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: var(--field); }
.project-placeholder .appicon { --size: 52px; transition: transform var(--d-3) var(--ease-spring); }
.file:hover .project-placeholder .appicon { transform: rotate(-8deg) scale(1.06); }
.flist { padding: 8px 16px 24px; }
.frow { display: grid; grid-template-columns: 40px 2fr 1fr 70px 1.3fr; align-items: center; gap: 12px; width: 100%; padding: 6px 8px; border-radius: var(--r-sm); text-align: left; font-size: var(--text-sm); cursor: pointer; }
.frow:nth-child(even) { background: var(--hover); }
.frow:hover { background: var(--press); }
.frow img, .frow .ph { width: 40px; height: 26px; border-radius: 5px; object-fit: cover; background: var(--hatch), var(--field); }
/* A cover with a reduced-motion still is a <picture>; keep it one grid cell (global picture{display:contents} would let <source> take a column). */
.frow picture { display: block; width: 40px; height: 26px; }
.frow picture img { display: block; }
.frow--head { font-size: var(--text-2xs); font-weight: 700; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.05em; background: none !important; cursor: default; }
.empty { padding: 60px 24px; text-align: center; color: var(--fg-3); }

/* ---------- Case study reader ---------- */
.case { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 40px; padding: 36px 40px 60px; max-width: 1100px; margin: 0 auto; }
.case__toc { position: sticky; top: 16px; align-self: start; display: grid; gap: 2px; font-size: var(--text-sm); }
.case__toc a { padding: 5px 10px; border-radius: var(--r-sm); color: var(--fg-2); cursor: pointer; position: relative; transition: color var(--d-1), background var(--d-1); }
.case__toc a:hover { background: var(--hover); color: var(--fg); }
.case__toc a[aria-current="true"] { color: var(--fg); font-weight: 600; background: var(--hover); }
.case__toc a[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--accent); }
.case h1 { font-size: clamp(32px, 5vw, var(--text-4xl)); margin: 12px 0 14px; max-width: 16ch; text-wrap: balance; }
[data-material="flat"] .case h1 { font-size: clamp(40px, 6vw, 68px); }
.case .lede { font-size: var(--text-xl); line-height: 1.4; color: var(--fg-2); max-width: 46ch; margin: 0; }
.meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 28px 0; padding: 18px 0; border-block: 0.5px solid var(--separator); }
.meta dt { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); margin-bottom: 4px; }
.meta dd { margin: 0; font-size: var(--text-sm); font-weight: 500; }
.cover { border-radius: var(--r-xl); overflow: hidden; border: 0.5px solid var(--card-border); margin: 0 0 28px; }
.cover img { width: 100%; }
.cover figcaption { padding: 10px 14px; font-size: var(--text-xs); color: var(--fg-2); }
.case article { min-width: 0; }
.case__subtitle { font-size: var(--text-xl); font-weight: 600; margin: 0 0 12px; }
.gallery figcaption a { text-decoration: underline; text-underline-offset: 3px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 36px; }
.stat { padding: 18px; border-radius: var(--r-xl); background: var(--card); border: 0.5px solid var(--card-border); }
.stat b { display: block; font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-3xl); letter-spacing: var(--display-tracking); line-height: 1; color: var(--accent); margin-bottom: 8px; }
[data-material="flat"] .stat b { color: var(--fg); font-size: 48px; }
.stat span { font-size: var(--text-sm); color: var(--fg-2); }
.case section { padding-bottom: 44px; scroll-margin-top: 16px; }
.case h2 { font-size: var(--text-2xl); margin-bottom: 14px; }
[data-material="flat"] .case h2 { font-size: 36px; }
.prose { font-size: var(--text-lg); line-height: 1.65; max-width: 64ch; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose blockquote { margin: 22px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.35; }
[data-material="flat"] .prose blockquote { font-size: 28px; border-left-color: var(--fg); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.gallery figure { margin: 0; cursor: zoom-in; }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery .frame { border-radius: var(--r-lg); overflow: hidden; border: 0.5px solid var(--card-border); background: var(--field); transition: transform var(--d-3) var(--ease-spring), box-shadow var(--d-3); }
.gallery figure:hover .frame { transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.35); }
.gallery img, .gallery video { width: 100%; }
.gallery figcaption { font-size: var(--text-xs); color: var(--fg-3); margin-top: 6px; }
@media (max-width: 900px) { .case { grid-template-columns: 1fr; padding: 24px 20px 60px; } .case__toc { display: none; } .meta { grid-template-columns: 1fr 1fr; } }

/* Lightbox (inside a window) */
.lightbox { position: absolute; inset: 0; z-index: 5; border-radius: 0 0 var(--win-radius) var(--win-radius); display: grid; place-items: center; padding: 24px; background: rgb(0 0 0 / 0.75); animation: fade var(--d-2); cursor: zoom-out; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 100%; border-radius: var(--r-md); animation: zoom-in var(--d-4) var(--ease-spring); }
@keyframes fade { from { opacity: 0; } }
@keyframes zoom-in { from { transform: scale(0.85); opacity: 0; } }

/* ---------- Playground ---------- */
/* Playground: toy stage + tabs */
.toybox { container-type: inline-size; display: flex; flex-direction: column; height: 100%; padding: 14px 16px 12px; gap: 10px; }
.toybox__bar { display: flex; align-items: center; gap: 6px; flex: none; min-width: 0; }
.toybox__bar .toybox__tabs { flex: 1 1 auto; min-width: 0; }
.toybox__tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: none; max-width: 100%; margin: 0 -4px; padding: 0 4px; scroll-padding-inline: 4px; }
.toybox__tabs::-webkit-scrollbar { display: none; }
.toybox__tabs button { position: relative; flex: none; min-height: 40px; padding: 0 10px; font-size: var(--text-sm); color: var(--fg-2); cursor: pointer; white-space: nowrap; transition: color var(--d-2); }
.toybox__tabs button:hover { color: var(--fg); }
.toybox__tabs button::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 5px; height: 2px; border-radius: 2px; background: currentColor; transform: scaleX(0); transition: transform var(--d-2); }
.toybox__tabs button[aria-selected="true"] { color: var(--fg); font-weight: 600; }
.toybox__tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.toybox__tabs button:focus-visible { outline-offset: -2px; border-radius: var(--r-sm, 6px); }
.toybox__stage { position: relative; flex: 1; min-height: 260px; }
.toybox__hint { flex: none; margin: 0; font-size: var(--text-sm); color: var(--fg-2); }
.toy-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
@media (hover: hover) and (pointer: fine) {
  [data-toy] .toy-canvas { cursor: var(--toy-cursor, crosshair); }
  [data-toy] .toy-canvas.toy-canvas--out { cursor: auto; }
}
@media (pointer: coarse) { .toy-canvas { cursor: auto; } }
.toy-canvas:focus { outline: none; }
.toy-canvas:focus-visible { outline: 2px solid var(--accent, #0067c0); outline-offset: -4px; border-radius: 18px; }
.toy-canvas--ring:focus-visible { outline: none; }
.toy-focus { position: absolute; display: none; pointer-events: none; border-radius: 24px; outline: 2px solid var(--accent, #0067c0); outline-offset: 2px; }
.toy-canvas--ring:focus-visible ~ .toy-focus { display: block; }
.beaver-ui { position: absolute; z-index: 1; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 520px); padding: 0; color: var(--fg); text-align: center; }
/* Scenes narrate for screen readers only; on screen the animation speaks for itself */
.beaver-ui__status, .seattle-ui__status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.beaver-ui:has(button) { padding: 4px 8px; }
.beaver-ui__actions { display: flex; justify-content: center; gap: 6px; }
.beaver-ui button { min-height: 44px; padding: 6px 12px; border: 1px solid var(--card-border); border-radius: var(--r-pill); background: var(--field); color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.beaver-ui button:hover:not(:disabled) { background: var(--hover); }
.beaver-ui button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.beaver-ui button:disabled { opacity: 0.5; cursor: default; }
/* Jelly Seattle: a quiet text menu — a side rail on wide stages, one scrolling row on narrow ones */
.seattle-ui { --sm-ink: var(--fg); --sm-muted: var(--fg-2); position: absolute; z-index: 1; inset: auto 0 0; color: var(--sm-ink); pointer-events: none; }
html[data-view="simple"] .seattle-ui { --sm-ink: var(--s-fg); --sm-muted: color-mix(in srgb, var(--s-fg) 66%, transparent); }
.seattle-ui > * { pointer-events: auto; }
.seattle-menu { display: flex; align-items: center; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 0 8px; scroll-padding-inline: 8px; }
.seattle-menu::-webkit-scrollbar { display: none; }
.seattle-menu__group { display: flex; flex: none; align-items: center; }
.seattle-menu__label { padding: 0 4px; font-family: var(--font-mono, ui-monospace, monospace); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sm-muted); }
.seattle-menu button { position: relative; flex: none; min-height: 40px; padding: 0 8px; border: 0; background: none; color: var(--sm-muted); font: inherit; font-size: 12.5px; white-space: nowrap; cursor: pointer; transition: color var(--d-2); }
.seattle-menu button:hover { color: var(--sm-ink); }
.seattle-menu button::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 2px; border-radius: 2px; background: currentColor; transform: scaleX(0); transition: transform var(--d-2); }
.seattle-menu button[aria-pressed="true"] { color: var(--sm-ink); font-weight: 600; }
.seattle-menu button[aria-pressed="true"]::after { transform: scaleX(1); }
.seattle-menu button:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; border-radius: 6px; }
.seattle-menu__row { display: flex; flex: none; gap: 2px; }
.seattle-menu .seattle-menu__row button { min-width: 36px; padding: 0 6px; font-size: 17px; line-height: 1; }
.seattle-menu button:disabled { opacity: 0.4; cursor: default; }
.seattle-menu button:disabled:hover { color: var(--sm-muted); }
.seattle-ui[data-layout="row"] .seattle-menu { padding-bottom: 2px; }
.seattle-ui[data-layout="rail"] { inset: 0; }
.seattle-ui[data-layout="rail"] .seattle-menu { position: absolute; flex-direction: column; align-items: stretch; gap: 8px; width: max-content; padding: 0; overflow: visible; transform: translateY(-50%); }
.seattle-ui[data-layout="rail"] .seattle-menu__group { flex-direction: column; align-items: flex-start; }
.seattle-ui[data-layout="rail"] .seattle-menu__label { padding: 0 8px 2px; }
.seattle-ui[data-layout="rail"] .seattle-menu button { min-height: 28px; }
.seattle-ui[data-layout="rail"] .seattle-menu button::after { bottom: 2px; }
.toy-art-error { position: absolute; z-index: 2; top: 8px; left: 8px; right: 8px; margin: 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--card); color: var(--fg); font-size: 12px; }
.pg { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 20px; }
.pg-tile { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-xl); overflow: hidden; background: var(--field); cursor: pointer; border: 0.5px solid var(--card-border); transition: transform var(--d-3) var(--ease-spring); animation: file-in var(--d-4) var(--ease-out) backwards; animation-delay: calc(var(--i) * 50ms); }
.pg-tile:hover { transform: scale(1.02); }
.pg-tile video { width: 100%; height: 100%; object-fit: cover; }
.pg-tile span { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: var(--r-pill); font-size: var(--text-xs); font-weight: 600; color: #fff; background: rgb(0 0 0 / 0.35); backdrop-filter: blur(12px); }

/* ---------- About ---------- */
/* Column = bio measure (646px + padding) so header and text share one centred block */
.about { padding: 32px; display: grid; gap: 28px; max-width: 710px; margin: 0 auto; }
.about .about__bio { max-width: none; }
.about__head { display: flex; gap: 22px; align-items: center; }
/* No plate: the goose stands on a soft contact shadow; a hairline drop-shadow keeps its white body legible on light windows */
.about__avatar { position: relative; width: 108px; height: 120px; flex: none; display: grid; place-items: end center; }
.about__avatar::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 52px; height: 8px; margin-left: -26px; border-radius: 50%; background: rgb(0 0 0 / 0.14); filter: blur(3px); }
.about__avatar img { position: relative; z-index: 1; height: 112px; margin-bottom: 3px; transform-origin: 50% 96%; filter: drop-shadow(0 0 0.5px rgb(0 0 0 / 0.4)) drop-shadow(0 2px 4px rgb(0 0 0 / 0.08)); transition: transform var(--d-4) var(--ease-spring); }
.about__avatar:hover img { transform: rotate(-8deg) scale(1.05); }
/* Profile photo: a round portrait in the same 108px slot, no goose ground shadow or wiggle */
.about__avatar--photo { place-items: center; }
.about__avatar--photo::after { content: none; }
.about__avatar--photo img { width: 108px; height: 108px; margin: 0; border-radius: 50%; object-fit: cover; filter: none; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 2px 8px rgb(0 0 0 / 0.1); }
.about__avatar--photo:hover img { transform: none; }
.about h2 { font-size: var(--text-3xl); }
[data-material="flat"] .about h2 { font-size: 52px; }
.card { padding: 18px 20px; border-radius: var(--r-xl); background: var(--card); border: 0.5px solid var(--card-border); }
@media (max-width: 600px) { .about { padding: 20px; } .about__head { flex-direction: column; align-items: flex-start; } }

/* About: "After hours", a short story in three chapters (OS About app + Simple view Profile) */
.story { container-type: inline-size; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.story > .eyebrow { margin: 4px 0 -16px; }
.beat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.beat__text { margin: 0; font-size: var(--text-lg); line-height: 1.6; color: var(--s-fg, var(--fg)); text-wrap: pretty; }
.beat__cta { margin-top: 26px; }
.story-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px; border-radius: var(--r-pill); font-size: var(--text-xs); font-weight: 600; color: var(--s-fg, var(--fg)); background: var(--s-line, var(--field)); cursor: pointer; transition: transform var(--d-2) var(--ease-spring); }
.story-btn:hover { transform: scale(1.04); }
.story-btn:active { transform: scale(0.96); }
.story-btn svg { width: 12px; height: 12px; }

/* Chapter 1: a cream CRT set on a PS4-style console */
.tv { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
/* Corners nest: screen 18 + bezel 10 + cream 8 = case 36 */
.tv__set { display: flex; gap: 10px; width: 100%; padding: 18px 12px 18px 18px; border-radius: 36px; background: linear-gradient(160deg, #f1ead9, #d8cdb5); box-shadow: inset 0 1px 0 #fffaf0, inset 0 -3px 0 rgb(0 0 0 / 0.07), 0 16px 32px rgb(40 30 10 / 0.2); }
.tv__screen { position: relative; container-type: inline-size; flex: 1; min-width: 0; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: #0b0d12; box-shadow: 0 0 0 9px #2a2a2f, 0 0 0 10px #18181b, inset 0 0 30px rgb(0 0 0 / 0.6); }
.tv__scan { position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgb(0 0 0 / 0.16) 0 1px, transparent 1px 3px), radial-gradient(110% 80% at 28% 18%, rgb(255 255 255 / 0.16), transparent 45%), radial-gradient(ellipse at center, transparent 58%, rgb(0 0 0 / 0.5)); }
.tv__static { position: absolute; inset: -20px; opacity: 0; pointer-events: none; background: #777 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 200px 120px; }
.is-tuning .tv__static { animation: tv-static 0.42s steps(6) both; }
@keyframes tv-static { 0% { opacity: 0; } 15%, 85% { opacity: 1; } 50% { transform: translate(-12px, 8px); } 100% { opacity: 0; transform: translate(6px, -8px); } }
.tv__panel { flex: none; width: 58px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0 14px; }
.tv__knob { position: relative; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fbf7ee, #cfc3aa); box-shadow: 0 2px 4px rgb(0 0 0 / 0.2); }
.tv__knob::after { content: ""; position: absolute; left: 50%; top: 4px; width: 2px; height: 9px; margin-left: -1px; border-radius: 1px; background: #8a7d65; transform-origin: 50% 11px; transform: rotate(35deg); }
.tv__grille { flex: 1; min-height: 16px; width: 38px; border-radius: 4px; background: repeating-linear-gradient(to bottom, #b9ad95 0 2px, transparent 2px 6px); opacity: 0.8; }
/* PS4-style console under the set */
.tv__console { width: 64%; margin-top: 6px; }
.tv__console svg { display: block; width: 100%; height: auto; overflow: visible; }
.tv__glow { filter: drop-shadow(0 0 3px var(--glow)) drop-shadow(0 0 8px var(--glow)); transition: fill 0.3s; }
/* The screen is a PS4-style home screen: blurred art behind, a row of game tiles, the selected one up front */
.ps { position: absolute; inset: 0; overflow: hidden; color: #fff; background: #0d1020; }
.ps__bg { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(14px) saturate(1.25) brightness(0.55); }
.ps::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0.25), transparent 30%, rgb(0 0 0 / 0.55)); }
.ps > :not(.ps__bg) { z-index: 1; }
.ps__bar { position: absolute; top: 5%; left: 5%; right: 5%; display: flex; align-items: center; gap: 1.2cqw; font-size: 2.3cqw; font-weight: 500; }
.ps__clock { margin-left: auto; font-variant-numeric: tabular-nums; opacity: 0.9; }
.ps__row { position: absolute; left: 5%; top: 17%; display: flex; align-items: flex-start; gap: 2.2cqw; transition: transform 0.35s var(--ease-out); }
.ps__tile { flex: none; width: 15cqw; aspect-ratio: 272 / 380; padding: 0; border-radius: 1cqw; overflow: hidden; opacity: 0.7; transform-origin: 0 0; cursor: pointer; box-shadow: 0 0.6cqw 1.6cqw rgb(0 0 0 / 0.45); transition: transform 0.3s var(--ease-out), opacity 0.3s, margin 0.3s var(--ease-out), box-shadow 0.3s; }
.ps__tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ps__tile:hover { opacity: 0.9; }
.ps__tile[aria-pressed="true"] { opacity: 1; transform: scale(1.3); margin-right: 4.6cqw; box-shadow: 0 0 0 0.45cqw #fff, 0 1.4cqw 3cqw rgb(0 0 0 / 0.55); }
.ps__info { position: absolute; left: 5%; right: 5%; bottom: 6%; display: grid; justify-items: start; gap: 0.5cqw; }
.ps__info b { font-size: 3.9cqw; font-weight: 600; line-height: 1.15; text-shadow: 0 1px 6px rgb(0 0 0 / 0.4); }
.ps__info span { font-size: 2.3cqw; opacity: 0.85; }
.ps__watch { display: inline-flex; align-items: center; gap: 1cqw; margin-top: 1cqw; padding: 0.9cqw 2.2cqw; border-radius: 999px; font-size: 2.2cqw; font-weight: 600; color: #111; background: rgb(255 255 255 / 0.92); transition: transform var(--d-2) var(--ease-spring); }
.ps__watch:hover { transform: scale(1.04); }
.ps__x { color: #4a6dff; font-weight: 800; }
/* DualShock-style controller: the light bar follows the selected game */
.pad { position: relative; width: min(300px, 78%); aspect-ratio: 300 / 190; margin-top: 18px; filter: drop-shadow(0 12px 14px rgb(0 0 0 / 0.25)); }
.pad svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pad__light { filter: drop-shadow(0 0 4px var(--glow)); transition: stroke 0.3s; }
.pad svg .on { fill: #6a6b75; }
.pad__btn { position: absolute; border-radius: 5px; cursor: pointer; background: transparent; }
.pad__btn:focus-visible { outline: 2px solid var(--glow); outline-offset: 1px; }
.pad__btn--up { left: 22.6%; top: 25.8%; width: 6.4%; height: 10.5%; }
.pad__btn--down { left: 22.6%; top: 42.6%; width: 6.4%; height: 10.5%; }
.pad__btn--left { left: 16.6%; top: 34.6%; width: 7.4%; height: 9.6%; }
.pad__btn--right { left: 28.2%; top: 34.6%; width: 7.4%; height: 9.6%; }
.pad__btn--x { left: 70.4%; top: 43.4%; width: 7.2%; height: 11.4%; border-radius: 50%; }
.tv__cap { margin-top: 12px; text-align: center; font-size: var(--text-sm); color: var(--s-muted, var(--fg-2)); }

/* Chapter 3 as a flight tracker card (the weather pair below is kept for cityWidget: "weather") */
.ft { display: grid; gap: 14px; max-width: 460px; padding: 18px 18px 14px; border-radius: 20px; background: var(--s-soft, var(--bg-2)); color: var(--s-fg, var(--fg)); }
.ft__top { display: flex; justify-content: space-between; align-items: center; }
.ft__tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--s-muted, var(--fg-3)); }
.ft__status { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e7eefc; color: #2858b8; transition: background 0.3s, color 0.3s; }
.ft[data-state="landed"] .ft__status { background: #def3e5; color: #1f7a41; }
.ft[data-state="ground"] .ft__status { background: color-mix(in oklab, currentColor 8%, transparent); color: var(--s-muted, var(--fg-3)); }
.ft__ends { display: flex; justify-content: space-between; gap: 16px; }
.ft__ends > div { display: grid; gap: 2px; }
.ft__ends b { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.ft__ends span { font-size: 13px; }
.ft__ends time { font-size: 12px; color: var(--s-muted, var(--fg-3)); font-variant-numeric: tabular-nums; }
.ft__to { text-align: right; }
.ft__map { display: block; width: 100%; height: auto; overflow: visible; }
.ft__arc { fill: none; stroke: currentColor; stroke-opacity: 0.3; stroke-width: 1.6; stroke-dasharray: 0.012 0.012; stroke-linecap: round; }
.ft__trail { fill: none; stroke: #3a76df; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 0 1; }
.ft__dot { fill: currentColor; }
.ft__plane { fill: currentColor; }
.ft__stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 12px; margin: 0; padding-top: 12px; border-top: 0.5px solid color-mix(in oklab, currentColor 14%, transparent); }
.ft__stats dt { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--s-muted, var(--fg-3)); }
.ft__stats dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; }
.ft__again { justify-self: end; }
[data-mode="dark"] .ft__status { background: #1d2e52; color: #9dbcff; }
[data-mode="dark"] .ft[data-state="landed"] .ft__status { background: #173a25; color: #8fe0aa; }

/* Chapter 2: a stack of cinema tickets; the front one tears off to the back */
.cinema { display: grid; gap: 16px; max-width: 460px; }
.tix { display: grid; padding-top: 18px; }
.tix__t { --tear: calc(100% - 62px); grid-area: 1 / 1; display: grid; grid-template-rows: 1fr 62px; color: #2b2217; background: #f6eedd; border-radius: 14px;
  mask: radial-gradient(circle 9px at 0 var(--tear), #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% var(--tear), #0000 97%, #000) right / 51% 100% no-repeat;
  transform: translateY(calc(var(--d) * -9px)) scale(calc(1 - var(--d) * 0.045)) rotate(calc(var(--d) * 1.4deg)); transform-origin: 50% 0; z-index: calc(5 - var(--d));
  transition: transform 0.5s cubic-bezier(0.3, 1.3, 0.5, 1), filter 0.3s; }
.tix__t[aria-hidden="true"] { filter: brightness(0.94); }
.tix__main { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 16px; }
.tix__poster { width: 92px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; background: #222; box-shadow: 0 6px 14px rgb(40 25 5 / 0.25); }
.tix__info { display: grid; align-content: start; gap: 6px; min-width: 0; }
.tix__venue { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #8a6d47; }
.tix__admit { justify-self: start; padding: 2px 7px; border: 1.5px solid #c0392b; border-radius: 4px; font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: #c0392b; transform: rotate(-3deg); }
.tix__title { font-family: var(--p-serif); font-weight: 400; font-size: 26px; line-height: 1.05; }
.tix__why { font-size: 13px; line-height: 1.45; color: #5c4b36; }
.tix__stub { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; border-top: 1.5px dashed #cdbb9b; }
.tix__meta { display: flex; gap: 18px; margin: 0; }
.tix__meta dt { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #8a6d47; }
.tix__meta dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; }
.tix__code { width: 64px; height: 28px; background: repeating-linear-gradient(to right, #2b2217 0 2px, transparent 2px 4px, #2b2217 4px 5px, transparent 5px 8px); }
.cinema__foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cinema__credit { margin-left: auto; font-size: var(--text-2xs); color: var(--s-muted, var(--fg-3)); }
.cinema__credit a { text-decoration: underline; text-underline-offset: 2px; }
.cinema__dots { display: flex; gap: 6px; }
.cinema__dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.2; transition: opacity var(--d-2); }
.cinema__dots i.on { opacity: 0.75; }
@media (max-width: 560px) {
  .tv__set { padding: 15px 8px 15px 15px; border-radius: 30px; }
  .tv__screen { border-radius: 14px; box-shadow: 0 0 0 8px #2a2a2f, 0 0 0 9px #18181b, inset 0 0 24px rgb(0 0 0 / 0.6); }
  .tv__panel { width: 44px; padding-top: 12px; }
}

/* Chapter 3: a Seattle time and weather widget whose sky follows the real one */
.wx { position: relative; overflow: hidden; display: grid; gap: 2px; padding: 16px 18px 94px; border-radius: 22px; color: #fff; background: var(--wx-bg); box-shadow: 0 14px 30px rgb(20 40 80 / 0.22); --wx-bg: linear-gradient(160deg, #6f88a6, #b4c3d4); }
.wx[data-sky="day"][data-cond="clear"] { --wx-bg: linear-gradient(160deg, #2f8cf0, #8fd0ff); }
.wx[data-sky="day"][data-cond="rain"] { --wx-bg: linear-gradient(160deg, #4d6178, #8597ad); }
.wx[data-sky="day"][data-cond="snow"] { --wx-bg: linear-gradient(160deg, #8ea7c2, #dfe8f2); }
.wx[data-sky="night"] { --wx-bg: linear-gradient(160deg, #0b1433, #2a3c70); }
.wx[data-sky="night"]:is([data-cond="cloud"], [data-cond="rain"], [data-cond="fog"]) { --wx-bg: linear-gradient(160deg, #161d2c, #3b475c); }
.wx > :not(.wx__rain) { position: relative; }
.wx__top, .wx__bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.wx__city { font-size: var(--text-md); font-weight: 600; }
.wx__time { font-size: var(--text-sm); font-variant-numeric: tabular-nums; opacity: 0.85; }
.wx__now { display: flex; justify-content: space-between; align-items: center; }
.wx__temp { font-size: 58px; font-weight: 300; line-height: 1.05; letter-spacing: -0.04em; }
.wx__icon { width: 50px; height: 50px; filter: drop-shadow(0 2px 6px rgb(0 0 0 / 0.15)); }
.wx__bottom { font-size: var(--text-sm); opacity: 0.9; }
/* Two cities side by side: where I started, then where I live */
.wx-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.wx-flight { position: relative; display: block; width: 72px; height: 48px; padding: 0; color: var(--s-muted, var(--fg-3)); cursor: grab; border-radius: 12px; touch-action: none; }
.wx-flight.is-dragging { cursor: grabbing; }
.wx-flight.is-dragging .wx-plane { transform: scale(1.3); }
.wx-flight:focus-visible { outline: 1.5px dashed var(--s-muted, var(--fg-3)); outline-offset: 2px; }
.wx-flight > svg:first-child { display: block; width: 72px; height: 48px; }
.wx-plane { position: absolute; left: 0; top: 0; width: 18px; height: 18px; color: var(--s-fg, var(--fg)); offset-path: path("M6 34Q36 4 66 34"); offset-rotate: auto; offset-distance: 0%; transition: transform var(--d-2) var(--ease-spring); }
.wx-flight:hover .wx-plane { transform: scale(1.2); }
.wx-trail { stroke: var(--s-fg, var(--fg)); opacity: 0.55; }
@container (max-width: 520px) { .wx-pair { grid-template-columns: minmax(0, 1fr); } .wx-flight { justify-self: center; transform: rotate(90deg); margin: 14px 0; } }
.wx .wx__scene { position: absolute; left: 0; right: 0; bottom: 0; display: block; width: 100%; height: 84px; }
/* City illustrations: one neutral palette, switched by each city's real day or night */
.wx {
  --t1: #f2f4f7; --t1s: #dde1e8; --t2: #dfe3ea; --t2s: #c9ced8; --t3: #c8ced8; --t3s: #b2b9c5; --t4: #aab2be; --t4s: #959eac;
  --win: #8f99a8; --lit: #a7b1bf; --lit-glow: none; --ground: #5d6676; --lane: #a3abb8; --leaf: #b8c1b5; --leafs: #9fa99c; --trunk: #7c8579;
  --mtn: #e4e8ee; --mtns: #d1d7e0; --snow: #ffffff; --cloud: rgb(255 255 255 / 0.7); --mast: #8f99a8;
}
.wx[data-sky="night"] {
  --t1: #3b4358; --t1s: #323a4d; --t2: #333a4e; --t2s: #2b3243; --t3: #2b3244; --t3s: #242a3a; --t4: #232a39; --t4s: #1d2230;
  --win: #48526a; --lit: #ffd27a; --lit-glow: drop-shadow(0 0 1.5px rgb(255 200 110 / 0.9)); --ground: #171b27; --lane: #4a5368; --leaf: #2e3d39; --leafs: #25322e; --trunk: #3a3f4c;
  --mtn: #4b5571; --mtns: #3f4862; --snow: #cfd6e6; --cloud: rgb(255 255 255 / 0.14); --mast: #48526a;
}
.wx .t1 { fill: var(--t1); } .wx .t1s { fill: var(--t1s); } .wx .t2 { fill: var(--t2); } .wx .t2s { fill: var(--t2s); }
.wx .t3 { fill: var(--t3); } .wx .t3s { fill: var(--t3s); } .wx .t4 { fill: var(--t4); } .wx .t4s { fill: var(--t4s); }
.wx .win { fill: var(--win); }
.wx .lit { fill: var(--lit); filter: var(--lit-glow); }
.wx .sc-needle { fill: var(--t1); }
.wx .sc-mast { stroke: var(--mast); stroke-width: 1; }
.wx .sc-leaf { fill: var(--leaf); } .wx .sc-leafs { fill: var(--leafs); } .wx .sc-trunk { fill: var(--trunk); }
.wx .sc-mtn { fill: var(--mtn); } .wx .sc-mtns { fill: var(--mtns); } .wx .sc-snow { fill: var(--snow); }
.wx .sc-cloud { fill: var(--cloud); }
.wx .sc-ground { fill: var(--ground); }
.wx .sc-lane { stroke: var(--lane); stroke-dasharray: 8 8; }
.wx .sc-ripple { stroke: var(--lane); stroke-linecap: round; }
.wx .sc-moto { transform: translateX(var(--x)); animation: wx-ride var(--t) linear var(--d) infinite; }
.wx .sc-moto--back { animation-direction: reverse; }
@keyframes wx-ride { from { transform: translateX(-30px); } to { transform: translateX(330px); } }
.wx .sc-bike { fill: #2a2f3d; stroke: #2a2f3d; }
.wx .sc-rider { stroke: #3a4050; }
.wx__rain { position: absolute; inset: 0; display: none; pointer-events: none; opacity: 0.8; animation: wx-rain 0.7s linear infinite;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cg stroke='white' stroke-opacity='.45' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M9 2l-2 8M29 14l-2 8M19 26l-2 8M37 30l-2 8'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 40px 40px; }
.wx[data-cond="rain"] .wx__rain { display: block; }
@keyframes wx-rain { to { background-position: -10px 40px; } }
[data-motion="reduced"] .story *, [data-motion="reduced"] .story *::before { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .story *, .story *::before { animation: none !important; } }


/* ---------- Mail ---------- */
.mail { display: grid; grid-template-rows: auto auto 1fr auto; height: 100%; }
.mail__row { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 8px; padding: 0 20px; min-height: 46px; border-bottom: 0.5px solid var(--separator); font-size: var(--text-md); }
.mail__row label { color: var(--fg-3); }
.mail input, .mail textarea { border: 0; outline: 0; background: none; width: 100%; padding: 12px 0; font-size: var(--text-md); }
.mail textarea { padding: 18px 20px; resize: none; line-height: 1.6; }
.mail__foot { display: flex; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 0.5px solid var(--separator); }

/* ---------- Settings ---------- */
.set { padding: 24px 28px 40px; display: grid; gap: 22px; max-width: 640px; }
.set[hidden] { display: none; }
.set h2 { font-size: var(--text-2xl); }
.set-group { border-radius: var(--r-xl); background: var(--card); border: 0.5px solid var(--card-border); overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 0.5px solid var(--separator); font-size: var(--text-md); }
.set-row:last-child { border-bottom: 0; }
.set-row small { display: block; color: var(--fg-3); font-size: var(--text-xs); }
.mats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; }
.mat { display: grid; gap: 10px; padding: 10px; border-radius: var(--r-lg); cursor: pointer; text-align: left; font-weight: 600; font-size: var(--text-sm); border: 2px solid transparent; transition: border-color var(--d-2), transform var(--d-2) var(--ease-spring); }
.mat:hover { background: var(--hover); }
.mat:active { transform: scale(0.97); }
.mat[aria-pressed="true"] { border-color: var(--accent); }
.mat__prev { position: relative; height: 110px; border-radius: 12px; overflow: hidden; }
.mat__prev .mini { position: absolute; left: 16%; top: 22%; width: 68%; height: 64%; border-radius: 10px; }
/* Glass preview sits on the live wallpaper: Valley is a photo (day/night), the others are their solid --wp-base. */
.mat--glass .mat__prev { background: var(--wp-base) center / cover no-repeat; transition: background var(--d-3) var(--ease); }
[data-wallpaper="valley"] .mat--glass .mat__prev { background-image: url("../assets/img/wallpaper-day-thumb.webp"); }
[data-mode="dark"][data-wallpaper="valley"] .mat--glass .mat__prev { background-image: url("../assets/img/wallpaper-night-thumb.webp"); }
.mat--glass .mini { background: rgb(255 255 255 / 0.65); backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 #fff, 0 8px 20px rgb(0 0 0 / 0.15); border: 0.5px solid rgb(255 255 255 / 0.6); }
.mat--flat .mat__prev { background: #f3f2ef; }
.mat--flat .mini { background: #fff; border: 1px solid #e6e5e1; box-shadow: 0 6px 16px -8px rgb(0 0 0 / 0.15); }
.mini::before { content: ""; position: absolute; left: 8px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #ff5f57; box-shadow: 10px 0 #febc2e, 20px 0 #28c840; }
.set-row--stack { flex-direction: column; align-items: stretch; gap: 12px; }
.wps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.wp { display: grid; gap: 6px; justify-items: center; font-size: var(--text-xs); color: var(--fg-2); cursor: pointer; }
.wp__swatch { width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; border: 2px solid transparent; outline: 0.5px solid rgb(0 0 0 / 0.15); outline-offset: -2px; background: center / cover no-repeat var(--sw); transition: transform var(--d-2) var(--ease-spring), border-color var(--d-2); }
.wp:hover .wp__swatch { transform: scale(1.04); }
.wp[aria-pressed="true"] { color: var(--fg); font-weight: 600; }
.wp[aria-pressed="true"] .wp__swatch { border-color: var(--accent); box-shadow: 0 0 0 2px var(--card) inset; }
/* Each swatch shows the wallpaper it applies, for the current mode (same values as os.css). */
.wp[data-wp="valley"] { --sw: url("../assets/img/wallpaper-day-thumb.webp"); }
.wp[data-wp="aurora"] { --sw: #b7c7ff; }
.wp[data-wp="dusk"] { --sw: #f6b8a8; }
.wp[data-wp="mint"] { --sw: #b9ecd9; }
[data-mode="dark"] .wp[data-wp="valley"] { --sw: url("../assets/img/wallpaper-night-thumb.webp"); }
[data-mode="dark"] .wp[data-wp="aurora"] { --sw: #0b0f24; }
[data-mode="dark"] .wp[data-wp="dusk"] { --sw: #1d0d12; }
[data-mode="dark"] .wp[data-wp="mint"] { --sw: #06171a; }

/* ---------- Design kit ---------- */
.kit { padding: 28px 32px 48px; display: grid; gap: 36px; }
.kit h2 { font-size: var(--text-2xl); margin-bottom: 4px; }
.kit section > p { margin: 0 0 16px; color: var(--fg-2); max-width: 60ch; }
.kit-mats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kit-mat { position: relative; height: 150px; border-radius: var(--r-xl); overflow: hidden; padding: 14px; color: var(--fg); font-size: var(--text-xs); font-weight: 700; }
.kit-mat[data-material="glass"] { background: var(--wp-base); }
.kit-mat[data-material="glass"]::before { content: ""; position: absolute; inset: 0; background: var(--wp-base); }
.kit-mat[data-material="flat"] { background: var(--desktop); border: 0.5px solid var(--win-border); }
.kit-mat .glass { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 12px; border-radius: 16px; display: flex; gap: 8px; align-items: center; }
.kit-mat > span { position: relative; }
.tokens { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.token { border-radius: var(--r-lg); overflow: hidden; border: 0.5px solid var(--card-border); background: var(--card); font-size: var(--text-xs); }
.token i { display: block; height: 52px; background: var(--c); border-bottom: 0.5px solid var(--separator); }
.token div { padding: 8px 10px; }
.token code { display: block; color: var(--fg-3); font-family: var(--font-mono); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-row { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: baseline; padding: 8px 0; border-bottom: 0.5px dashed var(--separator); }
.type-row code { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--fg-3); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.curves { display: grid; gap: 8px; }
/* Label in its own column so the dot's lane never covers it */
.curve { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 12px; }
.curve span { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--fg-2); white-space: nowrap; }
.curve__track { position: relative; height: 28px; border-radius: var(--r-pill); background: var(--field); }
.curve i { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); transition: left 900ms var(--e); box-shadow: 0 2px 6px rgb(var(--accent-rgb) / 0.35); }
.curves[data-go] .curve i { left: calc(100% - 25px); }
.icons-row { display: flex; flex-wrap: wrap; gap: 14px; }
.icons-row .appicon { --size: 56px; }

/* ---------- Terminal ---------- */
.term { height: 100%; padding: 14px 16px; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; overflow: auto; background: rgb(10 12 16 / 0.82); color: #d7f5e3; cursor: text; }
[data-material="flat"][data-mode="light"] .term { background: #fbfaf7; color: #1a1a1a; }
.term .p { color: #5be49b; }
[data-material="flat"][data-mode="light"] .term .p { color: #13a35a; }
.term .dim { opacity: 0.6; }
.term .acc { color: var(--accent); }
.term input { background: none; border: 0; outline: 0; color: inherit; font: inherit; width: 60%; caret-color: #5be49b; }
.term a { text-decoration: underline; }
.side svg, .seg svg { width: 14px; height: 14px; flex: none; }
.seg button { display: inline-grid; place-items: center; }
/* Flat icon plates are derived from each icon's own --tint */
[data-material="flat"][data-mode="light"] .appicon { background: color-mix(in oklab, var(--tint) 13%, #fff); border-color: color-mix(in oklab, var(--tint) 20%, #e6e5e1); }
[data-material="flat"][data-mode="dark"] .appicon { background: color-mix(in oklab, var(--tint) 22%, #1e1e1e); border-color: color-mix(in oklab, var(--tint) 28%, #2c2c2c); }
.embed { position: relative; aspect-ratio: 16 / 9; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery figure:has(.embed) { cursor: default; }
.credits { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 24px; font-size: var(--text-md); }
.credits li { margin: 0 !important; }
.credits span { display: block; font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); }

/* ---------- Work: slideshow view uses the case carousel (see end of file) ---------- */
.main { container-type: inline-size; }

/* ---------- Case study: page structure (spacing scale 4/8/12/16/24/32/48/64/96/120) ---------- */
.case { --fg: #151d25; --fg-2: #4a5b6b; --fg-3: #5c6e7c; --card: #f2f7fc; --field: #edf5fe; --separator: #dce7f1; --panel: #f2f7fc; max-width: 1440px; padding: 24px 12px 96px; background: #fff; color: var(--fg); color-scheme: light; }
@media (min-width: 901px) {
  .case { grid-template-columns: 240px minmax(0, 1120px); gap: 32px; max-width: 1440px; padding: 32px 24px 120px; }
  .case__toc { width: 240px; top: 24px; gap: 4px; font-size: 16px; line-height: 24px; }
  .case__toc a { padding: 8px 12px; font-weight: 400; }
  .case__toc a[aria-current="true"] { font-weight: 600; }
  .case__toc a[aria-current="true"]::before { top: 10px; bottom: 10px; }
}
.case article { container-type: inline-size; }
.case article > * { max-width: none; }
@media (max-width: 900px) {
  .case__toc { display: flex; min-width: 0; width: 100%; gap: 4px; top: 0; z-index: 5; padding: 8px 0; overflow-x: auto; background: #fff; scrollbar-width: none; }
  .case__toc::-webkit-scrollbar { display: none; }
  .case__toc a { flex: none; white-space: nowrap; padding: 8px; font-size: 16px; line-height: 24px; }
  .case section { scroll-margin-top: 64px; }
}
/* Hero: title block left, art panel right */
.case-hero { display: grid; gap: 32px; }
.case-hero__text { min-width: 0; }
.case h1, [data-material="flat"] .case h1 { max-width: 16ch; margin: 12px 0 16px; font-size: clamp(40px, 4.6vw, 64px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
.case .case__subtitle { margin: 0 0 12px; font-size: 20px; line-height: 1.4; font-weight: 600; }
.case .lede { max-width: 44ch; margin: 0; font-size: 20px; line-height: 1.5; color: var(--fg-2); }
.case-hero__links { margin-top: 24px; }
.case .case-hero__art { margin: 0; border: 0; border-radius: 28px; overflow: hidden; background: var(--panel); cursor: zoom-in; }
.case .case-hero__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.case .case-hero__art img.project-cover--contain { object-fit: contain; }
/* Classic cases with a brand wallpaper pair: the cover sits on the wallpaper as a framed shot. */
.case .case-hero__art--wall { display: grid; place-items: center; padding: clamp(16px, 7%, 48px); background: var(--wl) center / cover no-repeat; }
html[data-mode="dark"] .case .case-hero__art--wall { background-image: var(--wd); }
.case .case-hero__art--wall > span { display: block; width: 100%; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 12px 32px rgb(0 0 0 / 0.24); }
.case .case-hero__art--wall img { height: auto; }
@container (min-width: 760px) {
  .case-hero--art { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; }
  .case-hero--art h1 { max-width: none; }
}
.case .meta { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 48px 0 0; padding: 0; border: 0; }
.case .meta dt { margin-bottom: 4px; }
.case .meta dd { font-size: 16px; line-height: 1.4; }
@container (max-width: 559px) { .case .meta { grid-template-columns: 1fr 1fr; gap: 16px 24px; } }
.case article > .case-points { max-width: 68ch; margin: 48px 0 0; padding-left: 24px; font-size: 18px; line-height: 1.5; }
.case-points li { margin-bottom: 12px; padding-left: 4px; }
.case-points li::marker { color: var(--accent); }
/* Section rhythm */
.case section { padding: 0; margin-top: 120px; scroll-margin-top: 24px; }
.case h2, [data-material="flat"] .case h2 { margin: 0 0 32px; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.15; letter-spacing: -0.015em; font-weight: 650; }
.case-sub { margin-top: 56px; }
.case-sub h3, .case-principles h3 { margin: 0 0 16px; font-size: 24px; line-height: 1.3; font-weight: 600; }
.case .prose { max-width: 68ch; font-size: 18px; line-height: 1.5; }
.case .prose p { margin: 0 0 16px; }
.case .prose > :last-child { margin-bottom: 0; }
.case .prose li { margin-bottom: 8px; }
.case .prose a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) {
  .case section { margin-top: 64px; }
  .case h2, [data-material="flat"] .case h2 { margin-bottom: 24px; }
  .case-sub { margin-top: 48px; }
  .case .prose, .case-points { font-size: 17px; }
}
/* Figures: solid tinted panel, caption below */
.case-fig { margin: 48px 0 0; min-width: 0; }
.case-fig__panel { container-type: inline-size; display: grid; place-items: center; padding: 48px; border-radius: 28px; background: var(--panel); }
.case-fig > figcaption, .case .gallery figcaption { margin-top: 12px; font-size: 14px; line-height: 1.4; color: var(--fg-3); text-align: left; }
@media (max-width: 640px) { .case-fig__panel { padding: 24px; border-radius: 24px; } }
.case-split { display: grid; gap: 32px; }
.case-split .prose { max-width: 68ch; }
.case-split .case-fig, .case-split .gallery { margin-top: 0; }
@container (min-width: 760px) { .case-split { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 48px; align-items: start; } }
.case .gallery { margin-top: 48px; gap: 24px; }
.case .gallery .frame { border: 0; border-radius: 28px; background: var(--panel); }
.case .gallery figure:hover .frame { transform: none; box-shadow: none; }
.case-principles { display: grid; gap: 32px 48px; }
.case-principles p { max-width: 40ch; margin: 0; font-size: 18px; line-height: 1.5; color: var(--fg-2); }
@container (min-width: 760px) { .case-principles { grid-template-columns: 1fr 1fr; } }
/* Previous / next */
/* Diagrams: HTML text, never smaller than 14px (12px on small screens) */
.cd-bars { display: grid; gap: 32px; width: 100%; }
.cd-bars__group > b { display: block; margin-bottom: 12px; font-size: 18px; font-weight: 600; }
.cd-bars__row { display: grid; grid-template-columns: 80px minmax(0, 1fr) 72px; gap: 12px; align-items: center; margin-top: 8px; font-size: 16px; }
.cd-bars__row i { position: relative; height: 24px; border-radius: 12px; background: #dde9f5; overflow: hidden; }
.cd-bars__row i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 1%); border-radius: 12px; background: #005fb8; }
.cd-bars__row[data-name="Mac"] i::before { background: #8ba3ba; }
.cd-bars__row em { font-style: normal; font-weight: 600; text-align: right; }
.cd-flow { width: 100%; }
.cd-flow ol { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.cd-flow ol > li { position: relative; display: grid; gap: 4px; align-content: start; justify-items: center; padding-top: 48px; text-align: center; counter-increment: step; }
.cd-flow ol > li::before { content: counter(step); position: absolute; top: 0; left: calc(50% - 16px); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #005fb8; color: #fff; font-size: 14px; font-weight: 600; }
.cd-flow ol > li:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 24px); right: calc(-50% + 8px); height: 2px; border-radius: 1px; background: #9cc3e8; }
.cd-flow b { font-size: 18px; line-height: 1.3; }
.cd-flow span { font-size: 16px; line-height: 1.4; color: var(--fg-2); }
.cd-flow__out { display: grid; justify-items: center; gap: 12px; margin-top: 32px; text-align: center; }
.cd-flow__out > span { font-size: 14px; color: var(--fg-3); }
.cd-flow__out ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cd-flow__out li { padding: 8px 16px; border-radius: 999px; background: #dcebf9; color: #004a8f; font-size: 16px; font-weight: 600; }
.cd-flow__back { margin: 24px 0 0; text-align: center; font-size: 14px; color: var(--fg-3); }
.cd-flow__back::before { content: "↺ "; color: #005fb8; font-size: 16px; }
@container (max-width: 559px) {
  .cd-flow ol { grid-template-columns: minmax(0, max-content); justify-content: center; gap: 24px; }
  .cd-flow ol > li { justify-items: start; padding: 4px 0 0 48px; text-align: left; }
  .cd-flow ol > li::before { left: 0; }
  .cd-flow ol > li:not(:last-child)::after { top: 40px; left: 15px; right: auto; bottom: -20px; width: 2px; height: auto; }
}
.cd-fan { display: grid; justify-items: center; width: 100%; text-align: center; }
.cd-fan__src { position: relative; padding: 12px 24px; border-radius: 999px; background: #005fb8; color: #fff; font-size: 18px; font-weight: 600; margin-bottom: 48px; }
.cd-fan__src::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 24px; margin-left: -1px; background: #8ba3ba; }
.cd-fan ul { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 16px; width: 100%; margin: 0; padding: 0; list-style: none; }
.cd-fan ul::before { content: ""; position: absolute; top: -24px; left: calc((100% - (var(--n) - 1) * 16px) / var(--n) / 2 - 1px); right: calc((100% - (var(--n) - 1) * 16px) / var(--n) / 2 - 1px); height: 2px; background: #8ba3ba; }
.cd-fan li { position: relative; display: grid; gap: 4px; padding: 16px 8px; border-radius: 16px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.08); }
.cd-fan li::before { content: ""; position: absolute; bottom: 100%; left: 50%; width: 2px; height: 24px; margin-left: -1px; background: #8ba3ba; }
.cd-fan li b { font-size: 18px; font-weight: 600; }
.cd-fan li span { font-size: 14px; color: var(--fg-3); }
.cd-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 32px; width: 100%; text-align: center; }
.cd-figures b { display: block; margin-bottom: 8px; font-size: 48px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; color: #005fb8; }
.cd-figures span { font-size: 16px; line-height: 1.4; color: var(--fg-2); }
.cd-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; width: 100%; margin: 0; padding: 0; list-style: none; }
.cd-tiers li { display: grid; justify-items: center; align-content: start; gap: 4px; min-width: 0; text-align: center; }
.cd-tiers .intent-pictogram { display: block; width: 100%; max-width: 120px; height: auto; max-height: 100px; margin: 0 auto 8px; }
.cd-tiers b { font-size: 18px; line-height: 1.3; }
.cd-tiers span { font-size: 16px; line-height: 1.4; color: var(--fg-2); }
@container (max-width: 559px) { .cd-tiers { grid-template-columns: 1fr 1fr; gap: 24px 16px; } .cd-tiers .intent-pictogram { max-width: 96px; } }
@media (max-width: 640px) {
  .cd-bars__row { grid-template-columns: 64px minmax(0, 1fr) 64px; font-size: 14px; }
  .cd-flow b, .cd-tiers b { font-size: 16px; }
  .cd-flow span, .cd-tiers span, .cd-figures span, .cd-flow__out li { font-size: 14px; }
  .cd-fan ul { grid-template-columns: 1fr 1fr; gap: 32px 12px; }
  .cd-fan ul::before { display: none; }
  .cd-fan__src { margin-bottom: 24px; font-size: 16px; }
  .cd-fan__src::after { display: none; }
  .cd-fan li::before { display: none; }
  .cd-fan li b { font-size: 16px; }
  .cd-figures b { font-size: 40px; }
}

.case .gallery figcaption a { display: inline-flex; align-items: center; gap: 4px; }
.case .gallery figcaption svg { width: 14px; height: 14px; flex: none; }
.case--intent .gallery .frame { display: grid; place-items: center; padding: 48px; }
.case--intent .gallery img { display: block; width: min(100%, 720px); border-radius: 12px; box-shadow: 0 16px 32px #005fb81f; }
@media (max-width: 640px) { .case--intent .gallery .frame { padding: 24px; border-radius: 24px; } }
.case-fig--specimen .intent-demo { margin: 0; gap: 16px; }
.case-fig--specimen .intent-demo__composition { border-radius: 28px; }
.case-fig--specimen .intent-demo .intent-demo__feedback { min-height: 0; font-size: 14px; line-height: 20px; color: var(--fg-2); }
.intent-demo .intent-demo__toggle-panel > span, .intent-demo p.intent-demo__slots { font-size: 14px; line-height: 20px; }
.intent-demo__window-actions { font-size: 14px; }

/* Work: company sub-groups */
.side .side__sub { padding-left: 26px; font-weight: 450; color: var(--fg-2); font-size: var(--text-xs); }
.side .side__sub[aria-current="true"] { color: var(--fg); }
.finder-group { display: flex; align-items: baseline; gap: 8px; margin: 18px 24px 0; font-size: var(--text-md); font-weight: 650; }
.finder-group span { font-size: var(--text-xs); font-weight: 500; color: var(--fg-3); }
.finder-group + .files, .finder-group + .flist { padding-top: 10px; }
.about__bio p { margin: 0 0 12px; }
/* Inline project links in the bio: a small tinted pill with the case thumbnail as a 1em icon. */
.ilink { display: inline; padding: 0.08em 0.4em 0.1em 0.24em; margin: 0 0.04em; border-radius: 999px; background: rgb(var(--accent-rgb) / 0.08); color: var(--fg); text-decoration: none; white-space: nowrap; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background var(--d-2, 150ms), color var(--d-2, 150ms); }
.ilink > img, .ilink > svg { display: inline-block; width: 1em; height: 1em; margin-right: 0.3em; border-radius: 0.25em; object-fit: cover; vertical-align: -0.14em; }
.ilink > span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: rgb(var(--accent-rgb) / 0.45); }
a.ilink:hover { background: rgb(var(--accent-rgb) / 0.14); color: var(--accent); }
a.ilink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ilink--static { background: rgb(var(--accent-rgb) / 0.05); }
.ilink--static > span { text-decoration: none; }
/* Profile page: pills read as pills, no underline (focus ring and hover stay) */
.about__bio .ilink > span { text-decoration: none; }

/* Specimen slot structure; token projection is scoped to this specimen. */
:is(.s-reader__body, .win__body):has(> .case) { background: #fff; color-scheme: light; }
.case--intent { --fg: #151d25; --fg-2: #4a5b6b; --fg-3: #5c6e7c; --accent: #005fb8; --on-accent: #fff; --card: #f0f7ff; --card-border: transparent; --field: #edf5fe; --separator: #dce7f1; --hover: #e4f1ff; color: var(--fg); color-scheme: light; background: #fff; font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; }
.case--intent .h-display { font-family: inherit; letter-spacing: -0.035em; }
.intent-demo { --intent-accent: var(--color-control-ramp-brand-background-rest); --intent-paper: #fff; position: relative; display: grid; grid-template-columns: 1fr; gap: 18px; padding: 0; margin: 24px 0; color: #172633; font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; }
.intent-demo__kicker { color: var(--color-container-ramp-foreground-secondary); }
.intent-demo__composition { --intent-accent: var(--color-control-ramp-brand-background-rest); --cursor-home-x: 200px; --cursor-home-y: 380px; --cursor-toggle-x: 0px; --cursor-toggle-y: 0px; --cursor-keep-x: 0px; --cursor-keep-y: 0px; --cursor-swatch-x: 0px; --cursor-swatch-y: 0px; --cursor-taskbar-x: 0px; --cursor-taskbar-y: 0px; position: relative; height: 500px; min-width: 0; isolation: isolate; overflow: hidden; color: var(--color-container-ramp-foreground-primary); background: #f8fbfe; border-radius: 16px; transition: background-color 450ms; }
.intent-demo__composition[data-theme="dark"] { background: #102b45; }
.intent-demo .bk-window { background: var(--color-container-ramp-mica-default-luminosity); border-radius: var(--corner-page); }
.intent-demo .bk-layer { background: var(--color-container-layer-background-primary); border-radius: var(--corner-layer); backdrop-filter: blur(16px); }
.intent-demo__window { position: absolute; width: 65%; height: 260px; left: 24%; top: 108px; overflow: hidden; box-shadow: 0 22px 48px #005fb829; animation: intent-float 9s ease-in-out infinite reverse; }
.intent-demo__window-heading { display: flex; align-items: center; gap: var(--gap-ramp-xs); height: 44px; padding: 0 var(--padding-alignto-edge); }
.intent-demo__window-heading > i { width: 12px; height: 12px; background: var(--intent-accent); border-radius: var(--corner-control-default); }
.intent-demo__window-actions { margin-left: auto; font-size: 14px; opacity: 0.6; white-space: nowrap; }
.intent-demo__app-content { display: grid; grid-template-columns: 24% minmax(0, 1fr); gap: var(--gap-ramp-m); padding: var(--padding-alignto-edge); }
.intent-demo__app-rail { position: relative; display: grid; gap: 18px; align-content: start; padding-top: 6px; }
.intent-demo__app-rail::before { content: ""; position: absolute; top: 0; left: -5px; right: -5px; height: 17px; border-radius: var(--corner-control-default); background: var(--intent-accent); opacity: 0.13; animation: intent-rail 8s ease-in-out infinite; }
.intent-demo__app-rail i, .intent-demo__app-row span { height: 5px; background: var(--color-container-ramp-foreground-secondary); opacity: 0.2; border-radius: 8px; }
.intent-demo__app-rail i:nth-child(2) { width: 75%; }
.intent-demo__app-main { min-width: 0; }
.intent-demo__app-tiles { display: flex; gap: 12px; margin-bottom: 22px; }
.intent-demo__app-tiles i { width: 32px; height: 32px; border-radius: var(--corner-control-default); background: var(--intent-accent); opacity: 0.18; animation: intent-tile 8s ease infinite; }
.intent-demo__app-tiles i:nth-child(2) { animation-delay: 350ms; }
.intent-demo__app-tiles i:nth-child(3) { animation-delay: 700ms; }
.intent-demo__app-tiles i:nth-child(4) { animation-delay: 1050ms; }
.intent-demo__app-tiles i:first-child { opacity: 1; }
.intent-demo__app-tiles i:nth-child(3) { opacity: 0.4; }
.intent-demo__app-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.intent-demo__app-row i { width: 20px; height: 20px; border-radius: var(--corner-control-default); background: var(--intent-accent); opacity: 0.15; }
.intent-demo__app-row span { width: 45%; }
.intent-demo__app-row b { margin-left: auto; font-size: 20px; font-weight: 400; opacity: 0.4; }
.intent-demo__swatches { --swatch-size: 28px; --swatch-height: 28px; --swatch-gap: 8px; --swatch-pad: 10px; position: absolute; left: 8%; top: 38px; display: flex; gap: var(--swatch-gap); padding: var(--swatch-pad); transform: rotate(-6deg); box-shadow: 0 10px 24px #005fb81a; animation: intent-swatch-float 7s ease-in-out infinite; }
.intent-demo__swatches i { width: var(--swatch-size); height: var(--swatch-height); border-radius: var(--corner-control-default); background: #fff; }
.intent-demo__swatch-ring { position: absolute; top: calc(var(--swatch-pad) - 3px); left: calc(var(--swatch-pad) - 3px); width: calc(var(--swatch-size) + 6px); height: calc(var(--swatch-height) + 6px); border: 1px solid var(--intent-accent); border-radius: 6px; animation: intent-swatch-ring 8s steps(1) infinite; }
.intent-demo__swatches i:nth-child(2) { background: #d4e5f4; }
.intent-demo__swatches i:nth-child(3) { background: #8ec5f6; }
.intent-demo__swatches i:nth-child(4) { background: #0878d4; }
.intent-demo__swatches i:nth-child(5) { background: #243443; }
.intent-demo__toggle-panel { position: absolute; right: 6%; top: 30px; z-index: 1; display: grid; justify-items: center; gap: 6px; padding: 12px; box-shadow: 0 12px 28px #005fb81f; animation: intent-float 6s ease-in-out infinite; }
.intent-demo .bk-toggle { display: flex; align-items: center; width: var(--size-control-toggleswitch-base-width); height: var(--size-control-toggleswitch-base-height); padding: var(--padding-control-toggleswitch-base-rest); border-radius: calc(var(--size-control-toggleswitch-base-height) / 2); background: var(--color-control-choice-background-rest); box-shadow: inset 0 0 0 var(--strokewidth-control-medium-default) var(--color-control-choice-stroke-rest); }
.intent-demo .bk-toggle i { width: var(--size-control-toggleswitch-thumb-rest); height: var(--size-control-toggleswitch-thumb-rest); border-radius: 50%; background: var(--color-control-choice-toggleswitch-thumb-background-rest); transition: transform 200ms, background-color 200ms; }
.intent-demo .bk-toggle[data-selected="true"] { background: var(--color-control-choice-selected-background-rest); box-shadow: none; }
.intent-demo .bk-toggle[data-selected="true"] i { background: var(--color-control-choice-toggleswitch-selected-thumb-background-rest); transform: translateX(calc(var(--size-control-toggleswitch-base-width) - var(--size-control-toggleswitch-thumb-rest) - var(--padding-control-toggleswitch-base-rest) * 2)); }
.intent-demo__card-float { position: absolute; z-index: 2; top: 232px; left: 7%; width: min(320px, 60%); animation: intent-float 7s ease-in-out infinite; }
.intent-demo .bk-card { background: #fff; color: var(--color-container-card-primary-foreground); border-radius: var(--corner-card); box-shadow: var(--shadows-cardrest-x) var(--shadows-cardrest-y) var(--shadows-cardrest-blur) var(--shadows-cardrest-spread) var(--shadows-cardrest-color), 0 18px 40px #005fb829; overflow: hidden; }
.intent-demo__composition[data-theme="dark"] .bk-card { background: #2b2b2b; }
.intent-demo :is(.bk-window, .bk-card, .bk-layer) { transition: background-color 450ms, color 450ms; }
.intent-demo__content-slot { display: flex; flex-direction: column; }
.intent-demo__card-body { display: flex; flex-direction: column; gap: var(--gap-ramp-xs); padding: var(--padding-alignto-edge) 0; }
.intent-demo__card-row { display: flex; padding: 0 var(--padding-alignto-edge); min-width: 0; }
.intent-demo__card-row :is(h3, p) { margin: 0; }
.intent-demo__keep { margin-top: var(--gap-ramp-xs); max-width: 100%; }
.intent-demo__slots { margin: 12px 0 0 4px; color: var(--color-container-ramp-foreground-secondary); }
.intent-demo__taskbar { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; padding: 10px 16px; box-shadow: 0 8px 20px #005fb814; }
.intent-demo__taskbar i { width: 20px; height: 20px; border-radius: var(--corner-control-default); background: var(--intent-accent); opacity: 0.4; animation: intent-taskbar 8s ease-in-out infinite; }
.intent-demo__taskbar i:nth-child(2) { animation-delay: 100ms; }
.intent-demo__taskbar i:nth-child(3) { animation-delay: 200ms; }
.intent-demo__taskbar i:nth-child(4) { animation-delay: 300ms; }
.intent-demo__taskbar i:nth-child(5) { animation-delay: 400ms; }
.intent-demo__taskbar i:first-child { opacity: 1; }
.intent-demo__taskbar i:nth-child(3) { background: #76c3dd; opacity: 0.7; }
.intent-demo__desktop-guides { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #438dd0; stroke-width: 1; stroke-dasharray: 4 8; opacity: 0.5; pointer-events: none; }
.intent-demo__desktop-guides circle { fill: #0878d4; stroke: none; }
.intent-demo__cursor { position: absolute; z-index: 4; left: 0; top: 0; width: 42px; height: 52px; color: var(--intent-accent); filter: drop-shadow(0 6px 6px #005fb824); transform: translate(var(--cursor-home-x), var(--cursor-home-y)); animation: intent-cursor 8s cubic-bezier(.45,0,.2,1) infinite; pointer-events: none; }
.intent-demo__cursor svg { width: 100%; height: 100%; }
.intent-demo__ripple { position: absolute; top: -5px; left: -4px; width: 18px; height: 18px; border: 2px solid currentColor; border-radius: 50%; opacity: 0; animation: intent-click 8s linear infinite; }
.intent-demo__controls { position: relative; grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-ramp-xs); padding-top: var(--padding-alignto-edge); }
.intent-demo__controls [role="group"] { display: flex; gap: var(--gap-ramp-xs); flex-wrap: wrap; }
.intent-demo .bk-button { --bk-bg: var(--color-control-ramp-neutral-background-rest); --bk-fg: var(--color-control-ramp-neutral-foreground-primary-rest); --bk-s1: var(--color-control-ramp-neutral-stroke-rest-stop1); --bk-s2: var(--color-control-ramp-neutral-stroke-rest-stop2); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--gap-control-default); min-width: var(--size-control-min); min-height: var(--size-control-min); padding: var(--padding-control-withtext-vertical) var(--padding-control-withtext-horizontal); border: var(--strokewidth-control-default) solid var(--bk-s1); border-bottom-color: var(--bk-s2); border-radius: var(--corner-control-default); background-color: var(--bk-bg); color: var(--bk-fg); cursor: pointer; transition: background-color 200ms, color 200ms; }
.intent-demo .bk-button:hover { --bk-bg: var(--color-control-ramp-neutral-background-hover); --bk-fg: var(--color-control-ramp-neutral-foreground-primary-hover); --bk-s1: var(--color-control-ramp-neutral-stroke-hover-stop1); --bk-s2: var(--color-control-ramp-neutral-stroke-hover-stop2); }
.intent-demo .bk-button:active { --bk-bg: var(--color-control-ramp-neutral-background-pressed); --bk-fg: var(--color-control-ramp-neutral-foreground-primary-pressed); --bk-s1: var(--color-control-ramp-neutral-stroke-pressed); --bk-s2: var(--color-control-ramp-neutral-stroke-pressed); }
.intent-demo .bk-button[data-style="brand"] { --bk-bg: var(--color-control-ramp-brand-background-rest); --bk-fg: var(--color-control-ramp-brand-foreground-rest); --bk-s1: var(--color-control-ramp-brand-stroke-stop1); --bk-s2: var(--color-control-ramp-brand-stroke-stop2); }
.intent-demo .bk-button[data-style="brand"]:hover { --bk-bg: var(--color-control-ramp-brand-background-hover); --bk-fg: var(--color-control-ramp-brand-foreground-hover); }
.intent-demo .bk-button[data-style="brand"]:active { --bk-bg: var(--color-control-ramp-brand-background-pressed); --bk-fg: var(--color-control-ramp-brand-foreground-pressed); }
.intent-demo .bk-button[aria-pressed="true"] { --bk-bg: var(--color-control-ramp-selected-background-rest); --bk-fg: var(--color-control-ramp-selected-foreground-primary-rest); --bk-s1: var(--color-control-ramp-selected-stroke-stop1); --bk-s2: var(--color-control-ramp-selected-stroke-stop2); }
.intent-demo .bk-button[aria-pressed="true"]:hover { --bk-bg: var(--color-control-ramp-selected-background-hover); }
.intent-demo .bk-button:disabled { --bk-bg: var(--color-control-ramp-neutral-background-disabled); --bk-fg: var(--color-control-ramp-neutral-foreground-primary-disabled); --bk-s1: var(--color-control-ramp-neutral-stroke-disabled); --bk-s2: var(--color-control-ramp-neutral-stroke-disabled); cursor: default; }
.intent-demo .bk-button:focus-visible { outline: var(--strokewidth-control-default) solid var(--color-container-ramp-foreground-primary); outline-offset: var(--padding-ramp-xxs); }
.intent-demo .intent-demo__keep[data-demo-state="pressed"] { --bk-bg: var(--color-control-ramp-brand-background-pressed); --bk-fg: var(--color-control-ramp-brand-foreground-pressed); transform: translateY(1px); }
.intent-demo__feedback { grid-column: 1 / -1; margin: 0; }
.intent-demo__feedback { min-height: 2em; }
.intent-pictogram { width: 120px; height: auto; max-height: 140px; }
.intent-pictogram__panel { fill: #fff; filter: drop-shadow(0 6px 6px #005fb81f); }
.intent-pictogram__guide { fill: none; stroke: #84b2de; stroke-width: 1; stroke-dasharray: 3 5; stroke-linecap: round; }
.intent-pictogram__bar { fill: none; stroke: #c6d7e6; stroke-width: 5; stroke-linecap: round; }
.intent-demo__composition *, .intent-demo__composition *::before { animation-play-state: paused; }
.intent-demo[data-running="true"] .intent-demo__composition *, .intent-demo[data-running="true"] .intent-demo__composition *::before { animation-play-state: running; }
@keyframes intent-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes intent-swatch-float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(-4deg); } }
@keyframes intent-swatch-ring { 0%, 85%, 100% { transform: translateX(0); } 18% { transform: translateX(calc(var(--swatch-size) + var(--swatch-gap))); } 34% { transform: translateX(calc((var(--swatch-size) + var(--swatch-gap)) * 2)); } 50% { transform: translateX(calc((var(--swatch-size) + var(--swatch-gap)) * 3)); } 68% { transform: translateX(calc((var(--swatch-size) + var(--swatch-gap)) * 4)); } }
@keyframes intent-rail { 0%, 100% { transform: translateY(0); } 28%, 48% { transform: translateY(23px); } 60%, 80% { transform: translateY(46px); } }
@keyframes intent-tile { 0%, 12%, 100% { opacity: 0.18; } 24%, 82% { opacity: 1; } }
@keyframes intent-taskbar { 0%, 76%, 95%, 100% { transform: translateY(0); } 85% { transform: translateY(-8px); } }
@keyframes intent-cursor {
  0%, 95%, 100% { transform: translate(var(--cursor-home-x), var(--cursor-home-y)); }
  10%, 22% { transform: translate(var(--cursor-toggle-x), var(--cursor-toggle-y)); }
  30%, 42% { transform: translate(var(--cursor-keep-x), var(--cursor-keep-y)); }
  55%, 68% { transform: translate(var(--cursor-swatch-x), var(--cursor-swatch-y)); }
  80%, 88% { transform: translate(var(--cursor-taskbar-x), var(--cursor-taskbar-y)); }
}
@keyframes intent-click {
  0%, 14%, 30%, 54%, 78%, 100% { opacity: 0; transform: scale(0.25); }
  16%, 35%, 61%, 83% { opacity: 0.9; transform: scale(0.4); }
  22%, 42%, 68%, 90% { opacity: 0; transform: scale(2.5); }
}
@media (max-width: 640px) {
  .intent-demo__composition { height: 640px; }
  .intent-demo__window { width: 87%; left: 6%; top: 110px; height: 220px; }
  .intent-demo__taskbar { bottom: 20px; }
  .intent-demo__app-content { grid-template-columns: 18% minmax(0, 1fr); gap: 12px; }
  .intent-demo__app-tiles { gap: 8px; }
  .intent-demo__app-tiles i { width: 23px; height: 23px; }
  .intent-demo__swatches { --swatch-size: 18px; --swatch-height: 22px; --swatch-gap: 5px; --swatch-pad: 8px; top: 40px; left: 5%; }
  .intent-demo__toggle-panel { top: 24px; right: 5%; padding: 8px; }
  .intent-demo .intent-demo__toggle-panel > span, .intent-demo p.intent-demo__slots { font-size: 12px; line-height: 16px; }
  .intent-demo__card-float { top: 352px; left: 6%; width: 87%; }
  .intent-demo__cursor { width: 30px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .intent-demo, .intent-demo *, .intent-demo *::before { animation: none !important; transition: none !important; } }
[data-motion="reduced"] .intent-demo, [data-motion="reduced"] .intent-demo *, [data-motion="reduced"] .intent-demo *::before { animation: none !important; transition: none !important; }

/* ---------- Case study: showcase layout (opt-in, `layout: "showcase"`) ---------- */
.sc { --sc-bg: #f3f3f3; --sc-surface: #fff; --sc-layer: rgb(255 255 255 / 0.5); --sc-fg: #1a1a1a; --sc-fg-2: #4d4d4d; --sc-fg-3: #616161; --sc-accent: #005fb8; --sc-soft: #cfe4fa; --sc-line: rgb(0 0 0 / 0.08); --sc-glass: rgb(255 255 255 / 0.72); --sc-glass-line: rgb(255 255 255 / 0.6);
  --fg: var(--sc-fg); --fg-2: var(--sc-fg-2); --fg-3: var(--sc-fg-3); --panel: var(--sc-surface); --card: var(--sc-surface); --accent: var(--sc-accent); --separator: var(--sc-line);
  --sc-ui: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --sc-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  min-height: 100%; padding-bottom: 96px; background: var(--sc-bg); color: var(--sc-fg); font-family: var(--sc-ui); color-scheme: light; }
html[data-mode="dark"] .sc { --sc-bg: #1c1c1c; --sc-surface: #2b2b2b; --sc-layer: rgb(58 58 58 / 0.3); --sc-fg: #fff; --sc-fg-2: #d1d1d1; --sc-fg-3: #ababab; --sc-accent: #60cdff; --sc-soft: #0f3a5c; --sc-line: rgb(255 255 255 / 0.08); --sc-glass: rgb(32 32 32 / 0.66); --sc-glass-line: rgb(255 255 255 / 0.12); color-scheme: dark; }
.sc .eyebrow { font-family: var(--sc-ui); letter-spacing: 0.06em; color: var(--sc-fg-3); }
/* Hero */
.sc-hero { position: relative; display: grid; align-items: center; min-height: clamp(560px, calc(100vh - 120px), 900px); padding: 72px clamp(16px, 4vw, 64px) 56px; background: #6a8fc4 center / cover no-repeat; overflow: hidden; }
.sc-hero__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: center; width: 100%; max-width: 1320px; margin: 0 auto; }
.sc-pill { display: inline-flex; align-items: center; gap: 6px; border: 0; font: 600 14px/20px var(--sc-ui); cursor: pointer; }
.sc-pill { position: absolute; top: 20px; left: clamp(16px, 4vw, 64px); padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--sc-glass); color: var(--sc-fg); border: 1px solid var(--sc-glass-line); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); }
.sc-pill svg { width: 16px; height: 16px; flex: none; }
.sc-intro { padding: clamp(24px, 3vw, 40px); border-radius: 20px; background: var(--sc-glass); border: 1px solid var(--sc-glass-line); box-shadow: 0 16px 48px rgb(0 0 0 / 0.14); backdrop-filter: blur(28px) saturate(1.4); -webkit-backdrop-filter: blur(28px) saturate(1.4); }
.sc-intro h1 { margin: 8px 0 16px; font: 600 clamp(36px, 4.4vw, 60px)/1.05 var(--sc-ui); letter-spacing: -0.02em; }
.sc-intro p { margin: 0 0 12px; font-size: 17px; line-height: 1.5; color: var(--sc-fg-2); }
.sc-intro .sc-intro__role { margin-top: 20px; color: var(--sc-fg); }
.sc-intro .sc-intro__themes { margin: 0; font-size: 14px; color: var(--sc-fg-3); }
.sc-device { margin: 0; min-width: 0; }
.sc-device__screen { padding: clamp(6px, 0.8vw, 10px); border-radius: 14px 14px 4px 4px; background: #0f0f0f; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); }
.sc-device__screen img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.sc-device__hinge { width: 96%; height: 6px; margin: 0 auto; background: #2b2b2b; }
.sc-device__base { position: relative; height: clamp(10px, 1.2vw, 16px); margin: 0 -6%; border-radius: 2px 2px 14px 14px; background: linear-gradient(#e6e6e6, #b9b9b9 55%, #8f8f8f); box-shadow: 0 24px 48px rgb(0 0 0 / 0.35); }
.sc-device__base::before { content: ""; position: absolute; top: 0; left: 42%; width: 16%; height: 4px; border-radius: 0 0 6px 6px; background: #a0a0a0; }
/* Main */
.sc-main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.sc-sec { padding-top: clamp(48px, 6vw, 80px); scroll-margin-top: 16px; }
.sc-sec h2 { max-width: 20ch; margin: 0 0 16px; font: 500 clamp(32px, 4vw, 52px)/1.1 var(--sc-serif); letter-spacing: -0.01em; color: var(--sc-fg); text-wrap: balance; }
.sc-sec h2 em { font-style: italic; color: var(--sc-accent); }
.sc-prose { max-width: 720px; font-size: 18px; line-height: 1.6; color: var(--sc-fg-2); }
.sc-prose p, .sc-prose ul { margin: 0 0 16px; }
.sc-prose > :last-child { margin-bottom: 0; }
.sc-prose li { margin-bottom: 8px; }
.sc-prose strong { color: var(--sc-fg); }
.sc-prose a { color: var(--sc-accent); text-decoration: underline; text-underline-offset: 3px; }
.sc-prose .muted { color: var(--sc-fg-3); font-size: 15px; }
.sc-highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.sc-highlights .sc-card { display: grid; align-content: start; gap: 4px; }
.sc-highlights .sc-card__icon { margin-bottom: 12px; }
.sc-highlights b { font: 600 40px/1.1 "Segoe UI Variable Display", var(--sc-ui); letter-spacing: -0.01em; color: var(--sc-fg); }
.sc-highlights span { font-size: 14px; line-height: 1.4; color: var(--sc-fg-2); }
/* Flow: compact step cards */
.sc-tag { display: inline-block; margin-bottom: 16px; padding: 4px 12px; border-radius: 999px; background: var(--sc-surface); color: var(--sc-fg-2); font: 600 12px/16px var(--sc-ui); box-shadow: 0 4px 12px rgb(0 0 0 / 0.12); }
.sc-status { margin: 0 0 0 8px; padding: 2px 10px; vertical-align: middle; }
.sc-flow { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.sc-step { position: relative; padding: 20px; }
.sc-step__icon { display: block; width: 32px; height: 32px; margin-bottom: 12px; }
.sc-step__n { display: block; font-size: 12px; line-height: 16px; color: var(--sc-fg-3); }
.sc .sc-step h3 { margin: 2px 0 4px; font-size: 16px; }
.sc .sc-step p { font-size: 14px; }
.sc-stage { margin-top: 32px; padding: clamp(16px, 3.5vw, 48px); border-radius: 12px; background: var(--sc-soft) center / cover no-repeat; overflow: hidden; }
.sc-stage--plain { padding: 0; border-radius: 0; background: none; overflow: visible; }
/* Graphics that bring their own cards sit straight on the page. */
.sc-brand { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); }
.sc-brand img { width: clamp(64px, 9vw, 112px); height: auto; flex: none; }
.sc-brand div { display: grid; gap: 4px; }
.sc-brand b { font: 600 clamp(20px, 2.2vw, 28px)/1.2 var(--font-display, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif); letter-spacing: -0.01em; color: var(--fg); }
.sc-brand span { color: var(--fg-2); }
.sc-stage--bare { padding: 0; border-radius: 0; background: none; overflow: visible; }
.sc-stage--bare .sc-tag { padding: 0; background: none; box-shadow: none; color: var(--sc-fg-3); font-weight: 600; }
.sc-stage .case-fig { margin: 0; }
.sc-stage .case-fig__panel { background: transparent; padding: 0; }
.sc-fig { margin-top: 32px; }
.sc-fig .case-fig { margin: 0; }
.sc-fig .case-fig__panel { background: var(--sc-surface); }
.sc-shot { overflow: hidden; border-radius: 12px; box-shadow: 0 20px 48px rgb(0 0 0 / 0.22); background: #000; }
.sc-shot img, .sc-shot video { display: block; width: 100%; height: auto; }
.sc-shot img { cursor: zoom-in; }
.sc-caption { margin: 16px auto 0; max-width: 60ch; font-size: 14px; line-height: 1.4; color: var(--sc-fg-3); text-align: center; }
.sc-stage--film .sc-caption { color: #fff; }
/* Carousel */
.sc-carousel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.sc-carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 12px; }
.sc-carousel__track::-webkit-scrollbar { display: none; }
.sc-carousel__track:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.sc-slide { margin: 0; scroll-snap-align: center; }
.sc-carousel__btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--sc-glass-line); border-radius: 50%; background: var(--sc-glass); color: var(--sc-fg); font: 400 26px/1 var(--sc-ui); cursor: pointer; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.sc-carousel__btn:disabled { opacity: 0.4; cursor: default; }
/* Principle cards */
.sc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.sc-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sc-cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sc-principles .sc-card h3, .sc-cards .sc-card > h3:first-child { margin-top: 0; }
.sc-fan { display: grid; justify-items: center; gap: 12px; }
.sc-fan__src { display: flex; align-items: center; gap: 12px; padding: 16px 24px; }
.sc-fan__src h3 { margin: 0; }
.sc-fan .sc-cards { width: 100%; gap: 12px; }
@media (max-width: 600px) { .sc-fan .sc-cards { grid-template-columns: 1fr 1fr; } }
.sc-outputs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: var(--sc-surface); box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); }
.sc-outputs span { font-size: 12px; line-height: 16px; color: var(--sc-fg-3); }
.sc-outputs ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sc-outputs li { padding: 4px 10px; border-radius: 4px; background: var(--sc-soft); color: var(--sc-fg); font: 600 13px/18px var(--sc-ui); }
.sc-shot--narrow { max-width: 880px; margin: 0 auto; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; padding: 0; list-style: none; }
.sc-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border: 1px solid var(--sc-line); border-radius: 8px; background: var(--sc-surface); color: var(--sc-fg); font: 600 15px/20px var(--sc-ui); box-shadow: 0 2px 8px rgb(0 0 0 / 0.06); }
.sc-chips__icon { width: 24px; height: 24px; flex: none; }
.sc-after { margin-top: 24px; }
.sc-intro__links { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0 !important; }
/* Case external links use the system pill button (.btn) so every case button is rounded. */
.sc-link.btn { max-width: 100%; height: auto; min-height: 40px; padding-block: 8px; white-space: normal; text-align: left; text-decoration: none; font-family: inherit; }
.sc-herocard { display: grid; justify-items: start; gap: 16px; margin: 0; padding: clamp(24px, 4vw, 56px); border-radius: 20px; background: var(--sc-glass); border: 1px solid var(--sc-glass-line); box-shadow: 0 16px 48px rgb(0 0 0 / 0.14); backdrop-filter: blur(28px) saturate(1.4); -webkit-backdrop-filter: blur(28px) saturate(1.4); color: var(--sc-fg); }
.sc-herocard__k { font: 600 14px/20px var(--sc-ui); color: var(--sc-fg-3); letter-spacing: 0.06em; text-transform: uppercase; }
.sc-herocard b { font: 600 clamp(56px, 9vw, 128px)/1 "Segoe UI Variable Display", var(--sc-ui); letter-spacing: -0.03em; }
.sc-herocard b span { color: var(--sc-accent); }
.sc-herocard ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sc-herocard li { padding: 6px 12px; border-radius: 4px; background: var(--sc-surface); border: 1px solid var(--sc-line); font: 600 14px/20px var(--sc-ui); }
.sc-stage--specimen .case-fig--specimen { margin: 0; }
.sc-card { padding: 24px; border-radius: 16px; background: var(--sc-surface); box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); }
.sc-card h3 { margin: 16px 0 6px; font: 600 18px/1.3 var(--sc-ui); color: var(--sc-fg); }
.sc-card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--sc-fg-2); }
.sc-card__icon { width: 40px; height: 40px; }
.sc-i-panel { fill: var(--sc-soft); } .sc-i-fill { fill: var(--sc-accent); } .sc-i-soft { fill: var(--sc-soft); stroke: var(--sc-accent); stroke-width: 2; }
.sc-i-stroke { fill: none; stroke: var(--sc-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sc-i-line { fill: none; stroke: var(--sc-accent); stroke-width: 2.5; stroke-linecap: round; }
/* End-of-page footer */
.sc :focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 2px; }
@media (min-width: 1200px) { .sc-hero__inner { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1199px) { .sc-highlights, .sc-cards--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .sc-flow { grid-template-columns: 1fr; }
  .sc-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 16px; align-items: center; padding: 16px; }
  .sc-step > :not(.sc-step__icon) { grid-column: 2; }
  .sc-step__icon { grid-row: 1 / span 3; margin: 0; }
  .sc-hero { min-height: 0; padding-top: 72px; }
  .sc-hero__inner { grid-template-columns: 1fr; }
  .sc-device { order: -1; }
  .sc-device__base { margin: 0 -3%; }
  .sc-cards:not(.sc-cards--4) { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sc-highlights, .sc-cards--4 { grid-template-columns: 1fr; }
  .sc-device__base { margin: 0 -2%; }
}
@media (max-width: 560px) {
  .sc-carousel { grid-template-columns: 1fr; }
  .sc-carousel__btn { display: none; }
  .sc-carousel__track { grid-auto-columns: 88%; }
  .sc-intro p { font-size: 16px; }
}
.sc .case-fig > figcaption { text-align: center; }
/* Per-case wallpaper pairs: --wl light, --wd dark (stages set them when they scroll near). */
.sc-hero--wall { background-image: var(--wl); }
html[data-mode="dark"] .sc-hero--wall { background-image: var(--wd); }
.sc-stage--wall { position: relative; isolation: isolate; background: var(--sc-soft); }
.sc-stage--wall::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--wl) center / cover no-repeat; scale: var(--z, 1); transform-origin: var(--o, center); }
html[data-mode="dark"] .sc-stage--wall::before { background-image: var(--wd); }
/* Film cases (msFilm): film-led hero, embed, justified stills mosaic, Behance metrics */
.sc-filmhero { position: relative; margin: 0; min-width: 0; }
.sc-filmhero .sc-shot { border-radius: 8px; box-shadow: 0 2px 8px rgb(0 0 0 / 0.16), 0 24px 56px rgb(0 0 0 / 0.32); }
.sc-filmhero img { aspect-ratio: 16 / 9; object-fit: cover; cursor: pointer; }
.sc-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 72px; height: 72px; padding: 0; translate: -50% -50%; border: 1px solid rgb(255 255 255 / 0.3); border-radius: 50%; background: rgb(0 0 0 / 0.55); color: #fff; cursor: pointer; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 8px 24px rgb(0 0 0 / 0.3); transition: background 0.15s, scale 0.15s; }
.sc-play:hover { background: rgb(0 0 0 / 0.72); scale: 1.06; }
.sc-play svg { width: 28px; height: 28px; margin-left: 3px; fill: currentColor; }
.sc-play span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sc .sc-play:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.sc-embed { aspect-ratio: 16 / 9; }
.sc-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
/* Film grid (launch films): a card plays its film in the player above; links open its own pages */
.sc-films { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 16px; margin: 32px 0 0; padding: 0; list-style: none; }
.sc-film h3 { margin: 12px 0 2px; font: 600 15px/20px var(--sc-ui); color: var(--sc-fg); text-wrap: balance; }
.sc-film p { margin: 0; font-size: 13px; line-height: 18px; color: var(--sc-fg-3); }
.sc-film__play { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; box-shadow: 0 8px 24px rgb(0 0 0 / 0.16); }
.sc-film__play img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale 0.3s ease; }
.sc-film__play:hover img { scale: 1.04; }
.sc-film__play:focus-visible, .sc-film.is-playing .sc-film__play { outline: 2px solid var(--sc-accent); outline-offset: 3px; }
.sc-film__icon { position: absolute; inset: 0; display: grid; place-items: center; width: 44px; height: 44px; margin: auto; border-radius: 50%; background: rgb(0 0 0 / 0.5); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sc-film__icon svg { width: 18px; height: 18px; margin-left: 2px; fill: currentColor; }
.sc-film__now { position: absolute; left: 8px; top: 8px; display: none; padding: 2px 8px; border-radius: 999px; background: var(--sc-accent); color: var(--sc-bg); font: 600 11px/16px var(--sc-ui); }
.sc-film.is-playing .sc-film__now { display: block; }
.sc-film.is-playing .sc-film__icon { display: none; }
.sc-film .sc-film__links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.sc-film__links a { display: inline-flex; align-items: center; gap: 4px; color: var(--sc-accent); font-weight: 600; text-decoration: none; }
.sc-film__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sc-film__links .arrow { width: 12px; height: 12px; }
@media (max-width: 1199px) { .sc-films { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .sc-films { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .sc-films { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .sc-film__play img { transition: none; } .sc-film__play:hover img { scale: none; } }
.sc-mosaic { display: grid; gap: 16px; }
.sc-mosaic__row { display: flex; gap: 16px; }
.sc-mosaic .sc-shot { flex: var(--ar) 1 0; min-width: 0; border-radius: 8px; }
.sc-mosaic img { aspect-ratio: var(--ar); object-fit: cover; }
/* Floating UI panels: transparent art, no plate or frame shadow; panels keep their own baked edge. */
.sc-mosaic .sc-shot--float { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.sc-mosaic .sc-shot--float img { object-fit: contain; }
.sc-highlights.sc-highlights--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; margin-top: 32px; }
.sc-tags { display: flex; flex-wrap: wrap; gap: 8px; max-width: 720px; margin: 24px 0 0; padding: 0; list-style: none; }
.sc-tags li { padding: 4px 10px; border: 1px solid var(--sc-line); border-radius: 4px; background: var(--sc-surface); color: var(--sc-fg-2); font: 600 13px/18px var(--sc-ui); }
.sc .sc-credits__h { margin: 32px 0 12px; font: 600 16px/1.3 var(--sc-ui); color: var(--sc-fg); }
.sc-credits { font-size: 15px; color: var(--sc-fg-2); }
.sc-credits span { color: var(--sc-fg-3); }
@media (prefers-reduced-motion: reduce) { .sc-play, .sc-play:hover { transition: none; scale: none; } }
@media (max-width: 900px) { .sc-filmhero { order: -1; } }
@media (max-width: 600px) { .sc-mosaic__row { flex-direction: column; } .sc-mosaic .sc-shot { flex: none; } .sc-play { width: 56px; height: 56px; } .sc-play svg { width: 22px; height: 22px; } }
/* ClinicOS: framed hero shot, 3-up metrics, pull quote, numbered decisions, A/B bars */
.sc-heroshot { margin: 0; min-width: 0; }
.sc-shot--small { max-width: 440px; margin: 0 auto; border-radius: 8px; }
.sc-heroshot .sc-shot { border-radius: 8px; box-shadow: 0 2px 8px rgb(0 0 0 / 0.16), 0 24px 56px rgb(0 0 0 / 0.32); }
.sc .sc-highlights.sc-highlights--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sc-sec > .sc-highlights--3 { margin-top: 32px; }
.sc-quote { max-width: 760px; margin: 40px 0 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--sc-accent); }
.sc-quote p { margin: 0; font: 400 clamp(22px, 2.4vw, 28px)/1.35 var(--sc-serif); color: var(--sc-fg); text-wrap: pretty; }
.sc-quote cite { display: block; margin-top: 12px; font: 600 14px/20px var(--sc-ui); font-style: normal; color: var(--sc-fg-3); }
.sc-numbered__n { display: block; margin-bottom: 12px; font: 600 28px/1 "Segoe UI Variable Display", var(--sc-ui); color: var(--sc-accent); }
.sc-ab { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 960px; margin: 0 auto; }
.sc-ab__v h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; }
.sc-ab__pill { padding: 2px 8px; border-radius: 4px; background: var(--sc-accent); color: #fff; font: 600 12px/16px var(--sc-ui); }
html[data-mode="dark"] .sc-ab__pill { color: #000; }
.sc-ab dl { display: grid; gap: 16px; margin: 0; }
.sc-ab dt { font-size: 14px; line-height: 20px; color: var(--sc-fg-2); }
.sc-ab dd { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 12px; margin: 4px 0 0; }
.sc-ab dd b { font: 600 20px/1 "Segoe UI Variable Display", var(--sc-ui); color: var(--sc-fg); }
.sc-ab__track { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--sc-fg) 12%, transparent); overflow: hidden; }
.sc-ab__track span { display: block; height: 100%; border-radius: 4px; background: var(--sc-accent); }
@media (max-width: 900px) { .sc .sc-highlights.sc-highlights--3, .sc-ab { grid-template-columns: 1fr; } .sc-heroshot { order: -1; } }
@media (max-width: 600px) { .sc-mosaic__row--wrap { display: grid; grid-template-columns: 1fr 1fr; align-items: start; } }

/* ---------- Case carousel (Simple Slider view + OS Work slideshow) ---------- */
.ccar { container: ccar / inline-size; --cc-w: min(760px, 52cqw, 52svh * 16 / 9); --cc-r: 22px; position: relative; isolation: isolate; } /* the slides' z-index stays inside the carousel */
/* The ring: cards are absolutely placed and moved by js/carousel.js; nothing clips them */
.ccar__track { position: relative; outline: none; cursor: grab; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.ccar.is-held .ccar__track { cursor: grabbing; }
.ccar__track:focus-visible .ccar__slide.is-active .ccar__inner { outline: 2px solid var(--fg); outline-offset: 3px; }
.ccar__slide { position: absolute; left: 50%; top: calc(50% + var(--lean, 0px)); width: var(--cc-w); transform-origin: center; cursor: pointer; }
.ccar__slide.is-active { cursor: default; }
/* Drift: each card bobs (up and down only, so the front card stays level) on its own period (set inline) so the ring never breathes in unison. The perspective lives here, per card, for the press. */
.ccar__float { perspective: 1200px; animation: ccar-bob 5s ease-in-out infinite; }
@keyframes ccar-bob { 0%, 100% { transform: translateY(-2.4px); } 50% { transform: translateY(2.4px); } }
.ccar__inner { position: relative; aspect-ratio: 16 / 9; border-radius: var(--cc-r); overflow: hidden; container-type: size; background: color-mix(in oklab, var(--fg) 6%, var(--s-bg, #fff)); box-shadow: 0 12px 28px -10px rgb(0 0 0 / 0.28); }
.ccar__sheen { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ccar__cap, .ccar__media::after { transition: opacity 0.2s ease; }
.ccar__slide:not(.is-active) .ccar__cap, .ccar__slide:not(.is-active) .ccar__media::after { opacity: 0; }
.ccar__slide:not(.is-active) .ccar__cta { pointer-events: none; }
.ccar__media { position: absolute; inset: 0; display: block; }
.ccar__img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.ccar__media::after { content: ""; position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(to top, rgb(0 0 0 / 0.62), rgb(0 0 0 / 0.28) 55%, transparent); pointer-events: none; }
.ccar__cap { position: absolute; z-index: 2; inset: auto 0 0; display: flex; align-items: center; gap: 16px; padding: 0 clamp(16px, 3cqw, 32px) clamp(14px, 3cqw, 28px); color: #fff; pointer-events: none; }
.ccar__cap p { margin: 0; min-width: 0; font-size: clamp(14px, 1.6cqw, 17px); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgb(0 0 0 / 0.3); }
.ccar__cap b { font-weight: 600; }
.ccar__cta { flex: none; height: 36px; padding: 0 16px; border-radius: 999px; background: #fff; color: #1a1a1a; font: 600 14px/1 inherit; cursor: pointer; pointer-events: auto; }
.ccar__cta:hover { background: #f0f0f0; }
.ccar__cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ccar__ctrl { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; }
.ccar__scrub { max-width: 100%; }
.ccar__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
@container ccar (max-width: 767px) {
  /* Narrow: caption sits under the full 16:9 media so it never covers the UI */
  .ccar__slide { width: 84cqw; }
  .ccar__inner { --cc-r: 16px; aspect-ratio: auto; container-type: inline-size; display: flex; flex-direction: column; }
  .ccar__media { position: relative; inset: auto; aspect-ratio: 16 / 9; }
  .ccar__media::after { display: none; }
  .ccar__cap { position: static; flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 16px 16px; color: var(--fg); }
  .ccar__cap p { min-height: calc(2em * 1.35); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-shadow: none; font-size: 14px; }
  .ccar__cta { height: 32px; padding: 0 14px; font-size: 13px; order: 2; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fg) 16%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .ccar__cap, .ccar__media::after { transition: none; } .ccar__float { animation: none; } }
/* Case footer, shared by every case layout: two compact Previous / Next buttons at the system .btn size. */
.case-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: clamp(48px, 6vw, 80px); padding-top: 24px; border-top: 1px solid var(--separator); }
.case-foot__pill.btn { max-width: min(100%, calc(50% - 6px), 420px); min-width: 0; text-decoration: none; font-family: inherit; }
.case-foot__pill--next { margin-left: auto; }
.case-foot__pill small { flex: none; font-size: inherit; font-weight: 400; color: var(--fg-2); }
.case-foot__pill b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.case-foot__pill > svg { flex: none; }
.case-foot__pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 480px) { .case-foot__pill b { display: none; } }
/* Article layout (layout: "article"): a Medium-style reader on the same 1280px column and gutters as the
   showcase cases. Text keeps a ~720px measure on the left edge; the hero and figures use the full column. */
.art { --sc-bg: #fff; padding: 0 0 96px; }
html[data-mode="dark"] .art { --sc-bg: #1c1c1c; }
.art-col { max-width: 1280px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 32px) 0; }
.art-head, .art-body > section > :not(.art-fig), .art-end { max-width: 720px; }
.art-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 clamp(24px, 4vw, 48px) -8px; padding: 6px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--sc-fg-2); font: 400 14px/20px var(--sc-ui); cursor: pointer; }
.art-back svg { width: 16px; height: 16px; flex: none; }
.art-back:hover { color: var(--sc-fg); background: var(--sc-line); }
.art-back:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 2px; }
.art-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--sc-fg-3); font: 600 13px/18px var(--sc-ui); letter-spacing: 0.04em; }
.art-kicker .sc-status { margin: 0; box-shadow: none; border: 1px solid var(--sc-line); }
.art-head h1 { margin: 0; font: 600 clamp(36px, 6vw, 52px)/1.12 var(--sc-serif); letter-spacing: -0.015em; color: var(--sc-fg); text-wrap: balance; }
.art-dek { margin: 16px 0 0; font: 400 clamp(20px, 2.4vw, 24px)/1.4 var(--sc-ui); color: var(--sc-fg-2); text-wrap: pretty; }
.art-byline { display: flex; flex-wrap: wrap; margin: 24px 0 0; padding: 16px 0; border-block: 1px solid var(--sc-line); color: var(--sc-fg-2); font: 400 14px/20px var(--sc-ui); }
.art-byline span:first-child { color: var(--sc-fg); font-weight: 600; }
.art-byline span + span::before { content: "·"; margin: 0 8px; color: var(--sc-fg-3); }
.art-fig { margin: 40px 0; }
.art-fig img { display: block; width: 100%; height: auto; border-radius: 8px; }
.art-fig figcaption { margin-top: 10px; color: var(--sc-fg-3); font: 400 14px/20px var(--sc-ui); text-wrap: balance; }
.art-fig--hero { margin-top: 32px; }
.art-fig--hero picture, .art-fig--hero img { display: block; width: 100%; aspect-ratio: 1200 / 750; border-radius: 8px; object-fit: cover; }
.art-body { font: 400 20px/1.6 var(--sc-serif); color: var(--sc-fg); }
.art-body h2 { margin: 56px 0 12px; font: 700 clamp(24px, 3vw, 28px)/1.25 var(--sc-ui); letter-spacing: -0.01em; color: var(--sc-fg); text-wrap: balance; }
.art-body p, .art-body ul, .art-body ol { margin: 0 0 24px; }
.art-body ul, .art-body ol { padding-left: 1.4em; }
.art-body li { margin: 0 0 10px; padding-left: 4px; }
.art-body strong { font-weight: 700; }
.art-pull { margin: 40px 0; padding: 0 0 0 24px; border-left: 3px solid var(--sc-fg); }
.art-pull p { margin: 0; font: italic 400 clamp(26px, 3.4vw, 32px)/1.35 var(--sc-serif); color: var(--sc-fg); }
.art-end { display: grid; justify-items: start; gap: 12px; margin-top: 40px; }
.art-end .muted { margin: 0; color: var(--sc-fg-3); font: 400 14px/20px var(--sc-ui); }
@media (max-width: 600px) {
  .art-body { font-size: 18px; }
  .art-fig { margin: 32px 0; }
}
/* Carousel slides: the track clips shadows, so slides sit flat on one surface. */
.sc-slide .sc-shot { box-shadow: none; background: none; }
/* Wide diagrams scroll sideways on small screens instead of shrinking past legibility. */
@media (max-width: 600px) {
  .sc-shot--wide { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .sc-shot--wide img { width: 900px; max-width: none; }
}

/* ---------- Tick scrubber (js/scrubber.js) ---------- */
.tsc { --tsc-fg: var(--s-fg, var(--fg)); display: flex; justify-content: center; align-items: center; height: 40px; padding: 0 6px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.tsc__tick { position: relative; display: grid; place-items: center; width: 13px; height: 100%; }
.tsc__tick b { position: relative; display: block; width: 3px; height: 11px; border-radius: 999px; overflow: hidden; background: color-mix(in oklab, var(--tsc-fg) 28%, transparent);
  transform: scaleY(calc(1 + var(--near, 0) * 0.6)); transition: height 0.45s var(--ease-spring, cubic-bezier(.3, 1.4, .5, 1)), transform 0.2s var(--ease-out, ease-out), background 0.2s; }
.tsc__tick:hover b { background: color-mix(in oklab, var(--tsc-fg) 55%, transparent); }
.tsc__tick.is-on b { height: 26px; transform: none; background: var(--tsc-fg); }
.tsc:focus-visible .tsc__tick.is-on b { box-shadow: 0 0 0 3px color-mix(in oklab, var(--tsc-fg) 25%, transparent); overflow: visible; }
@media (prefers-reduced-motion: reduce) { .tsc__tick b { transition: none; } }

/* Simple Profile: TV and tickets stay compact; the two cities sit side by side */
.about--sheet .story { max-width: none; }
.about--sheet .tv, .about--sheet .cinema { max-width: 520px; }

/* ---------- Case mockups (js/casemocks.js): live HTML figures in place of flat images ---------- */
.cm { --cm-sky: #00b7f4; --cm-btn: #4fb3ee; --cm-ink: #1d1d1f; --cm-ink-2: #4b4f56; --cm-ink-3: #8a8f98; --cm-surface: #fff;
  font-family: Urbanist, var(--sc-ui); color: var(--cm-ink); -webkit-font-smoothing: antialiased; }
.cm-ic { width: 16px; height: 16px; flex: none; }
.cm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* Phone */
.cm-phone { --w: 232px; width: var(--w); aspect-ratio: 9 / 19; flex: none; padding: 7px; border-radius: 38px; background: #0b1a24; box-shadow: 0 1px 0 rgb(255 255 255 / 0.14) inset, 0 28px 56px -18px rgb(2 71 103 / 0.45), 0 4px 14px rgb(2 40 60 / 0.12); }
.cm-screen { position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 32px 14px 12px; border-radius: 31px; background: var(--cm-surface); overflow: hidden; font-size: 10.5px; line-height: 1.45; }
.cm-screen::before { content: ""; position: absolute; top: 9px; left: 50%; width: 64px; height: 18px; border-radius: 999px; background: #0b1a24; transform: translateX(-50%); }
.cm-art { display: block; width: 100%; height: auto; }
/* The shipped app, as built: white, Urbanist, sky buttons, "Powered by ClinicOS" */
.cm-app__bar { display: flex; justify-content: space-between; align-items: center; color: var(--cm-ink); }
.cm-app__bar .cm-ic { width: 14px; height: 14px; }
.cm-app__bar > i { width: 14px; }
.cm-app__bar--title b { font-size: 12.5px; font-weight: 700; }
.cm-app__h { margin: 0; font: 700 15px/1.2 Urbanist, var(--sc-ui); }
.cm-app__sub { margin: -6px 0 0; color: var(--cm-ink-2); font-size: 9.5px; }
.cm-app__p { margin: 0; color: var(--cm-ink-2); }
.cm-app__p b { color: var(--cm-ink); }
.cm-app__logo { display: grid; justify-items: center; margin: -4px 0 6px; color: #3c3f45; font-family: Georgia, "Times New Roman", serif; text-transform: uppercase; }
.cm-app__logo b { font-size: 15px; font-weight: 400; letter-spacing: 0.06em; }
.cm-app__logo span { font-size: 9px; letter-spacing: 0.12em; }
.cm-app__pill { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 4px; padding: 4px 9px; border-radius: 999px; background: #e1f4fd; color: #1e9bd7; font-weight: 600; font-size: 9.5px; }
.cm-app__pill .cm-ic { width: 11px; height: 11px; }
.cm-app__agree { display: flex; gap: 8px; margin-top: 4px; color: var(--cm-ink-2); font-size: 9.5px; }
.cm-app__agree ul { margin: 2px 0 0; padding-left: 12px; }
.cm-app__box { width: 14px; height: 14px; padding: 1.5px; border: 1.3px solid var(--cm-ink-2); border-radius: 3px; stroke-width: 3; }
.cm-app__foot { display: grid; gap: 6px; margin-top: auto; text-align: center; }
.cm-app__btn { display: grid; place-items: center; height: 32px; border-radius: 999px; background: var(--cm-btn); color: #fff; font-weight: 600; font-size: 11.5px; }
.cm-app__btn.is-off { background: #c4c6cd; }
.cm-app__foot small { color: var(--cm-ink-3); font-size: 8.5px; }
.cm-app__foot small b { color: var(--cm-btn); font-weight: 600; }
.cm-app__models { display: flex; justify-content: center; gap: 8px; flex: 1; min-height: 0; padding: 6px 0; }
.cm-app__models .cm-body { height: 100%; width: auto; min-width: 0; object-fit: contain; }
.cm-spin { position: relative; flex: 1; min-height: 0; margin: 2px -6px 0; border-radius: 18px; background: radial-gradient(70% 55% at 50% 52%, #eef8fd, rgb(255 255 255 / 0) 72%); cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none; }
.cm-spin.is-dragging { cursor: grabbing; }
.cm-spin:focus-visible { box-shadow: inset 0 0 0 2px var(--cm-btn); }
.cm-spin__img { position: absolute; left: 50%; top: 4px; bottom: 30px; aspect-ratio: 300 / 585; translate: -50% 0; background-size: 1200% 100%; background-repeat: no-repeat; background-position: calc(var(--f) * 100% / 11) 0; }
.cm-spin__ring { position: absolute; left: 50%; bottom: 30px; width: 70%; height: 30px; translate: -50% 0; border: 1.5px dashed #8fcfee; border-radius: 50%; }
.cm-spin__ring::before, .cm-spin__ring::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border: solid #4fb3ee; border-width: 0 1.8px 1.8px 0; }
.cm-spin__ring::before { left: -4px; transform: translateY(-20%) rotate(-135deg); }
.cm-spin__ring::after { right: -4px; transform: translateY(-80%) rotate(45deg); }
.cm-spin__tag { position: absolute; left: calc(50% + 22px); top: 25%; padding: 2px 7px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgb(2 71 103 / 0.18); color: #1e9bd7; font-size: 9px; font-weight: 700; transition: opacity 0.15s; }
.cm-spin__tag::before { content: ""; position: absolute; top: 50%; right: 100%; width: 12px; border-top: 1.2px solid #4fb3ee; }
.cm-spin:not([data-frame="0"]):not([data-frame="1"]):not([data-frame="11"]) .cm-spin__tag { opacity: 0; }
.cm-spin__btn { position: absolute; top: 46%; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--cm-ink); box-shadow: 0 2px 8px rgb(2 71 103 / 0.16); cursor: pointer; }
.cm-spin__btn .cm-ic { width: 13px; height: 13px; }
.cm-spin__btn[data-step="-1"] { left: 8px; } .cm-spin__btn[data-step="1"] { right: 8px; }
.cm-spin__hint { position: absolute; left: 50%; bottom: 2px; display: inline-flex; align-items: center; gap: 5px; translate: -50% 0; padding: 4px 10px; border-radius: 999px; background: #e1f4fd; color: #1e9bd7; font-size: 9px; font-weight: 700; white-space: nowrap; }
.cm-spin__hint .cm-ic { width: 11px; height: 11px; stroke-width: 2.2; }
.cm-trailer .cm-spin__img { animation: cm-turn 2.4s steps(11, jump-none) infinite alternate; }
@keyframes cm-turn { from { background-position: 0 0; } to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .cm-trailer .cm-spin__img { animation: none; } }
.cm-app__ok { margin: 0; color: #1e9bd7; font-size: 9.5px; font-weight: 600; text-align: center; }
.cm-app__cards { display: grid; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }
.cm-app__cards li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; box-shadow: inset 0 0 0 1px #e3e6ec; }
.cm-app__cards li.is-on { background: #e1f4fd; box-shadow: inset 0 0 0 1.5px var(--cm-btn); }
.cm-app__cards b { display: block; font-size: 11px; }
.cm-app__cards span { color: var(--cm-ink-3); font-size: 9px; }
.cm-tile { width: 52px; height: 52px; flex: none; object-fit: contain; }
.cm-app__steps { display: grid; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.cm-app__steps li { display: flex; gap: 10px; align-items: center; }
.cm-app__steps .cm-tile { width: 52px; height: 52px; }
.cm-app__steps b { display: block; font-size: 10.5px; }
.cm-app__steps span { color: var(--cm-ink-2); font-size: 9px; }
.cm-app__steps span b { display: inline; font-size: inherit; color: var(--cm-ink); }
.cm-app__shots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.cm-app__shots figure { display: grid; justify-items: center; gap: 4px; margin: 0; padding: 8px 4px 6px; border: 1.3px dashed #c9d6de; border-radius: 12px; }
.cm-app__shots figure:first-child { grid-column: 1 / -1; justify-self: center; width: 58%; }
.cm-app__shots figure.is-done { border: 1.5px solid var(--cm-btn); background: #f2fafe; }
.cm-app__shots figcaption { display: inline-flex; white-space: nowrap; align-items: center; gap: 4px; color: var(--cm-ink-3); font-size: 9px; font-weight: 600; }
.cm-app__shots .is-done figcaption { color: #1e9bd7; }
.cm-app__shots figcaption .cm-ic { width: 11px; height: 11px; stroke-width: 2.4; }
.cm-torso { display: block; width: auto; height: 84px; margin: 0 auto; }
.cm-app__compare { --cm-cut: 50%; position: relative; height: 190px; margin-top: 4px; border-radius: 14px; overflow: hidden; }
.cm-app__compare > div { position: absolute; inset: 0; background: linear-gradient(180deg, #f1f8fc, #dcf1fb); }
.cm-app__compare > div:last-child { clip-path: inset(0 0 0 var(--cm-cut)); background: linear-gradient(180deg, #e7f7fe, #bde8f9); }
.cm-app__compare .cm-torso { position: absolute; left: 50%; top: 8px; width: 86%; height: auto; margin: 0; translate: -50% 0; }
.cm-app__compare span { position: absolute; top: 8px; padding: 2px 7px; border-radius: 999px; background: rgb(255 255 255 / 0.9); font-size: 9px; font-weight: 700; }
.cm-app__compare > div:first-child span { left: 8px; } .cm-app__compare > div:last-child span { right: 8px; }
.cm-app__compare > i { position: absolute; top: 0; bottom: 0; left: var(--cm-cut); width: 2px; background: #fff; translate: -1px 0; }
.cm-app__compare > i::after { content: ""; position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgb(2 71 103 / 0.25); transform: translate(-50%, -50%); }
.cm-app__size { display: grid; gap: 8px; padding: 8px 2px; color: var(--cm-ink-2); font-size: 9.5px; font-weight: 600; }
.cm-app__size i { position: relative; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--cm-btn) calc(var(--p) * 100%), #e3e6ec 0); }
.cm-app__size i::after { content: ""; position: absolute; top: 50%; left: calc(var(--p) * 100%); width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--cm-btn); transform: translate(-50%, -50%); }
.cm-app__scene { margin: 2px -4px 0; padding: 6px 2px 0; border-radius: 16px; background: linear-gradient(180deg, #f2fafe, #fff); }
.cm-app__dots { display: flex; justify-content: center; gap: 6px; margin: auto 0 4px; padding: 0; list-style: none; }
.cm-app__dots li { width: 6px; height: 6px; border-radius: 50%; background: #d5dde2; }
.cm-app__dots .is-on { background: var(--cm-ink-3); }
.cm-app__dots + .cm-app__foot { margin-top: 0; }
.cm-body { display: block; overflow: visible; }
.cm-pose { position: relative; }
.cm-pose span { position: absolute; padding: 2px 7px; border-radius: 999px; background: rgb(255 255 255 / 0.92); box-shadow: 0 2px 6px rgb(2 71 103 / 0.15); color: #024767; font-size: 8.5px; font-weight: 700; white-space: nowrap; }
.cm-pose span::before { content: ""; position: absolute; top: 50%; right: 100%; width: 14px; border-top: 1.2px dashed #1e8cb1; }
.cm-pose span.is-l::before { right: auto; left: 100%; }
/* Phone rows */
/* A row of phones: no drop shadow, and scaled in steps so all six fit without a scrollbar on desktop */
.cm-screens { container-type: inline-size; display: flex; justify-content: safe center; gap: 12px; overflow-x: auto; padding: 8px 4px 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.cm-screens > figure { width: min-content; margin: 0; scroll-snap-align: start; }
.cm-screens > figure > figcaption { margin-top: 12px; color: var(--sc-fg-2); font: 500 13px/1.35 var(--sc-ui); text-align: center; }
.cm-screens .cm-phone { box-shadow: none; zoom: 0.8; }
@container (min-width: 880px) { .cm-screens .cm-phone { zoom: 0.6; } }
@container (min-width: 1000px) { .cm-screens .cm-phone { zoom: 0.68; } }
@container (min-width: 1120px) { .cm-screens .cm-phone { zoom: 0.76; } }
@container (min-width: 1250px) { .cm-screens .cm-phone { zoom: 0.84; } }

/* Hero: a frosted model with hotspots, two tilted app screens. A fixed 900 x 675 canvas, scaled in steps */
.cm-hero { container-type: inline-size; position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden;
  background: radial-gradient(60% 70% at 30% 45%, #ffffff, rgb(255 255 255 / 0) 70%), linear-gradient(160deg, #eaf7fd, #c7e9f7); }
.cm-hero__in { position: absolute; left: 50%; top: 50%; width: 900px; height: 675px; translate: -50% -50%; }
.cm-hero__disc { position: absolute; left: 290px; top: 528px; width: 320px; height: 84px; border-radius: 50%; border: 2px dashed #8fcfee; background: radial-gradient(closest-side, rgb(0 183 244 / 0.16), rgb(0 183 244 / 0)); }
.cm-hero__model { position: absolute; left: 273px; top: 26px; width: 354px; height: 590px; }
.cm-hero__model .cm-body { width: 100%; height: 100%; object-fit: contain; }
.cm-hero__tag { position: absolute; left: 488px; top: 146px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.85); box-shadow: 0 10px 24px rgb(30 140 177 / 0.2), inset 0 0 0 1px #fff; backdrop-filter: blur(10px); color: #024767; font-weight: 700; font-size: 14px; white-space: nowrap; }
.cm-hero__tag .cm-ic { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--cm-sky); color: #fff; stroke-width: 3; }
.cm-hero__phone { position: absolute; left: 34px; top: 70px; rotate: -6deg; }
.cm-hero__phone .cm-phone { zoom: 0.98; }
.cm-hero__cards { position: absolute; right: 30px; top: 236px; display: grid; gap: 12px; width: 236px; margin: 0; padding: 0; list-style: none; }
.cm-hero__cards li { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 18px; background: rgb(255 255 255 / 0.78); box-shadow: 0 12px 28px rgb(30 140 177 / 0.16), inset 0 0 0 1px #fff; backdrop-filter: blur(10px); }
.cm-hero__cards li:nth-child(2) { translate: -22px 0; } .cm-hero__cards li:nth-child(3) { translate: 6px 0; }
.cm-hero__cards li.is-on { box-shadow: 0 12px 28px rgb(30 140 177 / 0.22), inset 0 0 0 2px #4fb3ee; }
.cm-hero__cards .cm-tile { width: 56px; height: 56px; }
.cm-hero__cards b { display: block; color: #024767; font-size: 16px; font-weight: 700; }
.cm-hero__cards span { color: #4a6475; font-size: 12.5px; font-weight: 500; }
.cm-hero__chip { position: absolute; left: 450px; top: 620px; translate: -50% 0; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: #e1f4fd; color: #1e9bd7; font-size: 13px; font-weight: 700; white-space: nowrap; }
.cm-hero__chip .cm-ic { width: 15px; height: 15px; stroke-width: 2.2; }
@container (max-width: 1000px) { .cm-hero__in { zoom: 1; } }
@container (max-width: 880px) { .cm-hero__in { zoom: 0.92; } }
@container (max-width: 800px) { .cm-hero__in { zoom: 0.84; } }
@container (max-width: 720px) { .cm-hero__in { zoom: 0.76; } }
@container (max-width: 640px) { .cm-hero__in { zoom: 0.68; } }
@container (max-width: 560px) { .cm-hero__in { zoom: 0.6; } }
@container (max-width: 480px) { .cm-hero__in { zoom: 0.52; } }
@container (max-width: 400px) { .cm-hero__in { zoom: 0.44; } }
@container (max-width: 330px) { .cm-hero__in { zoom: 0.36; } }

/* Poster (thumbnail, slide, cover): a fixed 900 x 675 canvas */
.cm-poster { position: relative; overflow: hidden; background: linear-gradient(165deg, #0c6c9c, #024767 55%, #01283d); color: #fff; }
.cm-poster__in { position: absolute; left: 50%; top: 50%; width: 900px; height: 675px; translate: -50% -50%; }
.cm-poster__halo { position: absolute; left: 50%; top: 46%; width: 620px; height: 620px; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgb(120 215 250 / 0.55), rgb(0 183 244 / 0.18) 55%, rgb(0 183 244 / 0)); }
.cm-poster__t { position: absolute; font: 800 172px/0.86 Urbanist, var(--sc-ui); letter-spacing: -0.045em; text-transform: uppercase; white-space: nowrap; }
.cm-poster__t--1 { left: 34px; top: 92px; color: #fff; }
.cm-poster__t--2 { right: 30px; top: 410px; color: #6fd6fa; }
.cm-poster__ring { position: absolute; left: 50%; top: 580px; width: 360px; height: 70px; translate: -50% 0; border-radius: 50%; border: 2px solid rgb(111 214 250 / 0.55); box-shadow: 0 0 40px rgb(0 183 244 / 0.35), inset 0 0 30px rgb(0 183 244 / 0.25); }
.cm-poster__model { position: absolute; left: 50%; top: 22px; width: 402px; height: 640px; translate: -50% 0; }
.cm-poster__model .cm-body { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 30px 40px rgb(0 20 35 / 0.45)); }
.cm-poster__tag { position: absolute; left: calc(50% + 106px); top: 196px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: rgb(255 255 255 / 0.9); box-shadow: 0 12px 30px rgb(0 20 35 / 0.35); color: #024767; font: 700 15px/1 Urbanist, var(--sc-ui); white-space: nowrap; }
.cm-poster__tag .cm-ic { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--cm-sky); color: #fff; stroke-width: 3; }
/* Poster colourways: --bg field, --t1 / --t2 the two lines of type, --halo the glow behind the model */
.cm-poster--sky { background: linear-gradient(165deg, #3cc8f6, #0aa6e6 55%, #0784c0); }
.cm-poster--sky .cm-poster__t--1 { color: #024767; } .cm-poster--sky .cm-poster__t--2 { color: #fff; }
.cm-poster--sky .cm-poster__halo { background: radial-gradient(closest-side, rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.15) 55%, rgb(255 255 255 / 0)); }
.cm-poster--sky .cm-poster__ring { border-color: rgb(255 255 255 / 0.7); box-shadow: 0 0 40px rgb(255 255 255 / 0.4); }
.cm-poster--mist { background: linear-gradient(165deg, #eef8fd, #cdebf8 60%, #aedff4); }
.cm-poster--mist .cm-poster__t--1 { color: #024767; } .cm-poster--mist .cm-poster__t--2 { color: #00a6df; }
.cm-poster--mist .cm-poster__halo { background: radial-gradient(closest-side, rgb(255 255 255 / 0.95), rgb(255 255 255 / 0)); }
.cm-poster--mist .cm-poster__ring { border-color: rgb(30 140 177 / 0.45); box-shadow: none; }
.cm-poster--mist .cm-poster__model .cm-body { filter: drop-shadow(0 30px 40px rgb(30 100 140 / 0.25)); }
.cm-poster--coral { background: linear-gradient(165deg, #ffb59b, #ff9a7a 55%, #f47f62); }
.cm-poster--coral .cm-poster__t--1 { color: #fff; } .cm-poster--coral .cm-poster__t--2 { color: #024767; }
.cm-poster--coral .cm-poster__halo { background: radial-gradient(closest-side, rgb(255 236 226 / 0.75), rgb(255 236 226 / 0)); }
.cm-poster--coral .cm-poster__ring { border-color: rgb(255 255 255 / 0.7); box-shadow: none; }
.cm-poster--coral .cm-poster__model .cm-body { filter: drop-shadow(0 30px 40px rgb(120 40 20 / 0.3)); }
/* Trailer: six 3s scenes on an 18s loop, on a fixed 1000 x 562 canvas scaled in steps */
@property --cm-cut { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
.cm-trailer { container-type: inline-size; position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; color: #024767;
  background: radial-gradient(50% 70% at 30% 50%, #fff, rgb(255 255 255 / 0) 75%), linear-gradient(150deg, #eaf7fd, #bfe6f6); }
.cm-tr__scene { position: absolute; left: 50%; top: 50%; width: 1000px; height: 562px; translate: -50% -50%; opacity: 0; animation: cm-scene 18s calc(var(--i) * 3s) infinite both; }
.cm-tr__scene > * { position: absolute; inset: 0; }
.cm-trailer h3 { margin: 0; font: 700 52px/1.05 Urbanist, var(--sc-ui); letter-spacing: -0.02em; }
.cm-trailer h3 em { font-style: normal; color: #00a6df; }
.cm-tr__kicker { display: block; margin-bottom: 14px; color: #1e8cb1; font-weight: 700; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; }
.cm-tr__copy { animation: cm-rise 18s calc(var(--i) * 3s + 0.2s) infinite both; }
.cm-tr__intro .cm-tr__hero { position: absolute; left: 96px; top: 36px; height: 490px; width: auto; animation: cm-float 18s calc(var(--i) * 3s) infinite both; }
.cm-tr__intro .cm-tr__copy { position: absolute; left: 430px; top: 190px; }
.cm-tr__split .cm-phone { position: absolute; left: 150px; top: 36px; zoom: 1; --w: 232px; scale: 1.0; rotate: -4deg; animation: cm-phone 18s calc(var(--i) * 3s) infinite both; }
.cm-tr__split .cm-tr__copy { position: absolute; left: 480px; top: 200px; }
.cm-tr__stat { display: inline-block; margin-top: 22px; padding: 10px 16px; border-radius: 999px; background: #fff; box-shadow: 0 10px 24px rgb(30 140 177 / 0.2); font-size: 18px; font-weight: 500; animation: cm-pop 18s calc(var(--i) * 3s + 0.7s) infinite both; }
.cm-tr__stat b { color: #00a6df; font-weight: 800; }
.cm-tr__tap { position: absolute; left: 256px !important; top: 196px !important; right: auto !important; bottom: auto !important; width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; background: rgb(0 183 244 / 0.35); opacity: 0; animation: cm-tap 18s calc(var(--i) * 3s + 0.6s) infinite both; }
.cm-trailer .cm-app__compare { animation: cm-sweep 18s calc(var(--i) * 3s + 0.3s) infinite both; }
.cm-tr__beam { position: absolute; left: 110px; top: 40px; width: 220px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, rgb(0 183 244 / 0), #00b7f4, rgb(0 183 244 / 0)); box-shadow: 0 0 24px 6px rgb(0 183 244 / 0.35); opacity: 0; animation: cm-beam 18s calc(var(--i) * 3s + 0.4s) infinite both; }
.cm-tr__chip { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 999px; background: rgb(255 255 255 / 0.78); box-shadow: 0 12px 28px rgb(30 140 177 / 0.22), inset 0 0 0 1px #fff; backdrop-filter: blur(10px); color: #024767; font-weight: 700; font-size: 16px; white-space: nowrap; animation: cm-pop 18s calc(var(--i) * 3s + var(--d)) infinite both; }
.cm-tr__chip .cm-ic { width: 16px; height: 16px; color: #00a6df; }
.cm-tr__end { display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; }
.cm-tr__end > b { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; animation: cm-rise 18s calc(var(--i) * 3s + 0.1s) infinite both; }
.cm-tr__end h3 { margin: 10px 0 8px; font-size: 60px; animation: cm-rise 18s calc(var(--i) * 3s + 0.3s) infinite both; }
.cm-tr__mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(135deg, #5fd0f7, #1e8cb1); box-shadow: 0 14px 30px rgb(30 140 177 / 0.35); animation: cm-pop 18s calc(var(--i) * 3s) infinite both; }
.cm-tr__mark .cm-mark { width: 34px; height: 34px; fill: #fff; }
.cm-tr__end .cm-tr__kicker { margin: 0; animation: cm-rise 18s calc(var(--i) * 3s + 0.5s) infinite both; }
.cm-tr__progress { position: absolute; left: 24px; right: 24px; bottom: 16px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.cm-tr__progress li { height: 3px; border-radius: 3px; background: rgb(2 71 103 / 0.14); overflow: hidden; }
.cm-tr__progress i { display: block; height: 100%; background: #00a6df; animation: cm-fill 18s calc(var(--i) * 3s) infinite linear both; }
.cm-tr__pp { position: absolute; right: 14px; top: 14px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / 0.85); color: #024767; cursor: pointer; box-shadow: 0 4px 12px rgb(2 71 103 / 0.15); }
.cm-tr__pp .cm-ic { width: 16px; height: 16px; }
.cm-tr__pp .cm-ic:last-child, .cm-trailer.is-paused .cm-tr__pp .cm-ic:first-child { display: none; }
.cm-trailer.is-paused .cm-tr__pp .cm-ic:last-child { display: block; }
.cm-tr__pp:focus-visible { outline: 2px solid #00a6df; outline-offset: 2px; }
.cm-trailer.is-paused, .cm-trailer.is-paused * { animation-play-state: paused !important; }
@keyframes cm-scene { 0% { opacity: 0; scale: 0.97; } 2.5%, 15% { opacity: 1; scale: 1; } 17.5%, 100% { opacity: 0; scale: 1.02; } }
@keyframes cm-rise { 0% { opacity: 0; translate: 0 24px; } 3%, 100% { opacity: 1; translate: 0 0; } }
@keyframes cm-phone { 0% { translate: 0 80px; rotate: -10deg; } 4%, 100% { translate: 0 0; rotate: -4deg; } }
@keyframes cm-float { 0% { translate: 0 30px; } 6% { translate: 0 0; } 16.6% { translate: 0 -8px; } 100% { translate: 0 -8px; } }
@keyframes cm-pop { 0% { opacity: 0; scale: 0.6; } 2.5% { opacity: 1; scale: 1.08; } 4%, 100% { opacity: 1; scale: 1; } }
@keyframes cm-tap { 0% { opacity: 0; scale: 1.6; } 2% { opacity: 1; scale: 1; } 4% { opacity: 1; scale: 0.8; } 7% { opacity: 0; scale: 2.2; } 100% { opacity: 0; } }
@keyframes cm-sweep { 0% { --cm-cut: 85%; } 6% { --cm-cut: 20%; } 11%, 100% { --cm-cut: 50%; } }
@keyframes cm-beam { 0% { opacity: 0; translate: 0 0; } 1% { opacity: 1; } 9% { opacity: 1; translate: 0 470px; } 10%, 100% { opacity: 0; translate: 0 470px; } }
@keyframes cm-fill { 0% { width: 0; } 16.66% { width: 100%; } 16.67%, 100% { width: 0; } }
@container (min-width: 1080px) { .cm-tr__scene { zoom: 1.08; } }
@container (max-width: 960px) { .cm-tr__scene { zoom: 0.92; } }
@container (max-width: 880px) { .cm-tr__scene { zoom: 0.84; } }
@container (max-width: 800px) { .cm-tr__scene { zoom: 0.76; } }
@container (max-width: 720px) { .cm-tr__scene { zoom: 0.68; } }
@container (max-width: 640px) { .cm-tr__scene { zoom: 0.6; } }
@container (max-width: 560px) { .cm-tr__scene { zoom: 0.52; } }
@container (max-width: 480px) { .cm-tr__scene { zoom: 0.44; } }
@container (max-width: 400px) { .cm-tr__scene { zoom: 0.36; } }
@container (max-width: 330px) { .cm-tr__scene { zoom: 0.31; } }
@media (prefers-reduced-motion: reduce) {
  .cm-trailer *, .cm-tr__scene { animation: none !important; }
  .cm-tr__scene:not([style*="--i:0"]), .cm-tr__pp, .cm-tr__progress, .cm-tr__tap { display: none; }
  .cm-tr__scene[style*="--i:0"] { opacity: 1; }
}
.cm-entries { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.cm-entries > li { display: grid; grid-template-rows: auto 1fr; border-radius: 16px; background: var(--sc-surface); box-shadow: 0 0 0 1px var(--sc-line); overflow: hidden; }
.cm-entries > li.is-shipped { box-shadow: 0 0 0 2px var(--sc-accent); }
.cm-entry__stage { position: relative; display: grid; align-content: start; justify-items: end; gap: 12px; height: 268px; padding: 18px 16px 16px; background: #f7f8fa; color: #222731; }
.cm-entry__text { padding: 14px 16px 16px; }
.cm-entry__v { display: block; margin-bottom: 4px; color: var(--sc-fg-3); font: 600 12px/1 var(--sc-ui); text-transform: uppercase; letter-spacing: 0.06em; }
.cm-entries > li.is-shipped .cm-entry__v { color: var(--sc-accent); }
.cm-entry__text b { display: block; font: 600 16px/1.3 var(--sc-ui); color: var(--sc-fg); }
.cm-entry__text p { margin: 4px 0 0; color: var(--sc-fg-2); font: 400 14px/1.45 var(--sc-ui); }
.cm-w { width: 100%; font-size: 12.5px; font-weight: 500; }
.cm-w ul { margin: 0; padding: 0; list-style: none; }
.cm-w--v1, .cm-w--v2 { border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgb(20 30 50 / 0.12); overflow: hidden; }
.cm-w--v1 li, .cm-w--v2 li { padding: 11px 14px; }
.cm-w--v1 li + li, .cm-w--v2 li + li { border-top: 1px solid #e3e6ec; }
.cm-w__head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #10b4ef; color: #fff; font-weight: 600; }
.cm-w__head .cm-mark { fill: #fff; }
.cm-w--v2 li.is-on { background: #49b3ea; color: #fff; text-align: center; }
.cm-w--v2 li:not(.is-on) { text-align: center; }
.cm-w--v3, .cm-w--v4 { display: grid; gap: 8px; }
.cm-w--v3 span, .cm-w--v4 span { padding: 10px 12px; border-radius: 999px; background: #fff; box-shadow: 0 4px 12px rgb(20 30 50 / 0.12); text-align: center; }
.cm-w--v3 span.is-on, .cm-w--v4 span.is-on { background: #10b4ef; color: #fff; }
.cm-w--v4 { padding: 8px; border-radius: 18px; background: #ececee; box-shadow: 0 8px 20px rgb(20 30 50 / 0.14); }
.cm-w--v4 span:not(.is-on) { background: #f4f4f5; box-shadow: 0 1px 2px rgb(20 30 50 / 0.12); }
.cm-mark { width: 18px; height: 18px; fill: #1b8fc9; }
.cm-fab { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 6px 14px rgb(20 30 50 / 0.2); }
.cm-fab--blue { background: #10b4ef; } .cm-fab--blue .cm-mark { fill: #fff; }
.cm-fab--white { background: #fff; }
.cm-minus { width: 16px; height: 4px; border-radius: 4px; background: #fff; }
/* Audit table and positioning: plain and quiet, ClinicOS in the accent */
.cm-audit { display: grid; justify-items: center; font-family: var(--sc-ui); }
.cm-audit .cm-quad { width: min(100%, 560px); }
.cm-tablewrap { overflow-x: auto; }
.cm-table { width: 100%; min-width: 680px; border-collapse: collapse; font: 400 14px/1.45 var(--sc-ui); color: var(--sc-fg-2); }
.cm-table th, .cm-table td { padding: 12px 12px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sc-line); }
.cm-table thead th { padding-top: 0; color: var(--sc-fg-3); font-size: 12px; font-weight: 500; }
.cm-table tbody th { color: var(--sc-fg); font-weight: 600; white-space: nowrap; }
.cm-table tbody tr:last-child > * { border-bottom: 0; }
.cm-table tr.is-us > * { color: var(--sc-accent); font-weight: 600; }
.cm-quad { position: relative; display: grid; grid-template: 24px 1fr 24px / 1fr; margin: 0; font: 500 12px/1.2 var(--sc-ui); color: var(--sc-fg-3); }
.cm-quad__plot { position: relative; grid-row: 2; min-height: 240px; }
.cm-quad__x, .cm-quad__y { position: absolute; background: var(--sc-line); }
.cm-quad__x { left: 0; right: 0; top: 50%; height: 1px; } .cm-quad__y { top: 0; bottom: 0; left: 50%; width: 1px; }
.cm-quad__t, .cm-quad__b { justify-self: center; align-self: center; }
.cm-quad__t { grid-row: 1; } .cm-quad__b { grid-row: 3; }
.cm-quad__l, .cm-quad__r { position: absolute; top: 50%; transform: translateY(-140%); }
.cm-quad__l { left: 0; } .cm-quad__r { right: 0; }
.cm-dot { position: absolute; left: calc(var(--x) * 100%); top: calc((1 - var(--y)) * 100%); display: inline-flex; align-items: center; gap: 6px; color: var(--sc-fg-2); white-space: nowrap; transform: translate(-4px, -50%); }
.cm-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc-fg-3); }
.cm-dot.is-us { color: var(--sc-accent); font-weight: 600; } .cm-dot.is-us i { width: 10px; height: 10px; background: var(--sc-accent); }
.cm-dot[style*="--x:0.8"] { transform: translate(calc(-100% + 5px), -50%); flex-direction: row-reverse; }
@media (max-width: 1100px) { .cm-entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }  }
@media (max-width: 560px) { .cm-entries { grid-template-columns: 1fr; } .cm-entry__stage { height: auto; } }
/* Recordings with black bars baked in: crop to the recorded UI */
.sc-shot video.sc-crop { display: block; aspect-ratio: var(--ar); width: auto; max-width: 100%; height: min(72vh, 680px); margin-inline: auto; border-radius: 12px; object-fit: cover; background: #fff; }
@media (max-width: 760px) { .sc-shot video.sc-crop { width: 100%; height: auto; } }
