/* Textra home screen prototype v4: the clean version.
   The Mac screen tries to look like macOS 26 (Tahoe) for real: the Tahoe wallpaper,
   a menu bar without a bar, Liquid Glass toolbars and Dock, real app icons and
   SF Symbols (exported from this Mac into mac/). Textra's own pieces copy the app:
   sizes come from App/OCR/Result/Design.swift (13 pt text, 24 pt rows, 14 pt corners). */

:root {
  /* ── Design tokens for the page (simplified, Dima, 28 Nov).
        The Mac inside the demo keeps its own macOS colours and sizes. ── */
  /* Colours: one small set per theme */
  --bg: #ffffff;
  --text: #1d1d1f;            /* text, headings, and what is filled dark: the button, the active tab */
  --secondary: #7a7a80;       /* quieter text, inactive tabs, icons (Dima, 1 Dec; was #6e6e73) */
  --on-text: #ffffff;         /* text on anything filled with --text */
  --surface: #f2f2f2;         /* tab capsules */
  --hairline: #e0e0e0;        /* lines and outlines */
  --hover: rgba(0, 0, 0, 0.06);        /* hover and keyboard focus */
  --fill: rgba(0, 0, 0, 0.07);         /* progress inside the active tab (on the --surface pill since 30 Nov) */
  /* Type: SF Pro, headings in SF Pro Rounded */
  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", var(--font);
  /* Type scale (Dima, 30 Nov): size / line height in px, tracking next to each use.
     Display 52/60 −2% · H2 40/48 −1% · H3 26/32 −0.5% (Rounded Semibold) ·
     Lead 21/28 Medium · Body 17/24 Medium (bold parts Semibold) · Caption 14/20 Regular. UI is now Body. */
  --t-display: 600 52px/60px var(--rounded);
  --t-h2: 600 40px/48px var(--rounded);
  --t-h3: 600 26px/32px var(--rounded);
  --t-lead: 500 21px/28px var(--font);
  --t-body: 500 17px/24px var(--font);
  --t-caption: 400 14px/20px var(--font);
  /* Corners: fully round for controls, large for pictures */
  --pill: 999px;
  --radius-l: 24px;
  /* Motion: one curve for anything moving into place, two durations */
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  --move: 0.5s;
  --fade: 0.3s;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root { --bg: #080808; --text: #f5f5f7; --secondary: #98989d; --on-text: #1d1d1f; --surface: #2c2c2e;
          --hairline: rgba(255, 255, 255, 0.12); --hover: rgba(255, 255, 255, 0.08); --fill: rgba(255, 255, 255, 0.08); }
}


/* ─── Picture sizes (Dima, 2 Dec) ───
   Each wallpaper comes in a 1× and a 2× file; the browser takes the one that matches the screen
   (normal or Retina) and never downloads the other. -webkit-image-set works in Safari, Chrome and Firefox.
   2× files are WebP quality 70–75: the grain looks the same, the files are 2–4× smaller. */
:root {
  --img-wall: -webkit-image-set(url(mac/wallpaper-light-1440.webp) 1x, url(mac/wallpaper-light.webp) 2x);
  --img-finale: -webkit-image-set(url(mac/finale-light-1440.webp) 1x, url(mac/finale-light.webp) 2x);
  --img-next: -webkit-image-set(url(mac/next-step-light-700.webp) 1x, url(mac/next-step-light.webp) 2x);
  --img-private: -webkit-image-set(url(mac/private-light-444.webp) 1x, url(mac/private-light.webp) 2x);
  --img-instant: -webkit-image-set(url(mac/instant-light-332.webp) 1x, url(mac/instant-light.webp) 2x);
}
@media (prefers-color-scheme: dark) {
  :root {
    --img-wall: -webkit-image-set(url(mac/wallpaper-dark-1440.webp) 1x, url(mac/wallpaper-dark.webp) 2x);
    --img-finale: -webkit-image-set(url(mac/finale-dark-1440.webp) 1x, url(mac/finale-dark.webp) 2x);
    --img-next: -webkit-image-set(url(mac/next-step-dark-700.webp) 1x, url(mac/next-step-dark.webp) 2x);
    --img-private: -webkit-image-set(url(mac/private-dark-444.webp) 1x, url(mac/private-dark.webp) 2x);
    --img-instant: -webkit-image-set(url(mac/instant-dark-332.webp) 1x, url(mac/instant-dark.webp) 2x);
  }
}
/* Phones: the demo screen is shown at about a quarter of its size, so smaller files are enough */
@media (max-width: 760px) {
  :root { --img-wall: -webkit-image-set(url(mac/wallpaper-light-800.webp) 1x, url(mac/wallpaper-light-1440.webp) 2x); }
}
@media (max-width: 760px) and (prefers-color-scheme: dark) {
  :root { --img-wall: -webkit-image-set(url(mac/wallpaper-dark-800.webp) 1x, url(mac/wallpaper-dark-1440.webp) 2x); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
/* Line breaks (Dima, 30 Nov): all the site's text wraps "pretty" (no lone last word). The pretend app
   windows and menus inside the demo and the bento pictures keep normal wrapping, like the real apps. */
body { text-wrap-style: pretty; }
/* Thin, even text rendering everywhere on macOS, buttons and form controls too (Dima, 30 Nov) */
*, *::before, *::after { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.screen, .b-stage { text-wrap-style: auto; }
img, svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* SF Symbol: a black PNG used as a mask, painted with the text colour */
.sf {
  display: inline-block; flex: none; width: 16px; height: 16px;
  background-color: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}

/* ─── Page ─── */
/* Layout grid from Figma (node 147:1297, Dima, 28 Nov): 6 columns of 160 with 12 gutters = 1020,
   centred (130 margins in the 1280 frame); 20 between blocks (header, headline, demo, tabs).
   Header, headline, subtitle and tabs sit on the grid. The demo is not bound by it
   (Dima: the grid doesn't apply to the demo), so it keeps the wider page width.
   Open the page with ?grid to see the six columns. */
:root { --grid: 1020px; --col: 160px; --gutter: 12px; }
.page { max-width: 1280px; margin: 0 auto; padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); padding-bottom: 48px; }
.top, .on-grid { width: min(var(--grid), 100% - 64px); margin-left: auto; margin-right: auto; }
.page .on-grid { width: min(var(--grid), 100%); }   /* inside .page the side padding is already there */
.top { display: flex; justify-content: center; padding: calc(144px + var(--bar-top) + var(--bar-h)) 0 0; }   /* 144 under the header: 144 + 16 + 64 = 224 from the top (Dima, 1 Dec) */   /* the icon in the middle, the scale's largest step above it (Dima, 30 Nov) */
.logo { width: 100px; height: 100px; border-radius: 26px; box-shadow: 0 7.5px 15px rgba(0, 0, 0, 0.08); }   /* 100 × 100 (Dima, 28 Nov); corner and shadow scaled from the 48 pt Figma icon */
/* Text in Lead size (20) and a 22 pt Apple logo; the button grows to 56 to hold them (Dima, 30 Nov; was 15 / 18 / 48) */
.download { display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 24px; border-radius: 16px; background: var(--text); color: var(--on-text); font: var(--t-body); text-decoration: none; }   /* the same button as in the header, «Download for Mac» (Dima, 1 Dec; was a Lead pill «Try for free») */
.download .sf { width: 24.5px; height: 28.8px; margin: -6px -2px -4px; }   /* 1.2× again (Dima, 2 Dec; was 20.4 × 24); negative margins keep the gap and the button size */
/* Hover for every Download button, the header's too (Dima, 2 Dec): a touch lighter (darker in dark mode);
   a short press shrinks it a little, like a real button. The logo stays put. */
.download, .bar-dl { transition: background-color var(--fade) ease, transform 0.15s var(--ease); }
@media (hover: hover) { .download:hover, .bar-dl:hover { background: color-mix(in srgb, var(--text) 82%, var(--bg)); } }
.download:active, .bar-dl:active { transform: scale(0.97); }
.is-share .sf { width: 18px !important; height: 22px !important; margin: -4px 0 0 !important; }   /* the share symbol is narrower than the Apple logo (phones, 2 Dec) */
@supports (corner-shape: superellipse(1.5)) { .download { corner-shape: superellipse(1.5); border-radius: 24px; } }
/* Temporary "Styles" link next to the button, centred on its 48 pt height */
.top-nav { position: absolute; z-index: 20; top: 24px; right: max(32px, env(safe-area-inset-right)); display: flex; gap: 24px; font: var(--t-body); }   /* temporary, in the top-right corner (Dima, 30 Nov) */
.top-nav a { color: var(--secondary); text-decoration: none; }
.top-nav a:hover, .top-nav a[aria-current="page"] { color: var(--text); }

/* ─── Site header (Dima, 1 Dec; Figma 251:4095 compact, 251:4131 wide) ───
   Always on screen, 16 below the top of the window, 64 tall.
   At the top of the page it is compact: only the links, 20 on the sides. Once the page's own logo has scrolled
   away (header.js adds .is-wide) it grows to the full grid (1020; was columns 2–5), and the icon and the Download button
   appear on its sides; the five pieces sit evenly apart.
   How it moves smoothly (Dima, 1 Dec: the links went left and then back right): nothing inside is laid out twice.
   The pieces always sit where they are in the wide bar. Only the glass behind them (.bar-bg) changes width, and
   in the compact state each link is shifted to its compact place with a transform (--dx, from header.js).
   The links stay in the middle; the icon and button ride on the glass edges (see below). */
:root { --bar-top: 16px; --bar-h: 64px; --sticky-top: calc(var(--bar-top) + var(--bar-h) + 48px); }   /* links to a section stop 48 under the bar, as from a heading to its block (Dima, 1 Dec) */
html { scroll-padding-top: var(--sticky-top); }   /* links to #features / #faq land under the bar */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }   /* anchor links glide instead of jumping (Dima, 1 Dec); off for people who turn motion down */
.site-bar { position: fixed; z-index: 60; top: var(--bar-top); left: 50%; transform: translateX(-50%);
            width: min(var(--grid), 100% - 32px); height: var(--bar-h);   /* wide: the full grid, 1020 (Dima, 1 Dec; was columns 2–5) */
            display: flex; align-items: center; padding: 4px; white-space: nowrap; pointer-events: none; }
/* ⚠ No clip-path, mask, filter or opacity < 1 on .site-bar: any of them cuts the glass blur of .bar-bg off from
   the page behind (the blur went missing on 1 Dec because of a clip-path here). The fixed position and z-index
   already keep .bar-bg's z-index -1 inside the bar. */
.bar-bg { position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: var(--bar-compact, 100%);
          border-radius: 20px; pointer-events: auto;
          background: rgba(242, 242, 242, 0.72);   /* --surface (#f2f2f2), the bento card colour, as glass (Dima, 1 Dec; was #d2d2d2) */ -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
          transition: width var(--move) var(--ease); }
.is-wide .bar-bg { width: 100%; }
/* The icon and the button ride on the glass edges (Dima, 1 Dec): compact, they are shifted in by --edge (how far
   each edge moves, from header.js) and hidden; growing, they slide out with the edges on the same curve and fade in
   as soon as there is room next to the links; shrinking, they slide back in and fade out before they reach the links. */
.bar-logo, .bar-dl { flex: none; opacity: 0; pointer-events: none;
                     transition: transform var(--move) var(--ease), opacity 0.1s ease; }   /* shrinking: gone in 0.1 s, long before the links (Dima, 1 Dec) */
.bar-logo { transform: translateX(var(--edge, 0px)); }
.bar-dl { transform: translateX(calc(-1 * var(--edge, 0px))); }
.is-wide .bar-logo, .is-wide .bar-dl { opacity: 1; pointer-events: auto; transform: none;
                                       transition: transform var(--move) var(--ease), opacity 0.15s ease 0.05s; }
.bar-dl { transition: transform var(--move) var(--ease), opacity 0.1s ease, background-color var(--fade) ease; }   /* keeps the ride and fade above, adds the hover colour */
.is-wide .bar-dl { transition: transform var(--move) var(--ease), opacity 0.15s ease 0.05s, background-color var(--fade) ease; }
.is-wide .bar-dl:active { transform: scale(0.97); transition-duration: 0.15s; }   /* the same press as the page buttons */
.bar-logo img { width: 56px; height: 56px; border-radius: 16px; }
.bar-links { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 20px; pointer-events: none; }   /* the links sit in the middle and take no room, so the icon and button always fit (phones too, 2 Dec) */
.site-bar > .bar-dl { margin-left: auto; }
.bar-links a { pointer-events: auto; transform: translateX(var(--dx, 0px)); transition: transform var(--move) var(--ease), color var(--fade) ease; }
/* the links keep their compact places in the middle when the bar grows: only the glass, icon and button change (Dima, 1 Dec) */
.bar-links a, .bar-dl { font: var(--t-body); color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.bar-links a { color: var(--secondary); }   /* quiet links, --text on hover (Dima, 1 Dec) */
.bar-links a:hover, .bar-links a:focus-visible { color: var(--text); }
.bar-dl { display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 24px; border-radius: 16px; background: var(--text); color: var(--on-text); }   /* dark on light, light on dark, like the hero button (Dima, 1 Dec) */
.bar-dl .sf { width: 24.5px; height: 28.8px; margin: -6px -2px -4px; }   /* same as .download */
.site-bar.no-anim * { transition: none !important; }   /* no animation for the first placement on load */
@supports (corner-shape: superellipse(1.5)) {
  .bar-bg { corner-shape: superellipse(1.5); border-radius: 30px; }
  .bar-logo img, .bar-dl { corner-shape: superellipse(1.5); border-radius: 24px; }
}
@media (prefers-color-scheme: dark) { .bar-bg { background: rgba(44, 44, 46, 0.72); } }
@media (max-width: 640px) { .is-wide .bar-links a { opacity: 0; pointer-events: none; } }   /* phone: wide shows only the icon and the button */
/* ─── Phone menu (Dima, 2 Dec) ───
   On phones the bar is always wide: icon on the left; on the right Send to Mac and a square menu button,
   as tall as Send to Mac with the same corners, secondary: white (in dark, a grey a step above the glass).
   It opens a panel under the bar, the same glass, with Features, FAQ and Changelog. header.js opens and closes it. */
.bar-menu, .bar-menu-panel { display: none; }
@media (max-width: 640px) {
  .bar-menu { flex: none; display: grid; place-items: center; width: 56px; height: 56px; margin-left: 4px; padding: 0; border: 0; border-radius: 16px;
              background: #fff; color: var(--text); cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent;
              transition: transform 0.15s var(--ease), background-color var(--fade) ease; }
  .bar-menu:active { transform: scale(0.97); }
  /* No ring after a tap (the browser's own ring is a plain rounded box, so it looked crooked and stuck out past
     the bar: Dima, 2 Dec); keyboard users still get one, inside the button so it follows its shape */
  .bar-menu:focus { outline: none; }
  .bar-menu:focus-visible { box-shadow: inset 0 0 0 2px var(--text); }
  .bar-menu svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; overflow: visible; }
  /* ☰ and × are two separate drawings, swapped with a quick fade and turn. (They used to be the same three lines
     turned into a cross with CSS transforms; Safari turns SVG lines about a different point, so the × came out
     lopsided: Dima, 2 Dec.) The × is two equal lines through the exact centre, same weight and round ends as ☰. */
  .bar-menu svg { grid-area: 1 / 1; transition: opacity 0.2s ease, transform 0.3s var(--ease); }
  .bar-menu .i-close { opacity: 0; transform: rotate(-45deg); }
  .menu-open .bar-menu .i-open { opacity: 0; transform: rotate(45deg); }
  .menu-open .bar-menu .i-close { opacity: 1; transform: none; }
  /* The panel: under the bar, as wide as it, the links one under another in rows you can hit with a thumb */
  .bar-menu-panel { position: absolute; top: calc(100% + 8px); left: 0; right: 0; display: flex; flex-direction: column; padding: 8px;
                    border-radius: 20px; background: rgba(242, 242, 242, 0.72); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
                    opacity: 0; transform: translateY(-8px); pointer-events: none;
                    transition: opacity 0.2s ease, transform 0.3s var(--ease); }
  .menu-open .bar-menu-panel { opacity: 1; transform: none; pointer-events: auto; }
  .bar-menu-panel a { display: flex; align-items: center; height: 52px; padding: 0 16px; border-radius: 12px;
                      font: var(--t-body); color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .bar-menu-panel a:active, .bar-menu-panel a[aria-current="page"] { background: rgba(0, 0, 0, 0.05); }
  .bar-dl { padding: 0 20px; }   /* a little narrower, so icon, Send to Mac and the menu fit a 360 pt phone */
  /* At the top of the home page only ☰ shows (Dima, 2 Dec): the glass is a 64 pt square around it on the right.
     Once the big icon scrolls away the glass grows to the left to the full bar, and the icon and Send to Mac
     slide in a little from the right and fade in, on the same curve as the Mac bar. */
  .bar-links { display: none; }
  .bar-bg { left: auto; right: 0; transform: none; width: 64px; }
  .is-wide .bar-bg { width: 100%; }
  .site-bar:not(.is-wide) :is(.bar-logo, .bar-dl) { transform: translateX(24px); }
}
@supports (corner-shape: superellipse(1.5)) { .bar-menu { corner-shape: superellipse(1.5); border-radius: 24px; } .bar-menu-panel { corner-shape: superellipse(1.5); border-radius: 30px; } }
@media (max-width: 640px) and (prefers-color-scheme: dark) {
  .bar-menu { background: #3a3a3c; }
  .bar-menu-panel { background: rgba(44, 44, 46, 0.72); }
  .bar-menu-panel a:active, .bar-menu-panel a[aria-current="page"] { background: rgba(255, 255, 255, 0.08); }
}
@media (prefers-reduced-motion: reduce) { .site-bar * { transition-duration: 0.01s !important; } }
/* "Beta · macOS 15 or later" under the button, small and quiet, centred under it */
.get { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 32px 0 48px; }   /* under the subtitle, centred; 48 to the demo */
.get-note { margin: 0; font: var(--t-caption); color: var(--secondary); }

/* ?grid: the six columns drawn over the page */
.show-grid::after {
  content: ""; position: fixed; inset: 0 auto 0 50%; z-index: 100; pointer-events: none;
  width: var(--grid); transform: translateX(-50%);
  background: repeating-linear-gradient(90deg, rgba(255, 0, 80, 0.08) 0 var(--col), transparent var(--col) calc(var(--col) + var(--gutter)));
}
/* Typography from Figma (node 147:1316, Dima, 28 Nov): headline SF Pro Rounded Semibold 48 / 1.15,
   tracking −2%; subtitle SF Pro Regular 18 / 1.4, 12 pt below the headline */
h1 { margin: 32px 0 0; padding-top: 0; text-align: center;   /* 32 under the icon, as from the subtitle to the button; centred (Dima, 30 Nov) */
      font: var(--t-display); letter-spacing: -0.02em; }
.subtitle { margin-top: 12px; margin-bottom: 0; text-align: center; font: var(--t-lead); color: var(--secondary); }   /* 20 pt, quieter, 32 to the demo (Dima, 28 Nov) */

/* The changing verb. Its box animates to the width of the new word, so the rest of the line
   slides left or right with it. Inside, the old word leaves letter by letter (up, fading, blurring)
   and the new one arrives letter by letter from below. script.js splits words into letters. */
.verb-box { display: inline-block; position: relative; vertical-align: bottom; white-space: nowrap; }
.verb { display: inline-block; white-space: pre; }
.verb.is-leaving { position: absolute; left: 0; top: 0; }   /* the old word no longer takes space */
.verb i { display: inline-block; font-style: normal;
          transition: opacity var(--fade) ease, transform var(--move) var(--ease), filter var(--fade) ease;
          transition-delay: calc(var(--n) * 28ms); }
.verb.is-leaving i { opacity: 0; transform: translateY(-0.12em); filter: blur(6px); }   /* a short move (Dima, 30 Nov; was 0.32em up, 0.38em from below) */
.verb.is-arriving i { opacity: 0; transform: translateY(0.14em); filter: blur(6px); transition: none; }
/* The rest of the line slides with a transform, not by animating the verb box's width:
   a moving width re-lays the text every frame and the letters snap from pixel to pixel
   (a visible shiver). A transform glides the finished line as one picture. */
.rest { display: inline-block; }
.rest.is-sliding, .verb-box.is-sliding { will-change: transform; transition: transform var(--move) var(--ease); }   /* the centred line: both parts slide */

/* ─── The Mac screen: 1364 × 820 pt (Dima, 29 Nov; was 1240 × 775), 1:1 when there is room, smaller on narrow
   windows (script.js sets --s). It is wider than the page's grid and centred on it:
   it shrinks only when the window is narrower than the desktop plus 20 on each side.
   Phones (Dima, 2 Dec): the desktop itself is smaller, 1040 × 760, with the same windows, so they fill about
   80% of it instead of about 55% and the whole demo is shown about a third bigger. 1040 is as narrow as it
   goes: Translate's window with its menu and panel is 974 wide and keeps 28 from each edge.
   prototype.js reads the size once when the page opens (--demo-w / --demo-h) and keeps it. */
:root { --demo-w: 1364px; --demo-h: 820px; }
@media (max-width: 760px) { :root { --demo-w: 920px; --demo-h: 700px; } }
.screen-fit {
  position: relative;
  width: min(var(--demo-w), 100vw - 40px); height: calc(var(--demo-h) * var(--s, 1));
  margin-left: calc((100% - min(var(--demo-w), 100vw - 40px)) / 2);
}
/* The desktop is rounded itself (16 pt, Apple style below), not its outer box: Chrome doesn't
   clip a scaled child to a corner-shaped parent, so the shape lives on the scaled screen. */
.screen {
  position: relative; width: var(--demo-w); height: var(--demo-h); overflow: hidden; border-radius: 16px;
  transform: scale(var(--s, 1)); transform-origin: top left;
  font-family: var(--font); font-size: 13px; color: #1d1d1f;
}

.wallpaper {
  position: absolute; inset: 0;
  border-radius: inherit; corner-shape: inherit;
  /* Light: the lake at sunset; dark: the same lake at night (Dima's files, 28 Nov).
     Which one shows follows the system theme, see the dark block near the end. */
  background: #65a5a0 var(--img-wall) center 40% / cover no-repeat;   /* Dima's flow wallpaper (1 Dec; was Tahoe); the colour is its average, shown until it loads */
  transition: filter 0.4s ease;
}

/* Menu bar: macOS 26 draws no bar, only text and icons (no shadow, Dima, 1 Dec) */
.menubar {
  position: absolute; z-index: 20; left: 0; right: 0; top: 4px; height: 26px;   /* 4 px lower (Dima, 28 Nov) */
  /* Sizes and distances copied from Dima's own menu bar (@2x screenshots, 28 Nov):
     screen edge → Apple logo 20.5, logo → app name 20.5; Textra icon → date 23, time → screen edge 21 */
  display: flex; align-items: center; gap: 20.5px; padding: 0 21px 0 20.5px;
  color: #ffffff; font-size: 14px;   /* no shadow (Dima, 1 Dec; was a soft 6 px shadow) */
}
.mb-apple { width: 20px; height: 25px; margin: -1px -3.8px 0; }   /* logo ink 12.4 × 15.4; the PNG has air on the sides, negative margins cancel it so the 20.5 gaps are real */
.mb-app { font-weight: 700; }   /* bold 14, same ink size as "Helium" on Dima's Mac */
.mb-right { margin-left: auto; display: flex; align-items: center; gap: 23px; }
.mb-right .sf { width: 15px; height: 15px; }
.mb-textra { display: grid; place-items: center; width: 22px; height: 22px; margin: 0 -4px; }   /* the icon has 4 pt of air on each side; cancel it so the 23 pt gap to the date is real */
.mb-textra .sf { width: 22px; height: 22px; flex: none; }   /* the original icon at its real size in the app, 22 pt */
.mb-clock { font-size: 13.5px; font-weight: 500; white-space: pre; }   /* Medium (Dima, 28 Nov) */   /* 13.5 matches the date on Dima's Mac; pre keeps the double space before the time */


/* ─── Scenes and windows ─── */
/* Between examples the old one fades out first, then the new one fades in: no two sets of
   windows ghosting over each other (script.js waits SWITCH_MS before the new one starts). */
.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s; }
.scene.is-active { opacity: 1; visibility: visible; transition: opacity 0.45s ease 0.22s, visibility 0s; }
/* Pointer and frame step aside while the examples change */
.screen.switching .cursor, .screen.switching .selection { opacity: 0 !important; transition: opacity 0.2s ease !important; }

.window {
  position: absolute; z-index: 1; overflow: hidden;
  border-radius: 16px; background: #ffffff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.18), 0 22px 60px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* Unified toolbar with glass buttons, like macOS 26 apps */
.toolbar {
  position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 40px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px;
  /* Solid, and rounded like the window: a backdrop blur here made Chrome ignore the
     window's corner clipping, so the title bar stuck out at the corners. */
  background: #ffffff;
  border-top-left-radius: inherit; border-top-right-radius: inherit; corner-shape: inherit;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
  color: #3a3a3c;
}
.lights { display: flex; gap: 8px; margin-right: 6px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15); }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.tb-btn, .tb-group {
  display: flex; align-items: center; gap: 16px; height: 32px; padding: 0 10px;
  border-radius: 16px; background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}
.tb-btn { width: 32px; padding: 0; justify-content: center; }
.tb-btn .sf, .tb-group .sf { width: 15px; height: 15px; }
.tb-btn.send { color: #0a84ff; }
.tb-title { margin-right: auto; font-weight: 600; font-size: 13px; color: #1d1d1f; }
.tb-title small { font-weight: 400; font-size: 11px; color: #86868b; }
.tb-spacer { margin-right: auto; }
.content { position: absolute; inset: 40px 0 0; overflow: hidden; }

/* Preview canvas (image and PDF) */
.preview-canvas { background: #ececec; padding: 18px; }
.preview-tight { padding: 0 16px 16px; }   /* the picture right under the title bar (Dima, 30 Nov) */
/* Preview: the title bar has the canvas colour and no divider, so the window reads as one piece (Dima, 28 Nov) */
.window.preview .toolbar { background: #ececec; border-bottom: none; }
.slide-image { position: relative; width: 100%; aspect-ratio: 2198 / 1236; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.slide-image img { display: block; width: 100%; height: 100%; }
.slide-image .target { position: absolute; }

/* The PDF is scrolled a little, so § 1 sits under the frame and the window stays clear of the menu bar */
.paper {
  max-width: 560px; margin: -64px auto 0; padding: 22px 34px 30px;
  background: linear-gradient(180deg, #f4f4f2, #ebebe8);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  font-family: "Iowan Old Style", "Palatino", Georgia, serif; font-size: 12.5px; line-height: 1.5; color: #2a2a2a;
  filter: contrast(1.02) saturate(0);
}
.paper h3 { margin: 10px 0 2px; text-align: center; font-size: 18px; letter-spacing: 0.04em; }
.paper h4 { margin: 10px 0 1px; font-size: 13px; }
.paper p { margin: 0; }
.paper-head { display: flex; justify-content: space-between; padding-bottom: 5px; border-bottom: 1px solid #b9b9b6; font-family: var(--font); font-size: 8.5px !important; color: #777; }
.paper-sub { text-align: center; font-style: italic; color: #555; font-size: 11px !important; }
.paper-parties { margin: 10px 0 2px !important; }
.paper-parties b { display: inline-block; width: 82px; font-family: var(--font); font-size: 8px; font-weight: 500; letter-spacing: 0.08em; color: #777; }
.paper-center { text-align: center; color: #555; font-size: 11.5px !important; }

/* Notes */
.notes-body { padding: 14px 24px; font-size: 15px; line-height: 1.55; background: #ffffff; }   /* +2 pt (Dima, 28 Nov) */
.notes-body p { margin: 0; }
.note-title { font-size: 24px; font-weight: 700; margin-bottom: 6px !important; }
.window.notes { z-index: 0; }
.s-vkey .window.notes { z-index: 2; }
/* Pasted text just appears, no yellow flash (Dima, 28 Nov) */
.pasted { opacity: 0; transition: opacity 0.5s ease; }
.s-paste .pasted { opacity: 1; }

/* Mail */
.mail-compose { padding: 4px 22px; font-size: 14px; line-height: 1.55; background: #fff; }
.field { margin: 0; padding: 7px 0; border-bottom: 0.5px solid rgba(0, 0, 0, 0.12); }
.field > span:first-child { color: #86868b; margin-right: 6px; }
.token { padding: 1px 7px; border-radius: 10px; background: rgba(10, 132, 255, 0.12); color: #0a64d6; }
.mail-text { padding-top: 14px; font-size: 16px; line-height: 1.5; }
.mail-text p { margin: 0 0 12px; }
.caret { width: 1.5px; height: 17px; background: #0a84ff; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mail-view { padding: 18px 24px; background: #fff; font-size: 13px; }
.mail-head { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 14px; border-bottom: 0.5px solid rgba(0, 0, 0, 0.12); }
.mail-head > div { display: flex; flex-direction: column; flex: 1; line-height: 1.35; }
.mail-head > div span { color: #1d1d1f; }   /* only the subject line; a plain ".mail-head span" also painted the avatar initials dark */
.mail-head small, .mail-head time { color: #86868b; font-size: 11.5px; }
/* Contact avatar as in Apple Mail: a circle with a soft blue-lavender gradient, white bold initials */
.avatar, .mail-head .avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #b3c9e5, #8c99c9); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 0.01em; }

/* Text selected the usual way: macOS selection colour behind the selected words */
.target { border-radius: 2px; transition: background-color 0.25s ease; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.scene[data-kind="text"].s-select .target { background: #b4d7ff; }
/* Selected lines join into one block, as in macOS (Dima, 30 Nov): the highlight fills each line's
   full height (text 16 on a 24 line → 3 above and below, 0.1875em), with square corners. Vertical
   padding on inline text doesn't move the lines. */
.scene[data-kind="text"] .target { padding: 0.1875em 0; border-radius: 0; }
/* After Replace the new text is not selected. The extra .s-select makes this beat the
   selection colour in the dark theme block further down. */
.scene[data-kind="text"].s-select.s-replaced .target, .scene[data-kind="text"].s-replaced .target { background: transparent; }

/* Xcode */
.xcode { background: #ffffff; }
.xc-tabs { display: flex; height: 30px; border-bottom: 0.5px solid rgba(0, 0, 0, 0.12); background: #f6f6f6; font-size: 12px; }
.xc-tabs span { display: flex; align-items: center; gap: 6px; padding: 0 14px; color: #6e6e73; border-right: 0.5px solid rgba(0, 0, 0, 0.1); }
.xc-tabs span.on { background: #fff; color: #1d1d1f; }
.xc-tabs img { width: 14px; height: 14px; }
.xc-status { padding: 6px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.05); font-size: 12px; color: #3a3a3c; }
.xc-status small { color: #86868b; margin-left: 4px; }
.xcode pre { margin: 0; padding: 12px 0; font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 13px; line-height: 1.75; color: #000; }
.xcode .ln { display: inline-block; width: 44px; padding-right: 16px; text-align: right; color: #a6a6a6; }
.xcode .k { color: #9b2393; font-weight: 600; }
.xcode .s { color: #c41a16; }
.xcode .ty { color: #3900a0; }
.xcode .fn { color: #0f68a0; }
.xcode .fn2 { color: #326d74; }
.xcode .c { color: #5d6c79; }

/* Safari 26: a glass bar floating over the page, address field in the middle */
.safari-bar {
  position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 48px;
  display: flex; align-items: center; gap: 8px; padding: 0 10px 0 16px;
  /* No colour and no divider of its own: the page runs up under the bar, so the bar takes
     the colour of the site's header and the window reads as one piece (Dima, 28 Nov) */
  background: transparent;
  border-top-left-radius: inherit; border-top-right-radius: inherit; corner-shape: inherit;
  color: #3a3a3c;
}
.window.safari .content { inset: 0; padding-top: 48px; }
.window.safari:has(.poster) .safari-bar { background: transparent; }   /* the poster itself runs up under the bar */
/* Maison Brume shop (French, Dima, 28 Nov): light grey header, and Safari's bar in the same grey (Dima, 28 Nov) */
.shop .web-nav { background: #f5f5f7; border-bottom: none; }
.window.safari:has(.shop) .safari-bar { background: #f5f5f7; }
.sb-btn, .sb-pair { display: flex; align-items: center; height: 30px; border-radius: 15px; background: rgba(0, 0, 0, 0.045); }
.sb-btn { width: 34px; justify-content: center; }
.sb-pair { gap: 18px; padding: 0 12px; }
.sb-btn .sf, .sb-pair .sf { width: 15px; height: 15px; }
.sb-pair .dim { opacity: 0.35; }
/* Just the window buttons and a capsule address field with the site's name (Dima, 28 Nov) */
/* Shorter, centred in the bar (Dima, 28 Nov). Kept simple on Dima's request:
   a translucent white capsule, a hairline outline and one soft shadow */
.sb-address {
  position: absolute; left: 50%; top: 9px; transform: translateX(-50%);
  width: 250px; height: 30px; padding: 0 30px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 15px; color: #1d1d1f; font-size: 13px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
}
.sb-address .favicon { width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; }
.sb-address .reload { position: absolute; right: 12px; width: 12px; height: 12px; color: #86868b; }
.web { background: #fff; }
.web-nav { display: flex; align-items: center; gap: 22px; height: 46px; padding: 0 30px; border-bottom: 1px solid #f0f0f0; font-size: 13px; color: #555; }
.web-nav b { margin-right: auto; color: #1d1d1f; letter-spacing: 0.02em; }
.web-nav .on { color: #c0552b; font-weight: 600; }
/* Bluebonnet Fest (Austin): a festival poster. Pale lavender paper, a bluebonnet-blue
   and a sun-yellow circle, one heavy condensed headline. The address is just text in the paragraph. */
.poster { background: #edf6f9; color: #13163a; }   /* paper: a pale tint of the blue (was lavender #eef0ff for the old blue) */
.poster > * { position: relative; }   /* text above the circles */
.poster-sun, .poster-leaf { position: absolute !important; border-radius: 50%; pointer-events: none; }
.poster-sun { right: -70px; top: 112px; width: 300px; height: 300px; background: #118ab2; }   /* Dima's colours, 3 Dec: blue #118AB2 (was #3442d9) */
.poster-leaf { right: 170px; top: 300px; width: 130px; height: 130px; background: #06d6a0; mix-blend-mode: multiply; }   /* green #06D6A0 (was yellow #ffc53d); multiplied over the blue the overlap comes out a deep teal */
.poster .web-nav { background: transparent; border-bottom: none; color: #555a80; }
.poster .web-nav b { display: flex; align-items: center; gap: 7px; font-weight: 800; letter-spacing: -0.01em; }
.poster .web-nav .on { color: #118ab2; }
.poster-mark { width: 12px; height: 12px; border-radius: 50%; background: #118ab2; box-shadow: 5px 0 0 #06d6a0; margin-right: 5px; }
.poster-kicker { display: inline-block; margin: 14px 40px 0; padding: 4px 10px; border: 1.5px solid currentColor; border-radius: 20px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.poster h3 { max-width: 420px; margin: 14px 40px 16px; font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif; font-weight: 800; font-size: 54px; line-height: 0.9; letter-spacing: -0.01em; text-transform: uppercase; }
.poster-text { margin: 0 40px; max-width: 340px; font-size: 13.5px; line-height: 1.55; color: #45496e; }
.window.compose { z-index: 7; opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.6s var(--ease); }
.s-result .window.compose { opacity: 1; transform: none; }

.shop-row { display: flex; gap: 30px; padding: 26px 30px; }
.shop-photo { position: relative; flex: none; width: 270px; height: 300px; border-radius: 10px; background: #e4e4e5; display: grid; place-items: center; overflow: hidden; }
.shop-badge { position: absolute; left: 12px; top: 12px; padding: 4px 9px; border-radius: 20px; background: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #1d1d1f; }
.shop-photo img { width: 100%; height: 100%; object-fit: cover; }   /* product photo from Dima, 28 Nov */
/* Maison Brume: a calm French shop. Letter-spaced logo, serif product name,
   a large price, colour swatches and a pill button. */
.shop .web-nav b { font-weight: 600; letter-spacing: 0.32em; }
.shop-info { flex: 1; padding-top: 2px; }
.shop-info p { margin: 0; }
.shop-brand { font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #86868b; }
.shop-info h3 { margin: 8px 0 16px; font-family: Baskerville, "Iowan Old Style", Georgia, serif; font-size: 30px; font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; }
.shop-price { display: inline-block; font-size: 30px; font-weight: 500; letter-spacing: -0.02em; }
.shop-small { margin-top: 3px !important; font-size: 11px; color: #86868b; }
.shop-swatches { display: flex; align-items: center; gap: 8px; margin-top: 18px !important; font-size: 12px; color: #6e6e73; }
.shop-swatches i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15); }
.shop-swatches i.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #1d1d1f; }
.shop-swatches span { margin-left: 4px; }
.shop-sizes { display: flex; gap: 6px; margin-top: 14px !important; }
.shop-sizes span { width: 40px; height: 32px; display: grid; place-items: center; border: 1px solid #ddd; border-radius: 8px; font-size: 12px; }
.shop-sizes .on { border-color: #1d1d1f; background: #1d1d1f; color: #fff; }
.shop-button { display: block; margin-top: 16px !important; padding: 12px 0; border-radius: 22px; background: #1d1d1f; color: #fff; font-size: 13px; font-weight: 500; text-align: center; }

/* ─── Textra ─── */

/* Selection frame, as in Textra on macOS 26 (App/OCR/Capture/LensGlass.swift and the demo videos):
   the whole selected area mixed 25% towards grey, corners 6 pt, a thin refracting rim with a
   highlight from the top, a 0.5 pt white edge. No blur, no outline, nothing outside is dimmed. */
.selection {
  position: absolute; z-index: 5; border-radius: 6px;
  background: rgba(135, 135, 135, 0.25);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.15), inset 0 0 2px 1px rgba(0, 0, 0, 0.07), inset 0 1.5px 1px -0.5px rgba(255, 255, 255, 0.2);   /* the top highlight at half strength (Dima, 30 Nov; was 0.4) */
  transform-origin: top left; transform: scale(0.02); opacity: 0;
  transition: transform 0.9s var(--ease), opacity 0.25s ease;
}
.screen.has-frame .selection { transform: none; opacity: 1; }
/* In the shortened examples the frame is simply there (no need to watch the drag again) */
.screen.frame-instant .selection { transform: none; transition: opacity 0.3s ease; }

/* Pointers */
.cursor { position: absolute; z-index: 9; left: 0; top: 0; opacity: 0; pointer-events: none; transition: transform 0.65s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.2s ease; }   /* 0.65 s = POINTER_LEAD in script.js */
.cursor.is-on { opacity: 1; }
.cursor.arrow { width: 17px; height: 24px; fill: #000; stroke: #fff; stroke-width: 1.3; stroke-linejoin: round; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35)); }
.cursor.cross { width: 23px; height: 23px; margin: -11.5px 0 0 -11.5px; stroke: #000; stroke-width: 1.2; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); transition: transform 0.9s var(--ease), opacity 0.2s ease; }   /* same as the frame being drawn */
.cursor.ibeam { width: 10px; height: 22px; margin-left: -5px; fill: none; stroke: #000; stroke-width: 1.3; stroke-linecap: round; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); }

/* Liquid Glass: Textra's menu/panel shape, the submenu and the capsule.
   One shape per example: it morphs from the size of the menu to the size of the panel. */
.shape, .submenu, .glass {
  position: absolute; border-radius: 14px;
  background: rgba(250, 250, 252, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(1.9); backdrop-filter: blur(22px) saturate(1.9);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 0.5px rgba(255, 255, 255, 0.5),
              0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 8px 18px rgba(0, 0, 0, 0.16);
}
.shape {
  z-index: 6; opacity: 0; transform: scale(0.96); pointer-events: none;
  transition: left 0.45s var(--ease), top 0.45s var(--ease),
              width 0.45s var(--ease), height 0.45s var(--ease),
              opacity 0.25s ease, transform 0.35s var(--ease);
}
.shape.is-on { opacity: 1; transform: none; }

/* Menu and panel content sit on the shape. Menu fades out fast, panel fades in a bit later
   and grows from 97% (App/OCR/Result/Design.swift: menuFadeOut, panelFadeIn, morphContentScale). */
.menu, .panel { position: absolute; z-index: 7; color: #1a1a1a; font-size: 13px; line-height: 16px; pointer-events: none; }
.menu { padding: 6px; min-width: 140px; max-width: 400px; opacity: 0; transition: opacity 0.18s ease; }
.s-menu .menu { opacity: 1; transition: opacity 0.25s ease 0.08s; }
.s-result .menu { opacity: 0; transition: opacity 0.16s ease; }
.panel { padding: 6px; width: 320px; opacity: 0; transform: scale(0.97); transition: opacity 0.15s ease, transform 0.3s ease; }
.s-result .panel { opacity: 1; transform: none; transition: opacity 0.32s ease 0.18s, transform 0.45s var(--ease) 0.08s; }   /* in step with the glass growing (0.45 s) */
.panel-wide { width: 400px; }

/* Menu: grey preview row (24 pt, no line under it), then 24 pt rows, 6 pt gap between them */
/* The menu is as wide as its longest row (Design.menuWidth: 140 to 400 pt); the preview
   line takes no part in that and is cut with "…" (width 0 + min-width 100%). */
.menu .preview { width: 0; min-width: 100%; height: 24px; line-height: 24px; padding: 0 6px; margin: 0 0 6px; color: #6e6e73; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li, .submenu li { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 6px; border-radius: 8px; white-space: nowrap; }
.menu li img, .submenu li img { width: 16px; height: 16px; margin: 0 2px; flex: none; }   /* 20 pt icon cell */
.menu li img.round { border-radius: 4px; }
.menu li .sf, .submenu li .sf { width: 16px; height: 16px; margin: 0 2px; color: #6e6e73; }
.menu li em { font-style: normal; color: #6e6e73; overflow: hidden; text-overflow: ellipsis; }
/* Chevron: chevron.right, 11 pt semibold, secondary grey, at the right edge of the row
   (its 10 pt trailing padding); 18 pt are kept for it in the width (Design.chevronSpace) */
.menu li .more { margin: 0 0 0 auto; padding-left: 11px; width: 7px; height: 11px; box-sizing: content-box; color: #6e6e73; -webkit-mask-origin: content-box; mask-origin: content-box; -webkit-mask-clip: content-box; mask-clip: content-box; }
.menu li, .submenu li { transition: background-color 0.15s ease; }
.menu li.is-hl, .submenu li.is-hl { background: rgba(0, 0, 0, 0.075); }

/* Submenu (Ask AI ▸): its own glass next to the menu */
.submenu { z-index: 8; padding: 6px; min-width: 140px; opacity: 0; transform: scale(0.97); transform-origin: top left; transition: opacity 0.2s ease, transform 0.3s ease; color: #1a1a1a; }
.submenu ul { list-style: none; margin: 0; padding: 0; }
.s-sub .submenu { opacity: 1; transform: none; }
.s-result .submenu { opacity: 0; transform: scale(0.98); transition: opacity 0.22s ease, transform 0.3s ease; }

/* Menu search (Ask AI): the preview line turns into what you type, only "Ask AI" stays */
.search-menu .query, .search-menu .found { display: none; }
/* Typing: the menu grows to the search width together with its glass (no content sticking out) */
.search-menu { width: var(--w, auto); overflow: hidden; transition: opacity 0.18s ease, width 0.45s var(--ease); }
.s-type .search-menu { width: 300px; }
.s-menu .menu.search-menu { transition: opacity 0.25s ease 0.08s, width 0.45s var(--ease); }
.s-type .search-menu .pv, .s-type .search-menu .rows:not(.found) { display: none; }
.s-type .search-menu .query { display: inline; color: #1a1a1a; }
.s-type .search-menu .found { display: block; animation: fade-in 0.25s ease both; }
.typed { white-space: nowrap; }   /* typed letter by letter by the script */
.query .caret { display: inline-block; width: 1.5px; height: 15px; margin-left: 1px; vertical-align: -3px; background: #1a1a1a; animation: blink 1s steps(1) infinite; }

/* Panels: grey header row, 1 pt separator inset 6 pt, result 15 pt, bottom row
   (App/OCR/Translation/TranslationView.swift, AI/AIPanel.swift, Conversion/ConversionView.swift) */
.panel p { margin: 0; }
.panel .head { height: 24px; line-height: 24px; padding: 0 6px; color: #6e6e73; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel .sep { height: 1px; margin: 6px 6px; background: rgba(0, 0, 0, 0.1); }
.panel .answer { padding: 0 6px; font-size: 15px; line-height: 20px; }
.panel .answer ins { text-decoration: none; padding: 0 2px; margin: 0 -2px; border-radius: 4px; background: rgba(52, 199, 89, 0.15); }
.panel .foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; height: 24px; margin-top: 6px; padding: 0 6px; color: #6e6e73; }
.panel .foot .sf { width: 16px; height: 16px; }
.panel .foot .text-button { margin-right: auto; margin-left: -6px; padding: 0 6px; height: 24px; line-height: 24px; border-radius: 6px; color: #1a1a1a; transition: background-color 0.15s ease; }
.s-replace .panel .foot .text-button { background: rgba(0, 0, 0, 0.08); }
.s-replaced .panel { opacity: 0; transition: opacity 0.25s ease; }
.panel .foot .lang { display: flex; align-items: center; gap: 5px; color: #1a1a1a; }
.panel .foot .lang .sf { width: 10px; height: 10px; color: #6e6e73; }
/* Loading row: the title on the left, the spinner in the same 32 × 24 cell on the right
   where the icons sit (App/OCR/AI/AIPanel.swift: AILoadingRow) */
.panel .loading { display: flex; align-items: center; justify-content: space-between; height: 24px; padding: 0 0 0 6px; color: #6e6e73; }
.panel .loading .spinner { width: 16px; height: 16px; margin: 0 8px; }
/* The system spinner (SwiftUI ProgressView, small, scaled 0.8 as in the app): 12 spokes */
.spinner { width: 13px; height: 13px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' opacity='.85'/%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' transform='rotate(30 12 12)' opacity='.75'/%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' transform='rotate(60 12 12)' opacity='.68'/%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' transform='rotate(90 12 12)' opacity='.6'/%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' transform='rotate(120 12 12)' opacity='.52'/%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' transform='rotate(150 12 12)' opacity='.45'/%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' transform='rotate(180 12 12)' opacity='.38'/%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' transform='rotate(210 12 12)' opacity='.31'/%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' transform='rotate(240 12 12)' opacity='.25'/%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' transform='rotate(270 12 12)' opacity='.2'/%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' transform='rotate(300 12 12)' opacity='.16'/%3E%3Cline x1='12' y1='2.5' x2='12' y2='7' transform='rotate(330 12 12)' opacity='.13'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; animation: spin 1s steps(12) infinite; }
@keyframes spin { to { transform: rotate(-360deg); } }
/* AI panels: "Proofreading…" / "Thinking…" first, then the result */
.scene:not(.s-done) .panel .loading ~ .answer, .scene:not(.s-done) .panel .loading ~ .foot { display: none; }
.scene.s-done .panel .loading { display: none; }
/* The answer fades in while the glass grows to its height, not before */
.scene.s-done .panel .loading ~ .answer, .scene.s-done .panel .loading ~ .foot { animation: fade-in 0.35s ease 0.2s both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.panel-convert { width: 280px; }
.conv-row { display: flex; justify-content: space-between; align-items: center; height: 24px; padding: 0 6px; border-radius: 8px; font-size: 13px; }
.conv-row b { font-weight: 400; }
.conv-row span { color: #6e6e73; }
.conv-row.is-hl { background: rgba(0, 0, 0, 0.075); }

/* Copied capsule, as in the app (App/OCR/Capture/SelectionOverlay.swift, LineBreakBadge):
   just the word, 13 pt regular, 10 × 4 pt padding, 24 pt tall, Liquid Glass capsule, no icon */
.capsule { z-index: 8; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 13px; font-weight: 400; color: #1a1a1a; white-space: nowrap; opacity: 0; transform: scale(0.92); transform-origin: left center; transition: opacity 0.3s ease, transform 0.35s ease; }
.s-copied .capsule { opacity: 1; transform: none; }
.capsule { corner-shape: round !important; border-radius: 12px !important; }   /* fully rounded, as in the app */
.s-paste .capsule { opacity: 0; }

/* Shortcut keys, bottom centre, no plate, once at the start of Copy */
.keys { position: absolute; z-index: 9; left: 50%; bottom: 26px; display: flex; gap: 5px; opacity: 0; transform: translate(-50%, 0); transition: opacity 0.3s ease; }
.screen.show-keys .keys { opacity: 1; }
/* Key caps as in the app's onboarding (KeyCap, 36 pt): white rounded square, bold rounded
   symbol, hairline border, 1.5 pt shadow under it. Pressed: the key sinks and goes light grey
   (the app turns it green; here neutral, per Dima). Here each key appears and goes
   down one after the other and stays held, like pressing ⌥ then C. */
/* Since 30 Nov the caps are Textra's glass, the same as the action menu (Dima): see-through, blurred,
   a light inner rim and a soft shadow. Pressed: sinks 2 pt, a touch darker, the shadow gets closer. */
.keys kbd {
  min-width: 36px; height: 36px; padding: 0; display: grid; place-items: center;
  border-radius: 9px; background: rgba(250, 250, 252, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(1.9); backdrop-filter: blur(22px) saturate(1.9);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 0.5px rgba(255, 255, 255, 0.5),
              0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 8px 18px rgba(0, 0, 0, 0.16);
  font: 700 20.7px/1 ui-rounded, "SF Pro Rounded", var(--font); color: #1d1d1f;
  opacity: 0;
}
.screen.show-keys .keys kbd { animation: key-in 0.25s ease forwards, key-down 0.08s ease-out 0.45s forwards; }
.screen.show-keys .keys kbd:nth-child(2) { animation-delay: 0.5s, 0.95s; }
@keyframes key-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes key-down {
  from { opacity: 1; }
  to { opacity: 1; transform: translateY(2px); color: #1d1d1f; background: rgba(232, 232, 237, 0.8);
       box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.7), inset 0 0 0 0.5px rgba(255, 255, 255, 0.4),
                   0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 0, 0, 0.14); }   /* neutral, no green (Dima, 28 Nov) */
}

/* Pause / play, bottom right, while the pointer is over the screen */
.autoplay { position: absolute; z-index: 9; right: 16px; bottom: 16px; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #1d1d1f; background: rgba(250, 250, 252, 0.75); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); opacity: 0; transition: opacity 0.2s ease; }
.screen-fit:hover .autoplay, .autoplay:focus-visible { opacity: 1; }
.autoplay .sf { width: 20px; height: 20px; grid-area: 1 / 1; }   /* 20 (Dima, 28 Nov) */
.autoplay .i-resume { display: none; }
.autoplay.is-paused .i-resume { display: block; }
.autoplay.is-paused .i-pause { display: none; }

/* Apple-style continuous corners: superellipse instead of a quarter circle (Chrome 139+;
   other browsers keep the plain radius). Radii 1.5× so corners read the same size. */
@supports (corner-shape: superellipse(1.5)) {
  .window, .shape, .submenu, .glass, .selection, .keys kbd, .slide-image, .paper,
  .shop-photo, .shop-button, .shop-sizes span, .token, .conv-row, .menu li, .submenu li,
  .sb-btn, .sb-pair { corner-shape: superellipse(1.5); }   /* the address field and the pause button stay truly round */
  /* Apple-style radii, as in Figma with corner smoothing: desktop and app windows 16 (Dima, 28 Nov).
     A CSS superellipse reads smaller than the same radius in Figma, hence × 1.5. */
  .screen { corner-shape: superellipse(1.5); border-radius: 24px; }
  .window { border-radius: 24px; }
  .shape, .submenu { border-radius: 21px; }
  .menu li, .submenu li, .conv-row { border-radius: 12px; }
  .selection { border-radius: 9px; }
  .slide-image { border-radius: 12px; }   /* 8, Apple style */
  .keys kbd { border-radius: 16px; }
  .content { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; corner-shape: inherit; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Dark theme (Dima, 28 Nov): the whole Mac follows the visitor's system setting,
   the way macOS does. Everything dark lives here, so the light rules above stay as they were.
   Colours are macOS dark mode: windows #1e1e1e, text #f5f5f7, secondary #98989d,
   hairlines white at 10–12%.
   On purpose NOT changed: the slide image and the PDF page (a scan stays paper-white, as in
   Preview), the product photo, the avatar, the window buttons, the black pointer (macOS keeps
   it black in dark mode), the selection frame (grey glass works on both wallpapers).
   To check: System Settings → Appearance → Dark, the page switches by itself.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  .screen { color: #f5f5f7; }
  .wallpaper { background-color: #50646b; }   /* the image follows --img-wall */

  /* Windows */
  .window { background: #1e1e1e; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.7), 0 22px 60px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.3); }
  .toolbar { background: #1e1e1e; border-bottom-color: rgba(255, 255, 255, 0.1); color: #d1d1d6; }
  .tb-title { color: #f5f5f7; }
  .tb-title small { color: #98989d; }
  .lights i { box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.3); }

  /* Preview: dark grey canvas and title bar in one colour; the slide and the PDF page stay as they are */
  .preview-canvas, .window.preview .toolbar { background: #262626; }
  .slide-image, .paper { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }

  /* Notes */
  .notes-body { background: #1e1e1e; }

  /* Mail */
  .mail-compose, .mail-view { background: #1e1e1e; }
  .field, .mail-head { border-bottom-color: rgba(255, 255, 255, 0.12); }
  .field > span:first-child, .mail-head small, .mail-head time { color: #98989d; }
  .mail-head > div span { color: #f5f5f7; }
  .token { background: rgba(10, 132, 255, 0.25); color: #6cb4ff; }

  /* Selected text: the macOS dark-mode selection colour */
  .scene[data-kind="text"].s-select .target { background: #3f638b; }

  /* Xcode: the "Default (Dark)" theme */
  .xcode { background: #1f1f24; }
  .xc-tabs { background: #2a2a2e; border-bottom-color: rgba(255, 255, 255, 0.08); }
  .xc-tabs span { color: #98989d; border-right-color: rgba(255, 255, 255, 0.08); }
  .xc-tabs span.on { background: #1f1f24; color: #f5f5f7; }
  .xc-status { background: rgba(255, 255, 255, 0.08); color: #d1d1d6; }
  .xc-status small { color: #98989d; }
  .xcode pre { color: #ffffff; }
  .xcode .ln { color: #6c6c70; }
  .xcode .k { color: #fc5fa3; }
  .xcode .s { color: #fc6a5d; }
  .xcode .ty { color: #d0a8ff; }
  .xcode .fn { color: #67b7a4; }
  .xcode .fn2 { color: #a167e6; }
  .xcode .c { color: #7f8c98; }

  /* Safari: dark glass address field; both sites get a dark version too,
     so the bar still takes the colour of the site's header */
  .safari-bar { color: #d1d1d6; }
  .sb-address {
    color: #f5f5f7;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 1px 4px rgba(0, 0, 0, 0.25);
  }
  .sb-address .reload { color: #98989d; }
  .web { background: #1c1c1e; }
  .web-nav { border-bottom-color: rgba(255, 255, 255, 0.08); color: #aeaeb2; }
  .web-nav b { color: #f5f5f7; }
  .web-nav .on { color: #ff8a5c; }
  .poster { background: #0e1d24; color: #eef0ff; }
  .poster-sun { background: #118ab2; }
  .poster-leaf { background: #06d6a0; mix-blend-mode: normal; opacity: 0.85; }
  .poster .web-nav { color: #a9adcf; }
  .poster .web-nav b { color: #eef0ff; }
  .poster .web-nav .on { color: #4fbde0; }   /* the blue, lighter so it reads on the dark page */
  .poster-text { color: #c4c7e6; }
  .shop .web-nav, .window.safari:has(.shop) .safari-bar { background: #2c2c2e; }
  .shop-brand, .shop-small { color: #98989d; }
  .shop-sizes span { border-color: #48484a; }
  .shop-sizes .on { border-color: #f5f5f7; background: #f5f5f7; color: #1d1d1f; }
  .shop-button { background: #f5f5f7; color: #1d1d1f; }
    .shop-swatches { color: #98989d; }
  .shop-swatches i.on { box-shadow: 0 0 0 2px #1c1c1e, 0 0 0 3px #f5f5f7; }

  /* Textra: dark Liquid Glass, light text, the same secondary grey as macOS */
  .shape, .submenu, .glass {
    background: rgba(38, 38, 42, 0.62);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 0.5px rgba(255, 255, 255, 0.1),
                0 0 0 0.5px rgba(0, 0, 0, 0.5), 0 8px 22px rgba(0, 0, 0, 0.4);
  }
  .menu, .panel, .submenu, .capsule { color: #f5f5f7; }
  .menu .preview, .menu li .sf, .submenu li .sf, .menu li em, .menu li .more,
  .panel .head, .panel .foot, .panel .foot .lang .sf, .panel .loading, .conv-row span { color: #98989d; }
  .menu li.is-hl, .submenu li.is-hl, .conv-row.is-hl { background: rgba(255, 255, 255, 0.1); }
  .s-type .search-menu .query, .panel .foot .text-button, .panel .foot .lang { color: #f5f5f7; }
  .query .caret { background: #f5f5f7; }
  .panel .sep { background: rgba(255, 255, 255, 0.12); }
  .panel .answer ins { background: rgba(48, 209, 88, 0.25); }
  .s-replace .panel .foot .text-button { background: rgba(255, 255, 255, 0.12); }
  .spinner { filter: invert(1); }

  /* Shortcut keys: Textra's dark glass, like the action menu */
  .keys kbd { background: rgba(38, 38, 42, 0.62); color: #f5f5f7;
              box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 0.5px rgba(255, 255, 255, 0.1),
                          0 0 0 0.5px rgba(0, 0, 0, 0.5), 0 8px 22px rgba(0, 0, 0, 0.4); }
  @keyframes key-down {
    from { opacity: 1; }
    to { opacity: 1; transform: translateY(2px); color: #f5f5f7; background: rgba(28, 28, 32, 0.7);
         box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 0.5px rgba(255, 255, 255, 0.08),
                     0 0 0 0.5px rgba(0, 0, 0, 0.5), 0 3px 10px rgba(0, 0, 0, 0.35); }
  }

  /* Pause button */
  .autoplay { color: #f5f5f7; background: rgba(44, 44, 48, 0.75); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
}

/* ═══════════ Blocks below the demo (Figma "Home v2", node 170:235, Dima, 28 Nov) ═══════════
   On the 6-column grid: headings and captions 4 columns (676) centred, facts and small
   features 2 columns each. Built only from the tokens at the top of the file.
   Type scale: 48 · 40 · 24 (Rounded Semibold, line 1.15), 20 · 16 · 15 · 13 (SF Pro, line 1.4).
   Spacing on a 4/8 scale: 8 · 12 · 16 · 24 · 32 · 48, and 144 between blocks. */
.section { margin-top: 144px; }   /* between blocks (Dima, 28 Nov; was 112) */
.section-head { width: min(676px, 100%); margin: 0 auto; text-align: center; }
.section h2 { margin: 0; font: var(--t-h2); letter-spacing: -0.01em; }
.section-sub { margin: 12px 0 0; font: var(--t-lead); color: var(--secondary); }

/* ═══ Bento grid (Figma 208:3583, Dima, 29 Nov) ═══
   Cards: --surface, large radius, 12 apart; 480 tall (the last row 440). Wide 4 columns,
   narrow 2, full 6. Card text: one Lead paragraph (20 / 28), the lead phrase Semibold in
   --text, the rest quiet grey. Each picture is a fixed-size stage (data-w × data-h) laid out
   in Figma's numbers; script.js scales it down when a card is narrower (phones). */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gutter); }
.b-head { grid-column: 1 / -1; margin-bottom: 36px; }   /* 36 + the 12 gap = 48 to the cards, as in Figma 214:259 */
/* Title in columns 1–2, the paragraph in columns 3–6, both left-aligned (Dima, 2 Dec) */
.b-head.section-head { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 var(--gutter); width: auto; margin-left: 0; margin-right: 0; text-align: left; }
.b-head h2 { grid-column: 1 / span 2; }
.b-head .section-sub { grid-column: 3 / span 4; margin: 0; padding-top: 10px; }   /* the Lead's first line sits level with the title's */
@media (max-width: 760px) { .b-head.section-head { grid-template-columns: 1fr; gap: 12px; } .b-head h2, .b-head .section-sub { grid-column: 1 / -1; padding-top: 0; } }
.b-card { position: relative; height: 480px; overflow: hidden; border-radius: var(--radius-l); background: var(--surface); }
.b-card.b-short { height: 440px; }
.b-wide { grid-column: span 4; }
.b-narrow { grid-column: span 2; }
.b-full { grid-column: span 6; }
.b-text { position: absolute; z-index: 3; left: 32px; margin: 0; font: var(--t-lead); color: var(--secondary); }
.b-text b { font-weight: 600; color: var(--text); }
.b-fit { position: absolute; inset: 0; }
.b-stage { position: absolute; left: 0; top: 0; transform-origin: top left; font-size: 13px; color: #1d1d1f; }
.b-stage .selection { transform: none; opacity: 1; transition: none; }
.b-stage .menu, .b-stage .submenu, .b-stage .panel { opacity: 1; transform: none; transition: none; }

/* Works everywhere (Figma 239:3840): three app windows in a pile, 484 tall, cut by the card's edge;
   the back two inactive (grey lights), the front one with a slide; then a 180 gradient from the
   card grey, solid for its lower 41%, so the text sits on a calm ground. */
.b-win { position: absolute; height: 484px; overflow: hidden; border-radius: 16px; background: #f5f5f5;
         box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.14), 0 4px 14px rgba(0, 0, 0, 0.08), 0 22px 60px rgba(0, 0, 0, 0.18); }
.b-win .lights { position: absolute; left: 16px; top: 14px; }
.lights-off i, .lights-off i:nth-child(2), .lights-off i:nth-child(3) { background: #c0c0c0; }
.b-win-title { position: absolute; left: 84px; top: 11.5px; display: flex; align-items: center; gap: 6px; font-weight: 600; color: #1d1d1f; }
.b-win-shot { position: absolute; left: 15.5px; top: 39.5px; width: 580px; height: 326.25px; border-radius: 8px; object-fit: cover; }
/* Animation, once on view (Dima, 30 Nov). Classes set by script.js; no class = the end (also with
   reduced motion). we-0 the three windows stacked at Meet's place, Preview on top, so the card is never
   empty · we-1 it fans out: Preview slides down 80 to its place and YouTube, at the same time and speed
   curve, 40 (half the way); Meet stays · we-3 the crosshair at the title's bottom-left corner · we-4 the
   frame is drawn to the top-right corner · we-5 one flash as it lets go, Copied pops up · end: the
   crosshair is gone, the frame and Copied stay. */
.b-win { transition: transform 0.6s var(--ease); }
.b-paper.we-0 .we-front { transform: translateY(-80px); }
.b-paper.we-0 .we-yt { transform: translateY(-40px); }
.b-stage .selection.we-sel { transform-origin: bottom left; transform: none; opacity: 1; transition: transform 0.6s var(--ease), opacity 0.15s ease; }
.b-paper:is(.we-0, .we-1, .we-3) .b-stage .selection.we-sel { transform: scale(0.02); opacity: 0; transition: none; }
.b-paper.we-5 .b-stage .selection.we-sel { animation: we-flash 0.4s ease-out 1; }   /* exactly one short flash, nothing changes after it */
@keyframes we-flash { 35% { background-color: rgba(220, 220, 220, 0.45); } }
.we-cross { position: absolute; z-index: 9; width: 24px; height: 24px; pointer-events: none; opacity: 0; transform: translate(290px, -134px); transition: transform 0.6s var(--ease), opacity 0.2s ease; }
.b-paper:is(.we-3, .we-4) .we-cross { opacity: 1; }
.b-paper:is(.we-0, .we-1, .we-3) .we-cross { transform: translate(5.8px, -2.68px); }   /* on the corner of the not-yet-grown frame (scale 0.02 of 290 × 134), so the cross stays on the corner as it grows (Dima, 2 Dec) */
.b-paper:is(.we-0, .we-1) .we-cross { transition: none; }
.b-stage .capsule.we-copied { position: absolute; opacity: 1; transform: none; }
.b-paper:is(.we-0, .we-1, .we-3, .we-4) .b-stage .capsule.we-copied { opacity: 0; transform: scale(0.92); }
.b-win-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 188px; background: linear-gradient(to top, var(--surface), var(--surface) 82px, transparent); }   /* solid from the bottom up to 82, 8 higher than Figma's 41% of 180 (Dima, 30 Nov); the fade above keeps its length */

/* Private: a zoomed-in Mac screen with the mockup's wallpaper (both themes), a glass badge
   centred on the visible screen (Dima, 30 Nov): across the card (x 150 in the 300-wide laptop
   box = the card's middle) and between the screen's top edge (132) and the card's bottom (456). */
.b-laptop { position: absolute; left: 16px; top: 24px; width: 300px; height: 456px; }
.b-bezel { position: absolute; left: -82px; top: 117px; width: 464px; height: 360px; border-radius: 30px; background: #1d1d1f; }
.b-bezel-edge { top: 115px; background: #626262; }
.b-screen { position: absolute; left: -72px; top: 132px; width: 444px; height: 340px; overflow: hidden; border-radius: 18px 18px 0 0; }
.b-screen { background: var(--img-private) center / cover; }   /* Dima's flow wallpaper, 888 × 680 = 2× the screen (1 Dec; was the mockup's wallpaper) */
.b-notch { position: absolute; left: 50%; top: 141px; width: 96px; height: 24px; border-radius: 100px; background: #1d1d1f; transform: translateX(-50%); }
.b-badge { left: 150px; top: 294px; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 13px; padding: 26px 34px 23px; border-radius: 16px; }
.b-badge b { font-size: 19.5px; font-weight: 600; color: #1d1d1f; white-space: nowrap; }
/* The art: one SVG from Figma 233:3835 (Dima, 30 Nov), 30 × 21 units at 3.5 px each, filled shapes.
   The lock is drawn big and shut (frame 02); in the end it's scaled to 0.455 around its middle
   (30.03, 30) and moved 0.45 up, which is exactly the small lock of frame 03. */
.b-art { width: 105px; height: 73.5px; overflow: visible; fill: currentColor; color: #1d1d1f; opacity: 0.85; }
.b-art * { transform-box: view-box; }
.b-lock { transform-origin: 30.03px 30px; transform: translate(0, -0.45px) scale(0.455); transition: transform 0.6s var(--ease); }
.b-lock-shackle, .b-lock-body { transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1); }   /* shuts with a small spring */
.b-art-laptop, .b-cap { transition: opacity 0.4s ease; }
/* Animation states, set by script.js; no class = the end (also with reduced motion).
   pv-0 open, big, in the middle of the badge · pv-1 shut · pv-2 shrinks and rises into place · pv-3 laptop and caption fade in */
.b-badge.pv-0 .b-lock, .b-badge.pv-1 .b-lock { transform: translate(0, var(--lock-dy, 0px)); }   /* in the middle of the whole badge (script.js measures --lock-dy) */
.b-badge.pv-0 .b-lock-shackle { transform: translateY(-1.79px); }
.b-badge.pv-0 .b-lock-body { transform: translateY(1.79px); }
/* The badge keeps its end size all the way through (Dima, 30 Nov: with the short "On-device" there's
   nothing to widen); the hidden caption still holds its place, so nothing moves. */
.b-badge { box-sizing: border-box; justify-content: center; }
.b-badge.pv-0 .b-art-laptop, .b-badge.pv-1 .b-art-laptop, .b-badge.pv-2 .b-art-laptop,
.b-badge.pv-0 .b-cap, .b-badge.pv-1 .b-cap, .b-badge.pv-2 .b-cap { opacity: 0; }

/* The right next step: tabs on the left, five slides on a piece of desktop.
   Tabs (Dima, 30 Nov): plain rows, no lines between them. Row: a symbol, 8 (as in the demo's tabs),
   the name in Body, 6 above and below. Quiet grey; the active one in --text with a 3 × 20 rounded bar
   on its right, now a 12 × 12 pie that fills like a clock over the time passed (--p, 0…1, from script.js), then the
   next tab takes over. Nothing moves. */
.b-tabs { position: absolute; z-index: 3; left: 32px; bottom: 32px; width: calc(100% - 700px - 12px - 64px);   /* 32 from the card's left edge, 32 to the desktop on the right (Dima, 30 Nov): 244 on desktop */
           display: flex; flex-direction: column; gap: 4px; }
.b-tabs button { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 0; border: 0; background: transparent; color: var(--secondary);
                 font: var(--t-body); text-align: left; cursor: pointer; transition: color var(--fade) ease; }   /* Body (Dima, 30 Nov; was Lead) */
@media (hover: hover) { .b-tabs button:hover { color: var(--text); } }
/* Keyboard focus is a ring, not the active colour, so a focused tab never looks selected */
.b-tabs button:focus { outline: none; }
.b-tabs button:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; border-radius: 4px; }
.b-tabs button.is-on { color: var(--text); }
.b-ic { display: grid; place-items: center; width: 22px; height: 19px; flex: none; }   /* sized to the 17 pt text */
.b-ic .sf { width: 22px; height: 19px; -webkit-mask-size: contain; mask-size: contain; }
/* The progress is a 12 × 12 pie on the right of the active tab (Dima, 30 Nov, picked from several variants;
   was a ring): a grey disc that fills with --secondary like a clock as the time passes (--p, 0…1, from script.js) */
.b-progress { position: absolute; right: 0; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; opacity: 0; transition: opacity var(--fade) ease;
              background: conic-gradient(var(--secondary) calc(var(--p, 0) * 360deg), var(--ring-track, #e0e0e0) 0); }
.b-tabs button.is-on .b-progress { opacity: 1; }
.b-progress i { display: none; }
.b-desk-fit { position: absolute; right: 12px; top: 12px; width: 700px; height: 456px; }
.b-desk { width: 700px; height: 456px; overflow: hidden; border-radius: 16px; background: var(--img-next) center / cover; }   /* Dima's flow wallpaper, 1400 × 912 = 2× (1 Dec; was the lake) */
/* Slides crossfade by fading their pieces, not the slide itself (Dima, 30 Nov): a fading parent
   cuts the glass of the menus off from the desktop behind (the blur only appears once the fade
   ends). The hidden slides stay rendered at opacity 0, so their glass is ready at once. */
.ns-slide { position: absolute; inset: 0; pointer-events: none; }
.b-desk .ns-slide > * { opacity: 0; transition: opacity var(--fade) ease; }
.b-desk .ns-slide.is-on > * { opacity: 1; }
.ns-pop { z-index: 7; }
.submenu li em { font-style: normal; color: #6e6e73; }   /* the count right after the name, like the details in the main menu (Dima, 30 Nov) */
.submenu li.ns-sep { height: 1px; margin: 6px 6px; padding: 0; border-radius: 0; background: rgba(0, 0, 0, 0.1); }
/* Slide content: a table, a message, a shop, a notice, a long message */
.ns-sheet { padding: 20px; background: #fff; }
.ns-sheet-title { margin: 0 0 16px; font-size: 17px; font-weight: 600; }
.ns-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ns-table th, .ns-table td { height: 32px; padding: 0 10px; text-align: left; border-bottom: 0.5px solid #e0e0e0; border-right: 0.5px solid #e0e0e0; }
.ns-table th { background: #f5f5f7; font-weight: 600; }
.ns-table th:last-child, .ns-table td:last-child { border-right: 0; }
.ns-empty { display: block; height: 32px; border-bottom: 0.5px solid #e0e0e0; }
.ns-mail { padding: 18px 22px; background: #fff; font-size: 13px; line-height: 1.5; }
.ns-mail p { margin: 0 0 10px; }
.ns-mail-from { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; margin-bottom: 14px !important; border-bottom: 0.5px solid rgba(0, 0, 0, 0.12); }
.ns-mail-from > span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.ns-mail-from small { font-size: 11.5px; color: #86868b; }
.ns-long p { margin-bottom: 9px; }
.ns-address { width: 200px; }
.ns-recipe { padding: 72px 28px 0 !important; background: #fbf8f4; color: #2b2520; }
.window.safari:has(.ns-recipe) .safari-bar { background: #fbf8f4; }
.ns-recipe p { margin: 0; }
.ns-recipe-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #a2482d; }
.ns-recipe-title { margin-top: 6px !important; font-family: "Iowan Old Style", Georgia, serif; font-size: 26px; line-height: 1.15; }
.ns-recipe-meta { margin-top: 6px !important; font-size: 12px; color: #8a7f75; }
.ns-recipe-label { margin-top: 22px !important; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8a7f75; }
.ns-recipe ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.4; }
.ns-recipe li { padding: 7px 0; border-bottom: 0.5px solid rgba(43, 37, 32, 0.12); }
/* Messages, as in macOS (Dima's reference, 30 Nov): incoming light grey, outgoing a blue
   gradient; 3 between bubbles of one sender, 10 between senders; the last bubble of a group has a
   tail. The tail is two corners: ::before is a bubble-coloured curve, ::after a window-coloured
   one cut out of it (so --chat-bg must match the window behind). */
.ns-chat { --chat-bg: #fff; }
.ns-chat .content { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: var(--chat-bg); font-size: 14px; line-height: 19px; }
.ns-chat p { margin: 0; }
.ns-time { align-self: center; margin-bottom: 7px !important; font-size: 11px; font-weight: 500; color: #86868b; }
.ns-bubble { position: relative; max-width: 78%; padding: 7px 12px; border-radius: 18px; }
.ns-gs { margin-top: 7px !important; }
.ns-in { align-self: flex-start; background: #e9e9eb; color: #1d1d1f; }
.ns-out { align-self: flex-end; background: linear-gradient(#64b2f9, #4a97f6 calc(100% - 18px)); color: #fff; }   /* the gradient ends where the tail starts, so they meet without a seam */
.ns-tail::before, .ns-tail::after { content: ""; position: absolute; bottom: 0; height: 18px; }
.ns-out.ns-tail::before { right: -7px; width: 20px; background: #4a97f6; border-bottom-left-radius: 16px 14px; }
.ns-out.ns-tail::after { right: -26px; width: 26px; background: var(--chat-bg); border-bottom-left-radius: 10px; }
.ns-in.ns-tail::before { left: -7px; width: 20px; background: #e9e9eb; border-bottom-right-radius: 16px 14px; }
.ns-in.ns-tail::after { left: -26px; width: 26px; background: var(--chat-bg); border-bottom-right-radius: 10px; }

/* Instant (Figma 208:3703): a glow and a gauge (the whole gauge 12 lower, Dima, 30 Nov).
   Glow: Figma's radial gradient on a 332 × 324 box from y 116 to the bottom: centre at the
   bottom middle, 765 wide and 324 tall, #d2eaff fading to transparent over the card's grey.
   Gauge: 233.2 (1.1 × the 212 drawing), centre (166, 258); line 11.66 (10.6 in the drawing),
   the track black at 20%, the value #0088ff. Number Rounded Bold 68, unit 17.6, ends 14.3; number and unit 8 higher than Figma (Dima, 30 Nov). */
/* Instant picture (Dima, 1 Dec; Figma 262:4293): his flow wallpaper over the whole card, with a gradient of the
   card colour on top so the text reads: solid at the top, 85% at 29%, gone at the bottom. Was a blue glow. */
.b-glow { position: absolute; inset: 0;
          background: linear-gradient(var(--surface), color-mix(in srgb, var(--surface) 85%, transparent) 28.947%, color-mix(in srgb, var(--surface) 0%, transparent)),
                      var(--img-instant) center / cover; }
.b-gauge { position: absolute; left: 49.4px; top: 153.4px; width: 233.2px; height: 233.2px; overflow: visible; }
.b-tick { stroke: rgba(0, 0, 0, 0.12); stroke-width: 2.8px; stroke-linecap: round; transition: stroke 0.12s ease; }   /* ticks 12 long, about 3 wide on screen */
.b-tick.is-on { stroke: var(--text); }   /* lit ticks in the text colour, like the number: blue clashed with the warm wallpaper (Dima, 1 Dec; was #0088ff) */
.b-stage p.b-gauge-num, .b-stage p.b-gauge-unit, .b-stage p.b-gauge-min, .b-stage p.b-gauge-max { position: absolute; margin: 0; line-height: normal; white-space: nowrap; }
.b-stage p.b-gauge-num { line-height: 1; }
.b-gauge-num { left: 0; width: 332px; top: 226.5px; text-align: center; font: 700 61px/1 var(--rounded); letter-spacing: -1.36px; color: var(--text); }   /* the font's own digits, no tabular figures (Dima, 30 Nov) */
.b-gauge-unit { left: 0; width: 332px; top: 292px; text-align: center; font-size: 17.6px; color: rgba(0, 0, 0, 0.5); }   /* 61, 10% smaller, same middle; the unit 8 closer (Dima, 30 Nov) */
/* 0s and 1s right under the arc's two ends (Dima, 30 Nov): the ends sit at x 99.1 and 232.9,
   y 324.9 (the drawing's 45.2 / 166.8 × 1.1 + the gauge's corner); the round cap reaches 330.7,
   the labels start 4 below it, centred on each end. */
.b-gauge-min, .b-gauge-max { top: 353px; font-size: 14.3px; color: rgba(0, 0, 0, 0.5); transform: translateX(-50%); }   /* see-through, so they sit well on the glow (Dima, 30 Nov) */
.b-gauge-min { left: 99.1px; }
.b-gauge-max { left: 232.9px; }

/* Ask AI (Figma 208:3715): a white message body the size of the card (Mail at 1.3×, its header
   out of view), the text where it was; a 240 gradient from the card's grey rises under the
   card text; a 1 px --surface edge around the card. */
/* "Paper" cards (Ask AI, and Works everywhere since Dima's 30 Nov note): the page's colour, a 1 px
   --surface edge, and (b-paper-fade) a 240 gradient from the card grey rising under the card text. */
.b-card.b-paper { background: var(--bg); }
.b-paper::after { content: ""; position: absolute; inset: 0; z-index: 2; border: 1px solid var(--surface); border-radius: inherit; pointer-events: none; }
.b-paper-fade::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 240px; background: linear-gradient(to top, var(--surface), transparent); pointer-events: none; }
.b-mail { position: absolute; left: 0; top: -1px; width: 676px; height: 440px; overflow: hidden; background: var(--bg);   /* the page's colour in both themes (Dima, 30 Nov) */ color: #1d1d1f;
          box-shadow: inset 0 0 0 0.65px rgba(0, 0, 0, 0.14); }
.b-mail p { position: absolute; left: 103px; margin: 0; white-space: nowrap; }
.b-mail-text { font-size: 18.2px; line-height: 26px; }
/* A real selection (Dima, 30 Nov): one block per line, exactly as wide as that line's text, the lines
   touching. The highlight fills each line's height: 26 line − 1.125em of text, split above and below. */
.b-mail-sel span { --sel: #b4d7ff; padding: calc((26px - 1.125em) / 2) 0;
                   background: linear-gradient(var(--sel), var(--sel)) left center / 100% 100% no-repeat; }   /* a span per line */
.b-mail-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 240px; background: linear-gradient(to top, var(--surface), transparent); }
/* Textra's AI panel: the demo's own .panel, drawn at 1.25× like the Mail window around it (400 → 500) */
.b-stage .panel.b-ai { left: 87px; top: 140px; transform: scale(1.25); transform-origin: top left; border-radius: 16px; transition: opacity 0.25s ease, translate 0.4s var(--ease); }   /* radius 20 on screen at 1.25×: a big menu (Dima, 30 Nov) */
/* Plays once on view and stays on the panel (Dima, 30 Nov): the plain letter (ai-0) → the two lines
   get selected (ai-1, filling left to right) → the panel appears with its title and grows as the
   fixes and then the buttons come in. No class = the end (also with
   reduced motion). */
/* The selection fills from left to right, the first line then the second, like a drag */
.b-mail-sel span { transition: background-size 0.35s linear; }
.b-mail-sel span + br + span { transition-delay: 0.35s; }
.b-askai.ai-0 .b-mail-sel span { background-size: 0% 100%; transition: none; }
.b-askai:is(.ai-0, .ai-1) .b-stage .panel.b-ai { opacity: 0; translate: 0 8px; }
/* The panel grows as its content comes in (Dima, 30 Nov): the title first (it stays put), then the
   fixes' row opens and fades in, then the buttons' row. Rows open by grid rows 0fr → 1fr. The panel
   is never under 48 (2 × its 24 corner), so the corners keep their shape at every height. */
.b-stage .panel.b-ai { min-height: 48px; }
.b-ai-row { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.35s var(--ease); }
.b-ai-row > div { min-height: 0; overflow: hidden; }
.panel.b-ai > * { transition: opacity 0.25s ease, grid-template-rows 0.35s var(--ease); }
.panel.b-ai > .head { transition-delay: 0.05s; }
.panel.b-ai > .b-ai-body { transition-delay: 0.15s; }
.panel.b-ai > .b-ai-foot { transition-delay: 0.35s; }
.b-askai:is(.ai-0, .ai-1) .panel.b-ai > * { opacity: 0; transition: none; }
.b-askai:is(.ai-0, .ai-1) .b-ai-row { grid-template-rows: 0fr; }
@supports (corner-shape: superellipse(1.5)) { .b-stage .panel.b-ai { border-radius: 24px; } }   /* × 1.5 for the superellipse, like the other radii */

@supports (corner-shape: superellipse(1.5)) {
  .b-card, .b-paper::after { corner-shape: superellipse(1.5); border-radius: calc(var(--radius-l) * 1.5); }   /* the Ask AI edge follows the card's shape, or its corners look rounder (Dima, 30 Nov) */
  .b-win, .b-desk { corner-shape: superellipse(1.5); border-radius: 24px; }
}

@media (prefers-color-scheme: dark) {
  .b-stage { color: #f5f5f7; }
  .b-win { background: #2a2a2c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.8), 0 22px 60px rgba(0, 0, 0, 0.45); }   /* a light rim inside, as macOS dark windows have; an outer one was lost against the lighter window (Dima, 30 Nov) */
  .b-win-title { color: #f5f5f7; }
  .lights-off i, .lights-off i:nth-child(2), .lights-off i:nth-child(3) { background: #5a5a5c; }
  .b-progress { --ring-track: rgba(255, 255, 255, 0.14); }
  .b-art, .b-badge b { color: #f5f5f7; }
  .ns-sheet, .ns-mail { background: #1e1e1e; }
  .ns-chat { --chat-bg: #1e1e1e; }
  .ns-in { background: #3b3b3d; color: #f5f5f7; }
  .ns-in.ns-tail::before { background: #3b3b3d; }
  .ns-time { color: #98989d; }
  .ns-table th { background: #2a2a2c; }
  .ns-table th, .ns-table td, .ns-empty { border-color: rgba(255, 255, 255, 0.12); }
  .ns-mail-from { border-bottom-color: rgba(255, 255, 255, 0.12); }
  .ns-mail-from small { color: #98989d; }
  .ns-recipe, .window.safari:has(.ns-recipe) .safari-bar { background: #1e1c1a; color: #f2ede6; }
  .ns-recipe-meta, .ns-recipe-label { color: #a59a8f; }
  .ns-recipe li { border-bottom-color: rgba(255, 255, 255, 0.12); }
  .submenu li em { color: #98989d; }
  .submenu li.ns-sep { background: rgba(255, 255, 255, 0.12); }
  /* .b-glow and .b-instant take the dark image from --img-instant */
  .b-tick { stroke: rgba(255, 255, 255, 0.2); }
  .b-gauge-unit, .b-gauge-min, .b-gauge-max { color: rgba(255, 255, 255, 0.6); }
  .b-mail { color: #f5f5f7; box-shadow: inset 0 0 0 0.65px rgba(255, 255, 255, 0.1); }
  .b-mail-sel span { --sel: #3f638b; }
}

/* Phones and tablets: one column; text above the picture; pictures scale to the card (script.js).
   1000, not 760 (2 Dec): between them the 4 + 2 cards were too narrow for their fixed-size pictures. */
@media (max-width: 1000px) {
  .bento { grid-template-columns: 1fr; }
  .b-wide, .b-narrow, .b-full { grid-column: auto; }
  /* Private by design and Instant side by side, half a row each (Dima, 2 Dec). In the page they're apart
     (the slider sits between them), so the two cards after them move down with `order`:
     Any text, then Private + Instant in one row, then the slider, then AI. */
  .bento { grid-template-columns: 1fr 1fr; }
  .b-head, .b-wide, .b-full { grid-column: 1 / -1; }
  .b-next, .b-askai { order: 1; }
  /* AI at no extra cost: the picture first, the text under it (Dima, 2 Dec), as on the Mac */
  .b-askai .b-text { order: 1; padding: 0 24px 24px; }
  .b-askai .b-mail-fade { display: none; }   /* the grey that rose under the text on the Mac: here it would end in a hard line above the text */
  .b-narrow .b-fit { margin-top: auto; }   /* the two cards are as tall as the taller one: pictures sit at the bottom */
  .b-card, .b-card.b-short { height: auto; display: flex; flex-direction: column; }
  .b-text { position: static; order: -1; width: auto !important; padding: 24px 24px 0; font-size: 18px; line-height: 26px; }
  .b-head { margin-bottom: 20px; }
  .b-head h2 { font-size: 32px; }
  .b-fit, .b-desk-fit { position: relative; inset: auto; right: auto; top: auto; width: 100%; overflow: hidden; }
  .b-desk-fit { margin: 16px 0 0; border-radius: 0; }   /* square on top, runs to the card's bottom edge, whose own corners round it (Dima, 2 Dec; was 16 radius, 12 below) */
  .b-desk { border-radius: 0; }   /* the scaled picture inside had its own 16 (24 Apple-style) corners: square too (Dima, 2 Dec) */
  /* The same tabs as over the demo (Dima, 2 Dec): capsules in one row that scrolls sideways, the active one
     on the page colour with the slide's time filling it from the left; no pie, no scroll bar, faded edges */
  .b-tabs { position: static; width: auto; flex-direction: row; gap: 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
            padding: 16px 18px 0;
            -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent);
            mask-image: linear-gradient(to right, transparent, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent); }
  .b-tabs::-webkit-scrollbar { display: none; }
  .b-tabs button { flex: none; width: auto; height: 36px; gap: 6px; padding: 0 14px; border-radius: var(--pill); font: var(--t-body); white-space: nowrap;
                   transition: color var(--fade) ease, background-color var(--fade) ease; }
  /* The slide's time filling the active tab: darker than the page's --fill, which was the same grey as the card (Dima, 2 Dec) */
  .b-tabs { --b-fill: rgba(0, 0, 0, 0.14); }
  @media (prefers-color-scheme: dark) { .b-tabs { --b-fill: rgba(255, 255, 255, 0.18); } }
  .b-tabs button.is-on { background: linear-gradient(90deg, var(--b-fill) calc(var(--p, 0) * 100%), transparent calc(var(--p, 0) * 100%)) var(--bg); }
  .b-tabs .b-progress { display: none; }
  .b-ic, .b-ic .sf { width: 20px; height: 17px; }
}
/* Phones: the two half cards are 170 wide, so their text is smaller, otherwise it's one word per line */
@media (max-width: 560px) { .b-narrow .b-text { padding: 16px 16px 0; font-size: 15px; line-height: 20px; } }
/* One column: the Instant wallpaper covers the whole card, not just the scaled picture in its middle */
@media (max-width: 1000px) {
  .b-instant { background: linear-gradient(var(--surface), color-mix(in srgb, var(--surface) 85%, transparent) 28.947%, color-mix(in srgb, var(--surface) 0%, transparent)),
                           var(--img-instant) center / cover; }
  .b-instant .b-glow { display: none; }
}

/* Three facts: icon in the quiet grey, short title, caption; left-aligned, two columns each */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.fact { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; line-height: 1.4; }
/* Icons: symbols exported tight to their own shape at a large size (sf-hd-*), shown at one
   common scale with their real proportions, so nothing is cut off and they stay sharp.
   The fixed-height slot keeps the titles on one line whatever the icon's height. */
.ic { display: flex; align-items: center; color: var(--secondary); }
.ic .sf { -webkit-mask-size: contain; mask-size: contain; }
.fact .ic { height: 50px; margin-bottom: 4px; }   /* icons 1.5× (Dima, 28 Nov) */
.fact b { font: var(--t-h3); letter-spacing: -0.005em; }
.fact span { font: var(--t-body); color: var(--secondary); }

/* Feature picture: a piece of desktop (the same wallpaper as the demo) with an app window
   and Textra's menu, built from the demo's own window, glass and menu styles. 1020 × 600.
   What's inside is an illustration of other apps, so it has its own colours and sizes. */
.fv { position: relative; height: 600px; overflow: hidden; border-radius: var(--radius-l); font-size: 13px; color: #1d1d1f; }
.fv-case { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity var(--fade) ease, visibility 0s linear var(--fade); }
.fv-case.is-on { opacity: 1; visibility: visible; transition: opacity var(--fade) ease, visibility 0s; }
.fv .menu, .fv .submenu { opacity: 1; transform: none; transition: none; }
.fv .selection { transform: none; opacity: 1; transition: none; }
.fv-window { left: 48px; top: 60px; width: 640px; height: 480px; }
.tb-icon { width: 20px; height: 20px; margin: 0 -4px 0 -2px; }

/* Meeting: a shared slide in a call */
.fv-share { display: flex; flex-direction: column; padding: 16px; background: #2a2a2c; }
.fv-slide { flex: 1; padding: 44px 40px; border-radius: 8px; background: #ffffff; color: #262626; }
.fv-slide p { margin: 0; }
.fv-slide-title { font-family: ui-rounded, "SF Pro Rounded", var(--font); font-size: 28px; font-weight: 600; color: #333; }
.fv-slide-text { margin-top: 16px !important; font-size: 16px; line-height: 1.5; color: #666; }
.fv-slide-phone { margin-top: 18px !important; font-size: 20px; font-weight: 500; }
.fv-nametag { position: absolute; left: 28px; bottom: 26px; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 11px; }

/* Website: a café's page */
.fv-cafe { padding: 96px 44px 0; background: #f6f1ea; color: #2b2520; }
.window.safari:has(.fv-cafe) .safari-bar { background: #f6f1ea; }
.fv-cafe p { margin: 0; }
.fv-cafe-name { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #2f6b4f; }
.fv-cafe-title { max-width: 440px; margin-top: 10px !important; font-family: "Iowan Old Style", Georgia, serif; font-size: 30px; line-height: 1.15; }
.fv-cafe-label { margin-top: 34px !important; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8a7f75; }
.fv-cafe-address { margin-top: 6px !important; font-size: 18px; font-weight: 500; }
.fv-cafe-hours { margin-top: 6px !important; font-size: 13px; color: #8a7f75; }

/* PDF: a scanned welcome letter */
.fv-pdf { padding: 28px 40px; }
.fv-paper { height: 100%; padding: 44px 48px; background: #fbfbfa; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2); font-family: "Iowan Old Style", Georgia, serif; font-size: 14px; line-height: 1.6; color: #2a2a2a; filter: saturate(0); }
.fv-paper p { margin: 0 0 12px; }
.fv-paper-title { margin-bottom: 18px !important; font-size: 22px; font-weight: 700; }

/* Video: the last frame of a talk */
.fv-video { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: radial-gradient(circle at 50% 40%, #2b2f3a, #0e0f12); color: #fff; }
.fv-video p { margin: 0; }
.fv-video-title { font-family: ui-rounded, "SF Pro Rounded", var(--font); font-size: 52px; font-weight: 600; letter-spacing: -0.02em; }
.fv-video-text { font-size: 16px; color: #c8cad0; }
.fv-scrub { position: absolute; left: 24px; right: 24px; bottom: 22px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.25); }
.fv-scrub i { display: block; width: 92%; height: 100%; border-radius: inherit; background: #fff; }

/* Both switchers (the demo's tabs and Meeting/Website/PDF/Video) are one component:
   a --surface capsule, 6 inside, 2 between; buttons 36 tall, 14 on the sides, 15 Medium,
   a 16 pt symbol 6 before the word (Dima, 30 Nov; was 8); the active one filled with --text. */
.uc-list, .tab-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 6px; border-radius: var(--pill); background: var(--surface); }
.uc-list button, .tab-list button, .tab-ghost span {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: var(--pill);
  font: var(--t-body); white-space: nowrap;   /* UI is now Body (Dima, 30 Nov) */
}
.uc-list button, .tab-list button { position: relative; background: transparent; color: var(--secondary); cursor: pointer; transition: background-color var(--fade) ease, color var(--fade) ease; }
.uc-list button:hover, .tab-list button:hover,
.uc-list button:focus-visible, .tab-list button:focus-visible { outline: none; background: var(--hover); }   /* no black ring after a click: focus is a soft background */
.uc-list button.is-on { background: var(--text); color: var(--on-text); }
.uc-list button .sf { -webkit-mask-size: contain; mask-size: contain; }
.uc-list { width: fit-content; margin: 24px auto 0; }

.feature-caption { margin-top: 24px; }   /* same as picture → switcher (Dima, 28 Nov) */

/* And all the small things: a heading, then four groups between hairlines (Figma 212:442), each
   with its name (H3) in the left 2 columns and its blocks two per row in the right 4.
   The blocks are the same as before (Dima, 30 Nov): icons as big as the facts, each item one Body
   paragraph (name Semibold, description Regular in the quiet grey), 48 between rows. */
.fg .section-head { width: auto; margin: 0 0 48px; text-align: left; }
@media (max-width: 760px) { .fg .section-head { margin-bottom: 24px; } }   /* phones: closer to the line under it (Dima, 2 Dec) */   /* left-aligned from the grid edge, like "More than a copy" (Dima, 2 Dec) */
.fg-groups { border-top: 1px solid var(--hairline); }
.fg-group { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 var(--gutter); padding: 48px 0; border-bottom: 1px solid var(--hairline); }
.fg-group:last-child { border-bottom: 0; }   /* no line after the last group (Dima, 30 Nov) */
.fg-label { grid-column: 1 / span 2; align-self: start; margin: 0; padding-top: 9px; font: var(--t-h3); letter-spacing: -0.005em; }   /* H3 (Dima, 30 Nov), level with the middle of the 50 pt icons */
.small-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px var(--gutter); }
.fg-items.small-grid { grid-column: 3 / span 4; grid-template-columns: 1fr 1fr; }
.small { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.small .ic { height: 50px; }
.small p { margin: 0; padding-right: 24px; font: var(--t-body); color: var(--secondary); }
.small b { font-weight: 600; color: var(--text); }
@media (max-width: 760px) {
  .fg-label, .fg-items.small-grid { grid-column: 1 / -1; }
  .fg-label { position: static; padding: 0 0 24px; }
}
/* Phones (2 Dec): one feature per row, the icon on the left of its text, so the text gets the full width */
@media (max-width: 560px) {
  .fg-group { padding: 32px 0; }
  .fg-items.small-grid { grid-template-columns: 1fr; gap: 24px; }
  .small { flex-direction: row; align-items: flex-start; gap: 16px; }
  .small .ic { flex: none; display: flex; justify-content: center; width: 56px; height: auto; padding-top: 2px; }
  .small .ic .sf { max-width: 56px; transform: scale(0.75); transform-origin: top center; margin-bottom: -12px; }
  .small p { padding-right: 0; }
}

/* FAQ: two columns on the grid. Left (2 columns): title (H3) and a quiet line (Body).
   Right (4 columns): each question is its own --surface card with a large radius, 8 between
   cards; the question in Body Semibold with a chevron, the answer in Body, quiet grey.
   Opening and closing animate the answer's height (grid rows 0fr → 1fr), so nothing jumps:
   the paddings never change, only the answer row grows. script.js toggles .is-open. */
.faq-block { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 var(--gutter); align-items: start; }
.faq-head { grid-column: 1 / span 2; align-self: start; padding-right: 24px; }
.faq-head h2 { font: var(--t-h2); letter-spacing: -0.01em; }   /* H2 (Dima, 30 Nov; was H3) */
.faq-head p { margin: 8px 0 0; font: var(--t-body); color: var(--secondary); }
.faq { grid-column: 3 / span 4; display: flex; flex-direction: column; gap: 8px; }
.qa { padding-bottom: 12px; border-radius: var(--radius-l); background: var(--surface); }
.q { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 24px 24px 12px; border: 0; background: none; color: var(--text); font: var(--t-lead); text-align: left; cursor: pointer; }   /* Lead (Dima, 30 Nov; was Body Semibold) */
/* plus / minus, SF Symbols at the question's 16 pt (Dima, 28 Nov) */
.q::after { content: ""; flex: none; width: 21px; height: 21px;   /* the size of the Lead text */ background: var(--secondary); -webkit-mask: url("mac/sf-hd-plus.png") center / contain no-repeat; mask: url("mac/sf-hd-plus.png") center / contain no-repeat; }
.qa.is-open .q::after { -webkit-mask-image: url("mac/sf-hd-minus.png"); mask-image: url("mac/sf-hd-minus.png"); }
.q:focus-visible { outline: none; text-decoration: underline; }
.a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--move) var(--ease); }
.qa.is-open .a { grid-template-rows: 1fr; }
.a > div { min-height: 0; overflow: hidden; }
.a a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-decoration-skip-ink: auto; text-underline-offset: 2px; transition: text-decoration-color var(--fade) ease; }   /* like the links on the text pages */
.a a:hover { text-decoration-color: currentColor; }
.a p { margin: 0; padding: 0 64px 12px 24px; font: var(--t-body); color: var(--secondary); opacity: 0; transition: opacity var(--fade) ease; }
.qa.is-open .a p { opacity: 1; transition: opacity var(--fade) ease 0.1s; }
@supports (corner-shape: superellipse(1.5)) { .qa { corner-shape: superellipse(1.5); border-radius: calc(var(--radius-l) * 1.5); } }

/* Final call to action: the same style as the main headline */
/* Finale (Dima, 1 Dec; Figma 262:4312): the last screen of the home page. A wallpaper as wide as the window and
   1000 tall (2560 × 1000 files), fading up from the page colour so it grows out of the FAQ; the call to action
   (icon, headline, button, note) in its middle and the footer at its bottom. */
.page:has(+ .finale) { padding-bottom: 0; }   /* the gap above the footer is only the finale's own 48 */
.finale { position: relative; isolation: isolate;   /* its own layer stack: the wallpaper and the fade stay behind the text */
          display: flex; flex-direction: column; min-height: 1000px; margin-top: 48px;   /* 48 under the block above (Dima, 2 Dec; was 144) */
          background: var(--img-finale) center / cover; }   /* the static picture: the fallback when the live wallpaper can't run */
/* Live wallpaper (Dima, 2 Dec): the canvas from finale-wallpaper.js fills this layer and covers the picture.
   The fade from the page colour (::before) sits above both, so the finale still grows out of the FAQ. */
.finale-live { position: absolute; inset: 0; z-index: -2; }
/* The fade from the page colour, from the top down (Figma 271:4433, Dima, 2 Dec): softer than a plain two-stop fade,
   with Figma's stops (page colour at 100% → 80% → 65% → 35% → 0%), so the wallpaper comes in gradually.
   Tried and dropped the same day: Figma 271:4428, an ellipse from the bottom centre. */
.finale::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
                  background: linear-gradient(var(--bg) 0%,
                                              color-mix(in srgb, var(--bg) 80%, transparent) 25%,
                                              color-mix(in srgb, var(--bg) 65%, transparent) 50.48%,
                                              color-mix(in srgb, var(--bg) 35%, transparent) 75%,
                                              color-mix(in srgb, var(--bg) 0%, transparent) 100%); }
.final { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 32px; text-align: center; }
.final h2 { margin: 32px 0 0; font: var(--t-display); letter-spacing: -0.02em; }
.final .get { margin: 32px 0 0; }
.final .get-note { color: color-mix(in srgb, var(--text) 70%, transparent); }   /* the text colour at 70%, so it reads on the wallpaper (Dima, 1 Dec) */
.finale .footer { margin-top: 0; }   /* the footer sits on the wallpaper, at its bottom */
/* The text colour at 70%, like the note under the button (2 Dec). Was dark in both themes for the bright bottom of the
   old picture (Dima, 1 Dec); the live wallpaper's dark theme is dark at the bottom, so it follows the theme now. */
.finale .footer, .finale .footer a { color: color-mix(in srgb, var(--text) 70%, transparent); }
.finale .footer a:hover, .finale .footer a:focus-visible { color: var(--text); }
@media (max-width: 760px) { .finale { min-height: 760px; } .final { padding: 96px 24px; } .final h2 { font-size: 32px; line-height: 38px; } }   /* was 40 / 48 (Dima, 2 Dec: headlines 20% smaller on phones) */

/* Footer */
/* Footer (Dima, 1 Dec; Figma 251:4153): the full grid width like the header, 24 above and below, no line.
   Caption text in --secondary; only the links turn --text on hover. On the home page it sits at the bottom of the
   finale wallpaper; on text pages it keeps the 144 gap. */
.footer { display: flex; align-items: center; justify-content: space-between; width: min(var(--grid), 100% - 64px);   /* the full grid, like the header (Dima, 1 Dec) */
         
          margin: 144px auto 0; padding: 24px 0; font: var(--t-caption); color: var(--secondary); }
.footer nav { display: flex; gap: 20px; }
.footer a { color: var(--secondary); text-decoration: none; transition: color var(--fade) ease; }
.footer a:hover, .footer a:focus-visible { color: var(--text); }

.page { padding-bottom: 0; }

@supports (corner-shape: superellipse(1.5)) {
  .fv { corner-shape: superellipse(1.5); border-radius: calc(var(--radius-l) * 1.5); }
  .fv-slide { corner-shape: superellipse(1.5); border-radius: 12px; }
}

@media (prefers-color-scheme: dark) {
  .fv { color: #f5f5f7; }
  .fv-cafe, .window.safari:has(.fv-cafe) .safari-bar { background: #221d18; }
  .fv-cafe { color: #f1ebe4; }
  .fv-cafe-name { color: #6fbf95; }
  .fv-cafe-label, .fv-cafe-hours { color: #a99e93; }
}

/* ─── Tabs ─── */
/* The demo's tabs, 24 under the demo. The shared switcher look is above. */
.tabs { position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; margin-top: 24px; }
.tab-list { position: relative; background: transparent; }   /* no bar behind the tabs; the active one takes its colour (Dima, 30 Nov) */
/* Symbols at their true 16 pt (one mask size for all), 2 pt in from the padding; the box is
   as wide as the symbol's ink (--w) */
.tab-list .sf, .tab-ghost .sf { width: var(--w); height: 24px; margin-left: 2px; -webkit-mask-size: var(--m, 20.5px); mask-size: var(--m, 20.5px); }

/* The pill over the active tab. It flows from one tab to the next; from the last tab back
   to the first it jumps. Inside it, the progress of the example fills the active tab.
   How it stays sharp: the pill is a filled copy of the whole bar with --on-text tab names
   (.tab-ghost) laid exactly over the real ones, and nothing in it moves. Only its visible
   window moves: a clip-path cut to the active tab's shape. Clicks go through. */
.tab-pill {
  position: absolute; z-index: 2; inset: 0; border-radius: inherit; pointer-events: none; background: var(--surface);
  clip-path: var(--clip, inset(0 100% 0 0));
  transition: clip-path var(--move) var(--ease);
}
.tab-ghost { position: absolute; inset: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 6px; }
.tab-ghost span { color: var(--text); }
/* Phones (Dima, 2 Dec): the tabs stay on one line and scroll sideways instead of wrapping onto three lines.
   No scroll bar; the edges fade out where more tabs are hidden (--fade-l / --fade-r, set by prototype.js),
   and the active tab is scrolled into view. */
@media (max-width: 760px) {
  .tabs { justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
          margin-left: -20px; margin-right: -20px; padding: 0 14px;
          -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent);
          mask-image: linear-gradient(to right, transparent, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent); }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-list, .tab-ghost { flex-wrap: nowrap; justify-content: flex-start; }
  .tab-list { flex: none; }
}
/* Placed over the active tab by script.js; grows by width so its 4 pt corners stay round (Dima, 30 Nov; was 8) */
.tab-fill { position: absolute; width: calc(var(--fw, 0px) * var(--p, 0)); border-radius: 4px; background: var(--fill); }
@supports (corner-shape: superellipse(1.5)) { .tab-fill { corner-shape: superellipse(1.5); border-radius: 6px; } }   /* Apple-style, × 1.5 like the other radii */

@media (max-width: 760px) {
  .section { margin-top: 96px; }   /* 96 between blocks on phones (2 Dec; 144 on wider screens) */
  /* FAQ on phones (2 Dec): the title above the questions, both full width */
  .faq-block { grid-template-columns: 1fr; gap: 24px; }
  .faq-head, .faq { grid-column: 1 / -1; padding-right: 0; }
  .q { padding: 20px 20px 10px; }
  .a p { padding: 0 20px 12px; }
  .subtitle { font-size: 16px; line-height: 22px; }   /* was 16 on the desktop's 28 pt line: too airy for the size */
  .page { padding-left: 20px; padding-right: 20px; }
  .top { width: calc(100% - 40px); padding-top: calc(64px + var(--bar-top) + var(--bar-h)); }   /* 64 under the header on phones, not 144 (Dima, 2 Dec) */
}
.h1-still { display: none; }   /* the Mac keeps the changing verb */
/* Phone type scale (Dima, 2 Dec): every headline about 20% smaller than it was on phones, with tighter lines.
   The tokens are swapped here, so the home page, the changelog and the privacy page all follow.
     Display (the hero headline, the doc pages' title)  34 / 60 → 28 / 32   (the 60 pt line came from the desktop size)
     H2 (section titles, FAQ)                           32–40 / 48 → 26 / 32
     H3 (small-things labels, doc labels)               26 / 32 → 21 / 26
     Footer headline                                    40 / 48 → 32 / 38   (set at .final h2 below) */
@media (max-width: 760px) {
  :root {
    --t-display: 600 28px/32px var(--rounded);
    --t-h2: 600 26px/32px var(--rounded);
    --t-h3: 600 21px/26px var(--rounded);
  }
  .b-head h2 { font: var(--t-h2); }   /* the one-column bento set its own 32 (prototype.css, max-width 1000) */
  /* The hero headline on phones (Dima, 2 Dec, Figma comments): a still line, "Copy and use any text on your screen",
     as big as the footer headline (32 / 38), in place of the changing verb. The demo under it shows the verbs anyway.
     Screen readers read the still line too: the changing one and its spoken copy (#h1-sr) are switched off. */
  .page > h1 { font-size: 32px; line-height: 38px; text-wrap: balance; }
  .page > h1 :is(.verb-box, .rest, #h1-sr) { display: none; }
  .h1-still { display: inline; }
  /* Section paragraphs under the titles: Body (17 / 24), not Lead, so they sit under the smaller titles (Dima, 2 Dec) */
  .section-sub { font: var(--t-body); }
}

/* ═══ Demo entrance: the laptop opens (Dima, 2 Dec; picked from several variants) ═══
   demo-intro.js puts .demo-intro on <html>, calculates the lid's keyframes (demo-lid-open) and holds the demo.
   The lid opens on its hinge (bottom edge) while the screen's 50% dimming goes; once it's fully open, Notes opens
   (it's at the back), then Preview in front, then the demo starts. Times count from when the entrance starts. */
:root {
  --demo-lid-perspective: calc(3000px * var(--s, 1));   /* follows the demo's scale, so a phone gets the same look */
  --demo-lid-ease: cubic-bezier(0.45, 0.05, 0.2, 1);    /* slow start, then a soft stop; keep in step with LID.ease */
}
html.demo-intro, html.demo-intro body { overflow-x: clip; }   /* the tilted lid is wider than the window for a moment */
/* Until a quarter of the demo is on screen, everything waits on its first frame */
html.demo-intro-paused .screen-fit, html.demo-intro-paused .screen-fit * { animation-play-state: paused !important; }
/* While prototype.js measures the demo's windows (a moment at load), the entrance is off: measure it flat */
html.demo-measuring .screen-fit, html.demo-measuring .screen-fit * { animation: none !important; }
/* While the entrance plays, the demo stands still on its first frame: no pointer, keys, frame or label */
html.demo-intro-wait .screen :is(.cursor, .keys, .selection, .capsule, .autoplay) { visibility: hidden !important; }

html.demo-intro .screen-fit {
  transform-origin: 50% 100%;   /* the hinge */
  animation: demo-lid-open 1.6s linear 0.4s backwards;   /* linear: the lid's ease is built into the calculated frames */
}
/* The dimming: a black layer over the screen only (a brightness filter would switch off the frosted glass),
   50% when half closed, gone exactly when the lid is fully open: same time and curve as the lid */
@keyframes demo-lid-dim { from { opacity: 0.5; } to { opacity: 0; } }
html.demo-intro .screen::after {
  content: ""; position: absolute; inset: 0; z-index: 20; pointer-events: none;
  background: #000; opacity: 0;
  animation: demo-lid-dim 1.6s var(--demo-lid-ease) 0.4s backwards;
}
/* A window opening on a Mac: grows slightly from its middle and fades in. They wait for the open lid (2.0 s). */
@keyframes demo-win-open { from { opacity: 0; scale: 0.94; } }
html.demo-intro .scene[data-tab="Copy"] .window.notes   { animation: demo-win-open 0.45s var(--ease-soft, cubic-bezier(0.22, 1, 0.36, 1)) 2.1s backwards; }
html.demo-intro .scene[data-tab="Copy"] .window.preview { animation: demo-win-open 0.45s var(--ease-soft, cubic-bezier(0.22, 1, 0.36, 1)) 2.45s backwards; }
/* the demo starts at 3.1 s (demo-intro.js, START_DEMO) */

/* ═══ Reveal on load and on scroll (Dima, 2 Dec; motion from hamayunau.com) ═══
   reveal.js picks the blocks and hides them until their turn; this is how they come in.
   Change the feel here: how long, how far up, the gap between neighbours, the curve.
   Tuned 2 Dec (Dima): 0.5 → 0.8 s, 8 → 12 px, a gentle ease-out instead of plain ease, 60 ms between
   neighbours (was 50). A blur that cleared was tried and dropped. */
:root {
  --reveal-duration: 0.8s;
  --reveal-distance: 12px;
  --reveal-step: 60ms;
  --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);   /* starts quick, settles slowly */
}
/* `translate` (not `transform`) so it adds to a block's own transform instead of replacing it
   (the header is centred with transform: translateX(-50%), the headline parts slide with transform) */
@keyframes rv-reveal { from { opacity: 0; translate: 0 var(--reveal-distance); } }
html.rv .rv-in { animation: rv-reveal var(--reveal-duration) var(--reveal-ease) var(--rv-delay, 0s) backwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ═══ iPhone Safari: no blur on the two glass plates in the bento (Dima, 3 Dec) ═══
   On a real iPhone, Safari drew their blur shifted: a light stripe on the On-device badge, and "Thanks, Dana"
   showing through the Proofread panel. Two layout fixes didn't help (the iOS Simulator doesn't show the bug),
   so on phones these plates simply don't blur (Dima agreed).
   · The Proofread panel gets a solid fill: the glass colour already mixed with the white or near-black letter under it,
     so it looks the same and nothing shows through.
   · The badge keeps its see-through glass colour: the wallpaper under it is a smooth gradient, so without the blur
     it looks almost the same. */
@media (max-width: 760px) {
  .b-stage .glass.b-badge, .b-stage .panel.b-ai { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .b-stage .panel.b-ai { background: #fbfbfd; }   /* 72% of the light glass (250, 250, 252) over white */
}
@media (max-width: 760px) and (prefers-color-scheme: dark) {
  .b-stage .panel.b-ai { background: #1b1b1e; }   /* 62% of the dark glass (38, 38, 42) over the page's #080808 */
}
