/* PoseSketch website, round four styles (tonal elevation). */

/* The page itself carries the paper colour and no margin. Without this the browser's default 8px body margin
   showed as a white frame round every page, which Fredrick spotted at night on 26 November 2026. */
html, body { margin: 0; background: var(--paper); }

.r4 { --screen: 100svh; container-type: inline-size; container-name: r4;
  background: var(--paper); color: var(--ink); font: 400 17px/26px var(--font-sans);
  min-width: 320px; overflow-x: clip;
  /* The browser's own smoothing keeps the type sharp, as Fredrick asked on 12 November 2026. */
  -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; text-rendering: optimizeLegibility; }
.r4 *, .r4 *::before, .r4 *::after { box-sizing: border-box; }
.r4 h1, .r4 h2, .r4 h3, .r4 p, .r4 ul { margin: 0; }
.r4 ul { padding: 0; list-style: none; }
.r4 img { display: block; max-width: 100%; }
.r4 a { color: inherit; }
.r4 :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* A container cannot restyle itself from its own query, so the page's own measures sit on this inner wrapper. */
.r4-in { --hdr: 64px; --pad: 16px; --wrap: 1240px; --plate: var(--figure-well); --primary: var(--accent); --primary-hover: var(--accent-strong); --on-primary: var(--on-accent); }
/* The day button is one switch. Deep brass is the gold-ink token with ivory text, 4.6:1 on the page, because bright brass reaches only 2.1:1
   there. Night is never touched by it, since the night accent is already bright brass at 7.2:1 on the deep green. */
.r4[data-theme="light"][data-day="deep-brass"] .r4-in, .r4-cmp-col[data-day="deep-brass"] {
  --primary: var(--gold-ink); --primary-hover: color-mix(in srgb, var(--gold-ink) 82%, var(--ink)); --on-primary: var(--on-brand); }
@container r4 (min-width: 600px) { .r4-in { --pad: 32px; --hdr: 72px; font-size: 18px; line-height: 28px; } }
@container r4 (min-width: 1024px) { .r4-in { --pad: 48px; } }

/* Each render ships as a light and a dark file, since the outfit is green by day and ivory by night. */
.r4[data-theme="light"] .art-dark, .r4[data-theme="dark"] .art-light { display: none !important; }

.r4-icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Header: one row with no rule under it, because the hero's tonal panel already marks where it ends. */
.r4-hdr { height: var(--hdr); display: flex; align-items: center; gap: var(--space-3);
  width: 100%; max-width: calc(var(--wrap) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.r4-brand { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap-min); margin-right: auto; text-decoration: none; }
.r4-brand svg { width: 32px; height: 32px; flex: none; border-radius: 8px; }
.r4-brand-word { font: 500 22px/1 var(--font-display); letter-spacing: -0.015em; }
/* The wordmark gives way below 400px, because at 390px (a standard iPhone) it squeezed the header button onto two lines. */
@container r4 (max-width: 399px) { .r4-brand-word { display: none; } .r4-brand { min-width: var(--tap-min); } }
.r4-nav { display: none; gap: var(--space-1); }
.r4-nav > a { display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 var(--space-3); border-radius: var(--radius-control);
  font: 700 16px/20px var(--font-sans); text-decoration: none; }
.r4-nav > a:hover { background: var(--plate); }
.r4-menu { display: inline-grid; place-items: center; width: var(--tap-min); height: var(--tap-min); flex: none; padding: 0; border: 0;
  border-radius: var(--radius-control); background: var(--plate); color: var(--ink); cursor: pointer; }

/* The theme switch is a filled track with an inverse thumb, so the chosen option reads by fill alone. */
.r4-seg { display: none; grid-auto-flow: column; grid-auto-columns: var(--tap-min); height: var(--tap-min); padding: 0;
  border-radius: var(--radius-control); background: var(--plate); }
.r4-seg button { display: inline-grid; place-items: center; height: 100%; padding: 0; border: 0; border-radius: var(--radius-control);
  background: transparent; color: var(--ink); cursor: pointer; }
.r4-seg button[aria-checked="true"] { background: var(--inverse); color: var(--on-inverse); }
.r4-seg .r4-icon { width: 18px; height: 18px; }
/* The full navigation needs about 1170px with its three menu buttons, so below that the menu button stands in for it
   (it showed from 1024px before the carets were added, and the items broke onto two lines between 1024 and 1170). */
@container r4 (min-width: 1180px) { .r4-nav { display: flex; } .r4-seg { display: inline-grid; } .r4-menu { display: none; } }

.r4-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--tap); padding: 0 var(--space-5);
  border: 0; border-radius: var(--radius-control); background: var(--primary); color: var(--on-primary);
  font: 700 16px/20px var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer; }
.r4 a.r4-btn { color: var(--on-primary); }
.r4-btn:hover { background: var(--primary-hover); }
.r4-hdr .r4-btn { min-height: var(--tap-min); padding: 0 var(--space-4); white-space: nowrap; flex: none; }
.r4-btn--gold, .r4 a.r4-btn--gold { background: var(--gold); color: var(--on-gold); }
.r4-btn--gold:hover { background: color-mix(in srgb, var(--gold) 82%, var(--on-brand)); }
.r4-link { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--tap-min); font: 700 16px/20px var(--font-sans);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.r4-link .r4-icon { width: 18px; height: 18px; }

/* Hero: exactly one screen. The figure stands on a tonal panel that runs off the right edge instead of
   sitting in an outlined box, so the first thing a visitor meets is the figure and not a frame. */
.r4-hero { display: flex; flex-direction: column; min-height: calc(var(--screen) - var(--hdr)); }
/* On phones the stage gives up height before the main button does, so the button clears the fold (150px above the foot) down to a 320 by 640 screen. */
.r4-stage { position: relative; flex: none; height: clamp(140px, calc(var(--screen) * 0.7 - 295px), 300px); overflow: hidden;
  background: radial-gradient(90% 75% at 50% 42%, color-mix(in srgb, var(--surface) 70%, var(--plate)) 0%, var(--plate) 72%); }
.r4[data-theme="dark"] .r4-stage { background: radial-gradient(90% 75% at 50% 42%, var(--surface-raised) 0%, var(--surface) 78%); }
.r4-stage img { position: absolute; left: 0; top: var(--space-3); width: 100%; height: calc(100% - var(--space-3)); object-fit: contain; object-position: 50% 100%; }
.r4-stage .v-tall { display: none; }
.r4-label { display: none; }
/* Spare height is shared between every part of the column, so no single gap grows into a band (N03966, N04465). */
.r4-hero-copy { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-evenly; gap: 0; padding: 0 var(--pad); }
.r4-jump { display: none; }
/* The headline and its offer stay in one block, so even spacing never pulls a heading away from its own sentence. */
.r4-lead { display: flex; flex-direction: column; gap: var(--space-4); }
.r4-h1 { font: 500 34px/40px var(--font-display); letter-spacing: -0.015em; text-wrap: balance; }
.r4-offer { max-width: 34ch; }
@container r4 (max-width: 359px) { .r4-h1 { font-size: 30px; line-height: 36px; } .r4-lead { gap: var(--space-2); } }
.r4-actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.r4-actions .r4-btn { width: 100%; }
.r4-trust { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); }
.r4-trust li { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 16px; line-height: 24px; }
.r4-trust .r4-icon { width: 18px; height: 18px; color: var(--gold-ink); }
@container r4 (min-width: 600px) {
  .r4-stage { height: calc(var(--screen) * 0.56); }
  .r4-h1 { font-size: 44px; line-height: 50px; }
  .r4-actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
  /* Each button keeps its label on one line and the row wraps instead, because on the App page three items in a
     476px column squeezed Pose a figure free and Coming soon onto two lines each. */
  .r4-actions .r4-btn, .r4-actions .r4-link { width: auto; flex: none; white-space: nowrap; }
}
@container r4 (min-width: 1024px) {
  .r4-hero { display: grid; height: calc(var(--screen) - var(--hdr)); min-height: 0;
    grid-template-columns: minmax(var(--pad), 1fr) minmax(0, 540px) minmax(0, 700px) minmax(var(--pad), 1fr); }
  .r4-hero-copy { grid-column: 2; grid-row: 1; padding: 0 var(--space-8) 0 0; }
  .r4-jump { display: flex; flex-direction: column; gap: var(--space-2); }
  .r4-jump-label { font: 700 16px/20px var(--font-sans); }
  .r4-jump ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); }
  .r4-jump a { display: flex; flex-direction: column; gap: var(--space-2); font: 400 16px/20px var(--font-sans); text-decoration: none; }
  .r4-jump-well { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-control); background: var(--plate); overflow: hidden; }
  .r4-jump-well img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
  .r4-jump a:hover span:last-child { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .r4-stage { grid-column: 3 / 5; grid-row: 1; height: auto; }
  .r4-stage img { left: var(--space-7); top: var(--space-7); width: calc(100% - 2 * var(--space-7)); height: calc(100% - var(--space-7) - 120px); }
  .r4-stage .v-tall { display: block; } .r4-stage .v-sq { display: none; }
  /* The headline takes a modest step with the screen's height and stops at 64px, since big type is not how a tall screen gets filled. */
  .r4-h1 { font-size: clamp(48px, calc(var(--screen) * 0.0625), 64px); line-height: 1.1; }
  .r4-offer { font-size: 20px; line-height: 30px; }
  /* The caption sits on the panel like a plate label in a book of studies: a name, the measured line and a way in. */
  .r4-label { position: absolute; left: var(--space-7); bottom: var(--space-6); display: flex; flex-direction: column; gap: 2px; }
  .r4-label-name { font: 500 24px/30px var(--font-display); }
  .r4-label-line { font-size: 16px; line-height: 24px; }
}

/* Sections fill one screen under the header and centre their content, as N03623 requires. */
.r4-sec { min-height: calc(var(--screen) - var(--hdr)); display: flex; flex-direction: column; justify-content: center; padding-block: var(--space-6); }
.r4-wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad);
  display: flex; flex-direction: column; gap: var(--space-5); }
.r4-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-2) var(--space-5); }
.r4-head-text { display: flex; flex-direction: column; gap: var(--space-2); }
.r4-h2 { font: 500 26px/32px var(--font-display); letter-spacing: -0.01em; text-wrap: balance; }
@container r4 (min-width: 600px) { .r4-h2 { font-size: 36px; line-height: 42px; } .r4-wrap { gap: var(--space-6); } }
@container r4 (min-width: 1024px) { .r4-sec { padding-block: clamp(24px, calc(var(--screen) * 0.05 - 6px), 48px); } }

/* Popular poses: a contact sheet of plates. Each plate is a tonal well with no line round it, and the
   label slot keeps two lines on phones so wells in one row never change height as names wrap. */
.r4-plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4) var(--space-2); }
.r4-plate { display: flex; flex-direction: column; gap: var(--space-2); text-decoration: none; }
.r4-plate-well { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-panel); background: var(--plate); overflow: hidden; }
.r4-plate-well img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 60%; }
/* By night each plate takes a faint backlight behind the figure, the same studio light the hero uses, while its edge keeps the plate tone. */
.r4[data-theme="dark"] .r4-plate-well, .r4[data-theme="dark"] .r4-jump-well {
  background: radial-gradient(75% 60% at 50% 45%, color-mix(in srgb, var(--surface-raised) 90%, var(--on-brand)) 0%, var(--surface-raised) 100%); }
.r4-plate-text { display: flex; flex-direction: column; gap: 2px; }
.r4-plate-name { font: 700 16px/20px var(--font-sans); min-height: 40px; }
.r4-plate-meta { display: none; font-size: 16px; line-height: 20px; color: var(--ink-muted); }
.r4-plate:hover .r4-plate-name { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
@container r4 (min-width: 600px) { .r4-plates { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px var(--space-4); }
  .r4-plate-name { min-height: 0; } .r4-plate-meta { display: block; } }
@container r4 (min-width: 1024px) { .r4-plates { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  /* Two rows have to fit one screen, so on a short laptop the well gives up height before the section overflows. */
  .r4-plate-well { max-height: calc((var(--screen) - var(--hdr) - 362px) / 2); } }

/* Free means free: the promise on brand green, edge to edge. The change of ground does the work the
   outlined cards used to do, and the one gold rule on the page sits here. Renders on green use the
   night file, because a day render loses its green outfit against a green panel. */
.r4-band { min-height: calc(var(--screen) - var(--hdr)); display: flex; flex-direction: column; background: var(--brand); color: var(--on-brand); }
.r4-band-copy { display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-7) var(--pad) var(--space-5); }
.r4-rule { display: block; width: var(--rule); height: 2px; background: var(--gold); }
.r4-band-head { display: flex; flex-direction: column; gap: var(--space-3); }
.r4-promise { display: flex; flex-direction: column; gap: var(--space-2); }
.r4-promise-text { font: 500 20px/26px var(--font-display); text-wrap: balance; }
.r4-note { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-radius: var(--radius-panel);
  background: color-mix(in srgb, var(--on-brand) 8%, transparent); }
.r4-h3 { font: 500 20px/26px var(--font-display); }
.r4-note p { font-size: 16px; line-height: 24px; }
.r4-sign { font: italic 500 20px/26px var(--font-display); color: var(--gold); }
.r4[data-theme="dark"] .r4-sign { color: var(--on-brand); } /* gold reaches only 3.5:1 on the night green */
.r4-free { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2) var(--space-4); }
@container r4 (min-width: 600px) { .r4-free { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.r4-free li { display: flex; align-items: flex-start; gap: var(--space-2); font-size: 16px; line-height: 24px; }
.r4-free .r4-icon { width: 18px; height: 18px; margin-top: 3px; color: var(--gold); }
.r4-band .r4-btn { align-self: flex-start; }
.r4-band-art { position: relative; flex: 1 1 auto; min-height: 280px; }
.r4-band-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
@container r4 (min-width: 600px) { .r4-promise-text, .r4-h3 { font-size: 24px; line-height: 30px; } }
@container r4 (min-width: 1024px) {
  .r4-band { display: grid; grid-template-columns: minmax(var(--pad), 1fr) minmax(0, 620px) minmax(0, 620px) minmax(var(--pad), 1fr); }
  .r4-band-copy { grid-column: 2; justify-content: space-evenly; gap: 0; padding: 0 var(--space-8) 0 0; }
  .r4-free { gap: var(--space-3) var(--space-4); }
  .r4-band-art { grid-column: 3; min-height: 0; margin-block: var(--space-7); }
  .r4-band-art img { object-position: 50% 50%; }
}

/* The button comparison sheet: the same page parts twice, with only the day button changed. */
.r4-cmp { width: 1440px; }
.r4-cmp-in { display: flex; flex-direction: column; gap: var(--space-6); padding: 56px 64px 64px; }
.r4-cmp-head { display: flex; flex-direction: column; gap: var(--space-2); max-width: 760px; }
.r4-cmp-h { font: 500 36px/42px var(--font-display); letter-spacing: -0.01em; }
.r4-cmp-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.r4-cmp-col { display: flex; flex-direction: column; gap: var(--space-4); }
.r4-cmp-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.r4-cmp-h3 { font: 500 24px/30px var(--font-display); }
.r4-cmp-measure { font: 700 16px/20px var(--font-sans); }
.r4-cmp-spec { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5) var(--space-6); border-radius: var(--radius-panel); background: var(--paper); }
.r4-cmp-spec--surface { background: var(--surface); }
.r4-cmp-spec--panel { background: var(--plate); }
.r4-cmp-label { font-size: 16px; line-height: 22px; color: var(--ink-muted); }
.r4-cmp-row { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.r4-cmp-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.r4-cmp-h1 { font: 500 44px/50px var(--font-display); letter-spacing: -0.015em; }
.r4-cmp-phone { width: 342px; display: flex; flex-direction: column; gap: var(--space-2); }
.r4-cmp-phone .r4-btn { width: 100%; }
.r4-cmp-plan { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 64px; padding: var(--space-2) var(--space-4);
  border: 0; border-radius: var(--radius-control); background: var(--primary); color: var(--on-primary); font: 700 16px/20px var(--font-sans); text-align: left; }
.r4-cmp-plan-text { display: flex; flex-direction: column; gap: 2px; }
.r4-cmp-plan-sub, .r4-cmp-plan-price { font-weight: 400; line-height: 22px; }
.r4-cmp-night { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-panel); background: #13241d; color: #f8f5ee; }
/* The night strip sets the button token itself, because the page's own button rule would otherwise put ivory on bright brass at 2.1:1. */
.r4-cmp-night { --primary: #c9a96e; --primary-hover: #d8be8c; --on-primary: #14261e; }
.r4-cmp-night .r4-cmp-h3 { color: #f8f5ee; }
.r4-cmp-night p { font-size: 16px; line-height: 22px; }

/* The notes board is a working document for the build session, so it is set as plain reading text. */
.r4-notes { background: var(--paper); color: var(--ink); font: 400 17px/26px var(--font-sans); padding: 56px 64px 64px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: var(--space-6); -webkit-font-smoothing: auto; }
.r4-notes h1, .r4-notes h2, .r4-notes p, .r4-notes ul, .r4-notes ol { margin: 0; }
.r4-notes h1 { font: 500 36px/42px var(--font-display); }
.r4-notes h2 { font: 500 24px/30px var(--font-display); }
.r4-notes section { display: flex; flex-direction: column; gap: var(--space-3); background: var(--surface-raised); border-radius: var(--radius-panel); padding: var(--space-5) var(--space-6); }
.r4-notes ul, .r4-notes ol { padding-left: 22px; display: grid; gap: var(--space-2); }
.r4-notes table { border-collapse: collapse; width: 100%; }
.r4-notes th, .r4-notes td { text-align: left; vertical-align: top; padding: var(--space-2) var(--space-4) var(--space-2) 0; font-size: 16px; line-height: 24px; }
.r4-notes th { font-weight: 700; }

/* ---------- Round four rollout, the home page (18 November 2026) ---------- */
.r4-lede { max-width: 62ch; }
/* Two sections sit on the raised surface so the long page reads in movements, not as one strip of paper. */
.r4-sec--surface { background: var(--surface); }
.r4[data-theme="dark"] .r4-sec--surface { background: var(--surface); }
.r4-btn--plate, .r4 a.r4-btn--plate { background: var(--plate); color: var(--ink); }
.r4-btn--plate:hover { background: color-mix(in srgb, var(--plate) 85%, var(--ink)); }
.r4[data-theme="dark"] .r4-btn--plate { background: var(--surface-raised); }
.r4-btn .r4-icon { width: 20px; height: 20px; }
.r4-kicker { font: 700 16px/20px var(--font-sans); color: var(--gold-ink); }
.r4[data-theme="dark"] .r4-kicker { color: var(--accent); }

/* The menu opens as a sheet under the header: the links on one card, the theme switch at its foot. */
.r4-menupanel { position: absolute; left: 0; right: 0; top: var(--hdr); z-index: 20; display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-3) var(--pad) var(--space-5); background: var(--surface); box-shadow: var(--shadow-sheet); }
.r4-menupanel[hidden] { display: none; }
.r4-in { position: relative; }
.r4 .r4-menulist { display: flex; flex-direction: column; padding: var(--space-1) var(--space-4); border-radius: var(--radius-panel); background: var(--surface-raised); }
.r4-menulist > li > a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; font: 700 16px/20px var(--font-sans); text-decoration: none; }
.r4-menulist .r4-icon { width: 18px; height: 18px; }
.r4-menufoot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.r4-menulabel { font: 700 16px/20px var(--font-sans); }
.r4 .r4-seg--menu { display: inline-grid; background: var(--surface-raised); }

/* Pose of the day: one large plate and the controls beside it, with the other seven as a small contact strip. */
.r4-pod { display: flex; flex-direction: column; gap: var(--space-5); }
.r4-podwell { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-panel); background: var(--plate); overflow: hidden; }
.r4[data-theme="dark"] .r4-podwell { background: radial-gradient(75% 60% at 50% 45%, color-mix(in srgb, var(--surface-raised) 90%, var(--on-brand)) 0%, var(--surface-raised) 100%); }
.r4-podwell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.r4-podcopy { display: flex; flex-direction: column; gap: var(--space-3); }
.r4-podname { font: 500 26px/32px var(--font-display); }
.r4-podline { font-size: 16px; line-height: 24px; }
.r4-podactions { display: flex; flex-direction: column; gap: var(--space-2); }
.r4-podmore { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-2); }
.r4-podthumb { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-control); background: var(--plate); overflow: hidden; }
.r4[data-theme="dark"] .r4-podthumb { background: var(--surface-raised); }
.r4-podthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.r4-podthumb[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--gold-ink); }
.r4[data-theme="dark"] .r4-podthumb[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
@container r4 (min-width: 600px) { .r4-podactions { flex-direction: row; } .r4-podmore { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@container r4 (min-width: 1024px) {
  .r4-pod { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-8); align-items: center; }
  .r4-podwell { aspect-ratio: auto; height: calc(var(--screen) - var(--hdr) - 200px); }
  .r4-podname { font-size: 36px; line-height: 42px; }
  .r4-podmore { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Templates: one row per use case, a render, the name and count, and the templates as tonal pills.
   Sitting is the one ready to open, so it alone takes the main colour and an arrow. */
.r4-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); font-size: 16px; line-height: 24px; }
.r4-legend span { display: inline-flex; align-items: center; gap: var(--space-2); }
.r4-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--plate); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.r4-dot--live { background: var(--primary); box-shadow: none; }
.r4-groups { display: flex; flex-direction: column; gap: var(--space-5); }
.r4-group { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.r4-groupwell { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-control); background: var(--plate); overflow: hidden; }
.r4[data-theme="dark"] .r4-groupwell { background: var(--surface-raised); }
.r4-groupwell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.r4-grouptext { display: flex; flex-direction: column; gap: var(--space-2); }
.r4-grouphead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--space-3); }
.r4-groupcount { font-size: 16px; line-height: 24px; color: var(--ink-muted); }
.r4-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.r4-pill { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-round);
  background: var(--plate); font-size: 16px; line-height: 20px; text-decoration: none; }
.r4[data-theme="dark"] .r4-pill { background: var(--surface-raised); }
.r4 .r4-pill--live, .r4[data-theme="dark"] .r4-pill--live { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.r4-pill .r4-icon { width: 16px; height: 16px; }
@container r4 (min-width: 1024px) {
  .r4-groups { gap: var(--space-2); }
  /* The render shrinks with the screen's height, so five rows of pills still fit a 768px laptop screen. */
  .r4-group { grid-template-columns: clamp(56px, calc(var(--screen) * 0.085), 96px) minmax(0, 1fr); gap: var(--space-5); align-items: center; }
  .r4-grouptext { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: var(--space-5); align-items: center; }
  .r4-grouphead .r4-h3 { font-size: 20px; line-height: 26px; }
  .r4-pills { gap: 6px; }
  /* A pill that is only a label is 40px tall; the one that opens a page keeps the 44px target. */
  .r4-pill { min-height: 40px; padding: 0 10px; }
  .r4-pill--live { min-height: 44px; }
  .r4-grouphead { flex-direction: column; }
}

/* Steps: three plates, each with its number in gold and the sentence under the title. */
.r4-steps { display: grid; gap: var(--space-5); }
.r4-step { display: flex; flex-direction: column; gap: var(--space-3); }
.r4-stepwell { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-panel); background: var(--plate); overflow: hidden; }
.r4[data-theme="dark"] .r4-stepwell { background: var(--surface-raised); }
.r4-stepwell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.r4-steptext { display: flex; flex-direction: column; gap: var(--space-1); }
.r4-stepnum { font: 500 20px/26px var(--font-display); color: var(--gold-ink); }
.r4[data-theme="dark"] .r4-stepnum { color: var(--accent); }
@container r4 (min-width: 600px) { .r4-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container r4 (min-width: 1024px) { .r4-stepwell { aspect-ratio: auto; height: calc(var(--screen) - var(--hdr) - 360px); } }

/* Quick answers and questions are kept in full for search, set as reading text on cards with no line round them. */
.r4-answers { display: grid; gap: var(--space-3); }
.r4-answer { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); border-radius: var(--radius-panel); background: var(--surface-raised); }
.r4-answer p, .r4-faqitem p { font-size: 16px; line-height: 26px; }
@container r4 (min-width: 600px) { .r4-answers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); } }
@container r4 (min-width: 1024px) { .r4-wrap--split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-8); align-items: start; } }
.r4-faq { display: grid; gap: var(--space-5); }
.r4-faqitem { display: flex; flex-direction: column; gap: var(--space-2); }
.r4-faqitem h3 { font: 700 18px/24px var(--font-sans); }
@container r4 (min-width: 600px) { .r4-faq { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-6); } }
@container r4 (min-width: 1024px) { .r4-faq { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* The closing call sits on the plate tone with a figure beside it, so the page ends on a picture, not a paragraph. */
.r4-close { display: flex; flex-direction: column; border-radius: var(--radius-panel); background: var(--plate); overflow: hidden; }
.r4[data-theme="dark"] .r4-close { background: var(--surface-raised); }
.r4-closecopy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-6) var(--space-5) var(--space-3); }
.r4-closetitle { font: 500 26px/32px var(--font-display); }
.r4-closeart { position: relative; height: 220px; }
.r4-closeart img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
@container r4 (min-width: 600px) { .r4-close { flex-direction: row; align-items: stretch; } .r4-closecopy { flex: 1; justify-content: center; padding: var(--space-6); } .r4-closeart { flex: 0 0 40%; height: auto; min-height: 240px; } .r4-closetitle { font-size: 32px; line-height: 38px; } }

/* Footer (27 November 2026): the brand block, then four even columns, so no group is pushed to the far edge and the long Generators and Legal lists
   have neighbours of a similar height. On a phone the columns pair up two by two under the brand. The legal links are a column of their own, and
   what sits under a hairline is only the credits and the copyright. Every link stays at 44px tall, which is the tap size the house rules set. */
.r4-ftr { background: var(--surface); padding-block: var(--space-7) var(--space-5); }
.r4-ftrtop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); }
.r4-ftrbrand { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--space-3); max-width: 46ch; }
.r4-ftrbrand p, .r4-ftrapp { font-size: 16px; line-height: 24px; }
/* The header hides the word under 400px to make room for its buttons, but the footer has the room, so the word stays. */
.r4-ftr .r4-brand { margin-right: 0; align-self: flex-start; }
.r4-ftr .r4-brand-word { display: block; }
.r4-ftrcol { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.r4-ftrcol h3 { font: 700 16px/20px var(--font-sans); margin-bottom: var(--space-1); }
.r4-ftrcol a, .r4-ftrcol .r4-btn-ghost { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; min-width: 44px; font: 400 16px/20px var(--font-sans); text-align: left; text-decoration: none; }
.r4-ftrcol a:hover, .r4-ftrcol .r4-btn-ghost:hover { text-decoration: underline; }
.r4-ftrbase { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-5); border-top: 1px solid var(--line); padding-top: var(--space-5); }
.r4-credits { max-width: 92ch; font-size: 16px; line-height: 26px; color: var(--ink-muted); }
.r4-copy { font-size: 16px; line-height: 24px; white-space: nowrap; }
/* On a phone the two shorter groups at the end run across the full width instead of standing in half-width columns, which keeps the footer
   from growing taller than the old one now that the legal links share the grid. */
.r4-ftrcol:nth-child(n+4) { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 0 var(--space-5); }
.r4-ftrcol:nth-child(n+4) h3 { flex: 0 0 100%; }
@container r4 (min-width: 700px) {
  .r4-ftrtop { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .r4-ftrcol:nth-child(n+4) { grid-column: auto; flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .r4-ftrcol:nth-child(n+4) h3 { flex: none; }
}
@container r4 (min-width: 1200px) {
  .r4-ftrtop { grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
  .r4-ftrbrand { grid-column: auto; }
  .r4-ftrbase { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: var(--space-7); }
}
/* On a tall screen the hero column stops at 880px and sits in the middle, so its even gaps never pass the 72px or 8 percent limit. */
@container r4 (min-width: 1024px) { .r4-hero-copy, .r4-band-copy { align-self: center; height: min(100%, 880px); } }

/* ---------- The App page (18 November 2026) ---------- */
/* The Google Play badge (27 November 2026) is Google's official file, shown whole, because its transparent border is the quarter-height clear space
   Google's guidelines ask for. --h sets the file's height, so the visible badge is 168/250 of it, and the negative left margin lines the visible
   edge up with the text above it while keeping the clear space on the other three sides. */
.r4-play { --h: 60px; display: inline-flex; flex: none; line-height: 0; margin-left: calc(var(--h) * -0.164); border-radius: 10px; }
.r4-play img { display: block; height: var(--h); width: auto; }
.r4-play:focus-visible { outline: 2px solid var(--focus, currentColor); outline-offset: -6px; }
.r4-play--hero { --h: 84px; }
.r4-ftrapp--live { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.r4-note .r4-play { margin-bottom: calc(var(--h) * -0.164); }

/* The phone is a picture of the posing tool, drawn at the app's own 390px size and scaled to fit the panel. */
.r4-stage--app { display: grid; place-items: center; }
.r4-phone { --s: 0.4; width: calc(390px * var(--s) + 16px); height: calc(844px * var(--s) + 16px); padding: 8px; border-radius: 34px; background: #14261e;
  box-shadow: 0 24px 48px #14261e33; flex: none; }
.r4[data-theme="dark"] .r4-phone { background: #0b1712; box-shadow: 0 24px 48px #00000066; }
.r4-ph-screen { position: relative; width: 390px; height: 844px; transform: scale(var(--s)); transform-origin: 0 0; border-radius: 64px; overflow: hidden;
  background: var(--viewport); font: 400 16px/22px var(--font-sans); color: var(--ink); }
.r4-ph-screen .r4-icon { width: 22px; height: 22px; }
.r4-ph-fig { position: absolute; left: 0; top: 70px; width: 390px; height: 640px; object-fit: contain; object-position: 50% 100%; }
.r4-ph-top { position: absolute; top: 18px; left: 22px; right: 18px; display: flex; align-items: center; gap: 8px; }
.r4-ph-mark { width: 28px; height: 28px; border-radius: 7px; }
.r4-ph-saved { margin-right: auto; }
.r4-ph-corners { display: flex; gap: 4px; padding: 4px; border-radius: 18px; background: var(--surface); }
.r4[data-theme="dark"] .r4-ph-corners, .r4[data-theme="dark"] .r4-ph-tray, .r4[data-theme="dark"] .r4-ph-bar { background: var(--surface-raised); }
.r4-ph-corner { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; }
.r4-ph-corner.is-on { background: var(--accent); color: var(--on-accent); }
.r4-ph-tray { position: absolute; left: 12px; right: 12px; bottom: 100px; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); }
.r4-ph-part { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; font: 500 20px/26px var(--font-display); }
.r4-ph-seg { display: flex; flex: 1; height: 48px; border-radius: 14px; background: var(--surface-raised); }
.r4[data-theme="dark"] .r4-ph-seg { background: var(--paper); }
.r4-ph-seg span { flex: 1; display: grid; place-items: center; border-radius: 14px; font-weight: 700; }
.r4-ph-seg .is-on { background: var(--inverse); color: var(--on-inverse); }
.r4-ph-bar { position: absolute; left: 12px; right: 12px; bottom: 16px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); }
.r4-ph-tool { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; font-weight: 700; }
@container r4 (min-width: 600px) { .r4-phone { --s: 0.62; } }
@container r4 (min-width: 1024px) { .r4-stage--app { align-content: center; } .r4-phone { --s: clamp(0.6, calc((var(--screen) - var(--hdr) - 120px) / 844px), 0.85); } }
.r4-hero--app .r4-stage { height: auto; padding-block: var(--space-6); }
@container r4 (min-width: 600px) { .r4-hero--app .r4-stage { height: auto; } }
@container r4 (min-width: 1024px) { .r4-hero--app .r4-stage { padding-block: 0; } }

/* Features: four plates, each with a figure, a title and the app's own line for it. */
.r4-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-3); }
.r4-feature { display: flex; flex-direction: column; gap: var(--space-2); }
.r4-feature p { font-size: 16px; line-height: 24px; }
.r4-featurewell { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius-panel); background: var(--plate); overflow: hidden; margin-bottom: var(--space-1); }
.r4[data-theme="dark"] .r4-featurewell { background: var(--surface-raised); }
.r4-featurewell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
@container r4 (min-width: 1024px) { .r4-features { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
  .r4-featurewell { aspect-ratio: auto; height: calc(var(--screen) - var(--hdr) - 330px); } }

/* Free and Pro side by side on cards, with Yearly leading in the main colour as on the approved Pro sheet. */
.r4-plangrid { display: grid; gap: var(--space-4); }
.r4-plancard { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) var(--space-5); border-radius: var(--radius-panel); background: var(--surface-raised); }
.r4-planlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-4); }
.r4-planlist li { display: flex; align-items: center; gap: var(--space-2); font-size: 16px; line-height: 24px; }
.r4-planlist .r4-icon { width: 18px; height: 18px; color: var(--gold-ink); }
.r4[data-theme="dark"] .r4-planlist .r4-icon { color: var(--accent); }
.r4-planfoot { font-size: 16px; line-height: 24px; }
.r4-planrows { display: flex; flex-direction: column; gap: var(--space-2); }
.r4-planrow { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 64px; padding: var(--space-2) var(--space-4); border-radius: var(--radius-control); background: var(--plate); }
.r4[data-theme="dark"] .r4-planrow { background: var(--surface); }
.r4-planrow--lead, .r4[data-theme="dark"] .r4-planrow--lead { background: var(--primary); color: var(--on-primary); }
.r4-planrowtext { display: flex; flex-direction: column; font-size: 16px; line-height: 22px; }
@container r4 (min-width: 600px) { .r4-plangrid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; } }
/* Both cards share one height, and each card's closing line sits at its foot, so the pair reads as one comparison. */
.r4-planfoot { margin-top: auto; }
@container r4 (max-width: 599px) { .r4-planlist { grid-template-columns: minmax(0, 1fr); } }
@container r4 (min-width: 1024px) { .r4-plangrid { gap: var(--space-6); } }
.r4-faq--two { grid-template-columns: minmax(0, 1fr); }
@container r4 (min-width: 600px) { .r4-faq--two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* The App page's hero and promise hold less than the home page's, so each column takes its content's height and sits in the middle
   of the screen, instead of spreading a few lines into wide even gaps. */
.r4-hero--app .r4-hero-copy, .r4-band--short .r4-band-copy { justify-content: center; gap: var(--space-5); }
@container r4 (min-width: 1024px) { .r4-hero--app .r4-hero-copy, .r4-band--short .r4-band-copy { height: auto; align-self: center; gap: var(--space-6); } }
/* On phones the stage keeps the home page's height, so the main button clears the fold, and shows the top of the phone rising into view. */
@container r4 (max-width: 599px) {
  .r4-hero--app .r4-stage { height: clamp(120px, calc(var(--screen) * 0.7 - 345px), 260px); padding: var(--space-4) 0 0; place-items: start center; overflow: hidden; }
  .r4-hero--app .r4-phone { --s: 0.5; }
  .r4-hero--app .r4-hero-copy { padding-block: var(--space-4); gap: 0; justify-content: space-evenly; }
  /* The headline already names the app, so the small label above it gives its line back to the main button on a phone. */
  .r4-hero--app .r4-kicker { display: none; }
  /* The longer app name takes two lines here, so the badge drops to 48 pixels of visible height (Google's minimum is 28) to clear the fold on a 375 by 667 screen. */
  .r4-hero--app .r4-play--hero { --h: 72px; }
}
@container r4 (min-width: 600px) { .r4-features { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); } }

/* ---------- Template, hub and generator pages (18 November 2026) ---------- */
/* A catalogue page opens on a short head, so the first row of figures is in view on the first screen. */
.r4-pagehead { padding-block: var(--space-6) var(--space-4); }
.r4-pagehead .r4-wrap { gap: var(--space-4); }
.r4-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); font-size: 16px; line-height: 24px; }
.r4-crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.r4-crumbs .r4-icon { width: 16px; height: 16px; color: var(--ink-muted); }
.r4-pagehead .r4-h1 { max-width: 20ch; }
.r4-pagehead .r4-offer { max-width: 60ch; }
.r4-pageactions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.r4-figseg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(88px, auto); height: var(--tap-min); border-radius: var(--radius-control); background: var(--plate); }
.r4[data-theme="dark"] .r4-figseg { background: var(--surface-raised); }
.r4-figseg button { padding: 0 var(--space-4); border: 0; border-radius: var(--radius-control); background: transparent; color: var(--ink); font: 700 16px/20px var(--font-sans); cursor: pointer; }
.r4-figseg button[aria-checked="true"] { background: var(--inverse); color: var(--on-inverse); }
.r4-count { font-size: 16px; line-height: 24px; color: var(--ink-muted); }
@container r4 (max-width: 599px) { .r4-pageactions .r4-btn { width: 100%; } }
@container r4 (min-width: 1024px) { .r4-pagehead { padding-block: var(--space-7) var(--space-5); } }

/* The pose grid: plates as on the home page, each with its measured line and a way into 3D. */
.r4-sec--flow { min-height: 0; justify-content: flex-start; }
.r4-pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-3); }
.r4-pcard { display: flex; flex-direction: column; gap: var(--space-2); }
.r4-pcardtext { display: flex; flex-direction: column; gap: 2px; }
.r4-pcardname { font: 700 16px/20px var(--font-sans); }
.r4-pcardline { font-size: 16px; line-height: 22px; color: var(--ink-muted); }
.r4-open { display: inline-flex; align-items: center; gap: var(--space-1); align-self: flex-start; min-height: 44px; font: 700 16px/20px var(--font-sans); text-decoration: none; color: var(--accent); }
.r4[data-theme="light"] .r4-open { color: var(--accent); }
.r4-open .r4-icon { width: 16px; height: 16px; }
.r4-open:hover { text-decoration: underline; text-underline-offset: 3px; }
@container r4 (min-width: 600px) { .r4-pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6) var(--space-4); } }
@container r4 (min-width: 1024px) { .r4-pgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.r4-pill--link { font-weight: 700; }
.r4-pill--link:hover { background: color-mix(in srgb, var(--plate) 85%, var(--ink)); }
.r4-related { display: flex; flex-direction: column; gap: var(--space-4); }
.r4-facts { font-size: 16px; line-height: 26px; max-width: 70ch; }
.r4-crumbs a { min-width: 44px; justify-content: center; }
.r4 .r4-pill--link { min-height: 44px; }
/* Cards in one row share a height and keep Edit in 3D on the same line, however the names and measured lines wrap. */
.r4-pcardtext { flex: 1 1 auto; }
.r4-pcard .r4-open { margin-top: auto; }
/* Hub: the templates as plates, the open one named in the main colour with an arrow, the rest marked as arriving. */
.r4-tcard { display: flex; flex-direction: column; gap: var(--space-2); text-decoration: none; }
.r4-tcardtext { display: flex; flex-direction: column; gap: 2px; }
.r4-tcardlive { display: inline-flex; align-items: center; gap: var(--space-1); font: 700 16px/22px var(--font-sans); color: var(--accent); }
.r4-tcardlive .r4-icon { width: 16px; height: 16px; }
.r4-tcard--live .r4-plate-well { box-shadow: inset 0 0 0 2px var(--accent); }
.r4-tcard--live:hover .r4-pcardname { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
@container r4 (min-width: 1024px) { .r4-pgrid--hub { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.r4-hublinks { display: grid; gap: var(--space-3); }
.r4-hublink { display: flex; align-items: center; gap: var(--space-4); min-height: 88px; padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2); border-radius: var(--radius-panel);
  background: var(--surface-raised); text-decoration: none; }
.r4-hublinkwell { position: relative; flex: none; width: 72px; height: 72px; border-radius: var(--radius-control); background: var(--plate); overflow: hidden; }
.r4[data-theme="dark"] .r4-hublinkwell { background: var(--surface); }
.r4-hublinkwell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.r4-hublinktext { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 16px; line-height: 22px; }
.r4-hublinktext b { font-weight: 700; }
.r4-hublink .r4-icon { width: 18px; height: 18px; }
@container r4 (min-width: 600px) { .r4-hublinks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container r4 (min-width: 1024px) { .r4-hublinks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Generator: one tool card, laid out like calculatorr.org's tools (Fredrick chose direction A on 26 November 2026).
   The settings sit on the left with Generate and Edit in 3D side by side where they end, because Fredrick asked that
   evening for the two buttons to sit together where the visitor finishes choosing. The answer panel on the right
   carries the pose, with the like count beside its name. On phones the two buttons sit side by side straight under
   the pose name, above the picture, so Generate clears the fold at 375 x 667 before any setting is reached. */
.r4-genwrap { display: flex; flex-direction: column; gap: var(--space-4); }
.r4-genhead { display: flex; flex-direction: column; gap: var(--space-1); }
.r4-tool { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); overflow: hidden; }
.r4-toolans { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); background: var(--accent-soft); }
.r4-anshead { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.r4-anshead .r4-heart { flex: none; }
.r4-anstext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.r4-anstext .r4-podname { font-size: 26px; line-height: 32px; }
.r4-anstext .r4-podline { color: var(--ink-muted); }
.r4-ansacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.r4-ansacts .r4-btn { width: 100%; white-space: nowrap; }
.r4-tool .r4-podwell { aspect-ratio: auto; height: clamp(220px, calc(var(--screen) * 0.34), 320px); background: radial-gradient(90% 75% at 50% 42%, var(--surface-raised) 0%, var(--surface) 80%); }
.r4[data-theme="dark"] .r4-tool .r4-podwell { background: radial-gradient(90% 75% at 50% 42%, #27352e 0%, var(--surface) 80%); }
.r4-tool .r4-podwell img { box-sizing: border-box; padding: var(--space-3); }
.r4-toolform { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); }
.r4-gengroup { display: flex; flex-direction: column; gap: var(--space-2); }
.r4-genlabel2 { font: 700 16px/20px var(--font-sans); }
.r4-toolnote { padding: 0 var(--space-4) var(--space-4); }
.r4-toolhint { display: none; margin: 0; color: var(--ink-muted); font-size: 16px; line-height: 22px; }
.r4-tool > .r4-fav-note { margin: 0 var(--space-4) var(--space-4); }
/* On phones the answer panel's box gives way, so its name row, the two buttons and the picture can stack in that order,
   and a tinted layer behind the first three rows keeps the panel's look. Each row is placed by number, because the
   tinted layer already fills those cells and would otherwise push the rows below it. */
@container r4 (max-width: 799px) {
  .r4-tool::before { content: ""; grid-column: 1; grid-row: 1 / 4; background: var(--accent-soft); }
  .r4-toolans { display: contents; }
  .r4-tool > *, .r4-toolans > * { grid-column: 1; }
  .r4-anshead { grid-row: 1; padding: var(--space-4) var(--space-4) 0; position: relative; }
  .r4-ansacts { grid-row: 2; padding: var(--space-3) var(--space-4) 0; position: relative; }
  .r4-ansacts--many > :first-child { grid-column: 1 / -1; }
  .r4-ansacts--many > :last-child:nth-child(even) { grid-column: 1 / -1; }
  .r4-tool .r4-podwell { grid-row: 3; margin: var(--space-3) var(--space-4) var(--space-4); }
  .r4-toolform { grid-row: 4; }
  .r4-toolnote { grid-row: 5; }
  .r4-tool > .r4-fav-note { grid-row: 6; }
}
/* A native select for a long list of options, drawn to match the house controls with a chevron of its own. */
.r4-select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 48px; padding: 0 44px 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-control);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2377837a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 20px 20px;
  color: var(--ink); font: 400 16px/20px var(--font-sans); cursor: pointer; }
.r4-select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.r4-chiplist { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.r4-chiplist[hidden] { display: none; }
.r4-chipbtn { min-height: 44px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-round); background: var(--plate); color: var(--ink); font: 400 16px/20px var(--font-sans); cursor: pointer; }
.r4[data-theme="dark"] .r4-chipbtn { background: var(--surface-raised); }
.r4 .r4-chipbtn[aria-pressed="true"] { background: var(--inverse); color: var(--on-inverse); font-weight: 700; }
/* A segmented tray for two to four short options, like calculatorr's tip buttons. */
.r4 .r4-tray { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); }
.r4 .r4-tray .r4-chipbtn { width: 100%; min-width: 0; padding: 0 6px; border-radius: 10px; background: transparent; color: var(--ink-muted); font: 700 16px/20px var(--font-sans); white-space: nowrap; }
.r4 .r4-tray .r4-chipbtn[aria-pressed="true"] { background: var(--surface-raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.r4-recent { display: grid; grid-template-columns: repeat(4, 64px); gap: var(--space-2); }
@container r4 (max-width: 599px) {
  .r4 .r4-tray { grid-template-columns: repeat(var(--np), minmax(0, 1fr)); }
  .r4 .r4-tray .r4-chipbtn { font-size: 15px; }
}
@container r4 (min-width: 800px) {
  .r4-tool { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto 1fr auto; }
  .r4-toolans { grid-column: 2; grid-row: 1 / 4; padding: var(--space-5) var(--space-6); }
  .r4-toolform { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px var(--space-4); padding: 20px var(--space-6) 0; align-content: start; }
  .r4-toolform > * { grid-column: 1 / -1; }
  .r4-toolform > .r4-gengroup:has(> .r4-tray[data-half]) { grid-column: auto; }
  .r4-ansacts { grid-column: 1; grid-row: 2; padding: var(--space-4) var(--space-6) var(--space-5); }
  .r4-toolnote { grid-column: 1; grid-row: 3; align-self: end; padding: 0 var(--space-6) var(--space-5); }
  .r4-anstext .r4-podname { font-size: 30px; line-height: 36px; }
  .r4-tool .r4-podwell { height: clamp(240px, calc(var(--screen) - var(--hdr) - 440px), 440px); }
  .r4-toolhint { display: block; }
  .r4-tool > .r4-fav-note { grid-column: 1 / -1; grid-row: 4; margin: 0 var(--space-6) var(--space-4); }
  .r4-genhead .r4-offer { max-width: 80ch; }
}
/* Home templates: one card per use case with a two-column list (Fredrick chose direction A on 26 November 2026). */
.r4-ucols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.r4-ucol { display: contents; }
.r4-ucard { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); padding: var(--space-2) var(--space-2) var(--space-3); }
.r4-uhead { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); border-radius: 16px; color: inherit; text-decoration: none; }
.r4-uhead:hover { background: color-mix(in srgb, var(--surface) 92%, var(--ink)); }
.r4-uhead > .r4-icon { margin-left: auto; width: 20px; height: 20px; color: var(--ink-muted); flex: none; }
.r4-uthumb { position: relative; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: var(--plate); flex: none; }
.r4-uthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.r4-utext { display: flex; flex-direction: column; min-width: 0; }
.r4-uname { margin: 0; font: 500 20px/26px var(--font-display); }
.r4-ucount { color: var(--ink-muted); font-size: 16px; line-height: 22px; }
.r4-ulist { list-style: none; margin: var(--space-1) 0 0; padding: 0 var(--space-2); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-3); font-size: 16px; line-height: 20px; }
.r4-ul { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 44px; height: 100%; padding: 6px 4px; box-sizing: border-box; border-bottom: 1px solid var(--line); color: var(--ink-muted); text-decoration: none; }
.r4-ul--live { color: var(--ink); font-weight: 700; }
.r4-ul--live .r4-icon { width: 16px; height: 16px; color: var(--gold-ink); flex: none; }
.r4[data-theme="dark"] .r4-ul--live .r4-icon { color: var(--accent); }
.r4-ul em { font-style: normal; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); flex: none; }
@container r4 (min-width: 600px) { .r4-uthumb { width: 64px; height: 64px; } .r4-uname { font-size: 22px; line-height: 28px; } }
@container r4 (min-width: 1024px) { .r4-ucols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); } .r4-ucol { display: flex; flex-direction: column; gap: var(--space-5); } }
/* Photo first (Fredrick, 25 November 2026): the photo fills the same box as the 3D picture, so nothing moves. */
.r4-pose-stage [hidden] { display: none; }
.r4-photo-note { margin: var(--space-2) 0 0; font-size: 16px; line-height: 24px; color: var(--ink-muted); }
.r4-sec .r4-photo-note { margin: 0 0 var(--space-3); }
/* A settings row that does not apply to the picture on screen, such as the study views beside a photo. */
.r4-set-row[hidden] { display: none; }
/* The home strip's Human / 3D model toggle: each plate carries both pictures and shows one. */
.r4-plates .v-human, .r4-plates .v-3d { display: contents; }
.r4-plates[data-view="human"] .v-3d, .r4-plates[data-view="3d"] .v-human { display: none; }
.r4-pgrid[data-view="photo"] .has-photo .art-light,
.r4-pgrid[data-view="photo"] .has-photo .art-dark { display: none !important; }
.r4-pgrid:not([data-view="photo"]) .r4-photo { display: none; }
.r4-plate-well .r4-photo { object-position: 50% 50%; }
/* Long labels wrap instead of running off a phone screen (the Random ... pose buttons, credit links and source addresses). */
.r4-btn { white-space: normal; text-align: center; max-width: 100%; padding-block: var(--space-1); }
/* On a phone the hub's random button says Random pose, since the label just above it already names the topic and the
   full name broke onto two lines. */
@container r4 (max-width: 599px) { .r4-narrow-hide { display: none; } }
/* The pose-it-yourself card takes one cell of the card grid, about 165px wide on a phone and 193px on a laptop, where
   Pose a figure free broke onto two or three lines. So its button uses the header's shorter Open the tool, which fits
   on one line at every size, and fills the card's width. */
.r4-cta .r4-btn { width: 100%; padding-inline: var(--space-3); white-space: nowrap; }
@container r4 (max-width: 599px) { .r4-cta .r4-card-box { padding: var(--space-3); } }
.r4-card-box a, .r4-prose a { overflow-wrap: anywhere; }
/* Inline links in the price note keep their look and spacing but reach 44 by 44 pixels to tap: the padding grows the hit area and the negative margin gives the space back, so no line moves. */
.r4-prose a.r4-tap { padding: 12px 6px; margin: -12px -6px; }
.r4-cards-list > li { min-width: 0; }
/* Links in the legal pages' lists and tables get a 44px tall tap area without moving the text: the padding makes the
   target and the matching negative margin keeps the line where it was. */
.r4-prose li a, .r4-prose th a, .r4-prose td a { display: inline-block; min-width: var(--tap-min); padding-block: 12px; margin-block: -12px; }
/* Links that stand alone in a list (the legal pages' contents and the citations' model credits) get a 44px tap target. */
.r4-prose nav li > a, .r4-card-box li > a { display: inline-flex; align-items: center; min-height: var(--tap-min); max-width: 100%; }
/* Before launch the App page's main call is a status, not a link, so it keeps the button's shape but takes no pointer. */
.r4-btn--soon { cursor: default; }

/* ---------- Site additions: story films, Pro chip, in-place generators, pose settings, legal/pro/citations ---------- */
.r4-pro-chip { display: inline-block; padding: 2px 8px; border-radius: var(--radius-round); background: var(--surface-raised); color: var(--ink); font-size: 16px; line-height: 20px; font-weight: 700; margin-right: 6px; }
/* The Pro label stays on every Pro tile on phones too, where the plates otherwise hide their second line, because a tile that shows a Pro pose must say so (D11). */
.r4-plate-meta:has(.r4-pro-chip) { display: block; }
/* The padlock and Pro mark on a pose the web tool keeps for Pro (scripts/pro-locks.mjs). The badge sits in the corner of the
   picture, the mark sits inside the Edit in 3D link. */
.r4-lock { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.r4-lockbadge { position: absolute; top: 8px; left: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 8px; border-radius: var(--radius-round); background: var(--gold); color: var(--on-gold); font-size: 16px; line-height: 20px; font-weight: 700; pointer-events: none; }
.r4-lockmark { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; padding: 2px 8px 2px 6px; border-radius: var(--radius-round); background: var(--gold); color: var(--on-gold); font-size: 16px; line-height: 20px; font-weight: 700; }
/* In the two-button rows of the generators the mark must not push the button's words out of a narrow phone: it gives up its padlock below 420px (the badge on the picture keeps both) and the button trims its padding. */
.r4-ansacts .r4-btn:has(.r4-lockmark) { gap: 4px; }
.r4-ansacts .r4-lockmark { margin-right: 0; }
@media (max-width: 420px) { .r4-ansacts .r4-btn:has(.r4-lockmark) { padding-inline: var(--space-2); } .r4-ansacts .r4-lockmark .r4-lock { display: none; } .r4-ansacts .r4-lockmark { padding: 2px 8px; } }
.r4-film-stage { position: relative; width: 100%; height: 100%; min-height: 260px; overflow: hidden; }
.r4-film-stage video.film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }
.r4-film-stage video.film.is-on { opacity: 1; }
.r4-film-box { position: relative; border-radius: var(--radius-panel); background: var(--plate); overflow: hidden; aspect-ratio: 16 / 9; }
.r4[data-theme="dark"] .r4-film-box { background: var(--surface-raised); }
.r4-film-box video.film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.r4-film-box video.film.is-on { opacity: 1; }
.r4-scene-pause { position: absolute; right: var(--space-3); bottom: var(--space-3); z-index: 3; width: var(--tap-min); height: var(--tap-min); border: 0; border-radius: var(--radius-round); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); display: grid; place-items: center; cursor: pointer; }
.r4[data-theme="dark"] .r4-scene-pause { background: var(--surface-raised); }
.r4-scene-pause span { display: block; width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.r4-scene-pause[aria-pressed="true"] span { width: 0; height: 0; border-left: 12px solid currentColor; border-right: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 2px; }

/* In-place topic generator on template & hub pages */
.r4-rand { display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-5); border-radius: var(--radius-panel); background: var(--surface); }
.r4-rand-well { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-panel); background: var(--plate); overflow: hidden; }
.r4[data-theme="dark"] .r4-rand-well { background: radial-gradient(75% 60% at 50% 45%, color-mix(in srgb, var(--surface-raised) 90%, var(--on-brand)) 0%, var(--surface-raised) 100%); }
.r4-rand-well img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.r4-rand-copy { display: flex; flex-direction: column; gap: var(--space-3); justify-content: center; }
.r4-rand-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
@container r4 (min-width: 1024px) {
  .r4-rand { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-7); align-items: center; padding: var(--space-6); }
}

/* Single pose page interactive settings */
.r4-pose-stage { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-panel); background: var(--plate); overflow: hidden; }
.r4[data-theme="dark"] .r4-pose-stage { background: radial-gradient(75% 60% at 50% 45%, color-mix(in srgb, var(--surface-raised) 90%, var(--on-brand)) 0%, var(--surface-raised) 100%); }
.r4-pose-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.r4-settings { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius-panel); background: var(--surface); }
.r4-set-row { display: flex; flex-direction: column; gap: var(--space-2); }
.r4-set-label { font: 700 16px/20px var(--font-sans); }
.r4-seg-wrap { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.r4-seg-btn { min-height: var(--tap-min); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-control); background: var(--plate); color: var(--ink); font: 700 16px/20px var(--font-sans); cursor: pointer; }
.r4[data-theme="dark"] .r4-seg-btn { background: var(--surface-raised); }
.r4-seg-btn[aria-pressed="true"], .r4-seg-btn[aria-checked="true"],
.r4[data-theme="dark"] .r4-seg-btn[aria-pressed="true"], .r4[data-theme="dark"] .r4-seg-btn[aria-checked="true"] { background: var(--inverse); color: var(--on-inverse); }
.r4-cam-ctrl { display: flex; align-items: center; gap: var(--space-3); }
.r4-cam-ctrl input[type="range"] { flex: 1; min-height: var(--tap-min); accent-color: var(--primary); cursor: pointer; }
.r4-cam-btn { width: var(--tap-min); height: var(--tap-min); flex: none; border: 0; border-radius: var(--radius-control); background: var(--plate); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.r4[data-theme="dark"] .r4-cam-btn { background: var(--surface-raised); }
.r4-cam-btn:disabled { opacity: 0.4; cursor: default; }

/* Generator extras */
.r4-gen-controls { display: flex; flex-direction: column; gap: var(--space-4); }
.r4-gen-range { display: flex; align-items: center; gap: var(--space-3); }
.r4-gen-range input[type="range"] { flex: 1; min-height: var(--tap-min); accent-color: var(--primary); }
.r4-gen-overlay { position: relative; }
.r4-gen-overlay svg.r4-op-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Legal, citations and Pro pages inside .r4 */
.r4-prose { display: flex; flex-direction: column; gap: var(--space-4); max-width: 70ch; }
.r4-prose h2 { font: 500 26px/32px var(--font-display); margin-top: var(--space-4); }
.r4-prose h3 { font: 700 18px/24px var(--font-sans); margin-top: var(--space-2); }
.r4-prose ul, .r4-prose ol { padding-left: 22px; display: grid; gap: var(--space-2); list-style: disc; }
.r4-prose ol { list-style: decimal; }
.r4-cards-list { display: grid; gap: var(--space-4); }
@container r4 (min-width: 600px) { .r4-cards-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container r4 (min-width: 1024px) { .r4-cards-list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.r4-card-box { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); border-radius: var(--radius-panel); background: var(--surface-raised); }
.r4-btn-ghost { background: transparent; border: 0; color: inherit; font: 700 16px/20px var(--font-sans); min-height: var(--tap-min); padding: 0; cursor: pointer; text-decoration: underline; }
.r4-plate-well--cap { position: relative; }
.r4-plate-well--cap img { padding-bottom: 0; }

/* Hearts (Favourites, synced via localStorage posesketch:favourites:v1) */
.r4-card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: auto; }
/* A like count shares the card foot with Edit in 3D, so the link never wraps, and on a narrow two-column phone card
   the arrow gives way first, which keeps both on one line up to a four-character count such as 1.2k. */
.r4-card-foot { container: r4foot / inline-size; gap: var(--space-1); }
.r4-card-foot .r4-open { white-space: nowrap; }
.r4-card-foot .r4-heart.r4-heart--n { gap: 4px; padding-inline: 6px 8px; }
@container r4foot (max-width: 200px) { .r4-card-foot .r4-open svg { display: none; } }
.r4-heart { display: inline-grid; place-items: center; min-width: var(--tap-min); min-height: var(--tap-min); padding: 0; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--ink-muted); cursor: pointer; }
.r4-heart:hover { background: var(--plate); color: var(--ink); }
.r4-heart[aria-pressed="true"] { color: var(--accent); }
.r4-heart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.r4-heart[aria-pressed="true"] svg { fill: currentColor; }
/* Like counts (shown from the first like). The button keeps its 44px target and grows sideways to fit the number,
   so a card foot or page action row never changes height when a count arrives. */
.r4-heart.r4-heart--n { grid-auto-flow: column; gap: 6px; padding-inline: 10px 12px; }
.r4-heart-n { font: 700 15px/1 var(--font-sans); font-variant-numeric: tabular-nums; color: inherit; }
.r4-heart-n[hidden] { display: none; }
/* Turnstile only shows itself when a visitor must click to prove they are human, so its box sits out of the way. */
.r4-ts { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; }
.r4-fav-note { font-size: 16px; line-height: 24px; color: var(--ink-muted); padding: var(--space-3) var(--space-4); border-radius: var(--radius-control); background: var(--surface-raised); }
.r4-fav-note a { font-weight: 700; }

/* QA fixes: 44x44 tap targets on podthumb buttons, numeric chips, template-index headings, and generator/pose-page fold */
button.r4-podthumb { width: 100%; min-width: var(--tap-min); min-height: var(--tap-min); border: 0; padding: 0; cursor: pointer; }
.r4-chipbtn { min-width: var(--tap-min); }
.r4-h3 a { display: inline-flex; align-items: center; min-height: var(--tap-min); }
@container r4 (max-width: 599px) {
  .r4-gen.r4-sec { padding-block: var(--space-3); justify-content: flex-start; }
  .r4-genwrap { gap: var(--space-2); }
  .r4-genhead .r4-h1 { font-size: 28px; line-height: 34px; }
  .r4-genhead .r4-offer { font-size: 16px; line-height: 22px; }
}

/* ---------- Round five (Fredrick, 26 November 2026) ----------
   The designer's boards answer the brief of the same day, and the rules below are their r5-site.css as built.
   Green marks three things on a page: the brand mark, the one main action and one feature band. Reading
   surfaces and figure plates are neutral, which is what lets the clay figure stand out. By day the page already
   worked that way, so only the header button changes. By night the surfaces are the green-black values in
   tokens.css. */
/* One filled button per screen: the header's Open the tool becomes tonal, so the page's own main button is the
   only filled one in view. It keeps its 44px height and its words. */
.r4 .r4-hdr a.r4-btn { background: var(--surface-raised); color: var(--ink); }
.r4 .r4-hdr a.r4-btn:hover { background: color-mix(in srgb, var(--surface-raised) 85%, var(--ink)); }
/* Night plates take a soft backlight behind the figure, so the clay figure (#CFC8BF) and its slate outfit stand
   clear of the near-black ground. */
.r4[data-theme="dark"] .r4-podwell, .r4[data-theme="dark"] .r4-plate-well, .r4[data-theme="dark"] .r4-jump-well {
  background: radial-gradient(75% 60% at 50% 45%, #27352e 0%, var(--figure-well) 100%); }

/* The hero shows the film whole, at its own 16:9 shape and with no shadow (round four keeps shadows for floating
   chrome), as a finished piece of work made in the tool. Nothing at its edges is cut off, and the pause control
   sits in the caption row, where it can never cover the watermark. */
.r5-hero { min-height: calc(var(--screen) - var(--hdr)); display: flex; flex-direction: column; justify-content: center; padding-block: var(--space-5) var(--space-6); }
.r5-hero-in { width: 100%; max-width: calc(var(--wrap) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
.r5-copy { display: flex; flex-direction: column; gap: var(--space-5); }
.r5-copy .r4-lead { display: flex; flex-direction: column; gap: var(--space-3); }
.r5-film { margin: 0; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.r5-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-panel); overflow: hidden; background: var(--viewport); }
.r5-frame picture { display: contents; }
.r5-frame img, .r5-frame video.film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.r5-frame video.film { opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }
.r5-frame video.film.is-on { opacity: 1; }
/* At night the dark films sit on the same green-black as the page, so without an edge the frame vanishes and the
   props it clips look cut by nothing. A hairline in the night line colour restores the window. By day the film's
   ivory already reads as a tone of its own against the page. */
.r4[data-theme="dark"] .r5-frame::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 16%, transparent); }
/* On phones the hero switches to the tall cut of the film, shown whole like the landscape one, because at 16:9 the
   film is only about 358px wide and the figures shrink to a strip. The cut is 4:5, not the full 9:16 take: at 9:16
   the film stood about 610px tall and the first screen of a short phone showed only the empty band above the
   figures, so the encoder trims that band and the figures arrive sooner (round five review, 26 November 2026). */
@container r4 (max-width: 599px) { .r5-hero .r5-frame { aspect-ratio: 4 / 5; } }
.r5-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 44px; }
.r5-cap { font-size: 16px; line-height: 22px; color: var(--ink-muted); margin: 0; }
.r5-pause.r4-scene-pause { position: static; flex: none; box-shadow: none; background: var(--surface-raised); }
.r5-pause.r4-scene-pause:hover { background: color-mix(in srgb, var(--surface-raised) 85%, var(--ink)); }
/* Below laptop width the headline and the main button come first, so the call to action is always above the
   fold, and the film follows as the proof before the three checks. The copy column dissolves into the grid so the
   film can sit between its parts. */
@container r4 (max-width: 1023px) {
  .r5-copy { display: contents; }
  .r5-copy .r4-lead { order: 1; } .r5-copy .r4-actions { order: 2; } .r5-hero .r5-film { order: 3; } .r5-copy .r4-trust { order: 4; }
}
@container r4 (min-width: 1024px) {
  .r5-hero { height: calc(var(--screen) - var(--hdr)); min-height: 0; padding-block: clamp(24px, calc(var(--screen) * 0.05 - 6px), 48px); }
  .r5-hero-in { grid-template-columns: minmax(0, 8fr) minmax(0, 16fr); gap: var(--space-8); align-items: center; height: 100%; }
  .r5-copy { gap: var(--space-6); }
}
/* The five use-case tiles moved out of the hero to the top of the popular poses section, with their words unchanged. */
.r5-jump { margin-bottom: var(--space-6); }

/* The film sections below the poses (the home page and the hubs): the film whole and no wider than its own 960
   pixels, so it never softens, with the copy beside it on wide screens. */
.r5-lower { padding-block: var(--space-7); }
.r5-lower-in { width: 100%; max-width: calc(var(--wrap) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); box-sizing: border-box;
  display: grid; gap: var(--space-5); align-items: center; }
.r5-lower .r5-film { width: 100%; max-width: 960px; justify-self: center; }
@container r4 (min-width: 1024px) {
  .r5-lower { padding-block: var(--space-8); }
  .r5-lower-in { grid-template-columns: minmax(0, 7fr) minmax(0, 17fr); gap: var(--space-8); }
}

/* Legal tables (cookies and privacy). These rules lived in site.css, which the round four pages no longer load, so on
   a phone the tables ran past the screen's edge and .r4 clipped their right-hand columns. On a phone each row becomes
   a small card with its column names shown as labels, and on wider screens the table keeps its grid. */
.r4 .policy-table { margin: var(--space-3) 0 var(--space-4); max-width: 100%; }
.r4 .policy-table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 24px; }
.r4 .policy-table th, .r4 .policy-table td { border: 1px solid var(--line); padding: var(--space-2) var(--space-3); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.r4 .policy-table thead th { background: var(--surface-raised); }
@container r4 (max-width: 700px) {
  .r4 .policy-table table, .r4 .policy-table tbody, .r4 .policy-table tr, .r4 .policy-table th, .r4 .policy-table td { display: block; }
  .r4 .policy-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .r4 .policy-table tr { margin: 0 0 var(--space-3); padding: var(--space-2) 0; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface-raised); }
  .r4 .policy-table th, .r4 .policy-table td { border: 0; padding: var(--space-1) var(--space-4); }
  .r4 .policy-table td::before { content: attr(data-label); display: block; font-weight: 600; color: var(--ink-muted); }
}

/* The changelog (/changelog/): one column of release cards, so each date and its list read straight down, with bullets
   restored inside the cards because the page reset removes them, and room between its three headed sections. */
.r4-changelog { display: flex; flex-direction: column; gap: var(--space-5); }
.r4-changelog .r4-h2 { margin-top: var(--space-5); }
@container r4 (min-width: 600px) { .r4-changelog .r4-cards-list--1 { grid-template-columns: minmax(0, 1fr); } }
.r4-changelog .r4-card-box ul { padding-left: 22px; list-style: disc; display: grid; gap: var(--space-2); }
.r4-changelog .r4-card-box h3 { font: 700 18px/24px var(--font-sans); }
.r4-changelog ol { padding: 0; list-style: none; }

/* ---------- Pose page hero (Fredrick, 27 November 2026) ----------
   The picture used to sit in a square box capped at 460px inside a column twice that wide, which left a wide
   empty gap beside it and pushed the controls to the far edge. Now the picture is portrait (3:4, the shape of the
   photos, so nothing is letterboxed), the first column is exactly as wide as the picture, and the title, intro, main
   button and controls stack beside it. On a phone the order is title, main button, picture, intro, controls, so the
   button is on the first screen and the picture starts right under it. */
.r4-ph { padding-block: var(--space-4) var(--space-6); }
.r4-ph-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4);
  grid-template-areas: "head" "cta" "stage" "intro" "controls"; align-items: start; }
.r4-ph-head { grid-area: head; display: flex; flex-direction: column; gap: var(--space-2); }
.r4-ph-head .r4-h1 { max-width: none; font-size: 30px; line-height: 36px; }
.r4-ph-stage { grid-area: stage; width: 100%; max-height: none; }
.r4-ph-intro { grid-area: intro; max-width: 60ch; }
.r4-ph-cta { grid-area: cta; }
.r4-ph-controls { grid-area: controls; }
.r4-set-row--picture .r4-photo-note { margin: 0; }
/* The page's name is the heading just below, so on a phone the trail stops at the parent and saves a line. */
@container r4 (max-width: 599px) {
  .r4-ph-head .r4-crumbs > .r4-icon:last-of-type, .r4-ph-head .r4-crumbs > span[aria-current] { display: none; }
  .r4-ph-cta { flex-wrap: nowrap; }
  .r4-ph-cta .r4-btn { flex: 1 1 auto; width: auto; }
}
.r4-set-facts { color: var(--ink-muted); }
@container r4 (min-width: 600px) {
  .r4-ph { padding-block: var(--space-5) var(--space-7); }
  .r4-ph-head .r4-h1 { font-size: 40px; line-height: 46px; }
  .r4-ph-stage { max-width: 480px; margin-inline: auto; }
}
/* From 720px the picture and the page's words sit side by side. The picture's width is the smaller of 42% of the
   row and what the first screen has room for (screen height minus the header and the toolbar allowance, times the
   3:4 shape), so on a short laptop the whole figure is above the fold and on a tall screen it simply fills its column. */
@container r4 (min-width: 720px) {
  .r4-ph-grid { --stage-w: min(42%, calc((var(--screen) - var(--hdr) - 150px) * 0.75));
    grid-template-columns: var(--stage-w) minmax(0, 1fr); column-gap: var(--space-6);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas: "stage head" "stage intro" "stage cta" "stage controls"; }
  .r4-ph-stage { max-width: none; margin-inline: 0; }
  .r4-ph-head .r4-h1 { font-size: clamp(34px, calc(var(--screen) * 0.05), 52px); line-height: 1.1; }
  .r4-ph-controls { padding: var(--space-4) var(--space-5); }
}
/* The panel only lays its rows out in two columns, with the picture note beside its buttons, when the column
   beside the picture is wide enough (from 1024px); narrower, the rows simply stack. */
@container r4 (min-width: 1024px) {
  .r4-ph-controls { gap: var(--space-3) var(--space-5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r4-ph-controls > * { min-width: 0; }
  .r4-set-row--picture, .r4-set-row--figure, .r4-set-facts, .r4-ph-controls .r4-fav-note { grid-column: 1 / -1; }
  .r4-set-row--picture { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-5); align-items: start; }
  .r4-set-row--picture .r4-set-label { grid-column: 1 / -1; margin-bottom: var(--space-2); }
}
@container r4 (min-width: 1024px) { .r4-ph { padding-block: var(--space-5) var(--space-7); } .r4-ph-grid { column-gap: var(--space-7); } }

/* The angle sheet and card grids no longer shrink their pictures to fit a first screen, because that rule is
   meant for the home page's two rows of plates, and here it left each figure small inside a wide empty column. */
.r4-pgrid .r4-plate-well { max-height: none; }

/* ---------- Mega menus (Fredrick, 27 November 2026) ----------
   Three buttons in the header (Popular poses, Templates, Pose generator) each open one sheet under the header that
   lists every page they lead to. The sheet is a raised card on the page, with the same chips and 44px targets as
   the rest of the site. Below 1024px the header shows the menu button instead and the same lists open as
   accordions inside the phone sheet. */
.r4-nav-item { display: flex; align-items: center; }
.r4-nav-btn { display: inline-flex; align-items: center; gap: 2px; min-height: var(--tap-min); padding: 0 var(--space-2) 0 var(--space-3); border: 0; border-radius: var(--radius-control);
  background: transparent; color: var(--ink); font: 700 16px/20px var(--font-sans); cursor: pointer; }
.r4-nav-btn:hover, .r4-nav-btn[aria-expanded="true"] { background: var(--plate); }
.r4-nav-caret { width: 18px; height: 18px; transition: transform .15s ease; }
.r4-nav-btn[aria-expanded="true"] .r4-nav-caret { transform: rotate(180deg); }
.r4-mega { position: absolute; left: 0; right: 0; top: calc(var(--hdr) - 6px); z-index: 30; padding: 0 var(--pad); }
.r4-mega[hidden] { display: none; }
.r4-mega-in { max-width: var(--wrap); margin-inline: auto; padding: var(--space-5) var(--space-6) var(--space-4); border-radius: var(--radius-panel);
  background: var(--surface); box-shadow: 0 14px 36px #14261e29; max-height: calc(100svh - var(--hdr) - 24px); overflow-y: auto; }
.r4[data-theme="dark"] .r4-mega-in { background: var(--surface-raised); }
.r4-mega-cols { display: grid; gap: var(--space-5) var(--space-6); }
.r4-mega-cols--tpl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r4-mega-cols--poses { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r4-mega-col { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.r4-mega-col:nth-child(1) { grid-row: span 1; }
.r4-mega-head { display: flex; flex-direction: column; align-items: flex-start; gap: 0; font: 500 20px/26px var(--font-display); text-decoration: none; }
a.r4-mega-head:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.r4-mega-n { font: 400 16px/24px var(--font-sans); color: var(--ink-muted); }
.r4-mega-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.r4-mega-chips a { display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 var(--space-3); border-radius: var(--radius-round);
  background: var(--plate); font: 400 16px/20px var(--font-sans); text-decoration: none; }
.r4[data-theme="dark"] .r4-mega-chips a { background: color-mix(in srgb, var(--surface-raised) 80%, var(--ink)); }
.r4-mega-chips a:hover { background: color-mix(in srgb, var(--plate) 82%, var(--ink)); }
.r4[data-theme="dark"] .r4-mega-chips a:hover { background: color-mix(in srgb, var(--surface-raised) 65%, var(--ink)); }
.r4-mega-gens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1) var(--space-6); }
.r4-mega-gen { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: var(--space-2) var(--space-3); margin-inline: calc(var(--space-3) * -1); border-radius: var(--radius-control); text-decoration: none; }
.r4-mega-gen:hover { background: var(--plate); }
.r4[data-theme="dark"] .r4-mega-gen:hover { background: color-mix(in srgb, var(--surface-raised) 80%, var(--ink)); }
.r4-mega-gen b { font: 700 16px/22px var(--font-sans); }
.r4-mega-gen span { font: 400 16px/22px var(--font-sans); color: var(--ink-muted); }
.r4-mega-foot { display: flex; margin-top: var(--space-4); padding-top: var(--space-2); border-top: 1px solid var(--line); }
.r4-mega-all { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--tap-min); font: 700 16px/20px var(--font-sans); color: var(--accent); text-decoration: none; }
.r4-mega-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.r4-mega-all .r4-icon { width: 16px; height: 16px; }
/* Phone sheet: the three lists are accordions. Only the sheet scrolls, never the page behind it. */
.r4-menupanel { max-height: calc(100svh - var(--hdr)); overflow-y: auto; overscroll-behavior: contain; }
.r4-acc summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; font: 700 16px/20px var(--font-sans); cursor: pointer; list-style: none; }
.r4-acc summary::-webkit-details-marker { display: none; }
.r4-acc[open] .r4-nav-caret { transform: rotate(180deg); }
.r4-acc-body { display: flex; flex-direction: column; gap: var(--space-4); padding-bottom: var(--space-3); }
.r4-acc-group { display: flex; flex-direction: column; gap: var(--space-2); }
.r4-acc-body .r4-mega-gens { grid-template-columns: minmax(0, 1fr); gap: 0; }
.r4-acc-body .r4-mega-gen { margin-inline: 0; padding-inline: 0; }
.r4-acc-body .r4-mega-chips a { background: var(--surface); }
.r4[data-theme="dark"] .r4-acc-body .r4-mega-chips a { background: color-mix(in srgb, var(--surface-raised) 80%, var(--ink)); }
@container r4 (min-width: 1180px) { .r4-menupanel { display: none; } }

@container r4 (min-width: 1024px) { .r4-set-row--figure .r4-seg-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .r4-set-row--figure .r4-seg-btn { text-align: center; } }
.r4[data-theme="dark"] .r4-mega-in { box-shadow: 0 14px 36px #0000008c; }
.r4-nav-btn, .r4-nav > a { white-space: nowrap; }
