/* SPDX-License-Identifier: AGPL-3.0-only */
/* The ofourown skin (Brand packet 1.1.3, loaded from brand/skin/tokens.css and fonts.css) mapped onto the page's own names.
   Loaded AFTER brand/tokens.css so these win; the page, the faces and the waveform keep reading their own names. No colour values
   of its own: only var(--cosmo-*) from the skin. The mouth (--mouth-*) is NOT touched here: the face is never tinted by the scheme.
   The packet's accent-warm (clay) is an ofourown-only role: fine on this page (it never loads the cosmoshot skin). */
:root {
  /* type: the person's voice (headlines, the word "lipsync") is Fraunces; the interface is Figtree; the skin's own sizes stay the page's */
  --font-display: var(--cosmo-font-family-person);
  --font-body: var(--cosmo-font-family-system);
  --font-mono: var(--cosmo-font-family-mono);

  /* shape from the skin */
  --radius-1: var(--cosmo-radius-control);
  --radius-2: var(--cosmo-radius-card);

  /* surfaces, text, links: Paper and Ink in light, Night and cream in dark, from the roles */
  --bg: var(--cosmo-color-surface);
  --surface: var(--cosmo-color-surface-raised);
  --surface-2: var(--cosmo-color-surface-sunken);
  --text: var(--cosmo-color-text);
  --muted: var(--cosmo-color-text-muted);
  --border: var(--cosmo-color-border-strong);
  --link: var(--cosmo-color-link);
  --focus: var(--cosmo-color-focus);

  /* buttons: one filled primary (Teal on Paper, Gold on Night), quiet ones on the raised surface */
  --btn-bg: var(--cosmo-color-accent-fill);
  --btn-text: var(--cosmo-color-on-accent);
  --btn-quiet-bg: var(--cosmo-color-surface-raised);
  --btn-quiet-text: var(--cosmo-color-text);
  /* the packet's disabled-text on disabled-surface is 4.14:1 in light (below AA, and lipsync's A13 caught it on the Customise labels): text-muted on the same surface is 5.44 light / 7.04 dark;
     a disabled control still reads as disabled by its sunken surface and its dashed edge, never by colour alone */
  --disabled-text: var(--cosmo-color-text-muted);
  --disabled-bg: var(--cosmo-color-disabled-surface);
  --error: var(--cosmo-color-bad);
  --error-bg: var(--cosmo-color-bad-bg);

  /* segmented controls, family edges */
  --seg-selected-bg: var(--cosmo-color-accent-fill);
  --seg-selected-text: var(--cosmo-color-on-accent);
  --plc-edge: var(--cosmo-color-product-chat, var(--cosmo-color-accent));
  --sonalon-edge: var(--cosmo-color-product-sonalon, var(--cosmo-color-accent-warm));

  /* the waveform and its handle: Teal (Gold on Night) for the played part, Clay for the playhead */
  --wave: var(--cosmo-color-accent);
  --cursor: var(--cosmo-color-accent-warm);
  --scrub-bg: var(--cosmo-color-surface-raised);
  --scrub-wave-played: var(--cosmo-color-accent-strong);
  --scrub-wave-rest: var(--cosmo-color-border-strong);
  --scrub-wave-shadow: color-mix(in srgb, var(--cosmo-color-accent) 28%, transparent);
  --scrub-boundary: var(--cosmo-color-border);
  --scrub-line: var(--cosmo-color-accent-warm);
  --scrub-knob-bg: var(--cosmo-color-accent-warm);
  --scrub-knob-ink: var(--cosmo-color-surface);
  --scrub-ring-inner: var(--cosmo-color-surface);
  --scrub-ring-outer: var(--cosmo-color-text);
  --scrub-shadow: color-mix(in srgb, var(--cosmo-color-text) 45%, transparent);
  --scrub-tip-bg: var(--cosmo-color-text);
  --scrub-tip-text: var(--cosmo-color-surface);

  /* the sound blocks keep their own pastel groups; their text follows the skin's text role */
  --v-text: var(--cosmo-color-text);
}

/* headlines are Fraunces (the person's voice); small headings and the interface stay Figtree */
h1, h2 { font-family: var(--cosmo-font-family-person); font-weight: 600; letter-spacing: -0.01em; }
.lockup-name { font-weight: 600; }

/* the logo: the packet's horizontal lockup, colour on Paper and dark on Night; the swap follows the scheme, and data-scheme wins if a host sets it */
.wm { display: block; width: auto; height: 2.25rem; max-width: 100%; }
.wm-dark { display: none; }
.wm-light { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) .wm-light { display: none; }
  :root:not([data-scheme="light"]) .wm-dark { display: block; }
}
:root[data-scheme="light"] .wm-light { display: block; }
:root[data-scheme="light"] .wm-dark { display: none; }
:root[data-scheme="dark"] .wm-light { display: none; }
:root[data-scheme="dark"] .wm-dark { display: block; }
.lockup-parent { min-height: var(--cosmo-size-target-min, 44px); display: inline-flex; align-items: center; }

/* targets: Brand's rule is 44 px for every standalone link and control (the kit's footer and plain links are 44 px from 1.1.1 on); links inside a sentence stay in the line */
.page-nav a, #more li > a, footer a { display: inline-flex; align-items: center; min-height: var(--cosmo-size-target-min); }
.toggle { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--cosmo-size-target-min); }
.toggle input { width: 1.5rem; height: 1.5rem; margin: 0; flex: none; }
.skip { display: inline-flex; align-items: center; min-height: var(--cosmo-size-target-min); }

/* no label devices on the page (Brand: honesty is a content rule, not a pill): the word "example" stays, as plain quiet text */
.tag { border: 0; border-radius: 0; background: none; padding: 0; font-weight: 400; font-style: italic; color: var(--muted); }

/* no coloured side stripes anywhere (Brand, chapter 5): the current step has a full 2 px accent border and a bold title; notes, quotes and code get a quiet full border or none */
.step.current { border-color: var(--cosmo-color-accent); box-shadow: none; }
.step.current h3 { font-weight: 700; }
.step h3 { font-weight: 500; }
.status { border: 1px solid var(--cosmo-color-border); }
.sample { border: 0; padding-left: 0; }
.code { border: 1px solid var(--cosmo-color-border); }

/* the header: the house lockup first at its normal size, then a quiet 1 px divider (border role) and the product word in Fraunces 500 on the same baseline */
.lockup { align-items: baseline; gap: var(--space-2) var(--space-4); }
.lockup-parent { align-self: center; }
.lockup-name { font-size: 1.6rem; font-weight: 500; line-height: 1.2; margin: 0; padding-inline-start: var(--space-4); border-inline-start: 1px solid var(--cosmo-color-border); }
