/* XHOWL shared design tokens. Public site and Studio consume the same source. */
:root {
  color-scheme: dark;
  --xh-background: #101010;
  --xh-header: #1d1d1d;
  --xh-surface: #1d1d1d;
  --xh-surface-low: var(--xh-background);
  --xh-surface-hover: #2a2a2a;
  --xh-border: #383838;
  --xh-border-hover: #5c5c5c;
  --xh-text: #f2f2f2;
  --xh-secondary: #c2c2c2;
  --xh-muted: #a1a1a1;
  /* Match white areas inside the original payment SVGs without a second visible plate. */
  --xh-payment-logo-light-surface: #fff;
  /* Approved XHOWL primary brand colour and interaction states. */
  --xh-accent: #fea005;
  --xh-accent-hover: #feb64c;
  --xh-accent-ink: #101010;
  --xh-accent-soft: var(--xh-surface-hover);
  --xh-focus: var(--xh-accent);
  --xh-control-bg: var(--xh-surface-hover);
  --xh-control-border: var(--xh-border);
  --xh-input-bg: var(--xh-surface-low);
  /* Shared status scale. Domain labels and scores retain their own meaning. */
  --xh-scale-red: #ef4444;
  --xh-scale-orange: #f97316;
  --xh-scale-yellow: #eab308;
  --xh-scale-lime: #84cc16;
  --xh-scale-green: #22c55e;
  --xh-scale-red-soft: var(--xh-background);
  --xh-scale-orange-soft: var(--xh-background);
  --xh-scale-yellow-soft: var(--xh-background);
  --xh-scale-lime-soft: var(--xh-background);
  --xh-scale-green-soft: var(--xh-background);
  --xh-status-ink: var(--xh-background);
  --xh-danger: var(--xh-scale-red);
  --xh-danger-soft: var(--xh-scale-red-soft);
  /* Small errors can appear on raised panels; keep their copy high contrast. */
  --xh-danger-text: var(--xh-text);
  --xh-success: var(--xh-scale-green);
  --xh-success-soft: var(--xh-scale-green-soft);
  --xh-info: var(--xh-secondary);
  --xh-info-soft: var(--xh-background);
  --xh-warning: var(--xh-scale-yellow);
  --xh-warning-soft: var(--xh-scale-yellow-soft);

  --xh-font-body: Arial, "Helvetica Neue", sans-serif;
  --xh-font-studio: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --xh-font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --xh-font-xs: 12px;
  --xh-font-sm: 14px;
  --xh-font-compact: 13px;
  --xh-font-control: 15px;
  --xh-font-title: 17px;
  --xh-font-collection: 18px;
  --xh-font-md: 16px;
  --xh-font-lg: 20px;
  --xh-font-xl: 24px;
  --xh-heading-page: 32px;
  --xh-leading-body: 1.6;
  --xh-leading-heading: 1.2;
  --xh-space-1: 4px;
  --xh-space-2: 8px;
  --xh-space-3: 12px;
  --xh-space-4: 16px;
  --xh-space-5: 20px;
  --xh-space-6: 24px;
  --xh-space-7: 28px;
  --xh-space-8: 32px;
  /* Controls and blocks share one radius; legacy size names remain aliases. */
  --xh-radius: 12px;
  --xh-radius-sm: var(--xh-radius);
  --xh-radius-md: var(--xh-radius);
  --xh-radius-lg: var(--xh-radius);
  --xh-radius-dialog: var(--xh-radius);
  --xh-radius-pill: var(--xh-radius);
  --xh-control-sm: 40px;
  --xh-control-md: 44px;
  --xh-control-lg: 48px;
  --xh-duration-fast: 120ms;
  --xh-shadow-dialog: 0 24px 80px #0008;
  --xh-backdrop: #000000cc;
  --xh-content-width: 1170px;

  /* Explicit product contexts; changing a context updates every consumer. */
  --xh-account-border: var(--xh-border);
  --xh-account-panel: var(--xh-surface);
  --xh-account-muted: var(--xh-secondary);
  --xh-complaint-surface: var(--xh-surface);
  --xh-complaint-border: var(--xh-border);
  --xh-complaint-muted: var(--xh-secondary);
  --xh-overlay-control: #17181cdb;
  --xh-overlay-border: #ffffff26;
  --xh-overlay-track: #ffffff14;
  --xh-editorial-bg: var(--xh-control-bg);
  --xh-editorial-border: var(--xh-control-border);
  --xh-editorial-text: var(--xh-text);
  --xh-editorial-hover-bg: var(--xh-surface-hover);
  --xh-editorial-hover-border: var(--xh-border-hover);
  --xh-editorial-active-bg: var(--xh-surface-low);
  --xh-editorial-shadow: none;
  --xh-review-action-bg: var(--xh-control-bg);
  --xh-review-action-border: var(--xh-border);
  --xh-review-action-text: var(--xh-text);
  --xh-review-action-hover-bg: var(--xh-surface-hover);
  --xh-review-action-hover-text: var(--xh-text);
  --xh-review-action-hover-border: var(--xh-border-hover);
  --xh-review-action-active-bg: var(--xh-surface-low);
  --xh-review-action-shadow: none;
  --xh-review-action-hover-shadow: none;
  --xh-review-action-active-shadow: none;
  --xh-tonal-action-bg: var(--xh-surface-hover);
  --xh-tonal-action-border: var(--xh-border-hover);
  --xh-tonal-action-text: var(--xh-text);
  --xh-tonal-action-hover-bg: var(--xh-control-bg);
  --xh-radius-provider: var(--xh-radius);
  --xh-complaint-tab-bg: var(--xh-surface-low);
  --xh-complaint-tab-text: var(--xh-secondary);
  --xh-complaint-tab-hover-bg: var(--xh-surface-hover);
  --xh-complaint-tab-hover-text: var(--xh-text);
  --xh-complaint-tab-selected-bg: var(--xh-surface-hover);
  --xh-complaint-tab-border: var(--xh-border);
  --xh-catalog-surface: var(--xh-surface);
  --xh-catalog-border: var(--xh-border);
  --xh-catalog-hover-border: var(--xh-border-hover);
  --xh-review-list-surface: var(--xh-surface);
  --xh-review-list-border: var(--xh-border);
  --xh-review-list-hover-surface: var(--xh-surface-hover);
  --xh-review-list-hover-border: var(--xh-border-hover);
  --xh-complaint-card-border: var(--xh-border);
  /* Ordinal review sentiment shares the palette, retaining its five labels. */
  --xh-sentiment-1-bar: var(--xh-scale-red);
  --xh-sentiment-2-bar: var(--xh-scale-orange);
  --xh-sentiment-3-bar: var(--xh-scale-yellow);
  --xh-sentiment-4-bar: var(--xh-scale-lime);
  --xh-sentiment-5-bar: var(--xh-scale-green);

  /* Feature surfaces are registered here; domain status scales remain independent. */
  --xh-footer-background: var(--xh-surface-low);
  --xh-footer-border: var(--xh-border);
  --xh-footer-text: var(--xh-secondary);
  --xh-footer-muted: var(--xh-muted);
  --xh-footer-surface: var(--xh-surface);
  --xh-footer-heading: var(--xh-text);
  --xh-footer-divider: var(--xh-border);
  --xh-author-popover: var(--xh-surface);
  --xh-author-border: var(--xh-border-hover);
  --xh-author-surface: var(--xh-surface);
  --xh-author-divider: var(--xh-border);
  --xh-analytics-border: var(--xh-border);
  --xh-analytics-text: var(--xh-secondary);
  --xh-analytics-heading: var(--xh-text);
  --xh-analytics-muted: var(--xh-muted);
  --xh-trust-text: var(--xh-text);
  --xh-trust-neutral: var(--xh-control-bg);
  --xh-trust-muted: var(--xh-secondary);
  --xh-trust-heading: var(--xh-text);
  --xh-evidence-surface: var(--xh-surface-low);
  --xh-evidence-border: var(--xh-border);
  --xh-evidence-muted: var(--xh-secondary);
  --xh-evidence-text: var(--xh-text);
  --xh-complaint-detail-surface: var(--xh-surface);
  --xh-complaint-detail-border: var(--xh-border);
  --xh-complaint-detail-muted: var(--xh-secondary);
  --xh-complaint-detail-copy: var(--xh-secondary);

  /* Studio retains its denser layout while sharing the same dark palette. */
  --xh-studio-background: var(--xh-background);
  --xh-studio-surface: var(--xh-surface);
  --xh-studio-raised: var(--xh-surface-hover);
  --xh-studio-border: var(--xh-border);
  --xh-studio-text: var(--xh-text);
  --xh-studio-muted: var(--xh-secondary);
}

@media (max-width: 767px) {
  :root { --xh-heading-page: 28px; }
}
