/*
 * Cinewide's tokens (docs/UI-AUDIT.md, 2.1): the one file the site, the extension and the
 * dashboard each take into their own build. Dark first; the popup, the welcome page, the
 * dashboard and the site follow the system into light (2026-10-25, mockups E, F and G): the light
 * values are the overrides at the end. The on-video layer and the emails stay dark.
 *
 * A test reads this file and checks every pair of text and ground the components use
 * against WCAG AA in both themes (brand/brand.test.mjs). A colour is changed here and nowhere
 * else: a test fails on a colour written in another style of those surfaces.
 */
:root {
  color-scheme: dark;

  /* Colour */
  --cw-bg: #08090b;
  --cw-raised: #121418;
  /* Lines that only divide: never the only edge of a control. */
  --cw-line: #23262d;
  --cw-text: #f3efe6;
  /* Quieter text, and the edge of a field. */
  --cw-text-2: #9a9da6;
  /* The one accent, with black text on it. */
  --cw-accent: #ffb547;
  --cw-on-accent: #000000;
  /* Destructive actions only. */
  --cw-danger: #ff5f57;
  --cw-on-danger: #000000;
  /* The screen of a frame: the black of a picture's bars. */
  --cw-screen: #000000;
  /* The edge of a control (U9 stage 3): a field, a list, an outlined button, a switch. It
     reads at 3 to 1 on the page, on a raised surface and on a hover, and stays quieter than
     the secondary text, which was the edge before. */
  --cw-edge: #666a73;
  /* The popup's look of U10 (the PO's mockup): a small outlined button's edge ("Use", "Try free
     for 7 days", a key's group), the quieter edge of a list and of Adjust's square, and the
     hairline between the rows of a card. Greys, as the others. */
  --cw-edge-outline: #2f333b;
  --cw-edge-quiet: #262a31;
  --cw-hairline: #1c1f25;
  /* The working surfaces refined (U10, mockups B, C and D; 2026-10-25): the popup's and the
     Adjust panel's ground; the raised square of Adjust and the dev badge; the quiet lines
     (a row's second line, a section's note); the small capitals of a section's label, the
     mockup's #6f737c lifted to pass AA on the ground; the dot between two words; and a key's
     ink in Settings. Greys, as the others. */
  --cw-ground: #0a0b0d;
  --cw-tile: #16181d;
  --cw-text-3: #8b8f98;
  --cw-label: #767a83;
  --cw-dot: #4a4e56;
  --cw-key-ink: #d9d5cc;

  /* The roles the light theme tells apart (2026-10-25): one colour in dark, two in light. Each
     dark value is the one its uses had, so that dark stays as it was to the pixel. */
  /* Amber words and links, and amber shapes: a switch that is on, a status dot, the chosen
     tile's icon, the focus ring. The main button keeps --cw-accent in both. */
  --cw-accent-ink: #ffb547;
  --cw-accent-ink-active: #f0a338;
  --cw-accent-mark: #ffb547;
  --cw-accent-mark-hover: #ffc46e;
  --cw-accent-mark-active: #f0a338;
  /* Red words: a destructive link or button outlined, never a fill. */
  --cw-danger-ink: #ff5f57;
  /* The words and icon of a tile or segment that is not on, under the pointer. */
  --cw-hover-ink: #d9d5cc;
  /* An icon button on the ground under the pointer. */
  --cw-hover-ground: #1a1d22;
  /* The track of the mode row, and the sunk track of Settings' segments. */
  --cw-track: #121418;
  --cw-track-sunk: #0a0b0d;
  /* The tile or segment that is on, its lift and its weight. */
  --cw-chosen: #23262d;
  --cw-chosen-lift: none;
  --cw-chosen-weight: 500;
  /* A select that shows its value. */
  --cw-field: #1a1d22;
  /* A card's ring, and Adjust's square and ring. */
  --cw-card-ring: none;
  --cw-adjust: #16181d;
  --cw-adjust-ring: none;
  /* The popup's switch: its track when off, its thumb off and on; the dashboard's thumb on. */
  --cw-switch-off: #23262d;
  --cw-thumb-off: #8b8f98;
  --cw-thumb-on: #0a0b0d;
  --cw-on-mark: #000000;
  /* A key's box outside the popup's main button. */
  --cw-key-edge: #23262d;
  /* A press on a quiet control: a faint tint of the ink. */
  --cw-faint: rgb(255 255 255 / 0.04);
  /* What floats over a page: a toast, a menu. */
  --cw-float-shadow: 0 6px 24px rgb(0 0 0 / 0.5);
  /* The site's header over the page as it scrolls. */
  --cw-veil: rgb(8 9 11 / 0.94);

  /* The same in both themes: a screen is dark, and so is what is drawn on it or on amber. */
  /* The lines and quiet ink of a drawn screen, its faint stripes and its trimmed bars, and the
     tinted scrims over a picture with white on them. */
  --cw-screen-ink: #9a9da6;
  --cw-screen-line: #23262d;
  --cw-screen-stripe: rgb(255 255 255 / 0.035);
  --cw-screen-trim: rgb(8 9 11 / 0.66);
  --cw-scrim: rgb(0 0 0 / 0.6);
  --cw-scrim-strong: rgb(0 0 0 / 0.8);
  --cw-scrim-soft: rgb(0 0 0 / 0.75);
  --cw-on-scrim: #ffffff;
  /* The site's screens and its night cards (the round "Landing", 2026-11-01): a screen's bezel
     and its stand, and the card of the launch offer and of the last way in, with its words. */
  --cw-bezel: #16181d;
  --cw-stand: #2a2e35;
  --cw-night: #121418;
  --cw-on-night: #f3efe6;
  /* On the amber button: a key's ink and box, the press's inner ring, and its glow on the site. */
  --cw-on-accent-ink: #0a0b0d;
  --cw-on-accent-edge: rgb(0 0 0 / 0.55);
  --cw-accent-glow: rgb(255 181 71 / 0.45);
  /* The picture of the dashboard's thanks: dusk, with the amber sun fading to nothing. */
  --cw-accent-clear: rgb(255 181 71 / 0);
  /* Pro's column in the site's table of the plans: the page warmed by the accent. */
  --cw-accent-tint: #1d1a14;
  --cw-dusk-high: #1d2a3f;
  --cw-dusk-mid: #3a3346;
  --cw-dusk-low: #6b4a35;
  /* The welcome page's drawing of Chrome's toolbar, in Chrome's own greys. */
  --cw-chrome-pill: #202124;
  --cw-chrome-edge: #3c4043;
  --cw-chrome-ink: #e8eaed;
  --cw-chrome-quiet: #9a9da6;

  /* States, the same on every control (U9 stage 3). */
  /* Under the pointer: a quiet control's fill. */
  --cw-hover: #1a1d22;
  /* The one that is on: a mode pressed, an item chosen. */
  --cw-selected: #23262d;
  /* The amber button under the pointer, and pressed down. */
  --cw-accent-hover: #ffc46e;
  --cw-accent-active: #f0a338;
  /* What is not available, still read. */
  --cw-disabled-opacity: 0.55;
  --cw-focus-offset: 2px;

  /* Type */
  --cw-font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --cw-display-width: 125;
  --cw-display-weight: 800;
  --cw-display-tracking: -0.02em;
  --cw-body-width: 100;
  --cw-body-weight: 400;
  --cw-strong-weight: 600;
  /* The scale, from small print to the first screen's line. */
  --cw-size-xs: 0.75rem;
  --cw-size-s: 0.875rem;
  --cw-size-m: 1rem;
  --cw-size-l: 1.25rem;
  --cw-size-xl: 1.75rem;
  --cw-size-2xl: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --cw-size-3xl: clamp(2.25rem, 1.2rem + 4.2vw, 4.5rem);
  --cw-leading: 1.5;
  --cw-leading-tight: 1.05;
  /* The scale of the surfaces people work in, the popup and the dashboard (U9 stage 3): few
     sizes, each with its own line height. The popup takes 11, 12, 13, 16 and 20 (its text, the
     product owner, 2026-10-19: 13 for body lines, 12 secondary, 11 at least); the dashboard
     its body at 14. */
  --cw-ui-min: 11px;
  --cw-ui-min-line: 14px;
  --cw-ui-secondary: 12px;
  --cw-ui-secondary-line: 16px;
  --cw-ui-body-s: 13px;
  --cw-ui-body-s-line: 18px;
  --cw-ui-body: 14px;
  --cw-ui-body-line: 20px;
  --cw-ui-lead: 16px;
  --cw-ui-lead-line: 22px;
  --cw-ui-title: 20px;
  --cw-ui-title-line: 24px;
  /* Small capitals of a section's label, and small text on the dark ground. */
  --cw-tracking-label: 0.04em;
  --cw-tracking-small: 0.01em;

  /* Space and shape */
  --cw-space-1: 0.25rem;
  --cw-space-2: 0.5rem;
  --cw-space-3: 0.75rem;
  --cw-space-4: 1rem;
  --cw-space-5: 1.5rem;
  --cw-space-6: 2rem;
  --cw-space-7: 3rem;
  --cw-space-8: 4.5rem;
  /* The space between things, by what they are to each other (U9 stage 3): two that read
     together, the parts of one group, and one group from the next. Always a step of the
     scale above. */
  --cw-gap-pair: var(--cw-space-2);
  --cw-gap-inside: var(--cw-space-3);
  --cw-gap-group: var(--cw-space-4);
  /* Three corners, stepping down as they nest: a container, a control, a tag. */
  --cw-radius-s: 4px;
  --cw-radius: 6px;
  --cw-radius-l: 10px;
  /* Three heights of control: the one large button, a field and its button, a small one. */
  --cw-control-l: 56px;
  --cw-control-l-compact: 48px;
  --cw-control-m: 40px;
  --cw-control-s: 32px;
  /* Icons: one stroke, two sizes, in words and on their own. */
  --cw-icon-s: 16px;
  --cw-icon-m: 20px;
  --cw-icon-stroke: 1.75;
  /* The corner marks: their arm and their stroke. */
  --cw-mark: 14px;
  --cw-mark-stroke: 2px;
  --cw-focus: 2px;

  /* Motion (docs/MOTION.md, 2026-10-19): the hero's bars slide out in 600 ms; everything else
     is quicker and quieter. Leaving uses the fast time with ease-in. */
  --cw-motion: 600ms;
  --cw-motion-hero: 600ms;
  --cw-motion-fast: 120ms;
  --cw-motion-base: 180ms;
  --cw-motion-slow: 240ms;
  --cw-motion-push: 220ms;
  --cw-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --cw-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  /* The one curve of everything that moves in the popup and the dashboard (2026-10-21). */
  --cw-ease-move: cubic-bezier(0.2, 0, 0, 1);
}

/* The light theme (2026-10-25, the owner's mockups E, F and G: docs/ui/u10-mockup/9 to 11). Only
   colours change: sizes, spaces and type are the same. The small screen, the main button, the
   on-video layer and the emails do not change. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --cw-bg: #f4f3ef;
    --cw-ground: #f4f3ef;
    --cw-raised: #ffffff;
    --cw-line: #ebe9e4;
    --cw-hairline: #ebe9e4;
    --cw-text: #16181d;
    --cw-text-2: #5f636b;
    --cw-text-3: #5f636b;
    --cw-label: #5f636b;
    --cw-dot: #c9c6bf;
    --cw-key-ink: #3b3e45;
    --cw-tile: #ebe9e4;
    /* A field's edge and a control's edge at 3 to 1 on the page, a card, a hover and a track;
       an outlined button's edge and a select's, quiet as the mockups draw them. */
    --cw-edge: #7d8189;
    --cw-edge-outline: #d6d3cc;
    --cw-edge-quiet: #dedbd3;
    --cw-hover: #f6f4ef;
    --cw-selected: #e7e4dd;

    --cw-accent-ink: #9a5400;
    --cw-accent-ink-active: #7a4300;
    --cw-accent-mark: #c27000;
    --cw-accent-mark-hover: #ad6400;
    --cw-accent-mark-active: #9a5400;
    --cw-danger-ink: #b93228;
    --cw-hover-ink: #16181d;
    --cw-hover-ground: #ebe9e4;
    --cw-track: #ebe9e4;
    --cw-track-sunk: #ebe9e4;
    --cw-chosen: #ffffff;
    --cw-chosen-lift: 0 1px 2px rgb(22 24 29 / 0.12);
    --cw-chosen-weight: 600;
    --cw-field: #f4f3ef;
    --cw-card-ring: 0 0 0 1px #e7e4dd;
    --cw-adjust: #ffffff;
    --cw-adjust-ring: 0 0 0 1px #e2dfd8;
    --cw-switch-off: #d6d3cc;
    --cw-thumb-off: #ffffff;
    --cw-thumb-on: #ffffff;
    --cw-on-mark: #ffffff;
    --cw-key-edge: #d6d3cc;
    --cw-faint: rgb(22 24 29 / 0.05);
    --cw-float-shadow: 0 6px 24px rgb(22 24 29 / 0.12);
    --cw-veil: rgb(244 243 239 / 0.94);
    --cw-chrome-pill: #f1f3f4;
    --cw-chrome-edge: #dadce0;
    --cw-chrome-ink: #3c4043;
    --cw-chrome-quiet: #5f6368;
    --cw-accent-tint: #fff6e6;
  }
}

/*
 * The font and the type (docs/UI-AUDIT.md, 2.2). A build puts this after tokens.css, and
 * the font at fonts/archivo.woff2 beside the stylesheet it makes.
 */
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo.woff2') format('woff2');
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}

html {
  background: var(--cw-bg);
  color: var(--cw-text);
  font-family: var(--cw-font);
  font-size: 100%;
  font-weight: var(--cw-body-weight);
  font-stretch: 100%;
  line-height: var(--cw-leading);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cw-bg);
  /* Chrome gives a page of an extension its own font and size on the body: the brand's
     are set here, where they are not inherited past it. */
  font-family: var(--cw-font);
  font-size: 1rem;
}

/* Display: wide, heavy and tight. */
.cw-display {
  font-stretch: 125%;
  font-weight: var(--cw-display-weight);
  letter-spacing: var(--cw-display-tracking);
  line-height: var(--cw-leading-tight);
  text-wrap: balance;
}

strong,
b {
  font-weight: var(--cw-strong-weight);
}

/* Figures that line up: ratios, prices, dates. */
.cw-tabular {
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--cw-accent-ink);
  text-underline-offset: 0.18em;
}

/* Focus always shows: the accent, apart from what it rings. */
:focus-visible {
  outline: var(--cw-focus) solid var(--cw-accent-mark);
  outline-offset: 2px;
}

/* A ring is the keyboard's: none until the keys that move focus were used, and none while the
   last move was a pointer, whatever key is pressed after a click (the owner's review of
   2026-10-21; the page keeps `data-modality`). A focus a script gave before either, Back's
   when Settings opens, draws none (the PO, 2026-11-01). A page that keeps no `data-modality`,
   which runs no script, keeps Chrome's own ring for the keyboard (R94). */
:root[data-modality]:not([data-modality='keyboard']) :focus-visible {
  outline: none;
}

::selection {
  background: var(--cw-accent);
  color: var(--cw-on-accent);
}

/* Read by a screen reader, and not drawn. */
.cw-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/*
 * Cinewide's components (docs/UI-AUDIT.md, 2.3 to 2.4): classes, so that the site's HTML,
 * the extension's DOM and the dashboard's React draw the same markup. A build puts this
 * after tokens.css and base.css. The markup each expects is written above it.
 */

/* ---- The gate ---------------------------------------------------------------------------
 *
 * A 21:9 screen, a picture on it, and the bars around the picture, which slide away.
 *
 *   <figure class="cw-gate cw-gate--opens">
 *     <div class="cw-gate__screen">
 *       <img class="cw-gate__picture" src="…" alt="" />
 *       <span class="cw-gate__bar cw-gate__bar--top"></span>   (and --bottom, --left, --right)
 *     </div>
 *     <span class="cw-ratio cw-gate__label">
 *       <span class="cw-ratio__from">16 : 9</span><span class="cw-ratio__to">2.39 : 1</span>
 *     </span>
 *   </figure>
 *
 * Drawn after: the picture as the screen shows it once Smart has run, and the bars gone.
 * Before: `data-state="before"` on the gate, or a `.cw-gate-switch` checkbox before it that
 * is not checked. `cw-gate--opens` plays the one motion as the page loads.
 *
 * The numbers are of the page's own example, worked out from the engine's (`fit.ts`): a
 * 2.39 : 1 film inside a 16:9 video, on a 21:9 screen. After, the picture is as wide as the
 * screen, 21 / 2.39 / 9 = 97.6 % of its height. Before, it is as wide as the 16:9 video,
 * 16 / 21 = 76.2 % of the screen; the side bars are the rest of the width, and the bars
 * above and below the rest of the height, (100 - 97.6 × 0.762) / 2 = 12.8 %.
 */
.cw-gate {
  --cw-picture-w: 100%;
  --cw-picture-h: 97.63%;
  --cw-from: 0.7619;
  --cw-bar-x: 11.905%;
  --cw-bar-y: 12.81%;
  --cw-gate-delay: 500ms;
  position: relative;
  margin: 0;
}

.cw-gate__screen {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--cw-screen);
  border-radius: 2px;
}

.cw-gate__picture {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--cw-picture-w);
  height: var(--cw-picture-h);
  object-fit: cover;
  display: block;
  transform: translate(-50%, -50%);
  transition: transform var(--cw-motion) var(--cw-ease-out);
}

/* A bar: black, with one edge of light on the side of the picture. */
.cw-gate__bar {
  position: absolute;
  background: var(--cw-screen);
  transition: transform var(--cw-motion) var(--cw-ease-out);
}

.cw-gate__bar--top,
.cw-gate__bar--bottom {
  left: 0;
  right: 0;
  height: var(--cw-bar-y);
}

.cw-gate__bar--left,
.cw-gate__bar--right {
  top: 0;
  bottom: 0;
  width: var(--cw-bar-x);
}

.cw-gate__bar--top {
  top: 0;
  box-shadow: inset 0 -1px 0 var(--cw-screen-line);
  transform: translateY(-100%);
}

.cw-gate__bar--bottom {
  bottom: 0;
  box-shadow: inset 0 1px 0 var(--cw-screen-line);
  transform: translateY(100%);
}

.cw-gate__bar--left {
  left: 0;
  box-shadow: inset -1px 0 0 var(--cw-screen-line);
  transform: translateX(-100%);
}

.cw-gate__bar--right {
  right: 0;
  box-shadow: inset 1px 0 0 var(--cw-screen-line);
  transform: translateX(100%);
}

.cw-gate__label {
  position: absolute;
  top: var(--cw-space-3);
  right: var(--cw-space-3);
}

/* Before: the picture as small as it was, and the bars in place. */
.cw-gate[data-state='before'] .cw-gate__picture,
.cw-gate-switch:not(:checked) ~ .cw-gate .cw-gate__picture {
  transform: translate(-50%, -50%) scale(var(--cw-from));
}

.cw-gate[data-state='before'] .cw-gate__bar,
.cw-gate-switch:not(:checked) ~ .cw-gate .cw-gate__bar {
  transform: none;
}

.cw-gate[data-state='before'] .cw-ratio__from,
.cw-gate-switch:not(:checked) ~ .cw-gate .cw-ratio__from {
  opacity: 1;
}

.cw-gate[data-state='before'] .cw-ratio__to,
.cw-gate-switch:not(:checked) ~ .cw-gate .cw-ratio__to {
  opacity: 0;
}

/* The one motion, as the page loads: from before to after. */
@keyframes cw-gate-picture {
  from {
    transform: translate(-50%, -50%) scale(var(--cw-from));
  }
}

@keyframes cw-gate-bar {
  from {
    transform: none;
  }
}

/* The label holds its first words until the bars are gone, then changes: no motion. */
@keyframes cw-gate-hold-shown {
  from,
  to {
    opacity: 1;
  }
}

@keyframes cw-gate-hold-hidden {
  from,
  to {
    opacity: 0;
  }
}

.cw-gate--opens .cw-gate__picture {
  animation: cw-gate-picture var(--cw-motion) var(--cw-ease-out) var(--cw-gate-delay) backwards;
}

.cw-gate--opens .cw-gate__bar {
  animation: cw-gate-bar var(--cw-motion) var(--cw-ease-out) var(--cw-gate-delay) backwards;
}

.cw-gate--opens .cw-ratio__from {
  animation: cw-gate-hold-shown calc(var(--cw-gate-delay) + var(--cw-motion)) step-end backwards;
}

.cw-gate--opens .cw-ratio__to {
  animation: cw-gate-hold-hidden calc(var(--cw-gate-delay) + var(--cw-motion)) step-end backwards;
}

/* ---- The ratio label ------------------------------------------------------------------
 *
 *   <span class="cw-ratio">2.39 : 1</span>
 *   <span class="cw-ratio"><span class="cw-ratio__from">16 : 9</span><span class="cw-ratio__to">2.39 : 1</span></span>
 */
.cw-ratio {
  display: inline-grid;
  align-items: center;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  background: var(--cw-bg);
  color: var(--cw-text);
  font-size: var(--cw-size-s);
  font-stretch: 125%;
  font-weight: var(--cw-strong-weight);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
}

.cw-ratio__from,
.cw-ratio__to {
  grid-area: 1 / 1;
  transition: opacity 0s linear var(--cw-motion);
}

.cw-ratio__from {
  opacity: 0;
}

/* ---- Corner marks ---------------------------------------------------------------------
 *
 * The two corners of the icon, in the accent: on a gate, or on any box with `cw-corners`.
 */
.cw-corners,
.cw-gate {
  position: relative;
}

.cw-corners::before,
.cw-corners::after,
.cw-gate::before,
.cw-gate::after {
  content: '';
  position: absolute;
  z-index: 1;
  width: var(--cw-mark);
  height: var(--cw-mark);
  border: 0 solid var(--cw-accent);
  pointer-events: none;
}

/* A corner mark on the page is an amber shape (in light, the darker amber); on a screen it stays
   the brand's amber. */
.cw-corners::before,
.cw-corners::after {
  border-color: var(--cw-accent-mark);
}

.cw-corners::before,
.cw-gate::before {
  top: calc(-1 * var(--cw-mark-stroke) - 4px);
  left: calc(-1 * var(--cw-mark-stroke) - 4px);
  border-top-width: var(--cw-mark-stroke);
  border-left-width: var(--cw-mark-stroke);
}

.cw-corners::after,
.cw-gate::after {
  right: calc(-1 * var(--cw-mark-stroke) - 4px);
  bottom: calc(-1 * var(--cw-mark-stroke) - 4px);
  border-right-width: var(--cw-mark-stroke);
  border-bottom-width: var(--cw-mark-stroke);
}

/* ---- Keycaps --------------------------------------------------------------------------
 *
 *   <span class="cw-keys"><kbd class="cw-key">Alt</kbd><kbd class="cw-key">Shift</kbd><kbd class="cw-key">S</kbd></span>
 */
.cw-keys {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25em;
  vertical-align: middle;
}

.cw-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9em;
  padding: 0.15em 0.5em 0.2em;
  border: 1px solid var(--cw-key-edge);
  border-bottom-width: 3px;
  border-radius: 5px;
  background: var(--cw-raised);
  color: var(--cw-text);
  font-family: var(--cw-font);
  font-size: 0.8em;
  font-weight: var(--cw-strong-weight);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

/* On an amber button the keycaps are drawn in black. */
.cw-button--primary .cw-key {
  border-color: var(--cw-on-accent-edge);
  background: transparent;
  color: var(--cw-on-accent);
}

/* ---- Buttons ----------------------------------------------------------------------------
 *
 *   <button class="cw-button cw-button--primary">…</button>   the one thing to press
 *   <button class="cw-button cw-button--secondary">…</button>
 *   <a class="cw-button cw-button--outline">…</a>          beside a primary action
 *   <button class="cw-button cw-button--danger">…</button>    destructive actions only
 *   <button class="cw-icon-button" aria-label="…"><svg …/></button>
 *   <div class="cw-segmented" role="group" aria-label="…">
 *     <button class="cw-segmented__item" aria-pressed="true">…</button> …
 *   </div>
 */
.cw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--cw-space-2);
  min-height: 44px;
  padding: 0 var(--cw-space-5);
  border: 1px solid transparent;
  border-radius: var(--cw-radius);
  font: inherit;
  font-weight: var(--cw-strong-weight);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.cw-button--primary {
  background: var(--cw-accent);
  color: var(--cw-on-accent);
}

.cw-button--primary:hover {
  background: var(--cw-accent-hover);
}

.cw-button--secondary {
  background: var(--cw-raised);
  /* Its edge reads at 3:1 at least on the page and on a raised surface (U9, A1): the line
     colour is never a control's only edge. */
  border-color: var(--cw-text-2);
  color: var(--cw-text);
}

.cw-button--secondary:hover {
  border-color: var(--cw-text);
}

/* Beside a primary action: the same button, drawn by its edge alone. */
.cw-button--outline {
  background: transparent;
  border-color: var(--cw-text-2);
  color: var(--cw-text);
}

.cw-button--outline:hover {
  border-color: var(--cw-text);
}

.cw-button--danger {
  background: var(--cw-danger);
  color: var(--cw-on-danger);
}

/* The one large button: Smart. */
.cw-button--large {
  min-height: 56px;
  font-size: var(--cw-size-l);
  font-stretch: 125%;
  font-weight: var(--cw-display-weight);
  letter-spacing: var(--cw-display-tracking);
}

.cw-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.cw-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--cw-radius);
  background: transparent;
  color: var(--cw-text-2);
  cursor: pointer;
}

.cw-icon-button:hover {
  background: var(--cw-raised);
  color: var(--cw-text);
}

.cw-icon-button svg {
  width: 20px;
  height: 20px;
}

.cw-segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: calc(var(--cw-radius) + 3px);
  background: var(--cw-track);
}

.cw-segmented__item {
  flex: 1 1 0;
  min-height: 38px;
  padding: 0 var(--cw-space-4);
  border: 0;
  border-radius: var(--cw-radius);
  background: transparent;
  color: var(--cw-text-2);
  font: inherit;
  font-weight: var(--cw-strong-weight);
  cursor: pointer;
}

.cw-segmented__item:hover {
  color: var(--cw-text);
}

.cw-segmented__item[aria-pressed='true'] {
  background: var(--cw-chosen);
  color: var(--cw-text);
  box-shadow: inset 0 -2px 0 var(--cw-accent-mark);
}

/* ---- The toast ------------------------------------------------------------------------
 *
 * What Cinewide says on the video, in one line, with the ratio where there is one.
 *
 *   <div class="cw-toast" role="status"><span class="cw-toast__mark"></span>Bars removed<span class="cw-ratio">2.39 : 1</span></div>
 */
.cw-toast {
  display: inline-flex;
  align-items: center;
  gap: var(--cw-space-3);
  padding: var(--cw-space-2) var(--cw-space-2) var(--cw-space-2) var(--cw-space-4);
  border-radius: var(--cw-radius-l);
  background: var(--cw-raised);
  color: var(--cw-text);
  font-size: var(--cw-size-s);
  font-weight: var(--cw-strong-weight);
  line-height: 1.3;
  box-shadow: var(--cw-float-shadow);
}

/* A corner of the icon, small, before the words. */
.cw-toast__mark {
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--cw-accent-mark);
  border-left: 2px solid var(--cw-accent-mark);
  flex: none;
}

.cw-toast .cw-ratio {
  background: var(--cw-bg);
}

/* ---- The store's state: a label with an amber dot, not a button -------------------------- */
.cw-status {
  display: inline-flex;
  align-items: center;
  gap: var(--cw-space-2);
  color: var(--cw-text-2);
  font-size: var(--cw-size-s);
  font-weight: var(--cw-strong-weight);
}

.cw-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cw-accent-mark);
  flex: none;
}

/* ---- No motion where the viewer asks for none: the after state shows ----------------- */
@media (prefers-reduced-motion: reduce) {
  .cw-gate *,
  .cw-ratio__from,
  .cw-ratio__to {
    animation: none !important;
    transition: none !important;
  }
}

/*
 * The site of cinewide.app, in the round "The Gate" (docs/UI-AUDIT.md, 5). The build puts the
 * brand's stylesheet before this one (brand/tokens.css, base.css, components.css): the
 * colours, the type and the parts are the brand's; this is the site's layout.
 */
* {
  box-sizing: border-box;
}

body {
  font-size: 1.0625rem;
}

.top,
main,
.bottom {
  max-width: 1232px;
  margin: 0 auto;
  padding: 0 var(--cw-space-6);
}

/* A draft is for the owner to read: it says so at its top. */
.draft {
  margin: 0;
  padding: var(--cw-space-2) var(--cw-space-4);
  background: var(--cw-accent);
  color: var(--cw-on-accent);
  font-size: var(--cw-size-s);
  font-weight: var(--cw-strong-weight);
  text-align: center;
}

/* A name that is not known yet. Not on a page that is built for the web. */
.hole {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--cw-accent);
  color: var(--cw-on-accent);
}

/* ---- The header and the footer ------------------------------------------------------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cw-space-4);
  min-height: 60px;
}

/* The header stays at the top as the page scrolls: compact, on the page's own black, across
   the whole width. */
header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cw-veil);
  box-shadow:
    0 0 0 100vmax var(--cw-veil),
    0 1px 0 100vmax var(--cw-line);
  clip-path: inset(0 -100vmax -1px);
}

.top nav {
  align-items: center;
}

.top nav a[aria-current],
.bottom nav a[aria-current] {
  color: var(--cw-text);
  text-decoration: underline;
  text-decoration-color: var(--cw-accent-mark);
  text-underline-offset: 0.3em;
}

.top .top__add {
  min-height: 40px;
  padding-inline: var(--cw-space-4);
  color: var(--cw-on-accent);
  font-size: var(--cw-size-s);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--cw-space-2);
  color: var(--cw-text);
  font-size: var(--cw-size-l);
  font-stretch: 125%;
  font-weight: var(--cw-display-weight);
  letter-spacing: var(--cw-display-tracking);
  text-decoration: none;
}

.top nav,
.bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cw-space-1) var(--cw-space-5);
}

.top nav a,
.bottom nav a {
  color: var(--cw-text-2);
  font-size: var(--cw-size-s);
  font-weight: var(--cw-strong-weight);
  text-decoration: none;
}

/* Every link of the header is as tall as a finger needs, on a desktop too; the footer's at
   least 32 px, and none narrower than 44 (U9, A31). */
.top nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}

.bottom nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 32px;
}

/* Where back-to-top sends the keyboard: the header itself, which is not a control, so no
   ring is drawn around it; the next Tab is its first link. */
header.top:focus {
  outline: none;
}

/* What a link of the page goes to is not under the header, which stays on top. */
[id^='part-'],
#pricing,
#faq,
#how-it-works {
  scroll-margin-top: calc(60px + var(--cw-space-4));
}

.top nav a:hover,
.bottom nav a:hover {
  color: var(--cw-text);
}

.top .top__add:hover {
  color: var(--cw-on-accent);
}

/* The footer, under a hairline like the page's other dividers (the PO, 2026-11-01). */
.bottom {
  margin-top: var(--cw-space-8);
  padding-top: var(--cw-space-6);
  padding-bottom: var(--cw-space-7);
  border-top: 1px solid var(--cw-line);
  color: var(--cw-text-2);
  font-size: var(--cw-size-s);
}

.bottom p {
  margin: var(--cw-space-3) 0 0;
}

/* ---- What every part of the page shares ---------------------------------------------- */
main > section {
  padding: var(--cw-space-7) 0;
}

h2 {
  margin: 0 0 var(--cw-space-5);
  font-size: var(--cw-size-2xl);
}

h3 {
  margin: 0;
  font-size: var(--cw-size-m);
  font-weight: var(--cw-strong-weight);
}

.note {
  color: var(--cw-text-2);
  font-size: var(--cw-size-s);
}

/* ---- The first screen (the round "Landing", mockup D) -------------------------------- */
/* The ribbon of ratios runs from edge to edge of the window; nothing scrolls sideways. */
body {
  overflow-x: clip;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cw-space-5) var(--cw-space-7);
  padding-top: var(--cw-space-7);
}

.hero__words {
  flex: 1 1 520px;
  min-width: 0;
  container-type: inline-size;
}

/* The line as large as its column holds each sentence on one line: the longest, "Nothing
   cropped.", is 10.3 em wide. */
.hero h1 {
  margin: 0;
  font-size: min(4.5rem, 100cqw / 10.5);
  line-height: 1;
}

/* A sentence of a line stays on one line, and each has its own. */
.whole {
  white-space: nowrap;
}

.hero h1 .whole,
.screens h2 .whole {
  display: block;
}

.lead {
  max-width: 29rem;
  margin: var(--cw-space-5) 0 0;
  color: var(--cw-text-2);
  font-size: 1.125rem;
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cw-space-3);
  margin: var(--cw-space-6) 0 0;
}

.hero__sites {
  margin: var(--cw-space-5) 0 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--cw-space-2);
  margin: 0 0 var(--cw-space-4);
  color: var(--cw-accent-ink);
  font-size: var(--cw-size-s);
  font-weight: var(--cw-strong-weight);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cw-accent-mark);
}

/* The curved screen: every length a share of the stage's width (--u, 1/900 of it), so that it
   is drawn whole at any width the stage has, and never over the words beside it. */
.hero__stage {
  position: relative;
  flex: 1 1 560px;
  min-width: 0;
  aspect-ratio: 820 / 520;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: inline-size;
}

.hero__glow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 6%;
  height: 28%;
  background: radial-gradient(closest-side, var(--cw-accent-glow), var(--cw-accent-clear));
  opacity: 0.7;
}

.curve {
  --u: calc(100cqw / 900);
  position: relative;
  width: calc(770 * var(--u));
  height: calc(340 * var(--u));
  margin-bottom: calc(60 * var(--u));
  transform-style: preserve-3d;
  transform: perspective(calc(1600 * var(--u))) rotateX(5deg) rotateY(-10deg);
}

.curve__screen {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(990 * var(--u)));
}

/* Ten slices of one still, each turned on the screen's curve. */
.curve__slice {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(77 * var(--u));
  height: calc(326 * var(--u));
  margin-left: calc(-38.5 * var(--u));
  overflow: hidden;
  border-block: calc(7 * var(--u)) solid var(--cw-bezel);
  background-color: var(--cw-screen);
  background-image: url('/assets/tos-sniper.jpg');
  background-image: image-set(
    url('/assets/tos-sniper.avif') type('image/avif'),
    url('/assets/tos-sniper.webp') type('image/webp'),
    url('/assets/tos-sniper.jpg') type('image/jpeg')
  );
  background-size: 1000% 100%;
  backface-visibility: hidden;
}

.curve__slice:nth-child(1) {
  border-left: calc(7 * var(--u)) solid var(--cw-bezel);
  background-position: 0% 0;
  transform: rotateY(19.8deg) translateZ(calc(-990 * var(--u)));
}

.curve__slice:nth-child(2) {
  background-position: 11.111% 0;
  transform: rotateY(15.4deg) translateZ(calc(-990 * var(--u)));
}

.curve__slice:nth-child(3) {
  background-position: 22.222% 0;
  transform: rotateY(11deg) translateZ(calc(-990 * var(--u)));
}

.curve__slice:nth-child(4) {
  background-position: 33.333% 0;
  transform: rotateY(6.6deg) translateZ(calc(-990 * var(--u)));
}

.curve__slice:nth-child(5) {
  background-position: 44.444% 0;
  transform: rotateY(2.2deg) translateZ(calc(-990 * var(--u)));
}

.curve__slice:nth-child(6) {
  background-position: 55.555% 0;
  transform: rotateY(-2.2deg) translateZ(calc(-990 * var(--u)));
}

.curve__slice:nth-child(7) {
  background-position: 66.666% 0;
  transform: rotateY(-6.6deg) translateZ(calc(-990 * var(--u)));
}

.curve__slice:nth-child(8) {
  background-position: 77.777% 0;
  transform: rotateY(-11deg) translateZ(calc(-990 * var(--u)));
}

.curve__slice:nth-child(9) {
  background-position: 88.888% 0;
  transform: rotateY(-15.4deg) translateZ(calc(-990 * var(--u)));
}

.curve__slice:nth-child(10) {
  border-right: calc(7 * var(--u)) solid var(--cw-bezel);
  background-position: 100% 0;
  transform: rotateY(-19.8deg) translateZ(calc(-990 * var(--u)));
}

.curve__neck,
.curve__foot {
  position: absolute;
  left: 50%;
  transform: translateZ(calc(-20 * var(--u)));
}

.curve__neck {
  top: calc(340 * var(--u));
  width: calc(90 * var(--u));
  height: calc(70 * var(--u));
  margin-left: calc(-45 * var(--u));
  background: linear-gradient(var(--cw-stand), var(--cw-screen));
  clip-path: polygon(30% 0, 70% 0, 62% 100%, 38% 100%);
}

.curve__foot {
  top: calc(404 * var(--u));
  width: calc(240 * var(--u));
  height: calc(14 * var(--u));
  margin-left: calc(-120 * var(--u));
  border-radius: calc(8 * var(--u));
  background: var(--cw-stand);
}

/* The film's own bars, over the picture until Smart: drawn as they are after it, gone. They
   leave by their scale, which the browser moves without drawing anything again. */
.bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 13%;
  background: var(--cw-screen);
  transform: scaleY(0);
}

.bar--top {
  top: 0;
  transform-origin: top;
}

.bar--bottom {
  bottom: 0;
  transform-origin: bottom;
}

/* What the extension says once the bars are gone, in front of the screen. */
.chip {
  position: absolute;
  right: calc(30 * var(--u));
  top: calc(-36 * var(--u));
  display: flex;
  align-items: center;
  gap: var(--cw-space-2);
  padding: var(--cw-space-2) var(--cw-space-3);
  border-radius: var(--cw-radius-l);
  background: var(--cw-accent);
  box-shadow: var(--cw-float-shadow);
  color: var(--cw-on-accent);
  font-size: var(--cw-size-s);
  font-weight: var(--cw-strong-weight);
  white-space: nowrap;
  transform: translateZ(calc(120 * var(--u)));
}

.chip .check {
  width: 16px;
  height: 16px;
}

/* A phone's screen: flat, 21:9, the same bars and the same toast. */
.flat {
  display: none;
  position: relative;
  width: 100%;
}

.flat__screen {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border: 5px solid var(--cw-bezel);
  border-radius: var(--cw-radius-l);
  background-color: var(--cw-screen);
  background-image: url('/assets/tos-sniper.jpg');
  background-image: image-set(
    url('/assets/tos-sniper.avif') type('image/avif'),
    url('/assets/tos-sniper.webp') type('image/webp'),
    url('/assets/tos-sniper.jpg') type('image/jpeg')
  );
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.flat .chip {
  top: auto;
  right: var(--cw-space-3);
  bottom: calc(-1 * var(--cw-space-4));
  transform: none;
}

@media (max-width: 639px) {
  .hero__stage {
    flex-basis: 100%;
    aspect-ratio: auto;
    padding-bottom: var(--cw-space-4);
  }

  .curve,
  .hero__glow {
    display: none;
  }

  .flat {
    display: block;
  }
}

/* ---- Any screen. The whole picture. ---------------------------------------------------- */
.screens {
  padding-top: var(--cw-space-8);
}

.screens__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--cw-space-4) var(--cw-space-6);
  margin: 0 0 var(--cw-space-6);
}

.screens h2 {
  margin: 0;
  font-size: clamp(2.125rem, 1rem + 3.2vw, 3.75rem);
  line-height: 1;
}

.screens__how {
  max-width: 27rem;
  color: var(--cw-text-2);
  line-height: 1.55;
}

.screens__how p {
  margin: 0 0 var(--cw-space-2);
}

.screens__keys,
.screens__mac {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cw-space-2);
}

.screens__mac {
  display: inline-flex;
  font-size: var(--cw-size-s);
}

.keys--mac,
.is-mac .keys--other,
.is-mac .screens__mac {
  display: none;
}

.is-mac .keys--mac {
  display: inline-flex;
}

/* One frame, from 16:9 to 32:9 and back, on a stage of a fixed size: the frame is a mask on it
   (clip-path), so nothing is laid out again as it moves (the owner, 2026-11-01). The picture
   is contained and moves by its scale alone: as large as the frame holds it whole at 16:9 and
   21:9, and at 32:9 as large as covers it, top and bottom cropped, as Fill draws it. Its
   numbers are the still's own shape, 1280 / 534. Drawn still at 21:9. */
.ratio {
  width: min(100%, 1067px);
  aspect-ratio: 32 / 9;
  margin: 0 auto;
  contain: size layout style;
}

.ratio__frame {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--cw-screen);
  clip-path: inset(0 17.1875% round var(--cw-radius-l));
}

.ratio__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(0.9734);
}

/* The size the frame is, said under it: one at a time, each in the same place. */
.sizes {
  display: grid;
  margin: var(--cw-space-5) 0 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.sizes li {
  grid-area: 1 / 1;
  opacity: 0;
}

.sizes .sizes__2 {
  opacity: 1;
}

.sizes strong {
  font-size: var(--cw-size-m);
}

.sizes span {
  color: var(--cw-text-2);
}

.ribbon {
  width: 100vw;
  margin: var(--cw-space-7) 0 0 calc(50% - 50vw);
  overflow: hidden;
  border-block: 1px solid var(--cw-line);
  white-space: nowrap;
  /* A soft fade at both edges (the owner, 2026-11-01): the mask's colour is its alpha alone. */
  mask-image: linear-gradient(
    to right,
    transparent,
    var(--cw-screen) 6%,
    var(--cw-screen) 94%,
    transparent
  );
}

.ribbon__run {
  display: inline-flex;
  align-items: center;
  gap: var(--cw-space-7);
  padding: var(--cw-space-4) 0;
  font-size: var(--cw-size-xl);
}

.ribbon__run > * {
  flex: none;
}

.ribbon__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cw-accent-mark);
}

.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--cw-space-5);
  margin: var(--cw-space-7) 0 0;
  padding: 0;
  list-style: none;
}

.modes h3 {
  color: var(--cw-accent-ink);
}

.modes p {
  margin: var(--cw-space-2) 0 0;
  color: var(--cw-text-2);
  line-height: 1.55;
}

/* What Cinewide never does: one quiet line, the three said one after another, a dot between
   them, wrapping as it must (the PO, 2026-11-01). */
.trust {
  margin: var(--cw-space-6) 0 0;
  padding: 0;
  list-style: none;
  color: var(--cw-text-3);
  font-size: var(--cw-size-s);
  line-height: 1.6;
}

.trust li {
  display: inline;
}

.trust li + li::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 var(--cw-space-2);
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

/* The way from the first page to How Cinewide works (the product owner, 2026-10-16). */
.screens__more {
  margin: var(--cw-space-4) 0 0;
}

.screens__more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cw-accent-ink);
}

@media (max-width: 639px) {
  /* A phone's frame keeps the width and changes its height: 16:9, then 21:9, then 32:9. The
     picture is as wide as the stage throughout: whole at 16:9 and 21:9, its top and bottom
     cropped at 32:9. */
  .ratio {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .ratio__frame {
    clip-path: inset(11.9048% 0 round var(--cw-radius-l));
  }

  .ratio__frame img {
    transform: none;
  }

  /* No ribbon on a phone (the PO, 2026-11-01). */
  .ribbon {
    display: none;
  }

  .modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--cw-space-3) var(--cw-space-4);
    margin-top: var(--cw-space-5);
  }

  .modes p {
    font-size: var(--cw-size-s);
    line-height: 1.35;
  }

  .trust {
    margin-top: var(--cw-space-4);
  }

  .screens__more {
    margin-top: var(--cw-space-2);
  }
}

/* ---- The motion: on a page that has not asked for less --------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .curve {
    animation: sway 14s ease-in-out infinite;
  }

  .bar {
    animation: bars 7s var(--cw-ease-in-out) infinite;
  }

  .chip {
    animation: chip 7s ease infinite;
  }

  /* There and back, never a jump: 16:9, 21:9, 32:9, 21:9, 16:9, each move 1.2 s easing in and
     out, each ratio held 2 s (12.8 s in all). */
  .ratio__frame {
    animation: ratio-frame 12.8s var(--cw-ease-in-out) infinite;
  }

  .ratio__frame img {
    animation: ratio-picture 12.8s var(--cw-ease-in-out) infinite;
  }

  /* The words change by a cut (docs/MOTION.md), once the frame has come to rest on its ratio. */
  .sizes li {
    animation: 12.8s step-end infinite;
  }

  .sizes .sizes__1 {
    animation-name: size-1;
  }

  .sizes .sizes__2 {
    animation-name: size-2;
  }

  .sizes .sizes__3 {
    animation-name: size-3;
  }

  /* Six sets a half: 28 s a set, so it runs as fast as it did with one. */
  .ribbon__run {
    animation: ribbon 168s linear infinite;
  }

  @media (max-width: 639px) {
    .ratio__frame {
      animation-name: ratio-frame-tall;
    }

    .ratio__frame img {
      animation: none;
    }
  }

  /* Off the screen, or in a hidden tab, nothing moves (motion.js). */
  [data-paused]
    :is(.curve, .bar, .chip, .ratio__frame, .ratio__frame img, .sizes li, .ribbon__run) {
    animation-play-state: paused;
  }
}

@keyframes sway {
  0%,
  100% {
    transform: perspective(calc(1600 * var(--u))) rotateX(6deg) rotateY(-14deg);
  }

  50% {
    transform: perspective(calc(1600 * var(--u))) rotateX(3deg) rotateY(10deg);
  }
}

@keyframes bars {
  0%,
  28% {
    transform: scaleY(1);
  }

  40%,
  82% {
    transform: scaleY(0);
  }

  94%,
  100% {
    transform: scaleY(1);
  }
}

/* The toast fades in and out, as the extension's does on the video (docs/MOTION.md). */
@keyframes chip {
  0%,
  36% {
    opacity: 0;
  }

  44%,
  80% {
    opacity: 1;
  }

  90%,
  100% {
    opacity: 0;
  }
}

@keyframes ratio-frame {
  0%,
  15.625% {
    clip-path: inset(0 25% round var(--cw-radius-l));
  }

  25%,
  40.625% {
    clip-path: inset(0 17.1875% round var(--cw-radius-l));
  }

  50%,
  65.625% {
    clip-path: inset(0 0 round var(--cw-radius-l));
  }

  75%,
  90.625% {
    clip-path: inset(0 17.1875% round var(--cw-radius-l));
  }

  100% {
    clip-path: inset(0 25% round var(--cw-radius-l));
  }
}

@keyframes ratio-frame-tall {
  0%,
  15.625% {
    clip-path: inset(0 0 round var(--cw-radius-l));
  }

  25%,
  40.625% {
    clip-path: inset(11.9048% 0 round var(--cw-radius-l));
  }

  50%,
  65.625% {
    clip-path: inset(25% 0 round var(--cw-radius-l));
  }

  75%,
  90.625% {
    clip-path: inset(11.9048% 0 round var(--cw-radius-l));
  }

  100% {
    clip-path: inset(0 0 round var(--cw-radius-l));
  }
}

/* The picture with the frame: whole at 16:9 (0.7417) and 21:9 (0.9734), covering at 32:9
   (1.4833), eased with it. */
@keyframes ratio-picture {
  0%,
  15.625% {
    transform: scale(0.7417);
  }

  25%,
  40.625% {
    transform: scale(0.9734);
  }

  50%,
  65.625% {
    transform: scale(1.4833);
  }

  75%,
  90.625% {
    transform: scale(0.9734);
  }

  100% {
    transform: scale(0.7417);
  }
}

/* Each caption from the moment its ratio is reached to the moment the next is. */
@keyframes size-1 {
  0% {
    opacity: 1;
  }

  25%,
  100% {
    opacity: 0;
  }
}

@keyframes size-2 {
  0% {
    opacity: 0;
  }

  25% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  75%,
  100% {
    opacity: 1;
  }
}

@keyframes size-3 {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  75%,
  100% {
    opacity: 0;
  }
}

@keyframes ribbon {
  to {
    transform: translateX(-50%);
  }
}

/* ---- Smart and Fill: one large frame each, before and after -------------------------- */
.shots {
  display: grid;
  gap: var(--cw-space-7);
}

.compare {
  margin: 0;
}

.compare figcaption {
  margin-top: var(--cw-space-3);
  font-weight: var(--cw-strong-weight);
}

/*
 * The slider is the frame's own scroll: the frame is twice as wide as it shows, its picture
 * stays where it is, and how far it is scrolled is how much of the after shows. The bar under
 * it is the browser's own scrollbar, in the accent.
 */
.compare__scroller {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-timeline: --compare x;
  scrollbar-color: var(--cw-accent-mark) var(--cw-raised);
}

.compare__track {
  position: relative;
  width: 200%;
}

/* Where the scroll starts: halfway, where a browser knows how. */
.compare__start {
  position: absolute;
  left: 25%;
  width: 1px;
  height: 1px;
  scroll-initial-target: nearest;
}

.compare__stage {
  position: sticky;
  left: 0;
  width: 50%;
}

.compare__screen {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--cw-screen);
}

.compare__img {
  position: absolute;
  left: 50%;
  top: 50%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.compare__after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
  animation: compare-cut linear both;
  animation-timeline: --compare;
}

.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--cw-accent);
  animation: compare-handle linear both;
  animation-timeline: --compare;
}

@keyframes compare-cut {
  from {
    clip-path: inset(0 0 0 0%);
  }
  to {
    clip-path: inset(0 0 0 100%);
  }
}

@keyframes compare-handle {
  from {
    left: 0%;
  }
  to {
    left: 100%;
  }
}

.compare__tag {
  position: absolute;
  top: var(--cw-space-3);
  padding: 0.15em 0.55em;
  border-radius: 4px;
  background: var(--cw-bg);
  color: var(--cw-text);
  font-size: var(--cw-size-xs);
  font-weight: var(--cw-strong-weight);
}

.compare__tag--before {
  left: var(--cw-space-3);
}

.compare__tag--after {
  right: var(--cw-space-3);
}

/*
 * The shapes the engine gives (src/engine/fit.ts; a test holds these numbers to them), on a
 * 21:9 screen.
 *
 * Smart: a 2.39 : 1 film inside a 16:9 video. Before, the video is as high as the screen
 * and the film as wide as the video: 16 / 21 of the width, and 16 / 9 / 2.39 of the height.
 * After, the film is as wide as the screen, 21 / 9 / 2.39 of its height: nothing is cropped.
 */
.compare--smart .compare__img--before {
  width: 76.19%;
  height: 74.38%;
}

.compare--smart .compare__img--after {
  width: 100%;
  height: 97.63%;
}

/*
 * Fill: a 16:9 video. Before, as high as the screen; after, as wide as it, which is higher
 * than the screen by 21 / 16: the top and the bottom are cropped.
 */
.compare--fill .compare__img--before {
  width: 76.19%;
  height: 100%;
}

.compare--fill .compare__img--after {
  width: 100%;
  height: 131.25%;
}

/* A picture is never selected or dragged away: no colour of a selection on it. */
.compare__img {
  user-select: none;
  -webkit-user-drag: none;
}

/*
 * With the site's script: the frame no longer scrolls, a range input over the whole of it
 * is the divider, and its handle is drawn on it. `--at` is how much of the before shows.
 */
.compare__grip,
.compare__hint {
  display: none;
}

.compare--js .compare__scroller {
  overflow: visible;
}

.compare--js .compare__track,
.compare--js .compare__stage {
  position: static;
  width: 100%;
}

.compare--js .compare__start {
  display: none;
}

.compare--js .compare__after {
  animation: none;
  clip-path: inset(0 0 0 var(--at, 50%));
}

.compare--js .compare__handle {
  animation: none;
  left: var(--at, 50%);
}

.compare--js .compare__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cw-accent);
  color: var(--cw-on-accent);
  font-size: 11px;
  letter-spacing: -1px;
  transform: translate(-50%, -50%);
}

.compare__range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
  background: transparent;
  touch-action: pan-y;
}

.compare__range::-webkit-slider-thumb {
  width: 44px;
  height: 100vh;
  appearance: none;
  cursor: ew-resize;
}

.compare--js .compare__screen:has(.compare__range:focus-visible) {
  outline: var(--cw-focus) solid var(--cw-accent-mark);
  outline-offset: 3px;
}

/* A word on how, until the first drag. */
.compare--js .compare__hint {
  position: absolute;
  left: 50%;
  bottom: var(--cw-space-3);
  display: block;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  background: var(--cw-scrim-soft);
  color: var(--cw-on-scrim);
  font-size: var(--cw-size-s);
  transform: translateX(-50%);
  pointer-events: none;
}

/* The hint goes once the divider is used: what leaves is quick (docs/MOTION.md). */
.compare--used .compare__hint {
  opacity: 0;
  transition: opacity var(--cw-motion-fast) ease-in;
}

/* A browser that cannot tie a picture to a scroll shows the two halves, still. */
@supports not (animation-timeline: scroll()) {
  .compare__track {
    width: 100%;
  }

  .compare__stage {
    width: 100%;
  }
}

/* ---- Pricing: the two plans side by side, row by row (mockup D) ------------------------ */
.plans {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--cw-raised);
  box-shadow: var(--cw-card-ring);
}

.plans th,
.plans td {
  padding: var(--cw-space-4) var(--cw-space-5);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: break-word;
}

.plans thead th {
  padding-top: var(--cw-space-6);
  padding-bottom: var(--cw-space-5);
  vertical-align: top;
}

.plans thead .plans__what {
  width: 40%;
  vertical-align: bottom;
  color: var(--cw-text-2);
  font-weight: var(--cw-strong-weight);
}

.plans__plan {
  width: 30%;
}

.plans__name {
  display: block;
  color: var(--cw-text-2);
  font-size: var(--cw-size-s);
  font-weight: var(--cw-strong-weight);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.plans__plan--pro .plans__name {
  color: var(--cw-accent-ink);
}

.plans__price {
  display: block;
  margin-top: var(--cw-space-2);
  font-weight: var(--cw-body-weight);
}

.plans__price strong {
  font-size: 2.75rem;
}

.plans__price span {
  color: var(--cw-text-2);
}

.plans__action {
  display: flex;
  width: 100%;
  margin-top: var(--cw-space-4);
  white-space: normal;
  text-align: center;
}

.plans__once {
  display: block;
  margin-top: var(--cw-space-2);
  color: var(--cw-text-2);
  font-size: var(--cw-size-s);
  font-weight: var(--cw-body-weight);
}

.plans__plan--pro,
.plans__pro {
  background: var(--cw-accent-tint);
}

.plans tbody th,
.plans tbody td {
  border-top: 1px solid var(--cw-hairline);
}

.plans tbody th {
  font-weight: var(--cw-body-weight);
}

.plans tbody tr:last-child > * {
  padding-bottom: var(--cw-space-6);
}

.plans .check {
  display: block;
  color: var(--cw-accent-ink);
}

.plans__none {
  color: var(--cw-text-2);
}

/* While the store has no page: one quiet line where its buttons would be, across Free and Pro,
   Pro's half keeping its tint (the owner, 2026-11-01). The columns are as wide as each other. */
.plans .plans__soon td {
  padding-top: 0;
  padding-bottom: var(--cw-space-5);
}

.plans .plans__soon td[colspan] {
  background: linear-gradient(to right, transparent 50%, var(--cw-accent-tint) 50%);
}

/* The launch offer, on the night's card in either theme: shown by offer.js alone. */
.offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--cw-space-3);
  margin-top: var(--cw-space-5);
  padding: var(--cw-space-4) var(--cw-space-6);
  border: 1px solid var(--cw-screen-line);
  border-radius: 18px;
  background: var(--cw-night);
  color: var(--cw-on-night);
}

.offer[hidden] {
  display: none;
}

.offer p {
  margin: 0;
}

.offer strong,
.offer a {
  color: var(--cw-accent);
}

.offer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* How Pro is had, under the plans (the owner, 2026-10-31): three short steps in a row. */
.getpro__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--cw-space-5);
  margin: var(--cw-space-7) 0 0;
  padding: 0;
  list-style: none;
}

.getpro__n {
  display: block;
  color: var(--cw-accent-ink);
  font-size: 2.25rem;
  line-height: 1;
}

.getpro__steps p {
  margin: var(--cw-space-2) 0 0;
  line-height: 1.5;
}

.pricing > .note {
  margin-top: var(--cw-space-6);
}

@media (max-width: 639px) {
  /* A phone: the table fits by wrapping its words, the Pro column always in sight; it never
     scrolls sideways (the PO, 2026-11-01). */
  /* Edge to edge on a phone: its columns take the page's margins, so that a button of the
     table holds one line in either language (the PO, 2026-11-01). */
  .plans {
    width: calc(100% + 2 * var(--cw-space-4));
    margin-inline: calc(-1 * var(--cw-space-4));
    border-radius: 0;
    font-size: var(--cw-size-s);
    line-height: 1.35;
  }

  .plans th,
  .plans td {
    padding: var(--cw-space-3) var(--cw-space-2);
  }

  .plans th:first-child {
    padding-left: var(--cw-space-4);
  }

  .plans td:last-child,
  .plans th:last-child {
    padding-right: var(--cw-space-4);
  }

  .plans thead th {
    padding-top: var(--cw-space-4);
    padding-bottom: var(--cw-space-3);
  }

  .plans thead .plans__what {
    width: 32%;
  }

  .plans__plan {
    width: 34%;
  }

  .plans thead .plans__plan {
    padding-inline: var(--cw-space-1);
  }

  .plans__name {
    letter-spacing: 0.08em;
  }

  .plans__price strong {
    display: block;
    font-size: 1.5rem;
  }

  .plans__action {
    min-height: 44px;
    padding-inline: var(--cw-space-1);
    font-size: var(--cw-size-s);
    white-space: nowrap;
  }

  .plans tbody tr:last-child > * {
    padding-bottom: var(--cw-space-4);
  }

  .plans .plans__soon td {
    padding-bottom: var(--cw-space-3);
  }

  .offer {
    gap: 0 var(--cw-space-2);
    padding: var(--cw-space-3) var(--cw-space-4);
    font-size: var(--cw-size-s);
  }

  .getpro__steps {
    grid-template-columns: 1fr;
    gap: var(--cw-space-2);
    margin-top: var(--cw-space-4);
  }

  .getpro__steps li {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    align-items: baseline;
  }

  .getpro__n {
    font-size: var(--cw-size-xl);
  }

  .getpro__steps p {
    margin: 0;
    font-size: var(--cw-size-s);
    line-height: 1.35;
  }

  .pricing > .note {
    margin-top: var(--cw-space-4);
  }
}

/* ---- Questions, each closed until it is opened ----------------------------------------- */
/* How Cinewide works: each part by its name, and what it does, in one line or two. */
.guide__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--cw-space-4) var(--cw-space-6);
  margin: var(--cw-space-5) 0 0;
}

.guide__list div {
  padding-top: var(--cw-space-3);
  border-top: 1px solid var(--cw-line);
}

.guide__list dt {
  font-weight: var(--cw-strong-weight);
}

.guide__list dd {
  margin: var(--cw-space-1) 0 0;
  color: var(--cw-text-2);
}

.faq details {
  border-top: 1px solid var(--cw-line);
}

.faq details:last-of-type {
  border-bottom: 1px solid var(--cw-line);
}

.faq summary {
  display: flex;
  align-items: center;
  gap: var(--cw-space-4);
  min-height: 52px;
  padding: var(--cw-space-3) 0;
  font-weight: var(--cw-strong-weight);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  margin-left: auto;
  color: var(--cw-accent-ink);
  font-size: var(--cw-size-l);
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  max-width: 70ch;
  margin: 0 0 var(--cw-space-4);
  color: var(--cw-text-2);
}

/* ---- One more way in, before the footer, with the store's link alone: the night's card ---- */
main > .again {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--cw-space-5);
  margin: var(--cw-space-7) 0;
  padding: var(--cw-space-8) var(--cw-space-7);
  border: 1px solid var(--cw-screen-line);
  border-radius: 28px;
  background: var(--cw-night);
  color: var(--cw-on-night);
}

.again h2 {
  margin: 0;
  font-size: clamp(1.875rem, 1rem + 2.6vw, 3.25rem);
  line-height: 1.05;
}

.again p {
  margin: 0;
}

.again__short {
  display: none;
}

/* ---- The policies, and the other pages of words ------------------------------------- */
.policy {
  display: grid;
  grid-template-columns: 220px minmax(0, 72ch);
  gap: var(--cw-space-7);
  align-items: start;
  padding: var(--cw-space-6) 0;
}

.policy--short {
  grid-template-columns: minmax(0, 72ch);
}

.toc {
  position: sticky;
  top: calc(60px + var(--cw-space-5));
  font-size: var(--cw-size-s);
}

.toc__title {
  margin: 0 0 var(--cw-space-3);
  color: var(--cw-text-2);
  font-weight: var(--cw-strong-weight);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--cw-line);
}

.toc li {
  margin: 0;
}

.toc a {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: var(--cw-space-1) var(--cw-space-3);
  color: var(--cw-text-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--cw-text);
}

/* The phone's table of contents: closed at the top of the page (U9, A28). */
.toc-fold {
  display: none;
}

.toc-fold summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--cw-space-3);
  font-weight: var(--cw-strong-weight);
  cursor: pointer;
  list-style: none;
}

.toc-fold summary::-webkit-details-marker {
  display: none;
}

.toc-fold summary::after {
  content: '+';
  margin-left: auto;
  color: var(--cw-accent-ink);
  font-size: var(--cw-size-l);
}

.toc-fold[open] summary::after {
  content: '−';
}

.toc-fold ol {
  margin: 0;
  padding: 0 0 var(--cw-space-2);
  list-style: none;
}

.toc-fold a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--cw-space-3);
  color: var(--cw-text-2);
  text-decoration: none;
}

.toc-fold a:hover {
  color: var(--cw-text);
}

.text {
  max-width: 72ch;
  padding: var(--cw-space-6) 0;
}

.policy .text {
  padding: 0;
}

.text h1 {
  margin: 0 0 var(--cw-space-3);
  font-size: var(--cw-size-2xl);
  font-stretch: 125%;
  font-weight: var(--cw-display-weight);
  letter-spacing: var(--cw-display-tracking);
  line-height: var(--cw-leading-tight);
}

.text h2 {
  margin: var(--cw-space-6) 0 var(--cw-space-2);
  font-size: var(--cw-size-l);
}

.text h3 {
  margin: var(--cw-space-5) 0 var(--cw-space-1);
}

.text li {
  margin: var(--cw-space-2) 0;
}

/* The page Chrome opens when Cinewide is removed. */
.survey form {
  display: grid;
  gap: var(--cw-space-3);
  margin: var(--cw-space-5) 0;
}

.survey fieldset {
  display: grid;
  gap: 0;
  margin: 0 0 var(--cw-space-2);
  padding: 0;
  border: 0;
}

/* Each answer a row a finger can take (U9, A30). */
.survey fieldset label {
  display: flex;
  align-items: center;
  gap: var(--cw-space-3);
  min-height: 44px;
  cursor: pointer;
}

.survey legend,
.survey label[for] {
  margin: var(--cw-space-2) 0 2px;
  padding: 0;
  font-weight: var(--cw-strong-weight);
}

.survey input[type='radio'] {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--cw-accent-mark);
}

/* A field's edge is the quieter text's colour: 3 to 1 against the page, at least. */
.survey input[type='text'],
.survey textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--cw-text-2);
  border-radius: var(--cw-radius);
  background: var(--cw-raised);
  color: var(--cw-text);
  font: inherit;
}

.survey button {
  justify-self: start;
  margin-top: var(--cw-space-2);
}

/* ---- A phone ------------------------------------------------------------------------- */
@media (max-width: 760px) {
  body {
    font-size: 1rem;
  }

  .top,
  main,
  .bottom {
    padding-left: var(--cw-space-4);
    padding-right: var(--cw-space-4);
  }

  .top {
    min-height: 60px;
  }

  /* On a phone the policies are in the footer alone; with the store's link the header has
     the language and the way in. Every link is as tall as a finger needs. */
  .top nav a,
  .bottom nav a {
    min-height: 44px;
  }

  /* One row, 60 px, in either language (U9, A26). */
  .top nav {
    flex-wrap: nowrap;
    gap: 0 var(--cw-space-4);
  }

  .top nav .top__privacy,
  .top nav:has(.top__add) .top__pricing,
  .top nav:has(.top__add) .top__faq {
    display: none;
  }

  .brand {
    min-height: 44px;
  }

  /* With the store's way in, the header is the icon, the language and the way in. */
  .top:has(.top__add) .brand {
    font-size: 0;
    gap: 0;
  }

  .top .top__add {
    min-height: 44px;
    padding-inline: var(--cw-space-3);
  }

  /* On a phone one picture before and after, Smart's: the table and the modes say Fill. */
  .compare--fill {
    display: none;
  }

  /* The last way in on a phone too, closer (the PO, 2026-11-01). */
  main > .again {
    gap: var(--cw-space-3);
    margin: var(--cw-space-5) 0 0;
    padding: var(--cw-space-5) var(--cw-space-4);
    border-radius: 20px;
  }

  .again h2 {
    font-size: 1.4rem;
  }

  .again .cw-button--large {
    min-height: 48px;
    font-size: var(--cw-size-m);
  }

  /* On a phone the shorter words, on one line (the owner, 2026-11-01). */
  .again__long {
    display: none;
  }

  .again__short {
    display: inline;
    white-space: nowrap;
  }

  /* The credits of the stills are in the footer, all of them. */
  .shots__credit {
    display: none;
  }

  .bottom nav {
    gap: 0 var(--cw-space-3);
  }

  .faq summary {
    min-height: 44px;
    padding: var(--cw-space-1) 0;
    font-size: var(--cw-size-s);
  }

  main > section {
    padding: var(--cw-space-3) 0 var(--cw-space-4);
  }

  h2 {
    margin-bottom: var(--cw-space-3);
    font-size: 1.6rem;
  }

  .hero {
    gap: var(--cw-space-4);
    padding-top: var(--cw-space-4);
  }

  .lead {
    margin-top: var(--cw-space-3);
    font-size: var(--cw-size-m);
    line-height: 1.45;
  }

  .hero__actions {
    margin-top: var(--cw-space-4);
    gap: var(--cw-space-2);
  }

  .hero__sites {
    margin-top: var(--cw-space-3);
  }

  .eyebrow {
    margin-bottom: var(--cw-space-2);
    font-size: var(--cw-size-xs);
  }

  .screens {
    padding-top: var(--cw-space-5);
  }

  .screens__head {
    margin-bottom: var(--cw-space-4);
  }

  /* "The whole picture." is 11 em wide: on the narrowest phone it still holds one line. */
  .screens h2 {
    font-size: min(2rem, (100vw - 2rem) / 11.3);
  }

  .screens__how {
    font-size: var(--cw-size-s);
    line-height: 1.4;
  }

  .screens__how p {
    margin-bottom: var(--cw-space-1);
  }

  .sizes {
    margin-top: var(--cw-space-3);
    font-size: var(--cw-size-s);
  }

  .shots {
    gap: var(--cw-space-4);
  }

  .compare figcaption {
    font-size: var(--cw-size-s);
  }

  /* No words of the page under 14 px (the product owner, U9, A27); labels may be smaller. */
  .shots .note,
  .pricing .note {
    font-size: var(--cw-size-s);
    line-height: 1.3;
  }

  .policy {
    display: block;
    padding: var(--cw-space-5) 0;
  }

  /* On a phone the table of contents is closed at the top of the page. */
  .toc {
    display: none;
  }

  .toc-fold {
    display: block;
    margin: 0 0 var(--cw-space-5);
    /* A control's edge is the quieter text's colour, never the line alone (U9, A1). */
    border: 1px solid var(--cw-text-2);
    border-radius: var(--cw-radius-l);
    background: var(--cw-raised);
  }

  .toc-fold:has(summary:hover) {
    border-color: var(--cw-text);
  }

  .bottom {
    margin-top: var(--cw-space-5);
    padding-top: var(--cw-space-5);
    padding-bottom: var(--cw-space-6);
    font-size: var(--cw-size-s);
    line-height: 1.3;
  }

  .bottom p {
    margin-top: var(--cw-space-2);
  }
}

/* A narrow phone: "Questions" leaves the header, which keeps the name, Pricing and the other
   language on one row (U9, A26). Questions is a part of the first page, a scroll away, and
   Pricing is the one the header must reach. */
@media (max-width: 419px) {
  .top nav .top__faq {
    display: none;
  }
}

/* The header's way in says its full words; on the narrowest phones the shorter ones, so that
   the row never runs past the screen (the owner, 2026-11-01). */
.top__short {
  display: none;
}

/* The narrowest phones: the name a size smaller, so the row still holds. */
@media (max-width: 359px) {
  .brand {
    font-size: var(--cw-size-m);
  }

  .top__long {
    display: none;
  }

  .top__short {
    display: inline;
  }
}

/* ---- Back to the top (U9, A28): shown by top.js once a long page is scrolled -------- */
.totop {
  position: fixed;
  right: max(var(--cw-space-4), env(safe-area-inset-right));
  bottom: max(var(--cw-space-4), env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--cw-text-2);
  border-radius: 50%;
  background: var(--cw-raised);
  color: var(--cw-text);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  /* Going away: quick, easing in, and out of reach once gone. */
  transition:
    opacity var(--cw-motion-fast) ease-in,
    visibility 0s linear var(--cw-motion-fast);
}

.totop[hidden] {
  display: none;
}

.totop--shown {
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--cw-motion-base) var(--cw-ease-out),
    visibility 0s;
}

.totop:hover {
  border-color: var(--cw-text);
  color: var(--cw-accent-ink);
}

/* Asked for less motion: back-to-top only fades, at the quick time, and its scroll is at once
   (top.js). The first screen and the frame of the ratios have no motion at all: they are drawn
   still, after Smart, at 21:9. */
@media (prefers-reduced-motion: reduce) {
  .totop {
    transition:
      opacity var(--cw-motion-fast) linear,
      visibility 0s linear var(--cw-motion-fast);
  }

  .totop--shown {
    transition:
      opacity var(--cw-motion-fast) linear,
      visibility 0s;
  }

  .compare--used .compare__hint {
    transition: opacity var(--cw-motion-fast) linear;
  }
}

/* How Cinewide works, a page of its own. */
article.guide {
  padding-block: var(--cw-space-7, 48px);
}

article.guide h1 {
  margin: 0;
}
