/* ===== greater tokens (tarball-pin channel) — --gr-* defaults ===== */
:root {
  --gr-color-base-white: #ffffff;
  --gr-color-base-black: #000000;
  --gr-color-gray-50: #f9fafb;
  --gr-color-gray-100: #f3f4f6;
  --gr-color-gray-200: #e5e7eb;
  --gr-color-gray-300: #d1d5db;
  --gr-color-gray-400: #9ca3af;
  --gr-color-gray-500: #6b7280;
  --gr-color-gray-600: #4b5563;
  --gr-color-gray-700: #374151;
  --gr-color-gray-800: #1f2937;
  --gr-color-gray-900: #111827;
  --gr-color-gray-950: #030712;
  --gr-color-primary-50: #eff6ff;
  --gr-color-primary-100: #dbeafe;
  --gr-color-primary-200: #bfdbfe;
  --gr-color-primary-300: #93c5fd;
  --gr-color-primary-400: #60a5fa;
  --gr-color-primary-500: #3b82f6;
  --gr-color-primary-600: #2563eb;
  --gr-color-primary-700: #1d4ed8;
  --gr-color-primary-800: #1e40af;
  --gr-color-primary-900: #1e3a8a;
  --gr-color-primary-950: #172554;
  --gr-color-success-50: #f0fdf4;
  --gr-color-success-100: #dcfce7;
  --gr-color-success-200: #bbf7d0;
  --gr-color-success-300: #86efac;
  --gr-color-success-400: #4ade80;
  --gr-color-success-500: #22c55e;
  --gr-color-success-600: #16a34a;
  --gr-color-success-700: #15803d;
  --gr-color-success-800: #166534;
  --gr-color-success-900: #14532d;
  --gr-color-warning-50: #fffbeb;
  --gr-color-warning-100: #fef3c7;
  --gr-color-warning-200: #fde68a;
  --gr-color-warning-300: #fcd34d;
  --gr-color-warning-400: #fbbf24;
  --gr-color-warning-500: #f59e0b;
  --gr-color-warning-600: #d97706;
  --gr-color-warning-700: #b45309;
  --gr-color-warning-800: #92400e;
  --gr-color-warning-900: #78350f;
  --gr-color-error-50: #fef2f2;
  --gr-color-error-100: #fee2e2;
  --gr-color-error-200: #fecaca;
  --gr-color-error-300: #fca5a5;
  --gr-color-error-400: #f87171;
  --gr-color-error-500: #ef4444;
  --gr-color-error-600: #dc2626;
  --gr-color-error-700: #b91c1c;
  --gr-color-error-800: #991b1b;
  --gr-color-error-900: #7f1d1d;
  --gr-color-info-50: #eff6ff;
  --gr-color-info-100: #dbeafe;
  --gr-color-info-200: #bfdbfe;
  --gr-color-info-300: #93c5fd;
  --gr-color-info-400: #60a5fa;
  --gr-color-info-500: #3b82f6;
  --gr-color-info-600: #2563eb;
  --gr-color-info-700: #1d4ed8;
  --gr-color-info-800: #1e40af;
  --gr-color-info-900: #1e3a8a;
  --gr-spacing-scale-0: 0;
  --gr-spacing-scale-1: 0.25rem;
  --gr-spacing-scale-2: 0.5rem;
  --gr-spacing-scale-3: 0.75rem;
  --gr-spacing-scale-4: 1rem;
  --gr-spacing-scale-5: 1.25rem;
  --gr-spacing-scale-6: 1.5rem;
  --gr-spacing-scale-8: 2rem;
  --gr-spacing-scale-10: 2.5rem;
  --gr-spacing-scale-12: 3rem;
  --gr-spacing-scale-16: 4rem;
  --gr-spacing-scale-20: 5rem;
  --gr-spacing-scale-24: 6rem;
  --gr-spacing-scale-32: 8rem;
  --gr-typography-fontFamily-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --gr-typography-fontFamily-heading: var(--gr-typography-fontFamily-sans);
  --gr-typography-fontFamily-serif: Georgia, Cambria, 'Times New Roman', Times, serif;
  --gr-typography-fontFamily-mono: 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --gr-typography-fontSize-xs: 0.75rem;
  --gr-typography-fontSize-sm: 0.875rem;
  --gr-typography-fontSize-base: 1rem;
  --gr-typography-fontSize-lg: 1.125rem;
  --gr-typography-fontSize-xl: 1.25rem;
  --gr-typography-fontSize-2xl: 1.5rem;
  --gr-typography-fontSize-3xl: 1.875rem;
  --gr-typography-fontSize-4xl: 2.25rem;
  --gr-typography-fontSize-5xl: 3rem;
  --gr-typography-fontWeight-normal: 400;
  --gr-typography-fontWeight-medium: 500;
  --gr-typography-fontWeight-semibold: 600;
  --gr-typography-fontWeight-bold: 700;
  --gr-typography-lineHeight-tight: 1.25;
  --gr-typography-lineHeight-normal: 1.5;
  --gr-typography-lineHeight-relaxed: 1.75;
  --gr-typography-lineHeight-loose: 2;
  --gr-radii-none: 0;
  --gr-radii-sm: 0.125rem;
  --gr-radii-base: 0.25rem;
  --gr-radii-md: 0.375rem;
  --gr-radii-lg: 0.5rem;
  --gr-radii-xl: 0.75rem;
  --gr-radii-2xl: 1rem;
  --gr-radii-full: 9999px;
  --gr-shadows-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --gr-shadows-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --gr-shadows-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --gr-shadows-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --gr-shadows-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gr-shadows-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --gr-shadows-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  --gr-shadows-none: none;
  --gr-shadows-glow-sm: 0 0 4px 0 rgb(255 255 255 / 0.05), 0 0 1px 0 rgb(255 255 255 / 0.1);
  --gr-shadows-glow-md: 0 0 8px 0 rgb(255 255 255 / 0.07), 0 0 2px 0 rgb(255 255 255 / 0.1);
  --gr-shadows-glow-lg: 0 0 16px 0 rgb(255 255 255 / 0.1), 0 0 4px 0 rgb(255 255 255 / 0.15);
  --gr-shadows-glow-primary: 0 0 12px 0 var(--gr-color-primary-500);
  --gr-motion-duration-fast: 150ms;
  --gr-motion-duration-base: 250ms;
  --gr-motion-duration-slow: 400ms;
  --gr-motion-duration-slower: 600ms;
  --gr-motion-easing-linear: linear;
  --gr-motion-easing-in: cubic-bezier(0.4, 0, 1, 1);
  --gr-motion-easing-out: cubic-bezier(0, 0, 0.2, 1);
  --gr-motion-easing-inOut: cubic-bezier(0.4, 0, 0.2, 1);
  --gr-motion-easing-decelerate: cubic-bezier(0, 0, 0.2, 1);
  --gr-motion-easing-accelerate: cubic-bezier(0.4, 0, 1, 1);
  --gr-motion-easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

:root:not([data-theme]) {
  --gr-semantic-background-primary: var(--gr-color-base-white);
  --gr-semantic-background-secondary: var(--gr-color-gray-50);
  --gr-semantic-background-tertiary: var(--gr-color-gray-100);
  --gr-semantic-background-base: var(--gr-color-gray-50);
  --gr-semantic-background-surface: var(--gr-color-base-white);
  --gr-semantic-background-raised: var(--gr-color-base-white);
  --gr-semantic-background-input: var(--gr-color-base-white);
  --gr-semantic-background-overlay: rgba(0, 0, 0, 0.5);
  --gr-semantic-foreground-primary: var(--gr-color-gray-900);
  --gr-semantic-foreground-secondary: var(--gr-color-gray-700);
  --gr-semantic-foreground-tertiary: var(--gr-color-gray-500);
  --gr-semantic-foreground-disabled: var(--gr-color-gray-400);
  --gr-semantic-border-default: var(--gr-color-gray-200);
  --gr-semantic-border-subtle: var(--gr-color-gray-100);
  --gr-semantic-border-strong: var(--gr-color-gray-300);
  --gr-semantic-action-primary-default: var(--gr-color-primary-600);
  --gr-semantic-action-primary-hover: var(--gr-color-primary-700);
  --gr-semantic-action-primary-active: var(--gr-color-primary-800);
  --gr-semantic-action-primary-disabled: var(--gr-color-primary-300);
  --gr-semantic-action-success-default: var(--gr-color-success-700);
  --gr-semantic-action-success-hover: var(--gr-color-success-800);
  --gr-semantic-action-success-active: var(--gr-color-success-900);
  --gr-semantic-action-warning-default: var(--gr-color-warning-600);
  --gr-semantic-action-warning-hover: var(--gr-color-warning-700);
  --gr-semantic-action-warning-active: var(--gr-color-warning-800);
  --gr-semantic-action-error-default: var(--gr-color-error-600);
  --gr-semantic-action-error-hover: var(--gr-color-error-700);
  --gr-semantic-action-error-active: var(--gr-color-error-800);
  --gr-semantic-action-link-default: var(--gr-color-primary-600);
  --gr-semantic-action-link-hover: var(--gr-color-primary-700);
  --gr-semantic-action-link-active: var(--gr-color-primary-800);
  --gr-semantic-focus-ring: var(--gr-color-primary-500);
  --gr-semantic-focus-ring-offset: 2px;
  --gr-semantic-focus-ring-width: 2px;
  --gr-semantic-transition-theme: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="light"] {
  --gr-semantic-background-primary: var(--gr-color-base-white);
  --gr-semantic-background-secondary: var(--gr-color-gray-50);
  --gr-semantic-background-tertiary: var(--gr-color-gray-100);
  --gr-semantic-background-base: var(--gr-color-gray-50);
  --gr-semantic-background-surface: var(--gr-color-base-white);
  --gr-semantic-background-raised: var(--gr-color-base-white);
  --gr-semantic-background-input: var(--gr-color-base-white);
  --gr-semantic-background-overlay: rgba(0, 0, 0, 0.5);
  --gr-semantic-foreground-primary: var(--gr-color-gray-900);
  --gr-semantic-foreground-secondary: var(--gr-color-gray-700);
  --gr-semantic-foreground-tertiary: var(--gr-color-gray-500);
  --gr-semantic-foreground-disabled: var(--gr-color-gray-400);
  --gr-semantic-border-default: var(--gr-color-gray-200);
  --gr-semantic-border-subtle: var(--gr-color-gray-100);
  --gr-semantic-border-strong: var(--gr-color-gray-300);
  --gr-semantic-action-primary-default: var(--gr-color-primary-600);
  --gr-semantic-action-primary-hover: var(--gr-color-primary-700);
  --gr-semantic-action-primary-active: var(--gr-color-primary-800);
  --gr-semantic-action-primary-disabled: var(--gr-color-primary-300);
  --gr-semantic-action-success-default: var(--gr-color-success-700);
  --gr-semantic-action-success-hover: var(--gr-color-success-800);
  --gr-semantic-action-success-active: var(--gr-color-success-900);
  --gr-semantic-action-warning-default: var(--gr-color-warning-600);
  --gr-semantic-action-warning-hover: var(--gr-color-warning-700);
  --gr-semantic-action-warning-active: var(--gr-color-warning-800);
  --gr-semantic-action-error-default: var(--gr-color-error-600);
  --gr-semantic-action-error-hover: var(--gr-color-error-700);
  --gr-semantic-action-error-active: var(--gr-color-error-800);
  --gr-semantic-action-link-default: var(--gr-color-primary-600);
  --gr-semantic-action-link-hover: var(--gr-color-primary-700);
  --gr-semantic-action-link-active: var(--gr-color-primary-800);
  --gr-semantic-focus-ring: var(--gr-color-primary-500);
  --gr-semantic-focus-ring-offset: 2px;
  --gr-semantic-focus-ring-width: 2px;
  --gr-semantic-transition-theme: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] {
  --gr-semantic-background-primary: var(--gr-color-gray-950);
  --gr-semantic-background-secondary: var(--gr-color-gray-900);
  --gr-semantic-background-tertiary: var(--gr-color-gray-800);
  --gr-semantic-background-base: var(--gr-color-gray-950);
  --gr-semantic-background-surface: var(--gr-color-gray-900);
  --gr-semantic-background-raised: var(--gr-color-gray-800);
  --gr-semantic-background-input: var(--gr-color-gray-800);
  --gr-semantic-background-overlay: rgba(0, 0, 0, 0.75);
  --gr-semantic-foreground-primary: var(--gr-color-gray-50);
  --gr-semantic-foreground-secondary: var(--gr-color-gray-200);
  --gr-semantic-foreground-tertiary: var(--gr-color-gray-400);
  --gr-semantic-foreground-disabled: var(--gr-color-gray-600);
  --gr-semantic-border-default: var(--gr-color-gray-700);
  --gr-semantic-border-subtle: var(--gr-color-gray-800);
  --gr-semantic-border-strong: var(--gr-color-gray-600);
  --gr-semantic-action-primary-default: var(--gr-color-primary-600);
  --gr-semantic-action-primary-hover: var(--gr-color-primary-700);
  --gr-semantic-action-primary-active: var(--gr-color-primary-800);
  --gr-semantic-action-primary-disabled: var(--gr-color-primary-800);
  --gr-semantic-action-success-default: var(--gr-color-success-500);
  --gr-semantic-action-success-hover: var(--gr-color-success-400);
  --gr-semantic-action-success-active: var(--gr-color-success-300);
  --gr-semantic-action-warning-default: var(--gr-color-warning-500);
  --gr-semantic-action-warning-hover: var(--gr-color-warning-400);
  --gr-semantic-action-warning-active: var(--gr-color-warning-300);
  --gr-semantic-action-error-default: var(--gr-color-error-500);
  --gr-semantic-action-error-hover: var(--gr-color-error-400);
  --gr-semantic-action-error-active: var(--gr-color-error-300);
  --gr-semantic-action-link-default: var(--gr-color-primary-400);
  --gr-semantic-action-link-hover: var(--gr-color-primary-300);
  --gr-semantic-action-link-active: var(--gr-color-primary-200);
  --gr-semantic-focus-ring: var(--gr-color-primary-400);
  --gr-semantic-focus-ring-offset: 2px;
  --gr-semantic-focus-ring-width: 2px;
  --gr-semantic-transition-theme: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="highContrast"],
[data-theme="high-contrast"] {
  --gr-semantic-background-primary: var(--gr-color-base-black);
  --gr-semantic-background-secondary: var(--gr-color-gray-950);
  --gr-semantic-background-tertiary: var(--gr-color-gray-900);
  --gr-semantic-background-base: var(--gr-color-base-black);
  --gr-semantic-background-surface: var(--gr-color-gray-950);
  --gr-semantic-background-raised: var(--gr-color-gray-900);
  --gr-semantic-background-input: var(--gr-color-gray-900);
  --gr-semantic-background-overlay: rgba(0, 0, 0, 0.85);
  --gr-semantic-foreground-primary: var(--gr-color-base-white);
  --gr-semantic-foreground-secondary: var(--gr-color-gray-100);
  --gr-semantic-foreground-tertiary: var(--gr-color-gray-300);
  --gr-semantic-foreground-disabled: var(--gr-color-gray-600);
  --gr-semantic-border-default: var(--gr-color-base-white);
  --gr-semantic-border-subtle: var(--gr-color-gray-400);
  --gr-semantic-border-strong: var(--gr-color-base-white);
  --gr-semantic-action-primary-default: var(--gr-color-base-white);
  --gr-semantic-action-primary-hover: var(--gr-color-gray-100);
  --gr-semantic-action-primary-active: var(--gr-color-gray-200);
  --gr-semantic-action-primary-disabled: var(--gr-color-gray-600);
  --gr-semantic-action-success-default: var(--gr-color-base-white);
  --gr-semantic-action-success-hover: var(--gr-color-gray-100);
  --gr-semantic-action-success-active: var(--gr-color-gray-200);
  --gr-semantic-action-warning-default: var(--gr-color-base-white);
  --gr-semantic-action-warning-hover: var(--gr-color-gray-100);
  --gr-semantic-action-warning-active: var(--gr-color-gray-200);
  --gr-semantic-action-error-default: var(--gr-color-base-white);
  --gr-semantic-action-error-hover: var(--gr-color-gray-100);
  --gr-semantic-action-error-active: var(--gr-color-gray-200);
  --gr-semantic-action-link-default: var(--gr-color-base-white);
  --gr-semantic-action-link-hover: var(--gr-color-gray-100);
  --gr-semantic-action-link-active: var(--gr-color-gray-200);
  --gr-semantic-focus-ring: var(--gr-color-primary-200);
  --gr-semantic-focus-ring-offset: 3px;
  --gr-semantic-focus-ring-width: 3px;
  --gr-semantic-transition-theme: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}


@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
        --gr-semantic-background-primary: var(--gr-color-gray-950);
    --gr-semantic-background-secondary: var(--gr-color-gray-900);
    --gr-semantic-background-tertiary: var(--gr-color-gray-800);
    --gr-semantic-background-base: var(--gr-color-gray-950);
    --gr-semantic-background-surface: var(--gr-color-gray-900);
    --gr-semantic-background-raised: var(--gr-color-gray-800);
    --gr-semantic-background-input: var(--gr-color-gray-800);
    --gr-semantic-background-overlay: rgba(0, 0, 0, 0.75);
    --gr-semantic-foreground-primary: var(--gr-color-gray-50);
    --gr-semantic-foreground-secondary: var(--gr-color-gray-200);
    --gr-semantic-foreground-tertiary: var(--gr-color-gray-400);
    --gr-semantic-foreground-disabled: var(--gr-color-gray-600);
    --gr-semantic-border-default: var(--gr-color-gray-700);
    --gr-semantic-border-subtle: var(--gr-color-gray-800);
    --gr-semantic-border-strong: var(--gr-color-gray-600);
    --gr-semantic-action-primary-default: var(--gr-color-primary-600);
    --gr-semantic-action-primary-hover: var(--gr-color-primary-700);
    --gr-semantic-action-primary-active: var(--gr-color-primary-800);
    --gr-semantic-action-primary-disabled: var(--gr-color-primary-800);
    --gr-semantic-action-success-default: var(--gr-color-success-500);
    --gr-semantic-action-success-hover: var(--gr-color-success-400);
    --gr-semantic-action-success-active: var(--gr-color-success-300);
    --gr-semantic-action-warning-default: var(--gr-color-warning-500);
    --gr-semantic-action-warning-hover: var(--gr-color-warning-400);
    --gr-semantic-action-warning-active: var(--gr-color-warning-300);
    --gr-semantic-action-error-default: var(--gr-color-error-500);
    --gr-semantic-action-error-hover: var(--gr-color-error-400);
    --gr-semantic-action-error-active: var(--gr-color-error-300);
    --gr-semantic-action-link-default: var(--gr-color-primary-400);
    --gr-semantic-action-link-hover: var(--gr-color-primary-300);
    --gr-semantic-action-link-active: var(--gr-color-primary-200);
    --gr-semantic-focus-ring: var(--gr-color-primary-400);
    --gr-semantic-focus-ring-offset: 2px;
    --gr-semantic-focus-ring-width: 2px;
    --gr-semantic-transition-theme: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
}

@media (prefers-contrast: high) {
  :root:not([data-theme]) {
        --gr-semantic-background-primary: var(--gr-color-base-black);
    --gr-semantic-background-secondary: var(--gr-color-gray-950);
    --gr-semantic-background-tertiary: var(--gr-color-gray-900);
    --gr-semantic-background-base: var(--gr-color-base-black);
    --gr-semantic-background-surface: var(--gr-color-gray-950);
    --gr-semantic-background-raised: var(--gr-color-gray-900);
    --gr-semantic-background-input: var(--gr-color-gray-900);
    --gr-semantic-background-overlay: rgba(0, 0, 0, 0.85);
    --gr-semantic-foreground-primary: var(--gr-color-base-white);
    --gr-semantic-foreground-secondary: var(--gr-color-gray-100);
    --gr-semantic-foreground-tertiary: var(--gr-color-gray-300);
    --gr-semantic-foreground-disabled: var(--gr-color-gray-600);
    --gr-semantic-border-default: var(--gr-color-base-white);
    --gr-semantic-border-subtle: var(--gr-color-gray-400);
    --gr-semantic-border-strong: var(--gr-color-base-white);
    --gr-semantic-action-primary-default: var(--gr-color-base-white);
    --gr-semantic-action-primary-hover: var(--gr-color-gray-100);
    --gr-semantic-action-primary-active: var(--gr-color-gray-200);
    --gr-semantic-action-primary-disabled: var(--gr-color-gray-600);
    --gr-semantic-action-success-default: var(--gr-color-base-white);
    --gr-semantic-action-success-hover: var(--gr-color-gray-100);
    --gr-semantic-action-success-active: var(--gr-color-gray-200);
    --gr-semantic-action-warning-default: var(--gr-color-base-white);
    --gr-semantic-action-warning-hover: var(--gr-color-gray-100);
    --gr-semantic-action-warning-active: var(--gr-color-gray-200);
    --gr-semantic-action-error-default: var(--gr-color-base-white);
    --gr-semantic-action-error-hover: var(--gr-color-gray-100);
    --gr-semantic-action-error-active: var(--gr-color-gray-200);
    --gr-semantic-action-link-default: var(--gr-color-base-white);
    --gr-semantic-action-link-hover: var(--gr-color-gray-100);
    --gr-semantic-action-link-active: var(--gr-color-gray-200);
    --gr-semantic-focus-ring: var(--gr-color-primary-200);
    --gr-semantic-focus-ring-offset: 3px;
    --gr-semantic-focus-ring-width: 3px;
    --gr-semantic-transition-theme: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
}

/* Theme-aware elevation shadows */
:root, [data-theme="light"] {
  --gr-shadows-elevation-sm: var(--gr-shadows-sm);
  --gr-shadows-elevation-md: var(--gr-shadows-md);
  --gr-shadows-elevation-lg: var(--gr-shadows-lg);
  --gr-shadows-elevation-hover: var(--gr-shadows-lg);
}

[data-theme="dark"] {
  --gr-shadows-elevation-sm: var(--gr-shadows-glow-sm);
  --gr-shadows-elevation-md: var(--gr-shadows-glow-md);
  --gr-shadows-elevation-lg: var(--gr-shadows-glow-lg);
  --gr-shadows-elevation-hover: 0 0 0 1px var(--gr-semantic-border-strong);
}

[data-theme="highContrast"],
[data-theme="high-contrast"] {
  --gr-shadows-elevation-sm: none;
  --gr-shadows-elevation-md: 0 0 0 1px var(--gr-semantic-border-default);
  --gr-shadows-elevation-lg: 0 0 0 2px var(--gr-semantic-border-strong);
  --gr-shadows-elevation-hover: 0 0 0 2px var(--gr-semantic-border-strong);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --gr-shadows-elevation-sm: var(--gr-shadows-glow-sm);
    --gr-shadows-elevation-md: var(--gr-shadows-glow-md);
    --gr-shadows-elevation-lg: var(--gr-shadows-glow-lg);
    --gr-shadows-elevation-hover: 0 0 0 1px var(--gr-semantic-border-strong);
  }
}

/* Theme transition utility class */
.gr-theme-transition {
  transition: var(--gr-semantic-transition-theme, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease);
}

.gr-theme-transition * {
  transition: inherit;
}

/**
 * Greater Components Animation Utilities
 * Centralized animation keyframes and utility classes
 */

/* ============================================
   KEYFRAME DEFINITIONS
   ============================================ */

/* Fade In - Simple opacity transition */
@keyframes gr-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Fade Up - Opacity with upward motion */
@keyframes gr-fade-up {
	from {
		opacity: 0;
		transform: translateY(1rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Fade Down - Opacity with downward motion */
@keyframes gr-fade-down {
	from {
		opacity: 0;
		transform: translateY(-1rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Slide In Right - Horizontal slide from right */
@keyframes gr-slide-in-right {
	from {
		opacity: 0;
		transform: translateX(1rem);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Slide In Left - Horizontal slide from left */
@keyframes gr-slide-in-left {
	from {
		opacity: 0;
		transform: translateX(-1rem);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Scale In - Scale from center */
@keyframes gr-scale-in {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Spin - Continuous rotation */
@keyframes gr-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Pulse - Subtle scale pulse */
@keyframes gr-pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

/* Bounce - Elastic bounce effect */
@keyframes gr-bounce {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-0.5rem);
	}
}

/* ============================================
   ANIMATION UTILITY CLASSES
   ============================================ */

/* Base animation utilities */
.gr-animate-fade-in {
	animation: gr-fade-in var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-fade-up {
	animation: gr-fade-up var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-fade-down {
	animation: gr-fade-down var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-slide-in-right {
	animation: gr-slide-in-right var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-slide-in-left {
	animation: gr-slide-in-left var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-scale-in {
	animation: gr-scale-in var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-spin {
	animation: gr-spin 1s var(--gr-motion-easing-linear, linear) infinite;
}

.gr-animate-pulse {
	animation: gr-pulse 1.5s var(--gr-motion-easing-inOut, cubic-bezier(0.4, 0, 0.2, 1)) infinite;
}

.gr-animate-bounce {
	animation: gr-bounce 1s var(--gr-motion-easing-inOut, cubic-bezier(0.4, 0, 0.2, 1)) infinite;
}

/* ============================================
   ANIMATION DELAY UTILITIES
   ============================================ */

.gr-delay-0 {
	animation-delay: 0ms;
}

.gr-delay-75 {
	animation-delay: 75ms;
}

.gr-delay-100 {
	animation-delay: 100ms;
}

.gr-delay-150 {
	animation-delay: 150ms;
}

.gr-delay-200 {
	animation-delay: 200ms;
}

.gr-delay-300 {
	animation-delay: 300ms;
}

.gr-delay-400 {
	animation-delay: 400ms;
}

.gr-delay-500 {
	animation-delay: 500ms;
}

.gr-delay-600 {
	animation-delay: 600ms;
}

.gr-delay-700 {
	animation-delay: 700ms;
}

.gr-delay-800 {
	animation-delay: 800ms;
}

.gr-delay-900 {
	animation-delay: 900ms;
}

.gr-delay-1000 {
	animation-delay: 1000ms;
}

/* ============================================
   ANIMATION DURATION UTILITIES
   ============================================ */

.gr-duration-fast {
	animation-duration: var(--gr-motion-duration-fast, 150ms);
}

.gr-duration-base {
	animation-duration: var(--gr-motion-duration-base, 250ms);
}

.gr-duration-slow {
	animation-duration: var(--gr-motion-duration-slow, 400ms);
}

.gr-duration-slower {
	animation-duration: var(--gr-motion-duration-slower, 600ms);
}

/* ============================================
   ANIMATION EASING UTILITIES
   ============================================ */

.gr-ease-linear {
	animation-timing-function: var(--gr-motion-easing-linear, linear);
}

.gr-ease-in {
	animation-timing-function: var(--gr-motion-easing-in, cubic-bezier(0.4, 0, 1, 1));
}

.gr-ease-out {
	animation-timing-function: var(--gr-motion-easing-out, cubic-bezier(0, 0, 0.2, 1));
}

.gr-ease-in-out {
	animation-timing-function: var(--gr-motion-easing-inOut, cubic-bezier(0.4, 0, 0.2, 1));
}

.gr-ease-decelerate {
	animation-timing-function: var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1));
}

.gr-ease-accelerate {
	animation-timing-function: var(--gr-motion-easing-accelerate, cubic-bezier(0.4, 0, 1, 1));
}

.gr-ease-standard {
	animation-timing-function: var(--gr-motion-easing-standard, cubic-bezier(0.4, 0, 0.2, 1));
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
	.gr-animate-fade-in,
	.gr-animate-fade-up,
	.gr-animate-fade-down,
	.gr-animate-slide-in-right,
	.gr-animate-slide-in-left,
	.gr-animate-scale-in,
	.gr-animate-spin,
	.gr-animate-pulse,
	.gr-animate-bounce {
		animation: none;
	}

	/* Instant transitions for reduced motion */
	.gr-animate-fade-in,
	.gr-animate-fade-up,
	.gr-animate-fade-down,
	.gr-animate-slide-in-right,
	.gr-animate-slide-in-left,
	.gr-animate-scale-in {
		opacity: 1;
		transform: none;
	}
}

/* ===== greater tokens animations (tarball-pin channel) ===== */
/**
 * Greater Components Animation Utilities
 * Centralized animation keyframes and utility classes
 */

/* ============================================
   KEYFRAME DEFINITIONS
   ============================================ */

/* Fade In - Simple opacity transition */
@keyframes gr-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Fade Up - Opacity with upward motion */
@keyframes gr-fade-up {
	from {
		opacity: 0;
		transform: translateY(1rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Fade Down - Opacity with downward motion */
@keyframes gr-fade-down {
	from {
		opacity: 0;
		transform: translateY(-1rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Slide In Right - Horizontal slide from right */
@keyframes gr-slide-in-right {
	from {
		opacity: 0;
		transform: translateX(1rem);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Slide In Left - Horizontal slide from left */
@keyframes gr-slide-in-left {
	from {
		opacity: 0;
		transform: translateX(-1rem);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Scale In - Scale from center */
@keyframes gr-scale-in {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Spin - Continuous rotation */
@keyframes gr-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Pulse - Subtle scale pulse */
@keyframes gr-pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

/* Bounce - Elastic bounce effect */
@keyframes gr-bounce {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-0.5rem);
	}
}

/* ============================================
   ANIMATION UTILITY CLASSES
   ============================================ */

/* Base animation utilities */
.gr-animate-fade-in {
	animation: gr-fade-in var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-fade-up {
	animation: gr-fade-up var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-fade-down {
	animation: gr-fade-down var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-slide-in-right {
	animation: gr-slide-in-right var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-slide-in-left {
	animation: gr-slide-in-left var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-scale-in {
	animation: gr-scale-in var(--gr-motion-duration-base, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1)) both;
}

.gr-animate-spin {
	animation: gr-spin 1s var(--gr-motion-easing-linear, linear) infinite;
}

.gr-animate-pulse {
	animation: gr-pulse 1.5s var(--gr-motion-easing-inOut, cubic-bezier(0.4, 0, 0.2, 1)) infinite;
}

.gr-animate-bounce {
	animation: gr-bounce 1s var(--gr-motion-easing-inOut, cubic-bezier(0.4, 0, 0.2, 1)) infinite;
}

/* ============================================
   ANIMATION DELAY UTILITIES
   ============================================ */

.gr-delay-0 {
	animation-delay: 0ms;
}

.gr-delay-75 {
	animation-delay: 75ms;
}

.gr-delay-100 {
	animation-delay: 100ms;
}

.gr-delay-150 {
	animation-delay: 150ms;
}

.gr-delay-200 {
	animation-delay: 200ms;
}

.gr-delay-300 {
	animation-delay: 300ms;
}

.gr-delay-400 {
	animation-delay: 400ms;
}

.gr-delay-500 {
	animation-delay: 500ms;
}

.gr-delay-600 {
	animation-delay: 600ms;
}

.gr-delay-700 {
	animation-delay: 700ms;
}

.gr-delay-800 {
	animation-delay: 800ms;
}

.gr-delay-900 {
	animation-delay: 900ms;
}

.gr-delay-1000 {
	animation-delay: 1000ms;
}

/* ============================================
   ANIMATION DURATION UTILITIES
   ============================================ */

.gr-duration-fast {
	animation-duration: var(--gr-motion-duration-fast, 150ms);
}

.gr-duration-base {
	animation-duration: var(--gr-motion-duration-base, 250ms);
}

.gr-duration-slow {
	animation-duration: var(--gr-motion-duration-slow, 400ms);
}

.gr-duration-slower {
	animation-duration: var(--gr-motion-duration-slower, 600ms);
}

/* ============================================
   ANIMATION EASING UTILITIES
   ============================================ */

.gr-ease-linear {
	animation-timing-function: var(--gr-motion-easing-linear, linear);
}

.gr-ease-in {
	animation-timing-function: var(--gr-motion-easing-in, cubic-bezier(0.4, 0, 1, 1));
}

.gr-ease-out {
	animation-timing-function: var(--gr-motion-easing-out, cubic-bezier(0, 0, 0.2, 1));
}

.gr-ease-in-out {
	animation-timing-function: var(--gr-motion-easing-inOut, cubic-bezier(0.4, 0, 0.2, 1));
}

.gr-ease-decelerate {
	animation-timing-function: var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1));
}

.gr-ease-accelerate {
	animation-timing-function: var(--gr-motion-easing-accelerate, cubic-bezier(0.4, 0, 1, 1));
}

.gr-ease-standard {
	animation-timing-function: var(--gr-motion-easing-standard, cubic-bezier(0.4, 0, 0.2, 1));
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
	.gr-animate-fade-in,
	.gr-animate-fade-up,
	.gr-animate-fade-down,
	.gr-animate-slide-in-right,
	.gr-animate-slide-in-left,
	.gr-animate-scale-in,
	.gr-animate-spin,
	.gr-animate-pulse,
	.gr-animate-bounce {
		animation: none;
	}

	/* Instant transitions for reduced motion */
	.gr-animate-fade-in,
	.gr-animate-fade-up,
	.gr-animate-fade-down,
	.gr-animate-slide-in-right,
	.gr-animate-slide-in-left,
	.gr-animate-scale-in {
		opacity: 1;
		transform: none;
	}
}

/* ===== greater primitives theme (vendored, CLI-copy channel) ===== */
/* Greater Components Primitives Theme */

/* CSP-safe textarea autosize (no runtime inline styles) */
.gr-autosize-textarea {
	display: grid;
}

.gr-autosize-textarea::after {
	content: attr(data-gr-value) ' ';
	white-space: pre-wrap;
	word-break: break-word;
	visibility: hidden;
	grid-area: 1 / 1 / 2 / 2;
}

.gr-autosize-textarea > textarea {
	grid-area: 1 / 1 / 2 / 2;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	color: inherit;
	font: inherit;
	outline: none;
	resize: none;
	overflow-y: auto;
	min-width: 0;
	min-height: 0;
	box-sizing: border-box;
}

.gr-offscreen-input {
	position: fixed;
	left: -9999px;
	top: 0;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: 0;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

.gr-sr-only {
	position: fixed;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.gr-floating-layer {
	left: 0;
	top: 0;
}

.gr-floating-layer--fixed {
	position: fixed;
}

.gr-floating-layer--absolute {
	position: absolute;
}

body.gr-scroll-locked {
	overflow: hidden;
}

/* Button Styles */
.gr-button {
	/* Base styles */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--gr-spacing-scale-2);
	font-family: var(--gr-typography-fontFamily-sans);
	font-weight: var(--gr-typography-fontWeight-medium);
	line-height: var(--gr-typography-lineHeight-normal);
	border-radius: var(--gr-radii-md);
	border: 1px solid transparent;
	cursor: pointer;
	transition-property: color, background-color, border-color, box-shadow, transform;
	transition-duration: var(--gr-motion-duration-fast);
	transition-timing-function: var(--gr-motion-easing-out);
	text-decoration: none;
	white-space: nowrap;
	user-select: none;
	position: relative;
}

.gr-button:focus {
	outline: none;
}

.gr-button:focus-visible {
	outline: var(--gr-semantic-focus-ring-width, 2px) solid var(--gr-semantic-focus-ring);
	outline-offset: var(--gr-semantic-focus-ring-offset, 2px);
	box-shadow: none;
}

/* Size variants */
.gr-button--sm {
	padding: var(--gr-spacing-scale-2) var(--gr-spacing-scale-3);
	font-size: var(--gr-typography-fontSize-sm);
	min-height: 2rem;
}

.gr-button--md {
	padding: var(--gr-spacing-scale-3) var(--gr-spacing-scale-4);
	font-size: var(--gr-typography-fontSize-base);
	min-height: 2.5rem;
}

.gr-button--lg {
	padding: var(--gr-spacing-scale-4) var(--gr-spacing-scale-6);
	font-size: var(--gr-typography-fontSize-lg);
	min-height: 3rem;
}

/* Variant styles */
.gr-button--solid {
	background-color: var(--gr-semantic-action-primary-default, #2563eb);
	color: var(--gr-color-base-white, #ffffff);
}

[data-theme='high-contrast'] .gr-button--solid {
	color: var(--gr-color-base-black);
}

.gr-button--solid:hover:not(:disabled):not(.gr-button--loading) {
	background-color: var(--gr-semantic-action-primary-hover, #1d4ed8);
}

.gr-button--solid:active:not(:disabled):not(.gr-button--loading) {
	background-color: var(--gr-semantic-action-primary-active, #1e40af);
	transform: translateY(1px);
}

.gr-button--outline {
	background-color: transparent;
	border-color: var(--gr-semantic-border-default);
	color: var(--gr-semantic-foreground-primary);
}

/* Dark mode outline button improvements */
[data-theme='dark'] .gr-button--outline {
	border-color: var(--gr-semantic-border-strong);
}

.gr-button--outline:hover:not(:disabled):not(.gr-button--loading) {
	background-color: var(--gr-semantic-background-secondary);
	border-color: var(--gr-semantic-border-strong);
	box-shadow: var(--gr-shadows-elevation-sm);
}

[data-theme='dark'] .gr-button--outline:hover:not(:disabled):not(.gr-button--loading) {
	background-color: var(--gr-semantic-background-raised, var(--gr-semantic-background-tertiary));
	border-color: var(--gr-semantic-action-primary-default);
	box-shadow: 0 0 0 1px var(--gr-semantic-action-primary-default);
}

.gr-button--outline:active:not(:disabled):not(.gr-button--loading) {
	background-color: var(--gr-semantic-background-tertiary);
	transform: translateY(1px);
}

.gr-button--ghost {
	background-color: transparent;
	color: var(--gr-semantic-foreground-primary);
}

.gr-button--ghost:hover:not(:disabled):not(.gr-button--loading) {
	background-color: var(--gr-semantic-background-secondary);
}

.gr-button--ghost:active:not(:disabled):not(.gr-button--loading) {
	background-color: var(--gr-semantic-background-tertiary);
	transform: translateY(1px);
}

/* Disabled state */
.gr-button--disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

.gr-button--solid.gr-button--disabled {
	background-color: var(--gr-semantic-action-primary-disabled, #1e40af);
}

/* Loading state */
.gr-button--loading {
	cursor: wait;
	pointer-events: none;
}

.gr-button__content--loading {
	opacity: 0.7;
}

.gr-button__spinner {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	animation: spin 1s linear infinite;
}

.gr-button__prefix,
.gr-button__suffix,
.gr-button__content {
	display: flex;
	align-items: center;
	line-height: 0;
}

@keyframes spin {
	from {
		transform: translateX(-50%) rotate(0deg);
	}
	to {
		transform: translateX(-50%) rotate(360deg);
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.gr-button {
		transition-duration: 0ms;
	}

	.gr-button__spinner {
		animation: none;
	}
}

/* Link Styles */
.gr-link {
	/* Base styles */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--gr-spacing-scale-2);
	font-family: var(--gr-typography-fontFamily-sans);
	font-weight: var(--gr-typography-fontWeight-medium);
	line-height: var(--gr-typography-lineHeight-normal);
	border-radius: var(--gr-radii-md);
	color: var(--gr-semantic-action-link-default);
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition-property: color, background-color, box-shadow, transform;
	transition-duration: var(--gr-motion-duration-fast);
	transition-timing-function: var(--gr-motion-easing-out);
}

.gr-link:focus {
	outline: none;
}

.gr-link:focus-visible {
	outline: var(--gr-semantic-focus-ring-width, 2px) solid var(--gr-semantic-focus-ring);
	outline-offset: var(--gr-semantic-focus-ring-offset, 2px);
	box-shadow: none;
}

.gr-link:hover {
	color: var(--gr-semantic-action-link-hover);
}

.gr-link:active {
	color: var(--gr-semantic-action-link-active);
	transform: translateY(1px);
}

/* Size variants (ignored for inline; inline inherits surrounding text) */
.gr-link--size-sm {
	padding: var(--gr-spacing-scale-2) var(--gr-spacing-scale-3);
	font-size: var(--gr-typography-fontSize-sm);
	min-height: 2rem;
}

.gr-link--size-md {
	padding: var(--gr-spacing-scale-3) var(--gr-spacing-scale-4);
	font-size: var(--gr-typography-fontSize-base);
	min-height: 2.5rem;
}

.gr-link--size-lg {
	padding: var(--gr-spacing-scale-4) var(--gr-spacing-scale-6);
	font-size: var(--gr-typography-fontSize-lg);
	min-height: 3rem;
}

/* Variant: default — outline-Button visual weight without literal border */
.gr-link--default {
	background-color: transparent;
}

.gr-link--default:hover {
	background-color: var(--gr-semantic-background-secondary);
	box-shadow: var(--gr-shadows-elevation-sm);
}

[data-theme='dark'] .gr-link--default:hover {
	background-color: var(--gr-semantic-background-raised, var(--gr-semantic-background-tertiary));
	box-shadow: 0 0 0 1px var(--gr-semantic-action-link-default);
}

.gr-link--default:active {
	background-color: var(--gr-semantic-background-tertiary);
}

/* Variant: ghost — minimal background, color-only */
.gr-link--ghost {
	background-color: transparent;
}

.gr-link--ghost:hover {
	background-color: var(--gr-semantic-background-secondary);
}

.gr-link--ghost:active {
	background-color: var(--gr-semantic-background-tertiary);
}

/* Variant: subtle — muted text, restores link color on hover */
.gr-link--subtle {
	background-color: transparent;
	color: var(--gr-semantic-foreground-secondary);
}

.gr-link--subtle:hover {
	color: var(--gr-semantic-action-link-hover);
	background-color: var(--gr-semantic-background-secondary);
}

.gr-link--subtle:active {
	color: var(--gr-semantic-action-link-active);
	background-color: var(--gr-semantic-background-tertiary);
}

/* Variant: inline — underlined link inside body text; inherits font */
.gr-link--inline {
	display: inline;
	gap: 0;
	padding: 0;
	min-height: 0;
	border-radius: 0;
	font: inherit;
	color: var(--gr-semantic-action-link-default);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	white-space: normal;
}

.gr-link--inline:hover {
	color: var(--gr-semantic-action-link-hover);
	background-color: transparent;
	box-shadow: none;
	text-decoration: underline;
}

.gr-link--inline:active {
	color: var(--gr-semantic-action-link-active);
	background-color: transparent;
	transform: none;
}

.gr-link--inline:visited {
	color: var(--gr-semantic-action-link-active);
}

/* Active-route state: consumers wire aria-current="page" from their router */
.gr-link[aria-current='page'] {
	font-weight: var(--gr-typography-fontWeight-semibold);
}

/* Reduced motion: skip transforms and box-shadow transitions */
@media (prefers-reduced-motion: reduce) {
	.gr-link {
		transition: none;
	}

	.gr-link:active {
		transform: none;
	}
}

/* Alert Styles */
.gr-alert {
	display: flex;
	align-items: flex-start;
	gap: var(--gr-spacing-scale-3);
	padding: var(--gr-spacing-scale-4);
	border-radius: var(--gr-radii-md);
	border: 1px solid transparent;
	border-left-width: 4px;
	font-family: var(--gr-typography-fontFamily-sans);
	position: relative;
	animation: gr-alert-enter var(--gr-motion-duration-normal, 250ms)
		var(--gr-motion-easing-decelerate, cubic-bezier(0, 0, 0.2, 1));
}

@keyframes gr-alert-enter {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.gr-alert__icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 0.125rem;
}

.gr-alert__content {
	flex: 1;
	min-width: 0;
}

.gr-alert__title {
	font-weight: var(--gr-typography-fontWeight-semibold);
	font-size: var(--gr-typography-fontSize-sm);
	line-height: var(--gr-typography-lineHeight-tight);
	margin-bottom: var(--gr-spacing-scale-1);
}

.gr-alert__message {
	font-size: var(--gr-typography-fontSize-sm);
	line-height: var(--gr-typography-lineHeight-normal);
	color: inherit;
	opacity: 0.9;
}

.gr-alert__actions {
	display: flex;
	align-items: center;
	gap: var(--gr-spacing-scale-2);
	flex-shrink: 0;
	margin-left: auto;
}

.gr-alert__action-button {
	font-family: var(--gr-typography-fontFamily-sans);
	font-size: var(--gr-typography-fontSize-sm);
	font-weight: var(--gr-typography-fontWeight-medium);
	padding: var(--gr-spacing-scale-1) var(--gr-spacing-scale-3);
	border-radius: var(--gr-radii-sm);
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: background-color var(--gr-motion-duration-fast, 150ms)
		var(--gr-motion-easing-out, ease-out);
	white-space: nowrap;
}

.gr-alert__action-button:hover {
	background-color: rgba(0, 0, 0, 0.1);
}

.gr-alert__action-button:focus-visible {
	outline: var(--gr-semantic-focus-ring-width, 2px) solid var(--gr-semantic-focus-ring);
	outline-offset: var(--gr-semantic-focus-ring-offset, 2px);
}

.gr-alert__dismiss-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	border: none;
	background: transparent;
	color: inherit;
	opacity: 0.7;
	cursor: pointer;
	border-radius: var(--gr-radii-sm);
	transition:
		opacity var(--gr-motion-duration-fast, 150ms) var(--gr-motion-easing-out, ease-out),
		background-color var(--gr-motion-duration-fast, 150ms) var(--gr-motion-easing-out, ease-out);
}

.gr-alert__dismiss-button:hover {
	opacity: 1;
	background-color: rgba(0, 0, 0, 0.1);
}

.gr-alert__dismiss-button:focus-visible {
	outline: var(--gr-semantic-focus-ring-width, 2px) solid var(--gr-semantic-focus-ring);
	outline-offset: var(--gr-semantic-focus-ring-offset, 2px);
	opacity: 1;
}

/* Error variant */
.gr-alert--error {
	background-color: var(--gr-color-error-50);
	border-color: var(--gr-color-error-200);
	border-left-color: var(--gr-color-error-500);
	color: var(--gr-color-error-800);
}

.gr-alert--error .gr-alert__icon {
	color: var(--gr-color-error-500);
}

.gr-alert--error .gr-alert__action-button:hover {
	background-color: var(--gr-color-error-100);
}

/* Warning variant */
.gr-alert--warning {
	background-color: var(--gr-color-warning-50);
	border-color: var(--gr-color-warning-200);
	border-left-color: var(--gr-color-warning-500);
	color: var(--gr-color-warning-800);
}

.gr-alert--warning .gr-alert__icon {
	color: var(--gr-color-warning-500);
}

.gr-alert--warning .gr-alert__action-button:hover {
	background-color: var(--gr-color-warning-100);
}

/* Success variant */
.gr-alert--success {
	background-color: var(--gr-color-success-50);
	border-color: var(--gr-color-success-200);
	border-left-color: var(--gr-color-success-500);
	color: var(--gr-color-success-800);
}

.gr-alert--success .gr-alert__icon {
	color: var(--gr-color-success-500);
}

.gr-alert--success .gr-alert__action-button:hover {
	background-color: var(--gr-color-success-100);
}

/* Info variant - uses primary color tokens */
.gr-alert--info {
	background-color: var(--gr-color-primary-50);
	border-color: var(--gr-color-primary-200);
	border-left-color: var(--gr-color-primary-500);
	color: var(--gr-color-primary-800);
}

.gr-alert--info .gr-alert__icon {
	color: var(--gr-color-primary-500);
}

.gr-alert--info .gr-alert__action-button:hover {
	background-color: var(--gr-color-primary-100);
}

/* Dark mode overrides */
[data-theme='dark'] .gr-alert--error {
	background-color: rgba(239, 68, 68, 0.1);
	border-color: rgba(239, 68, 68, 0.3);
	border-left-color: var(--gr-color-error-500);
	color: var(--gr-color-error-200);
}

[data-theme='dark'] .gr-alert--error .gr-alert__icon {
	color: var(--gr-color-error-400);
}

[data-theme='dark'] .gr-alert--error .gr-alert__action-button:hover {
	background-color: rgba(239, 68, 68, 0.2);
}

[data-theme='dark'] .gr-alert--warning {
	background-color: rgba(245, 158, 11, 0.1);
	border-color: rgba(245, 158, 11, 0.3);
	border-left-color: var(--gr-color-warning-500);
	color: var(--gr-color-warning-200);
}

[data-theme='dark'] .gr-alert--warning .gr-alert__icon {
	color: var(--gr-color-warning-400);
}

[data-theme='dark'] .gr-alert--warning .gr-alert__action-button:hover {
	background-color: rgba(245, 158, 11, 0.2);
}

[data-theme='dark'] .gr-alert--success {
	background-color: rgba(34, 197, 94, 0.1);
	border-color: rgba(34, 197, 94, 0.3);
	border-left-color: var(--gr-color-success-500);
	color: var(--gr-color-success-200);
}

[data-theme='dark'] .gr-alert--success .gr-alert__icon {
	color: var(--gr-color-success-400);
}

[data-theme='dark'] .gr-alert--success .gr-alert__action-button:hover {
	background-color: rgba(34, 197, 94, 0.2);
}

[data-theme='dark'] .gr-alert--info {
	background-color: rgba(59, 130, 246, 0.1);
	border-color: rgba(59, 130, 246, 0.3);
	border-left-color: var(--gr-color-primary-500);
	color: var(--gr-color-primary-200);
}

[data-theme='dark'] .gr-alert--info .gr-alert__icon {
	color: var(--gr-color-primary-400);
}

[data-theme='dark'] .gr-alert--info .gr-alert__action-button:hover {
	background-color: rgba(59, 130, 246, 0.2);
}

[data-theme='dark'] .gr-alert__action-button:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .gr-alert__dismiss-button:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

/* Reduced motion for Alert */
@media (prefers-reduced-motion: reduce) {
	.gr-alert {
		animation: none;
	}
}

/* Badge Styles */
.gr-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--gr-typography-fontFamily-sans);
	font-weight: var(--gr-typography-fontWeight-medium);
	line-height: 1;
	white-space: nowrap;
	transition: all 0.2s ease;
}

/* Sizes */
.gr-badge--sm {
	font-size: var(--gr-typography-fontSize-xs);
	height: 1.25rem;
	padding: 0 0.5rem;
	gap: 0.25rem;
}

.gr-badge--md {
	font-size: var(--gr-typography-fontSize-sm);
	height: 1.5rem;
	padding: 0 0.75rem;
	gap: 0.375rem;
}

.gr-badge--lg {
	font-size: var(--gr-typography-fontSize-base);
	height: 2rem;
	padding: 0 1rem;
	gap: 0.5rem;
}

/* Variants */
/* Pill */
.gr-badge--pill {
	border-radius: var(--gr-radii-full);
	padding: 0.25rem 0.75rem 0.25rem 0.25rem; /* asymmetric padding for label pill inside */
	gap: 0.5rem;
	height: auto;
}

.gr-badge--pill.gr-badge--sm {
	padding: 0.125rem 0.5rem 0.125rem 0.125rem;
}
.gr-badge--pill.gr-badge--md {
	padding: 0.25rem 0.75rem 0.25rem 0.25rem;
}
.gr-badge--pill.gr-badge--lg {
	padding: 0.375rem 1rem 0.375rem 0.375rem;
}

.gr-badge--pill .gr-badge__label {
	border-radius: var(--gr-radii-full);
	padding: 0.125rem 0.5rem;
	font-weight: var(--gr-typography-fontWeight-bold);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.gr-badge--pill.gr-badge--sm .gr-badge__label {
	padding: 0.125rem 0.375rem;
	font-size: 0.7rem;
}
.gr-badge--pill.gr-badge--md .gr-badge__label {
	padding: 0.125rem 0.5rem;
}
.gr-badge--pill.gr-badge--lg .gr-badge__label {
	padding: 0.25rem 0.75rem;
}

/* Dot */
.gr-badge--dot {
	background: transparent;
	color: var(--gr-color-gray-700); /* Default text color */
	padding: 0;
	height: auto;
	gap: 0.375rem;
}

.gr-badge__dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: var(--gr-radii-full);
	flex-shrink: 0;
}

.gr-badge--sm .gr-badge__dot {
	width: 0.375rem;
	height: 0.375rem;
}
.gr-badge--lg .gr-badge__dot {
	width: 0.625rem;
	height: 0.625rem;
}

/* Outlined */
.gr-badge--outlined {
	background: transparent;
	border: 1px solid currentColor;
	border-radius: var(--gr-radii-md);
}

/* Filled */
.gr-badge--filled {
	border-radius: var(--gr-radii-md);
	color: white;
}

/* Colors */
/* Primary */
.gr-badge--primary.gr-badge--pill {
	background-color: var(--gr-color-primary-50);
	color: var(--gr-color-primary-900);
}
.gr-badge--primary.gr-badge--pill .gr-badge__label {
	background-color: var(--gr-color-primary-600);
	color: white;
}
.gr-badge--primary.gr-badge--dot .gr-badge__dot {
	background-color: var(--gr-color-primary-600);
}
.gr-badge--primary.gr-badge--outlined {
	color: var(--gr-color-primary-600);
	border-color: var(--gr-color-primary-600);
	background-color: var(--gr-color-primary-50);
}
.gr-badge--primary.gr-badge--filled {
	background-color: var(--gr-color-primary-600);
	color: white;
}

/* Success */
.gr-badge--success.gr-badge--pill {
	background-color: var(--gr-color-success-50);
	color: var(--gr-color-success-900);
}
.gr-badge--success.gr-badge--pill .gr-badge__label {
	background-color: var(--gr-color-success-600);
	color: white;
}
.gr-badge--success.gr-badge--dot .gr-badge__dot {
	background-color: var(--gr-color-success-600);
}
.gr-badge--success.gr-badge--outlined {
	color: var(--gr-color-success-600);
	border-color: var(--gr-color-success-600);
	background-color: var(--gr-color-success-50);
}
.gr-badge--success.gr-badge--filled {
	background-color: var(--gr-color-success-600);
	color: white;
}

/* Warning */
.gr-badge--warning.gr-badge--pill {
	background-color: var(--gr-color-warning-50);
	color: var(--gr-color-warning-900);
}
.gr-badge--warning.gr-badge--pill .gr-badge__label {
	background-color: var(--gr-color-warning-600);
	color: white;
}
.gr-badge--warning.gr-badge--dot .gr-badge__dot {
	background-color: var(--gr-color-warning-600);
}
.gr-badge--warning.gr-badge--outlined {
	color: var(--gr-color-warning-600);
	border-color: var(--gr-color-warning-600);
	background-color: var(--gr-color-warning-50);
}
.gr-badge--warning.gr-badge--filled {
	background-color: var(--gr-color-warning-600);
	color: white;
}

/* Error */
.gr-badge--error.gr-badge--pill {
	background-color: var(--gr-color-error-50);
	color: var(--gr-color-error-900);
}
.gr-badge--error.gr-badge--pill .gr-badge__label {
	background-color: var(--gr-color-error-600);
	color: white;
}
.gr-badge--error.gr-badge--dot .gr-badge__dot {
	background-color: var(--gr-color-error-600);
}
.gr-badge--error.gr-badge--outlined {
	color: var(--gr-color-error-600);
	border-color: var(--gr-color-error-600);
	background-color: var(--gr-color-error-50);
}
.gr-badge--error.gr-badge--filled {
	background-color: var(--gr-color-error-600);
	color: white;
}

/* Info */
.gr-badge--info.gr-badge--pill {
	background-color: var(--gr-color-info-50);
	color: var(--gr-color-info-900);
}
.gr-badge--info.gr-badge--pill .gr-badge__label {
	background-color: var(--gr-color-info-600);
	color: white;
}
.gr-badge--info.gr-badge--dot .gr-badge__dot {
	background-color: var(--gr-color-info-600);
}
.gr-badge--info.gr-badge--outlined {
	color: var(--gr-color-info-600);
	border-color: var(--gr-color-info-600);
	background-color: var(--gr-color-info-50);
}
.gr-badge--info.gr-badge--filled {
	background-color: var(--gr-color-info-600);
	color: white;
}

/* Gray */
.gr-badge--gray.gr-badge--pill {
	background-color: var(--gr-color-gray-100);
	color: var(--gr-color-gray-900);
}
.gr-badge--gray.gr-badge--pill .gr-badge__label {
	background-color: var(--gr-color-gray-600);
	color: white;
}
.gr-badge--gray.gr-badge--dot .gr-badge__dot {
	background-color: var(--gr-color-gray-600);
}
.gr-badge--gray.gr-badge--outlined {
	color: var(--gr-color-gray-600);
	border-color: var(--gr-color-gray-600);
	background-color: var(--gr-color-gray-50);
}
.gr-badge--gray.gr-badge--filled {
	background-color: var(--gr-color-gray-600);
	color: white;
}

/* Badge Icon Support */
.gr-badge__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.gr-badge--sm .gr-badge__icon {
	width: 0.75rem;
	height: 0.75rem;
}

.gr-badge--sm .gr-badge__icon svg {
	width: 0.75rem;
	height: 0.75rem;
}

.gr-badge--md .gr-badge__icon {
	width: 0.875rem;
	height: 0.875rem;
}

.gr-badge--md .gr-badge__icon svg {
	width: 0.875rem;
	height: 0.875rem;
}

.gr-badge--lg .gr-badge__icon {
	width: 1rem;
	height: 1rem;
}

.gr-badge--lg .gr-badge__icon svg {
	width: 1rem;
	height: 1rem;
}

.gr-badge--has-icon {
	gap: 0.375rem;
}

/* Badge Pulse Animation */
@keyframes gr-badge-pulse {
	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.6;
		transform: scale(1.1);
	}
}

.gr-badge__dot--pulse {
	animation: gr-badge-pulse var(--gr-motion-duration-slow, 400ms)
		var(--gr-motion-easing-inOut, cubic-bezier(0.4, 0, 0.2, 1)) infinite;
}

/* Dark mode glow effect for success dot */
[data-theme='dark'] .gr-badge--success.gr-badge--dot .gr-badge__dot,
:root[data-theme='dark'] .gr-badge--success.gr-badge--dot .gr-badge__dot {
	box-shadow: 0 0 6px 2px var(--gr-color-success-500);
}

[data-theme='dark'] .gr-badge--success.gr-badge--dot .gr-badge__dot--pulse,
:root[data-theme='dark'] .gr-badge--success.gr-badge--dot .gr-badge__dot--pulse {
	box-shadow: 0 0 8px 3px var(--gr-color-success-400);
}

/* Reduced motion preferences for Badge */
@media (prefers-reduced-motion: reduce) {
	.gr-badge__dot--pulse {
		animation: none;
	}

	/* Provide subtle visual indication without animation */
	.gr-badge--pulse .gr-badge__dot {
		opacity: 0.8;
	}
}

/* CodeBlock Styles */
.gr-code-block {
	border-radius: var(--gr-radii-md);
	overflow: hidden;
	position: relative;
	background-color: #24292e; /* Fallback/Default for github-dark */
	color: #e1e4e8;
	margin-bottom: 1rem;
}

.gr-code-block--outlined {
	border: 1px solid var(--gr-semantic-border-subtle);
}

.gr-code-block__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 1rem;
	background-color: rgba(255, 255, 255, 0.05);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gr-code-block__filename {
	font-family: var(--gr-typography-fontFamily-sans);
	font-size: var(--gr-typography-fontSize-xs);
	color: var(--gr-color-gray-400);
}

.gr-code-block__content {
	overflow-x: auto;
	padding: 1rem;
	font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
	font-size: 0.875rem;
	line-height: 1.5;
}

.gr-code-block--max-height-sm {
	max-height: 12rem;
	overflow-y: auto;
}

.gr-code-block--max-height-md {
	max-height: 18rem;
	overflow-y: auto;
}

.gr-code-block--max-height-lg {
	max-height: 24rem;
	overflow-y: auto;
}

.gr-code-block--max-height-xl {
	max-height: 32rem;
	overflow-y: auto;
}

.gr-code-block--wrap .gr-code-block__content {
	white-space: pre-wrap;
	word-break: break-all;
}

.gr-code-block__pre {
	margin: 0;
	font-family: inherit;
}

.gr-code-block__overlay {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.gr-code-block:hover .gr-code-block__overlay {
	opacity: 1;
}

/* Fix: CopyButton Visibility in dark mode */
.gr-code-block .gr-code-block__copy-btn {
	color: inherit;
}

/* Shiki overrides */
/* Fix: CodeBlock Scrollbars - strictly reset margin/padding */
.gr-code-block pre.shiki {
	background-color: transparent !important; /* Let container handle bg */
	margin: 0 !important;
	padding: 0 !important;
}

/* Highlighting */
.gr-code-block .highlighted-line {
	background-color: rgba(255, 255, 255, 0.1);
	display: block;
	margin: 0 -1rem;
	padding: 0 1rem;
}

/* Avatar Styles */
.gr-avatar {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: var(--gr-semantic-background-secondary);
	color: var(--gr-semantic-foreground-secondary);
	font-family: var(--gr-typography-fontFamily-sans);
	font-weight: var(--gr-typography-fontWeight-medium);
	overflow: hidden;
	flex-shrink: 0;
	user-select: none;
}

/* Shapes */
.gr-avatar--circle {
	border-radius: 50%;
}

.gr-avatar--square {
	border-radius: 0;
}

.gr-avatar--rounded {
	border-radius: var(--gr-radii-md);
}

/* Sizes */
.gr-avatar--xs {
	width: 1.5rem;
	height: 1.5rem;
	font-size: var(--gr-typography-fontSize-xs);
}

.gr-avatar--sm {
	width: 2rem;
	height: 2rem;
	font-size: var(--gr-typography-fontSize-sm);
}

.gr-avatar--md {
	width: 2.5rem;
	height: 2.5rem;
	font-size: var(--gr-typography-fontSize-sm);
}

.gr-avatar--lg {
	width: 3rem;
	height: 3rem;
	font-size: var(--gr-typography-fontSize-base);
}

.gr-avatar--xl {
	width: 4rem;
	height: 4rem;
	font-size: var(--gr-typography-fontSize-lg);
}

.gr-avatar--2xl {
	width: 5rem;
	height: 5rem;
	font-size: var(--gr-typography-fontSize-xl);
}

.gr-avatar__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gr-avatar__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gr-avatar__initials {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-weight: var(--gr-typography-fontWeight-semibold);
	line-height: 1;
}

/* Label fallback styles */
.gr-avatar__label {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-weight: var(--gr-typography-fontWeight-semibold);
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
}

/* Icon fallback styles */
.gr-avatar__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: white;
}

.gr-avatar__default-icon {
	width: 60%;
	height: 60%;
}

/* Size-specific label font sizes */
.gr-avatar--xs .gr-avatar__label {
	font-size: 0.5rem;
}

.gr-avatar--sm .gr-avatar__label {
	font-size: 0.625rem;
}

.gr-avatar--md .gr-avatar__label {
	font-size: 0.75rem;
}

.gr-avatar--lg .gr-avatar__label {
	font-size: 0.875rem;
}

.gr-avatar--xl .gr-avatar__label {
	font-size: 1rem;
}

.gr-avatar--2xl .gr-avatar__label {
	font-size: 1.125rem;
}

/* Size-specific icon sizes */
.gr-avatar--xs .gr-avatar__default-icon {
	width: 55%;
	height: 55%;
}

.gr-avatar--sm .gr-avatar__default-icon {
	width: 58%;
	height: 58%;
}

.gr-avatar--md .gr-avatar__default-icon {
	width: 60%;
	height: 60%;
}

.gr-avatar--lg .gr-avatar__default-icon {
	width: 62%;
	height: 62%;
}

.gr-avatar--xl .gr-avatar__default-icon {
	width: 64%;
	height: 64%;
}

.gr-avatar--2xl .gr-avatar__default-icon {
	width: 66%;
	height: 66%;
}

.gr-avatar__fallback-image {
	width: 70%;
	height: 70%;
	object-fit: contain;
}

.gr-avatar__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background-color: var(--gr-semantic-background-tertiary);
}

.gr-avatar__spinner {
	animation: spin 1s linear infinite;
	color: var(--gr-semantic-foreground-tertiary);
}

/* Status badge */
.gr-avatar__status {
	position: absolute;
	width: 25%;
	height: 25%;
	min-width: 8px;
	min-height: 8px;
	border-radius: 50%;
	border: 2px solid var(--gr-semantic-background-primary);
}

/* Status positions */
.gr-avatar__status--top-right {
	top: 0;
	right: 0;
	transform: translate(25%, -25%);
}

.gr-avatar__status--top-left {
	top: 0;
	left: 0;
	transform: translate(-25%, -25%);
}

.gr-avatar__status--bottom-right {
	bottom: 0;
	right: 0;
	transform: translate(25%, 25%);
}

.gr-avatar__status--bottom-left {
	bottom: 0;
	left: 0;
	transform: translate(-25%, 25%);
}

/* Status colors */
.gr-avatar__status--online {
	background-color: #10b981; /* green-500 */
}

.gr-avatar__status--offline {
	background-color: #6b7280; /* gray-500 */
}

.gr-avatar__status--busy {
	background-color: #ef4444; /* red-500 */
}

.gr-avatar__status--away {
	background-color: #f59e0b; /* amber-500 */
}

/* Image display control */
.gr-avatar__image {
	display: none;
}

.gr-avatar__image--loaded {
	display: block;
}

/* Color palette for initials, labels, and icons (WCAG AA compliant) */
.gr-avatar--color-0 {
	background-color: hsl(0, 65%, 30%);
	color: white;
}

.gr-avatar--color-1 {
	background-color: hsl(30, 65%, 30%);
	color: white;
}

.gr-avatar--color-2 {
	background-color: hsl(60, 65%, 30%);
	color: white;
}

.gr-avatar--color-3 {
	background-color: hsl(90, 65%, 30%);
	color: white;
}

.gr-avatar--color-4 {
	background-color: hsl(120, 65%, 30%);
	color: white;
}

.gr-avatar--color-5 {
	background-color: hsl(150, 65%, 30%);
	color: white;
}

.gr-avatar--color-6 {
	background-color: hsl(180, 65%, 30%);
	color: white;
}

.gr-avatar--color-7 {
	background-color: hsl(210, 65%, 30%);
	color: white;
}

.gr-avatar--color-8 {
	background-color: hsl(240, 65%, 30%);
	color: white;
}

.gr-avatar--color-9 {
	background-color: hsl(270, 65%, 30%);
	color: white;
}

.gr-avatar--color-10 {
	background-color: hsl(300, 65%, 30%);
	color: white;
}

.gr-avatar--color-11 {
	background-color: hsl(330, 65%, 30%);
	color: white;
}

/* Loading state */
.gr-avatar--loading {
	pointer-events: none;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.gr-avatar__spinner {
		animation: none;
	}
}

/* ============================================
   SPINNER COMPONENT STYLES
   ============================================ */

.gr-spinner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.gr-spinner__svg {
	animation: gr-spin var(--gr-motion-duration-slow, 400ms) linear infinite;
}

.gr-spinner__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Spinner size variants */
.gr-spinner--xs {
	width: 12px;
	height: 12px;
}

.gr-spinner--sm {
	width: 16px;
	height: 16px;
}

.gr-spinner--md {
	width: 24px;
	height: 24px;
}

.gr-spinner--lg {
	width: 32px;
	height: 32px;
}

.gr-spinner--xl {
	width: 48px;
	height: 48px;
}

/* Spinner color variants */
.gr-spinner--primary {
	color: var(--gr-semantic-action-primary-default);
}

.gr-spinner--current {
	color: currentColor;
}

.gr-spinner--white {
	color: #ffffff;
}

.gr-spinner--gray {
	color: var(--gr-semantic-foreground-secondary);
}

/* Spinner reduced motion */
@media (prefers-reduced-motion: reduce) {
	.gr-spinner__svg {
		animation: none;
	}
}

/* ============================================
   LOADING STATE COMPONENT STYLES
   ============================================ */

.gr-loading-state {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--gr-spacing-scale-4, 1rem);
}

.gr-loading-state__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--gr-spacing-scale-3, 0.75rem);
}

.gr-loading-state__message {
	margin: 0;
	font-family: var(--gr-typography-fontFamily-sans);
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-semantic-foreground-secondary);
	text-align: center;
}

/* Fullscreen overlay */
.gr-loading-state--fullscreen {
	position: fixed;
	inset: 0;
	z-index: var(--gr-zIndex-modal, 1000);
	background-color: var(--gr-semantic-background-overlay, rgba(0, 0, 0, 0.5));
	backdrop-filter: blur(2px);
}

.gr-loading-state--fullscreen .gr-loading-state__content {
	background-color: var(--gr-semantic-background-primary);
	padding: var(--gr-spacing-scale-6, 1.5rem);
	border-radius: var(--gr-radii-lg, 0.5rem);
	box-shadow: var(--gr-shadows-elevation-lg);
}

/* Loading state reduced motion */
@media (prefers-reduced-motion: reduce) {
	.gr-loading-state--fullscreen {
		backdrop-filter: none;
	}
}

/* High contrast mode */
@media (prefers-contrast: high) {
	.gr-avatar {
		border: 1px solid currentColor;
	}

	.gr-avatar__status {
		border-width: 1px;
		border-color: currentColor;
	}
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
	.gr-avatar__status {
		border-color: var(--gr-semantic-background-primary);
	}
}

/* Card Styles */
.gr-card {
	display: flex;
	flex-direction: column;
	background-color: var(--gr-semantic-background-primary);
	border-radius: var(--gr-radii-lg);
	border: 1px solid transparent;
	overflow: hidden;
	transition-property: box-shadow, border-color, background-color, transform;
	transition-duration: var(--gr-motion-duration-fast);
	transition-timing-function: var(--gr-motion-easing-out);
	font-family: var(--gr-typography-fontFamily-sans);
	text-align: left;
	width: 100%;
}

/* Variants */
.gr-card--elevated {
	box-shadow: var(--gr-shadows-elevation-md);
	border-color: transparent;
}

/* Dark mode card uses surface background */
[data-theme='dark'] .gr-card {
	background-color: var(--gr-semantic-background-surface, var(--gr-semantic-background-secondary));
}

[data-theme='dark'] .gr-card--elevated {
	box-shadow: var(--gr-shadows-elevation-md);
	border: 1px solid var(--gr-semantic-border-subtle);
}

.gr-card--outlined {
	border-color: var(--gr-semantic-border-default);
	box-shadow: none;
}

.gr-card--filled {
	background-color: var(--gr-semantic-background-secondary);
	border-color: transparent;
	box-shadow: none;
}

/* Padding variants */
.gr-card--padding-none .gr-card__content,
.gr-card--padding-none .gr-card__header,
.gr-card--padding-none .gr-card__footer {
	padding: 0;
}

.gr-card--padding-sm .gr-card__content,
.gr-card--padding-sm .gr-card__header,
.gr-card--padding-sm .gr-card__footer {
	padding: var(--gr-spacing-scale-3);
}

.gr-card--padding-md .gr-card__content,
.gr-card--padding-md .gr-card__header,
.gr-card--padding-md .gr-card__footer {
	padding: var(--gr-spacing-scale-4);
}

.gr-card--padding-lg .gr-card__content,
.gr-card--padding-lg .gr-card__header,
.gr-card--padding-lg .gr-card__footer {
	padding: var(--gr-spacing-scale-6);
}

/* Section styles */
.gr-card__header {
	border-bottom: 1px solid var(--gr-semantic-border-default);
	font-weight: var(--gr-typography-fontWeight-semibold);
}

.gr-card__content {
	flex: 1;
}

.gr-card__footer {
	border-top: 1px solid var(--gr-semantic-border-default);
	background-color: var(--gr-semantic-background-tertiary); /* Optional contrast */
}

/* Interactive states */
.gr-card--clickable {
	cursor: pointer;
	user-select: none;
	appearance: none;
	padding: 0; /* Reset button padding */
}

/* Link card styles */
.gr-card--link {
	cursor: pointer;
	text-decoration: none;
	color: inherit;
}

.gr-card--hoverable:hover {
	transform: translateY(-2px);
}

.gr-card--elevated.gr-card--hoverable:hover {
	box-shadow: var(--gr-shadows-elevation-lg);
}

/* Dark mode card hover uses border glow instead of shadow for better visibility */
[data-theme='dark'] .gr-card--elevated.gr-card--hoverable:hover {
	transform: translateY(-1px);
	box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
	border-color: var(--gr-semantic-action-primary-default);
}

[data-theme='dark'] .gr-card--hoverable:hover {
	transform: translateY(-1px);
}

.gr-card--outlined.gr-card--hoverable:hover {
	border-color: var(--gr-semantic-border-strong);
}

[data-theme='dark'] .gr-card--outlined.gr-card--hoverable:hover {
	border-color: var(--gr-semantic-action-primary-default);
	box-shadow: 0 0 0 1px var(--gr-semantic-action-primary-default);
}

/* Filled card dark mode hover */
[data-theme='dark'] .gr-card--filled.gr-card--hoverable:hover {
	background-color: var(--gr-semantic-background-tertiary);
	border-color: var(--gr-semantic-border-default);
}

.gr-card--clickable:focus-visible,
.gr-card--link:focus-visible {
	outline: var(--gr-semantic-focus-ring-width, 2px) solid var(--gr-semantic-focus-ring);
	outline-offset: var(--gr-semantic-focus-ring-offset, 2px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.gr-card {
		transition-duration: 0ms;
	}

	.gr-card--hoverable:hover {
		transform: none;
	}
}

/* Checkbox Styles */
.gr-checkbox {
	width: 18px;
	height: 18px;
	border-radius: var(--gr-radii-sm);
	cursor: pointer;
	accent-color: var(--gr-semantic-action-primary-default);
}

.gr-checkbox:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.gr-checkbox:focus-visible {
	outline: 2px solid var(--gr-semantic-action-primary-default);
	outline-offset: 2px;
}

/* Container Styles */
.gr-container {
	width: 100%;
	box-sizing: border-box;
}

/* Centering */
.gr-container--centered {
	margin-left: auto;
	margin-right: auto;
}

/* Max-width variants */
.gr-container--max-sm {
	max-width: 640px;
}

.gr-container--max-md {
	max-width: 768px;
}

.gr-container--max-lg {
	max-width: 1024px;
}

.gr-container--max-xl {
	max-width: 1280px;
}

.gr-container--max-2xl {
	max-width: 1536px;
}

.gr-container--max-full {
	max-width: 100%;
}

/* Padding/Gutter variants */
.gr-container--padded-sm {
	padding-left: var(--gr-spacing-scale-3);
	padding-right: var(--gr-spacing-scale-3);
}

.gr-container--padded-md {
	padding-left: var(--gr-spacing-scale-4);
	padding-right: var(--gr-spacing-scale-4);
}

.gr-container--padded-lg {
	padding-left: var(--gr-spacing-scale-6);
	padding-right: var(--gr-spacing-scale-6);
}

.gr-container--padded-xl {
	padding-left: var(--gr-spacing-scale-8);
	padding-right: var(--gr-spacing-scale-8);
}

/*
 * Custom gutter pattern (CSP-compliant):
 * For custom gutter values, apply a class to the Container and set
 * the --gr-container-custom-gutter CSS variable in your own stylesheet:
 *
 * <Container class="my-custom-gutter">...</Container>
 *
 * .my-custom-gutter {
 *   --gr-container-custom-gutter: 2rem;
 * }
 *
 * Note: The Container component no longer accepts numeric/string gutter values
 * directly to maintain strict CSP compliance (no inline styles).
 */
.gr-container--padded-custom {
	padding-left: var(--gr-container-custom-gutter);
	padding-right: var(--gr-container-custom-gutter);
}

/* DropZone Styles */
.gr-drop-zone {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	border-radius: var(--gr-radii-lg);
	transition: all 0.2s ease;
	cursor: pointer;
	min-height: 150px;
	text-align: center;
	outline: none;
}

.gr-drop-zone:focus-visible {
	box-shadow: 0 0 0 2px var(--gr-semantic-focus-ring);
}

.gr-drop-zone--outlined {
	border: 2px dashed var(--gr-color-gray-300);
	background-color: var(--gr-color-base-white);
}

.gr-drop-zone--filled {
	border: 2px solid transparent;
	background-color: var(--gr-color-gray-50);
}

.gr-drop-zone--minimal {
	border: none;
	background: transparent;
	padding: 0;
	min-height: auto;
}

.gr-drop-zone--active {
	border-color: var(--gr-color-primary-500);
	background-color: var(--gr-color-primary-50);
}

.gr-drop-zone--disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
	background-color: var(--gr-color-gray-100);
}

.gr-file-input {
	display: none;
}

/* FileUpload Styles */
.gr-file-upload {
	display: flex;
	align-items: center;
	gap: var(--gr-spacing-scale-3);
}

.gr-file-upload__input {
	display: none;
}

.gr-file-upload__button {
	padding: var(--gr-spacing-scale-3) var(--gr-spacing-scale-4);
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
	background: var(--gr-semantic-background-primary);
	color: var(--gr-semantic-foreground-primary);
	font-size: var(--gr-typography-fontSize-sm);
	cursor: pointer;
	transition: background-color 0.2s;
}

.gr-file-upload__button:hover:not(:disabled) {
	background: var(--gr-semantic-background-secondary);
}

.gr-file-upload__button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.gr-file-upload__files {
	color: var(--gr-semantic-foreground-secondary);
	font-size: var(--gr-typography-fontSize-sm);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gr-file-upload__error {
	color: var(--gr-semantic-foreground-danger, #b91c1c);
	font-size: var(--gr-typography-fontSize-sm);
}

/* GradientText Styles */
.gr-gradient-text {
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	color: transparent;
	background-size: 100%;
	background-repeat: no-repeat;
	display: inline-block; /* Ensures clip works well on inline elements */
	--gr-gradient-text-direction: to right;
	--gr-gradient-text-from: var(--gr-color-primary-600);
	--gr-gradient-text-to: var(--gr-color-primary-400);
	background-image: linear-gradient(
		var(--gr-gradient-text-direction),
		var(--gr-gradient-text-from),
		var(--gr-gradient-text-to)
	);
}

.gr-gradient-text--gradient-primary {
	--gr-gradient-text-from: var(--gr-color-primary-600);
	--gr-gradient-text-to: var(--gr-color-primary-400);
}

.gr-gradient-text--gradient-success {
	--gr-gradient-text-from: var(--gr-color-success-600);
	--gr-gradient-text-to: var(--gr-color-success-400);
}

.gr-gradient-text--gradient-warning {
	--gr-gradient-text-from: var(--gr-color-warning-600);
	--gr-gradient-text-to: var(--gr-color-warning-400);
}

.gr-gradient-text--gradient-error {
	--gr-gradient-text-from: var(--gr-color-error-600);
	--gr-gradient-text-to: var(--gr-color-error-400);
}

.gr-gradient-text--direction-to-right {
	--gr-gradient-text-direction: to right;
}

.gr-gradient-text--direction-to-left {
	--gr-gradient-text-direction: to left;
}

.gr-gradient-text--direction-to-top {
	--gr-gradient-text-direction: to top;
}

.gr-gradient-text--direction-to-bottom {
	--gr-gradient-text-direction: to bottom;
}

.gr-gradient-text--direction-to-top-right {
	--gr-gradient-text-direction: to top right;
}

.gr-gradient-text--direction-to-top-left {
	--gr-gradient-text-direction: to top left;
}

.gr-gradient-text--direction-to-bottom-right {
	--gr-gradient-text-direction: to bottom right;
}

.gr-gradient-text--direction-to-bottom-left {
	--gr-gradient-text-direction: to bottom left;
}

/* Heading Styles */
.gr-heading {
	font-family: var(--gr-typography-fontFamily-sans);
	line-height: var(--gr-typography-lineHeight-tight);
	color: var(--gr-semantic-foreground-primary);
	margin-top: 0;
	margin-bottom: var(--gr-spacing-scale-2);
}

/* Sizes */
.gr-heading--size-xs {
	font-size: var(--gr-typography-fontSize-xs);
}
.gr-heading--size-sm {
	font-size: var(--gr-typography-fontSize-sm);
}
.gr-heading--size-base {
	font-size: var(--gr-typography-fontSize-base);
}
.gr-heading--size-lg {
	font-size: var(--gr-typography-fontSize-lg);
}
.gr-heading--size-xl {
	font-size: var(--gr-typography-fontSize-xl);
}
.gr-heading--size-2xl {
	font-size: var(--gr-typography-fontSize-2xl);
}
.gr-heading--size-3xl {
	font-size: var(--gr-typography-fontSize-3xl);
}
.gr-heading--size-4xl {
	font-size: var(--gr-typography-fontSize-4xl);
}
.gr-heading--size-5xl {
	font-size: var(--gr-typography-fontSize-5xl);
}

/* Responsive Heading Sizes - Mobile First */
/* Small screens (≥640px) */
@media (min-width: 640px) {
	.gr-heading--sm-xs {
		font-size: var(--gr-typography-fontSize-xs);
	}
	.gr-heading--sm-sm {
		font-size: var(--gr-typography-fontSize-sm);
	}
	.gr-heading--sm-base {
		font-size: var(--gr-typography-fontSize-base);
	}
	.gr-heading--sm-lg {
		font-size: var(--gr-typography-fontSize-lg);
	}
	.gr-heading--sm-xl {
		font-size: var(--gr-typography-fontSize-xl);
	}
	.gr-heading--sm-2xl {
		font-size: var(--gr-typography-fontSize-2xl);
	}
	.gr-heading--sm-3xl {
		font-size: var(--gr-typography-fontSize-3xl);
	}
	.gr-heading--sm-4xl {
		font-size: var(--gr-typography-fontSize-4xl);
	}
	.gr-heading--sm-5xl {
		font-size: var(--gr-typography-fontSize-5xl);
	}
}

/* Medium screens (≥768px) */
@media (min-width: 768px) {
	.gr-heading--md-xs {
		font-size: var(--gr-typography-fontSize-xs);
	}
	.gr-heading--md-sm {
		font-size: var(--gr-typography-fontSize-sm);
	}
	.gr-heading--md-base {
		font-size: var(--gr-typography-fontSize-base);
	}
	.gr-heading--md-lg {
		font-size: var(--gr-typography-fontSize-lg);
	}
	.gr-heading--md-xl {
		font-size: var(--gr-typography-fontSize-xl);
	}
	.gr-heading--md-2xl {
		font-size: var(--gr-typography-fontSize-2xl);
	}
	.gr-heading--md-3xl {
		font-size: var(--gr-typography-fontSize-3xl);
	}
	.gr-heading--md-4xl {
		font-size: var(--gr-typography-fontSize-4xl);
	}
	.gr-heading--md-5xl {
		font-size: var(--gr-typography-fontSize-5xl);
	}
}

/* Large screens (≥1024px) */
@media (min-width: 1024px) {
	.gr-heading--lg-xs {
		font-size: var(--gr-typography-fontSize-xs);
	}
	.gr-heading--lg-sm {
		font-size: var(--gr-typography-fontSize-sm);
	}
	.gr-heading--lg-base {
		font-size: var(--gr-typography-fontSize-base);
	}
	.gr-heading--lg-lg {
		font-size: var(--gr-typography-fontSize-lg);
	}
	.gr-heading--lg-xl {
		font-size: var(--gr-typography-fontSize-xl);
	}
	.gr-heading--lg-2xl {
		font-size: var(--gr-typography-fontSize-2xl);
	}
	.gr-heading--lg-3xl {
		font-size: var(--gr-typography-fontSize-3xl);
	}
	.gr-heading--lg-4xl {
		font-size: var(--gr-typography-fontSize-4xl);
	}
	.gr-heading--lg-5xl {
		font-size: var(--gr-typography-fontSize-5xl);
	}
}

/* Extra-large screens (≥1280px) */
@media (min-width: 1280px) {
	.gr-heading--xl-xs {
		font-size: var(--gr-typography-fontSize-xs);
	}
	.gr-heading--xl-sm {
		font-size: var(--gr-typography-fontSize-sm);
	}
	.gr-heading--xl-base {
		font-size: var(--gr-typography-fontSize-base);
	}
	.gr-heading--xl-lg {
		font-size: var(--gr-typography-fontSize-lg);
	}
	.gr-heading--xl-xl {
		font-size: var(--gr-typography-fontSize-xl);
	}
	.gr-heading--xl-2xl {
		font-size: var(--gr-typography-fontSize-2xl);
	}
	.gr-heading--xl-3xl {
		font-size: var(--gr-typography-fontSize-3xl);
	}
	.gr-heading--xl-4xl {
		font-size: var(--gr-typography-fontSize-4xl);
	}
	.gr-heading--xl-5xl {
		font-size: var(--gr-typography-fontSize-5xl);
	}
}

/* Fluid Typography using clamp() */
.gr-heading--fluid.gr-heading--fluid-5xl {
	font-size: clamp(2rem, 5vw + 1rem, 3rem);
}
.gr-heading--fluid.gr-heading--fluid-4xl {
	font-size: clamp(1.75rem, 4vw + 0.75rem, 2.25rem);
}
.gr-heading--fluid.gr-heading--fluid-3xl {
	font-size: clamp(1.5rem, 3vw + 0.5rem, 1.875rem);
}
.gr-heading--fluid.gr-heading--fluid-2xl {
	font-size: clamp(1.25rem, 2.5vw + 0.5rem, 1.5rem);
}
.gr-heading--fluid.gr-heading--fluid-xl {
	font-size: clamp(1.125rem, 2vw + 0.5rem, 1.25rem);
}
.gr-heading--fluid.gr-heading--fluid-lg {
	font-size: clamp(1rem, 1.5vw + 0.5rem, 1.125rem);
}
.gr-heading--fluid.gr-heading--fluid-base {
	font-size: clamp(0.875rem, 1vw + 0.5rem, 1rem);
}
.gr-heading--fluid.gr-heading--fluid-sm {
	font-size: clamp(0.75rem, 0.75vw + 0.5rem, 0.875rem);
}
.gr-heading--fluid.gr-heading--fluid-xs {
	font-size: clamp(0.625rem, 0.5vw + 0.5rem, 0.75rem);
}

/* Weights */
.gr-heading--weight-normal {
	font-weight: var(--gr-typography-fontWeight-normal);
}
.gr-heading--weight-medium {
	font-weight: var(--gr-typography-fontWeight-medium);
}
.gr-heading--weight-semibold {
	font-weight: var(--gr-typography-fontWeight-semibold);
}
.gr-heading--weight-bold {
	font-weight: var(--gr-typography-fontWeight-bold);
}

/* Alignment */
.gr-heading--align-left {
	text-align: left;
}
.gr-heading--align-center {
	text-align: center;
}
.gr-heading--align-right {
	text-align: right;
}

/* IconBadge Styles */
.gr-icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all 0.2s ease;
}

/* Sizes */
.gr-icon-badge--size-sm {
	width: 40px;
	height: 40px;
}

.gr-icon-badge--size-md {
	width: 56px;
	height: 56px;
}

.gr-icon-badge--size-lg {
	width: 72px;
	height: 72px;
}

.gr-icon-badge--size-xl {
	width: 96px;
	height: 96px;
}

/* Shapes */
.gr-icon-badge--circle {
	border-radius: var(--gr-radii-full);
}

.gr-icon-badge--rounded {
	border-radius: var(--gr-radii-lg);
}

.gr-icon-badge--square {
	border-radius: var(--gr-radii-md);
}

/* Variants & Colors */
/* Filled */
.gr-icon-badge--filled.gr-icon-badge--primary {
	background-color: var(--gr-color-primary-50);
	color: var(--gr-color-primary-600);
}
.gr-icon-badge--filled.gr-icon-badge--success {
	background-color: var(--gr-color-success-50);
	color: var(--gr-color-success-600);
}
.gr-icon-badge--filled.gr-icon-badge--warning {
	background-color: var(--gr-color-warning-50);
	color: var(--gr-color-warning-600);
}
.gr-icon-badge--filled.gr-icon-badge--error {
	background-color: var(--gr-color-error-50);
	color: var(--gr-color-error-600);
}
.gr-icon-badge--filled.gr-icon-badge--gray {
	background-color: var(--gr-color-gray-100);
	color: var(--gr-color-gray-600);
}

/* Outlined */
.gr-icon-badge--outlined {
	background-color: transparent;
	border: 1px solid currentColor;
}
.gr-icon-badge--outlined.gr-icon-badge--primary {
	color: var(--gr-color-primary-600);
	border-color: var(--gr-color-primary-200);
}
.gr-icon-badge--outlined.gr-icon-badge--success {
	color: var(--gr-color-success-600);
	border-color: var(--gr-color-success-200);
}
.gr-icon-badge--outlined.gr-icon-badge--warning {
	color: var(--gr-color-warning-600);
	border-color: var(--gr-color-warning-200);
}
.gr-icon-badge--outlined.gr-icon-badge--error {
	color: var(--gr-color-error-600);
	border-color: var(--gr-color-error-200);
}
.gr-icon-badge--outlined.gr-icon-badge--gray {
	color: var(--gr-color-gray-600);
	border-color: var(--gr-color-gray-200);
}

/* Ghost */
.gr-icon-badge--ghost {
	background-color: transparent;
}
.gr-icon-badge--ghost.gr-icon-badge--primary {
	color: var(--gr-color-primary-600);
}
.gr-icon-badge--ghost.gr-icon-badge--success {
	color: var(--gr-color-success-600);
}
.gr-icon-badge--ghost.gr-icon-badge--warning {
	color: var(--gr-color-warning-600);
}
.gr-icon-badge--ghost.gr-icon-badge--error {
	color: var(--gr-color-error-600);
}
.gr-icon-badge--ghost.gr-icon-badge--gray {
	color: var(--gr-color-gray-600);
}

/* List Styles */
.gr-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
}

.gr-list--max-sm {
	max-width: 640px;
}

.gr-list--max-md {
	max-width: 768px;
}

.gr-list--max-lg {
	max-width: 1024px;
}

.gr-list--max-xl {
	max-width: 1280px;
}

.gr-list--max-2xl {
	max-width: 1536px;
}

.gr-list--max-full {
	max-width: 100%;
}

.gr-list--spacing-sm {
	gap: 0.5rem;
}

.gr-list--spacing-md {
	gap: 1rem;
}

.gr-list--spacing-lg {
	gap: 1.5rem;
}

.gr-list > li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

/* ListItem Styles */
.gr-list-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	line-height: 1.5;
}

.gr-list-item__icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 0.125rem; /* Optical alignment with text */
}

.gr-list-item__content {
	flex: 1;
	min-width: 0;
}

/* Colors */
.gr-list-item__icon--primary {
	color: var(--gr-color-primary-600);
}

.gr-list-item__icon--success {
	color: var(--gr-color-success-600);
}

.gr-list-item__icon--warning {
	color: var(--gr-color-warning-600);
}

.gr-list-item__icon--error {
	color: var(--gr-color-error-600);
}

.gr-list-item__icon--gray {
	color: var(--gr-color-gray-500);
}

/* Definition List Styles */
.gr-definition-list {
	margin: 0;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.gr-definition-list--dividers .gr-definition-item + .gr-definition-item {
	border-top: 1px solid var(--gr-semantic-border-default);
}

.gr-definition-list--density-md .gr-definition-item {
	padding: var(--gr-spacing-scale-4) var(--gr-spacing-scale-4);
}

.gr-definition-list--density-sm .gr-definition-item {
	padding: var(--gr-spacing-scale-3) var(--gr-spacing-scale-4);
}

.gr-definition-item {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--gr-spacing-scale-2);
	min-width: 0;
}

@media (min-width: 640px) {
	.gr-definition-item {
		grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
		column-gap: var(--gr-spacing-scale-6);
	}

	.gr-definition-item__label {
		grid-column: 1;
	}

	.gr-definition-item__content {
		grid-column: 2;
	}
}

.gr-definition-item__label {
	margin: 0;
	font-size: calc(var(--gr-typography-fontSize-sm) * var(--gr-font-scale, 1));
	font-weight: var(--gr-typography-fontWeight-medium);
	color: var(--gr-semantic-foreground-secondary);
}

.gr-definition-item__content {
	margin: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	gap: var(--gr-spacing-scale-3);
	min-width: 0;
}

.gr-definition-item__value {
	min-width: 0;
	color: var(--gr-semantic-foreground-primary);
	font-size: calc(var(--gr-typography-fontSize-sm) * var(--gr-font-scale, 1));
	line-height: var(--gr-typography-lineHeight-normal);
	user-select: text;
	word-break: break-word;
}

.gr-definition-item__value--nowrap {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: normal;
}

.gr-definition-item__value--monospace {
	font-family: var(--gr-typography-fontFamily-mono);
}

.gr-definition-item__actions {
	display: flex;
	align-items: center;
	gap: var(--gr-spacing-scale-2);
	flex-wrap: wrap;
	justify-content: flex-end;
}

/* MarkdownRenderer Styles */
.gr-markdown {
	line-height: 1.6;
	color: var(--gr-semantic-foreground-primary);
	font-family: var(--gr-typography-fontFamily-sans);
	font-size: var(--gr-typography-fontSize-base);
}

.gr-markdown p {
	margin-bottom: 1rem;
}

.gr-markdown h1,
.gr-markdown h2,
.gr-markdown h3,
.gr-markdown h4,
.gr-markdown h5,
.gr-markdown h6 {
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	font-weight: var(--gr-typography-fontWeight-bold);
	line-height: 1.25;
	color: var(--gr-semantic-foreground-primary);
}

.gr-markdown h1 {
	font-size: var(--gr-typography-fontSize-3xl);
}
.gr-markdown h2 {
	font-size: var(--gr-typography-fontSize-2xl);
}
.gr-markdown h3 {
	font-size: var(--gr-typography-fontSize-xl);
}

.gr-markdown a {
	color: var(--gr-color-primary-600);
	text-decoration: none;
}
.gr-markdown a:hover {
	text-decoration: underline;
}

.gr-markdown code {
	background-color: var(--gr-semantic-background-secondary);
	padding: 0.2em 0.4em;
	border-radius: var(--gr-radii-sm);
	font-size: 0.85em;
	font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
	color: var(--gr-semantic-foreground-primary);
}

.gr-markdown pre {
	background-color: var(--gr-semantic-background-secondary);
	border: 1px solid var(--gr-semantic-border-subtle);
	border-radius: var(--gr-radii-md);
	padding: 1rem;
	overflow-x: auto;
	margin: 1rem 0;
}

.gr-markdown pre code {
	background: none;
	padding: 0;
	color: inherit;
	font-size: 0.9em;
}

.gr-markdown ul,
.gr-markdown ol {
	margin-bottom: 1rem;
	padding-left: 1.5rem;
}

.gr-markdown li {
	margin-bottom: 0.25rem;
}

.gr-markdown blockquote {
	border-left: 4px solid var(--gr-color-gray-300);
	padding-left: 1rem;
	margin: 1rem 0;
	color: var(--gr-color-gray-600);
	font-style: italic;
}

.gr-markdown img {
	max-width: 100%;
	height: auto;
	border-radius: var(--gr-radii-md);
}

.gr-markdown table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1rem;
}

.gr-markdown th,
.gr-markdown td {
	border: 1px solid var(--gr-semantic-border-subtle);
	padding: 0.5rem;
	text-align: left;
}

.gr-markdown th {
	background-color: var(--gr-semantic-background-secondary);
	font-weight: var(--gr-typography-fontWeight-semibold);
}

/* Menu Styles */
.gr-menu-container {
	position: relative;
	display: inline-block;
}

.gr-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: var(--gr-spacing-scale-2);
	background-color: var(--gr-color-base-white);
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
	box-shadow: var(--gr-shadows-lg);
	z-index: 1000;
	min-width: 12rem;
}

.gr-menu--vertical {
	flex-direction: column;
	position: absolute;
	top: 100%;
	left: 0;
}

.gr-menu--horizontal {
	flex-direction: row;
	gap: var(--gr-spacing-scale-1);
}

.gr-menu--submenu {
	position: absolute;
	top: 0;
	left: 100%;
	margin-left: var(--gr-spacing-scale-1);
}

.gr-menu__item-wrapper {
	position: relative;
}

.gr-menu__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: var(--gr-spacing-scale-2) var(--gr-spacing-scale-3);
	font-family: var(--gr-typography-fontFamily-sans);
	font-size: var(--gr-typography-fontSize-sm);
	line-height: var(--gr-typography-lineHeight-normal);
	color: var(--gr-semantic-foreground-primary);
	background-color: transparent;
	border: none;
	border-radius: var(--gr-radii-sm);
	cursor: pointer;
	transition-property: background-color, color;
	transition-duration: var(--gr-motion-duration-fast);
	transition-timing-function: var(--gr-motion-easing-out);
	text-align: left;
	white-space: nowrap;
}

.gr-menu__item:focus {
	outline: none;
}

.gr-menu__item:focus-visible {
	box-shadow: 0 0 0 2px var(--gr-semantic-focus-ring);
}

.gr-menu__item:hover:not(.gr-menu__item--disabled),
.gr-menu__item--active:not(.gr-menu__item--disabled) {
	background-color: var(--gr-semantic-background-secondary);
	color: var(--gr-semantic-foreground-primary);
}

.gr-menu__item--disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

.gr-menu__item-label {
	flex: 1;
}

.gr-menu__item-arrow {
	display: flex;
	align-items: center;
	margin-left: var(--gr-spacing-scale-2);
	opacity: 0.7;
}

.gr-menu--horizontal .gr-menu__item {
	padding: var(--gr-spacing-scale-2) var(--gr-spacing-scale-4);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.gr-menu__item {
		transition-duration: 0ms;
	}
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	.gr-menu {
		background-color: var(--gr-semantic-background-primary);
		border-color: var(--gr-semantic-border-subtle);
	}
}

[data-theme='dark'] .gr-menu {
	background-color: var(--gr-semantic-background-primary);
	border-color: var(--gr-semantic-border-subtle);
}

/* Modal Styles */
.gr-modal {
	padding: 0;
	border: none;
	border-radius: var(--gr-radii-lg);
	box-shadow: var(--gr-shadows-2xl);
	background: transparent;
	max-height: calc(100vh - 2rem);
	max-width: calc(100vw - 2rem);
	margin: auto;
	font-family: var(--gr-typography-fontFamily-sans);
}

.gr-modal::backdrop {
	background-color: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.gr-modal__content {
	background-color: var(--gr-semantic-background-primary);
	border-radius: var(--gr-radii-lg);
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

/* Size variants */
.gr-modal--sm {
	width: 20rem;
}

.gr-modal--md {
	width: 28rem;
}

.gr-modal--lg {
	width: 40rem;
}

.gr-modal--xl {
	width: 56rem;
}

.gr-modal--full {
	width: calc(100vw - 2rem);
	height: calc(100vh - 2rem);
}

.gr-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--gr-spacing-scale-6) var(--gr-spacing-scale-6) var(--gr-spacing-scale-4);
	border-bottom: 1px solid var(--gr-semantic-border-default);
	flex-shrink: 0;
}

.gr-modal__title {
	margin: 0;
	font-size: var(--gr-typography-fontSize-lg);
	font-weight: var(--gr-typography-fontWeight-semibold);
	color: var(--gr-semantic-foreground-primary);
	line-height: var(--gr-typography-lineHeight-tight);
}

.gr-modal__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: none;
	border-radius: var(--gr-radii-base);
	background-color: transparent;
	color: var(--gr-semantic-foreground-secondary);
	cursor: pointer;
	transition:
		background-color var(--gr-motion-duration-fast) var(--gr-motion-easing-out),
		color var(--gr-motion-duration-fast) var(--gr-motion-easing-out);
}

.gr-modal__close:hover {
	background-color: var(--gr-semantic-background-secondary);
	color: var(--gr-semantic-foreground-primary);
}

.gr-modal__close:focus {
	outline: none;
}

.gr-modal__close:focus-visible {
	box-shadow: 0 0 0 2px var(--gr-semantic-focus-ring);
}

.gr-modal__body {
	flex: 1;
	padding: var(--gr-spacing-scale-6);
	overflow-y: auto;
	overflow-x: hidden;
}

.gr-modal__footer {
	padding: var(--gr-spacing-scale-4) var(--gr-spacing-scale-6) var(--gr-spacing-scale-6);
	border-top: 1px solid var(--gr-semantic-border-default);
	flex-shrink: 0;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
	.gr-modal--sm,
	.gr-modal--md,
	.gr-modal--lg,
	.gr-modal--xl {
		width: calc(100vw - 2rem);
		max-height: calc(100vh - 2rem);
	}

	.gr-modal__header {
		padding: var(--gr-spacing-scale-4);
	}

	.gr-modal__body {
		padding: var(--gr-spacing-scale-4);
	}

	.gr-modal__footer {
		padding: var(--gr-spacing-scale-3) var(--gr-spacing-scale-4) var(--gr-spacing-scale-4);
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.gr-modal__close {
		transition: none;
	}
}

/* High contrast mode */
@media (prefers-contrast: high) {
	.gr-modal::backdrop {
		background-color: rgba(0, 0, 0, 0.8);
	}
}

/* Section Styles */
.gr-section {
	width: 100%;
	box-sizing: border-box;
}

/* Spacing variants (vertical margins) */
.gr-section--spacing-none {
	margin-top: 0;
	margin-bottom: 0;
}

.gr-section--spacing-sm {
	margin-top: var(--gr-spacing-scale-8);
	margin-bottom: var(--gr-spacing-scale-8);
}

.gr-section--spacing-md {
	margin-top: var(--gr-spacing-scale-16);
	margin-bottom: var(--gr-spacing-scale-16);
}

.gr-section--spacing-lg {
	margin-top: var(--gr-spacing-scale-24);
	margin-bottom: var(--gr-spacing-scale-24);
}

.gr-section--spacing-xl {
	margin-top: var(--gr-spacing-scale-32);
	margin-bottom: var(--gr-spacing-scale-32);
}

/* Extended spacing variants */
.gr-section--spacing-2xl {
	margin-top: 10rem;
	margin-bottom: 10rem;
}

.gr-section--spacing-3xl {
	margin-top: 12rem;
	margin-bottom: 12rem;
}

.gr-section--spacing-4xl {
	margin-top: 16rem;
	margin-bottom: 16rem;
}

/* Custom spacing - REMOVED for CSP compliance */
/* For custom spacing, use the class prop with external CSS */

/* Background variants */
.gr-section--bg-muted {
	background-color: var(--gr-semantic-background-secondary);
}

.gr-section--bg-accent {
	background-color: var(--gr-color-primary-50);
}

[data-theme='dark'] .gr-section--bg-accent {
	background-color: rgba(59, 130, 246, 0.1);
}

/* Gradient backgrounds */
.gr-section--bg-gradient {
	background: linear-gradient(
		var(--gr-section-gradient-direction, to bottom),
		var(--gr-semantic-background-primary),
		var(--gr-semantic-background-secondary)
	);
}

/* Gradient directions */
.gr-section--gradient-to-top {
	--gr-section-gradient-direction: to top;
}
.gr-section--gradient-to-bottom {
	--gr-section-gradient-direction: to bottom;
}
.gr-section--gradient-to-left {
	--gr-section-gradient-direction: to left;
}
.gr-section--gradient-to-right {
	--gr-section-gradient-direction: to right;
}
.gr-section--gradient-to-top-left {
	--gr-section-gradient-direction: to top left;
}
.gr-section--gradient-to-top-right {
	--gr-section-gradient-direction: to top right;
}
.gr-section--gradient-to-bottom-left {
	--gr-section-gradient-direction: to bottom left;
}
.gr-section--gradient-to-bottom-right {
	--gr-section-gradient-direction: to bottom right;
}

/* Custom background - REMOVED for CSP compliance */
/* For custom backgrounds, use the class prop with external CSS */

/* Padding variants (horizontal) */
.gr-section--padded-sm {
	padding-left: var(--gr-spacing-scale-3);
	padding-right: var(--gr-spacing-scale-3);
}

.gr-section--padded-md {
	padding-left: var(--gr-spacing-scale-4);
	padding-right: var(--gr-spacing-scale-4);
}

.gr-section--padded-lg {
	padding-left: var(--gr-spacing-scale-6);
	padding-right: var(--gr-spacing-scale-6);
}

/* Centering (text-align) */
.gr-section--centered {
	text-align: center;
}

/* Select Styles */
.gr-select {
	width: 100%;
	padding: var(--gr-spacing-scale-3);
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
	background: var(--gr-semantic-background-primary);
	color: var(--gr-semantic-foreground-primary);
	font-family: inherit;
	font-size: var(--gr-typography-fontSize-base);
	cursor: pointer;
	transition:
		border-color 0.2s,
		box-shadow 0.2s;
}

.gr-select:focus {
	outline: none;
	border-color: var(--gr-semantic-action-primary-default);
	box-shadow: 0 0 0 3px var(--gr-semantic-focus-ring);
}

.gr-select:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	background: var(--gr-semantic-background-secondary);
}

/* Skeleton Styles */
.gr-skeleton {
	display: block;
	background-color: var(--gr-semantic-background-tertiary);
	position: relative;
	overflow: hidden;
}

/* Variant styles */
.gr-skeleton--text {
	border-radius: var(--gr-radii-sm);
	transform: scale(1, 0.8);
	transform-origin: 0 50%;
	height: 1em;
	width: 100%;
}

.gr-skeleton--circular {
	border-radius: 50%;
	width: 40px;
	height: 40px;
}

.gr-skeleton--rectangular {
	border-radius: 0;
	width: 100%;
	height: 120px;
}

.gr-skeleton--rounded {
	border-radius: var(--gr-radii-md);
	width: 100%;
	height: 120px;
}

/* Width presets */
.gr-skeleton--width-full {
	width: 100%;
}

.gr-skeleton--width-1\/2 {
	width: 50%;
}

.gr-skeleton--width-1\/3 {
	width: 33.333%;
}

.gr-skeleton--width-2\/3 {
	width: 66.667%;
}

.gr-skeleton--width-1\/4 {
	width: 25%;
}

.gr-skeleton--width-3\/4 {
	width: 75%;
}

.gr-skeleton--width-content {
	width: fit-content;
}

.gr-skeleton--width-auto {
	width: auto;
}

/* Height presets */
.gr-skeleton--height-xs {
	height: 1rem;
}

.gr-skeleton--height-sm {
	height: 1.5rem;
}

.gr-skeleton--height-md {
	height: 2rem;
}

.gr-skeleton--height-lg {
	height: 3rem;
}

.gr-skeleton--height-xl {
	height: 4rem;
}

.gr-skeleton--height-2xl {
	height: 6rem;
}

/* Animation styles */
.gr-skeleton--pulse {
	animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.gr-skeleton--wave {
	animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.gr-skeleton--wave::before {
	content: '';
	position: absolute;
	top: 0;
	left: -150%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	animation: skeleton-wave 1.5s ease-in-out infinite;
}

.gr-skeleton__wave {
	position: absolute;
	top: 0;
	left: -150%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	animation: skeleton-wave 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
	0% {
		opacity: 1;
	}
	50% {
		opacity: 0.4;
	}
	100% {
		opacity: 1;
	}
}

@keyframes skeleton-wave {
	0% {
		transform: translateX(-100%);
	}
	50% {
		transform: translateX(100%);
	}
	100% {
		transform: translateX(100%);
	}
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
	.gr-skeleton--pulse,
	.gr-skeleton--wave {
		animation: none;
	}

	.gr-skeleton--wave::before,
	.gr-skeleton__wave {
		animation: none;
		display: none;
	}

	/* Provide subtle visual indication without animation */
	.gr-skeleton {
		opacity: 0.7;
		background: linear-gradient(
			90deg,
			var(--gr-semantic-background-tertiary),
			var(--gr-semantic-background-secondary),
			var(--gr-semantic-background-tertiary)
		);
	}
}

/* High contrast mode */
@media (prefers-contrast: high) {
	.gr-skeleton {
		background-color: var(--gr-semantic-border-strong);
		border: 1px solid currentColor;
	}
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
	.gr-skeleton--wave::before,
	.gr-skeleton__wave {
		background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
	}

	@media (prefers-reduced-motion: reduce) {
		.gr-skeleton {
			background: linear-gradient(
				90deg,
				var(--gr-semantic-background-tertiary),
				var(--gr-semantic-background-secondary),
				var(--gr-semantic-background-tertiary)
			);
		}
	}
}

/* Focus styles for accessibility */
.gr-skeleton:focus-visible {
	outline: 2px solid var(--gr-semantic-focus-ring);
	outline-offset: 2px;
}

/* StepIndicator Styles */
.gr-step-indicator {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--gr-typography-fontFamily-sans);
}

.gr-step-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: var(--gr-typography-fontWeight-bold);
	border-radius: var(--gr-radii-full);
	transition: all 0.2s ease;
	border: 1px solid transparent;
}

/* Sizes */
.gr-step-badge--sm {
	width: 2rem; /* 32px */
	height: 2rem;
	font-size: var(--gr-typography-fontSize-sm);
}

.gr-step-badge--md {
	width: 2.5rem; /* 40px */
	height: 2.5rem;
	font-size: var(--gr-typography-fontSize-base);
}

.gr-step-badge--lg {
	width: 3rem; /* 48px */
	height: 3rem;
	font-size: var(--gr-typography-fontSize-lg);
}

/* Variants & Colors */
/* Filled */
.gr-step-badge--filled.gr-step-badge--primary {
	background-color: var(--gr-color-primary-600);
	color: white;
}
.gr-step-badge--filled.gr-step-badge--success {
	background-color: var(--gr-color-success-600);
	color: white;
}
.gr-step-badge--filled.gr-step-badge--warning {
	background-color: var(--gr-color-warning-600);
	color: white;
}
.gr-step-badge--filled.gr-step-badge--error {
	background-color: var(--gr-color-error-600);
	color: white;
}
.gr-step-badge--filled.gr-step-badge--gray {
	background-color: var(--gr-color-gray-200);
	color: var(--gr-color-gray-600);
}

/* Outlined */
.gr-step-badge--outlined {
	background-color: transparent;
}
.gr-step-badge--outlined.gr-step-badge--primary {
	border-color: var(--gr-color-primary-600);
	color: var(--gr-color-primary-600);
}
.gr-step-badge--outlined.gr-step-badge--success {
	border-color: var(--gr-color-success-600);
	color: var(--gr-color-success-600);
}
.gr-step-badge--outlined.gr-step-badge--warning {
	border-color: var(--gr-color-warning-600);
	color: var(--gr-color-warning-600);
}
.gr-step-badge--outlined.gr-step-badge--error {
	border-color: var(--gr-color-error-600);
	color: var(--gr-color-error-600);
}
.gr-step-badge--outlined.gr-step-badge--gray {
	border-color: var(--gr-color-gray-300);
	color: var(--gr-color-gray-500);
}

/* Ghost */
.gr-step-badge--ghost {
	background-color: transparent;
}
.gr-step-badge--ghost.gr-step-badge--primary {
	color: var(--gr-color-primary-600);
}
/* ... styles for ghost colors if needed ... */
.gr-step-badge--ghost.gr-step-badge--gray {
	color: var(--gr-color-gray-500);
}

.gr-step-label {
	font-size: var(--gr-typography-fontSize-sm);
	font-weight: var(--gr-typography-fontWeight-medium);
	color: var(--gr-color-gray-700);
	text-align: center;
}

/* StreamingText Styles */
.gr-streaming-text {
	white-space: pre-wrap;
	word-break: break-word;
}

.gr-cursor {
	display: inline-block;
	color: var(--gr-color-primary-600);
	margin-left: 1px;
	font-weight: bold;
	transition: opacity 0.1s;
	opacity: 0;
}

.gr-cursor--visible {
	opacity: 1;
}

/* Switch Styles */
.gr-switch {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: var(--gr-spacing-scale-2);
	width: max-content;
	height: 24px;
	cursor: pointer;
}

.gr-switch--disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.gr-switch__input {
	opacity: 0;
	width: 0;
	height: 0;
}

.gr-switch__slider {
	position: absolute;
	inset: 0;
	background-color: var(--gr-semantic-background-tertiary);
	border-radius: 24px;
	transition: background-color 0.2s;
}

.gr-switch__slider::before {
	content: '';
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	border-radius: 50%;
	transition: transform 0.2s;
}

.gr-switch--checked .gr-switch__slider {
	background-color: var(--gr-semantic-action-primary-default);
}

.gr-switch--checked .gr-switch__slider::before {
	transform: translateX(20px);
}

.gr-switch__input:focus-visible + .gr-switch__slider {
	box-shadow: 0 0 0 3px var(--gr-semantic-focus-ring);
}

.gr-switch__label {
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-semantic-foreground-primary);
}

/* Tabs Styles */
.gr-tabs {
	display: flex;
	font-family: var(--gr-typography-fontFamily-sans);
}

.gr-tabs--horizontal {
	flex-direction: column;
}

.gr-tabs--vertical {
	flex-direction: row;
}

.gr-tabs__tablist {
	display: flex;
	position: relative;
}

.gr-tabs--horizontal .gr-tabs__tablist {
	flex-direction: row;
	border-bottom: 1px solid var(--gr-semantic-border-default);
}

.gr-tabs--vertical .gr-tabs__tablist {
	flex-direction: column;
	border-right: 1px solid var(--gr-semantic-border-default);
	min-width: 12rem;
}

.gr-tabs__tab {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--gr-spacing-scale-3) var(--gr-spacing-scale-4);
	font-size: var(--gr-typography-fontSize-sm);
	font-weight: var(--gr-typography-fontWeight-medium);
	line-height: var(--gr-typography-lineHeight-normal);
	color: var(--gr-semantic-foreground-secondary, #374151);
	background-color: var(--gr-semantic-background-primary, #ffffff);
	border: none;
	cursor: pointer;
	transition-property: color, background-color, border-color;
	transition-duration: var(--gr-motion-duration-fast);
	transition-timing-function: var(--gr-motion-easing-out);
	position: relative;
	white-space: nowrap;
	user-select: none;
}

.gr-tabs__tab:focus {
	outline: none;
}

.gr-tabs__tab:focus-visible {
	outline: 2px solid var(--gr-semantic-focus-ring);
	outline-offset: -2px;
	z-index: 1;
}

.gr-tabs__tab:hover:not(.gr-tabs__tab--disabled):not(.gr-tabs__tab--active) {
	color: var(--gr-semantic-foreground-primary);
	background-color: var(--gr-semantic-background-secondary);
}

.gr-tabs__tab--active {
	color: var(--gr-semantic-foreground-primary, #111827);
}

.gr-tabs__tab--disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

.gr-tabs__panels {
	flex: 1;
	position: relative;
}

.gr-tabs--horizontal .gr-tabs__panels {
	padding-top: var(--gr-spacing-scale-4);
}

.gr-tabs--vertical .gr-tabs__panels {
	padding-left: var(--gr-spacing-scale-4);
}

.gr-tabs__panel {
	outline: none;
}

.gr-tabs__panel:focus {
	box-shadow: 0 0 0 2px var(--gr-semantic-focus-ring);
}

/* Default variant - simple border */
.gr-tabs--default.gr-tabs--horizontal .gr-tabs__tab--active::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	right: 0;
	height: 2px;
	background-color: var(--gr-semantic-action-primary-default, #2563eb);
}

.gr-tabs--default.gr-tabs--vertical .gr-tabs__tab--active::after {
	content: '';
	position: absolute;
	right: -1px;
	top: 0;
	bottom: 0;
	width: 2px;
	background-color: var(--gr-semantic-action-primary-default, #2563eb);
}

/* Pills variant - rounded background */
.gr-tabs--pills .gr-tabs__tab {
	border-radius: var(--gr-radii-full);
	margin: var(--gr-spacing-scale-1);
	background-color: var(--gr-semantic-background-secondary, #f9fafb);
	color: var(--gr-semantic-foreground-primary, #111827);
	border: 1px solid var(--gr-semantic-border-default, #e5e7eb);
}

.gr-tabs--pills .gr-tabs__tab--active,
.gr-tabs--pills .gr-tabs__tab--active:hover,
.gr-tabs--pills .gr-tabs__tab--active:focus,
.gr-tabs--pills .gr-tabs__tab--active:focus-visible {
	background-color: var(--gr-semantic-action-primary-default, #2563eb);
	color: var(--gr-color-base-white, #ffffff);
	border-color: var(--gr-semantic-action-primary-default, #2563eb);
	/* Force immediate color change to ensure axe sees final contrast values, not mid-transition */
	transition: none;
}

[data-theme='high-contrast'] .gr-tabs--pills .gr-tabs__tab--active {
	background-color: var(--gr-semantic-action-primary-default);
	border-color: var(--gr-semantic-action-primary-default);
	color: var(--gr-color-base-black);
	transition: none;
}

[data-theme='high-contrast'] .gr-tabs--pills .gr-tabs__tab--active:hover,
[data-theme='high-contrast'] .gr-tabs--pills .gr-tabs__tab--active:focus,
[data-theme='high-contrast'] .gr-tabs--pills .gr-tabs__tab--active:focus-visible {
	background-color: var(--gr-semantic-action-primary-hover);
	border-color: var(--gr-semantic-action-primary-hover);
	color: var(--gr-color-base-black);
	transition: none;
}

[data-theme='high-contrast'] .gr-tabs--pills .gr-tabs__tab:not(.gr-tabs__tab--active) {
	background-color: transparent;
	border: 1px solid currentColor;
	color: var(--gr-semantic-foreground-primary);
}

.gr-tabs--pills .gr-tabs__tablist {
	border: none;
	padding: var(--gr-spacing-scale-1);
	background-color: var(--gr-semantic-background-secondary);
	border-radius: var(--gr-radii-lg);
}

/* Underline variant - full underline */
.gr-tabs--underline .gr-tabs__tablist {
	border-bottom: 2px solid var(--gr-semantic-border-default);
}

.gr-tabs--underline .gr-tabs__tab {
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}

.gr-tabs--underline .gr-tabs__tab--active {
	border-bottom-color: var(--gr-semantic-action-primary-default, #2563eb);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.gr-tabs__tab {
		transition-duration: 0ms;
	}
}

/* High contrast mode */
@media (prefers-contrast: high) {
	.gr-tabs__tab--active {
		outline: 2px solid currentColor;
		outline-offset: -2px;
	}
}

/* High contrast explicit overrides */
[data-theme='high-contrast'] .gr-action-bar .gr-action-bar__button:hover:not(:disabled),
[data-theme='high-contrast'] .gr-action-bar .gr-action-bar__button--active {
	color: var(--gr-color-base-black);
}

/* Text Styles */
.gr-text {
	margin: 0;
	font-family: var(--gr-typography-fontFamily-sans);
	line-height: var(--gr-typography-lineHeight-normal);
}

/* Sizes */
.gr-text--size-xs {
	font-size: var(--gr-typography-fontSize-xs);
}
.gr-text--size-sm {
	font-size: var(--gr-typography-fontSize-sm);
}
.gr-text--size-base {
	font-size: var(--gr-typography-fontSize-base);
}
.gr-text--size-lg {
	font-size: var(--gr-typography-fontSize-lg);
}
.gr-text--size-xl {
	font-size: var(--gr-typography-fontSize-xl);
}
.gr-text--size-2xl {
	font-size: var(--gr-typography-fontSize-2xl);
}

/* Weights */
.gr-text--weight-normal {
	font-weight: var(--gr-typography-fontWeight-normal);
}
.gr-text--weight-medium {
	font-weight: var(--gr-typography-fontWeight-medium);
}
.gr-text--weight-semibold {
	font-weight: var(--gr-typography-fontWeight-semibold);
}
.gr-text--weight-bold {
	font-weight: var(--gr-typography-fontWeight-bold);
}

/* Colors */
.gr-text--color-primary {
	color: var(--gr-semantic-foreground-primary);
}
.gr-text--color-secondary {
	color: var(--gr-semantic-foreground-secondary);
}
.gr-text--color-tertiary {
	color: var(--gr-semantic-foreground-tertiary);
}
.gr-text--color-success {
	color: var(--gr-semantic-action-success-default);
}
.gr-text--color-warning {
	color: var(--gr-semantic-action-warning-default);
}
.gr-text--color-error {
	color: var(--gr-semantic-action-error-default);
}

/* Alignment */
.gr-text--align-left {
	text-align: left;
}
.gr-text--align-center {
	text-align: center;
}
.gr-text--align-right {
	text-align: right;
}
.gr-text--align-justify {
	text-align: justify;
}

/* Truncation */
.gr-text--truncate:not(.gr-text--clamp-2):not(.gr-text--clamp-3):not(.gr-text--clamp-4):not(
		.gr-text--clamp-5
	):not(.gr-text--clamp-6) {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gr-text--clamp-2,
.gr-text--clamp-3,
.gr-text--clamp-4,
.gr-text--clamp-5,
.gr-text--clamp-6 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gr-text--clamp-2 {
	-webkit-line-clamp: 2;
}

.gr-text--clamp-3 {
	-webkit-line-clamp: 3;
}

.gr-text--clamp-4 {
	-webkit-line-clamp: 4;
}

.gr-text--clamp-5 {
	-webkit-line-clamp: 5;
}

.gr-text--clamp-6 {
	-webkit-line-clamp: 6;
}

/* TextArea Styles */
.gr-textarea-field {
	display: flex;
	flex-direction: column;
	gap: var(--gr-spacing-scale-1);
	font-family: var(--gr-typography-fontFamily-sans);
}

.gr-textarea__label {
	font-weight: var(--gr-typography-fontWeight-medium);
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-semantic-foreground-secondary, #374151);
}

.gr-textarea__label--required .gr-textarea__required {
	color: var(--gr-semantic-action-error-default, #dc2626);
	margin-left: 0.25rem;
}

.gr-textarea {
	width: 100%;
	padding: var(--gr-spacing-scale-3);
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
	background: var(--gr-semantic-background-input, var(--gr-semantic-background-primary));
	color: var(--gr-semantic-foreground-primary);
	font-family: inherit;
	font-size: var(--gr-typography-fontSize-base);
	line-height: 1.5;
	resize: vertical;
	transition:
		border-color var(--gr-motion-duration-fast) var(--gr-motion-easing-out),
		outline var(--gr-motion-duration-fast) var(--gr-motion-easing-out),
		background-color var(--gr-motion-duration-fast) var(--gr-motion-easing-out);
}

/* Dark mode textarea styling */
[data-theme='dark'] .gr-textarea {
	background: var(--gr-semantic-background-input, var(--gr-semantic-background-tertiary));
	border-color: var(--gr-semantic-border-strong);
}

.gr-textarea:focus {
	outline: var(--gr-semantic-focus-ring-width, 2px) solid var(--gr-semantic-focus-ring);
	outline-offset: 1px;
	border-color: var(--gr-semantic-action-primary-default);
	box-shadow: none;
}

[data-theme='dark'] .gr-textarea:focus {
	outline-color: color-mix(in srgb, var(--gr-semantic-focus-ring) 50%, transparent);
}

.gr-textarea:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	background: var(--gr-semantic-background-secondary);
}

[data-theme='dark'] .gr-textarea:disabled {
	background: var(--gr-semantic-background-primary);
}

.gr-textarea::placeholder {
	color: var(--gr-semantic-foreground-tertiary, #6b7280);
}

.gr-textarea__help {
	color: var(--gr-semantic-foreground-tertiary, #6b7280);
	font-size: var(--gr-typography-fontSize-sm);
}

.gr-textarea__error {
	color: var(--gr-semantic-action-error-default, #dc2626);
	font-size: var(--gr-typography-fontSize-sm);
}

/* TextField Styles */
.gr-textfield {
	display: flex;
	flex-direction: column;
	gap: var(--gr-spacing-scale-1);
	font-family: var(--gr-typography-fontFamily-sans);
}

.gr-textfield__label {
	font-size: var(--gr-typography-fontSize-sm);
	font-weight: var(--gr-typography-fontWeight-medium);
	color: var(--gr-semantic-foreground-primary);
	line-height: var(--gr-typography-lineHeight-tight);
}

.gr-textfield__label--required {
	display: flex;
	align-items: center;
	gap: var(--gr-spacing-scale-1);
}

.gr-textfield__required {
	color: var(--gr-semantic-action-error-default);
}

.gr-textfield__container {
	position: relative;
	display: flex;
	align-items: center;
	background-color: var(--gr-semantic-background-input, var(--gr-semantic-background-primary));
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
	transition:
		border-color var(--gr-motion-duration-fast) var(--gr-motion-easing-out),
		box-shadow var(--gr-motion-duration-fast) var(--gr-motion-easing-out),
		outline var(--gr-motion-duration-fast) var(--gr-motion-easing-out);
}

/* Dark mode input styling */
[data-theme='dark'] .gr-textfield__container {
	background-color: var(--gr-semantic-background-input, var(--gr-semantic-background-tertiary));
	border-color: var(--gr-semantic-border-strong);
}

.gr-textfield__container:hover:not(.gr-textfield--disabled .gr-textfield__container) {
	border-color: var(--gr-semantic-border-strong);
}

.gr-textfield--focused .gr-textfield__container {
	border-color: var(--gr-semantic-action-primary-default);
	outline: var(--gr-semantic-focus-ring-width, 2px) solid var(--gr-semantic-focus-ring);
	outline-offset: 1px;
	box-shadow: none;
}

[data-theme='dark'] .gr-textfield--focused .gr-textfield__container {
	border-color: var(--gr-semantic-action-primary-default);
	outline-color: color-mix(in srgb, var(--gr-semantic-focus-ring) 50%, transparent);
}

.gr-textfield--invalid .gr-textfield__container {
	border-color: var(--gr-semantic-action-error-default);
}

.gr-textfield--invalid.gr-textfield--focused .gr-textfield__container {
	box-shadow: 0 0 0 2px var(--gr-semantic-action-error-default);
}

.gr-textfield--disabled .gr-textfield__container {
	background-color: var(--gr-semantic-background-secondary);
	border-color: var(--gr-semantic-border-subtle);
	opacity: 0.6;
}

.gr-textfield--readonly .gr-textfield__container {
	background-color: var(--gr-semantic-background-secondary);
}

.gr-textfield__input {
	flex: 1;
	padding: var(--gr-spacing-scale-3) var(--gr-spacing-scale-4);
	font-size: var(--gr-typography-fontSize-base);
	line-height: var(--gr-typography-lineHeight-normal);
	color: var(--gr-semantic-foreground-primary);
	background: transparent;
	border: none;
	outline: none;
	min-height: 2.5rem;
}

.gr-textfield__input::placeholder {
	color: var(--gr-semantic-foreground-tertiary);
}

.gr-textfield__input:disabled {
	cursor: not-allowed;
	color: var(--gr-semantic-foreground-disabled);
}

.gr-textfield__input:read-only {
	cursor: default;
}

.gr-textfield__prefix,
.gr-textfield__suffix {
	display: flex;
	align-items: center;
	color: var(--gr-semantic-foreground-secondary);
	flex-shrink: 0;
}

.gr-textfield__prefix {
	padding-left: var(--gr-spacing-scale-4);
	padding-right: var(--gr-spacing-scale-2);
}

.gr-textfield__suffix {
	padding-left: var(--gr-spacing-scale-2);
	padding-right: var(--gr-spacing-scale-4);
}

.gr-textfield__help {
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-semantic-foreground-secondary);
	line-height: var(--gr-typography-lineHeight-normal);
}

.gr-textfield__error {
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-semantic-action-error-default);
	line-height: var(--gr-typography-lineHeight-normal);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.gr-textfield__container {
		transition: none;
	}
}

/* ThemeProvider Styles */
.gr-theme-provider {
	/* Ensure the provider doesn't affect layout */
	display: contents;
}

/* ThemeProvider Palette Presets (CSP-compliant) */
.gr-theme-provider--palette-slate {
	--gr-color-gray-50: #f8fafc;
	--gr-color-gray-100: #f1f5f9;
	--gr-color-gray-200: #e2e8f0;
	--gr-color-gray-300: #cbd5e1;
	--gr-color-gray-400: #94a3b8;
	--gr-color-gray-500: #64748b;
	--gr-color-gray-600: #475569;
	--gr-color-gray-700: #334155;
	--gr-color-gray-800: #1e293b;
	--gr-color-gray-900: #0f172a;
	--gr-color-gray-950: #020617;
}

.gr-theme-provider--palette-stone {
	--gr-color-gray-50: #fafaf9;
	--gr-color-gray-100: #f5f5f4;
	--gr-color-gray-200: #e7e5e4;
	--gr-color-gray-300: #d6d3d1;
	--gr-color-gray-400: #a8a29e;
	--gr-color-gray-500: #78716c;
	--gr-color-gray-600: #57534e;
	--gr-color-gray-700: #44403c;
	--gr-color-gray-800: #292524;
	--gr-color-gray-900: #1c1917;
	--gr-color-gray-950: #0c0a09;
}

.gr-theme-provider--palette-neutral {
	--gr-color-gray-50: #fafafa;
	--gr-color-gray-100: #f5f5f5;
	--gr-color-gray-200: #e5e5e5;
	--gr-color-gray-300: #d4d4d4;
	--gr-color-gray-400: #a3a3a3;
	--gr-color-gray-500: #737373;
	--gr-color-gray-600: #525252;
	--gr-color-gray-700: #404040;
	--gr-color-gray-800: #262626;
	--gr-color-gray-900: #171717;
	--gr-color-gray-950: #0a0a0a;
}

.gr-theme-provider--palette-zinc {
	--gr-color-gray-50: #fafafa;
	--gr-color-gray-100: #f4f4f5;
	--gr-color-gray-200: #e4e4e7;
	--gr-color-gray-300: #d4d4d8;
	--gr-color-gray-400: #a1a1aa;
	--gr-color-gray-500: #71717a;
	--gr-color-gray-600: #52525b;
	--gr-color-gray-700: #3f3f46;
	--gr-color-gray-800: #27272a;
	--gr-color-gray-900: #18181b;
	--gr-color-gray-950: #09090b;
}

.gr-theme-provider--palette-gray {
	--gr-color-gray-50: #f9fafb;
	--gr-color-gray-100: #f3f4f6;
	--gr-color-gray-200: #e5e7eb;
	--gr-color-gray-300: #d1d5db;
	--gr-color-gray-400: #9ca3af;
	--gr-color-gray-500: #6b7280;
	--gr-color-gray-600: #4b5563;
	--gr-color-gray-700: #374151;
	--gr-color-gray-800: #1f2937;
	--gr-color-gray-900: #111827;
	--gr-color-gray-950: #030712;
}

/* ThemeProvider Typography Presets - Heading Fonts (CSP-compliant) */
.gr-theme-provider--heading-system {
	--gr-typography-fontFamily-heading:
		system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.gr-theme-provider--heading-sans {
	--gr-typography-fontFamily-heading: 'Inter', system-ui, -apple-system, sans-serif;
}

.gr-theme-provider--heading-serif {
	--gr-typography-fontFamily-heading:
		'Crimson Pro', Georgia, Cambria, 'Times New Roman', Times, serif;
}

.gr-theme-provider--heading-mono {
	--gr-typography-fontFamily-heading:
		'JetBrains Mono', 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

/* ThemeProvider Typography Presets - Body Fonts (CSP-compliant) */
.gr-theme-provider--body-system {
	--gr-typography-fontFamily-sans:
		system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.gr-theme-provider--body-sans {
	--gr-typography-fontFamily-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

.gr-theme-provider--body-serif {
	--gr-typography-fontFamily-sans: 'Crimson Pro', Georgia, Cambria, 'Times New Roman', Times, serif;
}

.gr-theme-provider--body-mono {
	--gr-typography-fontFamily-sans:
		'JetBrains Mono', 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

/* Global theme-aware styles */
:root {
	/* Default light theme (fallback) */
	color-scheme: light;
}

[data-theme='dark'] {
	color-scheme: dark;
}

[data-theme='high-contrast'] {
	color-scheme: dark;
}

/* Density-based spacing adjustments */
[data-density='compact'] {
	--gr-density-scale: 0.85;
}

[data-density='comfortable'] {
	--gr-density-scale: 1;
}

[data-density='spacious'] {
	--gr-density-scale: 1.2;
}

/* Font size adjustments */
[data-font-size='small'] {
	--gr-font-scale: 0.875;
}

[data-font-size='medium'] {
	--gr-font-scale: 1;
}

[data-font-size='large'] {
	--gr-font-scale: 1.125;
}

/* Apply density scale to spacing tokens */
[data-density] {
	--gr-spacing-scale-1: calc(0.25rem * var(--gr-density-scale, 1));
	--gr-spacing-scale-2: calc(0.5rem * var(--gr-density-scale, 1));
	--gr-spacing-scale-3: calc(0.75rem * var(--gr-density-scale, 1));
	--gr-spacing-scale-4: calc(1rem * var(--gr-density-scale, 1));
	--gr-spacing-scale-5: calc(1.25rem * var(--gr-density-scale, 1));
	--gr-spacing-scale-6: calc(1.5rem * var(--gr-density-scale, 1));
	--gr-spacing-scale-8: calc(2rem * var(--gr-density-scale, 1));
	--gr-spacing-scale-10: calc(2.5rem * var(--gr-density-scale, 1));
	--gr-spacing-scale-12: calc(3rem * var(--gr-density-scale, 1));
}

/* Motion preferences */
[data-motion='reduced'] * {
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.01ms !important;
}

/* High contrast mode enhancements */
[data-theme='high-contrast'] {
	--gr-semantic-border-default: var(--gr-color-base-white);
	--gr-semantic-border-strong: var(--gr-color-base-white);
}

[data-theme='high-contrast'] *:focus-visible {
	outline: 3px solid var(--gr-semantic-focus-ring);
	outline-offset: 2px;
}

/* Custom color overrides */
:root {
	--gr-theme-primary: var(--gr-custom-primary, var(--gr-semantic-action-primary-default));
	--gr-theme-secondary: var(--gr-custom-secondary, var(--gr-semantic-action-primary-hover));
	--gr-theme-accent: var(--gr-custom-accent, var(--gr-semantic-action-primary-active));
}

/* Smooth theme transitions */
body {
	transition:
		background-color var(--gr-motion-duration-base) var(--gr-motion-easing-out),
		color var(--gr-motion-duration-base) var(--gr-motion-easing-out);
}

.gr-theme-transitioning,
.gr-theme-transitioning * {
	transition-property: background-color, color, border-color, box-shadow, fill, stroke;
	transition-duration: var(--gr-motion-duration-base);
	transition-timing-function: var(--gr-motion-easing-out);
}

[data-motion='reduced'] body {
	transition: none;
}

[data-motion='reduced'] .gr-theme-transitioning,
[data-motion='reduced'] .gr-theme-transitioning * {
	transition: none !important;
}

/* ThemeSwitcher Styles */
.gr-theme-switcher {
	display: flex;
	flex-direction: column;
	gap: var(--gr-spacing-scale-6);
	padding: var(--gr-spacing-scale-4);
	font-family: var(--gr-typography-fontFamily-sans);
}

/* Compact variant */
.gr-theme-switcher--compact {
	padding: 0;
	gap: 0;
}

.gr-theme-switcher__compact {
	position: relative;
	display: inline-block;
}

.gr-theme-switcher__compact-button {
	display: flex;
	align-items: center;
	gap: var(--gr-spacing-scale-2);
	padding: var(--gr-spacing-scale-2) var(--gr-spacing-scale-3);
	font-family: var(--gr-typography-fontFamily-sans);
	font-size: var(--gr-typography-fontSize-base);
	font-weight: var(--gr-typography-fontWeight-medium);
	color: var(--gr-semantic-foreground-primary);
	background-color: var(--gr-semantic-background-primary);
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
	cursor: pointer;
	transition: all var(--gr-motion-duration-fast) var(--gr-motion-easing-out);
}

.gr-theme-switcher__compact-button:hover {
	background-color: var(--gr-semantic-background-secondary);
	border-color: var(--gr-semantic-border-strong);
}

.gr-theme-switcher__compact-button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px var(--gr-semantic-focus-ring);
}

.gr-theme-switcher__compact-label {
	white-space: nowrap;
}

.gr-theme-switcher__compact-icon {
	transition: transform var(--gr-motion-duration-fast) var(--gr-motion-easing-out);
}

.gr-theme-switcher__compact-icon--open {
	transform: rotate(180deg);
}

.gr-theme-switcher__compact-menu {
	position: absolute;
	top: calc(100% + var(--gr-spacing-scale-1));
	right: 0;
	min-width: 10rem;
	padding: var(--gr-spacing-scale-1);
	background-color: var(--gr-semantic-background-primary);
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
	box-shadow: var(--gr-shadows-lg);
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: var(--gr-spacing-scale-1);
}

.gr-theme-switcher__compact-menu-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: var(--gr-spacing-scale-2) var(--gr-spacing-scale-3);
	font-family: var(--gr-typography-fontFamily-sans);
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-semantic-foreground-primary);
	background-color: transparent;
	border: none;
	border-radius: var(--gr-radii-sm);
	cursor: pointer;
	text-align: left;
	transition: background-color var(--gr-motion-duration-fast) var(--gr-motion-easing-out);
}

.gr-theme-switcher__compact-menu-item:hover {
	background-color: var(--gr-semantic-background-secondary);
}

.gr-theme-switcher__compact-menu-item--active {
	background-color: var(--gr-semantic-background-secondary);
	font-weight: var(--gr-typography-fontWeight-medium);
}

.gr-theme-switcher__compact-menu-item:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px var(--gr-semantic-focus-ring);
}

.gr-theme-switcher__compact-menu-label {
	flex: 1;
}

.gr-theme-switcher__compact-menu-check {
	margin-left: var(--gr-spacing-scale-2);
}

.gr-theme-switcher__section {
	display: flex;
	flex-direction: column;
	gap: var(--gr-spacing-scale-3);
}

.gr-theme-switcher__heading {
	font-size: calc(var(--gr-typography-fontSize-lg) * var(--gr-font-scale, 1));
	font-weight: var(--gr-typography-fontWeight-semibold);
	color: var(--gr-semantic-foreground-primary, #111827);
	margin: 0;
}

.gr-theme-switcher__options {
	display: flex;
	flex-direction: column;
	gap: var(--gr-spacing-scale-2);
}

.gr-theme-switcher__option {
	display: flex;
	align-items: flex-start;
	gap: var(--gr-spacing-scale-3);
	padding: var(--gr-spacing-scale-3);
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
	cursor: pointer;
	transition: all var(--gr-motion-duration-fast) var(--gr-motion-easing-out);
}

.gr-theme-switcher__option:hover {
	background-color: var(--gr-semantic-background-secondary);
	border-color: var(--gr-semantic-border-strong);
}

.gr-theme-switcher__option:has(.gr-theme-switcher__radio:checked) {
	background-color: var(--gr-semantic-background-secondary);
	border-color: var(--gr-semantic-action-primary-default);
}

.gr-theme-switcher__radio,
.gr-theme-switcher__checkbox {
	margin-top: 2px;
}

.gr-theme-switcher__option-content {
	display: flex;
	flex-direction: column;
	gap: var(--gr-spacing-scale-1);
	flex: 1;
}

.gr-theme-switcher__option-label {
	font-size: calc(var(--gr-typography-fontSize-base) * var(--gr-font-scale, 1));
	font-weight: var(--gr-typography-fontWeight-medium);
	color: var(--gr-semantic-foreground-primary, #111827);
}

.gr-theme-switcher__option-description {
	font-size: calc(var(--gr-typography-fontSize-sm) * var(--gr-font-scale, 1));
	color: var(--gr-semantic-foreground-primary, #0f172a);
}

.gr-theme-switcher__option-badge {
	display: inline-block;
	padding: var(--gr-spacing-scale-1) var(--gr-spacing-scale-2);
	font-size: calc(var(--gr-typography-fontSize-xs) * var(--gr-font-scale, 1));
	background-color: var(--gr-semantic-background-tertiary);
	color: var(--gr-semantic-foreground-primary, #0f172a);
	border-radius: var(--gr-radii-sm);
}

.gr-theme-switcher__checkbox-label {
	display: flex;
	align-items: center;
	gap: var(--gr-spacing-scale-2);
	font-size: calc(var(--gr-typography-fontSize-base) * var(--gr-font-scale, 1));
	color: var(--gr-semantic-foreground-primary, #111827);
	cursor: pointer;
}

.gr-theme-switcher__slider {
	display: flex;
	flex-direction: column;
	gap: var(--gr-spacing-scale-2);
}

.gr-theme-switcher__slider label {
	font-size: calc(var(--gr-typography-fontSize-sm) * var(--gr-font-scale, 1));
	color: var(--gr-semantic-foreground-primary, #0f172a);
}

.gr-theme-switcher__range {
	width: 100%;
}

.gr-theme-switcher__colors {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: var(--gr-spacing-scale-4);
}

.gr-theme-switcher__color-input {
	display: flex;
	flex-direction: column;
	gap: var(--gr-spacing-scale-2);
}

.gr-theme-switcher__color-input label {
	font-size: calc(var(--gr-typography-fontSize-sm) * var(--gr-font-scale, 1));
	color: var(--gr-semantic-foreground-primary, #0f172a);
}

.gr-theme-switcher__color-wrapper {
	display: flex;
	gap: var(--gr-spacing-scale-2);
}

.gr-theme-switcher__color-picker {
	width: 48px;
	height: 36px;
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
	cursor: pointer;
}

.gr-theme-switcher__color-text {
	flex: 1;
	padding: var(--gr-spacing-scale-2);
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
	font-family: var(--gr-typography-fontFamily-mono);
	font-size: calc(var(--gr-typography-fontSize-sm) * var(--gr-font-scale, 1));
	background-color: var(--gr-semantic-background-primary);
	color: var(--gr-semantic-foreground-primary);
}

.gr-theme-switcher__preview {
	padding: var(--gr-spacing-scale-4);
	background-color: var(--gr-semantic-background-secondary);
	border-radius: var(--gr-radii-lg);
}

.gr-theme-switcher__preview-card {
	padding: var(--gr-spacing-scale-4);
	background-color: var(--gr-semantic-background-primary);
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
}

.gr-theme-switcher__preview-card h4 {
	margin: 0 0 var(--gr-spacing-scale-2) 0;
	font-size: calc(var(--gr-typography-fontSize-lg) * var(--gr-font-scale, 1));
	font-weight: var(--gr-typography-fontWeight-semibold);
	color: var(--gr-semantic-foreground-primary);
}

.gr-theme-switcher__preview-card p {
	margin: 0 0 var(--gr-spacing-scale-4) 0;
	font-size: calc(var(--gr-typography-fontSize-base) * var(--gr-font-scale, 1));
	color: var(--gr-semantic-foreground-primary, #0f172a);
}

.gr-theme-switcher__preview-buttons {
	display: flex;
	gap: var(--gr-spacing-scale-2);
}

.gr-theme-switcher__preview-button {
	padding: var(--gr-spacing-scale-2) var(--gr-spacing-scale-4);
	border: none;
	border-radius: var(--gr-radii-md);
	font-size: calc(var(--gr-typography-fontSize-sm) * var(--gr-font-scale, 1));
	font-weight: var(--gr-typography-fontWeight-medium);
	cursor: pointer;
	transition: all var(--gr-motion-duration-fast) var(--gr-motion-easing-out);
}

.gr-theme-switcher__preview-button--primary {
	background-color: var(--gr-semantic-action-primary-default);
	color: var(--gr-color-base-white, #ffffff);
}

[data-theme='high-contrast'] .gr-theme-switcher__preview-button--primary {
	color: var(--gr-color-base-black, #000000);
}

.gr-theme-switcher__preview-button--primary:hover {
	background-color: var(--gr-semantic-action-primary-hover);
}

.gr-theme-switcher__preview-button--secondary {
	background-color: transparent;
	color: var(--gr-semantic-foreground-primary);
	border: 1px solid var(--gr-semantic-border-default);
}

.gr-theme-switcher__preview-button--secondary:hover {
	background-color: var(--gr-semantic-background-secondary);
}

[data-theme='high-contrast'] .gr-theme-switcher__preview-button--secondary {
	background-color: var(--gr-semantic-background-primary);
	border-width: 2px;
}

.gr-theme-switcher__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gr-spacing-scale-2);
}

.gr-theme-switcher__action-button {
	padding: var(--gr-spacing-scale-3) var(--gr-spacing-scale-4);
	border: 1px solid var(--gr-semantic-border-default);
	border-radius: var(--gr-radii-md);
	font-size: calc(var(--gr-typography-fontSize-base) * var(--gr-font-scale, 1));
	font-weight: var(--gr-typography-fontWeight-medium);
	background-color: var(--gr-semantic-background-primary);
	color: var(--gr-semantic-foreground-primary);
	cursor: pointer;
	transition: all var(--gr-motion-duration-fast) var(--gr-motion-easing-out);
}

.gr-theme-switcher__action-button:hover {
	background-color: var(--gr-semantic-background-secondary);
	border-color: var(--gr-semantic-border-strong);
}

.gr-theme-switcher__file-input {
	display: none;
}

.gr-theme-switcher__custom {
	padding-top: var(--gr-spacing-scale-4);
	border-top: 1px solid var(--gr-semantic-border-default);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.gr-theme-switcher__option,
	.gr-theme-switcher__preview-button,
	.gr-theme-switcher__action-button {
		transition: none;
	}
}

/* High contrast support */
@media (prefers-contrast: high) {
	.gr-theme-switcher__option {
		border-width: 2px;
	}

	.gr-theme-switcher__option:has(.gr-theme-switcher__radio:checked) {
		outline: 2px solid var(--gr-semantic-action-primary-default);
		outline-offset: 2px;
	}
}

/* Responsive design */
@media (max-width: 640px) {
	.gr-theme-switcher {
		padding: var(--gr-spacing-scale-3);
	}

	.gr-theme-switcher__colors {
		grid-template-columns: 1fr;
	}
}

/* Tooltip Styles */
.gr-tooltip-container {
	position: relative;
	display: inline-block;
}

.gr-tooltip-trigger {
	display: contents;
}

.gr-tooltip {
	position: absolute;
	z-index: 9999;
	padding: var(--gr-spacing-scale-2) var(--gr-spacing-scale-3);
	background-color: var(--gr-color-gray-900);
	color: var(--gr-color-base-white);
	font-family: var(--gr-typography-fontFamily-sans);
	font-size: var(--gr-typography-fontSize-sm);
	line-height: var(--gr-typography-lineHeight-tight);
	border-radius: var(--gr-radii-md);
	box-shadow: var(--gr-shadows-lg);
	opacity: 0;
	pointer-events: none;
	transition-property: opacity;
	transition-duration: var(--gr-motion-duration-fast);
	transition-timing-function: var(--gr-motion-easing-out);
	max-width: 20rem;
	word-wrap: break-word;
	white-space: pre-wrap;
}

.gr-tooltip--visible {
	opacity: 1;
	pointer-events: auto;
}

.gr-tooltip__content {
	position: relative;
}

.gr-tooltip__arrow {
	position: absolute;
	width: 0;
	height: 0;
	border: 4px solid transparent;
}

/* Placement classes - CSS-based positioning relative to trigger */
.gr-tooltip--top {
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-bottom: 8px;
}

.gr-tooltip--bottom {
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-top: 8px;
}

.gr-tooltip--left {
	right: 100%;
	top: 50%;
	transform: translateY(-50%);
	margin-right: 8px;
}

.gr-tooltip--right {
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	margin-left: 8px;
}

/* Arrow positioning for each placement */
.gr-tooltip--top .gr-tooltip__arrow {
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	border-top-color: var(--gr-color-gray-900);
}

.gr-tooltip--bottom .gr-tooltip__arrow {
	top: -8px;
	left: 50%;
	transform: translateX(-50%);
	border-bottom-color: var(--gr-color-gray-900);
}

.gr-tooltip--left .gr-tooltip__arrow {
	right: -8px;
	top: 50%;
	transform: translateY(-50%);
	border-left-color: var(--gr-color-gray-900);
}

.gr-tooltip--right .gr-tooltip__arrow {
	left: -8px;
	top: 50%;
	transform: translateY(-50%);
	border-right-color: var(--gr-color-gray-900);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.gr-tooltip {
		transition-duration: 0ms;
	}
}

/* Dark mode - invert colors */
@media (prefers-color-scheme: dark) {
	.gr-tooltip {
		background-color: var(--gr-color-base-white);
		color: var(--gr-color-gray-900);
	}

	.gr-tooltip--top .gr-tooltip__arrow {
		border-top-color: var(--gr-color-base-white);
	}

	.gr-tooltip--bottom .gr-tooltip__arrow {
		border-bottom-color: var(--gr-color-base-white);
	}

	.gr-tooltip--left .gr-tooltip__arrow {
		border-left-color: var(--gr-color-base-white);
	}

	.gr-tooltip--right .gr-tooltip__arrow {
		border-right-color: var(--gr-color-base-white);
	}
}

/* High contrast mode */
@media (prefers-contrast: high) {
	.gr-tooltip {
		border: 1px solid currentColor;
	}
}

/* ============================================
   THEME TOOLING COMPONENT STYLES
   CSP-compliant preset classes for theme tools
   ============================================ */

/* Swatch base styles */
.gr-swatch {
	height: 100%;
	width: 100%;
}

/* Primary color scale swatches */
.gr-swatch--primary-50 {
	background-color: var(--gr-color-primary-50, #eff6ff);
}

.gr-swatch--primary-100 {
	background-color: var(--gr-color-primary-100, #dbeafe);
}

.gr-swatch--primary-200 {
	background-color: var(--gr-color-primary-200, #bfdbfe);
}

.gr-swatch--primary-300 {
	background-color: var(--gr-color-primary-300, #93c5fd);
}

.gr-swatch--primary-400 {
	background-color: var(--gr-color-primary-400, #60a5fa);
}

.gr-swatch--primary-500 {
	background-color: var(--gr-color-primary-500, #3b82f6);
}

.gr-swatch--primary-600 {
	background-color: var(--gr-color-primary-600, #2563eb);
}

.gr-swatch--primary-700 {
	background-color: var(--gr-color-primary-700, #1d4ed8);
}

.gr-swatch--primary-800 {
	background-color: var(--gr-color-primary-800, #1e40af);
}

.gr-swatch--primary-900 {
	background-color: var(--gr-color-primary-900, #1e3a8a);
}

/* Gray color scale swatches */
.gr-swatch--gray-50 {
	background-color: var(--gr-color-gray-50, #f9fafb);
}

.gr-swatch--gray-100 {
	background-color: var(--gr-color-gray-100, #f3f4f6);
}

.gr-swatch--gray-200 {
	background-color: var(--gr-color-gray-200, #e5e7eb);
}

.gr-swatch--gray-300 {
	background-color: var(--gr-color-gray-300, #d1d5db);
}

.gr-swatch--gray-400 {
	background-color: var(--gr-color-gray-400, #9ca3af);
}

.gr-swatch--gray-500 {
	background-color: var(--gr-color-gray-500, #6b7280);
}

.gr-swatch--gray-600 {
	background-color: var(--gr-color-gray-600, #4b5563);
}

.gr-swatch--gray-700 {
	background-color: var(--gr-color-gray-700, #374151);
}

.gr-swatch--gray-800 {
	background-color: var(--gr-color-gray-800, #1f2937);
}

.gr-swatch--gray-900 {
	background-color: var(--gr-color-gray-900, #111827);
}

/* Semantic color swatches */
.gr-swatch--success {
	background-color: var(--gr-color-success-500, #22c55e);
}

.gr-swatch--warning {
	background-color: var(--gr-color-warning-500, #f59e0b);
}

.gr-swatch--error {
	background-color: var(--gr-color-error-500, #ef4444);
}

.gr-swatch--info {
	background-color: var(--gr-color-info-500, #3b82f6);
}

/* Theme Workbench specific styles */
.gr-theme-workbench__swatch-grid .gr-swatch {
	transition: transform 0.15s ease-out;
}

.gr-theme-workbench__swatch-grid .gr-swatch:hover {
	transform: scaleY(1.1);
	z-index: 1;
}

/* ===== greater shell base (vendored, CLI-copy channel) ===== */
/*
 * Greater Shell — base styles.
 *
 * Strict-CSP safe: tokens only, no inline styles or runtime expressions.
 * Consumers may override any --gr-shell-* token without forking the package.
 */

.gr-shell,
.gr-shell-sidebar,
.gr-shell-topbar,
.gr-shell-panel,
.gr-shell-statcard,
.gr-shell-summary-strip,
.gr-shell-page-frame,
.gr-shell-page-title,
.gr-shell-breadcrumb,
.gr-shell-callout {
	box-sizing: border-box;
}

.gr-shell *,
.gr-shell-sidebar *,
.gr-shell-topbar *,
.gr-shell-panel *,
.gr-shell-page-frame * {
	box-sizing: border-box;
}

/*
 * Visually-hidden utility shipped by the shell CSS bundle.
 *
 * `@equaltoai/greater-components-headless`'s `createLiveRegion()` (used by
 * CommandPalette and other shell components for polite / assertive
 * announcements) appends elements to `document.body` with class
 * `gr-sr-only`. Shell-only consumers who import `shell.css` without the
 * primitives `theme.css` would otherwise see those announcement strings
 * rendered visibly. The class is duplicated here (matching the primitives
 * definition byte-for-byte) so that any shell consumer importing
 * `@equaltoai/greater-components-shell/shell.css` has working live-region
 * semantics regardless of which other Greater style bundles they ship.
 */
.gr-sr-only {
	position: fixed;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/*
 * Default --gr-shell-* tokens (consumers may override).
 *
 * Defaults live on zero-specificity `:where(:root)` so standalone shell
 * components that import `shell.css` inherit sensible values. Shell
 * component root classes intentionally do not redeclare these public tokens:
 * a closer ancestor such as `.my-theme`, `.gr-shell`, or
 * `.gr-shell-page-frame` can set `--gr-shell-*` once and have that value
 * inherit through the whole shell subtree.
 */
:where(:root) {
	--gr-shell-sidebar-width-sm: 14rem;
	--gr-shell-sidebar-width-md: 16rem;
	--gr-shell-sidebar-width-lg: 20rem;
	--gr-shell-sidebar-width-compact: 4rem;
	--gr-shell-topbar-height: 3.5rem;
	--gr-shell-content-max-narrow: 48rem;
	--gr-shell-content-max-default: 72rem;
	--gr-shell-content-max-wide: 96rem;
	--gr-shell-gutter: 1.5rem;
	--gr-shell-gap-sm: 0.5rem;
	--gr-shell-gap-md: 1rem;
	--gr-shell-gap-lg: 1.5rem;
}

/* Focus ring used by interactive shell elements. */
:where(
	.gr-shell-sidebar a,
	.gr-shell-sidebar button,
	.gr-shell-topbar a,
	.gr-shell-topbar button,
	.gr-shell-breadcrumb a,
	.gr-shell-callout button
):focus-visible {
	outline: 2px solid var(--gr-semantic-border-focus, var(--gr-color-primary-600, #2563eb));
	outline-offset: 2px;
	border-radius: 0.25rem;
}

/* ===== src/lib/greater/shell/components/BottomNav.css (vendored, CLI-copy channel) ===== */
.gr-shell-bottom-nav {
	display: flex;
	align-items: stretch;
	width: 100%;
	min-height: 3rem;
	padding: var(--gr-spacing-scale-1, 0.25rem) var(--gr-shell-gutter, 1rem);
	padding-bottom: max(var(--gr-spacing-scale-1, 0.25rem), env(safe-area-inset-bottom));
	background: var(--gr-semantic-background-surface, var(--gr-color-base-white, #fff));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
	border-top: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
	box-shadow: var(--gr-shadows-lg, 0 -4px 12px rgb(0 0 0 / 0.08));
}

.gr-shell-bottom-nav--fixed {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 20;
}

.gr-shell-bottom-nav > :where(a, button) {
	display: inline-flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: var(--gr-spacing-scale-2, 0.5rem);
	color: inherit;
	text-align: center;
	text-decoration: none;
}

.gr-shell-bottom-nav > :where(a, button):focus-visible {
	outline: var(--gr-semantic-focus-ring-width, 2px) solid var(--gr-semantic-focus-ring, #2563eb);
	outline-offset: var(--gr-semantic-focus-ring-offset, 2px);
}

.gr-shell-bottom-nav > [aria-current='page'] {
	color: var(--gr-semantic-action-primary-default, var(--gr-color-primary-600, #2563eb));
}

/* ===== src/lib/greater/shell/components/Breadcrumb.css (vendored, CLI-copy channel) ===== */
.gr-shell-breadcrumb {
	min-width: 0;
}

.gr-shell-breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
}

.gr-shell-breadcrumb__item {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	min-width: 0;
}

.gr-shell-breadcrumb__link {
	color: var(--gr-semantic-foreground-secondary, var(--gr-color-gray-700, #374151));
	text-decoration: none;
}
.gr-shell-breadcrumb__link:hover {
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
	text-decoration: underline;
}

.gr-shell-breadcrumb__current {
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
	font-weight: 600;
}

.gr-shell-breadcrumb__separator {
	color: var(--gr-semantic-foreground-tertiary, var(--gr-color-gray-500, #6b7280));
	margin-inline: 0.25rem;
}

/* ===== src/lib/greater/shell/components/Callout.css (vendored, CLI-copy channel) ===== */
.gr-shell-callout {
	display: flex;
	align-items: flex-start;
	gap: var(--gr-shell-gap-md);
	padding: var(--gr-shell-gap-md) var(--gr-shell-gutter);
	border-radius: 0.5rem;
	border: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
	background: var(--gr-semantic-background-surface, var(--gr-color-base-white, #fff));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
	min-width: 0;
}

.gr-shell-callout__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 0.375rem;
}

.gr-shell-callout__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.gr-shell-callout__title {
	margin: 0;
	font-weight: 600;
	font-size: 0.9375rem;
}

.gr-shell-callout__content {
	font-size: 0.9375rem;
	color: var(--gr-semantic-foreground-secondary, var(--gr-color-gray-700, #374151));
	min-width: 0;
}

.gr-shell-callout__actions {
	display: flex;
	align-items: center;
	gap: var(--gr-shell-gap-sm);
	margin-top: 0.25rem;
}

.gr-shell-callout__dismiss {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border: none;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
	border-radius: 0.375rem;
}
.gr-shell-callout__dismiss:hover {
	background: var(--gr-semantic-background-secondary, var(--gr-color-gray-100, #f3f4f6));
}

/* Tones */
.gr-shell-callout--tone-info {
	border-color: var(--gr-color-info-200, #bfdbfe);
	background: var(--gr-color-info-50, #eff6ff);
	color: var(--gr-color-info-900, #1e3a8a);
}
.gr-shell-callout--tone-info .gr-shell-callout__icon {
	background: var(--gr-color-info-100, #dbeafe);
	color: var(--gr-color-info-700, #1d4ed8);
}

.gr-shell-callout--tone-success {
	border-color: var(--gr-color-success-200, #bbf7d0);
	background: var(--gr-color-success-50, #f0fdf4);
	color: var(--gr-color-success-900, #14532d);
}
.gr-shell-callout--tone-success .gr-shell-callout__icon {
	background: var(--gr-color-success-100, #dcfce7);
	color: var(--gr-color-success-700, #15803d);
}

.gr-shell-callout--tone-warning {
	border-color: var(--gr-color-warning-200, #fde68a);
	background: var(--gr-color-warning-50, #fffbeb);
	color: var(--gr-color-warning-900, #78350f);
}
.gr-shell-callout--tone-warning .gr-shell-callout__icon {
	background: var(--gr-color-warning-100, #fef3c7);
	color: var(--gr-color-warning-700, #b45309);
}

.gr-shell-callout--tone-danger {
	border-color: var(--gr-color-error-200, #fecaca);
	background: var(--gr-color-error-50, #fef2f2);
	color: var(--gr-color-error-900, #7f1d1d);
}
.gr-shell-callout--tone-danger .gr-shell-callout__icon {
	background: var(--gr-color-error-100, #fee2e2);
	color: var(--gr-color-error-700, #b91c1c);
}

.gr-shell-callout--tone-neutral {
	background: var(--gr-semantic-background-secondary, var(--gr-color-gray-50, #f9fafb));
}
.gr-shell-callout--tone-neutral .gr-shell-callout__icon {
	background: var(--gr-semantic-background-tertiary, var(--gr-color-gray-100, #f3f4f6));
}

/* ===== src/lib/greater/shell/components/CommandPalette.css (vendored, CLI-copy channel) ===== */
.gr-shell-command-palette {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 10vh;
	background: var(--gr-semantic-background-overlay, rgba(0, 0, 0, 0.5));
	z-index: 1000;
	overflow-y: auto;
}

.gr-shell-command-palette__sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.gr-shell-command-palette__panel {
	width: min(40rem, calc(100% - 2 * var(--gr-shell-gutter)));
	max-height: 70vh;
	background: var(--gr-semantic-background-surface, var(--gr-color-base-white, #fff));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
	border: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
	border-radius: 0.75rem;
	box-shadow: var(--gr-shadows-lg, 0 10px 25px -5px rgb(0 0 0 / 0.2));
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
}

.gr-shell-command-palette__input-row {
	display: flex;
	align-items: center;
	padding: 0 var(--gr-shell-gutter);
	border-bottom: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
}

.gr-shell-command-palette__input-label {
	display: block;
	padding: 0.5rem 0;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--gr-semantic-foreground-secondary, var(--gr-color-gray-700, #374151));
}

.gr-shell-command-palette__input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	padding: 1rem 0;
	border: none;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1rem;
	outline: none;
}
.gr-shell-command-palette__input:focus-visible {
	outline: none;
}
.gr-shell-command-palette__input::placeholder {
	color: var(--gr-semantic-foreground-tertiary, var(--gr-color-gray-500, #6b7280));
}

.gr-shell-command-palette__results {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 0.5rem 0;
}

.gr-shell-command-palette__loading,
.gr-shell-command-palette__empty {
	padding: 1rem var(--gr-shell-gutter);
	color: var(--gr-semantic-foreground-secondary, var(--gr-color-gray-700, #374151));
	font-size: 0.9375rem;
}

.gr-shell-command-palette__group {
	display: block;
}
.gr-shell-command-palette__group + .gr-shell-command-palette__group {
	border-top: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
	margin-top: 0.25rem;
	padding-top: 0.25rem;
}

.gr-shell-command-palette__group-header {
	padding: 0.5rem var(--gr-shell-gutter) 0.25rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--gr-semantic-foreground-tertiary, var(--gr-color-gray-500, #6b7280));
}

.gr-shell-command-palette__listbox {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gr-shell-command-palette__option {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem var(--gr-shell-gutter);
	cursor: pointer;
	min-width: 0;
	/*
	 * `role="option"` elements render as <div> so the listbox can wrap them in
	 * <div role="group"> sections. Reset any default block-flow weirdness so
	 * groups look identical to the flat list layout.
	 */
	box-sizing: border-box;
}

.gr-shell-command-palette__option--active {
	background: var(--gr-semantic-background-secondary, var(--gr-color-gray-100, #f3f4f6));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
}

.gr-shell-command-palette__option--disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.gr-shell-command-palette__option-body {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	flex: 1 1 auto;
	min-width: 0;
}

.gr-shell-command-palette__option-label {
	font-size: 0.9375rem;
	font-weight: 500;
}

.gr-shell-command-palette__option-description {
	font-size: 0.8125rem;
	color: var(--gr-semantic-foreground-tertiary, var(--gr-color-gray-500, #6b7280));
}

.gr-shell-command-palette__option-shortcut {
	flex: 0 0 auto;
	font-size: 0.75rem;
	font-family: var(
		--gr-typography-fontFamily-mono,
		ui-monospace,
		SFMono-Regular,
		Menlo,
		Monaco,
		Consolas,
		monospace
	);
	padding: 0.125rem 0.375rem;
	border-radius: 0.25rem;
	border: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
	background: var(--gr-semantic-background-secondary, var(--gr-color-gray-100, #f3f4f6));
	color: var(--gr-semantic-foreground-secondary, var(--gr-color-gray-700, #374151));
}

.gr-shell-command-palette__status {
	padding: 0.5rem var(--gr-shell-gutter);
	font-size: 0.75rem;
	color: var(--gr-semantic-foreground-tertiary, var(--gr-color-gray-500, #6b7280));
	border-top: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
}

@media (prefers-reduced-motion: no-preference) {
	.gr-shell-command-palette__panel {
		animation: gr-shell-command-palette-pop 100ms ease-out;
	}
}
@keyframes gr-shell-command-palette-pop {
	from {
		transform: translateY(-0.5rem);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* ===== src/lib/greater/shell/components/PageFrame.css (vendored, CLI-copy channel) ===== */
.gr-shell-page-frame {
	width: 100%;
	margin: 0 auto;
	padding: var(--gr-shell-gap-lg) var(--gr-shell-gutter);
	display: flex;
	flex-direction: column;
	gap: var(--gr-shell-gap-lg);
	min-width: 0;
}

.gr-shell-page-frame--width-narrow {
	max-width: var(--gr-shell-content-max-narrow);
}
.gr-shell-page-frame--width-default {
	max-width: var(--gr-shell-content-max-default);
}
.gr-shell-page-frame--width-wide {
	max-width: var(--gr-shell-content-max-wide);
}
.gr-shell-page-frame--width-full {
	max-width: none;
}

.gr-shell-page-frame__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--gr-shell-gap-lg);
	min-width: 0;
}
.gr-shell-page-frame--aside-right .gr-shell-page-frame__layout {
	grid-template-columns: minmax(0, 1fr) minmax(0, 18rem);
}
.gr-shell-page-frame--aside-left .gr-shell-page-frame__layout {
	grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
}

.gr-shell-page-frame__content {
	min-width: 0;
}
.gr-shell-page-frame--aside-left .gr-shell-page-frame__content {
	order: 2;
}
.gr-shell-page-frame--aside-left .gr-shell-page-frame__aside {
	order: 1;
}

.gr-shell-page-frame__aside {
	min-width: 0;
}

.gr-shell-page-frame__header,
.gr-shell-page-frame__footer {
	min-width: 0;
}

@media (max-width: 60rem) {
	.gr-shell-page-frame--aside-right .gr-shell-page-frame__layout,
	.gr-shell-page-frame--aside-left .gr-shell-page-frame__layout {
		grid-template-columns: 1fr;
	}
}

/* ===== src/lib/greater/shell/components/PageTitle.css (vendored, CLI-copy channel) ===== */
.gr-shell-page-title {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--gr-shell-gap-md);
	flex-wrap: wrap;
	min-width: 0;
}

.gr-shell-page-title__text {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
	flex: 1 1 24rem;
}

.gr-shell-page-title__eyebrow {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--gr-semantic-foreground-tertiary, var(--gr-color-gray-500, #6b7280));
}

.gr-shell-page-title__heading {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.25;
	font-weight: 700;
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
}

.gr-shell-page-title__subtitle {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--gr-semantic-foreground-secondary, var(--gr-color-gray-700, #374151));
}

.gr-shell-page-title__description {
	margin: 0;
	font-size: 0.875rem;
	color: var(--gr-semantic-foreground-tertiary, var(--gr-color-gray-500, #6b7280));
	max-width: 60ch;
}

.gr-shell-page-title__actions {
	display: flex;
	align-items: center;
	gap: var(--gr-shell-gap-sm);
	flex-shrink: 0;
}

/* ===== src/lib/greater/shell/components/Panel.css (vendored, CLI-copy channel) ===== */
.gr-shell-panel {
	display: flex;
	flex-direction: column;
	background: var(--gr-semantic-background-surface, var(--gr-color-base-white, #fff));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
	border-radius: 0.5rem;
	min-width: 0;
}

.gr-shell-panel--variant-default {
	border: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
}
.gr-shell-panel--variant-flat {
	border: none;
	background: transparent;
}
.gr-shell-panel--variant-elevated {
	border: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
	box-shadow: var(--gr-shadows-base, 0 1px 3px 0 rgb(0 0 0 / 0.1));
}

.gr-shell-panel__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--gr-shell-gap-md);
	padding: var(--gr-shell-gap-md) var(--gr-shell-gutter);
	border-bottom: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
}
.gr-shell-panel--variant-flat .gr-shell-panel__header {
	border-bottom: none;
	padding-inline: 0;
}

.gr-shell-panel__heading {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}
.gr-shell-panel__title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.4;
	font-weight: 600;
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
}

.gr-shell-panel__actions {
	display: flex;
	align-items: center;
	gap: var(--gr-shell-gap-sm);
	flex-shrink: 0;
}

.gr-shell-panel__body {
	flex: 1 1 auto;
	min-width: 0;
}
.gr-shell-panel--padding-none .gr-shell-panel__body {
	padding: 0;
}
.gr-shell-panel--padding-sm .gr-shell-panel__body {
	padding: 0.75rem;
}
.gr-shell-panel--padding-md .gr-shell-panel__body {
	padding: 1rem var(--gr-shell-gutter);
}
.gr-shell-panel--padding-lg .gr-shell-panel__body {
	padding: 1.5rem var(--gr-shell-gutter);
}

.gr-shell-panel__footer {
	padding: var(--gr-shell-gap-md) var(--gr-shell-gutter);
	border-top: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
}
.gr-shell-panel--variant-flat .gr-shell-panel__footer {
	border-top: none;
	padding-inline: 0;
}

/* ===== src/lib/greater/shell/components/Shell.css (vendored, CLI-copy channel) ===== */
.gr-shell {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: auto 1fr;
	grid-template-areas:
		'topbar'
		'main';
	background: var(--gr-semantic-background-base, var(--gr-color-gray-50, #f9fafb));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
	min-height: 100%;
}

.gr-shell--full-height {
	min-height: 100vh;
	/* svh keeps Safari mobile from being clipped by the URL bar where supported */
	min-height: 100svh;
}

/* Topbar */
.gr-shell--has-topbar.gr-shell {
	grid-template-rows: var(--gr-shell-topbar-height) 1fr;
}
.gr-shell__topbar {
	grid-area: topbar;
	min-width: 0;
}

/* Sidebar layouts */
.gr-shell--has-sidebar.gr-shell--sidebar-left {
	grid-template-columns: var(--gr-shell-sidebar-width-md) 1fr;
	grid-template-areas:
		'topbar topbar'
		'sidebar main';
}
.gr-shell--has-sidebar.gr-shell--sidebar-right {
	grid-template-columns: 1fr var(--gr-shell-sidebar-width-md);
	grid-template-areas:
		'topbar topbar'
		'main sidebar';
}

/* When there is no topbar, drop the topbar row entirely. */
.gr-shell:not(.gr-shell--has-topbar).gr-shell--has-sidebar {
	grid-template-rows: 1fr;
	grid-template-areas: 'sidebar main';
}
.gr-shell:not(.gr-shell--has-topbar).gr-shell--has-sidebar.gr-shell--sidebar-right {
	grid-template-areas: 'main sidebar';
}

.gr-shell--sidebar-width-sm.gr-shell--sidebar-left,
.gr-shell--sidebar-width-sm.gr-shell--sidebar-right {
	grid-template-columns: var(--gr-shell-sidebar-width-sm) 1fr;
}
.gr-shell--sidebar-width-sm.gr-shell--sidebar-right {
	grid-template-columns: 1fr var(--gr-shell-sidebar-width-sm);
}
.gr-shell--sidebar-width-lg.gr-shell--sidebar-left {
	grid-template-columns: var(--gr-shell-sidebar-width-lg) 1fr;
}
.gr-shell--sidebar-width-lg.gr-shell--sidebar-right {
	grid-template-columns: 1fr var(--gr-shell-sidebar-width-lg);
}

.gr-shell__sidebar {
	grid-area: sidebar;
	min-width: 0;
	border-right: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
}
.gr-shell--sidebar-right .gr-shell__sidebar {
	border-right: none;
	border-left: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
}

.gr-shell__main {
	grid-area: main;
	min-width: 0;
	display: block;
}

/* Responsive collapse: stack on narrow viewports. */
@media (max-width: 48rem) {
	.gr-shell--has-sidebar.gr-shell--sidebar-left,
	.gr-shell--has-sidebar.gr-shell--sidebar-right {
		grid-template-columns: 1fr;
		grid-template-areas:
			'topbar'
			'sidebar'
			'main';
	}
	.gr-shell__sidebar {
		border-right: none;
		border-left: none;
		border-bottom: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
	}
}

/* ===== src/lib/greater/shell/components/Sidebar.css (vendored, CLI-copy channel) ===== */
.gr-shell-sidebar {
	display: flex;
	flex-direction: column;
	min-height: 0;
	height: 100%;
	background: var(--gr-semantic-background-surface, var(--gr-color-base-white, #fff));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
	overflow-y: auto;
}

.gr-shell-sidebar--variant-compact {
	align-items: center;
}
.gr-shell-sidebar--width-sm {
	width: var(--gr-shell-sidebar-width-sm);
}
.gr-shell-sidebar--width-md {
	width: var(--gr-shell-sidebar-width-md);
}
.gr-shell-sidebar--width-lg {
	width: var(--gr-shell-sidebar-width-lg);
}
.gr-shell-sidebar--variant-compact.gr-shell-sidebar {
	width: var(--gr-shell-sidebar-width-compact);
}

.gr-shell-sidebar__header,
.gr-shell-sidebar__footer {
	padding: var(--gr-shell-gap-md) var(--gr-shell-gutter);
}
.gr-shell-sidebar__header {
	border-bottom: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
}
.gr-shell-sidebar__footer {
	border-top: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
	margin-top: auto;
}

.gr-shell-sidebar__body {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	padding: var(--gr-shell-gap-md) 0.5rem;
	flex: 1 1 auto;
	min-height: 0;
}

/* Default styling for direct anchor / button descendants. Consumers may
 * override via additional class names; these are baseline AA-compliant. */
.gr-shell-sidebar__body > a,
.gr-shell-sidebar__body > button {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	border-radius: 0.375rem;
	color: var(--gr-semantic-foreground-secondary, var(--gr-color-gray-700, #374151));
	background: transparent;
	border: 1px solid transparent;
	font: inherit;
	text-align: start;
	text-decoration: none;
	cursor: pointer;
	width: 100%;
}

.gr-shell-sidebar__body > a:hover,
.gr-shell-sidebar__body > button:hover {
	background: var(--gr-semantic-background-secondary, var(--gr-color-gray-100, #f3f4f6));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
}

.gr-shell-sidebar__body > a[aria-current='page'],
.gr-shell-sidebar__body > button[aria-pressed='true'] {
	background: var(--gr-semantic-background-secondary, var(--gr-color-gray-100, #f3f4f6));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
	font-weight: 600;
}

/* ===== src/lib/greater/shell/components/StatCard.css (vendored, CLI-copy channel) ===== */
.gr-shell-statcard {
	display: flex;
	align-items: flex-start;
	gap: var(--gr-shell-gap-md);
	padding: var(--gr-shell-gap-md) var(--gr-shell-gutter);
	background: var(--gr-semantic-background-surface, var(--gr-color-base-white, #fff));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
	border: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
	border-radius: 0.5rem;
	min-width: 0;
}

.gr-shell-statcard__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.5rem;
	background: var(--gr-semantic-background-secondary, var(--gr-color-gray-100, #f3f4f6));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
}

.gr-shell-statcard__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.gr-shell-statcard__label {
	margin: 0;
	font-size: 0.875rem;
	color: var(--gr-semantic-foreground-secondary, var(--gr-color-gray-700, #374151));
}

.gr-shell-statcard__value {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.2;
	font-weight: 600;
}

.gr-shell-statcard__trend {
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.8125rem;
}
.gr-shell-statcard__trend--up {
	color: var(--gr-color-success-700, #15803d);
}
.gr-shell-statcard__trend--down {
	color: var(--gr-color-error-700, #b91c1c);
}
.gr-shell-statcard__trend--flat {
	color: var(--gr-semantic-foreground-secondary, var(--gr-color-gray-700, #374151));
}

.gr-shell-statcard__description {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--gr-semantic-foreground-tertiary, var(--gr-color-gray-500, #6b7280));
}

/* Status tinting */
.gr-shell-statcard--status-success {
	border-color: var(--gr-color-success-300, #86efac);
}
.gr-shell-statcard--status-success .gr-shell-statcard__icon {
	background: var(--gr-color-success-100, #dcfce7);
	color: var(--gr-color-success-700, #15803d);
}
.gr-shell-statcard--status-warning {
	border-color: var(--gr-color-warning-300, #fcd34d);
}
.gr-shell-statcard--status-warning .gr-shell-statcard__icon {
	background: var(--gr-color-warning-100, #fef3c7);
	color: var(--gr-color-warning-700, #b45309);
}
.gr-shell-statcard--status-danger {
	border-color: var(--gr-color-error-300, #fca5a5);
}
.gr-shell-statcard--status-danger .gr-shell-statcard__icon {
	background: var(--gr-color-error-100, #fee2e2);
	color: var(--gr-color-error-700, #b91c1c);
}
.gr-shell-statcard--status-info {
	border-color: var(--gr-color-info-300, #93c5fd);
}
.gr-shell-statcard--status-info .gr-shell-statcard__icon {
	background: var(--gr-color-info-100, #dbeafe);
	color: var(--gr-color-info-700, #1d4ed8);
}

/* ===== src/lib/greater/shell/components/SummaryStrip.css (vendored, CLI-copy channel) ===== */
.gr-shell-summary-strip {
	display: grid;
	min-width: 0;
}

.gr-shell-summary-strip--gap-sm {
	gap: var(--gr-shell-gap-sm);
}
.gr-shell-summary-strip--gap-md {
	gap: var(--gr-shell-gap-md);
}
.gr-shell-summary-strip--gap-lg {
	gap: var(--gr-shell-gap-lg);
}

.gr-shell-summary-strip--columns-auto {
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.gr-shell-summary-strip--columns-1 {
	grid-template-columns: 1fr;
}
.gr-shell-summary-strip--columns-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gr-shell-summary-strip--columns-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gr-shell-summary-strip--columns-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
.gr-shell-summary-strip--columns-5 {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}
.gr-shell-summary-strip--columns-6 {
	grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 48rem) {
	.gr-shell-summary-strip--columns-3,
	.gr-shell-summary-strip--columns-4,
	.gr-shell-summary-strip--columns-5,
	.gr-shell-summary-strip--columns-6 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 30rem) {
	.gr-shell-summary-strip--columns-2,
	.gr-shell-summary-strip--columns-3,
	.gr-shell-summary-strip--columns-4,
	.gr-shell-summary-strip--columns-5,
	.gr-shell-summary-strip--columns-6 {
		grid-template-columns: 1fr;
	}
}

/* ===== src/lib/greater/shell/components/Topbar.css (vendored, CLI-copy channel) ===== */
.gr-shell-topbar {
	display: flex;
	align-items: center;
	gap: var(--gr-shell-gap-md);
	min-height: var(--gr-shell-topbar-height);
	padding: 0 var(--gr-shell-gutter);
	background: var(--gr-semantic-background-surface, var(--gr-color-base-white, #fff));
	color: var(--gr-semantic-foreground-primary, var(--gr-color-gray-900, #111827));
	border-bottom: 1px solid var(--gr-semantic-border-subtle, var(--gr-color-gray-200, #e5e7eb));
}

.gr-shell-topbar--variant-flat {
	border-bottom: none;
}
.gr-shell-topbar--variant-elevated {
	border-bottom: none;
	box-shadow: var(--gr-shadows-base, 0 1px 3px 0 rgb(0 0 0 / 0.1));
}

.gr-shell-topbar--sticky {
	position: sticky;
	top: 0;
	z-index: 10;
}

.gr-shell-topbar__region {
	display: flex;
	align-items: center;
	gap: var(--gr-shell-gap-sm);
	min-width: 0;
}
.gr-shell-topbar__region--start {
	flex: 0 0 auto;
}
.gr-shell-topbar__region--center {
	flex: 1 1 auto;
	justify-content: center;
	min-width: 0;
}
.gr-shell-topbar__region--end {
	flex: 0 0 auto;
	margin-inline-start: auto;
	justify-content: flex-end;
}
.gr-shell-topbar__region--full {
	flex: 1 1 auto;
	justify-content: space-between;
}

/* ===== greater blog face theme (vendored, CLI-copy channel) ===== */
/* Greater Components Blog Face Theme
 * Typography and layout optimized for long-form reading
 */

/* ============================================================================
 * Blog-Specific Design Tokens
 * ============================================================================ */

:root {
	/* Reading-optimized typography */
	--gr-blog-font-family-body: var(
		--gr-typography-fontFamily-serif,
		Georgia,
		'Times New Roman',
		serif
	);
	--gr-blog-font-family-heading: var(--gr-typography-fontFamily-sans, system-ui, sans-serif);
	--gr-blog-font-family-code: var(--gr-typography-fontFamily-mono, 'Fira Code', monospace);

	/* Article content sizing */
	--gr-blog-content-max-width: 680px;
	--gr-blog-content-wide-max-width: 1000px;
	--gr-blog-sidebar-width: 280px;

	/* Reading-optimized line heights */
	--gr-blog-line-height-body: 1.75;
	--gr-blog-line-height-heading: 1.25;
	--gr-blog-line-height-code: 1.5;

	/* Article spacing */
	--gr-blog-paragraph-spacing: var(--gr-spacing-scale-6);
	--gr-blog-heading-spacing-top: var(--gr-spacing-scale-10);
	--gr-blog-heading-spacing-bottom: var(--gr-spacing-scale-4);
	--gr-blog-section-spacing: var(--gr-spacing-scale-12);

	/* Reading progress indicator */
	--gr-blog-progress-height: 3px;
	--gr-blog-progress-color: var(--gr-color-primary-500);
	--gr-blog-progress-background: var(--gr-color-gray-200);

	/* Table of contents */
	--gr-blog-toc-width: 240px;
	--gr-blog-toc-active-color: var(--gr-color-primary-600);
	--gr-blog-toc-link-color: var(--gr-color-gray-600);

	/* Author card */
	--gr-blog-author-avatar-size: 64px;
	--gr-blog-author-avatar-size-sm: 40px;

	/* Featured image */
	--gr-blog-featured-image-ratio: 16 / 9;
	--gr-blog-featured-image-radius: var(--gr-radii-lg);

	/* Code blocks */
	--gr-blog-code-background: var(--gr-color-gray-50);
	--gr-blog-code-border: var(--gr-color-gray-200);
	--gr-blog-code-radius: var(--gr-radii-md);
	--gr-blog-code-text: var(--gr-color-gray-800, #1f2937);

	/* Reading surface colors */
	--gr-blog-article-background: var(--gr-color-base-white, #ffffff);
	--gr-blog-article-text: var(--gr-color-gray-800, #1f2937);
	--gr-blog-article-heading: var(--gr-color-gray-900, #111827);
	--gr-blog-article-muted: var(--gr-color-gray-600, #4b5563);
	--gr-blog-article-link: var(--gr-color-primary-700);
	--gr-blog-article-tag-background: var(--gr-color-gray-100, #f3f4f6);
	--gr-blog-article-tag-text: var(--gr-color-gray-700, #374151);

	/* Blockquotes */
	--gr-blog-blockquote-border-width: 4px;
	--gr-blog-blockquote-border-color: var(--gr-color-primary-400);
	--gr-blog-blockquote-background: var(--gr-color-gray-50);

	/* Newsletter signup */
	--gr-blog-newsletter-background: var(--gr-color-primary-50);
	--gr-blog-newsletter-border: var(--gr-color-primary-200);
}

/* Dark theme overrides */
[data-theme='dark'] {
	--gr-blog-code-background: var(--gr-color-gray-800, #1f2937);
	--gr-blog-code-border: var(--gr-color-gray-700);
	--gr-blog-code-text: var(--gr-color-gray-100, #f3f4f6);
	--gr-blog-article-background: var(--gr-color-gray-900, #111827);
	--gr-blog-article-text: var(--gr-color-gray-200, #e5e7eb);
	--gr-blog-article-heading: var(--gr-color-gray-100, #f3f4f6);
	--gr-blog-article-muted: var(--gr-color-gray-300, #d1d5db);
	--gr-blog-article-link: var(--gr-color-primary-400, #60a5fa);
	--gr-blog-article-tag-background: var(--gr-color-gray-800, #1f2937);
	--gr-blog-article-tag-text: var(--gr-color-gray-200, #e5e7eb);
	--gr-blog-blockquote-background: var(--gr-color-gray-800);
	--gr-blog-newsletter-background: var(--gr-color-gray-800);
	--gr-blog-newsletter-border: var(--gr-color-gray-700);
	--gr-blog-toc-link-color: var(--gr-color-gray-400);
	--gr-blog-progress-background: var(--gr-color-gray-700);
}

[data-theme='dark'] .gr-blog-article-card {
	background: var(--gr-color-gray-900);
	border-color: var(--gr-color-gray-700);
}

[data-theme='dark'] .gr-blog-article-card__meta {
	color: var(--gr-color-gray-400);
}

[data-theme='dark'] .gr-blog-article-card__title {
	color: var(--gr-color-gray-100);
}

[data-theme='dark'] .gr-blog-article-card__subtitle,
[data-theme='dark'] .gr-blog-article-card__excerpt {
	color: var(--gr-color-gray-300);
}

[data-theme='dark'] .gr-blog-article-card__tag {
	background: var(--gr-color-gray-800);
	color: var(--gr-color-gray-200);
}

[data-theme='dark'] .gr-blog-author-card {
	background: var(--gr-color-gray-800);
}

[data-theme='dark'] .gr-blog-author-card__name {
	color: var(--gr-color-gray-100);
}

[data-theme='dark'] .gr-blog-author-card__bio {
	color: var(--gr-color-gray-300);
}

[data-theme='dark'] .gr-blog-author-card__link {
	color: var(--gr-color-primary-400);
}

[data-theme='dark'] .gr-blog-toc__title,
[data-theme='dark'] .gr-blog-archive__month-title,
[data-theme='dark'] .gr-blog-editor__meta {
	color: var(--gr-color-gray-300);
}

[data-theme='dark'] .gr-blog-newsletter__title,
[data-theme='dark'] .gr-blog-archive__year {
	color: var(--gr-color-gray-100);
}

[data-theme='dark'] .gr-blog-newsletter__description {
	color: var(--gr-color-gray-300);
}

[data-theme='dark'] .gr-blog-editor__preview {
	background: var(--gr-color-gray-900);
	border-color: var(--gr-color-gray-700);
	color: var(--gr-color-gray-100);
}

[data-theme='dark'] .gr-blog-article {
	background: var(--gr-blog-article-background);
	color: var(--gr-blog-article-text);
}

[data-theme='dark'] .gr-blog-article__content {
	color: var(--gr-blog-article-text);
}

[data-theme='dark'] .gr-blog-article__content h1,
[data-theme='dark'] .gr-blog-article__content h2,
[data-theme='dark'] .gr-blog-article__content h3,
[data-theme='dark'] .gr-blog-article__content h4,
[data-theme='dark'] .gr-blog-article__content h5,
[data-theme='dark'] .gr-blog-article__content h6,
[data-theme='dark'] .gr-blog-article__title {
	color: var(--gr-blog-article-heading);
}

[data-theme='dark'] .gr-blog-article__content h5,
[data-theme='dark'] .gr-blog-article__content h6 {
	font-family: var(--gr-blog-font-family-heading);
	line-height: var(--gr-blog-line-height-heading);
	margin-top: var(--gr-blog-heading-spacing-top);
	margin-bottom: var(--gr-blog-heading-spacing-bottom);
}

[data-theme='dark'] .gr-blog-article__subtitle,
[data-theme='dark'] .gr-blog-article__meta {
	color: var(--gr-blog-article-muted);
}

[data-theme='dark'] .gr-blog-article__content a {
	color: var(--gr-blog-article-link);
}

[data-theme='dark'] .gr-blog-article__tags .gr-blog-tag-cloud__tag {
	background: var(--gr-blog-article-tag-background);
	color: var(--gr-blog-article-tag-text);
}

[data-theme='dark'] .gr-blog-tag-cloud .gr-blog-tag-cloud__tag {
	background: var(--gr-color-gray-700);
	color: var(--gr-color-gray-100);
}

[data-theme='dark'] .gr-blog-article__content code {
	color: var(--gr-blog-code-text);
}

/* ============================================================================
 * Article Layout
 * ============================================================================ */

.gr-blog-article {
	max-width: var(--gr-blog-content-max-width);
	margin: 0 auto;
	padding: var(--gr-spacing-scale-6);
}

.gr-blog-article--wide {
	max-width: var(--gr-blog-content-wide-max-width);
}

.gr-blog-article__header {
	margin-bottom: var(--gr-blog-section-spacing);
}

.gr-blog-article__content {
	font-family: var(--gr-blog-font-family-body);
	font-size: var(--gr-typography-fontSize-lg);
	line-height: var(--gr-blog-line-height-body);
	color: var(--gr-color-gray-800);
}

.gr-blog-article__content p {
	margin-bottom: var(--gr-blog-paragraph-spacing);
}

.gr-blog-article__content h1,
.gr-blog-article__content h2,
.gr-blog-article__content h3,
.gr-blog-article__content h4 {
	font-family: var(--gr-blog-font-family-heading);
	line-height: var(--gr-blog-line-height-heading);
	margin-top: var(--gr-blog-heading-spacing-top);
	margin-bottom: var(--gr-blog-heading-spacing-bottom);
	color: var(--gr-color-gray-900);
}

.gr-blog-article__content h1 {
	font-size: var(--gr-typography-fontSize-4xl);
}

.gr-blog-article__content h2 {
	font-size: var(--gr-typography-fontSize-3xl);
}

.gr-blog-article__content h3 {
	font-size: var(--gr-typography-fontSize-2xl);
}

.gr-blog-article__content h4 {
	font-size: var(--gr-typography-fontSize-xl);
}

.gr-blog-article__layout {
	display: grid;
	gap: var(--gr-spacing-scale-8);
	align-items: start;
}

@media (min-width: 1100px) {
	.gr-blog-article__layout {
		grid-template-columns: var(--gr-blog-toc-width) minmax(0, 1fr);
	}
}

/* ============================================================================
 * Article Cards
 * ============================================================================ */

.gr-blog-article-card {
	position: relative;
	background: var(--gr-color-surface, var(--gr-color-base-white, #ffffff));
	border: 1px solid var(--gr-color-border, var(--gr-color-gray-200));
	border-radius: var(--gr-radii-lg);
	overflow: hidden;
	transition:
		border-color 150ms ease,
		box-shadow 150ms ease,
		transform 150ms ease;
}

.gr-blog-article-card:focus-within,
.gr-blog-article-card:hover {
	border-color: var(--gr-color-primary-300);
	box-shadow: var(--gr-shadow-md, 0 8px 24px rgba(15, 23, 42, 0.12));
	transform: translateY(-1px);
}

.gr-blog-article-card__link {
	color: inherit;
	text-decoration: none;
}

.gr-blog-article-card__link::after {
	position: absolute;
	inset: 0;
	content: '';
}

.gr-blog-article-card__link:focus-visible {
	outline: 3px solid var(--gr-color-focus, var(--gr-color-primary-600));
	outline-offset: 3px;
}

.gr-blog-article-card__image {
	display: block;
	width: 100%;
	aspect-ratio: var(--gr-blog-featured-image-ratio);
	object-fit: cover;
}

.gr-blog-article-card__body {
	padding: var(--gr-spacing-scale-6);
}

.gr-blog-article-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--gr-spacing-scale-2);
	margin: 0 0 var(--gr-spacing-scale-3);
	font-family: var(--gr-blog-font-family-heading);
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-color-gray-600);
}

.gr-blog-article-card__separator {
	color: var(--gr-color-gray-400);
}

.gr-blog-article-card__title {
	margin: 0 0 var(--gr-spacing-scale-2);
	font-family: var(--gr-blog-font-family-heading);
	font-size: var(--gr-typography-fontSize-2xl);
	line-height: var(--gr-blog-line-height-heading);
	color: var(--gr-color-gray-900);
}

.gr-blog-article-card__subtitle,
.gr-blog-article-card__excerpt {
	margin: 0 0 var(--gr-spacing-scale-3);
	color: var(--gr-color-gray-700);
	line-height: 1.6;
}

.gr-blog-article-card__excerpt {
	font-size: var(--gr-typography-fontSize-base);
}

.gr-blog-article-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gr-spacing-scale-2);
	padding: 0;
	margin: var(--gr-spacing-scale-4) 0 0;
	list-style: none;
}

.gr-blog-article-card__tag {
	display: inline-flex;
	align-items: center;
	border-radius: var(--gr-radii-full);
	background: var(--gr-color-gray-100);
	color: var(--gr-color-gray-700);
	padding: var(--gr-spacing-scale-1) var(--gr-spacing-scale-3);
	font-size: var(--gr-typography-fontSize-sm);
	font-family: var(--gr-blog-font-family-heading);
}

/* ============================================================================
 * Reading Progress Indicator
 * ============================================================================ */

.gr-blog-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--gr-blog-progress-height);
	background: var(--gr-blog-progress-background);
	z-index: 1000;
}

.gr-blog-reading-progress__bar {
	height: 100%;
	width: 100%;
	display: block;
}

.gr-blog-reading-progress__bar-fill {
	fill: var(--gr-blog-progress-color);
}

/* ============================================================================
 * Table of Contents
 * ============================================================================ */

.gr-blog-toc {
	position: sticky;
	top: var(--gr-spacing-scale-6);
	width: var(--gr-blog-toc-width);
	max-height: calc(100vh - var(--gr-spacing-scale-12));
	overflow-y: auto;
	padding: var(--gr-spacing-scale-4);
}

.gr-blog-toc__title {
	font-family: var(--gr-blog-font-family-heading);
	font-size: var(--gr-typography-fontSize-sm);
	font-weight: var(--gr-typography-fontWeight-semibold);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--gr-color-gray-500);
	margin-bottom: var(--gr-spacing-scale-3);
}

.gr-blog-toc__list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.gr-blog-toc__item {
	margin-bottom: var(--gr-spacing-scale-2);
}

.gr-blog-toc__link {
	display: block;
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-blog-toc-link-color);
	text-decoration: none;
	padding: var(--gr-spacing-scale-1) 0;
	border-left: 2px solid transparent;
	padding-left: var(--gr-spacing-scale-3);
	transition:
		color 150ms ease,
		border-color 150ms ease;
}

.gr-blog-toc__link:hover {
	color: var(--gr-blog-toc-active-color);
}

.gr-blog-toc__link--active {
	color: var(--gr-blog-toc-active-color);
	border-left-color: var(--gr-blog-toc-active-color);
	font-weight: var(--gr-typography-fontWeight-medium);
}

.gr-blog-toc__link--h3 {
	padding-left: var(--gr-spacing-scale-6);
}

.gr-blog-toc__link--h4 {
	padding-left: calc(var(--gr-spacing-scale-8) + var(--gr-spacing-scale-1));
}

/* ============================================================================
 * Author Card
 * ============================================================================ */

.gr-blog-author-card {
	display: flex;
	gap: var(--gr-spacing-scale-4);
	padding: var(--gr-spacing-scale-6);
	background: var(--gr-color-gray-50);
	border-radius: var(--gr-radii-lg);
}

.gr-blog-author-card__avatar {
	flex-shrink: 0;
	width: var(--gr-blog-author-avatar-size);
	height: var(--gr-blog-author-avatar-size);
	border-radius: var(--gr-radii-full);
	object-fit: cover;
}

.gr-blog-author-card__info {
	flex: 1;
}

.gr-blog-author-card__name {
	font-family: var(--gr-blog-font-family-heading);
	font-size: var(--gr-typography-fontSize-lg);
	font-weight: var(--gr-typography-fontWeight-semibold);
	color: var(--gr-color-gray-900);
	margin-bottom: var(--gr-spacing-scale-1);
}

.gr-blog-author-card__bio {
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-color-gray-600);
	line-height: var(--gr-blog-line-height-body);
}

.gr-blog-author-card__links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gr-spacing-scale-2);
	margin-top: var(--gr-spacing-scale-3);
}

.gr-blog-author-card__link {
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-color-primary-600);
	text-decoration: none;
}

.gr-blog-author-card__link:hover {
	text-decoration: underline;
}

/* ============================================================================
 * Publication Banner
 * ============================================================================ */

.gr-blog-publication-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--gr-spacing-scale-4) var(--gr-spacing-scale-6);
	background: var(--gr-color-gray-900);
	color: var(--gr-color-gray-100);
}

.gr-blog-publication-banner__logo {
	height: 32px;
	width: auto;
}

.gr-blog-publication-banner__name {
	font-family: var(--gr-blog-font-family-heading);
	font-size: var(--gr-typography-fontSize-xl);
	font-weight: var(--gr-typography-fontWeight-bold);
}

/* ============================================================================
 * Newsletter Signup
 * ============================================================================ */

.gr-blog-newsletter {
	padding: var(--gr-spacing-scale-8);
	background: var(--gr-blog-newsletter-background);
	border: 1px solid var(--gr-blog-newsletter-border);
	border-radius: var(--gr-radii-lg);
	text-align: center;
}

.gr-blog-newsletter__title {
	font-family: var(--gr-blog-font-family-heading);
	font-size: var(--gr-typography-fontSize-2xl);
	font-weight: var(--gr-typography-fontWeight-bold);
	color: var(--gr-color-gray-900);
	margin-bottom: var(--gr-spacing-scale-2);
}

.gr-blog-newsletter__description {
	font-size: var(--gr-typography-fontSize-base);
	color: var(--gr-color-gray-600);
	margin-bottom: var(--gr-spacing-scale-6);
}

.gr-blog-newsletter__form {
	display: flex;
	gap: var(--gr-spacing-scale-3);
	max-width: 400px;
	margin: 0 auto;
}

/* ============================================================================
 * Archive View
 * ============================================================================ */

.gr-blog-archive {
	padding: var(--gr-spacing-scale-6);
}

.gr-blog-archive__year {
	font-family: var(--gr-blog-font-family-heading);
	font-size: var(--gr-typography-fontSize-2xl);
	font-weight: var(--gr-typography-fontWeight-bold);
	color: var(--gr-color-gray-900);
	margin-bottom: var(--gr-spacing-scale-4);
	padding-bottom: var(--gr-spacing-scale-2);
	border-bottom: 2px solid var(--gr-color-gray-200);
}

.gr-blog-archive__month {
	margin-bottom: var(--gr-spacing-scale-6);
}

.gr-blog-archive__month-title {
	font-family: var(--gr-blog-font-family-heading);
	font-size: var(--gr-typography-fontSize-lg);
	font-weight: var(--gr-typography-fontWeight-semibold);
	color: var(--gr-color-gray-700);
	margin-bottom: var(--gr-spacing-scale-3);
}

/* ============================================================================
 * Tag Cloud
 * ============================================================================ */

.gr-blog-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gr-spacing-scale-2);
}

.gr-blog-tag-cloud__tag {
	display: inline-flex;
	align-items: center;
	padding: var(--gr-spacing-scale-1) var(--gr-spacing-scale-3);
	background: var(--gr-color-gray-100);
	border-radius: var(--gr-radii-full);
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-color-gray-700);
	text-decoration: none;
	transition:
		background 150ms ease,
		color 150ms ease;
}

.gr-blog-tag-cloud__tag:hover {
	background: var(--gr-color-primary-100);
	color: var(--gr-color-primary-700);
}

.gr-blog-tag-cloud__tag--size-lg {
	font-size: var(--gr-typography-fontSize-base);
	padding: var(--gr-spacing-scale-2) var(--gr-spacing-scale-4);
}

.gr-blog-tag-cloud__tag--size-xl {
	font-size: var(--gr-typography-fontSize-lg);
	padding: var(--gr-spacing-scale-2) var(--gr-spacing-scale-5);
}

/* ============================================================================
 * Editor Toolbar
 * ============================================================================ */

.gr-blog-editor-toolbar {
	display: flex;
	align-items: center;
	gap: var(--gr-spacing-scale-1);
	padding: var(--gr-spacing-scale-2) var(--gr-spacing-scale-3);
	background: var(--gr-color-gray-50);
	border: 1px solid var(--gr-color-gray-200);
	border-radius: var(--gr-radii-md);
}

.gr-blog-editor-toolbar__divider {
	width: 1px;
	height: 24px;
	background: var(--gr-color-gray-300);
	margin: 0 var(--gr-spacing-scale-2);
}

.gr-blog-editor-toolbar__button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	border-radius: var(--gr-radii-sm);
	color: var(--gr-color-gray-600);
	cursor: pointer;
	transition:
		background 150ms ease,
		color 150ms ease;
}

.gr-blog-editor-toolbar__button:hover {
	background: var(--gr-color-gray-200);
	color: var(--gr-color-gray-900);
}

.gr-blog-editor-toolbar__button--active {
	background: var(--gr-color-primary-100);
	color: var(--gr-color-primary-700);
}

/* ============================================================================
 * Editor Layout
 * ============================================================================ */

.gr-blog-editor__body {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--gr-spacing-scale-4);
	margin-top: var(--gr-spacing-scale-4);
}

.gr-blog-editor__body textarea {
	width: 100%;
	min-height: 240px;
	padding: var(--gr-spacing-scale-4);
	border: 1px solid var(--gr-color-gray-200);
	border-radius: var(--gr-radii-md);
	font-family: var(--gr-blog-font-family-body);
	font-size: var(--gr-typography-fontSize-base);
	line-height: var(--gr-blog-line-height-body);
}

.gr-blog-editor__preview {
	padding: var(--gr-spacing-scale-4);
	border: 1px solid var(--gr-color-gray-200);
	border-radius: var(--gr-radii-md);
	background: var(--gr-color-gray-50);
	max-height: 60vh;
	overflow: auto;
}

.gr-blog-editor__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--gr-spacing-scale-3);
	margin-top: var(--gr-spacing-scale-3);
	font-size: var(--gr-typography-fontSize-sm);
	color: var(--gr-color-gray-600);
}

.gr-blog-editor__meta button {
	padding: var(--gr-spacing-scale-1) var(--gr-spacing-scale-3);
	border: 1px solid var(--gr-color-gray-200);
	background: var(--gr-color-gray-50);
	border-radius: var(--gr-radii-md);
	cursor: pointer;
}

.gr-blog-editor__meta button:hover {
	background: var(--gr-color-gray-100);
}

@media (min-width: 900px) {
	.gr-blog-editor__body {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
}

/* ============================================================================
 * Blockquote Styles
 * ============================================================================ */

.gr-blog-article__content blockquote {
	margin: var(--gr-blog-paragraph-spacing) 0;
	padding: var(--gr-spacing-scale-4) var(--gr-spacing-scale-6);
	background: var(--gr-blog-blockquote-background);
	border-left: var(--gr-blog-blockquote-border-width) solid var(--gr-blog-blockquote-border-color);
	border-radius: 0 var(--gr-radii-md) var(--gr-radii-md) 0;
	font-style: italic;
}

.gr-blog-article__content blockquote p:last-child {
	margin-bottom: 0;
}

/* ============================================================================
 * Code Block Styles
 * ============================================================================ */

.gr-blog-article__content pre {
	margin: var(--gr-blog-paragraph-spacing) 0;
	padding: var(--gr-spacing-scale-4);
	background: var(--gr-blog-code-background);
	border: 1px solid var(--gr-blog-code-border);
	border-radius: var(--gr-blog-code-radius);
	overflow-x: auto;
}

.gr-blog-article__content code {
	font-family: var(--gr-blog-font-family-code);
	font-size: 0.9em;
	line-height: var(--gr-blog-line-height-code);
}

.gr-blog-article__content :not(pre) > code {
	padding: 0.2em 0.4em;
	background: var(--gr-blog-code-background);
	border-radius: var(--gr-radii-sm);
}

/* ============================================================================
 * Featured Image
 * ============================================================================ */

.gr-blog-featured-image {
	position: relative;
	width: 100%;
	aspect-ratio: var(--gr-blog-featured-image-ratio);
	border-radius: var(--gr-blog-featured-image-radius);
	overflow: hidden;
	margin-bottom: var(--gr-blog-section-spacing);
}

.gr-blog-featured-image__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gr-blog-featured-image__caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: var(--gr-spacing-scale-3) var(--gr-spacing-scale-4);
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
	color: var(--gr-color-gray-100);
	font-size: var(--gr-typography-fontSize-sm);
}

/* ============================================================================
 * Responsive Adjustments
 * ============================================================================ */

@media (max-width: 768px) {
	.gr-blog-article {
		padding: var(--gr-spacing-scale-4);
	}

	.gr-blog-article__content {
		font-size: var(--gr-typography-fontSize-base);
	}

	.gr-blog-toc {
		display: none;
	}

	.gr-blog-newsletter__form {
		flex-direction: column;
	}

	.gr-blog-author-card {
		flex-direction: column;
		text-align: center;
	}
}

/* ============================================================================
 * Review Workflow Chrome
 * ----------------------------------------------------------------------------
 * Queue cards, attribution strip, and verdict actions for the shared-draft
 * review workflow.
 *
 * All colour comes from `--gr-*` custom properties so a consumer can rebrand by
 * bridging tokens alone. Neutral steps use the emitted `--gr-color-gray-*` token
 * path; selectable palette names change those values and are not token paths.
 *
 * State is never communicated by colour alone: every state badge renders its
 * label as text.
 * ============================================================================ */

:root {
	--gr-blog-review-gap: var(--gr-spacing-scale-3);
	--gr-blog-review-card-padding: var(--gr-spacing-scale-5);
	--gr-blog-review-radius: var(--gr-radii-lg);

	--gr-blog-review-approved-bg: var(--gr-color-success-100);
	--gr-blog-review-approved-fg: var(--gr-color-success-900);
	--gr-blog-review-approved-border: var(--gr-color-success-300);

	--gr-blog-review-changes-bg: var(--gr-color-warning-100);
	--gr-blog-review-changes-fg: var(--gr-color-warning-900);
	--gr-blog-review-changes-border: var(--gr-color-warning-300);

	--gr-blog-review-pending-bg: var(--gr-color-gray-100);
	--gr-blog-review-pending-fg: var(--gr-color-gray-800);
	--gr-blog-review-pending-border: var(--gr-color-gray-300);

	--gr-blog-review-agent-bg: var(--gr-color-primary-100);
	--gr-blog-review-agent-fg: var(--gr-color-primary-900, var(--gr-color-primary-700));
	--gr-blog-review-agent-border: var(--gr-color-primary-300);
}

[data-theme='dark'] {
	--gr-blog-review-approved-bg: var(--gr-color-success-900);
	--gr-blog-review-approved-fg: var(--gr-color-success-100);
	--gr-blog-review-approved-border: var(--gr-color-success-700);

	--gr-blog-review-changes-bg: var(--gr-color-warning-900);
	--gr-blog-review-changes-fg: var(--gr-color-warning-100);
	--gr-blog-review-changes-border: var(--gr-color-warning-700);

	--gr-blog-review-pending-bg: var(--gr-color-gray-800);
	--gr-blog-review-pending-fg: var(--gr-color-gray-100);
	--gr-blog-review-pending-border: var(--gr-color-gray-600);

	--gr-blog-review-agent-bg: var(--gr-color-primary-900);
	--gr-blog-review-agent-fg: var(--gr-color-primary-100);
	--gr-blog-review-agent-border: var(--gr-color-primary-700);
}

/* --------------------------------------------------------------------------
 * Queue card
 * -------------------------------------------------------------------------- */

.gr-blog-review-card {
	display: flex;
	flex-direction: column;
	gap: var(--gr-blog-review-gap);
	padding: var(--gr-blog-review-card-padding);
	background: var(--gr-color-surface, var(--gr-color-base-white, #ffffff));
	border: 1px solid var(--gr-color-border, var(--gr-color-gray-200));
	border-radius: var(--gr-blog-review-radius);
	font-family: var(--gr-blog-font-family-heading);
}

[data-theme='dark'] .gr-blog-review-card {
	background: var(--gr-color-gray-900);
	border-color: var(--gr-color-gray-700);
}

.gr-blog-review-card__header {
	display: flex;
	flex-direction: column;
	gap: var(--gr-spacing-scale-2);
}

@media (min-width: 40rem) {
	.gr-blog-review-card__header {
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
		gap: var(--gr-spacing-scale-4);
	}
}

.gr-blog-review-card__title {
	margin: 0;
	font-size: 1.125rem;
	line-height: var(--gr-blog-line-height-heading);
	color: var(--gr-color-gray-900);
}

[data-theme='dark'] .gr-blog-review-card__title {
	color: var(--gr-color-gray-100);
}

.gr-blog-review-card__link {
	color: inherit;
	text-decoration: none;
}

.gr-blog-review-card__link:hover,
.gr-blog-review-card__link:focus-visible {
	text-decoration: underline;
}

.gr-blog-review-card__subtitle,
.gr-blog-review-card__excerpt {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--gr-color-gray-600);
}

[data-theme='dark'] .gr-blog-review-card__subtitle,
[data-theme='dark'] .gr-blog-review-card__excerpt {
	color: var(--gr-color-gray-300);
}

.gr-blog-review-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--gr-spacing-scale-2);
	margin: 0;
	font-size: 0.8125rem;
	color: var(--gr-color-gray-600);
}

[data-theme='dark'] .gr-blog-review-card__meta {
	color: var(--gr-color-gray-400);
}

.gr-blog-review-card__author {
	display: inline-flex;
	align-items: center;
	gap: var(--gr-spacing-scale-2);
}

.gr-blog-review-card__author-name {
	font-weight: 600;
}

.gr-blog-review-card__separator {
	color: var(--gr-color-gray-400);
}

.gr-blog-review-card__state-group {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	align-self: flex-start;
	gap: var(--gr-spacing-scale-1);
}

.gr-blog-review-card__state {
	display: inline-flex;
	align-items: center;
	align-self: flex-end;
	margin: 0;
	padding: var(--gr-spacing-scale-1) var(--gr-spacing-scale-3);
	border: 1px solid transparent;
	border-radius: var(--gr-radii-full);
	font-size: 0.75rem;
	font-weight: 600;
}

/* The badge never states publication readiness — this note says so in text,
   so the meaning does not depend on the badge colour. */
.gr-blog-review-card__state-note {
	font-size: 0.6875rem;
	text-align: right;
	color: var(--gr-color-gray-600);
}

[data-theme='dark'] .gr-blog-review-card__state-note {
	color: var(--gr-color-gray-400);
}

.gr-blog-review-card__state--approved {
	background: var(--gr-blog-review-approved-bg);
	color: var(--gr-blog-review-approved-fg);
	border-color: var(--gr-blog-review-approved-border);
}

.gr-blog-review-card__state--changes-requested {
	background: var(--gr-blog-review-changes-bg);
	color: var(--gr-blog-review-changes-fg);
	border-color: var(--gr-blog-review-changes-border);
}

.gr-blog-review-card__state--pending {
	background: var(--gr-blog-review-pending-bg);
	color: var(--gr-blog-review-pending-fg);
	border-color: var(--gr-blog-review-pending-border);
}

.gr-blog-review-card__agent-badge,
.gr-blog-review-attribution__agent-badge {
	display: inline-flex;
	align-items: center;
	padding: 0 var(--gr-spacing-scale-2);
	background: var(--gr-blog-review-agent-bg);
	color: var(--gr-blog-review-agent-fg);
	border: 1px solid var(--gr-blog-review-agent-border);
	border-radius: var(--gr-radii-sm);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.gr-blog-review-card__attribution,
.gr-blog-review-card__actions {
	padding-top: var(--gr-spacing-scale-3);
	border-top: 1px solid var(--gr-color-border, var(--gr-color-gray-200));
}

[data-theme='dark'] .gr-blog-review-card__attribution,
[data-theme='dark'] .gr-blog-review-card__actions {
	border-top-color: var(--gr-color-gray-700);
}

/* --------------------------------------------------------------------------
 * Attribution strip
 * -------------------------------------------------------------------------- */

.gr-blog-review-attribution {
	font-size: 0.8125rem;
	color: var(--gr-color-gray-700);
}

[data-theme='dark'] .gr-blog-review-attribution {
	color: var(--gr-color-gray-300);
}

.gr-blog-review-attribution__actor-name {
	font-weight: 600;
}

.gr-blog-review-attribution__actor-handle,
.gr-blog-review-attribution__granted-at,
.gr-blog-review-attribution__state-source {
	color: var(--gr-color-gray-600);
}

[data-theme='dark'] .gr-blog-review-attribution__actor-handle,
[data-theme='dark'] .gr-blog-review-attribution__granted-at,
[data-theme='dark'] .gr-blog-review-attribution__state-source {
	color: var(--gr-color-gray-400);
}

.gr-blog-review-attribution__empty {
	color: var(--gr-color-gray-500);
	font-style: italic;
}

.gr-blog-review-attribution__state {
	display: inline-flex;
	align-items: center;
	padding: 0 var(--gr-spacing-scale-2);
	border: 1px solid transparent;
	border-radius: var(--gr-radii-sm);
	font-weight: 600;
}

.gr-blog-review-attribution__state--approved {
	background: var(--gr-blog-review-approved-bg);
	color: var(--gr-blog-review-approved-fg);
	border-color: var(--gr-blog-review-approved-border);
}

.gr-blog-review-attribution__state--changes-requested {
	background: var(--gr-blog-review-changes-bg);
	color: var(--gr-blog-review-changes-fg);
	border-color: var(--gr-blog-review-changes-border);
}

.gr-blog-review-attribution__state--pending {
	background: var(--gr-blog-review-pending-bg);
	color: var(--gr-blog-review-pending-fg);
	border-color: var(--gr-blog-review-pending-border);
}

.gr-blog-review-attribution__notes,
.gr-blog-review-attribution__approval {
	white-space: pre-wrap;
}

.gr-blog-review-attribution__revocable {
	color: var(--gr-color-gray-600);
}

/* --------------------------------------------------------------------------
 * Verdict actions
 * -------------------------------------------------------------------------- */

.gr-blog-review-verdict {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gr-spacing-scale-3);
}

.gr-blog-review-verdict__prompt {
	margin: 0 0 var(--gr-spacing-scale-4);
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--gr-color-gray-700);
}

[data-theme='dark'] .gr-blog-review-verdict__prompt {
	color: var(--gr-color-gray-300);
}

/* The notes field is the TextArea primitive — label, error text, and ARIA
 * wiring come with it, so only the surrounding spacing belongs here. */
.gr-blog-review-verdict__field {
	margin-bottom: var(--gr-spacing-scale-4);
}

.gr-blog-review-verdict__error {
	margin: var(--gr-spacing-scale-4) 0 0;
	font-size: 0.8125rem;
	color: var(--gr-color-error-700);
}

[data-theme='dark'] .gr-blog-review-verdict__error {
	color: var(--gr-color-error-100);
}

/* Keep state badges and the agent marker distinguishable when the user forces
 * a system colour scheme, where author background/border colours are dropped. */
@media (forced-colors: active) {
	.gr-blog-review-card__state,
	.gr-blog-review-attribution__state,
	.gr-blog-review-card__agent-badge,
	.gr-blog-review-attribution__agent-badge {
		border-color: CanvasText;
	}
}

/* ===== Theory Cloud design pack — --tc-* brand tokens (webfont @import stripped) ===== */
/* =============================================================
   Theory Cloud — Colors & Type
   Dark-first design tokens for the Theory Cloud brand pack.
   Source: theory_cloud_branding_package.md §6, §7, §27.C, §27.D
   ============================================================= */

/* ---------- Webfonts ---------- */
/* Primary sans: Inter (recommended ref in §7).
   Display sans: Geist (recommended ref in §27.D).
   Monospace: JetBrains Mono (recommended ref in §7). */

:root {
  /* --------------------------------------------------------------
     1. BRAND COLOR LOCKS (§27.C)
     These are the only places these literals should appear; everything
     downstream references the named token, never the hex.
     -------------------------------------------------------------- */

  /* Primary palette */
  --tc-midnight:       #081226;  /* deep base for product + brand surfaces */
  --tc-core-blue:      #2EA7FF;  /* system intelligence / clarity (primary) */
  --tc-violet-signal:  #7A5CFF;  /* generative core / memory / energy (secondary) */
  --tc-ice-white:      #F4F8FF;  /* typography + high-contrast UI text */

  /* Secondary neutrals */
  --tc-steel:          #6F7D95;  /* neutral UI linework */
  --tc-steel-bright:   #8593AB;  /* steel lifted for tertiary TEXT: 4.48:1 on Midnight fails AA, so linework and text no longer share one literal */
  --tc-mist:           #DCE6F5;  /* soft background tint; quiet body text */
  --tc-graphite:       #1C2433;  /* light-mode dark text; subtle inverse */

  /* Accent reserve */
  --tc-phi-gold:       #C9A96B;  /* diagrams, premium moments, phi refs */

  /* System error (calibrated; not defined in the brand doc) */
  --tc-error:          #FF5A65;
  --tc-error-container:#4A1720;

  /* --------------------------------------------------------------
     2. MIDNIGHT ELEVATION RAMP
     Calibrated from Midnight toward Ice White along a perceptual luma
     line so M3 surface layers feel like one material.
     Source: ts/src/tokens/base.ts midnightDepth..midnightLift4
     -------------------------------------------------------------- */
  --tc-midnight-depth: #050A1A;  /* surfaceDim / surfaceContainerLowest */
  --tc-midnight-lift-1:#0B172D;  /* surfaceContainerLow */
  --tc-midnight-lift-2:#111E38;  /* surfaceContainer — standard panel/card */
  --tc-midnight-lift-3:#17264A;  /* surfaceContainerHigh — hover/active */
  --tc-midnight-lift-4:#1D2E5C;  /* surfaceContainerHighest — focused/elevated */
  --tc-steel-dim:      #3B465C;  /* outlineVariant — quieter linework */

  /* Accent containers (hand-picked tints on Midnight) */
  --tc-core-blue-container:    #143B5C;
  --tc-core-blue-fixed:        #7FC7FF;
  --tc-core-blue-fixed-dim:    #5CB5FF;
  --tc-core-blue-inverse:      #1274BF;
  --tc-violet-container:       #2C1F6B;
  --tc-violet-fixed:           #B6A4FF;
  --tc-violet-fixed-dim:       #9B85FF;
  --tc-violet-inverse:         #5A3FDB;
  --tc-phi-gold-container:     #3B2F16;
  --tc-phi-gold-fixed:         #E6D09A;

  /* --------------------------------------------------------------
     3. SEMANTIC ROLES (foreground / background / outline)
     -------------------------------------------------------------- */
  --tc-bg:                var(--tc-midnight);
  --tc-bg-dim:            var(--tc-midnight-depth);
  --tc-surface:           var(--tc-midnight);
  --tc-surface-1:         var(--tc-midnight-lift-1);
  --tc-surface-2:         var(--tc-midnight-lift-2);
  --tc-surface-3:         var(--tc-midnight-lift-3);
  --tc-surface-4:         var(--tc-midnight-lift-4);
  --tc-surface-bright:    var(--tc-midnight-lift-4);

  --tc-fg:                var(--tc-ice-white);  /* primary text on dark */
  --tc-fg-muted:          var(--tc-mist);       /* secondary text */
  --tc-fg-dim:            var(--tc-steel-bright); /* tertiary text — AA on bg and every surface it sits on */
  --tc-fg-inverse:        var(--tc-graphite);   /* text on inverse surfaces */

  --tc-outline:           var(--tc-steel);
  --tc-outline-variant:   var(--tc-steel-dim);

  /* Accent semantic */
  --tc-accent:            var(--tc-core-blue);
  --tc-accent-2:          var(--tc-violet-signal);
  --tc-accent-reserve:    var(--tc-phi-gold);

  /* --------------------------------------------------------------
     4. SURFACE-TINT SEEDS (§29.F)
     Core: Core Blue; MCP: Violet Signal; Auth: Steel.
     Use --tc-surface-tint at the surface level (e.g. body[data-surface="mcp"])
     to shift the elevation accent without changing primary identity.
     -------------------------------------------------------------- */
  --tc-surface-tint:      var(--tc-core-blue);  /* Core default */

  /* --------------------------------------------------------------
     5. SIGNATURE GRADIENT
     Core Blue → Violet Signal (§6, §27.C). Use only in hero art,
     icon highlight moments, motion, and key launch graphics.
     Avoid in body UI.
     -------------------------------------------------------------- */
  --tc-gradient-signature: linear-gradient(135deg, var(--tc-core-blue) 0%, var(--tc-violet-signal) 100%);
  --tc-gradient-signature-vertical: linear-gradient(180deg, var(--tc-core-blue) 0%, var(--tc-violet-signal) 100%);
  --tc-gradient-soft: linear-gradient(135deg, rgba(46,167,255,0.18) 0%, rgba(122,92,255,0.18) 100%);
  --tc-gradient-edge: linear-gradient(180deg, rgba(244,248,255,0.06) 0%, rgba(244,248,255,0) 100%);

  /* --------------------------------------------------------------
     6. TYPOGRAPHY STACKS (§7, §27.D)
     -------------------------------------------------------------- */
  --tc-font-sans:    "Inter", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --tc-font-display: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --tc-font-mono:    "JetBrains Mono", "Geist Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Weight scale */
  --tc-w-regular:    400;
  --tc-w-medium:     500;
  --tc-w-semibold:   600;
  --tc-w-bold:       700;

  /* Type scale — display→ui, generous + premium */
  --tc-fs-display-xl: 80px;  --tc-lh-display-xl: 1.02;  --tc-ls-display-xl: -0.03em;
  --tc-fs-display-lg: 64px;  --tc-lh-display-lg: 1.04;  --tc-ls-display-lg: -0.025em;
  --tc-fs-display-md: 48px;  --tc-lh-display-md: 1.06;  --tc-ls-display-md: -0.022em;
  --tc-fs-h1:         36px;  --tc-lh-h1:         1.12;  --tc-ls-h1:         -0.018em;
  --tc-fs-h2:         28px;  --tc-lh-h2:         1.18;  --tc-ls-h2:         -0.014em;
  --tc-fs-h3:         22px;  --tc-lh-h3:         1.24;  --tc-ls-h3:         -0.010em;
  --tc-fs-h4:         18px;  --tc-lh-h4:         1.32;  --tc-ls-h4:         -0.006em;
  --tc-fs-body-lg:    17px;  --tc-lh-body-lg:    1.55;  --tc-ls-body-lg:    -0.003em;
  --tc-fs-body:       15px;  --tc-lh-body:       1.55;  --tc-ls-body:       0;
  --tc-fs-body-sm:    13px;  --tc-lh-body-sm:    1.5;   --tc-ls-body-sm:    0;
  --tc-fs-label:      13px;  --tc-lh-label:      1.3;   --tc-ls-label:      0.005em;
  --tc-fs-label-sm:   11px;  --tc-lh-label-sm:   1.3;   --tc-ls-label-sm:   0.04em;
  --tc-fs-mono:       13px;  --tc-lh-mono:       1.5;

  /* Eyebrow caps */
  --tc-fs-eyebrow:    11px;  --tc-ls-eyebrow:    0.16em;

  /* --------------------------------------------------------------
     7. SHAPE — corner radii (§8, §27.G — rounded, not cartoonish)
     `xl` matches the 14 px outer radius of the icon mark.
     -------------------------------------------------------------- */
  --tc-radius-xs: 2px;
  --tc-radius-sm: 4px;
  --tc-radius-md: 8px;
  --tc-radius-lg: 12px;
  --tc-radius-xl: 14px;   /* matches icon outer radius */
  --tc-radius-2xl:20px;
  --tc-radius-pill: 999px;

  /* --------------------------------------------------------------
     8. SPACING — 4px base unit (ts/src/tokens/base.ts)
     -------------------------------------------------------------- */
  --tc-space-0:   0;
  --tc-space-1:   4px;
  --tc-space-2:   8px;
  --tc-space-3:   12px;
  --tc-space-4:   16px;
  --tc-space-5:   20px;
  --tc-space-6:   24px;
  --tc-space-8:   32px;
  --tc-space-10:  40px;
  --tc-space-12:  48px;
  --tc-space-16:  64px;
  --tc-space-20:  80px;
  --tc-space-24:  96px;
  --tc-space-32:  128px;

  /* --------------------------------------------------------------
     9. ELEVATION — restrained, dark-first
     Shadows are subtle on Midnight; depth comes from the lift ramp
     more than from drop shadows.
     -------------------------------------------------------------- */
  --tc-shadow-sm:  0 1px 2px rgba(0,0,0,0.30);
  --tc-shadow-md:  0 4px 12px rgba(0,0,0,0.35);
  --tc-shadow-lg:  0 12px 32px rgba(0,0,0,0.45);
  --tc-shadow-xl:  0 24px 64px rgba(0,0,0,0.55);

  /* Inner highlight — the "one luminous edge" §17 mood */
  --tc-inner-edge: inset 0 1px 0 rgba(244,248,255,0.06);

  /* Accent glows — restrained; use only on focal/active states */
  --tc-glow-blue:   0 0 0 1px rgba(46,167,255,0.40), 0 0 24px rgba(46,167,255,0.18);
  --tc-glow-violet: 0 0 0 1px rgba(122,92,255,0.40), 0 0 24px rgba(122,92,255,0.18);

  /* Focus ring — Core Blue at 2px (§D logo usage / UI calm) */
  --tc-focus-ring: 0 0 0 2px var(--tc-bg), 0 0 0 4px var(--tc-core-blue);

  /* --------------------------------------------------------------
     10. MOTION (§10, §27.H — structure first, intelligence second)
     -------------------------------------------------------------- */
  --tc-ease-out:   cubic-bezier(0.22, 1, 0.36, 1);     /* snap into place */
  --tc-ease-in:    cubic-bezier(0.55, 0, 0.55, 0.2);
  --tc-ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --tc-dur-fast:   120ms;
  --tc-dur-base:   200ms;
  --tc-dur-slow:   360ms;
}

/* --------------------------------------------------------------
   Surface variants — apply via [data-surface="core|mcp|auth"] on
   the root or any container to swap the accent tint locally.
   §29.F Surface Accent Strategy.
   -------------------------------------------------------------- */
[data-surface="core"] { --tc-surface-tint: var(--tc-core-blue); }
[data-surface="mcp"]  {
  --tc-surface-tint: var(--tc-violet-signal);
  --tc-accent: var(--tc-violet-signal); /* MCP leans agentic */
  --tc-accent-2: var(--tc-core-blue);
}
[data-surface="auth"] { --tc-surface-tint: var(--tc-steel); }
[data-surface="journal"] {
  --tc-surface-tint: var(--tc-phi-gold);
  --tc-accent-2: var(--tc-phi-gold);
}

/* =============================================================
   SEMANTIC TYPE STYLES
   Use these classes (or copy the rules) wherever you want
   "the canonical h1," not a one-off.
   ============================================================= */

.tc-display-xl,
.tc-display-lg,
.tc-display-md,
.tc-h1, .tc-h2, .tc-h3, .tc-h4 {
  font-family: var(--tc-font-display);
  color: var(--tc-fg);
  text-wrap: balance;
  margin: 0;
}

.tc-display-xl { font-size: var(--tc-fs-display-xl); line-height: var(--tc-lh-display-xl); letter-spacing: var(--tc-ls-display-xl); font-weight: var(--tc-w-semibold); }
.tc-display-lg { font-size: var(--tc-fs-display-lg); line-height: var(--tc-lh-display-lg); letter-spacing: var(--tc-ls-display-lg); font-weight: var(--tc-w-semibold); }
.tc-display-md { font-size: var(--tc-fs-display-md); line-height: var(--tc-lh-display-md); letter-spacing: var(--tc-ls-display-md); font-weight: var(--tc-w-semibold); }

.tc-h1 { font-size: var(--tc-fs-h1); line-height: var(--tc-lh-h1); letter-spacing: var(--tc-ls-h1); font-weight: var(--tc-w-semibold); }
.tc-h2 { font-size: var(--tc-fs-h2); line-height: var(--tc-lh-h2); letter-spacing: var(--tc-ls-h2); font-weight: var(--tc-w-semibold); }
.tc-h3 { font-size: var(--tc-fs-h3); line-height: var(--tc-lh-h3); letter-spacing: var(--tc-ls-h3); font-weight: var(--tc-w-medium); }
.tc-h4 { font-size: var(--tc-fs-h4); line-height: var(--tc-lh-h4); letter-spacing: var(--tc-ls-h4); font-weight: var(--tc-w-medium); }

.tc-body-lg, .tc-body, .tc-body-sm {
  font-family: var(--tc-font-sans);
  color: var(--tc-fg);
  text-wrap: pretty;
  margin: 0;
}
.tc-body-lg { font-size: var(--tc-fs-body-lg); line-height: var(--tc-lh-body-lg); letter-spacing: var(--tc-ls-body-lg); font-weight: var(--tc-w-regular); }
.tc-body    { font-size: var(--tc-fs-body);    line-height: var(--tc-lh-body);    letter-spacing: var(--tc-ls-body);    font-weight: var(--tc-w-regular); }
.tc-body-sm { font-size: var(--tc-fs-body-sm); line-height: var(--tc-lh-body-sm); letter-spacing: var(--tc-ls-body-sm); font-weight: var(--tc-w-regular); color: var(--tc-fg-muted); }

.tc-label {
  font-family: var(--tc-font-sans);
  font-size: var(--tc-fs-label);
  line-height: var(--tc-lh-label);
  letter-spacing: var(--tc-ls-label);
  font-weight: var(--tc-w-medium);
  color: var(--tc-fg);
}
.tc-label-sm {
  font-family: var(--tc-font-sans);
  font-size: var(--tc-fs-label-sm);
  line-height: var(--tc-lh-label-sm);
  letter-spacing: var(--tc-ls-label-sm);
  font-weight: var(--tc-w-medium);
  color: var(--tc-fg-muted);
  text-transform: uppercase;
}

.tc-eyebrow {
  font-family: var(--tc-font-sans);
  font-size: var(--tc-fs-eyebrow);
  letter-spacing: var(--tc-ls-eyebrow);
  text-transform: uppercase;
  font-weight: var(--tc-w-semibold);
  color: var(--tc-fg-dim);
}

.tc-mono, code, kbd, pre, samp {
  font-family: var(--tc-font-mono);
  font-size: var(--tc-fs-mono);
  line-height: var(--tc-lh-mono);
  color: var(--tc-fg);
}

/* Inline code — quiet, on-surface */
:not(pre) > code {
  background: var(--tc-surface-2);
  border: 1px solid var(--tc-outline-variant);
  border-radius: var(--tc-radius-sm);
  padding: 1px 6px;
  font-size: 0.9em;
}

/* Brand wordmark — text rendering convention */
.tc-wordmark {
  font-family: var(--tc-font-display);
  font-weight: var(--tc-w-medium);
  letter-spacing: -0.012em;
  color: var(--tc-fg);
}

/* Gradient text — for hero moments only */
.tc-text-gradient {
  background: var(--tc-gradient-signature);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* =============================================================
   BASE RESET (opt-in via .tc-root or <body class="tc-root">)
   ============================================================= */
.tc-root {
  background: var(--tc-bg);
  color: var(--tc-fg);
  font-family: var(--tc-font-sans);
  font-size: var(--tc-fs-body);
  line-height: var(--tc-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== contentus brand bridge — maps --gr-* onto --tc-* ===== */
/* =============================================================
   Theory Cloud → greater-components bridge
   -------------------------------------------------------------
   Contentus-owned brand consumption layer. This file contains NO brand
   literals: every value resolves to a `--tc-*` token defined by the
   design pack (`colors_and_type.css`, sourced from
   `theory_cloud_branding_package.md`). The pack is the brand authority;
   the `--gr-*` names below are the contract the vendored greater
   components consume.

   This is a token mapping, NOT a component fork. No vendored source is
   edited and no reusable component is reimplemented here. If a rule
   below starts describing component BEHAVIOUR rather than brand values,
   it belongs upstream in greater-components instead.

   Layer order (see `scripts/build-stylesheet.mjs`):
     1. greater tokens      — `--gr-*` defaults    (tarball-pin channel)
     2. greater primitives  — component CSS        (CLI-copy channel)
     3. greater shell       — shell CSS            (CLI-copy channel)
     4. greater blog face   — blog CSS             (CLI-copy channel)
     5. Theory Cloud pack   — `--tc-*` brand tokens (design pack)
     6. THIS FILE           — maps `--gr-*` onto `--tc-*`, last so it wins

   ---- Theme: data-theme="dark" at greater-v0.13.2 ----
   Product design §2's preference is now satisfied: at greater-v0.13.2
   the blog face ships 46 `[data-theme='dark']` selectors (cards, prose,
   headings, review surfaces) and the primitives theme 47 more. The
   shell root carries `data-theme="dark"` (AppShell.svelte — on the
   shell, not <html>, because FaceTheory v4.0.6's adapter pipeline does
   not forward htmlAttrs from renderOptions), and the
   `--gr-color-gray-*` ramp those rules read comes from the greater
   tokens layer at :root.

   The pre-0.13.2 arrangement — an inverted `--gr-color-neutral-*` ramp
   standing in for a dark theme the faces did not ship — is deleted:
   nothing vendored consumes `--gr-color-neutral-*` anymore (verified at
   v0.13.2: zero references outside this file). This was emdash's
   upstream gap U-18, closed by the v0.13.2 dark coverage. Remaining
   coverage holes (`gr-blog-author-card`, `.gr-menu`) are upstream:
   equaltoai/greater-components#1009.
   ============================================================= */

:root {
	color-scheme: dark;

	/* ---- Names the faces use that the tokens package does not define ----
	   Supplied so the vendored CSS resolves; nothing upstream is renamed. */
	--gr-color-surface: var(--tc-surface-1);
	/* `--tc-outline` (Steel — the pack's "neutral UI linework") rather than
	   `--tc-outline-variant`: this is the article card's boundary, and Steel
	   on the card surface clears WCAG 1.4.11's 3:1 non-text minimum where the
	   quieter variant does not. The variant is used below for decorative
	   separators, which 1.4.11 does not govern. */
	--gr-color-border: var(--tc-outline);
	--gr-color-focus: var(--tc-core-blue);
	--gr-shadow-md: var(--tc-shadow-md);
	--gr-shadows-base: var(--tc-shadow-sm);
	--gr-shadows-lg: var(--tc-shadow-lg);
	--gr-spacing-scale-9: var(--tc-space-8);

	/* ---- Accent ramp → Core Blue (brand primary) ---- */
	--gr-color-primary-50: var(--tc-core-blue-container);
	--gr-color-primary-100: var(--tc-core-blue-container);
	--gr-color-primary-200: var(--tc-core-blue-inverse);
	--gr-color-primary-300: var(--tc-core-blue-fixed-dim);
	--gr-color-primary-400: var(--tc-core-blue-fixed-dim);
	--gr-color-primary-500: var(--tc-core-blue);
	--gr-color-primary-600: var(--tc-core-blue);
	--gr-color-primary-700: var(--tc-core-blue-fixed);
	--gr-color-primary-800: var(--tc-core-blue-fixed);
	--gr-color-primary-900: var(--tc-core-blue-fixed);
	--gr-color-primary-950: var(--tc-core-blue-fixed);

	/* ---- Status ramps ---- */
	--gr-color-success-50: var(--tc-surface-2);
	--gr-color-success-100: var(--tc-surface-2);
	--gr-color-success-200: var(--tc-surface-3);
	--gr-color-success-300: var(--tc-steel);
	--gr-color-success-700: var(--tc-fg-muted);
	--gr-color-success-900: var(--tc-fg);
	--gr-color-warning-50: var(--tc-phi-gold-container);
	--gr-color-warning-100: var(--tc-phi-gold-container);
	--gr-color-warning-200: var(--tc-phi-gold-container);
	--gr-color-warning-300: var(--tc-phi-gold);
	--gr-color-warning-700: var(--tc-phi-gold);
	--gr-color-warning-900: var(--tc-phi-gold-fixed);
	--gr-color-error-100: var(--tc-error-container);
	--gr-color-error-500: var(--tc-error);
	--gr-color-error-700: var(--tc-error);

	/* ---- Greater semantic roles ---- */
	--gr-semantic-background-base: var(--tc-bg);
	--gr-semantic-background-surface: var(--tc-surface);
	--gr-semantic-background-raised: var(--tc-surface-2);
	--gr-semantic-background-overlay: var(--tc-surface-3);
	--gr-semantic-background-primary: var(--tc-surface);
	--gr-semantic-background-secondary: var(--tc-surface-1);
	--gr-semantic-background-tertiary: var(--tc-surface-2);
	--gr-semantic-background-input: var(--tc-surface-2);
	--gr-semantic-foreground-primary: var(--tc-fg);
	--gr-semantic-foreground-secondary: var(--tc-fg-muted);
	--gr-semantic-foreground-tertiary: var(--tc-fg-dim);
	--gr-semantic-foreground-disabled: var(--tc-fg-dim);
	--gr-semantic-border-subtle: var(--tc-outline-variant);
	--gr-semantic-border-default: var(--tc-outline);
	--gr-semantic-border-strong: var(--tc-fg-dim);
	--gr-semantic-border-focus: var(--tc-core-blue);
	--gr-semantic-action-primary-default: var(--tc-core-blue);
	--gr-semantic-action-primary-hover: var(--tc-core-blue-fixed-dim);
	--gr-semantic-action-primary-active: var(--tc-core-blue-fixed);
	--gr-semantic-action-link-default: var(--tc-core-blue);
	--gr-semantic-action-link-hover: var(--tc-core-blue-fixed-dim);
	--gr-semantic-action-link-active: var(--tc-core-blue-fixed);
	--gr-semantic-action-error-default: var(--tc-error);
	--gr-semantic-focus-ring: var(--tc-core-blue);

	/* ---- Radii and spacing from the pack's scales ---- */
	--gr-radii-sm: var(--tc-radius-sm);
	--gr-radii-md: var(--tc-radius-md);
	--gr-radii-lg: var(--tc-radius-lg);
	--gr-radii-full: var(--tc-radius-pill);
	--gr-spacing-scale-1: var(--tc-space-1);
	--gr-spacing-scale-2: var(--tc-space-2);
	--gr-spacing-scale-3: var(--tc-space-3);
	--gr-spacing-scale-4: var(--tc-space-4);
	--gr-spacing-scale-5: var(--tc-space-5);
	--gr-spacing-scale-6: var(--tc-space-6);
	--gr-spacing-scale-8: var(--tc-space-8);
	--gr-spacing-scale-10: var(--tc-space-10);
	--gr-spacing-scale-12: var(--tc-space-12);

	/* ---- Typography ----
	   `serif` maps to the sans stack deliberately: the pack specifies
	   Geist / Inter / JetBrains Mono and ships no serif face, and the blog
	   face uses `fontFamily-serif` only as its long-form reading stack. */
	--gr-typography-font: var(--tc-font-sans);
	--gr-typography-fontFamily-sans: var(--tc-font-sans);
	--gr-typography-fontFamily-serif: var(--tc-font-sans);
	--gr-typography-fontFamily-mono: var(--tc-font-mono);

	/* ---- Long-form reading measures ---- */
	--gr-blog-font-family-body: var(--tc-font-sans);
	--gr-blog-font-family-heading: var(--tc-font-display);
	--gr-blog-font-family-code: var(--tc-font-mono);
	--gr-blog-line-height-body: var(--tc-lh-body-lg);
	--gr-blog-line-height-heading: var(--tc-lh-h2);
	--gr-blog-content-max-width: 760px;
	--gr-blog-featured-image-radius: var(--tc-radius-xl);
	--gr-blog-code-radius: var(--tc-radius-md);
	--gr-blog-progress-color: var(--tc-accent);
	--gr-blog-toc-active-color: var(--tc-accent);

	/* ---- Shell metrics ---- */
	--gr-shell-topbar-height: 56px;
	--gr-shell-gutter: var(--tc-space-6);
	--gr-shell-gap-sm: var(--tc-space-2);
	--gr-shell-gap-md: var(--tc-space-4);
	--gr-shell-gap-lg: var(--tc-space-6);
	--gr-shell-sidebar-width-compact: 64px;
	--gr-shell-sidebar-width-sm: 200px;
	--gr-shell-sidebar-width-md: 240px;
	--gr-shell-sidebar-width-lg: 280px;
	--gr-shell-content-max-narrow: 760px;
	--gr-shell-content-max-default: 960px;
	--gr-shell-content-max-wide: 1200px;
}

/* =============================================================
   Dark-theme companion rules
   -------------------------------------------------------------
   `data-theme="dark"` activates the vendored dark rules, which ground
   cards and the article body on raw gray-ramp slabs (gray-900). The
   brand ground is Midnight, so those surfaces are re-grounded on the
   `--tc-*` surfaces here; upstream's dark text colors are kept. Same
   specificity as the vendored dark rules (0,2,0) — this file wins on
   layer order, which is the bridge's whole job.

   `gr-blog-author-card` and `.gr-menu` ship no dark rules at all at
   v0.13.2 and are deliberately NOT forked here: that coverage is
   upstream's to add (equaltoai/greater-components#1009).
   ============================================================= */
[data-theme='dark'] .gr-blog-article-card,
[data-theme='dark'] .gr-blog-review-card {
	background: var(--tc-surface-1);
	border-color: var(--tc-outline);
}

[data-theme='dark'] .gr-blog-article {
	background: transparent;
}

/* Read articles dim to the muted foreground: with no archive or read-state
   of its own yet, :visited is the only signal a returning reader gets that
   they have already opened a card. Descendant-scoped so it wins over the
   vendored dark rule on cascade order, the bridge's whole job. At greater
   v0.13.3 (#1008) the card inverted: the link lives INSIDE the title,
   stretched over the card by ::after, so the selector follows the link. */
[data-theme='dark'] .gr-blog-article-card__title .gr-blog-article-card__link:visited {
	color: var(--tc-fg-muted);
}

/* =============================================================
   Surface variants (product design §2)
   -------------------------------------------------------------
   One brand, three legible modes. `--tc-accent` is the single knob the
   rest of the sheet reads, so a surface swap is one declaration rather
   than a parallel theme.
     journal → Phi Gold  — Articles, Review (the editorial half)
     core    → Core Blue — Compose, Timelines (the social half)
     mcp     → Violet    — Messages, Agents, Drones (system intelligence)
   Only `journal` ships in M1; the other two are declared so later faces
   inherit the mechanism rather than inventing one.
   ============================================================= */

[data-surface='journal'] {
	--tc-accent: var(--tc-phi-gold);
	--tc-accent-2: var(--tc-phi-gold-fixed);
}

[data-surface='core'] {
	--tc-accent: var(--tc-core-blue);
	--tc-accent-2: var(--tc-core-blue-fixed);
}

[data-surface='mcp'] {
	--tc-accent: var(--tc-violet-signal);
	--tc-accent-2: var(--tc-violet-fixed);
}

/* =============================================================
   Contentus application shell
   -------------------------------------------------------------
   Product-specific composition only: document ground, landmarks, nav,
   and the page-level blocks the route layer emits around the face
   components. Anything reusable belongs in greater-components.
   ============================================================= */

html,
body {
	background: var(--tc-bg);
	color: var(--tc-fg);
}

body {
	font-family: var(--tc-font-sans);
	font-size: var(--tc-fs-body-lg);
	line-height: var(--tc-lh-body-lg);
	margin: 0;
	-webkit-font-smoothing: antialiased;
}

:focus-visible {
	outline: 2px solid var(--tc-core-blue);
	outline-offset: 2px;
}

a {
	color: var(--tc-core-blue);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

code {
	font-family: var(--tc-font-mono);
	font-size: var(--tc-fs-mono);
}

.contentus-skip-link {
	position: absolute;
	left: -9999px;
	top: var(--tc-space-2);
	z-index: 10;
	padding: var(--tc-space-2) var(--tc-space-4);
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	text-decoration: none;
}

.contentus-skip-link:focus {
	left: var(--tc-space-4);
}

/* ---- Shell grid: sticky nav | content, collapsing at 960px ---- */
.contentus-shell {
	display: grid;
	grid-template-columns: var(--gr-shell-sidebar-width-md) minmax(0, 1fr);
	gap: var(--tc-space-8);
	min-height: 100vh;
	max-width: var(--gr-shell-content-max-wide);
	margin: 0 auto;
	padding: 0 var(--tc-space-6);
}

.contentus-sidebar {
	position: sticky;
	top: 0;
	align-self: start;
	/* `100dvh` where supported: classic `100vh` includes browser-chrome area
	   on engines with dynamic toolbars, which pushed the session control at
	   the bottom of this column behind the chrome and off screen. The dynamic
	   unit tracks the visible area; the `vh` line is the fallback. */
	height: 100vh;
	height: 100dvh;
	/* Horizontal padding too: without it the compose action's border and the
	   nav's hover backgrounds sat flush against this column's border-right
	   line. */
	padding: var(--tc-space-8) var(--tc-space-4);
	border-right: 1px solid var(--tc-outline-variant);
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-8);
}

.contentus-brand {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	/* The wordmark image is 22px tall; the LINK must still meet WCAG 2.2's
	   24px minimum target, so the box grows around it. */
	min-height: 24px;
	text-decoration: none;
}

.contentus-brand__wordmark {
	display: block;
	height: 22px;
	width: auto;
}

.contentus-nav {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
	/* The nav is the one flex child allowed to shrink and scroll: if the
	   column's content ever exceeds the viewport, the session control stays
	   pinned in view and the nav scrolls between brand and session instead of
	   pushing anything off screen. `min-height: 0` is what lets a flex item
	   shrink below its content height. */
	min-height: 0;
	overflow-y: auto;
}

.contentus-nav__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-3);
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	padding: var(--tc-space-2) var(--tc-space-3);
	border-radius: var(--tc-radius-md);
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-body);
	text-decoration: none;
}

.contentus-nav__link:hover {
	background: var(--tc-surface-1);
	color: var(--tc-fg);
}

.contentus-nav__link[aria-current='page'] {
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	box-shadow: inset 2px 0 0 var(--tc-accent);
}

.contentus-nav__badge {
	min-width: 20px;
	padding: 0 var(--tc-space-1);
	border-radius: var(--tc-radius-pill);
	background: var(--tc-accent);
	color: var(--tc-midnight);
	font-size: var(--tc-fs-label-sm);
	line-height: 20px;
	text-align: center;
}

/* The compose action reads as an action, not a destination: the nav's other
   entries are places, and this one writes. */
.contentus-nav__compose {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: var(--tc-space-3);
	padding: var(--tc-space-2) var(--tc-space-4);
	border: 1px solid var(--tc-core-blue);
	border-radius: var(--tc-radius-pill);
	background: var(--tc-core-blue);
	color: var(--tc-midnight);
	font-size: var(--tc-fs-body);
	font-weight: var(--tc-w-semibold);
	text-decoration: none;
}

.contentus-session {
	margin-top: auto;
	/* Pinned: never shrink away. The nav above is the only flex child allowed
	   to shrink/scroll; if this block could shrink, a short viewport would
	   crush the account control instead of scrolling the nav. */
	flex-shrink: 0;
	font-size: var(--tc-fs-body-sm);
	color: var(--tc-fg-muted);
}

.contentus-session__button {
	min-height: 44px;
	width: 100%;
	padding: var(--tc-space-2) var(--tc-space-4);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	font: inherit;
	cursor: pointer;
}

.contentus-session__button:hover {
	border-color: var(--tc-accent);
}

/* Pre-mount placeholder: inert and unpainted, but occupying exactly the real
   control's box so the post-mount swap cannot move anything. */
.contentus-session__button--pending {
	visibility: hidden;
	cursor: default;
}

/* Account menu (P1-11): sign-out lives behind a menu with an inline
   confirmation, never as a bare prominent button. The session block sits at
   the BOTTOM of the desktop sidebar, so the menu opens upward; below 960px
   the sidebar is a top row and it opens downward, end-aligned. */
.contentus-account {
	position: relative;
}

.contentus-account__menu {
	position: absolute;
	bottom: calc(100% + var(--tc-space-2));
	left: 0;
	right: 0;
	z-index: 20;
	display: grid;
	gap: var(--tc-space-2);
	padding: var(--tc-space-3);
	background: var(--tc-surface-2);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	box-shadow: var(--tc-shadow-md);
}

.contentus-account__item {
	min-height: 44px;
	padding: var(--tc-space-2) var(--tc-space-3);
	border: 1px solid transparent;
	border-radius: var(--tc-radius-sm);
	background: transparent;
	color: var(--tc-fg);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.contentus-account__item:hover {
	background: var(--tc-surface-3);
}

.contentus-account__item--destructive {
	color: var(--tc-error);
}

.contentus-account__confirm {
	margin: 0;
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-body-sm);
}

.contentus-account__confirm-actions {
	display: grid;
	gap: var(--tc-space-1);
}

.contentus-main {
	min-width: 0;
	padding: var(--tc-space-12) 0 var(--tc-space-24);
}

/* The page footer (contentinfo). Column 2 on the desktop grid so it closes
   the reading column rather than sitting under the sticky sidebar. */
.contentus-footer {
	grid-column: 2;
	padding: var(--tc-space-6) 0 var(--tc-space-10);
	border-top: 1px solid var(--tc-outline-variant);
	color: var(--tc-fg-dim);
	font-size: var(--tc-fs-body-sm);
}

.contentus-page-header {
	margin-bottom: var(--tc-space-12);
}

.contentus-eyebrow {
	font-size: var(--tc-fs-eyebrow);
	letter-spacing: var(--tc-ls-eyebrow);
	text-transform: uppercase;
	color: var(--tc-accent);
	margin: 0 0 var(--tc-space-4) 0;
}

.contentus-h1 {
	font-family: var(--tc-font-display);
	font-size: var(--tc-fs-h1);
	line-height: var(--tc-lh-h1);
	letter-spacing: var(--tc-ls-h1);
	font-weight: var(--tc-w-semibold);
	margin: 0 0 var(--tc-space-4) 0;
}

.contentus-lede {
	color: var(--tc-fg-muted);
	max-width: 56ch;
	margin: 0 0 var(--tc-space-8) 0;
}

.contentus-meta {
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-body-sm);
	margin: 0 0 var(--tc-space-4) 0;
}

/* ---- Index grid: single column on mobile per product design §5 ---- */
.contentus-card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tc-space-6);
	border-top: 1px solid var(--tc-outline-variant);
	padding-top: var(--tc-space-8);
}

.contentus-filters {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tc-space-2);
	margin-bottom: var(--tc-space-8);
}

.contentus-filter {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	padding: 0 var(--tc-space-4);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-pill);
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-body-sm);
	text-decoration: none;
}

.contentus-filter:hover,
.contentus-filter[aria-current='page'] {
	border-color: var(--tc-accent);
	color: var(--tc-fg);
}

/* "Load more" (P1-10): a real button, 44px target, centered under the grid.
   The appended cards announce through the route's visually-hidden status
   region rather than by moving focus off the control. */
.contentus-load-more {
	display: grid;
	justify-items: center;
	gap: var(--tc-space-3);
	margin-top: var(--tc-space-8);
}

.contentus-load-more__button {
	min-height: 44px;
	padding: var(--tc-space-2) var(--tc-space-6);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-pill);
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	font: inherit;
	cursor: pointer;
}

.contentus-load-more__button:hover:not(:disabled) {
	border-color: var(--tc-accent);
}

.contentus-load-more__button:disabled {
	cursor: default;
	color: var(--tc-fg-muted);
}

/* ---- Designed empty / unavailable states ---- */
.contentus-notice {
	border: 1px solid var(--tc-outline-variant);
	border-left: 3px solid var(--tc-accent);
	border-radius: var(--tc-radius-md);
	background: var(--tc-surface-1);
	padding: var(--tc-space-6);
	margin: var(--tc-space-8) 0;
}

.contentus-notice__title {
	font-family: var(--tc-font-display);
	font-size: var(--tc-fs-h4);
	font-weight: var(--tc-w-semibold);
	margin: 0 0 var(--tc-space-2) 0;
}

.contentus-notice__body {
	color: var(--tc-fg-muted);
	margin: 0;
}

.contentus-reader {
	max-width: var(--gr-blog-content-max-width);
}

/* =============================================================
   Face 2 — review queue (product design §5; contentus-owned, M2d.1)

   Only the queue AROUND the cards. Every `.gr-blog-review-*` class the
   vendored `Review.QueueCard` / `AttributionStrip` / `VerdictActions`
   emit is styled by the blog face's own theme.css, which the site
   stylesheet already adopts — unlike `compose` at M3, the `review`
   registry entry ships its appearance upstream, so there is no shim
   here and nothing for a pin bump to drift away from.
   ============================================================= */
.contentus-h2 {
	font-family: var(--tc-font-display);
	font-size: var(--tc-fs-h3);
	font-weight: var(--tc-w-semibold);
	margin: 0 0 var(--tc-space-4) 0;
}

.contentus-review-group {
	border-top: 1px solid var(--tc-outline-variant);
	padding-top: var(--tc-space-6);
	margin-bottom: var(--tc-space-8);
}

/* The contentus-owned act-as attribution row, below the vendored strip inside
   the same panel. The border marks the seam: everything above is the vendored
   chrome's; this row is contentus's and disappears with the field. */
.contentus-review-acted-by {
	margin-top: var(--tc-space-4);
	padding-top: var(--tc-space-4);
	border-top: 1px solid var(--tc-outline-variant);
}

/* The act-as banner above the review surfaces. The accent border is the same
   signal the selected row on the agents route carries: acting as an agent is
   always visible, never a silent restyle. Absence states nothing. */
.contentus-act-as-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tc-space-2) var(--tc-space-4);
	margin: 0 0 var(--tc-space-4);
	padding: var(--tc-space-3) var(--tc-space-4);
	background: var(--tc-surface-1);
	border: 1px solid var(--tc-accent);
	border-radius: var(--tc-radius-md);
	line-height: 1.55;
}

.contentus-act-as-banner__link {
	color: var(--tc-accent);
	font-weight: var(--tc-w-semibold);
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.contentus-review-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tc-space-4);
}

.contentus-review-empty {
	color: var(--tc-fg-muted);
	max-width: 60ch;
	margin: 0;
}

.contentus-review-hint {
	color: var(--tc-fg-muted);
	margin: var(--tc-space-6) 0;
}

/* ---- Workspace: metadata rail beside the server-rendered preview ----
   Desktop is two columns; the mobile single-column form lands with the
   segmented control in M2d.4. The rail comes FIRST in the document, so
   the stacked order already reads attribution-then-body: knowing who
   wrote something changes how the prose reads. */
.contentus-review-workspace {
	display: grid;
	grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
	gap: var(--tc-space-6);
	align-items: start;
}

.contentus-review-rail {
	display: grid;
	gap: var(--tc-space-4);
	min-width: 0;
}

.contentus-review-preview {
	min-width: 0;
}

.contentus-review-meta {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: var(--tc-space-2) var(--tc-space-4);
	margin: 0 0 var(--tc-space-4) 0;
	font-size: var(--tc-fs-body-sm);
}

.contentus-review-meta dt {
	color: var(--tc-fg-muted);
}

.contentus-review-meta dd {
	margin: 0;
	overflow-wrap: anywhere;
}

/* The vendored `DefinitionItem` (greater primitives) switches to a two-column
   label/value grid — `minmax(0, 14rem) minmax(0, 1fr)` — at 640px VIEWPORT
   width. Inside the 22rem rail that leaves the value column roughly one
   character wide, and `word-break: break-word` then stacks the attribution a
   letter per line. The breakpoint cannot see its container, so in the rail
   the strip keeps its stacked (sub-640px) form at every viewport. The
   `grid-column` reset matters: the vendored media query pins the label to
   column 1 and the content to column 2, which against a single track would
   open an implicit second column and recreate the squeeze. */
.contentus-review-rail .gr-definition-item {
	grid-template-columns: 1fr;
}

.contentus-review-rail .gr-definition-item__label,
.contentus-review-rail .gr-definition-item__content {
	grid-column: auto;
}

.contentus-review-note {
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-body-sm);
	margin: 0 0 var(--tc-space-2) 0;
}

.contentus-review-errors {
	margin: 0;
	padding-left: var(--tc-space-6);
	color: var(--tc-fg-muted);
	font-family: var(--tc-font-mono);
	font-size: var(--tc-fs-body-sm);
}

/* ---- Verdict and publish controls (contentus-owned, M2d.3) ----
   The vendored `Review.VerdictActions` brings its own appearance from the
   blog face theme; these are the contentus controls around it. 44px is a
   floor on every one of them, not a preference. */
.contentus-review-verdict {
	display: grid;
	gap: var(--tc-space-2);
}

.contentus-review-publish {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tc-space-3);
	margin-bottom: var(--tc-space-3);
}

.contentus-review-publish__primary,
.contentus-review-publish__secondary {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 var(--tc-space-5);
	border-radius: var(--tc-radius-md);
	font: inherit;
	cursor: pointer;
}

.contentus-review-publish__primary {
	border: 1px solid var(--tc-accent);
	background: var(--tc-accent);
	color: var(--tc-midnight);
	font-weight: var(--tc-w-semibold);
}

.contentus-review-publish__secondary {
	border: 1px solid var(--tc-outline-variant);
	background: transparent;
	color: var(--tc-fg);
}

.contentus-review-publish__primary[disabled],
.contentus-review-publish__secondary[disabled] {
	opacity: 0.6;
	cursor: default;
}

.contentus-review-field {
	display: grid;
	gap: var(--tc-space-2);
	margin: var(--tc-space-4) 0;
}

.contentus-review-field input {
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
	background: var(--tc-surface-1);
	color: var(--tc-fg);
	font: inherit;
}

.contentus-review-error {
	color: var(--tc-fg);
	border-left: 3px solid var(--tc-accent);
	padding-left: var(--tc-space-3);
	margin: var(--tc-space-3) 0 0 0;
	font-size: var(--tc-fs-body-sm);
}

/* The decisions sit under both columns on desktop, and become the sticky
   bar below. `grid-column: 1 / -1` rather than a third column: a verdict is
   about the whole draft, not about one pane of it. */
.contentus-review-actions {
	grid-column: 1 / -1;
	display: grid;
	gap: var(--tc-space-4);
}

/* The segmented control has nothing to switch while both panels are on
   screen, so above the breakpoint it is not in the layout at all. */
.contentus-review-segmented {
	display: none;
}

/* =============================================================
   Single-column workspace (product design §5; M2d.4)

   ONE PANEL AT A TIME, NEVER A SPLIT. A split view on a phone is two
   columns too narrow to read instead of one that is. `data-panel` on
   the workspace root is the only state; this media query is what
   decides that it means anything. No script measures the viewport.
   ============================================================= */
@media (max-width: 960px) {
	.contentus-review-workspace {
		grid-template-columns: 1fr;
		/* Room for the sticky bar and, below it, the tab bar and the home
		   indicator — so the last line of a preview is readable rather than
		   permanently behind the controls. */
		padding-bottom: calc(
			var(--tc-space-20) + var(--contentus-tabbar-height) + var(--contentus-safe-bottom)
		);
	}

	.contentus-review-segmented {
		display: flex;
		gap: var(--tc-space-2);
		margin-bottom: var(--tc-space-4);
		padding: var(--tc-space-1);
		border: 1px solid var(--tc-outline-variant);
		border-radius: var(--tc-radius-pill);
		background: var(--tc-surface-1);
	}

	.contentus-review-segmented__option {
		flex: 1;
		/* 44px is a floor, not a preference. */
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		border: 0;
		border-radius: var(--tc-radius-pill);
		background: transparent;
		color: var(--tc-fg-muted);
		font: inherit;
		cursor: pointer;
	}

	.contentus-review-segmented__option[aria-pressed='true'] {
		background: var(--tc-surface-2);
		color: var(--tc-fg);
		font-weight: var(--tc-w-semibold);
	}

	/* The panel the control is not showing is GONE, not merely hidden behind
	   another: `display: none` keeps it out of the accessibility tree and out
	   of the tab order, so a screen reader and a keyboard agree with the
	   painted state. */
	.contentus-review-workspace[data-panel='details'] [data-review-panel='preview'],
	.contentus-review-workspace[data-panel='preview'] [data-review-panel='details'] {
		display: none;
	}

	/* The decisions stay reachable while a long preview scrolls. A decision
	   surface that scrolls away is one that gets made from memory. */
	.contentus-review-actions {
		position: sticky;
		bottom: calc(var(--contentus-tabbar-height) + var(--contentus-safe-bottom));
		z-index: 2;
		gap: var(--tc-space-2);
		padding-top: var(--tc-space-2);
		background: var(--tc-bg);
		border-top: 1px solid var(--tc-outline-variant);
	}
}

.contentus-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* =============================================================
   Mobile chrome — bottom tab bar, compose FAB, sheet
   (product design §4; contentus-owned, M3.1)
   -------------------------------------------------------------
   greater-components ships no bottom-nav, drawer, or sheet at
   greater-v0.11.9 — a planned upstream gap (§7). These rules are the
   presentation half of the interim chrome; the components are
   `src/lib/shell/MobileTabBar.svelte` and `src/lib/shell/Sheet.svelte`.
   SWAP-TO-VENDORED: delete this whole block when greater M3a lands its
   mobile-nav components and the two files above become bindings.

   Metrics, all from the brand's own scales:
     --contentus-tabbar-height  56px  bar chrome, excluding the safe area
     44px minimum touch target on every tab and the FAB
     env(safe-area-inset-bottom) keeps the row clear of a home indicator

   No affordance here depends on hover. Every tab carries a permanent text
   label beside its icon, current state is `aria-current` plus a painted
   indicator, and the hover rules below only add emphasis to something
   already legible — which is the rule for a surface whose primary input
   has no hover at all.
   ============================================================= */

:root {
	--contentus-tabbar-height: 56px;
	--contentus-fab-size: 56px;
	--contentus-safe-bottom: env(safe-area-inset-bottom, 0px);
}

.contentus-tabbar {
	display: none;
}

.contentus-tabbar__list {
	display: flex;
	align-items: stretch;
	justify-content: space-around;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.contentus-tabbar__item {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
}

.contentus-tabbar__tab {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	min-width: 44px;
	padding: var(--tc-space-1) var(--tc-space-1);
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-label-sm);
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}

.contentus-tabbar__tab[aria-disabled='true'] {
	color: var(--tc-fg-dim);
}

.contentus-tabbar__tab[aria-current='page'] {
	color: var(--tc-fg);
}

/* The current-tab indicator is a painted bar, not a colour change alone:
   colour is the one signal a reader may not be able to resolve. */
.contentus-tabbar__tab[aria-current='page']::before {
	content: '';
	position: absolute;
	top: 0;
	width: 28px;
	height: 2px;
	border-radius: var(--tc-radius-pill);
	background: var(--tc-accent);
}

.contentus-tabbar__label {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.contentus-tabbar__upcoming {
	font-size: var(--tc-fs-label-sm);
	color: var(--tc-fg-dim);
}

.contentus-fab {
	display: none;
}

/* ---- Sheet chrome ----
   `100svh` (small viewport height) rather than `100vh`: on a phone the
   large viewport is the pre-scroll one, so `100vh` puts the sticky action
   bar under the browser's own chrome exactly when the keyboard is up and
   the submit button is what the reader is reaching for. */
.contentus-sheet-scrim {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: color-mix(in srgb, var(--tc-midnight-depth) 72%, transparent);
}

.contentus-sheet {
	position: fixed;
	z-index: 41;
	display: flex;
	flex-direction: column;
	background: var(--tc-surface-1);
	border: 1px solid var(--tc-outline-variant);
	box-shadow: var(--tc-shadow-lg);
	/* Desktop default: a centered dialog. The mobile full-screen form is the
	   ≤960px override below. */
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(640px, calc(100vw - var(--tc-space-8)));
	max-height: min(80svh, calc(100svh - var(--tc-space-8)));
	border-radius: var(--tc-radius-lg);
}

.contentus-sheet__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-4);
	padding: var(--tc-space-4) var(--tc-space-5);
	border-bottom: 1px solid var(--tc-outline-variant);
}

.contentus-sheet__title {
	font-family: var(--tc-font-display);
	font-size: var(--tc-fs-h4);
	font-weight: var(--tc-w-semibold);
	margin: 0;
}

.contentus-sheet__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	border: 1px solid transparent;
	border-radius: var(--tc-radius-md);
	background: transparent;
	color: var(--tc-fg-muted);
	cursor: pointer;
}

.contentus-sheet__close:hover {
	background: var(--tc-surface-2);
	color: var(--tc-fg);
}

.contentus-sheet__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: var(--tc-space-5);
}

.contentus-sheet__actions {
	position: sticky;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: var(--tc-space-3);
	padding: var(--tc-space-4) var(--tc-space-5);
	padding-bottom: calc(var(--tc-space-4) + var(--contentus-safe-bottom));
	border-top: 1px solid var(--tc-outline-variant);
	background: var(--tc-surface-1);
}

/* =============================================================
   Breakpoints — sim's proven system (product design §4)
   960px: grid collapses to one column; the bottom tab bar takes over
          from the sidebar nav
   720px: tighter gutters, stacked headers
   640px: tab labels tighten, sheet loses its inset
   480px: smallest supported phone — labels shrink before targets do
   ============================================================= */

@media (max-width: 960px) {
	.contentus-shell {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		padding: 0 var(--tc-space-4);
	}

	.contentus-sidebar {
		position: static;
		height: auto;
		padding: var(--tc-space-4) 0;
		border-right: none;
		border-bottom: 1px solid var(--tc-outline-variant);
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: var(--tc-space-4);
	}

	/* The bottom tab bar is the mobile nav (product design §4), so the sidebar
	   nav is not also shown — two navigation systems on one small screen is
	   worse than one. The sidebar collapses to brand + session, which the tab
	   bar deliberately does not carry.

	   Review is the one primary destination the four-tab bar has no slot for.
	   §4 answers that: "tabs carry the unread/review badges" — when M2 lands,
	   the review count rides the Articles tab (the journal surface it belongs
	   to) rather than becoming a fifth target that would push every tab under
	   44px on a 360px screen. */
	.contentus-nav {
		display: none;
	}

	.contentus-session {
		margin-top: 0;
	}

	.contentus-account__menu {
		/* The sidebar is a top row below 960px, so the menu opens downward,
		   end-aligned against the session control. */
		bottom: auto;
		top: calc(100% + var(--tc-space-2));
		left: auto;
		width: min(260px, calc(100vw - var(--tc-space-8)));
	}

	.contentus-main {
		/* Clear the fixed tab bar and the FAB's overhang, plus the safe area. */
		padding: var(--tc-space-8) 0
			calc(var(--tc-space-16) + var(--contentus-tabbar-height) + var(--contentus-safe-bottom));
	}

	.contentus-footer {
		/* Single column below 960px; keep the last line clear of the fixed bar. */
		grid-column: auto;
		padding-bottom: calc(
			var(--tc-space-6) + var(--contentus-tabbar-height) + var(--contentus-safe-bottom)
		);
	}

	.contentus-tabbar {
		position: fixed;
		z-index: 30;
		right: 0;
		bottom: 0;
		left: 0;
		display: block;
		padding-bottom: var(--contentus-safe-bottom);
		border-top: 1px solid var(--tc-outline-variant);
		background: var(--tc-surface-1);
		box-shadow: var(--tc-shadow-lg);
	}

	.contentus-tabbar__list {
		min-height: var(--contentus-tabbar-height);
		/* Leave the middle clear for the FAB without narrowing any tab: the two
		   centre items keep their full width and the FAB floats above them. */
		padding: 0 var(--tc-space-2);
	}

	.contentus-fab {
		position: fixed;
		z-index: 31;
		left: 50%;
		bottom: calc(
			var(--contentus-tabbar-height) - var(--contentus-fab-size) / 2 + var(--contentus-safe-bottom)
		);
		transform: translateX(-50%);
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: var(--contentus-fab-size);
		height: var(--contentus-fab-size);
		border: 1px solid var(--tc-outline);
		border-radius: var(--tc-radius-pill);
		background: var(--tc-core-blue);
		color: var(--tc-midnight);
		box-shadow: var(--tc-shadow-lg);
		text-decoration: none;
	}

	.contentus-fab[aria-disabled='true'] {
		background: var(--tc-surface-2);
		color: var(--tc-fg-dim);
	}

	/* Full-screen sheet on mobile: the composer is the highest-frequency
	   mobile write path, and a centered dialog wastes the screen it needs. */
	.contentus-sheet {
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		transform: none;
		width: 100%;
		height: 100svh;
		max-height: 100svh;
		border: none;
		border-radius: 0;
	}
}

@media (max-width: 720px) {
	.contentus-h1 {
		font-size: var(--tc-fs-h2);
		line-height: var(--tc-lh-h2);
	}

	.contentus-main {
		padding: var(--tc-space-6) 0
			calc(var(--tc-space-12) + var(--contentus-tabbar-height) + var(--contentus-safe-bottom));
	}

	.contentus-sheet__header,
	.contentus-sheet__body,
	.contentus-sheet__actions {
		padding-left: var(--tc-space-4);
		padding-right: var(--tc-space-4);
	}
}

@media (max-width: 640px) {
	.contentus-shell {
		padding: 0 var(--tc-space-3);
	}

	.contentus-tabbar__list {
		padding: 0;
	}

	.contentus-tabbar__upcoming {
		/* The milestone marker is the first thing to go: the label and the
		   target matter more than the note, and the sidebar still states it. */
		display: none;
	}
}

@media (max-width: 480px) {
	.contentus-shell {
		padding: 0 var(--tc-space-2);
	}

	/* Labels shrink; touch targets do not. 44px is a floor, not a preference. */
	.contentus-tabbar__label {
		font-size: var(--tc-fs-label-sm);
		letter-spacing: -0.01em;
	}

	.contentus-tabbar__tab {
		padding-left: 0;
		padding-right: 0;
	}
}

/* ===== contentus compose theme — appearance for upstream class contract ===== */
/* =============================================================
   Compose theme — interim consumption layer
   -------------------------------------------------------------
   WHY THIS FILE EXISTS, and when it should stop existing.

   `greater add compose` vendors twelve Svelte components plus their
   utilities and NO stylesheet. The registry record for the `compose`
   shared module (`packages/cli/src/registry/shared.ts`) lists only
   `component`, `types`, and `utils` files — there is no `styles` entry —
   while every `.compose-*` class those components emit is defined in
   `packages/faces/social/src/theme.css`, which is only reachable by
   installing the entire social face. The same holds for the
   `media-composer`, `poll-composer`, and `custom-emoji-picker` patterns.

   So a consumer that vendors the compose module the way the CLI offers it
   gets working components with no appearance at all. Installing the whole
   social face to obtain its stylesheet would drag in timeline, status,
   profile, lists, filters, hashtags, messaging, and admin — modules
   milestones 4 through 6 own, none of them verified SSR-safe here, plus a
   virtualisation dependency contentus does not use. That is not a narrower
   fix than this file; it is a much wider one.

   This layer is therefore contentus's own appearance for upstream's class
   contract. It is APPEARANCE ONLY: no rule here changes what a component
   does, what it emits, or how it behaves. Anything that would, belongs
   upstream.

   SUNSET: delete this file and its layer in `scripts/build-stylesheet.mjs`
   when the `greater` CLI emits per-module CSS for the shared and pattern
   registry records — routed upstream as the M3 consumption finding.

   Values resolve to `--tc-*` and `--gr-*` tokens only; like `bridge.css`,
   this file contains no brand literals of its own.
   ============================================================= */

/* =============================================================
   Pattern variable bridge
   -------------------------------------------------------------
   The `media-composer`, `poll-composer`, and `custom-emoji-picker`
   patterns DO ship styles — Svelte `<style>` blocks, which the client
   build emits as a real stylesheet and FaceTheory links. So unlike the
   compose compound they are not unstyled; they are styled for a LIGHT
   theme, because every colour they read is spelled
   `var(--bg-primary, #fff)` and the variable is defined nowhere in the
   greater token set. Undefined name, literal fallback, white boxes on the
   Midnight ground.

   These declarations define the names, so the fallbacks never apply. This
   is the same job `bridge.css` does for `--gr-*`, on a second vocabulary
   the patterns invented — and it is a mapping, not an override: no rule
   below restyles a pattern, it only answers the question the pattern asked.

   Routed upstream with the missing-CSS finding: patterns should read the
   `--gr-*` semantic tokens the rest of the kit uses, and then a consumer
   that has themed greater has themed them too.
   ============================================================= */

:root {
	--bg-primary: var(--tc-surface-1);
	--bg-secondary: var(--tc-surface-2);
	--bg-tertiary: var(--tc-surface-3);
	--bg-hover: var(--tc-surface-2);
	--bg-selected: var(--tc-core-blue-container);
	--border-color: var(--tc-outline-variant);
	--border-hover: var(--tc-outline);
	--focus-color: var(--tc-core-blue);
	--text-primary: var(--tc-fg);
	--text-secondary: var(--tc-fg-muted);
	--text-tertiary: var(--tc-fg-dim);
	--primary-color: var(--tc-core-blue);
	--primary-color-dark: var(--tc-core-blue-fixed);
	--primary-color-light: var(--tc-core-blue-fixed-dim);
	--danger-color: var(--tc-error);
	--warning-color: var(--tc-phi-gold);
	--warning-icon: var(--tc-phi-gold);
	--warning-bg: var(--tc-phi-gold-container);
	--warning-bg-hover: var(--tc-phi-gold-container);
	--warning-border: var(--tc-phi-gold);
}

/* ---- Compose.Root: the form container ---- */
.compose-root {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-4);
}

.compose-root__error {
	border: 1px solid var(--tc-error);
	border-radius: var(--tc-radius-md);
	background: var(--tc-error-container);
	color: var(--tc-fg);
	padding: var(--tc-space-3) var(--tc-space-4);
	font-size: var(--tc-fs-body-sm);
}

.compose-root__reply-indicator {
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-body-sm);
}

.compose-root--submitting {
	opacity: 0.85;
}

/* ---- Compose.Editor: the textarea ----
   The autosize mechanics (`gr-autosize-textarea`) already ship in the
   vendored primitives theme; only the box around them is missing. */
.compose-editor {
	min-height: 8rem;
	padding: var(--tc-space-4);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	font-size: var(--tc-fs-body-lg);
	line-height: var(--tc-lh-body-lg);
}

.compose-editor:focus-within {
	border-color: var(--tc-core-blue);
	outline: 2px solid var(--tc-core-blue);
	outline-offset: 1px;
}

.compose-editor--disabled {
	opacity: 0.7;
}

.compose-editor > textarea::placeholder {
	color: var(--tc-fg-dim);
}

/* ---- Compose.VisibilitySelect ---- */
.compose-visibility-select {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
	min-width: 0;
}

.compose-visibility-select__label {
	font-size: var(--tc-fs-label-sm);
	letter-spacing: var(--tc-ls-eyebrow);
	text-transform: uppercase;
	color: var(--tc-fg-muted);
}

.compose-visibility-select__select {
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	font: inherit;
}

.compose-visibility-select__description {
	margin: 0;
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-body-sm);
}

/* ---- Compose.CharacterCount ---- */
.compose-character-count {
	display: inline-flex;
	align-items: center;
	gap: var(--tc-space-2);
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-body-sm);
	font-variant-numeric: tabular-nums;
	/* The vendored component paints its ring background from this variable and
	   falls back to a light-theme literal when it is undefined. */
	--compose-progress-bg: var(--tc-outline-variant);
}

.compose-character-count--near-limit {
	color: var(--tc-phi-gold);
}

.compose-character-count--over-limit {
	color: var(--tc-error);
}

.compose-character-count__progress-circle {
	transition: stroke-dashoffset var(--tc-dur-base) var(--tc-ease-out);
}

/* ---- Compose.Submit ---- */
.compose-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--tc-space-2);
	min-height: 44px;
	padding: 0 var(--tc-space-6);
	border: 1px solid var(--tc-core-blue);
	border-radius: var(--tc-radius-pill);
	background: var(--tc-core-blue);
	color: var(--tc-midnight);
	font: inherit;
	font-weight: var(--tc-w-semibold);
	cursor: pointer;
}

.compose-submit:disabled {
	border-color: var(--tc-outline);
	background: var(--tc-surface-2);
	color: var(--tc-fg-dim);
	cursor: not-allowed;
}

.compose-submit__spinner {
	display: inline-flex;
	width: 1em;
	height: 1em;
}

.compose-submit__spinner svg {
	width: 100%;
	height: 100%;
	animation: contentus-compose-spin 900ms linear infinite;
}

@keyframes contentus-compose-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.compose-submit__spinner svg {
		animation: none;
	}

	.compose-character-count__progress-circle {
		transition: none;
	}
}

/* =============================================================
   Contentus-owned composer chrome
   -------------------------------------------------------------
   The controls lesser's contract needs and greater's compose state does
   not model: content warning, `sensitive`, and the byte-budget notice.
   ============================================================= */

.contentus-compose {
	max-width: var(--gr-shell-content-max-narrow);
}

.contentus-compose-controls {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--tc-space-4);
	align-items: start;
	padding: var(--tc-space-4);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
	background: var(--tc-surface-1);
}

.contentus-compose-field {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
	min-width: 0;
}

.contentus-compose-field__row {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
}

.contentus-compose-field__label {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--tc-space-2);
	font-size: var(--tc-fs-label-sm);
	letter-spacing: var(--tc-ls-eyebrow);
	text-transform: uppercase;
	color: var(--tc-fg-muted);
}

.contentus-compose-field__count {
	font-variant-numeric: tabular-nums;
	letter-spacing: normal;
	text-transform: none;
}

.contentus-compose-input {
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	font: inherit;
}

.contentus-compose-input::placeholder {
	color: var(--tc-fg-dim);
}

/* The whole label is the target, so the 44px minimum applies to the row
   rather than to the checkbox glyph — a 16px box is not a touch target no
   matter how large the text beside it is. */
.contentus-compose-toggle {
	display: flex;
	align-items: center;
	gap: var(--tc-space-3);
	min-height: 44px;
	cursor: pointer;
}

.contentus-compose-toggle input[type='checkbox'] {
	width: 20px;
	height: 20px;
	accent-color: var(--tc-core-blue);
	flex: none;
}

.contentus-compose-toggle__label {
	display: inline-flex;
	align-items: center;
	gap: var(--tc-space-2);
	color: var(--tc-fg);
	font-size: var(--tc-fs-body);
}

.contentus-compose-hint {
	margin: 0;
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-body-sm);
}

.contentus-compose-hint code {
	color: var(--tc-fg);
}

/* Said when a reply or quote would reach further than the post it answers.
   Warning weight, not error weight: the poster chose it, and the choice is
   allowed — it just is not allowed to be invisible. */
.contentus-compose-reach {
	display: flex;
	align-items: flex-start;
	gap: var(--tc-space-2);
	margin: 0;
	padding: var(--tc-space-3) var(--tc-space-4);
	border: 1px solid var(--tc-phi-gold);
	border-radius: var(--tc-radius-md);
	background: var(--tc-phi-gold-container);
	color: var(--tc-fg);
	font-size: var(--tc-fs-body-sm);
}

.contentus-compose-budget {
	margin: 0;
	padding: var(--tc-space-3) var(--tc-space-4);
	border: 1px solid var(--tc-phi-gold);
	border-radius: var(--tc-radius-md);
	background: var(--tc-phi-gold-container);
	color: var(--tc-fg);
	font-size: var(--tc-fs-body-sm);
}

.contentus-compose-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-4);
	padding-top: var(--tc-space-2);
}

.contentus-compose-actions__buttons {
	display: flex;
	align-items: center;
	gap: var(--tc-space-3);
}

/* ---- Reply / quote / edit context ---- */

.contentus-compose-source {
	padding: var(--tc-space-4);
	border: 1px solid var(--tc-outline-variant);
	border-left: 3px solid var(--tc-accent);
	border-radius: var(--tc-radius-md);
	background: var(--tc-surface-1);
}

.contentus-compose-source__eyebrow {
	margin: 0 0 var(--tc-space-1) 0;
	font-size: var(--tc-fs-eyebrow);
	letter-spacing: var(--tc-ls-eyebrow);
	text-transform: uppercase;
	color: var(--tc-accent);
}

.contentus-compose-source__author {
	margin: 0 0 var(--tc-space-1) 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--tc-space-2);
}

.contentus-compose-source__handle {
	color: var(--tc-fg-muted);
	font-family: var(--tc-font-mono);
	font-size: var(--tc-fs-body-sm);
}

.contentus-compose-source__warning {
	margin: var(--tc-space-2) 0 0 0;
	color: var(--tc-phi-gold);
	font-size: var(--tc-fs-body-sm);
}

.contentus-compose-source__attribution {
	margin: var(--tc-space-2) 0 0 0;
	color: var(--tc-violet-signal);
	font-size: var(--tc-fs-body-sm);
}

/* ---- Agent attribution ---- */

.contentus-compose-attribution {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-3);
	padding: var(--tc-space-4);
	border: 1px solid var(--tc-violet-signal);
	border-radius: var(--tc-radius-md);
	background: var(--tc-surface-1);
}

.contentus-compose-attribution__title {
	display: flex;
	align-items: center;
	gap: var(--tc-space-2);
	margin: 0;
	font-family: var(--tc-font-display);
	font-size: var(--tc-fs-h4);
	font-weight: var(--tc-w-semibold);
	color: var(--tc-violet-signal);
}

/* ---- Destructive action ---- */

.contentus-compose-delete {
	display: inline-flex;
	align-items: center;
	gap: var(--tc-space-2);
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border: 1px solid var(--tc-error);
	border-radius: var(--tc-radius-pill);
	background: transparent;
	color: var(--tc-error);
	font: inherit;
	cursor: pointer;
}

.contentus-compose-delete:hover {
	background: var(--tc-error-container);
}

.contentus-compose-delete:disabled {
	border-color: var(--tc-outline);
	color: var(--tc-fg-dim);
	cursor: not-allowed;
}

/* ---- Media, poll, emoji fields ---- */

.contentus-compose-media {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
}

.contentus-compose-media__error {
	margin: 0;
	color: var(--tc-error);
	font-size: var(--tc-fs-body-sm);
}

.contentus-compose-media__progress {
	margin: 0;
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-body-sm);
	font-variant-numeric: tabular-nums;
}

.contentus-compose-poll,
.contentus-compose-emoji {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
	align-items: flex-start;
}

.contentus-compose-poll__toggle,
.contentus-compose-emoji__toggle {
	display: inline-flex;
	align-items: center;
	gap: var(--tc-space-2);
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-pill);
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	font: inherit;
	cursor: pointer;
}

.contentus-compose-poll__toggle:hover,
.contentus-compose-emoji__toggle:hover {
	border-color: var(--tc-accent);
}

.contentus-compose-poll__toggle:disabled,
.contentus-compose-emoji__toggle:disabled {
	color: var(--tc-fg-dim);
	cursor: not-allowed;
}

.contentus-compose-poll__summary {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--tc-space-4);
	width: 100%;
	padding: var(--tc-space-4);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
	background: var(--tc-surface-1);
}

.contentus-compose-poll__title {
	margin: 0 0 var(--tc-space-2) 0;
	font-weight: var(--tc-w-semibold);
}

.contentus-compose-poll__options {
	margin: 0 0 var(--tc-space-2) 0;
	padding-left: var(--tc-space-5);
	color: var(--tc-fg-muted);
	font-size: var(--tc-fs-body-sm);
}

.contentus-compose-poll__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	min-height: 44px;
	min-width: 44px;
	border: 1px solid transparent;
	border-radius: var(--tc-radius-md);
	background: transparent;
	color: var(--tc-fg-muted);
	cursor: pointer;
}

.contentus-compose-poll__remove:hover {
	background: var(--tc-surface-2);
	color: var(--tc-fg);
}

.contentus-compose-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--tc-space-4);
}

/* Desktop: the composer is a Panel. Above 960px the close affordance is
   redundant — the sidebar nav is on screen and nothing is covered. */
.contentus-compose-close {
	display: none;
}

/* =============================================================
   The mobile composer sheet (product design §5, M3.5)
   -------------------------------------------------------------
   Below 960px the composer is the whole screen: it is the highest-frequency
   mobile write path, and a panel floating in a scrolling page wastes the
   room the editor needs.

   The swap is CSS on `[data-page='compose']`, not a JavaScript viewport
   measurement, so the SSR document is already correct on a cold deep link —
   which is the only kind lesser can serve, having no SPA fallback
   under `/l/*`.

   `100svh`, not `100vh`. The large viewport is the pre-scroll one, so
   `100vh` puts the sticky action bar behind the browser's own chrome
   exactly when the keyboard is up and the submit button is what the thumb
   is reaching for.
   ============================================================= */

@media (max-width: 960px) {
	[data-page='compose'] .contentus-main {
		display: flex;
		flex-direction: column;
		/* The sheet owns the viewport: no tab-bar reserve, because the tab bar
		   is hidden below and the composer's own close affordance replaces it. */
		min-height: 100svh;
		padding: var(--tc-space-6) 0 0;
	}

	/* The composer covers the tab bar rather than sitting above it. A
	   full-screen sheet with a persistent nav underneath is not full screen,
	   and the two bottom bars would stack into the safe area. */
	[data-page='compose'] .contentus-tabbar,
	[data-page='compose'] .contentus-fab {
		display: none;
	}

	[data-page='compose'] .contentus-compose {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		min-height: 0;
		max-width: none;
	}

	/* Panel flattens: no border, no radius, no elevation. It is not a card on
	   a page any more, it is the page. */
	[data-page='compose'] .contentus-compose-panel {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		min-height: 0;
		border: none;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		padding: 0;
	}

	[data-page='compose'] .contentus-compose-panel .gr-shell-panel__body {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		min-height: 0;
		padding: 0;
	}

	[data-page='compose'] .compose-root {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		min-height: 0;
	}

	/* The editor takes the room nothing else claims — a large textarea is the
	   single most useful thing on this screen. */
	[data-page='compose'] .compose-editor {
		flex: 1 1 auto;
		min-height: 9rem;
	}

	/* Sticky submit, above the keyboard-safe area. Media thumbnails sit in the
	   flow directly under the editor and therefore ABOVE this bar, which is
	   the whole point of their position: attachments stay visible while the
	   keyboard is up rather than being pushed under it. */
	[data-page='compose'] .contentus-compose-actions {
		position: sticky;
		bottom: 0;
		z-index: 2;
		margin-top: auto;
		padding: var(--tc-space-3) 0;
		padding-bottom: calc(var(--tc-space-3) + var(--contentus-safe-bottom));
		border-top: 1px solid var(--tc-outline-variant);
		background: var(--tc-bg);
	}

	.contentus-compose-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: none;
		/* 44px minimum touch target (product design §4). */
		min-height: 44px;
		min-width: 44px;
		border: 1px solid var(--tc-outline);
		border-radius: var(--tc-radius-pill);
		color: var(--tc-fg-muted);
		text-decoration: none;
	}
}

@media (max-width: 720px) {
	.contentus-compose-controls {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--tc-space-3);
	}
}

@media (max-width: 640px) {
	/* The lede is the first thing to go: on a 640px screen the heading already
	   says what the surface is, and the editor wants the rows. */
	[data-page='compose'] .contentus-compose-header .contentus-lede {
		display: none;
	}
}

@media (max-width: 480px) {
	[data-page='compose'] .contentus-main {
		padding-top: var(--tc-space-4);
	}

	[data-page='compose'] .contentus-compose-header {
		margin-bottom: var(--tc-space-6);
	}
}

/* ===== contentus timelines theme — appearance for upstream class contract ===== */
/* =============================================================
   Timelines theme — interim consumption layer
   -------------------------------------------------------------
   WHY THIS FILE EXISTS, and when it should stop existing.

   Exactly the `compose.css` situation, one milestone later and with the
   same upstream cause. `greater add timeline social-status-card
   social-timeline profile` vendors the components and NO stylesheet: the
   registry records for those entries list `component`, `types` and `utils`
   files and no `styles` entry, while every `.timeline-*`, `.status-card`,
   `.virtual-*` and `.gr-action-bar__*` class they emit is defined in
   `packages/faces/social/src/theme.css`, reachable only by installing the
   whole social face.

   `--css-only` LOOKS LIKE THE NARROW FIX AND IS NOT. `greater add
   faces/social --css-only --dry-run` at the pinned CLI still resolves the
   face's registry dependencies and reports nine component files across
   three target directories, including the `admin` shared module and three
   patterns. The flag limits nothing that its name implies. Recorded with
   the other CLI findings rather than worked around silently.

   So this layer is contentus's own appearance for upstream's class
   contract. It is APPEARANCE ONLY: no rule here changes what a component
   does, what it emits, or how it behaves. Anything that would, belongs
   upstream.

   SUNSET: delete this file and its layer in `scripts/build-stylesheet.mjs`
   the day the `greater` CLI emits per-module CSS, or the day `--css-only`
   means what it says. The same day retires `compose.css`.

   Values resolve to `--tc-*` and `--gr-*` tokens only; like `bridge.css`,
   this file contains no brand literals of its own.
   ============================================================= */

/* =============================================================
   The segmented tab control (contentus-owned)
   -------------------------------------------------------------
   Sticky at the top of the surface, and horizontally scrollable on
   mobile rather than wrapping or shrinking — the 44px floor is not
   negotiable against tab count (product design §4).
   ============================================================= */

.contentus-timeline-tabs {
	position: sticky;
	top: 0;
	z-index: 3;
	background: var(--tc-bg);
	border-bottom: 1px solid var(--tc-outline);
	margin-bottom: var(--tc-space-4);
}

.contentus-timeline-tabs__list {
	display: flex;
	gap: var(--tc-space-1);
	margin: 0;
	padding: 0;
	list-style: none;
	/* Horizontal scroll is the mobile collapse. `-webkit-overflow-scrolling`
	   is deliberately absent: it is a no-op on current iOS and its presence
	   suggests a behaviour this does not rely on. */
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
}

.contentus-timeline-tabs__list::-webkit-scrollbar {
	display: none;
}

.contentus-timeline-tabs__item {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.contentus-timeline-tabs__tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	min-width: 44px;
	padding: 0 var(--tc-space-4);
	color: var(--tc-fg-muted);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
}

.contentus-timeline-tabs__tab:hover {
	color: var(--tc-fg);
}

.contentus-timeline-tabs__tab:focus-visible {
	outline: 2px solid var(--tc-core-blue);
	outline-offset: -2px;
}

.contentus-timeline-tabs__tab[aria-current='page'] {
	color: var(--tc-fg);
	border-bottom-color: var(--tc-core-blue);
}

/* =============================================================
   Surface chrome (contentus-owned)
   ============================================================= */

.contentus-timelines,
.contentus-profile {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.contentus-timelines__eyebrow {
	margin: 0;
	color: var(--tc-fg-dim);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.contentus-timelines__title {
	margin: 0 0 var(--tc-space-3);
	color: var(--tc-fg);
}

.contentus-timelines__description {
	margin: 0 0 var(--tc-space-4);
	color: var(--tc-fg-muted);
}

.contentus-timelines__signin {
	min-height: 44px;
	padding: 0 var(--tc-space-5);
	border: 1px solid var(--tc-core-blue);
	border-radius: var(--tc-radius-md, 8px);
	background: var(--tc-core-blue);
	color: var(--tc-core-blue-inverse, var(--tc-bg));
	font-weight: 600;
	cursor: pointer;
}

.contentus-timelines__error {
	margin-top: var(--tc-space-3);
	color: var(--tc-error, var(--tc-fg));
}

/* =============================================================
   Feed chrome (contentus-owned)
   ============================================================= */

.contentus-feed {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.contentus-feed__live {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-3);
	min-height: 44px;
	padding: 0 var(--tc-space-2);
}

.contentus-feed__live-note {
	margin: 0;
	color: var(--tc-fg-dim);
	font-size: 0.875rem;
}

/* The new-items affordance. Prominent because it is the ONLY thing that
   moves the reader's scroll position — nothing does that on its own. */
.contentus-feed__new {
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border: 1px solid var(--tc-core-blue);
	border-radius: 999px;
	background: var(--tc-core-blue-container);
	color: var(--tc-fg);
	font-weight: 600;
	cursor: pointer;
}

.contentus-feed__retry,
.contentus-feed__refresh button,
.contentus-feed__more button {
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md, 8px);
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	cursor: pointer;
}

.contentus-feed__refresh {
	display: flex;
	justify-content: flex-end;
	padding: 0 var(--tc-space-2) var(--tc-space-2);
}

.contentus-feed__more {
	display: flex;
	justify-content: center;
	padding: var(--tc-space-4) 0;
}

.contentus-feed__refresh button:disabled,
.contentus-feed__more button:disabled {
	opacity: 0.6;
	cursor: default;
}

.contentus-feed__skipped,
.contentus-feed__partial,
.contentus-feed__limit,
.contentus-feed__tail {
	margin: 0 0 var(--tc-space-3);
	padding: var(--tc-space-2) var(--tc-space-3);
	border-left: 3px solid var(--tc-outline-variant);
	color: var(--tc-fg-muted);
	font-size: 0.875rem;
}

/* The bound notice carries an action, so it needs room for a control that
   still meets the touch floor. */
.contentus-feed__limit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tc-space-3);
}

/* =============================================================
   Upstream class contract — vendored timeline + status card
   -------------------------------------------------------------
   Everything below styles classes the VENDORED components emit. The
   names are upstream's; only the values are ours.
   ============================================================= */

.timeline-virtualized,
.timeline-scroll {
	min-width: 0;
}

/* The scroller is bounded so virtualization has a viewport to measure
   against. `100svh` rather than `100vh` per greater's shell precedent:
   on mobile the dynamic toolbar makes `vh` taller than the visible area,
   which pushes the last card under the browser chrome. */
.timeline-scroll {
	max-height: calc(100svh - var(--tc-space-20));
	overflow-y: auto;
	overscroll-behavior-y: contain;
}

.virtual-list {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.virtual-row {
	min-width: 0;
	border-bottom: 1px solid var(--tc-outline-variant);
}

.virtual-spacer {
	display: block;
	flex: 0 0 auto;
}

.status-card {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
	padding: var(--tc-space-4) var(--tc-space-3);
	min-width: 0;
	background: var(--tc-surface-1);
	color: var(--tc-fg);
}

.status-card .status-header,
.status-card .account-info {
	display: flex;
	align-items: center;
	gap: var(--tc-space-2);
	min-width: 0;
}

.status-card .avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
}

.status-card .display-name {
	color: var(--tc-fg);
	font-weight: 600;
}

.status-card .account-handle {
	color: var(--tc-fg-dim);
	font-size: 0.875rem;
}

.status-card .bot-badge,
.status-card .media-badge {
	padding: 0 var(--tc-space-2);
	border: 1px solid var(--tc-outline);
	border-radius: 999px;
	color: var(--tc-fg-dim);
	font-size: 0.75rem;
}

.status-card .status-content {
	color: var(--tc-fg);
	overflow-wrap: anywhere;
}

.status-card .status-content a,
.status-card .mention,
.status-card .hashtag {
	color: var(--tc-core-blue);
}

.status-card .spoiler-warning {
	display: flex;
	align-items: center;
	gap: var(--tc-space-2);
	flex-wrap: wrap;
}

/* The content warning's reveal control is a real target, because hiding
   sensitive content behind a control too small to hit reliably is the
   same failure as not hiding it. */
.status-card .spoiler-toggle,
.status-card .media-reveal {
	min-height: 44px;
	min-width: 44px;
	padding: 0 var(--tc-space-3);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md, 8px);
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	cursor: pointer;
}

.status-card .media-attachments {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: var(--tc-space-2);
	min-width: 0;
}

.status-card .media-item {
	position: relative;
	min-width: 0;
	border-radius: var(--tc-radius-md, 8px);
	overflow: hidden;
}

.status-card .media-image,
.status-card .media-video {
	display: block;
	width: 100%;
	height: auto;
}

.status-card .media-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tc-midnight-depth);
	color: var(--tc-fg);
}

.status-card .reblog-indicator,
.status-card .reply-indicator {
	display: flex;
	align-items: center;
	gap: var(--tc-space-2);
	color: var(--tc-fg-dim);
	font-size: 0.875rem;
}

/* The vendored ActionBar's buttons default to a 2rem box — 32px, below the
   floor. Same correction M2d applied to the review verdict controls, and
   the same reasoning: the floor is the design's, not the component's. */
.gr-action-bar__button {
	min-height: 44px;
	min-width: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--tc-space-1);
	border: 0;
	background: none;
	color: var(--tc-fg-muted);
	cursor: pointer;
}

.gr-action-bar__button:disabled {
	opacity: 0.45;
	cursor: default;
}

.gr-action-bar__button:hover:not(:disabled) {
	color: var(--tc-fg);
}

.gr-action-bar__button--active {
	color: var(--tc-core-blue);
}

.gr-action-bar__count {
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
}

/* Vendored Timeline state components. */
.timeline-empty,
.timeline-error {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--tc-space-2);
	padding: var(--tc-space-10) var(--tc-space-4);
	text-align: center;
	color: var(--tc-fg-muted);
}

.timeline-empty__title,
.timeline-error__title {
	margin: 0;
	color: var(--tc-fg);
}

.timeline-error__retry {
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md, 8px);
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	cursor: pointer;
}

.loading-indicator {
	display: flex;
	justify-content: center;
	padding: var(--tc-space-4);
}

.end-of-feed {
	padding: var(--tc-space-6) var(--tc-space-4);
	text-align: center;
	color: var(--tc-fg-dim);
}

/* =============================================================
   Profile card (contentus-owned)
   ============================================================= */

.contentus-profile__card {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-3);
	padding-bottom: var(--tc-space-4);
	border-bottom: 1px solid var(--tc-outline);
	margin-bottom: var(--tc-space-4);
}

.contentus-profile__banner {
	width: 100%;
	max-height: 180px;
	object-fit: cover;
	border-radius: var(--tc-radius-md, 8px);
}

.contentus-profile__identity {
	display: flex;
	align-items: center;
	gap: var(--tc-space-3);
	min-width: 0;
}

.contentus-profile__avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
}

.contentus-profile__names {
	min-width: 0;
}

.contentus-profile__name {
	margin: 0;
	color: var(--tc-fg);
	overflow-wrap: anywhere;
}

.contentus-profile__acct {
	margin: 0;
	color: var(--tc-fg-dim);
	overflow-wrap: anywhere;
}

.contentus-profile__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tc-space-2);
	margin: var(--tc-space-2) 0 0;
}

.contentus-profile__badge {
	padding: 0 var(--tc-space-2);
	border: 1px solid var(--tc-outline);
	border-radius: 999px;
	color: var(--tc-fg-dim);
	font-size: 0.75rem;
}

.contentus-profile__badge[data-kind='agent'] {
	border-color: var(--tc-phi-gold, var(--tc-outline));
	color: var(--tc-fg);
}

.contentus-profile__summary {
	margin: 0;
	color: var(--tc-fg-muted);
	overflow-wrap: anywhere;
}

.contentus-profile__stats {
	display: flex;
	gap: var(--tc-space-5);
	margin: 0;
}

.contentus-profile__stats div {
	display: flex;
	flex-direction: column;
}

.contentus-profile__stats dt {
	color: var(--tc-fg-dim);
	font-size: 0.8125rem;
}

.contentus-profile__stats dd {
	margin: 0;
	color: var(--tc-fg);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.contentus-profile__handle {
	color: var(--tc-fg-dim);
}

/* The card's own half-failed marker. Same rule as the feed's disclosures — a
   quiet aside rather than an alarm, because what it reports is incompleteness,
   not breakage. */
.contentus-profile__partial {
	margin: 0;
	padding: var(--tc-space-2) var(--tc-space-3);
	border-left: 3px solid var(--tc-outline-variant);
	color: var(--tc-fg-muted);
	font-size: 0.875rem;
}

/* =============================================================
   Mobile
   ============================================================= */

@media (max-width: 960px) {
	.contentus-timeline-tabs {
		/* Full-bleed under the surface padding, so the scrollable strip
		   reaches both edges and the first and last tabs are thumb-reachable
		   rather than inset. */
		margin-inline: calc(var(--tc-space-4) * -1);
		padding-inline: var(--tc-space-4);
	}

	.timeline-scroll {
		max-height: calc(
			100svh - var(--tc-space-16) - var(--contentus-tabbar-height) - var(--contentus-safe-bottom)
		);
	}

	.contentus-profile__avatar {
		width: 56px;
		height: 56px;
	}

	.contentus-profile__stats {
		gap: var(--tc-space-4);
	}
}

/* The disclosure of the two pinned upstream ContentRenderer gaps — no body
   during SSR, and escaped markup after hydration. Styled as a notice rather
   than an error: the surface works, one shared component renders one part of
   it wrongly, and the reader is owed the explanation rather than an alarm.
   Both classes share it; the no-script one adds the case where the text
   never arrives at all. */
.contentus-feed__gap,
.contentus-feed__noscript {
	margin: 0 0 var(--tc-space-3);
	padding: var(--tc-space-3);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md, 8px);
	background: var(--tc-surface-2);
	color: var(--tc-fg-muted);
	font-size: 0.875rem;
}

/* ===== contentus messaging theme — face 5 chrome + upstream class contract ===== */
/* =============================================================
   Messaging theme — face 5 appearance + interim consumption layer
   -------------------------------------------------------------
   TWO JOBS IN ONE FILE, and the split is worth naming.

   The `.contentus-*` blocks are contentus's own chrome: the two-pane
   layout, the folder tabs, the conversation cards with their request
   actions, and the disclosures. Those exist because product design §5
   asks for a surface the vendored suite does not compose on its own.

   The `.messages-*`, `.message*` and `.new-conversation*` blocks are
   exactly the `compose.css` / `timelines.css` situation a third time:
   `greater add messaging` vendors the components and NO stylesheet — the
   registry record lists `component`, `types` and `utils` entries and no
   `styles` entry — while every class those components emit is defined in
   `packages/faces/social/src/theme.css`, reachable only by installing the
   whole social face. So this is contentus's appearance for upstream's
   class contract.

   It is APPEARANCE ONLY. No rule here changes what a vendored component
   does, what it emits, or how it behaves. Anything that would, belongs
   upstream.

   SUNSET: delete the vendored-class half and its layer in
   `scripts/build-stylesheet.mjs` the day the `greater` CLI emits
   per-module CSS. The same day retires `compose.css` and `timelines.css`.

   Values resolve to `--tc-*` and `--gr-*` tokens only; like `bridge.css`,
   this file contains no brand literals of its own. `--tc-accent` is
   violet here because the shell sets `data-surface="mcp"` (§2).
   ============================================================= */

/* =============================================================
   Page frame
   ============================================================= */

.contentus-messages-page {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-4);
	/* The surface owns the viewport below the header so the thread can
	   scroll inside it rather than scrolling the document — a composer
	   pinned to a scrolling document walks off the bottom of the page. */
	min-height: 0;
}

.contentus-messages-page__eyebrow {
	margin: 0;
	color: var(--tc-accent);
	font-size: var(--tc-font-size-sm);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.contentus-messages-page__title {
	margin: var(--tc-space-1) 0 0;
	color: var(--tc-fg);
}

/* =============================================================
   The two panes
   -------------------------------------------------------------
   Above 960px the list and the thread sit side by side. Below it the
   component renders one or the other — the thread is its own ROUTE, not
   a hidden sibling — so the grid collapses to a single column and there
   is no off-screen pane holding a socket or a scroll position.
   ============================================================= */

.contentus-messages {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tc-space-4);
	min-height: 0;
}

@media (min-width: 961px) {
	.contentus-messages[data-two-pane='true'] {
		grid-template-columns: minmax(18rem, 22rem) 1fr;
		align-items: start;
	}
}

.contentus-messages__list,
.contentus-messages__thread {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-3);
	min-width: 0;
	min-height: 0;
}

.contentus-messages__list-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-3);
}

.contentus-messages__list-title {
	margin: 0;
	font-size: var(--tc-font-size-lg);
	color: var(--tc-fg);
}

/* =============================================================
   Folder tabs (contentus-owned)
   -------------------------------------------------------------
   Links, so a folder is addressable and survives a cold load. The 44px
   floor is not negotiable against tab count (§4).
   ============================================================= */

.contentus-messages__tabs {
	display: flex;
	gap: var(--tc-space-1);
	border-bottom: 1px solid var(--tc-outline-variant);
}

.contentus-messages__tab {
	display: inline-flex;
	align-items: center;
	gap: var(--tc-space-2);
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border-bottom: 2px solid transparent;
	color: var(--tc-fg-dim);
	font-weight: 600;
	text-decoration: none;
}

.contentus-messages__tab:hover {
	color: var(--tc-fg);
}

.contentus-messages__tab--active {
	color: var(--tc-fg);
	border-bottom-color: var(--tc-accent);
}

.contentus-messages__tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5rem;
	height: 1.5rem;
	padding: 0 var(--tc-space-1);
	border-radius: 999px;
	background: var(--tc-accent);
	color: var(--tc-violet-inverse, var(--tc-midnight-depth));
	font-size: var(--tc-font-size-xs);
	font-weight: 700;
}

/* =============================================================
   Conversation cards (contentus-owned)
   -------------------------------------------------------------
   The card is a LINK carrying the conversation's own address, so it
   works before hydration, opens in a new tab, and is the navigation
   that pushes the thread as its own route below the breakpoint.
   ============================================================= */

.contentus-conversations {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
}

.contentus-conversations__item {
	border: 1px solid transparent;
	border-radius: var(--tc-radius-md, 0.5rem);
	background: var(--tc-surface-1);
}

.contentus-conversations__item--selected {
	border-color: var(--tc-accent);
	background: var(--tc-surface-2);
}

.contentus-conversations__link {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: var(--tc-space-3);
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	padding: var(--tc-space-3);
	color: inherit;
	text-decoration: none;
}

.contentus-conversations__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	overflow: hidden;
	background: var(--tc-surface-2);
	flex: none;
}

.contentus-conversations__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.contentus-conversations__initial {
	color: var(--tc-fg-dim);
	font-weight: 700;
}

.contentus-conversations__body {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
	min-width: 0;
}

.contentus-conversations__name {
	color: var(--tc-fg);
	font-weight: 600;
}

.contentus-conversations__item--unread .contentus-conversations__name {
	font-weight: 700;
}

.contentus-conversations__preview {
	color: var(--tc-fg-muted);
	font-size: var(--tc-font-size-sm);
	/* One line. A preview that wraps turns the list into a reading surface
	   and pushes the next conversation off the first screen. */
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.contentus-conversations__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--tc-space-1);
	color: var(--tc-fg-muted);
	font-size: var(--tc-font-size-xs);
	flex: none;
}

/* A DOT, not a numeral: lesser's contract carries one `unread` boolean per
   conversation and no message count, so a number here would be invented. */
.contentus-conversations__dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 999px;
	background: var(--tc-accent);
}

/* =============================================================
   Request actions on the card (§5, sub-issue #33)
   ============================================================= */

.contentus-conversations__request {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
	padding: 0 var(--tc-space-3) var(--tc-space-3);
	border-top: 1px solid var(--tc-outline-variant);
	margin-top: var(--tc-space-2);
	padding-top: var(--tc-space-3);
}

.contentus-conversations__request-text {
	margin: 0;
	color: var(--tc-fg-dim);
	font-size: var(--tc-font-size-sm);
}

.contentus-conversations__actions {
	display: flex;
	gap: var(--tc-space-2);
	flex-wrap: wrap;
}

.contentus-conversations__accept,
.contentus-conversations__decline {
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border-radius: var(--tc-radius-sm, 0.375rem);
	font-weight: 600;
	cursor: pointer;
}

.contentus-conversations__accept {
	border: 1px solid var(--tc-accent);
	background: var(--tc-accent);
	color: var(--tc-violet-inverse, var(--tc-midnight-depth));
}

.contentus-conversations__decline {
	border: 1px solid var(--tc-outline);
	background: transparent;
	color: var(--tc-fg);
}

.contentus-conversations__accept:disabled,
.contentus-conversations__decline:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* =============================================================
   Thread chrome (contentus-owned)
   ============================================================= */

.contentus-messages__back,
.contentus-messages__back-link {
	display: inline-flex;
	align-items: center;
	gap: var(--tc-space-2);
	min-height: 44px;
	color: var(--tc-accent);
	font-weight: 600;
	text-decoration: none;
}

.contentus-messages__older {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
	align-items: center;
}

.contentus-messages__older button {
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-sm, 0.375rem);
	background: var(--tc-surface-1);
	color: var(--tc-fg);
	cursor: pointer;
}

.contentus-messages__signin,
.contentus-messages__retry {
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border: 1px solid var(--tc-accent);
	border-radius: var(--tc-radius-sm, 0.375rem);
	background: var(--tc-accent);
	color: var(--tc-violet-inverse, var(--tc-midnight-depth));
	font-weight: 600;
	cursor: pointer;
}

/* =============================================================
   Disclosures and honest states
   -------------------------------------------------------------
   Standing notes rather than alerts: a known limit or a reported
   transport state is not an incident.

   `__gap` was here and is gone with the disclosure it styled —
   greater-v0.13.0 fixed both rendering sinks, so the class had no
   element left to paint.
   ============================================================= */

.contentus-messages__realtime,
.contentus-messages__partial,
.contentus-messages__notice {
	margin: 0;
	padding: var(--tc-space-3);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-sm, 0.375rem);
	background: var(--tc-surface-1);
	color: var(--tc-fg-dim);
	font-size: var(--tc-font-size-sm);
}

.contentus-messages__notice {
	border-color: var(--tc-accent);
	color: var(--tc-fg);
}

.contentus-messages__error {
	margin: var(--tc-space-2) 0 0;
	color: var(--tc-error, var(--tc-fg));
	font-size: var(--tc-font-size-sm);
}

.contentus-messages__loading,
.contentus-messages__empty {
	margin: 0;
	padding: var(--tc-space-4);
	color: var(--tc-fg-muted);
}

/* =============================================================
   Nav unread badge (§5 — "unread counts feed the nav badge")
   -------------------------------------------------------------
   Counts CONVERSATIONS with unread activity. The accessible label on
   the element says so; the glyph is a numeral because a nav badge that
   is only a dot cannot distinguish one from twenty.
   ============================================================= */

.contentus-nav__unread {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
	height: 1.25rem;
	margin-left: auto;
	padding: 0 var(--tc-space-1);
	border-radius: 999px;
	background: var(--tc-violet-signal);
	color: var(--tc-violet-inverse, var(--tc-midnight-depth));
	font-size: var(--tc-font-size-xs);
	font-weight: 700;
}

.contentus-tabbar__icon {
	position: relative;
	display: inline-flex;
}

/* Anchored to the ICON, so the badge cannot widen the tab and push a
   neighbouring target under the 44px floor (§4). */
.contentus-tabbar__unread {
	position: absolute;
	top: -0.25rem;
	inset-inline-start: 60%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1rem;
	height: 1rem;
	padding: 0 0.2rem;
	border-radius: 999px;
	background: var(--tc-violet-signal);
	color: var(--tc-violet-inverse, var(--tc-midnight-depth));
	font-size: 0.625rem;
	font-weight: 700;
	line-height: 1;
}

/* =============================================================
   Vendored `shared/messaging` classes — appearance only
   ============================================================= */

.messages-root {
	display: contents;
}

.messages-thread {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-3);
	min-height: 0;
}

.messages-thread__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-3);
	padding-bottom: var(--tc-space-2);
	border-bottom: 1px solid var(--tc-outline-variant);
}

.messages-thread__title {
	margin: 0;
	font-size: var(--tc-font-size-lg);
	color: var(--tc-fg);
}

.messages-thread__menu-trigger,
.message__menu-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	border: none;
	background: transparent;
	color: var(--tc-fg-dim);
	cursor: pointer;
}

.messages-thread__list {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-3);
	/* The thread scrolls, not the document — that is what lets the composer
	   stay put above the keyboard instead of scrolling away with the page. */
	overflow-y: auto;
	min-height: 0;
	padding: var(--tc-space-2) 0;
}

.messages-thread__loading,
.messages-thread__empty,
.messages-thread__no-selection {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--tc-space-3);
	padding: var(--tc-space-10) var(--tc-space-4);
	color: var(--tc-fg-muted);
	text-align: center;
}

.messages-thread__no-selection svg {
	width: 3rem;
	height: 3rem;
	opacity: 0.4;
}

.messages-thread__spinner,
.messages-conversations__spinner,
.new-conversation__spinner {
	width: 1.5rem;
	height: 1.5rem;
	border: 2px solid var(--tc-outline-variant);
	border-top-color: var(--tc-accent);
	border-radius: 999px;
	animation: contentus-messages-spin 0.8s linear infinite;
}

@keyframes contentus-messages-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.messages-thread__spinner,
	.messages-conversations__spinner,
	.new-conversation__spinner {
		animation: none;
	}
}

/* The request banner inside an open thread. The card carries the primary
   accept/decline (§5); this is the same action where a reader has already
   opened the conversation. */
.messages-thread__request-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-3);
	padding: var(--tc-space-3);
	border: 1px solid var(--tc-accent);
	border-radius: var(--tc-radius-sm, 0.375rem);
	background: var(--tc-surface-1);
	color: var(--tc-fg);
}

.messages-thread__request-actions {
	display: flex;
	gap: var(--tc-space-2);
}

.messages-thread__request-button {
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border-radius: var(--tc-radius-sm, 0.375rem);
	font-weight: 600;
	cursor: pointer;
}

.messages-thread__request-button--primary {
	border: 1px solid var(--tc-accent);
	background: var(--tc-accent);
	color: var(--tc-violet-inverse, var(--tc-midnight-depth));
}

.messages-thread__request-button--secondary {
	border: 1px solid var(--tc-outline);
	background: transparent;
	color: var(--tc-fg);
}

.messages-thread__request-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ---------- One message ---------- */

.message {
	display: flex;
	gap: var(--tc-space-2);
	align-items: flex-end;
	max-width: 100%;
}

.message--own {
	flex-direction: row-reverse;
}

.message__avatar {
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	overflow: hidden;
	background: var(--tc-surface-2);
	flex: none;
}

.message__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.message__avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--tc-fg-dim);
	font-size: var(--tc-font-size-sm);
	font-weight: 700;
}

.message__bubble {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
	max-width: min(42rem, 78%);
	padding: var(--tc-space-3);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md, 0.5rem);
	background: var(--tc-surface-1);
}

.message--own .message__bubble {
	border-color: var(--tc-accent);
	background: var(--tc-violet-container, var(--tc-surface-2));
}

.message__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-2);
}

.message__sender {
	color: var(--tc-fg-dim);
	font-size: var(--tc-font-size-sm);
	font-weight: 600;
}

.message__content {
	color: var(--tc-fg);
	/* `white-space: pre-wrap` because the vendored component renders the body
	   as TEXT. Newlines lesser sent would otherwise collapse, which would lose
	   information on top of the escaping the surface already discloses. */
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.message__content-warning {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-2);
	padding: var(--tc-space-2);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-sm, 0.375rem);
	background: var(--tc-surface-2);
}

.message__content-warning-label {
	color: var(--tc-fg-dim);
	font-size: var(--tc-font-size-sm);
	font-weight: 600;
}

.message__content-warning-toggle {
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-sm, 0.375rem);
	background: transparent;
	color: var(--tc-fg);
	cursor: pointer;
}

.message__time {
	color: var(--tc-fg-muted);
	font-size: var(--tc-font-size-xs);
}

/* ---------- The composer ---------- */

.messages-composer {
	display: flex;
	gap: var(--tc-space-2);
	align-items: flex-end;
	padding: var(--tc-space-3) 0;
	background: var(--tc-bg);
}

.messages-composer__input {
	flex: 1;
	min-height: 44px;
	padding: var(--tc-space-3);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-sm, 0.375rem);
	background: var(--tc-surface-1);
	color: var(--tc-fg);
	font: inherit;
	resize: vertical;
}

.messages-composer__send {
	display: inline-flex;
	align-items: center;
	gap: var(--tc-space-2);
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border: 1px solid var(--tc-accent);
	border-radius: var(--tc-radius-sm, 0.375rem);
	background: var(--tc-accent);
	color: var(--tc-violet-inverse, var(--tc-midnight-depth));
	font-weight: 600;
	cursor: pointer;
}

.messages-composer__send svg {
	width: 1rem;
	height: 1rem;
}

.messages-composer__send:disabled,
.messages-composer__input:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ---------- New conversation ---------- */

.new-conversation__trigger {
	display: inline-flex;
	align-items: center;
	gap: var(--tc-space-2);
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-sm, 0.375rem);
	background: var(--tc-surface-1);
	color: var(--tc-fg);
	font-weight: 600;
	cursor: pointer;
}

.new-conversation__trigger svg {
	width: 1rem;
	height: 1rem;
}

.new-conversation__backdrop {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--tc-space-4);
	background: color-mix(in srgb, var(--tc-midnight-depth) 72%, transparent);
}

.new-conversation__modal {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-3);
	width: min(32rem, 100%);
	max-height: min(40rem, 90svh);
	padding: var(--tc-space-4);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md, 0.5rem);
	background: var(--tc-surface-1);
	overflow: hidden;
}

.new-conversation__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-3);
}

.new-conversation__title {
	margin: 0;
	font-size: var(--tc-font-size-lg);
	color: var(--tc-fg);
}

.new-conversation__close {
	min-width: 44px;
	min-height: 44px;
	border: none;
	background: transparent;
	color: var(--tc-fg-dim);
	font-size: var(--tc-font-size-lg);
	cursor: pointer;
}

.new-conversation__body {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-3);
	overflow-y: auto;
	min-height: 0;
}

.new-conversation__error {
	padding: var(--tc-space-2);
	border: 1px solid var(--tc-error, var(--tc-outline));
	border-radius: var(--tc-radius-sm, 0.375rem);
	color: var(--tc-error, var(--tc-fg));
	font-size: var(--tc-font-size-sm);
}

.new-conversation__selected,
.new-conversation__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tc-space-2);
}

.new-conversation__label {
	color: var(--tc-fg-muted);
	font-size: var(--tc-font-size-sm);
}

.new-conversation__chip {
	display: inline-flex;
	align-items: center;
	gap: var(--tc-space-1);
	padding: var(--tc-space-1) var(--tc-space-2);
	border: 1px solid var(--tc-outline);
	border-radius: 999px;
	background: var(--tc-surface-2);
	color: var(--tc-fg);
	font-size: var(--tc-font-size-sm);
}

.new-conversation__chip-avatar,
.new-conversation__result-avatar,
.new-conversation__result-avatar-placeholder {
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 999px;
	object-fit: cover;
	background: var(--tc-surface-2);
}

.new-conversation__result-avatar,
.new-conversation__result-avatar-placeholder {
	width: 2rem;
	height: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--tc-fg-dim);
	font-weight: 700;
	flex: none;
}

.new-conversation__chip-remove {
	min-width: 1.5rem;
	min-height: 1.5rem;
	border: none;
	background: transparent;
	color: var(--tc-fg-dim);
	cursor: pointer;
}

.new-conversation__search {
	display: flex;
	align-items: center;
	gap: var(--tc-space-2);
	padding: 0 var(--tc-space-2);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-sm, 0.375rem);
	background: var(--tc-surface-2);
}

.new-conversation__search-icon {
	width: 1rem;
	height: 1rem;
	color: var(--tc-fg-muted);
	flex: none;
}

.new-conversation__input {
	flex: 1;
	min-height: 44px;
	border: none;
	background: transparent;
	color: var(--tc-fg);
	font: inherit;
}

.new-conversation__input:focus {
	outline: none;
}

.new-conversation__results {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
	overflow-y: auto;
}

.new-conversation__result {
	display: flex;
	align-items: center;
	gap: var(--tc-space-3);
	min-height: 44px;
	padding: var(--tc-space-2);
	border: 1px solid transparent;
	border-radius: var(--tc-radius-sm, 0.375rem);
	background: transparent;
	color: var(--tc-fg);
	text-align: start;
	cursor: pointer;
}

.new-conversation__result:hover:not(:disabled) {
	background: var(--tc-surface-2);
}

.new-conversation__result:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.new-conversation__result-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.new-conversation__result-name {
	font-weight: 600;
}

.new-conversation__result-username {
	color: var(--tc-fg-muted);
	font-size: var(--tc-font-size-sm);
}

.new-conversation__result-check {
	width: 1.25rem;
	height: 1.25rem;
	margin-inline-start: auto;
	color: var(--tc-accent);
}

.new-conversation__empty {
	padding: var(--tc-space-3);
	color: var(--tc-fg-muted);
	font-size: var(--tc-font-size-sm);
}

.new-conversation__footer {
	display: flex;
	justify-content: flex-end;
	gap: var(--tc-space-2);
}

.new-conversation__button {
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	border-radius: var(--tc-radius-sm, 0.375rem);
	font-weight: 600;
	cursor: pointer;
}

.new-conversation__button--primary {
	border: 1px solid var(--tc-accent);
	background: var(--tc-accent);
	color: var(--tc-violet-inverse, var(--tc-midnight-depth));
}

.new-conversation__button--secondary {
	border: 1px solid var(--tc-outline);
	background: transparent;
	color: var(--tc-fg);
}

.new-conversation__button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* The vendored unread badge. Contentus renders its own nav badge — this one
   sums per-conversation booleans under a label that says "unread messages",
   which is not what the number counts — but the class is styled so a future
   use is not unstyled. */
.unread-indicator {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 var(--tc-space-1);
	border-radius: 999px;
	background: var(--tc-accent);
	color: var(--tc-violet-inverse, var(--tc-midnight-depth));
	font-size: var(--tc-font-size-xs);
	font-weight: 700;
}

/* =============================================================
   Mobile: the two-pane collapse (§4, §5)
   -------------------------------------------------------------
   The list is full width and the thread is its own route, so there is
   no second pane to hide. What is left is the composer, which sticks to
   the bottom of the surface and must clear BOTH the tab bar and the
   home indicator — the same two offsets the shell already publishes,
   read here rather than re-measured so the two cannot disagree.
   ============================================================= */

@media (max-width: 960px) {
	.contentus-messages__thread {
		/* The thread owns the viewport below the page header so its list can
		   scroll under a composer that does not move. */
		min-height: 60svh;
	}

	.messages-composer {
		position: sticky;
		bottom: calc(var(--contentus-tabbar-height) + var(--contentus-safe-bottom));
		padding-bottom: var(--tc-space-3);
		border-top: 1px solid var(--tc-outline-variant);
		/* Opaque: the thread scrolls underneath it. */
		background: var(--tc-bg);
		z-index: 5;
	}

	.contentus-messages__list-head {
		flex-wrap: wrap;
	}

	.message__bubble {
		max-width: 88%;
	}
}

/* ===== contentus agents theme — face 6 roster and MCP detail ===== */
/*
 * Face 6 — the agent roster and MCP detail (product design §5) · mcp surface.
 *
 * CONTENTUS-OWNED, and unlike the compose/timelines/messaging layers this file
 * is not an interim stand-in for missing vendored CSS. Face 6's roster and MCP
 * panel are composed here from `shell` (`Panel`, `StatCard`, `PageFrame`) plus
 * contentus components, exactly as the roadmap prescribes for this milestone,
 * so their appearance is ours to state. When greater M6a lands vendored roster
 * and MCP components, the `.contentus-agent*` rules for whatever it replaces go
 * with the components — the swap seam is `$lib/agents/AgentRoster.svelte`.
 *
 * The violet Signal accent is the mcp surface's, applied through `--tc-*` brand
 * tokens rather than literals: this file carries no brand colour of its own.
 */

.contentus-agents__filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--tc-space-3);
	margin-bottom: var(--tc-space-5);
	padding: var(--tc-space-4);
	background: var(--tc-surface-1);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-lg);
}

.contentus-agents__filter {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
	flex: 1 1 12rem;
	min-width: 0;
}

.contentus-agents__filter-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--tc-fg-muted);
}

.contentus-agents__filter-input {
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	color: var(--tc-fg);
	background: var(--tc-bg);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	font: inherit;
}

.contentus-agents__filter-input:focus-visible {
	outline: 2px solid var(--tc-accent);
	outline-offset: 2px;
}

.contentus-agents__filter-actions {
	display: flex;
	align-items: center;
	gap: var(--tc-space-3);
	flex: 0 0 auto;
}

.contentus-agents__filter-submit {
	min-height: 44px;
	padding: 0 var(--tc-space-5);
	color: var(--tc-fg-inverse);
	background: var(--tc-accent);
	border: 1px solid transparent;
	border-radius: var(--tc-radius-md);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.contentus-agents__filter-clear {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--tc-fg-muted);
	text-decoration: none;
}

.contentus-agents__filter-clear:hover,
.contentus-agents__filter-clear:focus-visible {
	color: var(--tc-fg);
	text-decoration: underline;
}

.contentus-agents__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	gap: var(--tc-space-3);
	margin-bottom: var(--tc-space-5);
}

.contentus-agents__notice {
	margin: 0;
	color: var(--tc-fg-muted);
	line-height: 1.6;
}

.contentus-agents__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: var(--tc-space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.contentus-agents__grid-item {
	display: flex;
}

/* --- card ------------------------------------------------------------- */

.contentus-agent-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-3);
	flex: 1;
	padding: var(--tc-space-4);
	background: var(--tc-surface-1);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-lg);
}

.contentus-agent-card:focus-within {
	border-color: var(--tc-accent);
}

.contentus-agent-card__head {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
}

.contentus-agent-card__name {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.3;
}

.contentus-agent-card__link {
	color: var(--tc-fg);
	text-decoration: none;
}

/* The card-wide target: the heading link covers the whole card so a thumb gets
   the full block, while the link's accessible name stays the agent's name. */
.contentus-agent-card__link::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.contentus-agent-card__link:hover,
.contentus-agent-card__link:focus-visible {
	text-decoration: underline;
}

.contentus-agent-card__handle {
	margin: 0;
	font-family: var(--tc-font-mono);
	font-size: 0.8125rem;
	color: var(--tc-fg-muted);
}

.contentus-agent-card__badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tc-space-2);
}

.contentus-agent-card__bio {
	margin: 0;
	color: var(--tc-fg-muted);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.contentus-agent-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tc-space-4);
	margin: 0;
	padding-top: var(--tc-space-3);
	border-top: 1px solid var(--tc-outline);
}

.contentus-agent-card__meta-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.contentus-agent-card__meta dt {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tc-fg-muted);
}

.contentus-agent-card__meta dd {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--tc-fg);
}

/* --- pills ------------------------------------------------------------ */

.contentus-agent-trust {
	display: inline-flex;
	flex-wrap: wrap;
	gap: var(--tc-space-2);
}

.contentus-agent-pill {
	display: inline-flex;
	align-items: center;
	padding: 3px var(--tc-space-2);
	border: 1px solid transparent;
	border-radius: var(--tc-radius-pill);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* The type is a category, not a judgement, so it takes neutral linework and
   leaves the accent to mean something. */
.contentus-agent-pill--type {
	color: var(--tc-fg);
	border-color: var(--tc-outline-variant);
	background: transparent;
}

/* Verified takes the surface accent (Violet Signal on `mcp`) because the brand
   pack ships no success green — Core Blue, Violet and Phi Gold are the whole
   accent vocabulary. Inventing a green here would put a colour in the product
   that the design pack does not define, which is the same class of mistake as
   inventing a token. */
.contentus-agent-pill--success {
	color: var(--tc-accent);
	border-color: var(--tc-accent);
}

.contentus-agent-pill--warning {
	color: var(--tc-phi-gold);
	border-color: var(--tc-phi-gold);
}

.contentus-agent-pill--critical {
	color: var(--tc-error);
	border-color: var(--tc-error);
}

.contentus-agent-pill--neutral {
	color: var(--tc-fg-muted);
	border-color: var(--tc-outline);
}

/* --- paging ----------------------------------------------------------- */

.contentus-agents__paging {
	display: flex;
	justify-content: center;
	margin-top: var(--tc-space-5);
}

.contentus-agents__next {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 var(--tc-space-5);
	color: var(--tc-fg);
	background: var(--tc-surface-1);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	text-decoration: none;
	font-weight: 600;
}

.contentus-agents__next:hover,
.contentus-agents__next:focus-visible {
	border-color: var(--tc-accent);
	color: var(--tc-accent);
}

/* --- mobile ----------------------------------------------------------- */

@media (max-width: 960px) {
	.contentus-agents__grid {
		/* Single column everywhere below 960px (product design §4). */
		grid-template-columns: 1fr;
	}

	.contentus-agents__filters {
		flex-direction: column;
		align-items: stretch;
	}

	.contentus-agents__filter-actions {
		justify-content: space-between;
	}
}

/* --- detail ----------------------------------------------------------- */

.contentus-agent-detail__head {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
	margin-bottom: var(--tc-space-5);
}

.contentus-agent-detail__handle {
	margin: 0;
	font-family: var(--tc-font-mono);
	color: var(--tc-fg-muted);
}

.contentus-agent-detail__bio {
	margin: var(--tc-space-2) 0 0;
	color: var(--tc-fg-muted);
	line-height: 1.6;
	max-width: 60ch;
}

/* --- mcp panel -------------------------------------------------------- */

.contentus-mcp__lede {
	margin: 0 0 var(--tc-space-4);
	color: var(--tc-fg-muted);
	line-height: 1.6;
	max-width: 70ch;
}

.contentus-mcp__subheading {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tc-fg-muted);
}

.contentus-mcp__addresses {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-3);
}

.contentus-mcp__scopes,
.contentus-mcp__guidance-block {
	margin-top: var(--tc-space-5);
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
}

.contentus-mcp__scope-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tc-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.contentus-mcp__guidance {
	margin: 0;
	padding-left: var(--tc-space-5);
	color: var(--tc-fg-muted);
	line-height: 1.6;
	max-width: 70ch;
}

.contentus-mcp__guidance li + li {
	margin-top: var(--tc-space-1);
}

.contentus-mcp__probe + .contentus-mcp__probe {
	margin-top: var(--tc-space-5);
	padding-top: var(--tc-space-5);
	border-top: 1px solid var(--tc-outline-variant);
}

.contentus-mcp__probe-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-2);
	margin-bottom: var(--tc-space-3);
}

.contentus-mcp__facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: var(--tc-space-3);
	margin: 0 0 var(--tc-space-3);
}

.contentus-mcp__facts dt {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tc-fg-muted);
}

.contentus-mcp__facts dd {
	margin: 2px 0 0;
	color: var(--tc-fg);
	/* URLs and actor IDs are long and must not push the grid wide. */
	overflow-wrap: anywhere;
}

.contentus-mcp__mono {
	font-family: var(--tc-font-mono);
	font-size: 0.8125rem;
}

.contentus-mcp__note {
	margin: 0;
	color: var(--tc-fg-muted);
	font-size: 0.875rem;
	line-height: 1.55;
	max-width: 70ch;
}

.contentus-mcp__tools {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
	gap: var(--tc-space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.contentus-mcp__tool {
	padding: var(--tc-space-3);
	background: var(--tc-bg);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
}

.contentus-mcp__tool-name {
	margin: 0;
	font-family: var(--tc-font-mono);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--tc-fg);
	overflow-wrap: anywhere;
}

.contentus-mcp__tool-description {
	margin: var(--tc-space-1) 0 0;
	color: var(--tc-fg-muted);
	font-size: 0.875rem;
	line-height: 1.5;
}

/* --- copy block ------------------------------------------------------- */

.contentus-copy {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
}

.contentus-copy__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-2);
}

.contentus-copy__label {
	display: flex;
	align-items: baseline;
	gap: var(--tc-space-2);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tc-fg-muted);
}

.contentus-copy__destination {
	font-family: var(--tc-font-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	color: var(--tc-fg-dim);
}

.contentus-copy__button {
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	color: var(--tc-fg);
	background: transparent;
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
}

.contentus-copy__button:hover,
.contentus-copy__button:focus-visible {
	border-color: var(--tc-accent);
	color: var(--tc-accent);
}

.contentus-copy__value {
	margin: 0;
	padding: var(--tc-space-3);
	background: var(--tc-bg);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
	font-family: var(--tc-font-mono);
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--tc-fg);
	/* Always selectable: the copy button is an affordance, never the only way
	   out of the block. */
	user-select: text;
	overflow-wrap: anywhere;
}

.contentus-copy__value--block {
	overflow-x: auto;
	white-space: pre;
	overflow-wrap: normal;
}

.contentus-copy__value code {
	font: inherit;
	background: none;
	padding: 0;
}

.contentus-copy__hint {
	margin: 0;
	color: var(--tc-phi-gold);
	font-size: 0.8125rem;
}

.contentus-mcp__addresses .contentus-copy + .contentus-copy {
	margin-top: 0;
}

/* --- sharing (M7.0) --------------------------------------------------- */

.contentus-sharing__lede {
	margin: 0 0 var(--tc-space-4);
	color: var(--tc-fg-muted);
	line-height: 1.6;
	max-width: 70ch;
}

.contentus-sharing__form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--tc-space-3);
	margin-bottom: var(--tc-space-3);
}

.contentus-sharing__field {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
	flex: 1 1 12rem;
	min-width: 0;
}

.contentus-sharing__field-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--tc-fg-muted);
}

.contentus-sharing__input {
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	color: var(--tc-fg);
	background: var(--tc-bg);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	font: inherit;
}

.contentus-sharing__input:focus-visible {
	outline: 2px solid var(--tc-accent);
	outline-offset: 2px;
}

.contentus-sharing__input:disabled {
	opacity: 0.6;
}

.contentus-sharing__grant-btn {
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	padding: 0 var(--tc-space-5);
	color: var(--tc-fg-inverse);
	background: var(--tc-accent);
	border: 1px solid transparent;
	border-radius: var(--tc-radius-md);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.contentus-sharing__grant-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.contentus-sharing__grants {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.contentus-sharing__grant {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tc-space-2) var(--tc-space-3);
	padding: var(--tc-space-3);
	background: var(--tc-bg);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
}

.contentus-sharing__grantee {
	font-family: var(--tc-font-mono);
	font-weight: 600;
	color: var(--tc-fg);
	overflow-wrap: anywhere;
}

/* The `--granted` single stamp became `--audit` in M2.3
   (equaltoai/contentus#94): a revoked row carries TWO stamps — who granted it
   and who took it away — so the slot is a column rather than one line, and a
   class named for the grant alone would name half of what sits in it. */

.contentus-sharing__audit {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
	/* Sits beside the grantee and before the revoke control, which is pushed to
	   the far edge by the auto margin. */
	margin-right: auto;
	min-width: 0;
}

.contentus-sharing__stamp {
	color: var(--tc-fg-muted);
	font-size: 0.8125rem;
	overflow-wrap: anywhere;
}

.contentus-sharing__section + .contentus-sharing__section {
	margin-top: var(--tc-space-5);
}

.contentus-sharing__subheading {
	margin: 0 0 var(--tc-space-2);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tc-fg-muted);
}

.contentus-sharing__note {
	margin: 0 0 var(--tc-space-3);
	color: var(--tc-fg-muted);
	font-size: 0.8125rem;
	line-height: 1.6;
	max-width: 70ch;
}

.contentus-sharing__revoke-btn {
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	color: var(--tc-fg);
	background: transparent;
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
}

.contentus-sharing__revoke-btn:hover:not(:disabled),
.contentus-sharing__revoke-btn:focus-visible {
	border-color: var(--tc-error);
	color: var(--tc-error);
}

.contentus-sharing__revoke-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.contentus-sharing__error {
	margin: 0 0 var(--tc-space-3);
	color: var(--tc-error);
	line-height: 1.6;
	overflow-wrap: anywhere;
}

/* --- shared with you (M7.0 item 7; renamed off `act-as` in M2.2) -------

   The block was `contentus-act-as__` while this panel carried the act-as
   selection control. The control went in M2.1 (equaltoai/contentus#92) and
   M2.2 (equaltoai/contentus#93) gave the panel what a grant actually conveys —
   MCP access — so a class named for act-as would now be naming the one thing
   the panel exists to stop meaning. `contentus-act-as-banner__` is a different
   block and is untouched: the banner really is about attribution. */

.contentus-shared__lede {
	margin: 0 0 var(--tc-space-4);
	color: var(--tc-fg-muted);
	line-height: 1.6;
	max-width: 70ch;
}

.contentus-shared__list {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.contentus-shared__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tc-space-2) var(--tc-space-3);
	padding: var(--tc-space-3);
	background: var(--tc-bg);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
}

.contentus-shared__agent {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-1);
	/* Holds the row's start edge; the connect link is pushed to the far edge by
	   this auto margin. */
	margin-right: auto;
	min-width: 0;
}

.contentus-shared__handle {
	font-family: var(--tc-font-mono);
	font-weight: 600;
	color: var(--tc-fg);
	overflow-wrap: anywhere;
}

.contentus-shared__meta {
	color: var(--tc-fg-muted);
	font-size: 0.8125rem;
	overflow-wrap: anywhere;
}

.contentus-shared__endpoint-label {
	margin-top: var(--tc-space-1);
	color: var(--tc-fg-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.contentus-shared__endpoint {
	/* An MCP endpoint is long and must wrap rather than push the column wide on
	   a phone — the same floor `.contentus-copy__value` holds on the detail page,
	   spelled again here because this row deliberately does NOT reuse `CopyBlock`
	   (that component is behind the MCP-panel seam; see the panel's template). */
	color: var(--tc-fg);
	font-family: var(--tc-font-mono);
	font-size: 0.8125rem;
	overflow-wrap: anywhere;
}

.contentus-shared__connect {
	/* 44px minimum touch target (product design §4). */
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	color: var(--tc-fg);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
}

.contentus-shared__connect:hover,
.contentus-shared__connect:focus-visible {
	border-color: var(--tc-accent);
	color: var(--tc-accent);
}

/* The `--select-btn` and `--stop-btn` rules went with the act-as selection
   control in M2.1 (equaltoai/contentus#92): a person electing to act as an
   agent was the one surface the M7 tree got wrong, and a style left behind for
   a removed control is how it comes back. */

/* --- trust and capabilities ------------------------------------------- */

.contentus-trust {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
}

.contentus-trust__warning {
	margin: 0;
	padding: var(--tc-space-3);
	color: var(--tc-error);
	border: 1px solid var(--tc-error);
	border-radius: var(--tc-radius-md);
	line-height: 1.55;
	max-width: 70ch;
}

.contentus-caps {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
	margin-top: var(--tc-space-5);
	padding-top: var(--tc-space-5);
	border-top: 1px solid var(--tc-outline-variant);
}

.contentus-caps__lede {
	margin: 0;
	color: var(--tc-fg-muted);
	line-height: 1.55;
	max-width: 70ch;
}

.contentus-caps__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tc-space-2);
	margin: var(--tc-space-1) 0 var(--tc-space-3);
	padding: 0;
	list-style: none;
}

/* --- accordion -------------------------------------------------------- */

.contentus-accordion {
	margin-top: var(--tc-space-4);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
	background: var(--tc-bg);
}

.contentus-accordion__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-3);
	/* 44px minimum touch target (product design §4). */
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	cursor: pointer;
	/* The native marker is replaced by the one below, which can be positioned
	   and sized to the brand. `list-style` covers Firefox, `::-webkit-details-marker`
	   covers Safari. */
	list-style: none;
}

.contentus-accordion__summary::-webkit-details-marker {
	display: none;
}

.contentus-accordion__summary:focus-visible {
	outline: 2px solid var(--tc-accent);
	outline-offset: -2px;
	border-radius: var(--tc-radius-md);
}

.contentus-accordion__title {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tc-fg-muted);
}

.contentus-accordion__marker {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--tc-fg-muted);
	border-bottom: 2px solid var(--tc-fg-muted);
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform var(--tc-dur-fast) var(--tc-ease-out);
}

.contentus-accordion[open] .contentus-accordion__marker {
	transform: rotate(-135deg) translate(-2px, -2px);
}

@media (prefers-reduced-motion: reduce) {
	.contentus-accordion__marker {
		transition: none;
	}
}

.contentus-accordion__body {
	padding: 0 var(--tc-space-3) var(--tc-space-3);
}

/* An accordion inside the config list separates its neighbours rather than
   stacking flush against them. */
.contentus-accordion + .contentus-accordion {
	margin-top: var(--tc-space-2);
}

/* --- who has been driving (M2.4, equaltoai/contentus#95) ---------------

   The companion block to `contentus-sharing__`, and deliberately its own: the
   sharing panel answers who HOLDS access and this one answers who has actually
   DRIVEN the agent, so sharing one block would tie the two screens' layouts
   together at exactly the point where they are expected to diverge. The visual
   language is kept identical on purpose — an owner reads the two panels as one
   answer, and a driver line should sit like a grant line. */

.contentus-drivers__lede {
	margin: 0 0 var(--tc-space-4);
	color: var(--tc-fg-muted);
	line-height: 1.6;
	max-width: 70ch;
}

.contentus-drivers__section + .contentus-drivers__section {
	margin-top: var(--tc-space-5);
}

.contentus-drivers__subheading {
	margin: 0 0 var(--tc-space-2);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tc-fg-muted);
}

.contentus-drivers__note {
	margin: var(--tc-space-3) 0 0;
	color: var(--tc-fg-muted);
	font-size: 0.8125rem;
	line-height: 1.6;
	max-width: 70ch;
}

.contentus-drivers__list {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.contentus-drivers__driver,
.contentus-drivers__action {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--tc-space-1) var(--tc-space-3);
	padding: var(--tc-space-3);
	background: var(--tc-bg);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
}

.contentus-drivers__name {
	font-family: var(--tc-font-mono);
	font-weight: 600;
	color: var(--tc-fg);
	overflow-wrap: anywhere;
}

/* The event token is lesser's own vocabulary, shown verbatim, so it is set in
   the mono face that says "this is the instance's word, not ours". */
.contentus-drivers__event {
	font-family: var(--tc-font-mono);
	color: var(--tc-fg);
	overflow-wrap: anywhere;
}

.contentus-drivers__stamp {
	color: var(--tc-fg-muted);
	font-size: 0.8125rem;
	overflow-wrap: anywhere;
}

/* Pushed to the far edge so the attribution — the answer this panel exists for
   — lands in a consistent column rather than trailing the event name's width. */
.contentus-drivers__by,
.contentus-drivers__how {
	margin-left: auto;
	color: var(--tc-fg-muted);
	font-size: 0.8125rem;
	overflow-wrap: anywhere;
}

/* ===== contentus drones theme — face 7 roster and creation ===== */
/* Face 7 — owned drone roster and creation surface. */

.contentus-drones__toolbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: var(--tc-space-4);
}

.contentus-drones__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: var(--tc-space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.contentus-drones__grid > li {
	min-width: 0;
}

.contentus-drones__notice,
.contentus-drone-card,
.contentus-drone-policy,
.contentus-drone-credentials {
	display: flex;
	flex-direction: column;
	gap: var(--tc-space-4);
}

.contentus-drones__notice h2,
.contentus-drones__notice p,
.contentus-drone-policy h2,
.contentus-drone-policy p,
.contentus-drone-credentials h2,
.contentus-drone-credentials p,
.contentus-drones__status,
.contentus-drones__error {
	margin: 0;
}

.contentus-drones__status {
	color: var(--tc-fg-muted);
}

.contentus-drones__error {
	color: var(--tc-error);
}

.contentus-drone-card {
	height: 100%;
	padding: var(--tc-space-5);
	background: var(--tc-surface-1);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
}

.contentus-drone-card__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--tc-space-3);
}

.contentus-drone-card__title,
.contentus-drone-card__handle,
.contentus-drone-card__bio {
	margin: 0;
}

.contentus-drone-card__title {
	font-size: 1.125rem;
}

.contentus-drone-card__title a {
	color: var(--tc-fg);
	text-decoration: none;
}

.contentus-drone-card__title a:hover,
.contentus-drone-card__title a:focus-visible {
	color: var(--tc-accent);
	text-decoration: underline;
}

.contentus-drone-card__handle,
.contentus-drone-card__bio {
	color: var(--tc-fg-muted);
}

.contentus-drone-card__handle {
	font-family: var(--tc-font-mono);
	font-size: 0.8125rem;
}

.contentus-drone-pill {
	padding: 3px var(--tc-space-2);
	border: 1px solid var(--tc-accent);
	border-radius: var(--tc-radius-pill);
	color: var(--tc-accent);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.contentus-drone-card__facts {
	display: grid;
	gap: var(--tc-space-3);
	margin: 0;
}

.contentus-drone-card__facts div {
	display: grid;
	gap: 2px;
}

.contentus-drone-card__facts dt {
	color: var(--tc-fg-muted);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.contentus-drone-card__facts dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.contentus-drone-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tc-space-3);
}

.contentus-drone-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 var(--tc-space-4);
	color: var(--tc-fg);
	background: transparent;
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.contentus-drone-action:hover,
.contentus-drone-action:focus-visible {
	color: var(--tc-accent);
	border-color: var(--tc-accent);
}

.contentus-drone-action--primary {
	color: var(--tc-midnight);
	background: var(--tc-accent);
	border-color: var(--tc-accent);
}

.contentus-drone-action:disabled {
	opacity: 0.6;
	cursor: wait;
}

.contentus-drone-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tc-space-5);
}

.contentus-drone-form__field {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tc-space-2);
}

.contentus-drone-form__field > label,
.contentus-drone-form__scopes legend {
	font-weight: 700;
}

.contentus-drone-form__field > label span,
.contentus-drone-form__hint,
.contentus-drone-form__scopes > p {
	color: var(--tc-fg-muted);
	font-size: 0.8125rem;
}

.contentus-drone-form__hint,
.contentus-drone-form__scopes > p {
	margin: 0;
}

.contentus-drone-form input[type='text'],
.contentus-drone-form textarea,
.contentus-drone-form select {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: var(--tc-space-3);
	color: var(--tc-fg);
	background: var(--tc-surface-1);
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	font: inherit;
}

.contentus-drone-form textarea {
	min-height: 8rem;
	resize: vertical;
}

.contentus-drone-form input[aria-invalid='true'],
.contentus-drone-form textarea[aria-invalid='true'] {
	border-color: var(--tc-error);
}

.contentus-drone-form__scopes {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tc-space-3);
	margin: 0;
	padding: var(--tc-space-4);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
}

.contentus-drone-form__scopes label {
	display: flex;
	align-items: center;
	min-height: 44px;
	gap: var(--tc-space-3);
}

.contentus-drone-form__scopes input {
	width: 1.125rem;
	height: 1.125rem;
}

.contentus-drone-form__submit {
	position: sticky;
	bottom: max(var(--tc-space-3), env(safe-area-inset-bottom));
	z-index: 2;
	display: flex;
	padding: var(--tc-space-3);
	background: color-mix(in srgb, var(--tc-surface) 92%, transparent);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
	backdrop-filter: blur(8px);
}

.contentus-drone-form__submit .contentus-drone-action {
	width: 100%;
}

.contentus-drone-credentials__warning {
	padding: var(--tc-space-4);
	color: var(--tc-error);
	background: var(--tc-error-container);
	border: 1px solid var(--tc-error);
	border-radius: var(--tc-radius-md);
	font-weight: 700;
}

.contentus-drone-credential {
	display: grid;
	gap: var(--tc-space-2);
}

.contentus-drone-credential__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tc-space-3);
}

.contentus-drone-credential__header button {
	min-height: 44px;
	padding: 0 var(--tc-space-3);
	color: var(--tc-fg);
	background: transparent;
	border: 1px solid var(--tc-outline);
	border-radius: var(--tc-radius-md);
	font: inherit;
	cursor: pointer;
}

.contentus-drone-credential pre {
	max-width: 100%;
	margin: 0;
	padding: var(--tc-space-3);
	overflow-x: auto;
	background: var(--tc-surface-1);
	border: 1px solid var(--tc-outline-variant);
	border-radius: var(--tc-radius-md);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.contentus-drone-credential code {
	font-family: var(--tc-font-mono);
}

.contentus-drone-policy {
	align-items: flex-start;
}

@media (max-width: 960px) {
	.contentus-drones__grid {
		grid-template-columns: 1fr;
	}

	.contentus-drone-card__actions {
		flex-direction: column;
	}
}
