/* Landing (index.html): concept "Product in motion" (look level 4). Loaded only by index.html, after style.css, and
   scoped to body.home: the site's tokens, type and components come from style.css; here the landing page's own
   rhythm, the hero with the product window (HTML and CSS, played by home.js) and the colours of the scene behind it
   (scenes/scene.js reads --scene-*). Motion is transform and opacity only, on one curve (--ease), and only while
   motion is on: with prefers-reduced-motion: reduce every chapter stands still in its final state, until the visitor
   switches the animations on with the button under the hero (theme.js).

   The layout of the hero follows the section's data-mode (home.js sets it, with data-mode-reason) and, before
   home.js runs, <html data-motion> (theme.js, in the head: "on", "off" or "paused"), so the first paint is already right:
   - pinned (data-mode="pinned" while motion is on or paused): wide (1024px and up) the chapter text on the left swaps
     in place, the product window on the right (bleeding off the edge), the scene behind both, and the scroll moves one
     smoothed value through six chapters; narrow, the hero text, then the window in its own box that pins, the chapter
     text under it.
   - autoplay (a frame that does not scroll, such as one as tall as the page): the same, not pinned but inline, and the
     chapters follow a timer instead of the scroll.
   - stacked (short screens) and still (motion off: reduced motion, or the visitor's choice; and without script): every
     chapter with its own window under its text; stacked plays each chapter as it comes into view, still shows each in
     its final state. */

/* ---------- Tokens of the landing page ---------- */
.home {
  --scene-1: #d4ddef;
  --scene-2: #b9c7e4;
  --scene-3: #8ea4d3;
  --scene-4: #3a5590;
  --scene-5: #b7dcd7;
  --scene-mark: #cf1f3a;
  --scene-glyph: #ffffff;

  /* The product window (light) */
  --ui-bg: #ffffff;
  --ui-card: #ffffff;
  --ui-soft: #f3f5f9;
  --ui-line: #e4e8ef;
  --ui-line-2: #d3d9e3;
  --ui-text: #0d1526;
  --ui-muted: #56627a;
  --ui-chrome: #eef1f6;
  --ui-chrome-line: #dde2ea;
  --ui-shadow: 0 1px 1px rgb(11 21 48 / 4%), 0 2px 6px rgb(11 21 48 / 4%);
  --win-shadow: 0 0 0 1px rgb(11 21 48 / 7%), 0 2px 4px rgb(11 21 48 / 4%), 0 30px 60px -20px rgb(11 21 48 / 24%), 0 80px 140px -50px rgb(11 21 48 / 30%);
  --tag-blue-bg: #e8effe; --tag-blue: #1d4ed8;
  --tag-amber-bg: #fdf1df; --tag-amber: #8a5200;
  --tag-red-bg: #fde8eb; --tag-red: #b4122b;
  --ok: #15803d;
  --now: #cf1f3a;
  --on-now: #ffffff;
  --cursor-fill: #0b1530;
  --cursor-line: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home {
    --scene-1: #131e38;
    --scene-2: #1a2848;
    --scene-3: #26386a;
    --scene-4: #3d5797;
    --scene-5: #134e49;
    --scene-mark: #ff5a70;
    --scene-glyph: #c9d6f2;
    --ui-bg: #0f1830;
    --ui-card: #141f3a;
    --ui-soft: #18233f;
    --ui-line: #24314f;
    --ui-line-2: #34446a;
    --ui-text: #e6ebf5;
    --ui-muted: #a3aec4;
    --ui-chrome: #121c36;
    --ui-chrome-line: #24314f;
    --ui-shadow: 0 1px 1px rgb(0 0 0 / 30%);
    --win-shadow: 0 0 0 1px rgb(159 184 255 / 12%), 0 2px 4px rgb(0 0 0 / 30%), 0 30px 60px -20px rgb(0 0 0 / 60%), 0 80px 140px -50px rgb(0 0 0 / 80%);
    --tag-blue-bg: #18264a; --tag-blue: #a9c1ff;
    --tag-amber-bg: #2e2312; --tag-amber: #f3c27a;
    --tag-red-bg: #3a1420; --tag-red: #ff9aa8;
    --ok: #4ade80;
    --now: #ff5a70;
    --on-now: #1a0409;
    --cursor-fill: #ffffff;
    --cursor-line: #0b1530;
  }
}
:root[data-theme="dark"] .home {
  --scene-1: #131e38;
  --scene-2: #1a2848;
  --scene-3: #26386a;
  --scene-4: #3d5797;
  --scene-5: #134e49;
  --scene-mark: #ff5a70;
  --scene-glyph: #c9d6f2;
  --ui-bg: #0f1830;
  --ui-card: #141f3a;
  --ui-soft: #18233f;
  --ui-line: #24314f;
  --ui-line-2: #34446a;
  --ui-text: #e6ebf5;
  --ui-muted: #a3aec4;
  --ui-chrome: #121c36;
  --ui-chrome-line: #24314f;
  --ui-shadow: 0 1px 1px rgb(0 0 0 / 30%);
  --win-shadow: 0 0 0 1px rgb(159 184 255 / 12%), 0 2px 4px rgb(0 0 0 / 30%), 0 30px 60px -20px rgb(0 0 0 / 60%), 0 80px 140px -50px rgb(0 0 0 / 80%);
  --tag-blue-bg: #18264a; --tag-blue: #a9c1ff;
  --tag-amber-bg: #2e2312; --tag-amber: #f3c27a;
  --tag-red-bg: #3a1420; --tag-red: #ff9aa8;
  --ok: #4ade80;
  --now: #ff5a70;
  --on-now: #1a0409;
  --cursor-fill: #ffffff;
  --cursor-line: #0b1530;
}

/* ---------- The page's rhythm ---------- */
.home { font-size: 17px; line-height: 1.6; overflow-x: clip; }
.home h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1; letter-spacing: -0.045em; font-weight: 660; max-width: 11ch; margin: 0; }
.home main h2 { font-size: clamp(2rem, 3.4vw, 2.875rem); line-height: 1.04; letter-spacing: -0.036em; }
.home main h3 { font-size: 1.375rem; letter-spacing: -0.02em; }
.home .lead { font-size: 1.1875rem; line-height: 1.55; }
.home .btn-lg { min-height: 48px; padding: 0 22px; font-size: 1rem; }
.home .section { padding: 96px 0; }
@media (min-width: 900px) { .home .section { padding: 136px 0; } }
.home .section-head { max-width: 660px; margin-bottom: 56px; }
.home .eyebrow .num { color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.home .eyebrow:has(.num)::before { display: none; }

/* The product proof: the real screen, large, on a quiet surface. */
.home .real { background: var(--bg-muted); border-top: 1px solid var(--border); }
.home .real .hero-shot { margin: 0; }
.home .real .frame { border-radius: var(--radius-lg); }
.home .real figcaption { margin-top: 16px; }
.home .band { background: var(--bg); padding: 0; }
.home .facts { gap: 0; }
.home .facts li { border-left: 1px solid var(--border); }
.home .facts li:first-child { border-left: 0; }
.home .facts a { padding: 28px 24px; height: 100%; transition: background-color var(--fast) var(--ease); }
.home .facts a:hover { background: var(--bg-muted); }
.home .facts strong { font: 620 1.0625rem/1.3 var(--font-display); letter-spacing: -0.01em; }
.home .facts span { font-size: 0.9375rem; }
@media (max-width: 759px) {
  .home .facts li:nth-child(odd) { border-left: 0; }
  .home .facts li:nth-child(n+3) { border-top: 1px solid var(--border); }
  .home .facts a { padding: 20px 12px 20px 0; }
  .home .facts li:nth-child(even) a { padding-left: 16px; }
}
.home .feature-text h3 { font-size: 1.625rem; margin-bottom: 12px; }
.home .feature-text p { font-size: 1.0625rem; }
.home .feature-media .frame { border-radius: var(--radius); }
.home .card { padding: 28px; }
.home .card h3 { font-size: 1.1875rem; }
.home .card:hover { border-color: var(--border-strong); }
.home .split { display: grid; gap: 24px; }
.home .split p { color: var(--text-2); font-size: 1.125rem; max-width: 36rem; }
.home .split p:last-child { font-size: 1rem; margin: 0; }
@media (min-width: 900px) { .home .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: end; } .home .split h2 { margin: 0; } }
.home .cta { background: var(--bg); border-top: 0; }
.home .cta h2 { margin-inline: auto; font-size: clamp(2.25rem, 4vw, 3.25rem); }
.home .cta-price { margin: 28px auto 0; color: var(--text-2); font-size: 0.9375rem; max-width: 34rem; }
.home .site-footer { position: relative; }

/* ---------- The hero and its chapters ---------- */
.pm { position: relative; isolation: isolate; }
.pm-pin { position: relative; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.ch { position: relative; padding: 56px 0 24px; }
.ch-hero { padding-top: 48px; }
.ch-text { max-width: 31rem; position: relative; z-index: 2; }
.ch-text > p:not(.eyebrow):not(.hint):not(.motion-line) { color: var(--text-2); margin: 18px 0 0; font-size: 1.125rem; }
.ch-text > .lead { margin-top: 24px; font-size: 1.1875rem; }
.ch h2 { margin: 0; }
.ch .actions { margin-top: 32px; }
.ch .hint { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.motion-toggle { min-height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: transparent;
  color: var(--text-2); font: 500 0.8125rem/1 var(--font); cursor: pointer;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.motion-toggle:hover { color: var(--text); border-color: var(--border-input); }
.motion-toggle[hidden], .motion-note[hidden] { display: none; }
.motion-line { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--text-2); font-size: 0.875rem; }
.motion-line:not(:has(:not([hidden]))) { display: none; }
.ch-stage { position: relative; margin-top: 32px; height: var(--sh, 0px); }
.ch-stage:empty { display: none; }
.pm-stage, .pm-rail { display: none; }
/* The scene behind the window: the poster until the first frame, the canvas after. */
.journey-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.scene-poster { position: absolute; inset: 0; background: center / cover no-repeat url("scenes/poster-light-wide.webp"); transition: opacity 600ms var(--ease); }
@media (max-width: 1023px) { .scene-poster { background-image: url("scenes/poster-light-phone.webp"); } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .scene-poster { background-image: url("scenes/poster-dark-wide.webp"); }
}
@media (prefers-color-scheme: dark) and (max-width: 1023px) {
  :root:not([data-theme="light"]) .scene-poster { background-image: url("scenes/poster-dark-phone.webp"); }
}
:root[data-theme="dark"] .scene-poster { background-image: url("scenes/poster-dark-wide.webp"); }
@media (max-width: 1023px) {
  :root[data-theme="dark"] .scene-poster { background-image: url("scenes/poster-dark-phone.webp"); }
}
/* Stacked: the scene sits behind the hero's window. */
.ch-hero .ch-stage .journey-stage { inset: -32px calc(-1 * var(--gutter)); }

/* ---------- Pinned and autoplay, wide ---------- */
@media (min-width: 1024px) {
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) { height: calc(100vh - var(--header) + 5 * 82vh); }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .pm-pin {
    position: sticky; top: var(--header); height: calc(100vh - var(--header)); height: calc(100svh - var(--header)); max-width: none; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); column-gap: 40px; align-items: center;
    padding: 0 0 0 max(var(--gutter), calc((100vw - var(--max)) / 2));
  }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .pm-texts { grid-area: 1 / 1; display: grid; position: relative; z-index: 2; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch { grid-area: 1 / 1; padding: 0; align-self: center; will-change: transform, opacity; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch:not(.ch-hero) { opacity: 0; pointer-events: none; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch-stage { display: none; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .pm-stage { display: block; grid-area: 1 / 2; position: relative; align-self: stretch; z-index: 1; margin-bottom: 64px; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .pm-rail {
    display: flex; gap: 20px; position: absolute; z-index: 3; left: max(var(--gutter), calc((100vw - var(--max)) / 2)); bottom: 32px;
    list-style: none; margin: 0; padding: 0; font-size: 0.8125rem; color: var(--text-2); font-weight: 520;
  }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch-hero .ch-text { max-width: 27rem; }
  :is([data-motion="on"], [data-motion="paused"]) .home .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch-hero h1 { font-size: clamp(3rem, 4.4vw, 4rem); max-width: none; }
  /* Autoplay: inline, as high as a laptop screen, never as high as the frame. */
  :is([data-motion="on"], [data-motion="paused"]) .pm[data-mode="autoplay"] .pm-pin { position: relative; top: auto; height: 720px; }
}

/* ---------- Pinned and autoplay, narrow: hero text, then the window in its box (it pins), the chapter text under it ---------- */
@media (max-width: 1023px) {
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) { height: calc(100svh + 4 * 70svh + 480px); }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .pm-pin {
    position: sticky; top: calc(-1 * var(--hero-h, 0px)); height: calc(var(--hero-h, 480px) + 100svh);
    display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding-bottom: 20px;
  }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .pm-texts { display: contents; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch { padding: 0; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch-hero { grid-row: 1; padding: 24px 0 28px; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch:not(.ch-hero) { grid-row: 3; grid-column: 1; padding-top: 18px; opacity: 0; pointer-events: none; will-change: transform, opacity; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch-stage { display: none; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .pm-stage { display: block; grid-row: 2; position: relative; margin: 0 calc(-1 * var(--gutter)); min-height: 0; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .pm-stage > .journey-stage { inset: 0; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .pm-stage .cam { left: 50%; margin-left: calc(var(--w) / -2); top: 26px; margin-top: 0; transform-origin: 50% 50%; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .pm-rail {
    display: flex; gap: 6px; position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: 10px;
    list-style: none; margin: 0; padding: 0; font-size: 0; color: transparent;
  }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .pm-rail li { flex: 1; padding-top: 3px; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch:not(.ch-hero) h2 { font-size: 1.75rem; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch:not(.ch-hero) .ch-text > p:not(.eyebrow) { font-size: 1rem; margin-top: 10px; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch:not(.ch-hero) .eyebrow { margin-bottom: 10px; }
  :is([data-motion="on"], [data-motion="paused"]) .pm:is([data-mode="pinned"], [data-mode="autoplay"]) .ch:not(.ch-hero) .actions { margin-top: 16px; }
  :is([data-motion="on"], [data-motion="paused"]) .pm[data-mode="autoplay"] .pm-pin { position: relative; top: auto; height: auto; grid-template-rows: auto 540px auto; padding-bottom: 36px; }
}
/* Autoplay: the section is as high as its content; a click on the rail goes to a chapter; the loop fades. */
:is([data-motion="on"], [data-motion="paused"]) .pm[data-mode="autoplay"] { height: auto; }
:is([data-motion="on"], [data-motion="paused"]) .pm[data-mode="autoplay"] .pm-rail li { cursor: pointer; }
:is([data-motion="on"], [data-motion="paused"]) .pm[data-mode="autoplay"] .pm-texts, :is([data-motion="on"], [data-motion="paused"]) .pm[data-mode="autoplay"] .pm-stage { transition: opacity 360ms var(--ease); }
:is([data-motion="on"], [data-motion="paused"]) .pm[data-mode="autoplay"].is-wrapping .pm-texts, :is([data-motion="on"], [data-motion="paused"]) .pm[data-mode="autoplay"].is-wrapping .pm-stage { opacity: 0; }
.pm-rail li { position: relative; padding-top: 14px; transition: color var(--fast) var(--ease); }
.pm-rail li::before, .pm-rail li::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; background: var(--border-strong); }
.pm-rail li::after { background: var(--text); transform: scaleX(var(--fill, 0)); transform-origin: left; }
.pm-rail li.is-on { color: var(--text); }

/* Stacked, wide (reduced motion on a large screen): text and still window side by side. */
@media (min-width: 1024px) {
  .home .ch-hero h1 { font-size: clamp(3rem, 4.4vw, 4rem); max-width: none; }
  .ch-stage .cam { left: 0; margin-left: 0; transform-origin: 0 50%; }
  .ch { display: grid; grid-template-columns: minmax(0, 28rem) minmax(0, 1fr); column-gap: 48px; align-items: center; }
  .ch-stage { margin: 0; }
  .pm { overflow: clip; }
}

/* ---------- The scene: the window (and the phone) in 3D ---------- */
.sc { position: absolute; inset: 0; perspective: 2200px; perspective-origin: 30% 42%; }
@media (max-width: 1023px) { .sc { perspective: 1600px; perspective-origin: 50% 40%; } }
.sc-intro, .sc-tilt { position: absolute; inset: 0; transform-style: preserve-3d; }
/* The window arrives and its parts come together as soon as the page paints, without waiting for home.js or the
   scene: CSS only, keyed on data-motion that theme.js sets in the head. Fill "backwards", so a part's own opacity
   (a chapter stepping back) takes over when it is done; home.js marks the window is-assembled after it, so a tile
   that shows later (another role) does not play it again. */
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc-intro { animation: pm-arrive 1500ms var(--ease) both; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) :where(.ahead, .greet, .cal, .apps .sec-h, .tile, .msgs, .assist) {
  --col: 0; --row: 0; animation: pm-part 900ms var(--ease) backwards; animation-delay: 260ms;
}
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .ahead { animation-name: pm-drop; animation-delay: 180ms; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .greet { animation-delay: 320ms; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .cal { animation-delay: 440ms; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .apps .sec-h { animation-delay: 560ms; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .tile { animation-name: pm-tile; animation-delay: calc(640ms + var(--col) * 55ms + var(--row) * 110ms); }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .tile:nth-child(6n+2) { --col: 1; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .tile:nth-child(6n+3) { --col: 2; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .tile:nth-child(6n+4) { --col: 3; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .tile:nth-child(6n+5) { --col: 4; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .tile:nth-child(6n) { --col: 5; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .tile:nth-child(n+7) { --row: 1; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .msgs { animation-name: pm-slide; animation-delay: 520ms; }
:is([data-motion="on"], [data-motion="paused"]) .pm-stage .sc:not(.is-assembled) .assist { animation-name: pm-tile; animation-delay: 1250ms; }
@keyframes pm-arrive {
  from { transform: translate3d(0, 56px, -180px) rotateX(7deg); }
  to { transform: none; }
}
@keyframes pm-part {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes pm-drop {
  from { opacity: 0; transform: translate3d(0, -8px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes pm-slide {
  from { opacity: 0; transform: translate3d(18px, 0, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes pm-tile {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: none; }
}
.cam {
  --w: 960px; --h: 640px; --fit: 1;
  position: absolute; left: 0; top: 50%; width: var(--w); height: var(--h); margin-top: calc(var(--h) / -2);
  transform-style: preserve-3d; transform-origin: 0 50%;
  transform: scale(var(--fit)) rotateX(5deg) rotateY(9deg);
}
.ch-stage .cam { left: 50%; margin-left: calc(var(--w) / -2); transform-origin: 50% 50%; transform: scale(var(--fit)) rotateX(4deg) rotateY(8deg); }

/* Brand colours of the made-up customer: the header and a few accents follow the brand. */
.cam { --brand: #0f6f68; --brand-ink: #0b5a54; --brand-soft: #e2f1ef; }
.cam[data-brand="care"] { --brand: #4338ca; --brand-ink: #3730a3; --brand-soft: #ebeafe; }
.cam[data-brand="retail"] { --brand: #9a4a0b; --brand-ink: #7c3a07; --brand-soft: #fbeedd; }
:root[data-theme="dark"] .cam { --brand-soft: color-mix(in srgb, var(--brand) 26%, #0f1830); --brand-ink: color-mix(in srgb, var(--brand) 40%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cam { --brand-soft: color-mix(in srgb, var(--brand) 26%, #0f1830); --brand-ink: color-mix(in srgb, var(--brand) 40%, #fff); } }

.win-card { position: absolute; inset: 0; border-radius: 14px; background: var(--ui-bg); box-shadow: var(--win-shadow); transform-origin: 50% 50%; }
.win {
  position: absolute; inset: 0; border-radius: 14px; overflow: hidden; color: var(--ui-text); text-align: left;
  font: 400 14px/1.4 var(--font); letter-spacing: -0.003em; user-select: none; -webkit-user-select: none; pointer-events: none;
  backface-visibility: hidden;
}
.win svg, .phone svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.win b { font-weight: 600; }
.win small, .phone small { color: inherit; font-size: inherit; }

.chrome { height: 40px; display: flex; align-items: center; padding: 0 16px; gap: 14px; background: var(--ui-chrome); border-bottom: 1px solid var(--ui-chrome-line); }
.dots { display: flex; gap: 7px; flex: 0 0 auto; width: 120px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--ui-line-2); }
.url { flex: 0 1 380px; margin: 0 auto; height: 26px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 7px; background: var(--ui-bg); border: 1px solid var(--ui-chrome-line); color: var(--ui-muted); font-size: 12.5px; }
.url svg { width: 12px; height: 12px; stroke-width: 2.2; }
.chrome-end { width: 120px; flex: 0 0 auto; }

.ahead { position: relative; height: 60px; display: flex; align-items: center; gap: 22px; padding: 0 24px; color: #fff; z-index: 2; isolation: isolate; }
.ahead-bg { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 900ms var(--ease); }
.b-group { background: #0f6f68; opacity: 1; }
.b-care { background: #4338ca; }
.b-retail { background: #9a4a0b; }
[data-brand="care"] .b-care, [data-brand="retail"] .b-retail { opacity: 1; }
.org { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; width: 210px; }
.org-mark { width: 32px; height: 32px; padding: 7px; border-radius: 9px; background: rgb(255 255 255 / 16%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 22%); }
.org-mark svg { stroke: none; fill: #fff; }
.org-names { display: grid; line-height: 1.15; }
.org-names b { grid-area: 1 / 1; font: 650 14.5px/1.2 var(--font-display); letter-spacing: -0.01em; opacity: 0; transition: opacity 600ms var(--ease); }
.org-names small { font-size: 12px; opacity: 0.82; }
.cam:not([data-brand]) .on-group, [data-brand="care"] .on-care, [data-brand="retail"] .on-retail { opacity: 1; }
.search { flex: 1 1 auto; min-width: 0; max-width: 440px; height: 36px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border-radius: 9px;
  background: rgb(255 255 255 / 14%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 22%); color: rgb(255 255 255 / 88%); font-size: 13.5px; }
.search > svg { width: 16px; height: 16px; flex: none; }
.search > span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-short { display: none; }
.search kbd { font: 500 12px/1 var(--font); padding: 3px 7px; border: 0; border-radius: 5px; background: rgb(255 255 255 / 16%); color: #fff; }
.me { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.bell { position: relative; width: 30px; height: 30px; padding: 6px; }
.bell i { position: absolute; top: 0; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #fff; color: #0b1530;
  font: 650 12px/18px var(--font); font-style: normal; text-align: center; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 var(--font); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 70%); }
.me-name { display: grid; font-size: 13.5px; font-weight: 600; line-height: 1.15; }
.me-name small { font-size: 12px; font-weight: 400; opacity: 0.82; }

.viewport { position: relative; height: calc(100% - 100px); overflow: hidden; }
.abody { display: grid; grid-template-columns: minmax(0, 1fr) 252px; grid-template-areas: "greet msgs" "cal msgs" "apps msgs";
  grid-template-rows: auto auto 1fr; column-gap: 24px; padding: 22px 24px 24px; align-items: start; }
.greet { grid-area: greet; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 16px; }
.greet-h { display: block; font: 680 24px/1.1 var(--font-display); letter-spacing: -0.025em; }
.greet-p { display: block; margin-top: 6px; color: var(--ui-muted); font-size: 13px; }
.greet-tools { display: flex; gap: 16px; color: var(--ui-muted); font-size: 13px; font-weight: 520; }
.greet-tools > span { display: flex; align-items: center; gap: 6px; }
.greet-tools svg { width: 15px; height: 15px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sec-h > b { font: 650 15px/1.2 var(--font-display); letter-spacing: -0.012em; }
.link { color: var(--brand-ink); font-size: 13px; font-weight: 560; }
.win .card { background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: 10px; box-shadow: var(--ui-shadow); padding: 0; }

.cal { grid-area: cal; padding-bottom: 18px; }
.cal-card { display: grid; grid-template-columns: minmax(0, 1fr) 224px; }
.day { padding: 14px 16px 12px; border-right: 1px solid var(--ui-line); }
.day-top, .tasks-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.big { font: 680 22px/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.day-top > span:last-child, .tasks-top > span:last-child { color: var(--ui-muted); font-size: 13px; }
.track { position: relative; height: 64px; }
.appt { position: absolute; z-index: 1; top: 0; height: 28px; display: flex; align-items: center; gap: 5px; padding: 0 7px; white-space: nowrap;
  border-radius: 6px; font-size: 12px; color: var(--ui-text); background: var(--brand-soft); box-shadow: inset 2px 0 0 var(--brand); }
.appt time { color: var(--brand-ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.a1 { left: 0; } .a2 { left: 30%; } .a3 { left: 64%; }
.live { display: inline-flex; padding: 1px 6px; border-radius: 4px; background: var(--now); color: var(--on-now); font-size: 12px; font-weight: 650;
  opacity: 0; transform: scale(0.7); transition: opacity 400ms var(--ease), transform 600ms var(--ease); }
.a3.is-live .live { opacity: 1; transform: none; }
.rule { position: absolute; left: 0; right: 0; top: 39px; height: 1px; background: var(--ui-line-2); }
.ticks { position: absolute; left: 0; right: 0; top: 36px; height: 7px; }
.ticks i { position: absolute; top: 0; width: 1px; height: 7px; background: var(--ui-line-2); }
.t0 { left: 0; } .t1 { left: 10%; } .t2 { left: 20%; } .t3 { left: 30%; } .t4 { left: 40%; } .t5 { left: 50%; } .t6 { left: 60%; } .t7 { left: 70%; } .t8 { left: 80%; } .t9 { left: 90%; } .t10 { left: calc(100% - 1px); }
.hours { position: absolute; left: 0; right: 0; top: 48px; height: 16px; color: var(--ui-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.hours span { position: absolute; top: 0; transform: translateX(-50%); transition: opacity 500ms var(--ease); }
.h0 { left: 0; transform: none !important; } .h1 { left: 20%; } .h2 { left: 40%; } .h3 { left: 60%; } .h4 { left: 80%; } .h5 { left: 100%; transform: translateX(-100%) !important; }
.hours span.is-near { opacity: 0; }
.now { --t: 0.567; position: absolute; z-index: 2; left: 0; top: 0; width: 100%; height: 44px; pointer-events: none;
  transform: translate3d(calc(var(--t) * 100%), 0, 0); transition: transform 1600ms var(--ease); }
.now::before { content: ""; position: absolute; left: -1px; top: 0; width: 2px; height: 42px; border-radius: 1px; background: var(--now); }
.now::after { content: ""; position: absolute; left: -4.5px; top: 35px; width: 9px; height: 9px; border-radius: 50%; background: var(--now); box-shadow: 0 0 0 2px var(--ui-card); }
.now b { position: absolute; left: 0; top: 46px; transform: translateX(-50%); padding: 1px 6px; border-radius: 4px; background: var(--now); color: var(--on-now);
  font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; display: grid; }
.now b span { grid-area: 1 / 1; transition: opacity 500ms var(--ease); }
.now b span + span, .now.is-later b span:first-child { opacity: 0; }
.now.is-later b span + span { opacity: 1; }
.now.is-later { --t: 0.667; }

.tasks { padding: 14px 16px 10px; }
.count { display: grid; }
.count > * { grid-area: 1 / 1; transition: opacity 400ms var(--ease), transform 600ms var(--ease); }
.c-done { opacity: 0; transform: translate3d(0, 8px, 0); }
.is-all-done .c-open { opacity: 0; transform: translate3d(0, -8px, 0); }
.is-all-done .c-done { opacity: 1; transform: none; }
.task { position: relative; display: flex; align-items: center; gap: 9px; height: 29px; font-size: 13px; }
.task + .task { border-top: 1px solid var(--ui-line); }
.box { position: relative; width: 16px; height: 16px; flex: none; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--ui-line-2); }
.box::before { content: ""; position: absolute; inset: 0; border-radius: 4px; background: var(--brand); transform: scale(0.4); opacity: 0;
  transition: transform 500ms var(--ease), opacity 300ms var(--ease); }
.box svg { position: absolute; inset: 2px; width: 12px; height: 12px; color: #fff; stroke-width: 2.6; opacity: 0; transform: scale(0.5);
  transition: opacity 300ms var(--ease) 80ms, transform 500ms var(--ease) 80ms; }
.task-t { position: relative; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 500ms var(--ease); }
.task-t::after { content: ""; position: absolute; left: 0; right: 0; top: 52%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 500ms var(--ease) 120ms; }
.task em { font-style: normal; color: var(--ui-muted); font-size: 12px; flex: none; }
.task em.late { color: var(--tag-red); font-weight: 560; }
.task.is-done .box::before, .task.is-done .box svg { opacity: 1; transform: none; }
.task.is-done .task-t { opacity: 0.5; }
.task.is-done .task-t::after { transform: scaleX(1); }

.apps { grid-area: apps; }
.roles { position: relative; display: flex; padding: 3px; border-radius: 9px; background: var(--ui-soft); box-shadow: inset 0 0 0 1px var(--ui-line); }
.roles span { position: relative; z-index: 1; width: 66px; text-align: center; height: 26px; line-height: 26px; font-size: 12.5px; font-weight: 560; color: var(--ui-muted); transition: color 500ms var(--ease); }
.roles i { position: absolute; left: 3px; top: 3px; width: 66px; height: 26px; border-radius: 7px; background: var(--ui-card);
  box-shadow: 0 1px 2px rgb(11 21 48 / 14%), 0 0 0 1px var(--ui-line); transition: transform 700ms var(--ease); }
.grid[data-role] { position: relative; }
[data-role-now="store"] .roles i { transform: translateX(66px); }
[data-role-now="field"] .roles i { transform: translateX(132px); }
.cam:not([data-role-now]) .r-office, [data-role-now="office"] .r-office, [data-role-now="store"] .r-store, [data-role-now="field"] .r-field { color: var(--ui-text); }
.win .grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; transition: opacity 260ms var(--ease); }
.tile { position: relative; height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; background: var(--ui-card); border: 1px solid var(--ui-line); box-shadow: var(--ui-shadow); overflow: hidden; }
.tile > span:not(.ico) { font-size: 12.5px; font-weight: 530; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 0 5px; }
.grid[data-role="office"] .tile:not([data-roles~="office"]),
.grid[data-role="store"] .tile:not([data-roles~="store"]),
.grid[data-role="field"] .tile:not([data-roles~="field"]),
.tile.is-extra { display: none; }
.ico { --c: #64748b; position: relative; width: 34px; height: 34px; flex: none; padding: 8px; border-radius: 9px; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c) 70%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 25%), 0 1px 2px color-mix(in srgb, var(--c) 40%, transparent); }
.ico svg { stroke-width: 1.9; }
.c-outlook, .c-routes { --c: #2563eb; } .c-teams { --c: #5b5fc7; } .c-sharepoint { --c: #0e7c86; } .c-crm { --c: #0369a1; }
.c-expenses { --c: #15803d; } .c-travel { --c: #0891b2; } .c-hr { --c: #c2410c; } .c-it, .c-till { --c: #475569; }
.c-learning { --c: #b45309; } .c-kb { --c: #6d28d9; } .c-calendar { --c: #be123c; } .c-tasks { --c: #047857; }
.c-rosters { --c: #be185d; } .c-stock { --c: #a16207; } .c-orders { --c: #c2410c; } .c-timesheets { --c: #0f766e; }
.c-news { --c: #2563eb; } .c-policy { --c: #b45309; } .c-outage { --c: #dc2626; }
.ripple { position: absolute; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%; background: var(--brand); opacity: 0; pointer-events: none; }
.signed { position: absolute; top: 7px; right: 7px; width: 16px; height: 16px; padding: 3px; border-radius: 50%; background: var(--ok); color: #fff;
  opacity: 0; transform: scale(0.4); transition: opacity 300ms var(--ease), transform 600ms var(--ease); }
.signed svg { stroke-width: 3; }
.tile.is-signed .signed { opacity: 1; transform: none; }

.msgs { grid-area: msgs; padding: 14px 14px 4px !important; }
.msgs .sec-h { padding: 0 2px; margin-bottom: 4px; }
.msgs .sec-h > b { display: flex; align-items: center; gap: 7px; }
.pill { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--now); color: var(--on-now); font: 650 12px/18px var(--font); text-align: center; }
.msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 12px 2px 13px; }
.msg + .msg { border-top: 1px solid var(--ui-line); }
.msg .ico { width: 32px; height: 32px; padding: 8px; }
.msg .dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--now); box-shadow: 0 0 0 2px var(--ui-card); }
.msg b { display: block; font-size: 13.5px; line-height: 1.3; letter-spacing: -0.006em; }
.msg p { margin: 3px 0 0; color: var(--ui-muted); font-size: 12.5px; line-height: 1.4; }
.msg-meta { display: flex; align-items: center; gap: 7px; margin-top: 7px; color: var(--ui-muted); font-size: 12px; }
.tag { padding: 1px 6px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.tag.blue { background: var(--tag-blue-bg); color: var(--tag-blue); }
.tag.amber { background: var(--tag-amber-bg); color: var(--tag-amber); }
.tag.red { background: var(--tag-red-bg); color: var(--tag-red); }

.assist { position: absolute; right: 18px; bottom: 18px; z-index: 4; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px 0 5px;
  border-radius: 20px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--brand) 70%, transparent), 0 1px 2px rgb(0 0 0 / 15%); }
.assist > span { width: 30px; height: 30px; padding: 5px; border-radius: 50%; background: #fff; }
.assist em { font-style: normal; }
.toast { position: absolute; z-index: 6; top: 112px; right: 24px; width: 280px; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 12px 14px; border-radius: 12px; background: var(--ui-card); border: 1px solid var(--ui-line);
  box-shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 18px 40px -12px rgb(11 21 48 / 30%);
  opacity: 0; transform: translate3d(0, -10px, 0) scale(0.97); transition: opacity 400ms var(--ease), transform 900ms var(--ease); }
.toast.is-on { opacity: 1; transform: none; }
.toast-ok { width: 32px; height: 32px; padding: 8px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.toast-ok svg { stroke-width: 2.6; }
.toast b { display: block; font-size: 13.5px; }
.toast small { display: flex; align-items: center; gap: 5px; color: var(--ui-muted); font-size: 12px; margin-top: 2px; }
.toast small img { width: 12px; height: 12px; }
.cursor { position: absolute; left: 0; top: 0; z-index: 8; width: 22px; height: 22px; opacity: 0; transform: translate3d(900px, 560px, 0); }
.cursor svg { fill: var(--cursor-fill); stroke: var(--cursor-line); stroke-width: 1.4; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 25%)); }

/* ---------- The compact window (narrow screens): one column; the body moves to what the chapter is about ---------- */
@media (max-width: 1023px) {
  .cam { --w: 360px; --h: 520px; }
  .win { font-size: 13.5px; }
  .chrome { height: 34px; padding: 0 12px; gap: 8px; }
  .dots { width: 44px; gap: 5px; } .dots i { width: 9px; height: 9px; }
  .url { flex-basis: 220px; height: 22px; font-size: 12px; }
  .chrome-end { width: 44px; }
  .ahead { height: 54px; gap: 10px; padding: 0 14px; }
  .org { width: auto; }
  .org-names small, .search kbd, .me-name, .bell, .greet-tools, .msg p, .m2 { display: none; }
  .s-long { display: none; } .s-short { display: inline; }
  .search { height: 34px; padding: 0 10px; font-size: 13px; }
  .me { margin-left: 0; }
  .viewport { height: calc(100% - 88px); }
  .abody { display: block; padding: 16px 14px 90px; transition: transform 0s; }
  .greet { padding-bottom: 14px; }
  .greet-h { font-size: 21px; }
  .msgs { margin-bottom: 18px; padding: 10px 12px 2px !important; }
  .msg { padding: 10px 2px 11px; }
  .msg-meta { margin-top: 4px; }
  .cal-card { grid-template-columns: minmax(0, 1fr); }
  .day { border-right: 0; border-bottom: 1px solid var(--ui-line); padding: 12px 12px 10px; }
  .appt { font-size: 12px; padding: 0 6px; gap: 4px; }
  .a2 { left: 29%; } .a3 { left: 64%; }
  .appt .ap-t { display: none; }
  .tasks { padding: 12px 12px 8px; }
  .win .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .tile { height: 78px; gap: 7px; }
  .tile > span:not(.ico) { font-size: 12px; }
  .toast { top: auto; bottom: 66px; left: 50%; right: auto; width: 280px; margin-left: -140px; }
  .assist { height: 42px; padding: 0 6px; right: 14px; bottom: 14px; }
  .assist em { display: none; }
  .roles span, .roles i { width: 56px; }
  [data-role-now="store"] .roles i { transform: translateX(56px); }
  [data-role-now="field"] .roles i { transform: translateX(112px); }
  .cursor svg { display: none; }
  .cursor::before { content: ""; position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; background: rgb(120 130 150 / 35%); box-shadow: 0 0 0 1.5px rgb(255 255 255 / 80%); }
}

/* ---------- The phone (the last chapter) ---------- */
.phone {
  position: absolute; left: 50%; top: 50%; width: 300px; height: 620px; margin: -310px 0 0 -150px; border-radius: 46px; padding: 10px;
  background: linear-gradient(160deg, #2a2d36, #0d0f14 60%); box-shadow: inset 0 0 0 1.5px #3a3d46, inset 0 0 0 3px #0b0b0e,
    0 2px 4px rgb(0 0 0 / 20%), 0 30px 60px -20px rgb(11 21 48 / 45%), 0 60px 120px -40px rgb(11 21 48 / 40%);
  opacity: 0; pointer-events: none; color: var(--ui-text); font: 400 13px/1.4 var(--font); text-align: left;
}
.p-screen { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: var(--ui-bg); }
.p-head { position: absolute; left: 0; right: 0; top: 0; height: 98px; z-index: 0; isolation: isolate; }
.p-status { position: relative; z-index: 1; height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 6px 26px 0 30px; font: 600 12px/1 var(--font); color: #fff; }
.p-island { position: absolute; left: 50%; top: 10px; width: 84px; height: 24px; margin-left: -42px; border-radius: 14px; background: #000; }
.p-sig { display: flex; gap: 2px; align-items: flex-end; }
.p-sig i { width: 3px; height: 4px; background: #fff; border-radius: 1px; }
.p-sig i:nth-child(2) { height: 6px; } .p-sig i:nth-child(3) { height: 8px; } .p-sig i:nth-child(4) { height: 10px; }
.p-top { position: relative; z-index: 1; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 16px; color: #fff; }
.p-top .org-mark { width: 28px; height: 28px; padding: 6px; }
.p-top b { font: 650 14px/1.1 var(--font-display); }
.p-top .avatar { margin-left: auto; width: 30px; height: 30px; }
.p-body { padding: 16px 16px 0; }
.p-h { display: block; font: 680 20px/1.15 var(--font-display); letter-spacing: -0.02em; }
.p-sub { display: block; color: var(--ui-muted); font-size: 12px; margin-top: 3px; }
.p-card { margin-top: 14px; padding: 4px 12px !important; }
.p-appt { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; padding: 9px 0; font-size: 13px; }
.p-appt + .p-appt { border-top: 1px solid var(--ui-line); }
.p-appt time { color: var(--ui-muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.p-appt.is-past b { color: var(--ui-muted); font-weight: 500; }
.p-nowline { position: absolute; left: -12px; right: -12px; top: -1px; height: 2px; background: var(--now); }
.p-nowline::before { content: ""; position: absolute; left: 6px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--now); }
.p-tasks { margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 10px 12px !important; font-size: 13px; }
.p-tasks .ico { width: 30px; height: 30px; padding: 7px; }
.p-tasks > span:last-child { color: var(--ui-muted); margin-left: auto; font-size: 12px; }
.p-sec { margin: 16px 0 8px; font: 650 14px/1 var(--font-display); }
.p-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; }
.p-grid > span { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; min-width: 0; }
.p-grid .ico { width: 44px; height: 44px; padding: 11px; border-radius: 12px; }
.p-grid span span { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.p-nav { position: absolute; left: 0; right: 0; bottom: 0; height: 66px; display: flex; justify-content: space-around; padding: 9px 8px 0;
  background: var(--ui-bg); border-top: 1px solid var(--ui-line); color: var(--ui-muted); font-size: 12px; }
.p-nav > span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.p-nav svg { width: 20px; height: 20px; }
.p-nav .is-on { color: var(--brand-ink); }
.p-home { position: absolute; left: 50%; bottom: 7px; width: 110px; height: 4px; margin-left: -55px; border-radius: 3px; background: var(--ui-text); opacity: 0.85; }

/* Stacked and still: the last chapter folds the window into the phone (home.js sets is-folded; at once in a still). */
.ch-stage .win, .ch-stage .win-card, .ch-stage .phone { transition: opacity 900ms var(--ease); }
.sc.is-folded .win, .sc.is-folded .win-card { opacity: 0; }
.sc.is-folded .phone { opacity: 1; }
/* While playing, what the chapter is not about steps back a little; a still keeps every part at full strength. */
.sc:not(.is-still)[data-ch="2"] [data-part="apps"], .sc:not(.is-still)[data-ch="2"] [data-part="msgs"], .sc:not(.is-still)[data-ch="2"] .greet,
.sc:not(.is-still)[data-ch="3"] [data-part="cal"], .sc:not(.is-still)[data-ch="3"] [data-part="msgs"], .sc:not(.is-still)[data-ch="3"] .greet { opacity: 0.35; }
.greet, [data-part] { transition: opacity 700ms var(--ease); }

/* ---------- Below the hero: sections and screens rise into place as they come into view ---------- */
/* home.js sets .reveals on <html> only while motion is on. */
.reveals .home .reveal { opacity: 0; transform: translate3d(0, 24px, 0);
  transition: opacity 700ms var(--ease), transform 1100ms var(--ease); }
.reveals .home .reveal-rise { opacity: 0; transform: perspective(1600px) translate3d(0, 40px, 0) rotateX(6deg); transform-origin: 50% 100%;
  transition: opacity 800ms var(--ease), transform 1300ms var(--ease); }
.reveals .home .reveal.is-in, .reveals .home .reveal-rise.is-in { opacity: 1; transform: none; }
[data-motion="on"] .home .faq details[open] > :not(summary) { animation: home-rise 600ms var(--ease) both; }
@keyframes home-rise {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: none; }
}
/* A still: nothing moves. */
.sc.is-still, .sc.is-still * { transition: none !important; animation: none !important; }

/* ---------- Phones ---------- */
@media (max-width: 599px) {
  .home { font-size: 16px; }
  .home h1 { font-size: 2.375rem; line-height: 1.02; }
  .ch-hero { padding-top: 16px; }
  .ch-text > .lead { font-size: 1.0625rem; line-height: 1.5; margin-top: 14px; }
  .ch .actions { margin-top: 22px; gap: 10px; }
  .ch .actions .btn { flex: 1 1 auto; }
  .ch .hint { margin-top: 12px; font-size: 0.8125rem; }
  .home .section { padding: 72px 0; }
  .home .section-head { margin-bottom: 36px; }
}
