/*
 * p13n.css — the Personalizer's public variables (--p13n-*) filled from the shop's tokens
 * (docs/spec.md K2, A4). Loaded right after tokens.css, on the :root, so the values also reach
 * the component's shadow root by inheritance.
 *
 * Source: the Personalizer docs/integration-web.md "Tokenek bekötése" (the pairing, in its
 * order), and packages/ui/README.md "Témázás" (the full name list) for the names the website's
 * pairing leaves to the component's fallback while the shop has the matching ADR-0009 token:
 * the focus ring, the weights, line heights and letter spacings of the type steps, the spacing
 * steps, and the sticky bar's bleed (marked "README"). Personalizer 0.1.0, commit e893c75.
 *
 * The pairs are declared on the :root and again on every [data-tone="inverse"] band: a custom
 * property resolves its var() where it is declared, so a pair set on the :root alone would carry
 * the light colours into a dark band, whose semantic variables tokens.css flips.
 *
 * Only var(--…) references here, never a value: what a name has no token for (border widths, the
 * button arrow, lifts, the progress height, the sticky padding) stays the component's own
 * fallback, the same Brain value. --space-part, --pad-card, --header-clearance and
 * --container-padding-inline are the shop's layout roles (base.css).
 */
:root,
[data-tone="inverse"] {
  --p13n-color-cta: var(--color-accent);
  --p13n-color-cta-text: var(--color-accent-contrast);
  --p13n-color-cta-hover: var(--color-accent-hover-light);
  --p13n-color-ink: var(--color-text);
  --p13n-color-ink-muted: var(--color-text-muted);
  --p13n-color-surface: var(--color-surface);
  --p13n-color-surface-muted: var(--color-surface-muted);
  --p13n-color-canvas: var(--color-background);
  --p13n-color-line: var(--color-border);
  --p13n-color-focus: var(--color-focus);
  --p13n-color-accent: var(--color-ui-accent);
  --p13n-color-track: var(--tint-ink-12);
  --p13n-color-selected-bg: var(--color-accent-soft);
  --p13n-color-error: var(--color-error);
  --p13n-color-error-bg: var(--color-error-bg);
  --p13n-radius-button: var(--radius-sm);
  --p13n-radius-card: var(--radius-md);
  --p13n-control-height: var(--size-button);
  --p13n-control-height-compact: var(--size-button-compact);
  --p13n-shadow-card: var(--shadow-sm);
  --p13n-font-heading: var(--font-heading);
  --p13n-font-body: var(--font-body);
  --p13n-motion-duration: var(--duration-base);
  --p13n-motion-duration-fast: var(--duration-fast);
  --p13n-motion-easing: var(--ease-out);

  /* The type steps: the fluid clamp()s of tokens.css. */
  --p13n-text-body-size: var(--text-body);
  --p13n-text-small-size: var(--text-small);
  --p13n-text-label-size: var(--text-label);
  --p13n-text-button-size: var(--text-button);
  --p13n-text-h3-size: var(--text-h3);
  --p13n-text-h4-size: var(--text-h4);
  --p13n-text-caption-size: var(--text-quote);

  /* The sample page's element set (Brain components.*). */
  --p13n-radius-panel: var(--radius-lg);
  --p13n-radius-pill: var(--radius-full);
  --p13n-color-line-strong: var(--color-border-strong);
  --p13n-shadow-card-hover: var(--shadow-md);
  --p13n-shadow-panel: var(--shadow-lg);
  --p13n-shadow-cta-hover: var(--shadow-cta-hover);
  --p13n-sheen: var(--effect-cta-sheen);
  --p13n-sheen-duration: var(--effect-cta-sheen-duration);
  --p13n-sheen-easing: var(--effect-cta-sheen-easing);
  --p13n-space-part: var(--space-part);
  --p13n-pad-card: var(--pad-card);
  --p13n-pad-panel: var(--space-5);
  --p13n-pad-panel-wide: var(--space-6);
  --p13n-sticky-top: var(--header-clearance);

  /* README: the focus ring (color.role.focus.ring / .offset). */
  --p13n-focus-ring-width: var(--focus-ring-width);
  --p13n-focus-ring-offset: var(--focus-ring-offset);

  /* README: the weight, line height and letter spacing of each type step. */
  --p13n-text-body-weight: var(--text-body-weight);
  --p13n-text-body-line-height: var(--leading-body);
  --p13n-text-small-weight: var(--text-small-weight);
  --p13n-text-small-line-height: var(--leading-small);
  --p13n-text-label-weight: var(--text-label-weight);
  --p13n-text-label-line-height: var(--leading-label);
  --p13n-text-label-letter-spacing: var(--tracking-label);
  --p13n-text-button-weight: var(--text-button-weight);
  --p13n-text-button-line-height: var(--leading-button);
  --p13n-text-button-letter-spacing: var(--tracking-button);
  --p13n-text-h3-weight: var(--text-h3-weight);
  --p13n-text-h3-line-height: var(--leading-h3);
  --p13n-text-h4-weight: var(--text-h4-weight);
  --p13n-text-h4-line-height: var(--leading-h4);
  --p13n-text-caption-weight: var(--text-quote-weight);
  --p13n-text-caption-line-height: var(--leading-quote);

  /* README: the spacing steps (spacing.scale[2..5]) and the sticky bar's bleed. */
  --p13n-space-xs: var(--space-2);
  --p13n-space-sm: var(--space-3);
  --p13n-space-md: var(--space-4);
  --p13n-space-lg: var(--space-5);
  --p13n-sticky-bleed: var(--container-padding-inline);
}
