/* ============================================================
   FRAME SCALE — a picture built in HTML from DS parts (an illustration: pills, cards, chips, text) scales as one with
   its frame, at every width (review 01.12: the Solutions first screens; the rule — docs/layout-rules.md, «A picture
   built in HTML scales with its frame»).
   The frame (.frame-scale) is a size container; inside it one unit, --u, is the frame's shorter side / --frame-base, and
   the tokens the picture is drawn with are declared again in that unit — so a space, a radius or a text size inside keeps
   its proportion to the frame whatever the screen, and the picture never crowds a small frame or floats lost in a large
   one. Sizes the picture writes itself are calc(N * var(--u)), never rem.
   The drawing is fitted into the frame whole, as an image with object-fit: contain — by its own box, not by the frame's
   shorter side (review 01.12: in the phones' 4 : 3 frame the shorter side left the width empty and the drawing small):
   --frame-base: how many units fit across the frame — the drawing's width with its air, set per picture where it reads
   right on desktop (1440 × 900, a square frame);
   --frame-h: how many units the drawing needs top to bottom with its air (default --frame-base). A drawing lower than
   it is wide sets it lower, and grows in a frame lower than a square (phones and tablets, 4 : 3) instead of floating.
   (The AI chat, chat-card.css, is on this frame too: a window whose answer runs on under its field, so its --frame-h
   is what it needs to read — 0.95 of its width — not its whole answer.)
   One pair at every width: no phone or tablet sizes inside the picture.
   No floor on a text size inside: a floor does not shrink with the box it sits in and runs past it on a phone (the
   Creative testing source pill, «Google Sh»). Text that needs large size for contrast gets colours that pass at any size.
   Markup: <div class="frame-scale frame-scale--panel your-picture"> (--panel: the grey frame with its corners; without it the
   frame is bare, as the MCP drawing on its card), the picture's CSS sets --frame-base (and --frame-h) on it. Check it at
   the 4 : 3 phone frame (390), the 4 : 3 tablet frame (820) and the desktop square (1440): the drawing whole, with air.
   ============================================================ */
.frame-scale { container-type: size; }
/* the frame itself as a panel — the first screens' pictures (Solutions review 02.12, block map «Solutions · components» 01):
   grey, the large radius, the drawing clipped by its edge; the picture's CSS draws only what is inside */
.frame-scale--panel { position: relative; overflow: hidden; border-radius: var(--radius-xl); background: var(--color-surface); }
.theme-dark .frame-scale--panel { background: var(--color-bg-grey); }
.frame-scale > * {
  --u: min(calc(100cqi / var(--frame-base, 36)), calc(100cqb / var(--frame-h, var(--frame-base, 36))));
  --space-xxs: calc(0.25 * var(--u)); --space-xs: calc(0.5 * var(--u)); --space-sm: var(--u);
  --space: calc(1.5 * var(--u)); --space-md: calc(2 * var(--u)); --space-lg: calc(3 * var(--u)); --space-xl: calc(5 * var(--u));
  --radius-xs: calc(0.25 * var(--u)); --radius-sm: calc(0.5 * var(--u)); --radius-md: calc(0.75 * var(--u));
  --radius-lg: var(--u); --radius-xl: calc(1.5 * var(--u));
  --border-thin: calc(0.125 * var(--u)); --border-thick: calc(0.25 * var(--u));
  --text-h3-size: calc(2 * var(--u)); --text-h4-size: calc(1.5 * var(--u)); --text-h5-size: calc(1.2 * var(--u));
  --text-h6-size: var(--u); --text-para-md-size: calc(1.0625 * var(--u)); --text-para-sm-size: calc(0.875 * var(--u));
  --text-eyebrow-size: calc(0.8 * var(--u));
}
