@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

/* === Lifted from HexCoded-Design-Mockup.html — DO NOT hand-edit by class === */
/* Block 1: foundation tokens, base components (mockup lines 9-1118) */
/* ── hexcoded-ds.css (inlined) ── */
/* HexCoded Design System — foundation + hexcoded tokens (built from amplify-design-system @ 2026-05-26) */
/* Auto-generated by build-tokens.js — do not edit */
:root {
  --amp-breakpoint-sm: 640px;
  --amp-breakpoint-md: 768px;
  --amp-breakpoint-lg: 1024px;
  --amp-breakpoint-xl: 1280px;
  --amp-breakpoint-2xl: 1536px;
  --amp-color-violet-50: #FAF5FF;
  --amp-color-violet-100: #F3E8FF;
  --amp-color-violet-200: #E9D5FF;
  --amp-color-violet-300: #D8B4FE;
  --amp-color-violet-400: #C084FC;
  --amp-color-violet-500: #A855F7;
  --amp-color-violet-600: #7C3AED;
  --amp-color-violet-700: #6D28D9;
  --amp-color-violet-800: #5B21B6;
  --amp-color-violet-900: #4C1D95;
  --amp-color-stone-50: #FAFAF9;
  --amp-color-stone-100: #F5F5F4;
  --amp-color-stone-200: #E7E5E4;
  --amp-color-stone-300: #D6D3D1;
  --amp-color-stone-400: #A8A29E;
  --amp-color-stone-500: #78716C;
  --amp-color-stone-600: #57534E;
  --amp-color-stone-700: #44403C;
  --amp-color-stone-800: #292524;
  --amp-color-stone-900: #1C1917;
  --amp-color-stone-950: #0C0A09;
  --amp-color-red-50: #FEF2F2;
  --amp-color-red-100: #FEE2E2;
  --amp-color-red-500: #EF4444;
  --amp-color-red-600: #DC2626;
  --amp-color-red-700: #B91C1C;
  --amp-color-green-50: #ECFDF5;
  --amp-color-green-100: #D1FAE5;
  --amp-color-green-500: #10B981;
  --amp-color-green-600: #059669;
  --amp-color-green-700: #047857;
  --amp-color-amber-50: #FFFBEB;
  --amp-color-amber-100: #FEF3C7;
  --amp-color-amber-500: #F59E0B;
  --amp-color-amber-600: #D97706;
  --amp-color-amber-700: #B45309;
  --amp-color-blue-50: #EFF6FF;
  --amp-color-blue-100: #DBEAFE;
  --amp-color-blue-500: #3B82F6;
  --amp-color-blue-600: #2563EB;
  --amp-color-blue-700: #1D4ED8;
  --amp-color-rose-500: #F43F5E;
  --amp-color-rose-600: #E11D48;
  --amp-color-white: #FFFFFF;
  --amp-color-black: #000000;
  --amp-color-transparent: transparent;
  --amp-motion-duration-instant: 60ms;
  --amp-motion-duration-fast: 150ms;
  --amp-motion-duration-normal: 250ms;
  --amp-motion-duration-slow: 400ms;
  --amp-motion-duration-lazy: 700ms;
  --amp-motion-duration-slower: 600ms;
  --amp-motion-stagger-1: 50ms;
  --amp-motion-stagger-2: 100ms;
  --amp-motion-stagger-3: 200ms;
  --amp-motion-stagger-delay: 50ms;
  --amp-opacity-disabled: 0.5;
  --amp-opacity-hover: 0.04;
  --amp-opacity-pressed: 0.08;
  --amp-opacity-overlay: 0.5;
  --amp-opacity-status-bg: 0.08;
  --amp-radius-none: 0px;
  --amp-radius-sm: 4px;
  --amp-radius-md: 8px;
  --amp-radius-lg: 12px;
  --amp-radius-xl: 16px;
  --amp-radius-2xl: 24px;
  --amp-radius-full: 9999px;
  --amp-shadow-0: none;
  --amp-shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --amp-shadow-2: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --amp-shadow-3: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --amp-shadow-4: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --amp-shadow-5: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --amp-shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.04);
  --amp-shadow-md: 0 2px 8px rgba(28, 25, 23, 0.06);
  --amp-shadow-lg: 0 8px 24px rgba(28, 25, 23, 0.08);
  --amp-shadow-sm-dark: 0 1px 3px rgba(0, 0, 0, 0.2);
  --amp-shadow-md-dark: 0 2px 8px rgba(0, 0, 0, 0.3);
  --amp-shadow-lg-dark: 0 8px 24px rgba(0, 0, 0, 0.4);
  --amp-shadow-accent-sm: 0 1px 4px 0 rgba(101, 49, 255, 0.15);
  --amp-shadow-accent-md: 0 4px 12px -2px rgba(101, 49, 255, 0.25);
  --amp-shadow-accent-lg: 0 10px 25px -4px rgba(101, 49, 255, 0.35);
  --amp-shadow-ring-accent: 0 0 0 2px var(--amp-semantic-border-accent);
  --amp-shadow-composer: 0 -4px 12px -4px rgba(28, 25, 23, 0.08);
  --amp-shadow-device: 0 12px 32px -8px rgba(28, 25, 23, 0.18), 0 4px 12px -4px rgba(28, 25, 23, 0.10);
  --amp-spacing-1: 4px;
  --amp-spacing-2: 8px;
  --amp-spacing-3: 12px;
  --amp-spacing-4: 16px;
  --amp-spacing-5: 20px;
  --amp-spacing-6: 24px;
  --amp-spacing-8: 32px;
  --amp-spacing-10: 40px;
  --amp-spacing-12: 48px;
  --amp-spacing-16: 64px;
  --amp-spacing-20: 80px;
  --amp-spacing-24: 96px;
  --amp-font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --amp-font-family-mono: 'JetBrains Mono', 'SF Mono', Monaco, Menlo, monospace;
  --amp-font-weight-light: 300;
  --amp-font-weight-regular: 400;
  --amp-font-weight-medium: 500;
  --amp-font-weight-semibold: 600;
  --amp-font-weight-bold: 700;
  --amp-font-size-display: 34px;
  --amp-font-size-h-lg: 24px;
  --amp-font-size-h-md: 18px;
  --amp-font-size-h-sm: 15px;
  --amp-font-size-body: 14px;
  --amp-font-size-body-sm: 12px;
  --amp-font-size-mono: 13px;
  --amp-font-lineHeight-tight: 1.2;
  --amp-font-lineHeight-normal: 1.5;
  --amp-font-lineHeight-relaxed: 1.6;
  --amp-z-index-base: 0;
  --amp-z-index-dropdown: 1000;
  --amp-z-index-sticky: 1020;
  --amp-z-index-fixed: 1030;
  --amp-z-index-modal-backdrop: 1040;
  --amp-z-index-modal: 1050;
  --amp-z-index-popover: 1060;
  --amp-z-index-tooltip: 1070;
  --amp-z-index-toast: 1080;
  --amp-semantic-accent: #7C3AED;
  --amp-semantic-accent-hover: #6D28D9;
  --amp-semantic-accent-light: #F3E8FF;
  --amp-semantic-accent-subtle: #FAF5FF;
  --amp-semantic-bg-primary: #FAFAF9;
  --amp-semantic-bg-surface: #FFFFFF;
  --amp-semantic-bg-raised: #FFFFFF;
  --amp-semantic-bg-sunken: #F5F5F4;
  --amp-semantic-bg-overlay: rgba(28, 25, 23, 0.5);
  --amp-semantic-text-primary: #1C1917;
  --amp-semantic-text-secondary: #57534E;
  --amp-semantic-text-muted: #78716C;
  --amp-semantic-text-disabled: #A8A29E;
  --amp-semantic-text-inverse: #FFFFFF;
  --amp-semantic-text-accent: #7C3AED;
  --amp-semantic-border-default: #E7E5E4;
  --amp-semantic-border-strong: #D6D3D1;
  --amp-semantic-border-subtle: #F5F5F4;
  --amp-semantic-border-accent: #E9D5FF;
  --amp-semantic-border-focus: #7C3AED;
  --amp-semantic-status-success: #059669;
  --amp-semantic-status-success-bg: rgba(5, 150, 105, 0.08);
  --amp-semantic-status-warning: #D97706;
  --amp-semantic-status-warning-bg: rgba(217, 119, 6, 0.08);
  --amp-semantic-status-error: #DC2626;
  --amp-semantic-status-error-bg: rgba(220, 38, 38, 0.08);
  --amp-semantic-status-info: #2563EB;
  --amp-semantic-status-info-bg: rgba(37, 99, 235, 0.08);
  --amp-semantic-color-info-soft: rgba(37, 99, 235, 0.08);
}

/* ──────────────────────────────────────────────────────────────────
   Product-agnostic semantic aliases — resolve to active product theme.
   Consumed by Canvas v2 primitives in @one-impression/ui via Tailwind
   arbitrary classes (e.g. bg-[var(--amp-semantic-bg-accent-subtle)]).
   Dark mode cascades through var() indirection automatically.
   ────────────────────────────────────────────────────────────────── */
:root {
  --amp-semantic-bg-base: var(--amp-semantic-bg-primary);
  --amp-semantic-bg-canvas: var(--amp-semantic-bg-sunken);
  --amp-semantic-bg-subtle: var(--amp-semantic-bg-sunken);
  --amp-semantic-bg-accent: var(--amp-semantic-accent);
  --amp-semantic-bg-accent-subtle: var(--amp-semantic-accent-subtle);
  --amp-semantic-bg-success-subtle: var(--amp-semantic-status-success-bg);
  --amp-semantic-bg-warning-subtle: var(--amp-semantic-status-warning-bg);
  --amp-semantic-bg-error-subtle: var(--amp-semantic-status-error-bg);
  --amp-semantic-bg-info-subtle: var(--amp-semantic-status-info-bg);
  --amp-semantic-text-default: var(--amp-semantic-text-primary);
  --amp-semantic-text-tertiary: var(--amp-semantic-text-muted);
  --amp-semantic-text-on-accent: var(--amp-semantic-text-inverse);
  --amp-semantic-border-success: var(--amp-semantic-status-success);
  --amp-semantic-border-error: var(--amp-semantic-status-error);
  --amp-semantic-border-warning: var(--amp-semantic-status-warning);
  --amp-semantic-border-info: var(--amp-semantic-status-info);
  --amp-semantic-accent-primary: var(--amp-semantic-accent);
  --amp-semantic-accent-soft: var(--amp-semantic-accent-light);
}

/* Dark mode overrides */
[data-theme="dark"] {
  --amp-breakpoint-sm: 640px;
  --amp-breakpoint-md: 768px;
  --amp-breakpoint-lg: 1024px;
  --amp-breakpoint-xl: 1280px;
  --amp-breakpoint-2xl: 1536px;
  --amp-color-violet-50: #FAF5FF;
  --amp-color-violet-100: #F3E8FF;
  --amp-color-violet-200: #E9D5FF;
  --amp-color-violet-300: #D8B4FE;
  --amp-color-violet-400: #C084FC;
  --amp-color-violet-500: #A855F7;
  --amp-color-violet-600: #7C3AED;
  --amp-color-violet-700: #6D28D9;
  --amp-color-violet-800: #5B21B6;
  --amp-color-violet-900: #4C1D95;
  --amp-color-stone-50: #FAFAF9;
  --amp-color-stone-100: #F5F5F4;
  --amp-color-stone-200: #E7E5E4;
  --amp-color-stone-300: #D6D3D1;
  --amp-color-stone-400: #A8A29E;
  --amp-color-stone-500: #78716C;
  --amp-color-stone-600: #57534E;
  --amp-color-stone-700: #44403C;
  --amp-color-stone-800: #292524;
  --amp-color-stone-900: #1C1917;
  --amp-color-stone-950: #0C0A09;
  --amp-color-red-50: #FEF2F2;
  --amp-color-red-100: #FEE2E2;
  --amp-color-red-500: #EF4444;
  --amp-color-red-600: #DC2626;
  --amp-color-red-700: #B91C1C;
  --amp-color-green-50: #ECFDF5;
  --amp-color-green-100: #D1FAE5;
  --amp-color-green-500: #10B981;
  --amp-color-green-600: #059669;
  --amp-color-green-700: #047857;
  --amp-color-amber-50: #FFFBEB;
  --amp-color-amber-100: #FEF3C7;
  --amp-color-amber-500: #F59E0B;
  --amp-color-amber-600: #D97706;
  --amp-color-amber-700: #B45309;
  --amp-color-blue-50: #EFF6FF;
  --amp-color-blue-100: #DBEAFE;
  --amp-color-blue-500: #3B82F6;
  --amp-color-blue-600: #2563EB;
  --amp-color-blue-700: #1D4ED8;
  --amp-color-rose-500: #F43F5E;
  --amp-color-rose-600: #E11D48;
  --amp-color-white: #FFFFFF;
  --amp-color-black: #000000;
  --amp-color-transparent: transparent;
  --amp-motion-duration-instant: 60ms;
  --amp-motion-duration-fast: 150ms;
  --amp-motion-duration-normal: 250ms;
  --amp-motion-duration-slow: 400ms;
  --amp-motion-duration-lazy: 700ms;
  --amp-motion-duration-slower: 600ms;
  --amp-motion-stagger-1: 50ms;
  --amp-motion-stagger-2: 100ms;
  --amp-motion-stagger-3: 200ms;
  --amp-motion-stagger-delay: 50ms;
  --amp-opacity-disabled: 0.5;
  --amp-opacity-hover: 0.04;
  --amp-opacity-pressed: 0.08;
  --amp-opacity-overlay: 0.5;
  --amp-opacity-status-bg: 0.08;
  --amp-radius-none: 0px;
  --amp-radius-sm: 4px;
  --amp-radius-md: 8px;
  --amp-radius-lg: 12px;
  --amp-radius-xl: 16px;
  --amp-radius-2xl: 24px;
  --amp-radius-full: 9999px;
  --amp-shadow-0: none;
  --amp-shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --amp-shadow-2: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --amp-shadow-3: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --amp-shadow-4: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --amp-shadow-5: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --amp-shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.04);
  --amp-shadow-md: 0 2px 8px rgba(28, 25, 23, 0.06);
  --amp-shadow-lg: 0 8px 24px rgba(28, 25, 23, 0.08);
  --amp-shadow-sm-dark: 0 1px 3px rgba(0, 0, 0, 0.2);
  --amp-shadow-md-dark: 0 2px 8px rgba(0, 0, 0, 0.3);
  --amp-shadow-lg-dark: 0 8px 24px rgba(0, 0, 0, 0.4);
  --amp-shadow-accent-sm: 0 1px 4px 0 rgba(101, 49, 255, 0.15);
  --amp-shadow-accent-md: 0 4px 12px -2px rgba(101, 49, 255, 0.25);
  --amp-shadow-accent-lg: 0 10px 25px -4px rgba(101, 49, 255, 0.35);
  --amp-shadow-ring-accent: 0 0 0 2px var(--amp-semantic-border-accent);
  --amp-shadow-composer: 0 -4px 12px -4px rgba(28, 25, 23, 0.08);
  --amp-shadow-device: 0 12px 32px -8px rgba(28, 25, 23, 0.18), 0 4px 12px -4px rgba(28, 25, 23, 0.10);
  --amp-spacing-1: 4px;
  --amp-spacing-2: 8px;
  --amp-spacing-3: 12px;
  --amp-spacing-4: 16px;
  --amp-spacing-5: 20px;
  --amp-spacing-6: 24px;
  --amp-spacing-8: 32px;
  --amp-spacing-10: 40px;
  --amp-spacing-12: 48px;
  --amp-spacing-16: 64px;
  --amp-spacing-20: 80px;
  --amp-spacing-24: 96px;
  --amp-font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --amp-font-family-mono: 'JetBrains Mono', 'SF Mono', Monaco, Menlo, monospace;
  --amp-font-weight-light: 300;
  --amp-font-weight-regular: 400;
  --amp-font-weight-medium: 500;
  --amp-font-weight-semibold: 600;
  --amp-font-weight-bold: 700;
  --amp-font-size-display: 34px;
  --amp-font-size-h-lg: 24px;
  --amp-font-size-h-md: 18px;
  --amp-font-size-h-sm: 15px;
  --amp-font-size-body: 14px;
  --amp-font-size-body-sm: 12px;
  --amp-font-size-mono: 13px;
  --amp-font-lineHeight-tight: 1.2;
  --amp-font-lineHeight-normal: 1.5;
  --amp-font-lineHeight-relaxed: 1.6;
  --amp-z-index-base: 0;
  --amp-z-index-dropdown: 1000;
  --amp-z-index-sticky: 1020;
  --amp-z-index-fixed: 1030;
  --amp-z-index-modal-backdrop: 1040;
  --amp-z-index-modal: 1050;
  --amp-z-index-popover: 1060;
  --amp-z-index-tooltip: 1070;
  --amp-z-index-toast: 1080;
  --amp-semantic-accent: #A855F7;
  --amp-semantic-accent-hover: #C084FC;
  --amp-semantic-accent-light: rgba(168, 85, 247, 0.12);
  --amp-semantic-accent-subtle: rgba(168, 85, 247, 0.06);
  --amp-semantic-bg-primary: #1C1917;
  --amp-semantic-bg-surface: #292524;
  --amp-semantic-bg-raised: #44403C;
  --amp-semantic-bg-sunken: #0C0A09;
  --amp-semantic-bg-overlay: rgba(0, 0, 0, 0.6);
  --amp-semantic-text-primary: #E7E5E4;
  --amp-semantic-text-secondary: #A8A29E;
  --amp-semantic-text-muted: #78716C;
  --amp-semantic-text-disabled: #57534E;
  --amp-semantic-text-inverse: #1C1917;
  --amp-semantic-text-accent: #C084FC;
  --amp-semantic-border-default: #44403C;
  --amp-semantic-border-strong: #57534E;
  --amp-semantic-border-subtle: rgba(255, 255, 255, 0.06);
  --amp-semantic-border-accent: rgba(168, 85, 247, 0.3);
  --amp-semantic-border-focus: #A855F7;
  --amp-semantic-status-success: #10B981;
  --amp-semantic-status-success-bg: rgba(16, 185, 129, 0.12);
  --amp-semantic-status-warning: #F59E0B;
  --amp-semantic-status-warning-bg: rgba(245, 158, 11, 0.12);
  --amp-semantic-status-error: #EF4444;
  --amp-semantic-status-error-bg: rgba(239, 68, 68, 0.12);
  --amp-semantic-status-info: #3B82F6;
  --amp-semantic-status-info-bg: rgba(59, 130, 246, 0.12);
  --amp-semantic-color-info-soft: rgba(59, 130, 246, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --amp-breakpoint-sm: 640px;
    --amp-breakpoint-md: 768px;
    --amp-breakpoint-lg: 1024px;
    --amp-breakpoint-xl: 1280px;
    --amp-breakpoint-2xl: 1536px;
    --amp-color-violet-50: #FAF5FF;
    --amp-color-violet-100: #F3E8FF;
    --amp-color-violet-200: #E9D5FF;
    --amp-color-violet-300: #D8B4FE;
    --amp-color-violet-400: #C084FC;
    --amp-color-violet-500: #A855F7;
    --amp-color-violet-600: #7C3AED;
    --amp-color-violet-700: #6D28D9;
    --amp-color-violet-800: #5B21B6;
    --amp-color-violet-900: #4C1D95;
    --amp-color-stone-50: #FAFAF9;
    --amp-color-stone-100: #F5F5F4;
    --amp-color-stone-200: #E7E5E4;
    --amp-color-stone-300: #D6D3D1;
    --amp-color-stone-400: #A8A29E;
    --amp-color-stone-500: #78716C;
    --amp-color-stone-600: #57534E;
    --amp-color-stone-700: #44403C;
    --amp-color-stone-800: #292524;
    --amp-color-stone-900: #1C1917;
    --amp-color-stone-950: #0C0A09;
    --amp-color-red-50: #FEF2F2;
    --amp-color-red-100: #FEE2E2;
    --amp-color-red-500: #EF4444;
    --amp-color-red-600: #DC2626;
    --amp-color-red-700: #B91C1C;
    --amp-color-green-50: #ECFDF5;
    --amp-color-green-100: #D1FAE5;
    --amp-color-green-500: #10B981;
    --amp-color-green-600: #059669;
    --amp-color-green-700: #047857;
    --amp-color-amber-50: #FFFBEB;
    --amp-color-amber-100: #FEF3C7;
    --amp-color-amber-500: #F59E0B;
    --amp-color-amber-600: #D97706;
    --amp-color-amber-700: #B45309;
    --amp-color-blue-50: #EFF6FF;
    --amp-color-blue-100: #DBEAFE;
    --amp-color-blue-500: #3B82F6;
    --amp-color-blue-600: #2563EB;
    --amp-color-blue-700: #1D4ED8;
    --amp-color-rose-500: #F43F5E;
    --amp-color-rose-600: #E11D48;
    --amp-color-white: #FFFFFF;
    --amp-color-black: #000000;
    --amp-color-transparent: transparent;
    --amp-motion-duration-instant: 60ms;
    --amp-motion-duration-fast: 150ms;
    --amp-motion-duration-normal: 250ms;
    --amp-motion-duration-slow: 400ms;
    --amp-motion-duration-lazy: 700ms;
    --amp-motion-duration-slower: 600ms;
    --amp-motion-stagger-1: 50ms;
    --amp-motion-stagger-2: 100ms;
    --amp-motion-stagger-3: 200ms;
    --amp-motion-stagger-delay: 50ms;
    --amp-opacity-disabled: 0.5;
    --amp-opacity-hover: 0.04;
    --amp-opacity-pressed: 0.08;
    --amp-opacity-overlay: 0.5;
    --amp-opacity-status-bg: 0.08;
    --amp-radius-none: 0px;
    --amp-radius-sm: 4px;
    --amp-radius-md: 8px;
    --amp-radius-lg: 12px;
    --amp-radius-xl: 16px;
    --amp-radius-2xl: 24px;
    --amp-radius-full: 9999px;
    --amp-shadow-0: none;
    --amp-shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --amp-shadow-2: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --amp-shadow-3: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --amp-shadow-4: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --amp-shadow-5: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --amp-shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.04);
    --amp-shadow-md: 0 2px 8px rgba(28, 25, 23, 0.06);
    --amp-shadow-lg: 0 8px 24px rgba(28, 25, 23, 0.08);
    --amp-shadow-sm-dark: 0 1px 3px rgba(0, 0, 0, 0.2);
    --amp-shadow-md-dark: 0 2px 8px rgba(0, 0, 0, 0.3);
    --amp-shadow-lg-dark: 0 8px 24px rgba(0, 0, 0, 0.4);
    --amp-shadow-accent-sm: 0 1px 4px 0 rgba(101, 49, 255, 0.15);
    --amp-shadow-accent-md: 0 4px 12px -2px rgba(101, 49, 255, 0.25);
    --amp-shadow-accent-lg: 0 10px 25px -4px rgba(101, 49, 255, 0.35);
    --amp-shadow-ring-accent: 0 0 0 2px var(--amp-semantic-border-accent);
    --amp-shadow-composer: 0 -4px 12px -4px rgba(28, 25, 23, 0.08);
    --amp-shadow-device: 0 12px 32px -8px rgba(28, 25, 23, 0.18), 0 4px 12px -4px rgba(28, 25, 23, 0.10);
    --amp-spacing-1: 4px;
    --amp-spacing-2: 8px;
    --amp-spacing-3: 12px;
    --amp-spacing-4: 16px;
    --amp-spacing-5: 20px;
    --amp-spacing-6: 24px;
    --amp-spacing-8: 32px;
    --amp-spacing-10: 40px;
    --amp-spacing-12: 48px;
    --amp-spacing-16: 64px;
    --amp-spacing-20: 80px;
    --amp-spacing-24: 96px;
    --amp-font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --amp-font-family-mono: 'JetBrains Mono', 'SF Mono', Monaco, Menlo, monospace;
    --amp-font-weight-light: 300;
    --amp-font-weight-regular: 400;
    --amp-font-weight-medium: 500;
    --amp-font-weight-semibold: 600;
    --amp-font-weight-bold: 700;
    --amp-font-size-display: 34px;
    --amp-font-size-h-lg: 24px;
    --amp-font-size-h-md: 18px;
    --amp-font-size-h-sm: 15px;
    --amp-font-size-body: 14px;
    --amp-font-size-body-sm: 12px;
    --amp-font-size-mono: 13px;
    --amp-font-lineHeight-tight: 1.2;
    --amp-font-lineHeight-normal: 1.5;
    --amp-font-lineHeight-relaxed: 1.6;
    --amp-z-index-base: 0;
    --amp-z-index-dropdown: 1000;
    --amp-z-index-sticky: 1020;
    --amp-z-index-fixed: 1030;
    --amp-z-index-modal-backdrop: 1040;
    --amp-z-index-modal: 1050;
    --amp-z-index-popover: 1060;
    --amp-z-index-tooltip: 1070;
    --amp-z-index-toast: 1080;
    --amp-semantic-accent: #A855F7;
    --amp-semantic-accent-hover: #C084FC;
    --amp-semantic-accent-light: rgba(168, 85, 247, 0.12);
    --amp-semantic-accent-subtle: rgba(168, 85, 247, 0.06);
    --amp-semantic-bg-primary: #1C1917;
    --amp-semantic-bg-surface: #292524;
    --amp-semantic-bg-raised: #44403C;
    --amp-semantic-bg-sunken: #0C0A09;
    --amp-semantic-bg-overlay: rgba(0, 0, 0, 0.6);
    --amp-semantic-text-primary: #E7E5E4;
    --amp-semantic-text-secondary: #A8A29E;
    --amp-semantic-text-muted: #78716C;
    --amp-semantic-text-disabled: #57534E;
    --amp-semantic-text-inverse: #1C1917;
    --amp-semantic-text-accent: #C084FC;
    --amp-semantic-border-default: #44403C;
    --amp-semantic-border-strong: #57534E;
    --amp-semantic-border-subtle: rgba(255, 255, 255, 0.06);
    --amp-semantic-border-accent: rgba(168, 85, 247, 0.3);
    --amp-semantic-border-focus: #A855F7;
    --amp-semantic-status-success: #10B981;
    --amp-semantic-status-success-bg: rgba(16, 185, 129, 0.12);
    --amp-semantic-status-warning: #F59E0B;
    --amp-semantic-status-warning-bg: rgba(245, 158, 11, 0.12);
    --amp-semantic-status-error: #EF4444;
    --amp-semantic-status-error-bg: rgba(239, 68, 68, 0.12);
    --amp-semantic-status-info: #3B82F6;
    --amp-semantic-status-info-bg: rgba(59, 130, 246, 0.12);
    --amp-semantic-color-info-soft: rgba(59, 130, 246, 0.12);
  }
}
/* Auto-generated by build-tokens.js — do not edit */
:root {
  --amp-hexcoded-breakpoint-sm: 640px;
  --amp-hexcoded-breakpoint-md: 768px;
  --amp-hexcoded-breakpoint-lg: 1024px;
  --amp-hexcoded-breakpoint-xl: 1280px;
  --amp-hexcoded-breakpoint-2xl: 1536px;
  --amp-hexcoded-color-violet-50: #FAF5FF;
  --amp-hexcoded-color-violet-100: #F3E8FF;
  --amp-hexcoded-color-violet-200: #E9D5FF;
  --amp-hexcoded-color-violet-300: #D8B4FE;
  --amp-hexcoded-color-violet-400: #C084FC;
  --amp-hexcoded-color-violet-500: #A855F7;
  --amp-hexcoded-color-violet-600: #7C3AED;
  --amp-hexcoded-color-violet-700: #6D28D9;
  --amp-hexcoded-color-violet-800: #5B21B6;
  --amp-hexcoded-color-violet-900: #4C1D95;
  --amp-hexcoded-color-stone-50: #FAFAF9;
  --amp-hexcoded-color-stone-100: #F5F5F4;
  --amp-hexcoded-color-stone-200: #E7E5E4;
  --amp-hexcoded-color-stone-300: #D6D3D1;
  --amp-hexcoded-color-stone-400: #A8A29E;
  --amp-hexcoded-color-stone-500: #78716C;
  --amp-hexcoded-color-stone-600: #57534E;
  --amp-hexcoded-color-stone-700: #44403C;
  --amp-hexcoded-color-stone-800: #292524;
  --amp-hexcoded-color-stone-900: #1C1917;
  --amp-hexcoded-color-stone-950: #0C0A09;
  --amp-hexcoded-color-red-50: #FEF2F2;
  --amp-hexcoded-color-red-100: #FEE2E2;
  --amp-hexcoded-color-red-500: #EF4444;
  --amp-hexcoded-color-red-600: #DC2626;
  --amp-hexcoded-color-red-700: #B91C1C;
  --amp-hexcoded-color-green-50: #ECFDF5;
  --amp-hexcoded-color-green-100: #D1FAE5;
  --amp-hexcoded-color-green-500: #10B981;
  --amp-hexcoded-color-green-600: #059669;
  --amp-hexcoded-color-green-700: #047857;
  --amp-hexcoded-color-amber-50: #FFFBEB;
  --amp-hexcoded-color-amber-100: #FEF3C7;
  --amp-hexcoded-color-amber-500: #F59E0B;
  --amp-hexcoded-color-amber-600: #D97706;
  --amp-hexcoded-color-amber-700: #B45309;
  --amp-hexcoded-color-blue-50: #EFF6FF;
  --amp-hexcoded-color-blue-100: #DBEAFE;
  --amp-hexcoded-color-blue-500: #3B82F6;
  --amp-hexcoded-color-blue-600: #2563EB;
  --amp-hexcoded-color-blue-700: #1D4ED8;
  --amp-hexcoded-color-rose-500: #F43F5E;
  --amp-hexcoded-color-rose-600: #E11D48;
  --amp-hexcoded-color-white: #FFFFFF;
  --amp-hexcoded-color-black: #000000;
  --amp-hexcoded-color-transparent: transparent;
  --amp-hexcoded-motion-duration-instant: 60ms;
  --amp-hexcoded-motion-duration-fast: 150ms;
  --amp-hexcoded-motion-duration-normal: 250ms;
  --amp-hexcoded-motion-duration-slow: 400ms;
  --amp-hexcoded-motion-duration-lazy: 700ms;
  --amp-hexcoded-motion-duration-slower: 600ms;
  --amp-hexcoded-motion-stagger-1: 50ms;
  --amp-hexcoded-motion-stagger-2: 100ms;
  --amp-hexcoded-motion-stagger-3: 200ms;
  --amp-hexcoded-motion-stagger-delay: 50ms;
  --amp-hexcoded-motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --amp-hexcoded-motion-d-fast: 120ms;
  --amp-hexcoded-motion-d-base: 200ms;
  --amp-hexcoded-motion-d-slow: 320ms;
  --amp-hexcoded-opacity-disabled: 0.5;
  --amp-hexcoded-opacity-hover: 0.04;
  --amp-hexcoded-opacity-pressed: 0.08;
  --amp-hexcoded-opacity-overlay: 0.5;
  --amp-hexcoded-opacity-status-bg: 0.08;
  --amp-hexcoded-radius-none: 0px;
  --amp-hexcoded-radius-sm: 4px;
  --amp-hexcoded-radius-md: 8px;
  --amp-hexcoded-radius-lg: 12px;
  --amp-hexcoded-radius-xl: 16px;
  --amp-hexcoded-radius-2xl: 24px;
  --amp-hexcoded-radius-full: 9999px;
  --amp-hexcoded-shadow-0: none;
  --amp-hexcoded-shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --amp-hexcoded-shadow-2: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --amp-hexcoded-shadow-3: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --amp-hexcoded-shadow-4: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --amp-hexcoded-shadow-5: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --amp-hexcoded-shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.04);
  --amp-hexcoded-shadow-md: 0 2px 8px rgba(28, 25, 23, 0.06);
  --amp-hexcoded-shadow-lg: 0 8px 24px rgba(28, 25, 23, 0.08);
  --amp-hexcoded-shadow-sm-dark: 0 1px 3px rgba(0, 0, 0, 0.2);
  --amp-hexcoded-shadow-md-dark: 0 2px 8px rgba(0, 0, 0, 0.3);
  --amp-hexcoded-shadow-lg-dark: 0 8px 24px rgba(0, 0, 0, 0.4);
  --amp-hexcoded-shadow-accent-sm: 0 1px 4px 0 rgba(101, 49, 255, 0.15);
  --amp-hexcoded-shadow-accent-md: 0 4px 12px -2px rgba(101, 49, 255, 0.25);
  --amp-hexcoded-shadow-accent-lg: 0 10px 25px -4px rgba(101, 49, 255, 0.35);
  --amp-hexcoded-shadow-ring-accent: 0 0 0 2px var(--amp-semantic-border-accent);
  --amp-hexcoded-shadow-composer: 0 -4px 12px -4px rgba(28, 25, 23, 0.08);
  --amp-hexcoded-shadow-device: 0 12px 32px -8px rgba(28, 25, 23, 0.18), 0 4px 12px -4px rgba(28, 25, 23, 0.10);
  --amp-hexcoded-spacing-1: 4px;
  --amp-hexcoded-spacing-2: 8px;
  --amp-hexcoded-spacing-3: 12px;
  --amp-hexcoded-spacing-4: 16px;
  --amp-hexcoded-spacing-5: 20px;
  --amp-hexcoded-spacing-6: 24px;
  --amp-hexcoded-spacing-8: 32px;
  --amp-hexcoded-spacing-10: 40px;
  --amp-hexcoded-spacing-12: 48px;
  --amp-hexcoded-spacing-16: 64px;
  --amp-hexcoded-spacing-20: 80px;
  --amp-hexcoded-spacing-24: 96px;
  --amp-hexcoded-font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --amp-hexcoded-font-family-mono: 'JetBrains Mono', 'SF Mono', Monaco, Menlo, monospace;
  --amp-hexcoded-font-weight-light: 300;
  --amp-hexcoded-font-weight-regular: 400;
  --amp-hexcoded-font-weight-medium: 500;
  --amp-hexcoded-font-weight-semibold: 600;
  --amp-hexcoded-font-weight-bold: 700;
  --amp-hexcoded-font-size-display: 34px;
  --amp-hexcoded-font-size-h-lg: 24px;
  --amp-hexcoded-font-size-h-md: 18px;
  --amp-hexcoded-font-size-h-sm: 15px;
  --amp-hexcoded-font-size-body: 14px;
  --amp-hexcoded-font-size-body-sm: 12px;
  --amp-hexcoded-font-size-mono: 13px;
  --amp-hexcoded-font-lineHeight-tight: 1.2;
  --amp-hexcoded-font-lineHeight-normal: 1.5;
  --amp-hexcoded-font-lineHeight-relaxed: 1.6;
  --amp-hexcoded-font-display: 'Outfit', sans-serif;
  --amp-hexcoded-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --amp-hexcoded-font-mono: 'JetBrains Mono', SFMono-Regular, monospace;
  --amp-hexcoded-z-index-base: 0;
  --amp-hexcoded-z-index-dropdown: 1000;
  --amp-hexcoded-z-index-sticky: 1020;
  --amp-hexcoded-z-index-fixed: 1030;
  --amp-hexcoded-z-index-modal-backdrop: 1040;
  --amp-hexcoded-z-index-modal: 1050;
  --amp-hexcoded-z-index-popover: 1060;
  --amp-hexcoded-z-index-tooltip: 1070;
  --amp-hexcoded-z-index-toast: 1080;
  --amp-hexcoded-semantic-accent: #7C3AED;
  --amp-hexcoded-semantic-accent-hover: #6D28D9;
  --amp-hexcoded-semantic-accent-light: #F3E8FF;
  --amp-hexcoded-semantic-accent-subtle: #FAF5FF;
  --amp-hexcoded-semantic-bg-primary: #FAFAF9;
  --amp-hexcoded-semantic-bg-surface: #FFFFFF;
  --amp-hexcoded-semantic-bg-raised: #FFFFFF;
  --amp-hexcoded-semantic-bg-sunken: #F5F5F4;
  --amp-hexcoded-semantic-bg-overlay: rgba(28, 25, 23, 0.5);
  --amp-hexcoded-semantic-text-primary: #1C1917;
  --amp-hexcoded-semantic-text-secondary: #57534E;
  --amp-hexcoded-semantic-text-muted: #78716C;
  --amp-hexcoded-semantic-text-disabled: #A8A29E;
  --amp-hexcoded-semantic-text-inverse: #FFFFFF;
  --amp-hexcoded-semantic-text-accent: #7C3AED;
  --amp-hexcoded-semantic-border-default: #E7E5E4;
  --amp-hexcoded-semantic-border-strong: #D6D3D1;
  --amp-hexcoded-semantic-border-subtle: #F5F5F4;
  --amp-hexcoded-semantic-border-accent: #E9D5FF;
  --amp-hexcoded-semantic-border-focus: #7C3AED;
  --amp-hexcoded-semantic-status-success: #059669;
  --amp-hexcoded-semantic-status-success-bg: rgba(5, 150, 105, 0.08);
  --amp-hexcoded-semantic-status-warning: #D97706;
  --amp-hexcoded-semantic-status-warning-bg: rgba(217, 119, 6, 0.08);
  --amp-hexcoded-semantic-status-error: #DC2626;
  --amp-hexcoded-semantic-status-error-bg: rgba(220, 38, 38, 0.08);
  --amp-hexcoded-semantic-status-info: #2563EB;
  --amp-hexcoded-semantic-status-info-bg: rgba(37, 99, 235, 0.08);
  --amp-hexcoded-semantic-color-info-soft: rgba(37, 99, 235, 0.08);
  --amp-hexcoded-theme-color-bg: #FAFAFA;
  --amp-hexcoded-theme-color-bg-elev: #FFFFFF;
  --amp-hexcoded-theme-color-bg-soft: #F5F5F7;
  --amp-hexcoded-theme-color-accent: #22C55E;
  --amp-hexcoded-theme-color-accent-deep: #16A34A;
  --amp-hexcoded-theme-color-accent-light: #86EFAC;
  --amp-hexcoded-theme-color-accent-whisper: #DCFCE7;
  --amp-hexcoded-theme-color-text-primary: #0B0B0F;
  --amp-hexcoded-theme-color-text-secondary: #3B3B42;
  --amp-hexcoded-theme-color-text-tertiary: #86868B;
  --amp-hexcoded-theme-color-border: #E5E5EA;
  --amp-hexcoded-status-success: #22C55E;
  --amp-hexcoded-status-warning: #FBBF24;
  --amp-hexcoded-status-danger: #EF4444;
  --amp-hexcoded-status-info: #0EA5E9;
  --amp-hexcoded-weight-display: 900;
  --amp-hexcoded-weight-body-default: 400;
  --amp-hexcoded-weight-body-emphasis: 500;
  --amp-hexcoded-letter-spacing-tight: -0.025em;
  --amp-hexcoded-layout-max-width: 1400px;
}

/* ──────────────────────────────────────────────────────────────────
   Product-agnostic semantic aliases — resolve to active product theme.
   Consumed by Canvas v2 primitives in @one-impression/ui via Tailwind
   arbitrary classes (e.g. bg-[var(--amp-semantic-bg-accent-subtle)]).
   Dark mode cascades through var() indirection automatically.
   ────────────────────────────────────────────────────────────────── */
:root {
  --amp-semantic-bg-surface: var(--amp-hexcoded-semantic-bg-surface);
  --amp-semantic-bg-base: var(--amp-hexcoded-semantic-bg-primary);
  --amp-semantic-bg-canvas: var(--amp-hexcoded-semantic-bg-sunken);
  --amp-semantic-bg-subtle: var(--amp-hexcoded-semantic-bg-sunken);
  --amp-semantic-bg-sunken: var(--amp-hexcoded-semantic-bg-sunken);
  --amp-semantic-bg-raised: var(--amp-hexcoded-semantic-bg-raised);
  --amp-semantic-bg-accent: var(--amp-hexcoded-semantic-accent);
  --amp-semantic-bg-accent-subtle: var(--amp-hexcoded-semantic-accent-subtle);
  --amp-semantic-bg-success-subtle: var(--amp-hexcoded-semantic-status-success-bg);
  --amp-semantic-bg-warning-subtle: var(--amp-hexcoded-semantic-status-warning-bg);
  --amp-semantic-bg-error-subtle: var(--amp-hexcoded-semantic-status-error-bg);
  --amp-semantic-bg-info-subtle: var(--amp-hexcoded-semantic-status-info-bg);
  --amp-semantic-text-default: var(--amp-hexcoded-semantic-text-primary);
  --amp-semantic-text-primary: var(--amp-hexcoded-semantic-text-primary);
  --amp-semantic-text-secondary: var(--amp-hexcoded-semantic-text-secondary);
  --amp-semantic-text-tertiary: var(--amp-hexcoded-semantic-text-muted);
  --amp-semantic-text-muted: var(--amp-hexcoded-semantic-text-muted);
  --amp-semantic-text-inverse: var(--amp-hexcoded-semantic-text-inverse);
  --amp-semantic-text-on-accent: var(--amp-hexcoded-semantic-text-inverse);
  --amp-semantic-text-accent: var(--amp-hexcoded-semantic-text-accent);
  --amp-semantic-status-success: var(--amp-hexcoded-semantic-status-success);
  --amp-semantic-status-warning: var(--amp-hexcoded-semantic-status-warning);
  --amp-semantic-status-error: var(--amp-hexcoded-semantic-status-error);
  --amp-semantic-status-info: var(--amp-hexcoded-semantic-status-info);
  --amp-semantic-status-error-bg: var(--amp-hexcoded-semantic-status-error-bg);
  --amp-semantic-status-warning-bg: var(--amp-hexcoded-semantic-status-warning-bg);
  --amp-semantic-status-success-bg: var(--amp-hexcoded-semantic-status-success-bg);
  --amp-semantic-status-info-bg: var(--amp-hexcoded-semantic-status-info-bg);
  --amp-semantic-border-default: var(--amp-hexcoded-semantic-border-default);
  --amp-semantic-border-strong: var(--amp-hexcoded-semantic-border-strong);
  --amp-semantic-border-subtle: var(--amp-hexcoded-semantic-border-subtle);
  --amp-semantic-border-accent: var(--amp-hexcoded-semantic-border-accent);
  --amp-semantic-border-success: var(--amp-hexcoded-semantic-status-success);
  --amp-semantic-border-error: var(--amp-hexcoded-semantic-status-error);
  --amp-semantic-border-warning: var(--amp-hexcoded-semantic-status-warning);
  --amp-semantic-border-info: var(--amp-hexcoded-semantic-status-info);
  --amp-semantic-border-focus: var(--amp-hexcoded-semantic-border-focus);
  --amp-semantic-accent: var(--amp-hexcoded-semantic-accent);
  --amp-semantic-accent-light: var(--amp-hexcoded-semantic-accent-light);
  --amp-semantic-accent-primary: var(--amp-hexcoded-semantic-accent);
  --amp-semantic-accent-soft: var(--amp-hexcoded-semantic-accent-light);
}

/* Dark mode overrides */
[data-theme="dark"] {
  --amp-hexcoded-breakpoint-sm: 640px;
  --amp-hexcoded-breakpoint-md: 768px;
  --amp-hexcoded-breakpoint-lg: 1024px;
  --amp-hexcoded-breakpoint-xl: 1280px;
  --amp-hexcoded-breakpoint-2xl: 1536px;
  --amp-hexcoded-color-violet-50: #FAF5FF;
  --amp-hexcoded-color-violet-100: #F3E8FF;
  --amp-hexcoded-color-violet-200: #E9D5FF;
  --amp-hexcoded-color-violet-300: #D8B4FE;
  --amp-hexcoded-color-violet-400: #C084FC;
  --amp-hexcoded-color-violet-500: #A855F7;
  --amp-hexcoded-color-violet-600: #7C3AED;
  --amp-hexcoded-color-violet-700: #6D28D9;
  --amp-hexcoded-color-violet-800: #5B21B6;
  --amp-hexcoded-color-violet-900: #4C1D95;
  --amp-hexcoded-color-stone-50: #FAFAF9;
  --amp-hexcoded-color-stone-100: #F5F5F4;
  --amp-hexcoded-color-stone-200: #E7E5E4;
  --amp-hexcoded-color-stone-300: #D6D3D1;
  --amp-hexcoded-color-stone-400: #A8A29E;
  --amp-hexcoded-color-stone-500: #78716C;
  --amp-hexcoded-color-stone-600: #57534E;
  --amp-hexcoded-color-stone-700: #44403C;
  --amp-hexcoded-color-stone-800: #292524;
  --amp-hexcoded-color-stone-900: #1C1917;
  --amp-hexcoded-color-stone-950: #0C0A09;
  --amp-hexcoded-color-red-50: #FEF2F2;
  --amp-hexcoded-color-red-100: #FEE2E2;
  --amp-hexcoded-color-red-500: #EF4444;
  --amp-hexcoded-color-red-600: #DC2626;
  --amp-hexcoded-color-red-700: #B91C1C;
  --amp-hexcoded-color-green-50: #ECFDF5;
  --amp-hexcoded-color-green-100: #D1FAE5;
  --amp-hexcoded-color-green-500: #10B981;
  --amp-hexcoded-color-green-600: #059669;
  --amp-hexcoded-color-green-700: #047857;
  --amp-hexcoded-color-amber-50: #FFFBEB;
  --amp-hexcoded-color-amber-100: #FEF3C7;
  --amp-hexcoded-color-amber-500: #F59E0B;
  --amp-hexcoded-color-amber-600: #D97706;
  --amp-hexcoded-color-amber-700: #B45309;
  --amp-hexcoded-color-blue-50: #EFF6FF;
  --amp-hexcoded-color-blue-100: #DBEAFE;
  --amp-hexcoded-color-blue-500: #3B82F6;
  --amp-hexcoded-color-blue-600: #2563EB;
  --amp-hexcoded-color-blue-700: #1D4ED8;
  --amp-hexcoded-color-rose-500: #F43F5E;
  --amp-hexcoded-color-rose-600: #E11D48;
  --amp-hexcoded-color-white: #FFFFFF;
  --amp-hexcoded-color-black: #000000;
  --amp-hexcoded-color-transparent: transparent;
  --amp-hexcoded-motion-duration-instant: 60ms;
  --amp-hexcoded-motion-duration-fast: 150ms;
  --amp-hexcoded-motion-duration-normal: 250ms;
  --amp-hexcoded-motion-duration-slow: 400ms;
  --amp-hexcoded-motion-duration-lazy: 700ms;
  --amp-hexcoded-motion-duration-slower: 600ms;
  --amp-hexcoded-motion-stagger-1: 50ms;
  --amp-hexcoded-motion-stagger-2: 100ms;
  --amp-hexcoded-motion-stagger-3: 200ms;
  --amp-hexcoded-motion-stagger-delay: 50ms;
  --amp-hexcoded-opacity-disabled: 0.5;
  --amp-hexcoded-opacity-hover: 0.04;
  --amp-hexcoded-opacity-pressed: 0.08;
  --amp-hexcoded-opacity-overlay: 0.5;
  --amp-hexcoded-opacity-status-bg: 0.08;
  --amp-hexcoded-radius-none: 0px;
  --amp-hexcoded-radius-sm: 4px;
  --amp-hexcoded-radius-md: 8px;
  --amp-hexcoded-radius-lg: 12px;
  --amp-hexcoded-radius-xl: 16px;
  --amp-hexcoded-radius-2xl: 24px;
  --amp-hexcoded-radius-full: 9999px;
  --amp-hexcoded-shadow-0: none;
  --amp-hexcoded-shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --amp-hexcoded-shadow-2: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --amp-hexcoded-shadow-3: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --amp-hexcoded-shadow-4: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --amp-hexcoded-shadow-5: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --amp-hexcoded-shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.04);
  --amp-hexcoded-shadow-md: 0 2px 8px rgba(28, 25, 23, 0.06);
  --amp-hexcoded-shadow-lg: 0 8px 24px rgba(28, 25, 23, 0.08);
  --amp-hexcoded-shadow-sm-dark: 0 1px 3px rgba(0, 0, 0, 0.2);
  --amp-hexcoded-shadow-md-dark: 0 2px 8px rgba(0, 0, 0, 0.3);
  --amp-hexcoded-shadow-lg-dark: 0 8px 24px rgba(0, 0, 0, 0.4);
  --amp-hexcoded-shadow-accent-sm: 0 1px 4px 0 rgba(101, 49, 255, 0.15);
  --amp-hexcoded-shadow-accent-md: 0 4px 12px -2px rgba(101, 49, 255, 0.25);
  --amp-hexcoded-shadow-accent-lg: 0 10px 25px -4px rgba(101, 49, 255, 0.35);
  --amp-hexcoded-shadow-ring-accent: 0 0 0 2px var(--amp-semantic-border-accent);
  --amp-hexcoded-shadow-composer: 0 -4px 12px -4px rgba(28, 25, 23, 0.08);
  --amp-hexcoded-shadow-device: 0 12px 32px -8px rgba(28, 25, 23, 0.18), 0 4px 12px -4px rgba(28, 25, 23, 0.10);
  --amp-hexcoded-spacing-1: 4px;
  --amp-hexcoded-spacing-2: 8px;
  --amp-hexcoded-spacing-3: 12px;
  --amp-hexcoded-spacing-4: 16px;
  --amp-hexcoded-spacing-5: 20px;
  --amp-hexcoded-spacing-6: 24px;
  --amp-hexcoded-spacing-8: 32px;
  --amp-hexcoded-spacing-10: 40px;
  --amp-hexcoded-spacing-12: 48px;
  --amp-hexcoded-spacing-16: 64px;
  --amp-hexcoded-spacing-20: 80px;
  --amp-hexcoded-spacing-24: 96px;
  --amp-hexcoded-font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --amp-hexcoded-font-family-mono: 'JetBrains Mono', 'SF Mono', Monaco, Menlo, monospace;
  --amp-hexcoded-font-weight-light: 300;
  --amp-hexcoded-font-weight-regular: 400;
  --amp-hexcoded-font-weight-medium: 500;
  --amp-hexcoded-font-weight-semibold: 600;
  --amp-hexcoded-font-weight-bold: 700;
  --amp-hexcoded-font-size-display: 34px;
  --amp-hexcoded-font-size-h-lg: 24px;
  --amp-hexcoded-font-size-h-md: 18px;
  --amp-hexcoded-font-size-h-sm: 15px;
  --amp-hexcoded-font-size-body: 14px;
  --amp-hexcoded-font-size-body-sm: 12px;
  --amp-hexcoded-font-size-mono: 13px;
  --amp-hexcoded-font-lineHeight-tight: 1.2;
  --amp-hexcoded-font-lineHeight-normal: 1.5;
  --amp-hexcoded-font-lineHeight-relaxed: 1.6;
  --amp-hexcoded-z-index-base: 0;
  --amp-hexcoded-z-index-dropdown: 1000;
  --amp-hexcoded-z-index-sticky: 1020;
  --amp-hexcoded-z-index-fixed: 1030;
  --amp-hexcoded-z-index-modal-backdrop: 1040;
  --amp-hexcoded-z-index-modal: 1050;
  --amp-hexcoded-z-index-popover: 1060;
  --amp-hexcoded-z-index-tooltip: 1070;
  --amp-hexcoded-z-index-toast: 1080;
  --amp-hexcoded-semantic-accent: #A855F7;
  --amp-hexcoded-semantic-accent-hover: #C084FC;
  --amp-hexcoded-semantic-accent-light: rgba(168, 85, 247, 0.12);
  --amp-hexcoded-semantic-accent-subtle: rgba(168, 85, 247, 0.06);
  --amp-hexcoded-semantic-bg-primary: #1C1917;
  --amp-hexcoded-semantic-bg-surface: #292524;
  --amp-hexcoded-semantic-bg-raised: #44403C;
  --amp-hexcoded-semantic-bg-sunken: #0C0A09;
  --amp-hexcoded-semantic-bg-overlay: rgba(0, 0, 0, 0.6);
  --amp-hexcoded-semantic-text-primary: #E7E5E4;
  --amp-hexcoded-semantic-text-secondary: #A8A29E;
  --amp-hexcoded-semantic-text-muted: #78716C;
  --amp-hexcoded-semantic-text-disabled: #57534E;
  --amp-hexcoded-semantic-text-inverse: #1C1917;
  --amp-hexcoded-semantic-text-accent: #C084FC;
  --amp-hexcoded-semantic-border-default: #44403C;
  --amp-hexcoded-semantic-border-strong: #57534E;
  --amp-hexcoded-semantic-border-subtle: rgba(255, 255, 255, 0.06);
  --amp-hexcoded-semantic-border-accent: rgba(168, 85, 247, 0.3);
  --amp-hexcoded-semantic-border-focus: #A855F7;
  --amp-hexcoded-semantic-status-success: #10B981;
  --amp-hexcoded-semantic-status-success-bg: rgba(16, 185, 129, 0.12);
  --amp-hexcoded-semantic-status-warning: #F59E0B;
  --amp-hexcoded-semantic-status-warning-bg: rgba(245, 158, 11, 0.12);
  --amp-hexcoded-semantic-status-error: #EF4444;
  --amp-hexcoded-semantic-status-error-bg: rgba(239, 68, 68, 0.12);
  --amp-hexcoded-semantic-status-info: #3B82F6;
  --amp-hexcoded-semantic-status-info-bg: rgba(59, 130, 246, 0.12);
  --amp-hexcoded-semantic-color-info-soft: rgba(59, 130, 246, 0.12);
  --amp-hexcoded-theme-color-bg: #0B0B0F;
  --amp-hexcoded-theme-color-bg-elev: #1C1C22;
  --amp-hexcoded-theme-color-bg-soft: #15151B;
  --amp-hexcoded-theme-color-accent: #22C55E;
  --amp-hexcoded-theme-color-accent-deep: #16A34A;
  --amp-hexcoded-theme-color-accent-light: #86EFAC;
  --amp-hexcoded-theme-color-accent-whisper: #DCFCE7;
  --amp-hexcoded-theme-color-text-primary: #FAFAFA;
  --amp-hexcoded-theme-color-text-secondary: #C8C8CD;
  --amp-hexcoded-theme-color-text-tertiary: #86868B;
  --amp-hexcoded-theme-color-border: #2C2C30;
  --amp-hexcoded-status-success: #22C55E;
  --amp-hexcoded-status-warning: #FBBF24;
  --amp-hexcoded-status-danger: #EF4444;
  --amp-hexcoded-status-info: #0EA5E9;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --amp-hexcoded-breakpoint-sm: 640px;
    --amp-hexcoded-breakpoint-md: 768px;
    --amp-hexcoded-breakpoint-lg: 1024px;
    --amp-hexcoded-breakpoint-xl: 1280px;
    --amp-hexcoded-breakpoint-2xl: 1536px;
    --amp-hexcoded-color-violet-50: #FAF5FF;
    --amp-hexcoded-color-violet-100: #F3E8FF;
    --amp-hexcoded-color-violet-200: #E9D5FF;
    --amp-hexcoded-color-violet-300: #D8B4FE;
    --amp-hexcoded-color-violet-400: #C084FC;
    --amp-hexcoded-color-violet-500: #A855F7;
    --amp-hexcoded-color-violet-600: #7C3AED;
    --amp-hexcoded-color-violet-700: #6D28D9;
    --amp-hexcoded-color-violet-800: #5B21B6;
    --amp-hexcoded-color-violet-900: #4C1D95;
    --amp-hexcoded-color-stone-50: #FAFAF9;
    --amp-hexcoded-color-stone-100: #F5F5F4;
    --amp-hexcoded-color-stone-200: #E7E5E4;
    --amp-hexcoded-color-stone-300: #D6D3D1;
    --amp-hexcoded-color-stone-400: #A8A29E;
    --amp-hexcoded-color-stone-500: #78716C;
    --amp-hexcoded-color-stone-600: #57534E;
    --amp-hexcoded-color-stone-700: #44403C;
    --amp-hexcoded-color-stone-800: #292524;
    --amp-hexcoded-color-stone-900: #1C1917;
    --amp-hexcoded-color-stone-950: #0C0A09;
    --amp-hexcoded-color-red-50: #FEF2F2;
    --amp-hexcoded-color-red-100: #FEE2E2;
    --amp-hexcoded-color-red-500: #EF4444;
    --amp-hexcoded-color-red-600: #DC2626;
    --amp-hexcoded-color-red-700: #B91C1C;
    --amp-hexcoded-color-green-50: #ECFDF5;
    --amp-hexcoded-color-green-100: #D1FAE5;
    --amp-hexcoded-color-green-500: #10B981;
    --amp-hexcoded-color-green-600: #059669;
    --amp-hexcoded-color-green-700: #047857;
    --amp-hexcoded-color-amber-50: #FFFBEB;
    --amp-hexcoded-color-amber-100: #FEF3C7;
    --amp-hexcoded-color-amber-500: #F59E0B;
    --amp-hexcoded-color-amber-600: #D97706;
    --amp-hexcoded-color-amber-700: #B45309;
    --amp-hexcoded-color-blue-50: #EFF6FF;
    --amp-hexcoded-color-blue-100: #DBEAFE;
    --amp-hexcoded-color-blue-500: #3B82F6;
    --amp-hexcoded-color-blue-600: #2563EB;
    --amp-hexcoded-color-blue-700: #1D4ED8;
    --amp-hexcoded-color-rose-500: #F43F5E;
    --amp-hexcoded-color-rose-600: #E11D48;
    --amp-hexcoded-color-white: #FFFFFF;
    --amp-hexcoded-color-black: #000000;
    --amp-hexcoded-color-transparent: transparent;
    --amp-hexcoded-motion-duration-instant: 60ms;
    --amp-hexcoded-motion-duration-fast: 150ms;
    --amp-hexcoded-motion-duration-normal: 250ms;
    --amp-hexcoded-motion-duration-slow: 400ms;
    --amp-hexcoded-motion-duration-lazy: 700ms;
    --amp-hexcoded-motion-duration-slower: 600ms;
    --amp-hexcoded-motion-stagger-1: 50ms;
    --amp-hexcoded-motion-stagger-2: 100ms;
    --amp-hexcoded-motion-stagger-3: 200ms;
    --amp-hexcoded-motion-stagger-delay: 50ms;
    --amp-hexcoded-opacity-disabled: 0.5;
    --amp-hexcoded-opacity-hover: 0.04;
    --amp-hexcoded-opacity-pressed: 0.08;
    --amp-hexcoded-opacity-overlay: 0.5;
    --amp-hexcoded-opacity-status-bg: 0.08;
    --amp-hexcoded-radius-none: 0px;
    --amp-hexcoded-radius-sm: 4px;
    --amp-hexcoded-radius-md: 8px;
    --amp-hexcoded-radius-lg: 12px;
    --amp-hexcoded-radius-xl: 16px;
    --amp-hexcoded-radius-2xl: 24px;
    --amp-hexcoded-radius-full: 9999px;
    --amp-hexcoded-shadow-0: none;
    --amp-hexcoded-shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --amp-hexcoded-shadow-2: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --amp-hexcoded-shadow-3: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --amp-hexcoded-shadow-4: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --amp-hexcoded-shadow-5: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --amp-hexcoded-shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.04);
    --amp-hexcoded-shadow-md: 0 2px 8px rgba(28, 25, 23, 0.06);
    --amp-hexcoded-shadow-lg: 0 8px 24px rgba(28, 25, 23, 0.08);
    --amp-hexcoded-shadow-sm-dark: 0 1px 3px rgba(0, 0, 0, 0.2);
    --amp-hexcoded-shadow-md-dark: 0 2px 8px rgba(0, 0, 0, 0.3);
    --amp-hexcoded-shadow-lg-dark: 0 8px 24px rgba(0, 0, 0, 0.4);
    --amp-hexcoded-shadow-accent-sm: 0 1px 4px 0 rgba(101, 49, 255, 0.15);
    --amp-hexcoded-shadow-accent-md: 0 4px 12px -2px rgba(101, 49, 255, 0.25);
    --amp-hexcoded-shadow-accent-lg: 0 10px 25px -4px rgba(101, 49, 255, 0.35);
    --amp-hexcoded-shadow-ring-accent: 0 0 0 2px var(--amp-semantic-border-accent);
    --amp-hexcoded-shadow-composer: 0 -4px 12px -4px rgba(28, 25, 23, 0.08);
    --amp-hexcoded-shadow-device: 0 12px 32px -8px rgba(28, 25, 23, 0.18), 0 4px 12px -4px rgba(28, 25, 23, 0.10);
    --amp-hexcoded-spacing-1: 4px;
    --amp-hexcoded-spacing-2: 8px;
    --amp-hexcoded-spacing-3: 12px;
    --amp-hexcoded-spacing-4: 16px;
    --amp-hexcoded-spacing-5: 20px;
    --amp-hexcoded-spacing-6: 24px;
    --amp-hexcoded-spacing-8: 32px;
    --amp-hexcoded-spacing-10: 40px;
    --amp-hexcoded-spacing-12: 48px;
    --amp-hexcoded-spacing-16: 64px;
    --amp-hexcoded-spacing-20: 80px;
    --amp-hexcoded-spacing-24: 96px;
    --amp-hexcoded-font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --amp-hexcoded-font-family-mono: 'JetBrains Mono', 'SF Mono', Monaco, Menlo, monospace;
    --amp-hexcoded-font-weight-light: 300;
    --amp-hexcoded-font-weight-regular: 400;
    --amp-hexcoded-font-weight-medium: 500;
    --amp-hexcoded-font-weight-semibold: 600;
    --amp-hexcoded-font-weight-bold: 700;
    --amp-hexcoded-font-size-display: 34px;
    --amp-hexcoded-font-size-h-lg: 24px;
    --amp-hexcoded-font-size-h-md: 18px;
    --amp-hexcoded-font-size-h-sm: 15px;
    --amp-hexcoded-font-size-body: 14px;
    --amp-hexcoded-font-size-body-sm: 12px;
    --amp-hexcoded-font-size-mono: 13px;
    --amp-hexcoded-font-lineHeight-tight: 1.2;
    --amp-hexcoded-font-lineHeight-normal: 1.5;
    --amp-hexcoded-font-lineHeight-relaxed: 1.6;
    --amp-hexcoded-z-index-base: 0;
    --amp-hexcoded-z-index-dropdown: 1000;
    --amp-hexcoded-z-index-sticky: 1020;
    --amp-hexcoded-z-index-fixed: 1030;
    --amp-hexcoded-z-index-modal-backdrop: 1040;
    --amp-hexcoded-z-index-modal: 1050;
    --amp-hexcoded-z-index-popover: 1060;
    --amp-hexcoded-z-index-tooltip: 1070;
    --amp-hexcoded-z-index-toast: 1080;
    --amp-hexcoded-semantic-accent: #A855F7;
    --amp-hexcoded-semantic-accent-hover: #C084FC;
    --amp-hexcoded-semantic-accent-light: rgba(168, 85, 247, 0.12);
    --amp-hexcoded-semantic-accent-subtle: rgba(168, 85, 247, 0.06);
    --amp-hexcoded-semantic-bg-primary: #1C1917;
    --amp-hexcoded-semantic-bg-surface: #292524;
    --amp-hexcoded-semantic-bg-raised: #44403C;
    --amp-hexcoded-semantic-bg-sunken: #0C0A09;
    --amp-hexcoded-semantic-bg-overlay: rgba(0, 0, 0, 0.6);
    --amp-hexcoded-semantic-text-primary: #E7E5E4;
    --amp-hexcoded-semantic-text-secondary: #A8A29E;
    --amp-hexcoded-semantic-text-muted: #78716C;
    --amp-hexcoded-semantic-text-disabled: #57534E;
    --amp-hexcoded-semantic-text-inverse: #1C1917;
    --amp-hexcoded-semantic-text-accent: #C084FC;
    --amp-hexcoded-semantic-border-default: #44403C;
    --amp-hexcoded-semantic-border-strong: #57534E;
    --amp-hexcoded-semantic-border-subtle: rgba(255, 255, 255, 0.06);
    --amp-hexcoded-semantic-border-accent: rgba(168, 85, 247, 0.3);
    --amp-hexcoded-semantic-border-focus: #A855F7;
    --amp-hexcoded-semantic-status-success: #10B981;
    --amp-hexcoded-semantic-status-success-bg: rgba(16, 185, 129, 0.12);
    --amp-hexcoded-semantic-status-warning: #F59E0B;
    --amp-hexcoded-semantic-status-warning-bg: rgba(245, 158, 11, 0.12);
    --amp-hexcoded-semantic-status-error: #EF4444;
    --amp-hexcoded-semantic-status-error-bg: rgba(239, 68, 68, 0.12);
    --amp-hexcoded-semantic-status-info: #3B82F6;
    --amp-hexcoded-semantic-status-info-bg: rgba(59, 130, 246, 0.12);
    --amp-hexcoded-semantic-color-info-soft: rgba(59, 130, 246, 0.12);
    --amp-hexcoded-theme-color-bg: #0B0B0F;
    --amp-hexcoded-theme-color-bg-elev: #1C1C22;
    --amp-hexcoded-theme-color-bg-soft: #15151B;
    --amp-hexcoded-theme-color-accent: #22C55E;
    --amp-hexcoded-theme-color-accent-deep: #16A34A;
    --amp-hexcoded-theme-color-accent-light: #86EFAC;
    --amp-hexcoded-theme-color-accent-whisper: #DCFCE7;
    --amp-hexcoded-theme-color-text-primary: #FAFAFA;
    --amp-hexcoded-theme-color-text-secondary: #C8C8CD;
    --amp-hexcoded-theme-color-text-tertiary: #86868B;
    --amp-hexcoded-theme-color-border: #2C2C30;
    --amp-hexcoded-status-success: #22C55E;
    --amp-hexcoded-status-warning: #FBBF24;
    --amp-hexcoded-status-danger: #EF4444;
    --amp-hexcoded-status-info: #0EA5E9;
  }
}

/* Block 2: app shell + tool-stage + popups (mockup lines 1124-2901) */
/* ════════════════════════════════════════════════════════════════
   ░ DS ALIAS LAYER (the ONLY :root block) ░
   Re-skins the entire render onto the real HexCoded design system.
   Every base token (--green-*, --ink-*, --bg-*, --hairline*, --glass-*,
   --shadow-*, --r-*, --d-*, --ease-*, --font-*, --danger/--warning)
   is aliased to the closest --amp-hexcoded-* DS token via var() — NO
   hardcoded color values. The DS tokens already flip under
   [data-theme="dark"], so light + dark both cascade automatically.
   In-between ink/border steps with no clean DS equivalent are derived
   with color-mix() between two DS theme tokens that BOTH flip with the
   theme (bg-elev = light pole, text-primary = dark pole), so the ramp
   inverts correctly in dark mode.
   ════════════════════════════════════════════════════════════════ */
:root {
  /* ── Type ── */
  --font-display: var(--amp-hexcoded-font-display);
  --font-body:    var(--amp-hexcoded-font-body);
  --font-mono:    var(--amp-hexcoded-font-mono);

  /* ── Green / accent scale ── DS theme accent (#22C55E) + foundation green ramp.
     The base uses 50→800; anchor the key steps to the DS theme accent tokens,
     fill the rest from the DS green/emerald foundation ramp. */
  --green-50:  var(--amp-hexcoded-theme-color-accent-whisper);  /* #DCFCE7 */
  --green-100: var(--amp-hexcoded-color-green-100);             /* #D1FAE5 */
  --green-200: color-mix(in srgb, var(--amp-hexcoded-theme-color-accent) 28%, var(--amp-hexcoded-color-white));
  --green-300: var(--amp-hexcoded-theme-color-accent-light);    /* #86EFAC */
  --green-400: color-mix(in srgb, var(--amp-hexcoded-theme-color-accent) 72%, var(--amp-hexcoded-color-white));
  --green-500: var(--amp-hexcoded-theme-color-accent);          /* #22C55E PRIMARY */
  --green-600: var(--amp-hexcoded-theme-color-accent-deep);     /* #16A34A DEEP */
  --green-700: color-mix(in srgb, var(--amp-hexcoded-theme-color-accent-deep) 80%, var(--amp-hexcoded-color-black));
  --green-800: color-mix(in srgb, var(--amp-hexcoded-theme-color-accent-deep) 62%, var(--amp-hexcoded-color-black));

  /* ── Ink scale ──
     Poles that flip with the theme:
       LIGHT pole  = --amp-hexcoded-theme-color-bg-elev (#FFF light / #1C1C22 dark)
       DARK  pole  = --amp-hexcoded-theme-color-text-primary (#0B0B0F light / #FAFAFA dark)
     so a mix of the two inverts correctly between themes. Where the DS has a
     clean flipping equivalent we alias it directly. */
  --ink-0:    var(--amp-hexcoded-theme-color-bg-elev);          /* surface white / inverse */
  --ink-50:   var(--amp-hexcoded-theme-color-bg);               /* #FAFAFA / #0B0B0F */
  --ink-100:  var(--amp-hexcoded-theme-color-bg-soft);          /* #F5F5F7 / #15151B */
  --ink-200:  color-mix(in srgb, var(--amp-hexcoded-theme-color-bg-elev) 88%, var(--amp-hexcoded-theme-color-text-primary));
  --ink-300:  color-mix(in srgb, var(--amp-hexcoded-theme-color-bg-elev) 80%, var(--amp-hexcoded-theme-color-text-primary));
  --ink-400:  color-mix(in srgb, var(--amp-hexcoded-theme-color-bg-elev) 58%, var(--amp-hexcoded-theme-color-text-primary));
  --ink-500:  var(--amp-hexcoded-theme-color-text-tertiary);    /* #86868B both themes */
  --ink-600:  color-mix(in srgb, var(--amp-hexcoded-theme-color-text-tertiary) 60%, var(--amp-hexcoded-theme-color-text-primary));
  --ink-700:  var(--amp-hexcoded-theme-color-text-secondary);   /* #3B3B42 / #C8C8CD */
  --ink-800:  color-mix(in srgb, var(--amp-hexcoded-theme-color-text-secondary) 45%, var(--amp-hexcoded-theme-color-text-primary));
  --ink-900:  color-mix(in srgb, var(--amp-hexcoded-theme-color-text-primary) 88%, var(--amp-hexcoded-theme-color-bg-elev));
  --ink-1000: var(--amp-hexcoded-theme-color-text-primary);     /* #0B0B0F / #FAFAFA */

  /* ── Backgrounds ── */
  --bg-canvas:   var(--amp-hexcoded-theme-color-bg);            /* page */
  --bg-surface:  var(--amp-hexcoded-theme-color-bg-elev);       /* cards/inputs */
  --bg-elevated: var(--amp-hexcoded-theme-color-bg-elev);
  --bg-soft:     var(--amp-hexcoded-theme-color-bg-soft);

  /* ── Hairlines / borders ── */
  --hairline:        color-mix(in srgb, var(--amp-hexcoded-theme-color-border) 60%, transparent);
  --hairline-strong: var(--amp-hexcoded-theme-color-border);

  /* ── Glass ── derived from the elevated surface (flips with theme) ── */
  --glass-bg:        color-mix(in srgb, var(--amp-hexcoded-theme-color-bg-elev) 72%, transparent);
  --glass-bg-strong: color-mix(in srgb, var(--amp-hexcoded-theme-color-bg-elev) 88%, transparent);
  --glass-blur:      blur(20px) saturate(180%);

  /* ── Shadows ── DS foundation elevation ramp + accent glows ── */
  --shadow-xs: var(--amp-hexcoded-shadow-1);
  --shadow-sm: var(--amp-hexcoded-shadow-2);
  --shadow-md: var(--amp-hexcoded-shadow-3);
  --shadow-lg: var(--amp-hexcoded-shadow-4);
  --shadow-xl: var(--amp-hexcoded-shadow-5);
  --shadow-green:      0 12px 32px color-mix(in srgb, var(--amp-hexcoded-theme-color-accent) 24%, transparent), 0 4px 8px color-mix(in srgb, var(--amp-hexcoded-theme-color-accent) 12%, transparent);
  --shadow-green-soft: 0 8px 20px color-mix(in srgb, var(--amp-hexcoded-theme-color-accent) 14%, transparent);

  /* ── Radii ── */
  --r-xs:   var(--amp-hexcoded-radius-sm);    /* 4px */
  --r-sm:   var(--amp-hexcoded-radius-md);    /* 8px */
  --r-md:   var(--amp-hexcoded-radius-lg);    /* 12px */
  --r-lg:   var(--amp-hexcoded-radius-xl);    /* 16px — DS Card radius */
  --r-xl:   var(--amp-hexcoded-radius-2xl);   /* 24px */
  --r-pill: var(--amp-hexcoded-radius-full);

  /* ── Motion ── */
  --ease-out:   var(--amp-hexcoded-motion-ease);
  --d-fast:     var(--amp-hexcoded-motion-d-fast);
  --d-base:     var(--amp-hexcoded-motion-d-base);
  --d-slow:     var(--amp-hexcoded-motion-d-slow);
  --d-stately:  var(--amp-hexcoded-motion-duration-lazy);

  /* ── Status ── */
  --danger:  var(--amp-hexcoded-status-danger);
  --warning: var(--amp-hexcoded-status-warning);

  /* ════════════════════════════════════════════════════════════════
     ░ CANONICAL COMPONENT PRIMITIVES ░  — defined ONCE, referenced
     everywhere. Every selected tile/card/chip/row, every accent-soft
     surface, every warning treatment, every focus ring and segmented
     control reads off THESE tokens, so a change propagates uniformly
     and the per-screen copies can no longer drift apart. All values
     flip correctly between light + dark (they derive from the green
     theme accent + theme bg/text poles, never from a frozen hex).
     ════════════════════════════════════════════════════════════════ */
  /* accent-soft surface (the green-tinted "note"/"selected" fill) */
  --accent-soft:        color-mix(in srgb, var(--green-500) 9%, var(--bg-surface));
  --accent-soft-strong: color-mix(in srgb, var(--green-500) 15%, var(--bg-surface));
  --accent-border:      color-mix(in srgb, var(--green-500) 30%, var(--hairline));
  --accent-ink:         var(--green-700);
  /* accent CHIP/badge/tick fill (the small green-100 wells) — flips with theme */
  --accent-chip-bg:  var(--green-100);
  --accent-chip-ink: var(--accent-ink);
  /* selected state — used by EVERY pickable tile/card/chip/row */
  --sel-border: var(--green-500);
  --sel-ring:   0 0 0 3px color-mix(in srgb, var(--green-500) 14%, transparent);
  --sel-ring-2: 0 0 0 2px color-mix(in srgb, var(--green-500) 16%, transparent);
  --sel-bg:     var(--accent-soft);
  /* focus ring for fields / editable surfaces */
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--green-500) 14%, transparent);
  /* neutral hover surface (readable in BOTH themes — never white-on-white) */
  --hover-surface:   color-mix(in srgb, var(--ink-1000) 6%, transparent);
  --hover-surface-2: color-mix(in srgb, var(--ink-1000) 4%, transparent);
  /* warning ink + soft fill (flips: dark uses the lighter status token) */
  --warn-ink:    color-mix(in srgb, var(--warning) 78%, var(--ink-1000));
  --warn-soft:   color-mix(in srgb, var(--warning) 12%, var(--bg-surface));
  --warn-border: color-mix(in srgb, var(--warning) 32%, transparent);
  /* info ink + soft fill (used by gate notes / proof tags) */
  --info-ink:    color-mix(in srgb, var(--amp-hexcoded-status-info) 72%, var(--ink-1000));
  --info-soft:   color-mix(in srgb, var(--amp-hexcoded-status-info) 14%, var(--bg-surface));
  --info-border: color-mix(in srgb, var(--amp-hexcoded-status-info) 30%, transparent);
  /* danger soft fill */
  --danger-soft:   color-mix(in srgb, var(--danger) 9%, var(--bg-surface));
  --danger-soft-2: color-mix(in srgb, var(--danger) 14%, var(--bg-surface));
  --danger-border: color-mix(in srgb, var(--danger) 30%, transparent);
  /* media wells (video thumbs) — a near-black that stays consistent */
  --media-well: #0a0a0c;
  /* segmented control (mode-toggle / tabs / theme-switcher / script-tabs) */
  --seg-track: var(--ink-100);
  --seg-thumb: var(--bg-surface);
}
[data-theme="dark"] {
  --warn-ink:  var(--warning);
  --accent-chip-bg:  color-mix(in srgb, var(--green-500) 16%, var(--bg-surface));
  --accent-chip-ink: var(--green-300);
  --info-ink:  #7db4ff;
  --seg-track: var(--bg-elevated);
}
/* ════════════════════════════════════════════════════════════════
   HEXCODED · Tool 1 · URL → Ad · DEFINITIVE rebuild
   Shell: thin icon rail (hover-expands flyout + pin) LEFT, numbered
   checklist beside it, carousel CENTER, right editor drawer.
   STATE: setup (editable) → after HexCode it → VIEW-ONLY; only
   "Open Editor" on a finished video; "New video" unlocks fresh setup.
   STRICT: link the HexCoded DS (../styles/hexcoded-ds.css); the only
   :root is the DS alias layer above (var(--amp-hexcoded-*), no hardcoded
   colors); var(--token) everywhere; zero inline on*; one popup pattern,
   fixed size, internal scroll; no nested <button> (role="button" rows).
   ════════════════════════════════════════════════════════════════ */
html, body { height: 100%; margin: 0; overflow: hidden; }
body { height: 100vh; font-family: var(--font-body); color: var(--ink-900); background: var(--bg-canvas); }
*, *::before, *::after { box-sizing: border-box; }
button { font-family: inherit; }

/* ════════════════════════════════════════════════════════════════
   ░ SHARED-COMPONENT LAYER ░ — canonical, token-driven primitives.
   Each pattern below is defined ONCE; the per-screen component classes
   later in this sheet OPT IN via these helpers + the --sel-*/--accent-*
   tokens, so selected states, hovers, segmented controls and fields
   stay pixel-identical and cannot drift. (No class renames — purely
   additive consolidation on top of the existing markup.)
   ════════════════════════════════════════════════════════════════ */

/* — Canonical SELECTED state for any pickable tile/card/chip/row — */
.is-pickable { transition: border-color var(--d-fast), box-shadow var(--d-fast), background var(--d-fast); }
.is-pickable.on,
.subj-tile.on, .pg-card.on, .fmt-tile.on, .stage-card.on, .broll-tile.on,
.ref-tile.on, .tile.on, .idea-card.on, .insight-card.on, .cast2-row.on,
.making-pill.on, .rg-thumb.on, .chip.on {
  border-color: var(--sel-border);
}

/* — Canonical SEGMENTED CONTROL (mode/theme/tabs/script-tabs) — */
.seg-track, .mode-toggle, .theme-switcher, .tabs, .script-tabs {
  display: inline-flex; align-items: center;
  background: var(--seg-track); border-radius: var(--r-pill); padding: 3px; gap: 2px;
}
.seg-track > button, .mode-toggle button, .theme-switcher button, .tabs button, .script-tabs button {
  border: none; background: transparent; cursor: pointer; border-radius: var(--r-pill);
  font-weight: 600; color: var(--ink-600);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--d-fast), color var(--d-fast), box-shadow var(--d-fast);
}
.seg-track > button.on, .mode-toggle button.on, .theme-switcher button.on, .tabs button.on, .script-tabs button.on {
  background: var(--seg-thumb); color: var(--ink-1000); box-shadow: var(--shadow-xs);
}

/* — Canonical FIELD shell (input-line / guide-box / ask-box) — */
.field-line { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px 0 13px;
  border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-surface);
  transition: border-color var(--d-fast), box-shadow var(--d-fast); }
.field-line:focus-within { border-color: var(--green-500); box-shadow: var(--focus-ring); }
.field-line input { flex: 1; border: none; background: transparent; outline: none;
  font-family: inherit; font-size: 13.5px; color: var(--ink-900); }
.field-line input::placeholder { color: var(--ink-400); }

/* — Canonical ACCENT-SOFT note surface (the green "info"/callout fill) — */
.accent-note { background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: var(--r-md); }

/* — Canonical NEUTRAL note surface (grey informational fill) — */
.neutral-note { background: var(--ink-50); border: 1px solid var(--hairline); }
[data-theme="dark"] .neutral-note { background: var(--bg-elevated); }

/* ── APP GRID ──────────────────────────────────────────────────── */
.app { height: 100vh; display: grid; grid-template-columns: 56px 1fr; transition: grid-template-columns var(--d-base) var(--ease-out); }
/* Both pin (sticky/click) and hover (transient, when not pinned) PUSH the layout:
   the rail column grows 56px→220px, so the checklist panel shifts right (no overlay). */
.app[data-railpin="true"], .app[data-railhover="true"] { grid-template-columns: 220px 1fr; }
.app > * { min-width: 0; min-height: 0; }

/* ── ICON RAIL (push-expands the grid; pin = sticky, hover = transient) ── */
.rail {
  position: relative; z-index: 60;
  background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column; align-items: stretch;
  padding: 12px 8px; gap: 4px; overflow: visible;
  width: 56px; transition: width var(--d-base) var(--ease-out), padding var(--d-base) var(--ease-out);
}
.app[data-railpin="true"] .rail, .app[data-railhover="true"] .rail { width: 220px; padding: 16px 12px; }
.rail-logo { display: flex; align-items: center; gap: 10px; padding: 4px 6px 14px; text-decoration: none; }
/* H monogram (collapsed rail) — clean Outfit 900 in brand green · NO box, NO favicon styling.
   Matches brand-hexcoded favicon (single "H", fill #22C55E). The Phantom shadow stays subtle. */
.rail-logo .mark {
  width: 34px; height: 34px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; box-shadow: none; border: none; border-radius: 0;
}
.rail-logo .mark .hexwm { font-size: 26px; color: var(--green-500); }
/* expanded rail shows the full HEXCODED wordmark only — collapse the standalone H mark */
.app[data-railpin="true"] .rail-logo .mark, .app[data-railhover="true"] .rail-logo .mark { width: 0; opacity: 0; overflow: hidden; }
.rail-logo .wm { display: inline-flex; align-items: center; white-space: nowrap; opacity: 0; max-width: 0; transition: opacity var(--d-base), max-width var(--d-base); overflow: hidden; }
.app[data-railpin="true"] .rail-logo .wm, .app[data-railhover="true"] .rail-logo .wm { max-width: 200px; }
.app[data-railpin="true"] .rail-logo .wm, .app[data-railhover="true"] .rail-logo .wm { opacity: 1; }
.rail-logo .wm .hexwm { font-size: 19px; }
/* collapsed rail: center the H monogram so it lines up with the centered nav icons below */
.app:not([data-railpin="true"]):not([data-railhover="true"]) .rail-logo { justify-content: center; padding-left: 0; padding-right: 0; }
.app:not([data-railpin="true"]):not([data-railhover="true"]) .rail-logo .mark .hexwm { font-size: 21px; }

/* ── PHANTOM wordmark · inline HTML/CSS text (Outfit 900, green stepped shadow) ──
   data-text holds the word; an inner <span class="ph"></span> is the middle layer.
   Main text flips light/dark (text-primary); the 3 phantom layers stay green #22C55E. */
.hexwm {
  position: relative; display: inline-block;
  font-family: var(--amp-hexcoded-font-display), Outfit, sans-serif;
  font-weight: 900; letter-spacing: -0.025em; line-height: 1;
  color: var(--amp-hexcoded-theme-color-text-primary);
}
.hexwm::before, .hexwm::after, .hexwm .ph { content: attr(data-text); position: absolute; left: 0; top: 0; color: #22C55E; z-index: -1; }
.hexwm::before { transform: translate(1px,1px); opacity: .85; --ph: .85; animation: hexph 3s ease-in-out infinite; }
.hexwm .ph { transform: translate(2px,2px); opacity: .55; --ph: .55; animation: hexph 3s ease-in-out infinite .1s; }
.hexwm::after { transform: translate(3px,3px); opacity: .32; --ph: .32; animation: hexph 3s ease-in-out infinite .2s; }
@keyframes hexph { 0%,100% { opacity: var(--ph,.85); } 50% { opacity: calc(var(--ph,.85)*.4); } }
@media (prefers-reduced-motion: reduce) { .hexwm::before, .hexwm::after, .hexwm .ph { animation: none; } }
/* ── nav items — ALL identical shape (height 40px, single 19px icon) ── */
.rail-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 0 11px; height: 40px; border-radius: var(--r-md); border: none; background: transparent;
  cursor: pointer; color: var(--ink-600); transition: background var(--d-fast), color var(--d-fast);
  text-align: left; width: 100%; white-space: nowrap;
}
.rail-item:hover { background: var(--hover-surface); color: var(--ink-1000); }
.rail-item.on { background: var(--accent-soft-strong); color: var(--accent-ink); }
[data-theme="dark"] .rail-item.on { color: var(--green-300); }
.rail-item svg { width: 19px; height: 19px; flex-shrink: 0; stroke-width: 2; }
.rail-item .rl { display: flex; flex-direction: column; line-height: 1.2; opacity: 0; max-width: 0; overflow: hidden; transition: opacity var(--d-base); }
.rail-item .rl .rl-t { font-size: 13.5px; font-weight: 600; }
.rail-item .rl .rl-s { font-size: 10.5px; font-weight: 500; color: var(--ink-500); }
.rail-item.on .rl .rl-s { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.app[data-railpin="true"] .rail-item .rl, .app[data-railhover="true"] .rail-item .rl { opacity: 1; max-width: 200px; }

/* ── TOOLS group label — a calm mono caption, zero width when collapsed ── */
.rail-tools { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.rail-tools .tools-lab { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-400); padding: 4px 11px; opacity: 0; max-width: 0; white-space: nowrap; overflow: hidden; transition: opacity var(--d-base); }
.app[data-railpin="true"] .rail-tools .tools-lab, .app[data-railhover="true"] .rail-tools .tools-lab { opacity: 1; max-width: 200px; }
/* collapsed: a thin divider stands in for the label so the group still reads as separate */
.app:not([data-railpin="true"]):not([data-railhover="true"]) .rail-tools { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hairline); }

.rail-spacer { flex: 1; }
.rail-foot { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--hairline); }
/* ── collapse / expand control — a deliberate, tidy chevron toggle ── */
.rail-pin { display: inline-flex; align-items: center; gap: 12px; padding: 0 11px; height: 40px; border-radius: var(--r-md); border: none; background: transparent; cursor: pointer; color: var(--ink-500); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: background var(--d-fast), color var(--d-fast); width: 100%; }
.rail-pin:hover { background: var(--hover-surface); color: var(--ink-900); }
.rail-pin .pinic { width: 24px; height: 24px; flex-shrink: 0; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-500); transition: color var(--d-fast); }
.rail-pin:hover .pinic { color: var(--ink-900); }
.rail-pin .pinic svg { width: 18px; height: 18px; stroke-width: 2; }
.rail-pin .rl { opacity: 0; max-width: 0; overflow: hidden; transition: opacity var(--d-base); }
.app[data-railpin="true"] .rail-pin .rl, .app[data-railhover="true"] .rail-pin .rl { opacity: 1; max-width: 140px; }

/* ════ COLLAPSED RAIL: labels/wordmark take ZERO width — every row is a clean
   40px square with one centred icon. ════ */
.app:not([data-railpin="true"]):not([data-railhover="true"]) .rail-item,
.app:not([data-railpin="true"]):not([data-railhover="true"]) .rail-pin { justify-content: center; padding: 0; gap: 0; }
.app:not([data-railpin="true"]):not([data-railhover="true"]) .rail-logo { gap: 0; }
.app:not([data-railpin="true"]):not([data-railhover="true"]) .rail-item .rl,
.app:not([data-railpin="true"]):not([data-railhover="true"]) .rail-pin .rl { max-width: 0; padding: 0; }

/* ── MAIN COLUMN ───────────────────────────────────────────────── */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100vh; overflow: hidden; position: relative; z-index: 1; }

/* ── HEADER ────────────────────────────────────────────────────── */
.hdr { height: 58px; flex-shrink: 0; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border-bottom: 1px solid var(--hairline); }
.hdr.is-page { justify-content: flex-end; }
.proj-name { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: var(--r-md); border: 1px solid transparent; cursor: text; font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -0.02em; color: var(--ink-1000); background: transparent; transition: all var(--d-fast); max-width: 280px; }
.proj-name:hover { background: var(--hover-surface); border-color: var(--hairline); }
.proj-name:focus { outline: none; background: var(--bg-surface); border-color: var(--green-400); box-shadow: var(--sel-ring); }
.hdr .spacer { flex: 1; }
.brand-pick { display: inline-flex; align-items: center; gap: 9px; padding: 6px 11px 6px 7px; border-radius: var(--r-pill); border: 1px solid var(--hairline); background: var(--bg-surface); cursor: pointer; transition: all var(--d-fast); }
.brand-pick:hover { background: var(--hover-surface-2); border-color: var(--hairline-strong); }
.brand-pick .bdot { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--green-400), var(--green-700)); color: #fff; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.brand-pick .blab { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.brand-pick .blab .k { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500); }
.brand-pick .blab .v { font-size: 12.5px; font-weight: 600; color: var(--ink-900); }
.brand-pick svg { width: 15px; height: 15px; color: var(--ink-500); }
.mode-control { display: flex; align-items: center; gap: 8px; }
.mode-toggle button { padding: 6px 13px; font-size: 12.5px; }
.mode-toggle button svg { width: 14px; height: 14px; }
.tipwrap { position: relative; display: inline-flex; }
.info-i { width: 17px; height: 17px; border-radius: 50%; border: 1.4px solid var(--ink-400); color: var(--ink-500); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; cursor: help; font-family: var(--font-mono); }
.tipwrap:hover .info-i { border-color: var(--green-500); color: var(--green-600); }
.tip { position: absolute; top: calc(100% + 9px); right: -6px; width: 290px; z-index: 80; background: var(--ink-1000); color: var(--ink-0); padding: 13px 15px; border-radius: var(--r-md); font-size: 12px; font-weight: 400; line-height: 1.55; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translateY(-5px); transition: opacity var(--d-fast), transform var(--d-fast); }
[data-theme="dark"] .tip { background: var(--bg-elevated); color: var(--ink-900); border: 1px solid var(--hairline-strong); }
.tip b { color: var(--green-400); font-weight: 700; }
[data-theme="dark"] .tip b { color: var(--green-500); }
.tip::before { content: ''; position: absolute; top: -6px; right: 12px; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); }
.tipwrap:hover .tip { opacity: 1; pointer-events: auto; transform: translateY(0); }
.credits { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: var(--r-pill); background: var(--green-50); border: 1px solid var(--green-200); font-size: 12.5px; font-weight: 600; color: var(--green-800); }
[data-theme="dark"] .credits { background: rgba(34,197,94,0.1); }
.credits .coin { color: var(--green-600); }
.credits .muted { color: var(--green-700); font-weight: 500; opacity: 0.8; }
.theme-switcher button { padding: 6px 11px; font-size: 11.5px; gap: 5px; }

/* ── shared buttons ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; border: 1px solid var(--hairline-strong); background: var(--bg-surface); color: var(--ink-800); cursor: pointer; transition: all var(--d-fast); white-space: nowrap; }
/* secondary/default: light hover surface, ink text stays dark + readable (both themes) */
.btn:hover { background: var(--ink-100); border-color: var(--ink-300); color: var(--ink-1000); }
.btn svg { width: 15px; height: 15px; }
/* DS refinement — primary CTA reads directly off the HexCoded DS accent.
   Text is ALWAYS white (forced, not via theme-flipping inverse token), so a green
   button never shows white-on-white. Hover = slightly DARKER green, white text kept. */
.btn-primary { background: linear-gradient(135deg, var(--amp-hexcoded-theme-color-accent), var(--amp-hexcoded-theme-color-accent-deep)); color: var(--amp-hexcoded-color-white); border: none; box-shadow: var(--shadow-green-soft); }
.btn-primary:hover { background: linear-gradient(135deg, var(--amp-hexcoded-theme-color-accent-deep), var(--green-700)); color: var(--amp-hexcoded-color-white); box-shadow: var(--shadow-green); }
.btn-ghost { border: 1px solid transparent; background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--ink-100); color: var(--ink-1000); }
.btn-secondary { background: var(--bg-surface); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 12.5px; }
.btn-loading { opacity: 0.6; pointer-events: none; }

/* ── PAGE VIEWS ────────────────────────────────────────────────── */
.view { display: none; flex: 1; overflow-y: auto; min-height: 0; }
.view.on { display: block; }
#viewWork { overflow: hidden; }
#viewWork.on { display: flex; flex-direction: column; }
.page-inner { max-width: 1080px; margin: 0 auto; padding: 36px 32px 60px; }
.page-h { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 26px; }
.page-h .eyebrow { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-700); }
.page-h h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; margin: 7px 0 0; }
.page-h h1 em { font-style: normal; color: var(--green-600); }
.page-h .sub { font-size: 14.5px; color: var(--ink-600); margin-top: 8px; max-width: 560px; line-height: 1.55; }
.page-h .spacer { flex: 1; }
.np-hero { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--r-xl); cursor: pointer; background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(34,197,94,0.03)); border: 1px solid var(--green-200); transition: all var(--d-base); margin-bottom: 34px; }
.np-hero:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--green-400); }
[data-theme="dark"] .np-hero { border-color: rgba(34,197,94,0.25); }
.np-hero .np-ic { width: 46px; height: 46px; border-radius: var(--r-md); background: linear-gradient(135deg, var(--green-500), var(--green-700)); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--shadow-green-soft); }
.np-hero .np-t { font-size: 16px; font-weight: 700; color: var(--ink-1000); }
.np-hero .np-s { font-size: 13px; color: var(--ink-600); margin-top: 2px; }
.np-hero .np-go { margin-left: auto; color: var(--green-600); }
.sec-label { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.sec-label .gl { flex: 1; height: 1px; background: var(--hairline); }
.sec-label .more { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--green-600); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
[data-theme="dark"] .sec-label .more { color: var(--green-300); }
.sec-label .more svg { width: 13px; height: 13px; }

/* ════ HOME · "Spotlight" hero + the Product/Service/Place chooser ════ */
.hc-wrap { padding-top: 32px; }
.hc-hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  padding: 52px 48px 46px; border: 1px solid var(--hairline);
  background:
    radial-gradient(120% 140% at 12% -10%, color-mix(in srgb, var(--green-500) 22%, transparent) 0%, transparent 46%),
    radial-gradient(100% 130% at 96% 8%, color-mix(in srgb, var(--green-500) 14%, transparent) 0%, transparent 50%),
    var(--bg-surface);
  box-shadow: var(--shadow-sm);
}
.hc-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 80% at 80% 120%, color-mix(in srgb, var(--green-500) 10%, transparent), transparent 70%); opacity: 0.9; animation: hc-drift 14s ease-in-out infinite alternate; }
@keyframes hc-drift { from { transform: translate3d(-3%, 2%, 0) scale(1); } to { transform: translate3d(4%, -3%, 0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .hc-hero::after, .choose-tile, .choose-tile .arr { animation: none !important; transition: none !important; } }
.hc-hero > * { position: relative; z-index: 1; }
.hc-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-700); }
[data-theme="dark"] .hc-eyebrow { color: var(--green-300); }
.hc-eyebrow .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green-500) 50%, transparent); animation: hc-pulse 2.2s ease-out infinite; }
@keyframes hc-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green-500) 45%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .hc-eyebrow .pulse { animation: none; } }
.hc-hero h1 { font-family: var(--font-display); font-size: 46px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin: 16px 0 0; color: var(--ink-1000); max-width: 18ch; }
.hc-hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--green-500), var(--green-700)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hc-hero .lede { font-size: 15px; color: var(--ink-600); margin: 16px 0 0; max-width: 56ch; line-height: 1.6; }
.hc-speed { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; padding: 6px 13px; border-radius: var(--r-pill); background: var(--accent-soft); border: 1px solid var(--accent-border); font-size: 12.5px; font-weight: 600; color: var(--green-700); }
[data-theme="dark"] .hc-speed { color: var(--green-300); }
.hc-speed svg { width: 14px; height: 14px; }
.choose-q { display: flex; align-items: center; gap: 9px; margin: 32px 0 14px; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-1000); }
.choose-q .qn { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft-strong); color: var(--green-700); font-family: var(--font-mono); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
[data-theme="dark"] .choose-q .qn { color: var(--green-300); }
.choose-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 760px; }
.choose-tile { position: relative; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 0; padding: 20px 18px 18px; border-radius: var(--r-lg); border: 1px solid var(--hairline-strong); background: var(--bg-surface); box-shadow: var(--shadow-xs); transition: transform var(--d-base), box-shadow var(--d-base), border-color var(--d-base), background var(--d-base); }
.choose-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--green-400); background: color-mix(in srgb, var(--green-500) 4%, var(--bg-surface)); }
.choose-tile:focus-visible { outline: none; box-shadow: var(--sel-ring); border-color: var(--green-500); }
.choose-tile .ti { width: 46px; height: 46px; border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--green-500), var(--green-700)); color: #fff; box-shadow: var(--shadow-green-soft); margin-bottom: 15px; }
.choose-tile .ti svg { width: 22px; height: 22px; }
.choose-tile .tn { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-1000); }
.choose-tile .tx { font-size: 12.5px; color: var(--ink-500); margin-top: 4px; line-height: 1.45; }
.choose-tile .arr { position: absolute; right: 16px; top: 20px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--green-600); display: inline-flex; align-items: center; justify-content: center; opacity: 0; transform: translateX(-4px); transition: opacity var(--d-fast), transform var(--d-fast); }
[data-theme="dark"] .choose-tile .arr { color: var(--green-300); }
.choose-tile:hover .arr { opacity: 1; transform: translateX(0); }
.choose-tile .arr svg { width: 15px; height: 15px; }
.hc-recent { margin-top: 40px; }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 18px; }
.pcard { border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-surface); cursor: pointer; transition: all var(--d-base); box-shadow: var(--shadow-xs); }
.pcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--hairline-strong); }
.pcard .thumb { position: relative; aspect-ratio: 1.6; background: var(--media-well); overflow: hidden; }
.pcard .thumb video { width: 100%; height: 100%; object-fit: cover; }
.pcard .thumb .grade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.45)); }
.pcard .thumb .stagepill { position: absolute; left: 10px; top: 10px; font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 5px; background: rgba(0,0,0,0.55); color: #fff; backdrop-filter: blur(6px); }
.pcard .thumb .stagepill .d { width: 7px; height: 7px; border-radius: 50%; }
.pcard .thumb .stagepill .d.ready { background: var(--green-400); }
.pcard .thumb .stagepill .d.gen { background: var(--warning); animation: pulse 1.2s infinite; }
.pcard .thumb .stagepill .d.review { background: #ff9f0a; }
.pcard .thumb .stagepill .d.failed { background: var(--danger); }
.pcard .thumb .stagepill .d.setup { background: var(--ink-400); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.pcard .thumb .playbadge { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.92); color: var(--ink-1000); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.pcard .thumb .playbadge svg { width: 16px; height: 16px; margin-left: 2px; }
.pcard .pc-body { padding: 13px 15px 15px; }
.pcard .pc-tool { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-700); }
.pcard .pc-name { font-size: 15px; font-weight: 700; color: var(--ink-1000); margin: 4px 0 2px; }
.pcard .pc-sub { font-size: 12px; color: var(--ink-500); }
.pcard .pc-meta { display: flex; align-items: center; gap: 8px; margin-top: 11px; font-size: 11px; color: var(--ink-500); }
.pcard .pc-meta .when { margin-left: auto; }
.proj-list { display: flex; flex-direction: column; gap: 8px; }
.prow { display: flex; align-items: center; gap: 16px; padding: 13px 16px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); cursor: pointer; transition: all var(--d-fast); }
.prow:hover { border-color: var(--hairline-strong); box-shadow: var(--shadow-xs); }
.prow .pr-thumb { width: 64px; height: 40px; border-radius: var(--r-sm); overflow: hidden; flex-shrink: 0; background: var(--media-well); }
.prow .pr-thumb video { width: 100%; height: 100%; object-fit: cover; }
.prow .pr-name { font-size: 14px; font-weight: 600; color: var(--ink-1000); }
.prow .pr-sub { font-size: 12px; color: var(--ink-500); margin-top: 1px; }
.prow .pr-stage { margin-left: auto; font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 6px; }
.prow .pr-stage .d { width: 7px; height: 7px; border-radius: 50%; }
.pr-stage.ready { background: var(--green-50); color: var(--green-700); } .pr-stage.ready .d { background: var(--green-500); }
[data-theme="dark"] .pr-stage.ready { background: rgba(34,197,94,0.12); color: var(--green-400); }
.pr-stage.gen { background: var(--warn-soft); color: var(--warn-ink); } .pr-stage.gen .d { background: var(--warning); animation: pulse 1.2s infinite; }
[data-theme="dark"] .pr-stage.gen { color: var(--warning); }
.pr-stage.review { background: var(--warn-soft); color: var(--warn-ink); } .pr-stage.review .d { background: #ff9f0a; }
.pr-stage.failed { background: var(--danger-soft); color: var(--danger); } .pr-stage.failed .d { background: var(--danger); }
.pr-stage.setup { background: var(--ink-100); color: var(--ink-600); } .pr-stage.setup .d { background: var(--ink-400); }
.prow .pr-when { font-size: 11px; color: var(--ink-400); width: 64px; text-align: right; }
.proj-detail-thumb { position: relative; width: 140px; height: 100px; flex-shrink: 0; border-radius: var(--r-md); overflow: hidden; background: var(--ink-100); }
.proj-detail-thumb video { width: 100%; height: 100%; object-fit: cover; }
.proj-detail-thumb .playbadge { position: absolute; bottom: 7px; right: 7px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; color: #fff; }
.proj-detail-thumb .playbadge svg { width: 14px; height: 14px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.lib-card { border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; background: var(--bg-surface); cursor: pointer; transition: all var(--d-base); }
.lib-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lib-card .lc-thumb { position: relative; aspect-ratio: 0.5625; background: var(--media-well); }
.lib-card .lc-thumb video { width: 100%; height: 100%; object-fit: cover; }
.lib-card .lc-badge { position: absolute; right: 8px; top: 8px; font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: var(--r-pill); background: var(--green-600); color: #fff; display: inline-flex; align-items: center; gap: 4px; }
.lib-card .lc-badge.flag { background: #ff9f0a; }
.lib-card .lc-badge svg { width: 10px; height: 10px; }
.lib-card .lc-body { padding: 9px 11px 11px; }
.lib-card .lc-n { font-size: 12px; font-weight: 600; color: var(--ink-900); }
.lib-card .lc-s { font-size: 10.5px; color: var(--ink-500); margin-top: 2px; }
.stub-note { font-size: 12.5px; color: var(--ink-500); background: var(--ink-50); border: 1px dashed var(--hairline-strong); border-radius: var(--r-md); padding: 14px 16px; line-height: 1.55; margin-top: 8px; }
[data-theme="dark"] .stub-note { background: var(--bg-elevated); }
.stub-note b { color: var(--ink-800); }

/* ═══ ASSET LIBRARY — browse surface (built on shared primitives) ═══ */
.lib-count { font-size: 12px; font-weight: 600; color: var(--ink-500); background: var(--ink-50); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 6px 13px; white-space: nowrap; }
[data-theme="dark"] .lib-count { background: var(--bg-elevated); }
.lib-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.lib-toolbar .lib-search { flex: 1; }
.lib-search-clear { border: none; background: transparent; cursor: pointer; color: var(--ink-400); width: 30px; height: 30px; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lib-search-clear:hover { background: var(--ink-100); color: var(--ink-700); }
.lib-search-clear svg { width: 14px; height: 14px; }
.lib-view-toggle button { padding: 7px 11px; }
.lib-view-toggle svg { width: 16px; height: 16px; }

.lib-filterbar { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 14px 0 4px; margin-bottom: 22px; border-bottom: 1px solid var(--hairline); }
.lib-fgroup { display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; }
.lib-fgl { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-400); }
.lib-filterbar .chip { padding: 6px 11px; font-size: 12px; }

.lib-group { margin-bottom: 30px; }
.lib-group .sec-label .g-n { background: var(--ink-100); color: var(--ink-600); font-size: 10px; padding: 1px 7px; border-radius: var(--r-pill); }
[data-theme="dark"] .lib-group .sec-label .g-n { background: var(--bg-elevated); }

/* grid card — reuses .lib-card shell, .thumb pattern from home cards */
.lib-card .thumb { position: relative; aspect-ratio: 0.5625; background: var(--media-well); overflow: hidden; }
.lib-card .thumb.sq { aspect-ratio: 1; }
.lib-card .thumb.wide { aspect-ratio: 1.778; }
.lib-card .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-card .lc-grade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,0.18), transparent 30%, transparent 70%, rgba(0,0,0,0.28)); }
.lib-card .lc-like { position: absolute; left: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,0.92); color: var(--green-600); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.lib-card .lc-like.off { color: var(--ink-500); }
.lib-card .lc-like svg { width: 12px; height: 12px; }
.lib-card .lc-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(0.9); width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.92); color: var(--ink-1000); display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: all var(--d-fast); box-shadow: var(--shadow-md); }
.lib-card .lc-play svg { width: 16px; height: 16px; }
.lib-card:hover .lc-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.lib-card .lc-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 10px; color: var(--ink-400); }
.lib-card .lc-meta .when { flex-shrink: 0; }

/* list view */
.lib-list { display: flex; flex-direction: column; gap: 8px; }
.lib-row { display: grid; grid-template-columns: 56px 1fr auto auto auto; align-items: center; gap: 14px; padding: 8px 14px 8px 8px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); cursor: pointer; transition: all var(--d-fast); }
.lib-row:hover { border-color: var(--green-300); box-shadow: var(--shadow-sm); }
.lib-row .lr-thumb { position: relative; width: 56px; aspect-ratio: 0.5625; border-radius: var(--r-sm); overflow: hidden; background: var(--media-well); }
.lib-row .lr-thumb video { width: 100%; height: 100%; object-fit: cover; }
.lib-row .lr-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; opacity: 0; transition: opacity var(--d-fast); }
.lib-row .lr-play svg { width: 14px; height: 14px; }
.lib-row:hover .lr-play { opacity: 1; }
.lib-row .lr-n { font-size: 13px; font-weight: 600; color: var(--ink-900); display: flex; align-items: center; gap: 7px; }
.lib-row .lr-like { color: var(--green-600); display: inline-flex; }
.lib-row .lr-like svg { width: 13px; height: 13px; }
.lib-row .lr-s { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }
.lib-row .lr-proj { font-size: 11.5px; color: var(--ink-600); white-space: nowrap; }
.lib-row .lr-when { font-size: 11px; color: var(--ink-400); white-space: nowrap; width: 72px; text-align: right; }
@media (max-width: 720px) { .lib-row { grid-template-columns: 56px 1fr auto; } .lib-row .lr-proj, .lib-row .lr-when { display: none; } }

/* empty state */
.lib-empty { text-align: center; padding: 60px 24px; max-width: 460px; margin: 0 auto; }
.lib-empty .le-ic { width: 54px; height: 54px; border-radius: 50%; background: var(--ink-50); border: 1px solid var(--hairline); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--ink-400); }
[data-theme="dark"] .lib-empty .le-ic { background: var(--bg-elevated); }
.lib-empty .le-ic svg { width: 24px; height: 24px; }
.lib-empty .le-t { font-size: 17px; font-weight: 700; color: var(--ink-900); letter-spacing: -0.01em; }
.lib-empty .le-s { font-size: 13px; color: var(--ink-500); line-height: 1.55; margin: 8px 0 20px; }

/* asset detail popup */
.asset-detail { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 26px; align-items: start; }
.asset-detail .ad-left { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.asset-detail .ad-left .res-player { width: 100%; max-width: 280px; }
.asset-detail .ad-left .res-player.ar-9x16 { aspect-ratio: 0.5625; height: auto; }
.asset-detail .ad-left .res-player.ar-1x1 { aspect-ratio: 1; height: auto; }
.asset-detail .ad-left .res-player.ar-16x9 { aspect-ratio: 1.778; height: auto; }
.asset-detail .ad-likebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.asset-detail .ad-likebar .ra-btn { height: 32px; padding: 0 12px; }
.asset-detail .ad-sec { margin-bottom: 22px; }
.asset-detail .ad-sec:last-child { margin-bottom: 0; }
.asset-detail .ad-h { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 12px; display: flex; align-items: center; gap: 9px; }
.asset-detail .ad-h-n { background: var(--ink-100); color: var(--ink-600); font-size: 10px; padding: 1px 7px; border-radius: var(--r-pill); }
[data-theme="dark"] .asset-detail .ad-h-n { background: var(--bg-elevated); }

.asset-act { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 13px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); cursor: pointer; transition: all var(--d-fast); margin-bottom: 8px; }
.asset-act:hover { border-color: var(--green-300); background: var(--ink-50); }
[data-theme="dark"] .asset-act:hover { background: var(--bg-elevated); }
.asset-act .aa-ic { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--green-50); color: var(--green-700); display: inline-flex; align-items: center; justify-content: center; }
[data-theme="dark"] .asset-act .aa-ic { background: rgba(34,197,94,0.12); color: var(--green-300); }
.asset-act .aa-ic svg { width: 16px; height: 16px; }
.asset-act .aa-tx { flex: 1; display: flex; flex-direction: column; }
.asset-act .aa-n { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.asset-act .aa-s { font-size: 11.5px; color: var(--ink-500); margin-top: 1px; }
.asset-act .aa-go { width: 15px; height: 15px; color: var(--ink-400); flex-shrink: 0; }

.ver-list { display: flex; flex-direction: column; gap: 8px; }
.ver-row { display: flex; align-items: center; gap: 11px; padding: 8px; border: 1px solid var(--hairline); border-radius: var(--r-sm); background: var(--bg-surface); }
.ver-row.current { border-color: var(--green-200); background: var(--green-50); }
[data-theme="dark"] .ver-row.current { background: rgba(34,197,94,0.07); border-color: rgba(34,197,94,0.25); }
.ver-row .ver-thumb { width: 34px; aspect-ratio: 0.5625; border-radius: var(--r-xs); overflow: hidden; background: var(--media-well); flex-shrink: 0; }
.ver-row .ver-thumb video { width: 100%; height: 100%; object-fit: cover; }
.ver-row .ver-tx { flex: 1; display: flex; flex-direction: column; }
.ver-row .ver-v { font-size: 12px; font-weight: 700; color: var(--ink-900); display: flex; align-items: center; gap: 7px; }
.ver-row .ver-tag { font-size: 8.5px; font-weight: 700; color: var(--green-700); background: var(--green-100); padding: 1px 6px; border-radius: var(--r-pill); }
[data-theme="dark"] .ver-row .ver-tag { background: rgba(34,197,94,0.15); color: var(--green-300); }
.ver-row .ver-lbl { font-size: 11px; color: var(--ink-500); margin-top: 1px; }
.ver-row .btn-sm { flex-shrink: 0; }

.rights-card { border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 14px 15px; background: var(--bg-surface); }
.rights-head { margin-bottom: 12px; }
.rights-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: var(--r-pill); background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-200); }
[data-theme="dark"] .rights-pill { background: rgba(34,197,94,0.1); color: var(--green-300); }
.rights-pill.off { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn-border); }
.rights-pill svg { width: 13px; height: 13px; }
.rights-grid { display: flex; flex-direction: column; gap: 0; }
.rights-row { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 12.5px; }
.rights-row:first-child { border-top: none; }
.rights-row .rr-k { width: 100px; flex-shrink: 0; color: var(--ink-500); font-weight: 600; }
.rights-row .rr-v { color: var(--ink-900); }
.rights-note { display: flex; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--ink-50); font-size: 11.5px; color: var(--ink-600); line-height: 1.5; }
[data-theme="dark"] .rights-note { background: var(--bg-elevated); }
.rights-note svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--ink-400); margin-top: 1px; }
@media (max-width: 760px) { .asset-detail { grid-template-columns: 1fr; } .asset-detail .ad-left .res-player { max-width: 220px; } }

/* ── WORK AREA ─────────────────────────────────────────────────── */
.work { flex: 1; display: grid; grid-template-columns: 332px minmax(0,1fr) 0px; min-height: 0; overflow: hidden; transition: grid-template-columns var(--d-slow) var(--ease-out); }
.work > * { min-width: 0; min-height: 0; }
.work[data-editor-open="true"] { grid-template-columns: 332px minmax(0,1fr) 420px; }

/* ── LEFT · NUMBERED CHECKLIST ─────────────────────────────────── */
.inputs { border-right: 1px solid var(--hairline); background: var(--bg-surface); display: flex; flex-direction: column; overflow: hidden; }
.inputs-scroll { flex: 1; overflow-y: auto; padding: 16px 14px 12px; }
.inputs-foot { flex-shrink: 0; border-top: 1px solid var(--hairline); background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); padding: 12px 14px 14px; }
/* view-only banner after generation */
.viewonly-bar { display: none; align-items: center; gap: 10px; padding: 11px 13px; margin-bottom: 12px; border-radius: var(--r-md); background: var(--ink-50); border: 1px solid var(--hairline); }
.work[data-locked="true"] .viewonly-bar { display: flex; }
[data-theme="dark"] .viewonly-bar { background: var(--bg-elevated); }
.viewonly-bar .lock-ic { color: var(--ink-500); flex-shrink: 0; } .viewonly-bar .lock-ic svg { width: 16px; height: 16px; }
.viewonly-bar .vb-tx { flex: 1; min-width: 0; }
.viewonly-bar .vb-t { font-size: 12px; font-weight: 700; color: var(--ink-900); }
.viewonly-bar .vb-s { font-size: 10.5px; color: var(--ink-500); margin-top: 1px; line-height: 1.4; }
.ck-progress { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.work[data-locked="true"] .ck-progress { display: none; }
.ck-progress .ck-bar { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--ink-200); overflow: hidden; }
.ck-progress .ck-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-400), var(--green-600)); transition: width var(--d-base) var(--ease-out); }
.ck-progress .ck-lbl { font-size: 11.5px; font-weight: 600; color: var(--green-700); white-space: nowrap; }
.ck-group { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-500); padding: 0 8px; margin: 16px 0 6px; display: flex; align-items: center; gap: 8px; }
.ck-group:first-of-type { margin-top: 2px; }
.ck-group .gline { flex: 1; height: 1px; background: var(--hairline); }
.ck-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 10px; border-radius: var(--r-md); border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left; transition: background var(--d-fast), border-color var(--d-fast); margin-bottom: 2px; }
.ck-row:hover { background: var(--hover-surface-2); border-color: var(--hairline); }
.work[data-locked="true"] .ck-row { cursor: default; }
.work[data-locked="true"] .ck-row:hover { background: transparent; border-color: transparent; }
.ck-tick { width: 23px; height: 23px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; font-weight: 700; background: var(--accent-chip-bg); color: var(--accent-chip-ink); border: 1.5px solid transparent; transition: all var(--d-fast); }
.ck-tick svg { width: 13px; height: 13px; }
.ck-tick.todo { background: var(--bg-surface); border-color: var(--ink-300); color: var(--ink-400); }
.ck-tx { flex: 1; min-width: 0; }
.ck-nm { display: block; font-size: 13px; font-weight: 600; color: var(--ink-900); letter-spacing: -0.01em; }
.ck-nm .opt { font-size: 9.5px; font-weight: 600; color: var(--ink-400); margin-left: 5px; }
.ck-vl { display: block; font-size: 11.5px; color: var(--ink-500); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-go { color: var(--ink-400); display: inline-flex; }
.work[data-locked="true"] .ck-go { display: none; }
.ck-go svg { width: 15px; height: 15px; }
/* cost strip */
.gen-cost { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.gen-cost .gen-cost-num { display: flex; align-items: baseline; gap: 6px; }
.gen-cost .csn { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink-1000); font-family: var(--font-display); }
.gen-cost .csu { font-size: 11.5px; color: var(--ink-500); font-weight: 500; }
.gen-cost .spacer { flex: 1; }
.gen-cost .cs-detail { font-size: 11px; color: var(--green-600); font-weight: 600; cursor: pointer; background: none; border: none; }
.gen-cost .cs-detail:hover { text-decoration: underline; }
#generateBtn { width: 100%; height: 46px; }
#newVideoBtn { width: 100%; height: 46px; display: none; }
.work[data-locked="true"] #generateBtn { display: none; }
.work[data-locked="true"] #newVideoBtn { display: inline-flex; }
.work[data-locked="true"] .gen-cost { display: none; }
.credit-short { display: none; align-items: center; gap: 8px; margin-bottom: 11px; padding: 9px 11px; border-radius: var(--r-md); background: var(--warn-soft); border: 1px solid var(--warn-border); }
.inputs-foot[data-short="true"] .credit-short { display: flex; }
.work[data-locked="true"] .credit-short { display: none !important; }
.credit-short .cs-warn { flex: 1; font-size: 11.5px; font-weight: 600; color: var(--warn-ink); }

/* ── CENTER · CANVAS ───────────────────────────────────────────── */
.canvas { position: relative; overflow: hidden; display: flex; flex-direction: column; background: radial-gradient(1200px 600px at 50% -10%, rgba(34,197,94,0.05), transparent 60%), var(--bg-canvas); }
.canvas-bar { height: 46px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--hairline); background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.canvas-bar .ctitle { font-size: 12.5px; font-weight: 600; color: var(--ink-700); display: flex; align-items: center; gap: 8px; }
.canvas-bar .ctitle .dotgrn { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); }
.canvas-bar .spacer { flex: 1; }
.canvas-bar .ar-pill { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--ink-700); padding: 4px 9px; border-radius: var(--r-pill); border: 1px solid var(--hairline-strong); background: var(--bg-surface); }
.canvas-stage { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 28px; position: relative; }
/* the player frame — reshapes to aspect */
.frame { position: relative; background: var(--media-well); overflow: hidden; border-radius: var(--r-xl); box-shadow: var(--shadow-xl); border: 1px solid rgba(255,255,255,0.06); transition: width var(--d-stately) var(--ease-out), height var(--d-stately) var(--ease-out); }
.frame.ar-9x16 { width: 322px; height: 572px; }
/* ── BRANDED MOTION-GRAPHIC preview (no photo, no video) — animated green mesh ──
   Shared by the setup PREVIEW (.frame) and the GENERATING screen (.gen-frame). */
.frame .mg-mesh, .gen-frame .mg-mesh { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #0e2a1a, #07120c 70%); }
.frame .mg-blob, .gen-frame .mg-blob { position: absolute; border-radius: 50%; filter: blur(34px); opacity: 0.85; mix-blend-mode: screen; }
.frame .mg-blob.b1, .gen-frame .mg-blob.b1 { width: 62%; height: 42%; left: -12%; top: 6%; background: radial-gradient(circle, #22C55E, transparent 68%); animation: mgFloat1 9s ease-in-out infinite; }
.frame .mg-blob.b2, .gen-frame .mg-blob.b2 { width: 70%; height: 50%; right: -18%; top: 28%; background: radial-gradient(circle, #16A34A, transparent 70%); animation: mgFloat2 11s ease-in-out infinite; }
.frame .mg-blob.b3, .gen-frame .mg-blob.b3 { width: 56%; height: 40%; left: 12%; bottom: -8%; background: radial-gradient(circle, #86EFAC, transparent 72%); opacity: 0.55; animation: mgFloat3 13s ease-in-out infinite; }
@keyframes mgFloat1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(18%,12%) scale(1.18); } }
@keyframes mgFloat2 { 0%,100% { transform: translate(0,0) scale(1.05); } 50% { transform: translate(-14%,-10%) scale(0.9); } }
@keyframes mgFloat3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(10%,-14%) scale(1.2); } }
.frame .mg-grid, .gen-frame .mg-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(34,197,94,0.10) 1px, transparent 1px), linear-gradient(90deg, rgba(34,197,94,0.10) 1px, transparent 1px); background-size: 26px 26px; mask-image: radial-gradient(120% 90% at 50% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(120% 90% at 50% 30%, #000 30%, transparent 75%); }
.frame .mg-scan { position: absolute; left: 0; right: 0; height: 30%; top: -30%; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(34,197,94,0.14), transparent); animation: mgScan 3.6s linear infinite; }
@keyframes mgScan { 0% { top: -30%; } 100% { top: 100%; } }
/* shimmer particles — fine drifting green specks for a premium, alive feel */
.frame .mg-spark, .gen-frame .mg-spark { position: absolute; inset: 0; pointer-events: none; opacity: 0.9; mix-blend-mode: screen;
  background-image:
    radial-gradient(1.4px 1.4px at 18% 24%, rgba(134,239,172,0.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 62% 12%, rgba(34,197,94,0.85), transparent 60%),
    radial-gradient(1.6px 1.6px at 80% 46%, rgba(134,239,172,0.8), transparent 60%),
    radial-gradient(1.2px 1.2px at 34% 64%, rgba(34,197,94,0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 70% 80%, rgba(134,239,172,0.85), transparent 60%),
    radial-gradient(1.2px 1.2px at 12% 86%, rgba(34,197,94,0.75), transparent 60%);
  animation: mgSpark 6s ease-in-out infinite; }
@keyframes mgSpark { 0%,100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-10px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .frame .mg-blob, .frame .mg-scan, .frame .mg-spark, .gen-frame .mg-spark, .gen-frame .mg-blob, .gen-frame .mg-scan { animation: none; } }
.prev-badge { position:absolute; left:50%; top:14px; transform:translateX(-50%); z-index:6; display:inline-flex; align-items:center; gap:6px; font-family:var(--font-mono); font-size:10px; font-weight:700; letter-spacing:0.05em; text-transform:uppercase; color:#fff; background:rgba(0,0,0,0.55); padding:5px 11px; border-radius:var(--r-pill); backdrop-filter:blur(6px); }
.prev-badge svg { width:13px; height:13px; }
.frame.ar-1x1  { width: 470px; height: 470px; }
.frame.ar-4x5  { width: 424px; height: 530px; }
.frame.ar-16x9 { width: 680px; height: 382px; }
.frame video.fv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--media-well); }
.frame .grade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(160deg, rgba(34,197,94,0.06), transparent 38%), linear-gradient(0deg, rgba(0,0,0,0.5), transparent 52%); }
.ov-cap { position: absolute; left: 16px; right: 16px; bottom: 70px; text-align: center; pointer-events: none; transition: all var(--d-base); }
.ov-cap .line { display: inline-block; font-family: var(--amp-hexcoded-font-display), Outfit, sans-serif; font-weight: 900; font-size: 17px; letter-spacing: -0.02em; color: #fff; line-height: 1.18; padding: 2px 6px;
  /* PHANTOM stepped green shadow (1/2/3px · 85/55/32%) — breathes on a 3s cycle */
  text-shadow: 1px 1px 0 rgba(34,197,94,0.85), 2px 2px 0 rgba(34,197,94,0.55), 3px 3px 0 rgba(34,197,94,0.32), 0 2px 12px rgba(0,0,0,0.6);
  animation: capPhantom 3s ease-in-out infinite; }
@keyframes capPhantom { 0%,100% { text-shadow: 1px 1px 0 rgba(34,197,94,0.85), 2px 2px 0 rgba(34,197,94,0.55), 3px 3px 0 rgba(34,197,94,0.32), 0 2px 12px rgba(0,0,0,0.6); } 50% { text-shadow: 1px 1px 0 rgba(34,197,94,0.34), 2px 2px 0 rgba(34,197,94,0.22), 3px 3px 0 rgba(34,197,94,0.13), 0 2px 12px rgba(0,0,0,0.6); } }
@media (prefers-reduced-motion: reduce) { .ov-cap .line { animation: none; } }
.ov-cap .line em { font-style: normal; color: var(--green-300); }
.ov-cap.pos-top { bottom: auto; top: 24px; } .ov-cap.pos-mid { bottom: auto; top: 46%; } .ov-cap.pos-bot { bottom: 70px; }
.ov-cap.clean .line { background: rgba(0,0,0,0.5); border-radius: 6px; } .ov-cap.minimal .line { font-weight: 600; font-size: 14px; }
.ov-cap.off { display: none; }
.ov-super { position: absolute; left: 16px; bottom: 18px; pointer-events: none; }
.ov-super .card { background: rgba(255,255,255,0.94); border-radius: var(--r-md); padding: 7px 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.3); font-size: 11.5px; font-weight: 700; color: var(--ink-1000); }
.ov-super.off { display: none; }
.ov-cast { position: absolute; left: 14px; top: 14px; pointer-events: none; }
.ov-cast .card { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.45); backdrop-filter: blur(8px); border-radius: var(--r-pill); padding: 4px 12px 4px 4px; }
.ov-cast .card img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.ov-cast .card .nm { font-size: 11px; font-weight: 600; color: #fff; }
.ov-cast .card .badge { font-size: 8px; font-weight: 700; color: #fff; background: var(--green-600); padding: 2px 5px; border-radius: var(--r-xs); }
.ov-cast.off { display: none; }
/* custom scrubber */
.scrub { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px 12px; background: linear-gradient(0deg, rgba(0,0,0,0.7), transparent); display: flex; align-items: center; gap: 11px; opacity: 0; transition: opacity var(--d-base); z-index: 5; }
.frame:hover .scrub, .frame.scrubshow .scrub { opacity: 1; }
.scrub .pp { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; border: none; background: rgba(255,255,255,0.92); color: var(--ink-1000); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.scrub .pp svg { width: 16px; height: 16px; }
.scrub .track { flex: 1; height: 5px; border-radius: var(--r-pill); background: rgba(255,255,255,0.28); cursor: pointer; position: relative; }
.scrub .track .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill); background: var(--green-400); width: 0%; }
.scrub .track .knob { position: absolute; top: 50%; transform: translate(-50%,-50%); width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.5); left: 0%; }
.scrub .tlabel { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: #fff; white-space: nowrap; min-width: 74px; text-align: right; }
.frame-hint { position: absolute; left: 50%; bottom: -32px; transform: translateX(-50%); font-size: 11.5px; color: var(--ink-500); white-space: nowrap; }

/* ── EMPTY / FIRST-RUN ─────────────────────────────────────────── */
.empty-stage { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: var(--bg-canvas); padding: 24px; }
.empty-stage.off { display: none; }
.empty-card { max-width: 560px; text-align: center; }
.empty-card .eyebrow { display: inline-block; margin-bottom: 14px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-700); background: var(--green-50); border: 1px solid var(--green-200); border-radius: var(--r-pill); padding: 5px 12px; }
[data-theme="dark"] .empty-card .eyebrow { background: rgba(34,197,94,0.1); }
.empty-card h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; margin: 0 0 12px; }
.empty-card h1 em { font-style: normal; color: var(--green-600); }
.empty-card .lead { font-size: 15px; color: var(--ink-600); line-height: 1.55; max-width: 460px; margin: 0 auto 26px; }
.empty-card .start-btn { margin: 0 auto; }

/* ── GENERATION (cinematic single-stage, plain grey, correct aspect) ── */
.gen-stage { position: absolute; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 22px; padding: 30px; background: var(--bg-soft); }
[data-theme="dark"] .gen-stage { background: var(--bg-canvas); }
.gen-stage.on { display: flex; }
.gen-frame { position: relative; background: #16161a; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-xl); border: 1px solid var(--hairline); transition: width var(--d-stately) var(--ease-out), height var(--d-stately) var(--ease-out); }
.gen-frame.ar-9x16 { width: 270px; height: 480px; }
.gen-frame.ar-1x1  { width: 400px; height: 400px; }
.gen-frame.ar-4x5  { width: 360px; height: 450px; }
.gen-frame.ar-16x9 { width: 540px; height: 304px; }
.gen-frame .mg-mesh { transform: scale(1.04); filter: saturate(0.9); transition: transform 1.1s, filter 1.1s; }
.gen-frame[data-phase="build"] .mg-mesh, .gen-frame[data-phase="caption"] .mg-mesh, .gen-frame[data-phase="done"] .mg-mesh { transform: scale(1); filter: saturate(1.05); }
.gen-frame .brandtint { position: absolute; inset: 0; background: linear-gradient(150deg, rgba(34,197,94,0.28), transparent 48%), linear-gradient(0deg, rgba(0,0,0,0.55), transparent 55%); opacity: 0.35; transition: opacity 1s; }
.gen-frame[data-phase="caption"] .brandtint, .gen-frame[data-phase="done"] .brandtint { opacity: 1; }
.gen-frame .scanline { position: absolute; left: 0; right: 0; height: 32%; background: linear-gradient(180deg, transparent, rgba(34,197,94,0.16), transparent); top: -32%; animation: scan 2.4s linear infinite; pointer-events: none; }
@keyframes scan { 0% { top: -32%; } 100% { top: 100%; } }
.gen-frame .grain { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 3px 3px; pointer-events: none; }
.gen-frame .assembling { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: #fff; background: rgba(0,0,0,0.5); padding: 5px 11px; border-radius: var(--r-pill); }
.gen-frame .assembling .sp { width: 11px; height: 11px; border: 2px solid rgba(255,255,255,0.3); border-top-color: var(--green-400); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gen-frame .forming-cap { position: absolute; left: 14px; right: 14px; bottom: 40px; text-align: center; color: #fff; font-weight: 800; font-size: 17px; text-shadow: 0 2px 10px rgba(0,0,0,0.7); opacity: 0; transition: opacity 0.8s; }
.gen-frame[data-phase="caption"] .forming-cap, .gen-frame[data-phase="done"] .forming-cap { opacity: 1; }
.gen-frame .forming-cap em { font-style: normal; color: var(--green-300); }
.gen-frame .ar-tag { position: absolute; right: 10px; top: 10px; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.5); padding: 3px 8px; border-radius: var(--r-pill); }
.gen-info { width: 100%; max-width: 460px; text-align: center; }
.gen-info .gt { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink-1000); }
.gen-info .gs { font-size: 13px; color: var(--ink-600); margin-top: 4px; line-height: 1.5; }
.gen-ring { display: flex; align-items: center; justify-content: center; gap: 13px; margin: 16px 0 16px; }
.gen-ring .ring { width: 48px; height: 48px; flex-shrink: 0; }
.gen-ring .pct { font-size: 24px; font-weight: 800; font-family: var(--font-display); color: var(--ink-1000); }
.gen-checks { display: inline-flex; flex-direction: column; gap: 7px; text-align: left; }
.gen-check { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-400); opacity: 0.4; transition: all var(--d-base); }
.gen-check.in { opacity: 1; }
.gen-check.ok { color: var(--ink-800); }
.gen-check .cdot { width: 17px; height: 17px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--ink-300); display: inline-flex; align-items: center; justify-content: center; }
.gen-check.ok .cdot { background: var(--green-500); border-color: var(--green-500); }
.gen-check .cdot svg { width: 11px; height: 11px; color: #fff; }
.gen-batchnote { font-size: 11.5px; color: var(--ink-500); }
/* ── BATCH / COMPARE progress grid — per-item status (some Ready, some Generating, one Failed) ── */
.gen-batchgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; width: 100%; max-width: 460px; }
.gbi { border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); overflow: hidden; text-align: left; }
.gbi .gbi-vid { position: relative; aspect-ratio: 1.6; background: var(--media-well); overflow: hidden; }
.gbi .gbi-vid .ph-mesh { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, #0e2a1a, #07120c 70%); opacity: .9; }
.gbi .gbi-vid video { width: 100%; height: 100%; object-fit: cover; }
.gbi .gbi-spin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.gbi .gbi-spin .sp { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,0.25); border-top-color: var(--green-400); animation: tspin .8s linear infinite; }
@keyframes tspin { to { transform: rotate(360deg); } }
.gbi .gbi-fx { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--danger); }
.gbi .gbi-fx svg { width: 22px; height: 22px; }
.gbi .gbi-body { padding: 7px 9px 8px; display: flex; align-items: center; gap: 6px; }
.gbi .gbi-n { font-size: 11px; font-weight: 600; color: var(--ink-1000); flex: 1; min-width: 0; }
.gbi .gbi-st { font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em; padding: 2px 7px; border-radius: var(--r-pill); white-space: nowrap; }
.gbi .gbi-st.ready { background: var(--green-50); color: var(--green-700); }
[data-theme="dark"] .gbi .gbi-st.ready { background: color-mix(in srgb, var(--green-500) 14%, transparent); color: var(--green-300); }
.gbi .gbi-st.gen { background: var(--warn-soft); color: var(--warn-ink); }
.gbi .gbi-st.fail { background: var(--danger-soft); color: var(--danger); }
.gbi.is-fail { border-color: var(--danger-border); }
.gbi.is-ready { border-color: var(--green-300); }
/* background-run reassurance + notify affordance (behavioural copy; full notif UI later) */
.gen-bg { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; padding: 11px 14px; border-radius: var(--r-md); background: var(--ink-50); border: 1px solid var(--hairline); max-width: 460px; }
[data-theme="dark"] .gen-bg { background: var(--bg-elevated); }
.gen-bg > i { color: var(--green-600); flex-shrink: 0; width: 16px; height: 16px; }
.gen-bg .gen-bg-tx { flex: 1; min-width: 180px; font-size: 11.5px; line-height: 1.45; color: var(--ink-600); text-align: left; }
.gen-bg .gen-bg-eta { display: inline-block; font-weight: 700; color: var(--green-700); }
[data-theme="dark"] .gen-bg .gen-bg-eta { color: var(--green-300); }
.gen-bg .gen-bg-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: var(--r-pill); border: 1px solid var(--hairline-strong); background: var(--bg-surface); cursor: pointer; font-size: 11.5px; font-weight: 600; color: var(--ink-800); transition: all var(--d-fast); }
.gen-bg .gen-bg-btn:hover { background: var(--ink-100); color: var(--ink-1000); border-color: var(--ink-300); }
.gen-bg .gen-bg-btn svg { width: 13px; height: 13px; }
.gen-bg .gen-bg-btn.ghost { border-color: transparent; background: transparent; color: var(--ink-500); }
.gen-bg .gen-bg-btn.ghost:hover { background: var(--ink-100); color: var(--ink-1000); }

/* ── RESULTS (responsive: gallery on large, centered on small) ──── */
.results-stage { position: absolute; inset: 0; z-index: 30; display: none; flex-direction: column; }
.results-stage.on { display: flex; }
.results-head { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 13px 22px; border-bottom: 1px solid var(--hairline); background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.results-head .rh-t { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.results-head .rh-s { font-size: 12px; color: var(--ink-500); margin-top: 1px; }
.results-head .spacer { flex: 1; }
.res-body { flex: 1; overflow: hidden; display: flex; min-height: 0; min-width: 0; }
/* gallery rail (large) */
.res-gallery { width: 218px; flex-shrink: 0; border-right: 1px solid var(--hairline); overflow-y: auto; padding: 14px; background: var(--bg-surface); }
.res-gallery .rg-label { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 11px; }
.rg-thumb { position: relative; width: 100%; border: 1.5px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; background: var(--bg-surface); cursor: pointer; margin-bottom: 9px; transition: all var(--d-fast); padding: 0; text-align: left; display: block; }
.rg-thumb:hover { border-color: var(--ink-300); }
.rg-thumb.on { border-color: var(--green-500); box-shadow: var(--sel-ring); }
.rg-thumb .rt-vid { position: relative; aspect-ratio: 1.6; background: var(--media-well); overflow: hidden; }
.rg-thumb .rt-vid video { width: 100%; height: 100%; object-fit: cover; }
.rg-thumb .rt-grade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.45)); pointer-events: none; }
.rg-thumb .rt-eng { position: absolute; left: 7px; top: 7px; font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.55); padding: 2px 7px; border-radius: var(--r-pill); backdrop-filter: blur(4px); }
.rg-thumb .rt-body { padding: 7px 9px 9px; }
.rg-thumb .rt-look { font-size: 11.5px; font-weight: 700; color: var(--ink-1000); }
.rg-thumb .rt-meta { font-size: 10px; color: var(--ink-500); margin-top: 1px; }
/* detail / player area — scrolls when content exceeds the viewport.
   justify-content:flex-start (not center) so the TOP stays reachable when overflowing;
   auto-margins on the inner block keep it visually centred when there IS room. */
.res-detail { flex: 1; min-width: 0; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 14px; padding: 22px; background: radial-gradient(700px 360px at 50% 0%, rgba(34,197,94,0.05), transparent 60%), var(--bg-soft); }
.res-detail > :first-child { margin-top: auto; }
.res-detail > :last-child { margin-bottom: auto; }
[data-theme="dark"] .res-detail { background: radial-gradient(700px 360px at 50% 0%, rgba(34,197,94,0.07), transparent 60%), var(--bg-canvas); }
.res-counter { font-size: 11.5px; font-weight: 600; color: var(--ink-500); }
.res-counter b { color: var(--ink-900); }
.res-eng { font-size: 11.5px; font-weight: 600; color: var(--ink-600); }
.res-eng .cl-eng { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--green-700); background: var(--green-50); padding: 3px 8px; border-radius: var(--r-pill); margin-left: 4px; }
[data-theme="dark"] .res-eng .cl-eng { background: rgba(34,197,94,0.12); color: var(--green-300); }
/* result player frame — scales to FIT the available height/width (never overflows).
   aspect-ratio holds the shape; max-height caps it to the viewport so the full video +
   controls stay reachable; the .res-detail container scrolls if anything still spills. */
.res-player { position: relative; flex-shrink: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--media-well); box-shadow: var(--shadow-xl); border: 1px solid rgba(255,255,255,0.06);
  aspect-ratio: 0.5625; height: min(448px, 62vh); width: auto; max-width: 100%; }
.res-player.ar-1x1  { aspect-ratio: 1;     height: min(380px, 62vh); }
.res-player.ar-4x5  { aspect-ratio: 0.8;   height: min(400px, 62vh); }
.res-player.ar-16x9 { aspect-ratio: 1.778; height: auto; width: min(520px, 100%); max-height: 62vh; }
.res-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.res-player .pl-grade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(160deg, rgba(34,197,94,0.05), transparent 40%), linear-gradient(0deg, rgba(0,0,0,0.45), transparent 50%); }
.res-player .pl-cap { position: absolute; left: 14px; right: 14px; bottom: 56px; text-align: center; pointer-events: none; }
.res-player .pl-cap .ln { display: inline-block; font-weight: 800; font-size: 15px; color: #fff; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,0.6); padding: 2px 6px; }
.res-player .pl-cap .ln em { font-style: normal; color: var(--green-300); }
.res-player .pl-vbadge { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 700; padding: 4px 9px; border-radius: var(--r-pill); background: rgba(255,255,255,0.92); color: var(--green-700); box-shadow: var(--shadow-sm); }
.res-player .pl-vbadge.flag { color: var(--warn-ink); }
.res-player .pl-vbadge svg { width: 11px; height: 11px; }
.res-nav { display: flex; align-items: center; gap: 12px; max-width: 100%; }
.cnav { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--bg-surface); cursor: pointer; color: var(--ink-700); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--shadow-sm); transition: all var(--d-fast); }
.cnav:hover { background: var(--ink-50); border-color: var(--hairline-strong); }
.cnav:disabled { opacity: 0.3; cursor: default; }
.cnav svg { width: 18px; height: 18px; }
.res-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ra-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: var(--r-pill); border: 1px solid var(--hairline); background: var(--bg-surface); cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-700); transition: all var(--d-fast); }
/* secondary result actions: keep dark ink text on a light hover bg (both themes) */
.ra-btn:hover { background: var(--ink-100); border-color: var(--hairline-strong); color: var(--ink-1000); }
.ra-btn svg { width: 15px; height: 15px; }
.ra-btn.like.on { background: var(--green-50); border-color: var(--green-300); color: var(--green-700); }
.ra-btn.like.on:hover { background: var(--green-100); color: var(--green-800); }
[data-theme="dark"] .ra-btn.like.on { background: rgba(34,197,94,0.1); color: var(--green-300); }
.ra-btn.dislike.on { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.ra-btn.dislike.on:hover { background: var(--danger-soft-2); color: var(--danger); }
/* primary result action (Open Editor): white text on green, hover = darker green */
.ra-btn.primary { background: linear-gradient(135deg, var(--green-500), var(--green-600)); color: var(--amp-hexcoded-color-white); border: none; box-shadow: var(--shadow-green-soft); }
.ra-btn.primary:hover { background: linear-gradient(135deg, var(--green-600), var(--green-700)); color: var(--amp-hexcoded-color-white); box-shadow: var(--shadow-green); }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-300); cursor: pointer; transition: all var(--d-fast); border: none; padding: 0; }
.dots .dot.on { background: var(--green-500); width: 22px; border-radius: var(--r-pill); }
.qc-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: var(--r-pill); background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-200); }
[data-theme="dark"] .qc-pill { background: rgba(34,197,94,0.1); color: var(--green-300); }
.qc-pill svg { width: 13px; height: 13px; }
.qc-pill.flag { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn-border); }
[data-theme="dark"] .qc-pill.flag { color: var(--warning); }
.qc-pill.fail { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.dots .dot.fail { background: var(--danger); }

/* ── gallery thumb status badges (Ready winner / Review / Failed / Dismissed) ── */
.rg-thumb .rt-st { position: absolute; right: 7px; top: 7px; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: var(--shadow-sm); }
.rg-thumb .rt-st svg { width: 12px; height: 12px; }
.rg-thumb .rt-st.win { background: var(--green-500); }
.rg-thumb .rt-st.rev { background: #ff9f0a; }
.rg-thumb .rt-st.fail { background: var(--danger); }
.rg-thumb .rt-st.dim { background: var(--ink-400); }
.rg-thumb.is-fail { border-color: var(--danger-border); }
.rg-thumb.is-dim { opacity: 0.5; }
.rg-thumb .rt-failmesh { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--danger) 22%, #16161a), #0b0b0d 75%); }
.rg-thumb .rt-failic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: color-mix(in srgb, var(--danger) 80%, #fff); }
.rg-thumb .rt-failic svg { width: 22px; height: 22px; }

/* ── FAILED RENDER card (center detail) ── */
.res-player.is-fail { background: var(--bg-surface); border: 1px dashed var(--danger-border); box-shadow: none; display: flex; align-items: center; justify-content: center; }
.fail-card { text-align: center; padding: 22px 20px; max-width: 280px; }
.fail-card .fail-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--danger-soft); color: var(--danger); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.fail-card .fail-ic svg { width: 26px; height: 26px; }
.fail-card .fail-ic.retry { background: var(--accent-soft); }
.fail-card .fail-ic.retry .sp { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--green-500) 28%, transparent); border-top-color: var(--green-500); animation: tspin .8s linear infinite; }
.fail-card .fail-t { font-size: 16px; font-weight: 700; color: var(--ink-1000); letter-spacing: -0.01em; }
.fail-card .fail-s { font-size: 12.5px; color: var(--ink-600); margin-top: 6px; line-height: 1.5; }
.fail-card .fail-s b { color: var(--ink-1000); }
.fail-card .fail-acts { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* ── NEEDS-REVIEW banner (center detail) ── */
.review-banner { display: flex; gap: 11px; align-items: flex-start; max-width: 460px; padding: 13px 15px; border-radius: var(--r-md); background: var(--warn-soft); border: 1px solid var(--warn-border); }
.review-banner .rb-ic { width: 30px; height: 30px; border-radius: 50%; background: #ff9f0a; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.review-banner .rb-ic svg { width: 16px; height: 16px; }
.review-banner .rb-t { font-size: 13px; font-weight: 700; color: var(--warn-ink); }
.review-banner .rb-s { font-size: 12px; color: var(--ink-700); margin-top: 3px; line-height: 1.5; }

/* ── COMPARE · winner + dismiss ── */
.res-player.is-winner { box-shadow: 0 0 0 3px var(--green-500), var(--shadow-xl); }
.res-player .pl-vbadge.win { background: var(--green-500); color: #fff; }
.ra-btn.primary.is-winner { background: linear-gradient(135deg, var(--green-600), var(--green-700)); }
.compare-hint { display: flex; align-items: flex-start; gap: 8px; max-width: 460px; font-size: 11.5px; color: var(--ink-600); line-height: 1.5; padding: 0 6px; }
.compare-hint svg { width: 14px; height: 14px; color: var(--green-600); flex-shrink: 0; margin-top: 1px; }
[data-theme="dark"] .compare-hint svg { color: var(--green-300); }

/* responsive: collapse gallery rail at small center widths */
.res-body[data-compact="true"] .res-gallery { display: none; }

/* ── RIGHT · EDITOR DRAWER ─────────────────────────────────────── */
.editor { background: var(--bg-surface); border-left: 1px solid var(--hairline); display: flex; flex-direction: column; overflow: hidden; }
.work[data-editor-open="false"] .editor { display: none; }
.editor-head { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.editor-head .eh-t { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; }
.editor-head .eh-s { font-size: 11px; color: var(--ink-500); }
.editor-head .eh-close { margin-left: auto; width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--hairline); background: var(--bg-surface); cursor: pointer; color: var(--ink-600); display: inline-flex; align-items: center; justify-content: center; }
.editor-head .eh-close:hover { background: var(--ink-100); }
.editor-head .eh-close svg { width: 15px; height: 15px; }
.editor-scroll { flex: 1; overflow-y: auto; padding: 16px; }
.st-sec { margin-bottom: 22px; }
.st-sec .st-h { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.st-sec .st-h .gl { flex: 1; height: 1px; background: var(--hairline); }
.ed-player { position: relative; aspect-ratio: 0.5625; max-width: 218px; margin: 0 auto 6px; border-radius: var(--r-md); overflow: hidden; background: var(--media-well); box-shadow: var(--shadow-md); }
.ed-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tool-row { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); cursor: pointer; margin-bottom: 7px; transition: all var(--d-fast); }
.tool-row:hover { border-color: var(--hairline-strong); box-shadow: var(--shadow-xs); }
.tool-row .tr-ic { width: 30px; height: 30px; border-radius: var(--r-sm); background: var(--ink-100); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--ink-700); }
[data-theme="dark"] .tool-row .tr-ic { background: var(--bg-elevated); }
.tool-row .tr-ic svg { width: 16px; height: 16px; }
.tool-row .tr-tx { flex: 1; min-width: 0; }
.tool-row .tr-name { display: block; font-size: 13px; font-weight: 600; color: var(--ink-900); }
.tool-row .tr-sub { display: block; font-size: 11px; color: var(--ink-500); margin-top: 1px; }
.cbadge { font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: var(--r-pill); white-space: nowrap; flex-shrink: 0; background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-200); }
[data-theme="dark"] .cbadge { background: rgba(34,197,94,0.1); }
.qc-grp { margin-bottom: 14px; }
.qc-grp .qg-h { font-size: 11px; font-weight: 700; color: var(--ink-700); margin-bottom: 7px; display: flex; align-items: center; gap: 7px; }
.qc-check { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid var(--hairline); border-radius: var(--r-sm); margin-bottom: 6px; background: var(--bg-surface); }
.qc-check .qc-ic { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.qc-check .qc-ic svg { width: 11px; height: 11px; color: #fff; }
.qc-check.pass .qc-ic { background: var(--green-500); }
.qc-check.flag .qc-ic { background: var(--warning); }
.qc-check .qc-nm { font-size: 12px; font-weight: 600; color: var(--ink-900); }
.qc-check .qc-det { font-size: 11px; color: var(--ink-500); margin-top: 2px; line-height: 1.4; }
.qc-check .qc-miss { font-size: 10.5px; color: var(--green-700); font-weight: 600; cursor: pointer; margin-top: 4px; display: inline-block; }
.qc-check .qc-miss:hover { text-decoration: underline; }
.ask-box { border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); padding: 12px; }
.ask-box textarea { width: 100%; border: none; resize: none; background: transparent; font-family: inherit; font-size: 13px; color: var(--ink-900); outline: none; min-height: 48px; }
.ask-box textarea::placeholder { color: var(--ink-400); }
.ask-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ask-chip { font-size: 11px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid var(--hairline); background: var(--bg-surface); cursor: pointer; color: var(--ink-700); }
.ask-chip:hover { border-color: var(--green-300); color: var(--green-700); }
.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.export-tile { padding: 12px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); cursor: pointer; text-align: center; transition: all var(--d-fast); }
.export-tile:hover { border-color: var(--green-300); }
.export-tile .et-ic { font-size: 20px; } .export-tile .et-n { font-size: 12px; font-weight: 600; color: var(--ink-900); margin-top: 5px; } .export-tile .et-s { font-size: 10px; color: var(--ink-500); }

/* ── TOOL PICKER (New project → choose a tool first) ── */
.tp-hero { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r-xl); cursor: pointer; background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(34,197,94,0.03)); border: 1.5px solid var(--green-300); transition: all var(--d-base); }
.tp-hero:hover { box-shadow: var(--shadow-md); border-color: var(--green-500); transform: translateY(-1px); }
[data-theme="dark"] .tp-hero { border-color: rgba(34,197,94,0.35); }
.tp-hero .tp-ic { width: 48px; height: 48px; border-radius: var(--r-md); background: linear-gradient(135deg, var(--green-500), var(--green-700)); color: var(--amp-hexcoded-color-white); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--shadow-green-soft); }
.tp-hero .tp-ic svg { width: 24px; height: 24px; }
.tp-hero .tp-tx { flex: 1; min-width: 0; }
.tp-hero .tp-t { font-size: 16px; font-weight: 800; color: var(--ink-1000); letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.tp-hero .tp-now { font-size: 9px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--amp-hexcoded-color-white); background: var(--green-600); padding: 3px 8px; border-radius: var(--r-pill); }
.tp-hero .tp-s { font-size: 12.5px; color: var(--ink-600); margin-top: 3px; line-height: 1.45; }
.tp-hero .tp-go { margin-left: auto; color: var(--green-600); flex-shrink: 0; }
.tp-soon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tp-soon { position: relative; overflow: hidden; text-align: left; width: 100%; padding: 13px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-soft); cursor: default; transition: border-color var(--d-fast); }
.tp-soon:hover { border-color: var(--hairline-strong); }
/* shimmer removed — the coming-soon cards stay quiet so the live URL→Ad hero leads the eye */
.tp-soon::after { display: none; }
@keyframes tpShimmer { 0% { left: -60%; } 60%,100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .tp-soon::after { animation: none; } }
.tp-soon .tps-head { display: flex; align-items: center; gap: 9px; }
.tp-soon .tps-ic { width: 30px; height: 30px; border-radius: var(--r-sm); background: var(--ink-100); color: var(--ink-500); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
[data-theme="dark"] .tp-soon .tps-ic { background: var(--bg-elevated); }
.tp-soon .tps-ic svg { width: 16px; height: 16px; }
.tp-soon .tps-n { font-size: 13px; font-weight: 700; color: var(--ink-800); }
.tp-soon .tps-tag { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-500); background: var(--ink-100); padding: 3px 7px; border-radius: var(--r-pill); flex-shrink: 0; }
[data-theme="dark"] .tp-soon .tps-tag { background: var(--bg-elevated); }
.tp-soon .tps-tag svg { width: 9px; height: 9px; }
.tp-soon .tps-s { font-size: 11px; color: var(--ink-500); margin-top: 6px; line-height: 1.4; }
.tp-soon .tps-want { margin-top: 9px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-pill); border: 1px dashed var(--green-300); background: var(--green-50); color: var(--green-700); cursor: pointer; font-size: 11px; font-weight: 700; transition: background var(--d-fast); }
[data-theme="dark"] .tp-soon .tps-want { background: rgba(34,197,94,0.1); color: var(--green-300); border-color: rgba(34,197,94,0.35); }
.tp-soon .tps-want:hover { background: var(--green-100); }
[data-theme="dark"] .tp-soon .tps-want:hover { background: rgba(34,197,94,0.18); }
.tp-soon .tps-want svg { width: 12px; height: 12px; }
.tp-soon .tps-want.on { border-style: solid; background: var(--green-500); color: var(--amp-hexcoded-color-white); }
.tp-soon .tps-req { margin-top: 9px; display: none; }
.tp-soon .tps-req.open { display: block; }

/* ════════════════════════════════════════════════════════════════
   ONE REUSABLE POPUP — fixed outer size; internal scroll; airy base
   ════════════════════════════════════════════════════════════════ */
.popup-scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.45); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 28px; }
.popup-scrim.on { display: flex; }
.popup { width: 600px; max-width: 94vw; height: 600px; max-height: 90vh; background: var(--bg-surface); border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--shadow-xl); display: flex; flex-direction: column; overflow: hidden; }
.popup.wide { width: 760px; }
.popup.narrow { width: 520px; }
.popup-head { flex-shrink: 0; padding: 24px 28px 18px; border-bottom: 1px solid var(--hairline); display: flex; align-items: flex-start; gap: 14px; }
.popup-head .ph-txt { flex: 1; min-width: 0; }
.popup-head .ph-eyebrow { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-600); }
.popup-head h3 { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; margin: 5px 0 0; }
.popup-head p { font-size: 12.5px; color: var(--ink-500); margin: 4px 0 0; line-height: 1.45; }
.popup-head .px { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--bg-surface); cursor: pointer; color: var(--ink-600); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.popup-head .px:hover { background: var(--ink-100); }
.popup-head .px svg { width: 16px; height: 16px; }
.popup-body { flex: 1; overflow-y: auto; padding: 22px 28px; min-height: 0; }
.popup-foot { flex-shrink: 0; padding: 14px 28px; border-top: 1px solid var(--hairline); display: flex; align-items: center; gap: 10px; background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.popup-foot .spacer { flex: 1; }
.popup-foot .foot-note { font-size: 11.5px; color: var(--ink-500); display: inline-flex; align-items: center; gap: 6px; }
.popup-foot .foot-note svg { width: 13px; height: 13px; color: var(--ink-400); }
.popup-foot .foot-note.warn { color: var(--warn-ink); }

/* generic popup fragments */
.psub { font-size: 12.5px; color: var(--ink-500); margin: 0 0 16px; line-height: 1.5; }
.psub b { color: var(--ink-900); font-weight: 600; }
.flabel { font-size: 12px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink-800); margin: 18px 0 9px; display: flex; align-items: center; gap: 7px; }
.flabel:first-child { margin-top: 0; }
.flabel .fopt { font-size: 9.5px; font-weight: 600; color: var(--ink-400); }
.flabel .clearbtn { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--ink-500); background: none; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.flabel .clearbtn:hover { color: var(--danger); } .flabel .clearbtn svg { width: 12px; height: 12px; }
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: var(--r-pill); border: 1px solid var(--hairline-strong); background: var(--bg-surface); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-700); transition: all var(--d-fast); }
.chip:hover { border-color: var(--green-300); }
.chip.on, .chip.is-selected { border-color: var(--sel-border); background: var(--sel-bg); color: var(--accent-ink); }
[data-theme="dark"] .chip.on, [data-theme="dark"] .chip.is-selected { color: var(--green-300); }
.chip.dim { opacity: 0.42; cursor: not-allowed; }
.chip.dim:hover { border-color: var(--hairline-strong); }
.gated-note { font-size: 11.5px; color: var(--warn-ink); background: var(--warn-soft); border: 1px solid var(--warn-border); border-radius: var(--r-sm); padding: 9px 12px; line-height: 1.45; margin-top: 10px; }
.gated-note.info { color: var(--info-ink); background: var(--info-soft); border-color: var(--info-border); }
[data-theme="dark"] .gated-note { color: var(--warning); }
.input-line { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 13px; height: 42px; border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-surface); transition: border-color var(--d-fast), box-shadow var(--d-fast); }
.input-line:focus-within { border-color: var(--green-500); box-shadow: var(--focus-ring); }
.input-line input { flex: 1; border: none; background: transparent; outline: none; font-family: inherit; font-size: 13.5px; color: var(--ink-900); }
.input-line input::placeholder { color: var(--ink-400); }
.input-line .ic { color: var(--ink-400); } .input-line .ic svg { width: 16px; height: 16px; }
.input-line .go, .guide-box .gb-go { width: 30px; height: 30px; border-radius: var(--r-sm); border: none; background: var(--accent-soft); color: var(--accent-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--d-fast); }
.input-line .go:hover, .guide-box .gb-go:hover { background: var(--accent-soft-strong); } .input-line .go svg, .guide-box .gb-go svg { width: 15px; height: 15px; }
[data-theme="dark"] .input-line .go, [data-theme="dark"] .guide-box .gb-go { color: var(--green-300); }
.inote { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: var(--r-md); background: var(--ink-50); border: 1px solid var(--hairline); font-size: 12px; color: var(--ink-600); line-height: 1.45; }
[data-theme="dark"] .inote { background: var(--bg-elevated); }
.inote .ii { width: 17px; height: 17px; flex-shrink: 0; border-radius: 50%; border: 1.4px solid var(--ink-400); color: var(--ink-500); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); margin-top: 1px; }
.inote b { color: var(--ink-900); font-weight: 600; }
.sec-lab { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); margin: 0 0 10px; display: flex; align-items: center; gap: 9px; }
.sec-lab .gl { flex: 1; height: 1px; background: var(--hairline); }
.gate-note { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; color: var(--info-ink); background: var(--info-soft); padding: 4px 9px; border-radius: var(--r-pill); }
.gate-note svg { width: 11px; height: 11px; }

/* PILL stepper */
.stepper { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--hairline-strong); border-radius: var(--r-pill); padding: 4px; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--ink-100); cursor: pointer; font-size: 17px; font-weight: 700; color: var(--ink-700); }
.stepper button:hover { background: var(--ink-200); }
.stepper .n { min-width: 36px; text-align: center; font-size: 18px; font-weight: 700; font-family: var(--font-display); }

/* SUBJECT (advertising) tiles */
.subj-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.subj-tile { padding: 18px 14px; border: 1.5px solid var(--hairline); border-radius: var(--r-lg); cursor: pointer; text-align: center; background: var(--bg-surface); transition: all var(--d-base); }
.subj-tile:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); }
.subj-tile.on { border-color: var(--sel-border); box-shadow: var(--sel-ring-2); background: var(--sel-bg); }
.subj-tile .si { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: var(--r-md); background: var(--ink-100); color: var(--ink-700); display: inline-flex; align-items: center; justify-content: center; }
.subj-tile.on .si { background: var(--accent-chip-bg); color: var(--accent-chip-ink); }
[data-theme="dark"] .subj-tile .si { background: var(--bg-elevated); }
.subj-tile .si svg { width: 22px; height: 22px; }
.subj-tile .t { font-size: 14px; font-weight: 700; color: var(--ink-1000); }
.subj-tile .d { font-size: 11px; color: var(--ink-500); margin-top: 3px; line-height: 1.4; }
.subj-detect { font-size: 11.5px; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
[data-theme="dark"] .subj-detect { color: var(--green-300); }

/* product gallery / link */
.tabs { margin-bottom: 16px; }
.tabs button { padding: 7px 15px; font-size: 12.5px; }
.pg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pg-card { position: relative; border: 1.5px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; cursor: pointer; background: var(--bg-surface); transition: all var(--d-fast); }
.pg-card:hover { border-color: var(--green-300); }
.pg-card.on { border-color: var(--green-500); box-shadow: var(--sel-ring-2); }
.pg-card .check { position: absolute; right: 7px; top: 7px; width: 20px; height: 20px; border-radius: 50%; background: var(--green-600); color: #fff; font-size: 11px; display: none; align-items: center; justify-content: center; z-index: 2; }
.pg-card.on .check { display: inline-flex; }
.pg-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pg-card .meta { padding: 8px 10px; } .pg-card .meta .nm { font-size: 12px; font-weight: 600; color: var(--ink-900); } .pg-card .meta .pr { font-size: 11px; color: var(--green-700); font-weight: 600; }
.pg-detected { display: flex; gap: 14px; margin-top: 16px; padding: 14px; border: 1px solid var(--accent-border); border-radius: var(--r-md); background: var(--accent-soft); }
.pg-detected img { width: 88px; height: 88px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; }
.pg-detected .dhead { font-size: 11px; font-weight: 700; color: var(--green-700); display: flex; align-items: center; gap: 6px; }
.pg-detected .dname { font-size: 15px; font-weight: 700; color: var(--ink-1000); margin: 4px 0 2px; }
.pg-detected .dprice { font-size: 12px; color: var(--ink-600); }
.pg-detected .dnotes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.pg-detected .dnotes span { font-size: 10px; font-weight: 600; color: var(--ink-700); background: var(--bg-surface); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 2px 8px; }

/* making pills */
.making-pills { display: flex; gap: 10px; margin-bottom: 18px; }
.making-pill { flex: 1; padding: 16px; border: 1.5px solid var(--hairline); border-radius: var(--r-lg); cursor: pointer; text-align: center; transition: all var(--d-base); background: var(--bg-surface); }
.making-pill:hover { border-color: var(--green-400); }
.making-pill.on { border-color: var(--sel-border); background: var(--sel-bg); }
.making-pill .mp-t { font-size: 14px; font-weight: 700; color: var(--ink-1000); }
.making-pill .mp-d { font-size: 11px; color: var(--ink-500); margin-top: 4px; line-height: 1.4; }
.count-row { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--ink-50); }
[data-theme="dark"] .count-row { background: var(--bg-elevated); }
.count-row .cr-tx { flex: 1; } .count-row .cr-t { font-size: 13px; font-weight: 700; color: var(--ink-900); } .count-row .cr-s { font-size: 11px; color: var(--ink-500); margin-top: 2px; }

/* FRAME steps + live preview + PRO reveal */
.frame-live { display: grid; grid-template-columns: 1fr 200px; gap: 22px; align-items: start; }
.frame-steps { display: flex; flex-direction: column; gap: 16px; }
.fstep .sl { font-size: 13px; font-weight: 700; color: var(--ink-1000); display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.fstep .sl .sval { font-size: 11px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft-strong); padding: 2px 8px; border-radius: var(--r-pill); }
[data-theme="dark"] .fstep .sl .sval { color: var(--green-300); }
.fstep .sh { font-size: 11.5px; color: var(--ink-500); margin-bottom: 8px; }
.frame-phone { position: relative; background: var(--media-well); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); margin: 0 auto; transition: aspect-ratio var(--d-base), max-width var(--d-base); }
.frame-phone video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame-phone .ftag { position: absolute; right: 8px; top: 8px; font-family: var(--font-mono); font-size: 9px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.5); padding: 3px 7px; border-radius: var(--r-pill); }
.frame-phone .fcap { position: absolute; left: 10px; right: 10px; bottom: 16px; text-align: center; color: #fff; font-weight: 800; font-size: 14px; text-shadow: 0 2px 8px rgba(0,0,0,0.7); }
.frame-livenote { font-size: 11px; color: var(--ink-500); text-align: center; margin-top: 10px; }
.mode-banner { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: var(--r-md); margin-bottom: 16px; font-size: 12px; line-height: 1.45; }
.mode-banner.guided { background: var(--ink-50); border: 1px solid var(--hairline); color: var(--ink-600); }
[data-theme="dark"] .mode-banner.guided { background: var(--bg-elevated); }
.mode-banner.pro { background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--green-800); }
[data-theme="dark"] .mode-banner.pro { color: var(--green-300); }
.mode-banner svg { width: 16px; height: 16px; flex-shrink: 0; } .mode-banner b { font-weight: 700; }
.pro-reveal { margin-top: 18px; border: 1px solid var(--accent-border); border-radius: var(--r-md); background: var(--accent-soft); padding: 16px; }
.pro-reveal .prh { font-size: 11px; font-weight: 700; color: var(--green-700); display: flex; align-items: center; gap: 7px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-mono); }
.pro-reveal .prs { font-size: 11.5px; color: var(--ink-600); margin-bottom: 14px; line-height: 1.45; }

/* INSIGHT → IDEA left-rail (gallery Area 1, Variant 1) */
.i2-split { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 16px; align-items: start; }
.i2-split > * { min-width: 0; }
.i2-col-lab { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); margin: 0 0 9px; display: flex; align-items: center; gap: 8px; }
.i2-col-lab .gl { flex: 1; height: 1px; background: var(--hairline); }
.i2-rail { display: flex; flex-direction: column; gap: 8px; }
.insight-card { position: relative; text-align: left; cursor: pointer; width: 100%; border: 1px solid var(--accent-border); border-radius: var(--r-lg); padding: 13px 14px; background: linear-gradient(140deg, var(--accent-soft), var(--bg-surface)); transition: border-color var(--d-fast), box-shadow var(--d-fast); }
.insight-card:hover { border-color: var(--green-300); }
.insight-card.on { border-color: var(--sel-border); box-shadow: var(--sel-ring); }
.insight-card .in-kicker { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--green-700); }
[data-theme="dark"] .insight-card .in-kicker { color: var(--green-400); }
.insight-card .in-kicker svg { width: 11px; height: 11px; }
.insight-card .in-quote { font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1.32; letter-spacing: -0.01em; color: var(--ink-1000); margin: 8px 0 10px; }
.insight-card .in-quote .qm { color: var(--green-500); }
.insight-card .in-prov { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; color: var(--green-800); background: var(--bg-surface); border: 1px solid var(--green-200); border-radius: var(--r-pill); padding: 4px 9px; }
[data-theme="dark"] .insight-card .in-prov { color: var(--green-300); background: rgba(0,0,0,0.22); border-color: rgba(34,197,94,0.25); }
.insight-card .in-prov .pv-ic { font-size: 11px; line-height: 1; }
.insight-card .in-ideacount { position: absolute; top: 12px; right: 12px; font-size: 9.5px; font-weight: 700; font-family: var(--font-mono); color: var(--ink-400); }
.insight-card.on .in-ideacount { color: var(--green-600); }
.ideas-panel { display: none; }
.ideas-panel.on { display: block; }
.idea-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.idea-card { position: relative; text-align: left; padding: 11px 13px; border: 1.5px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); cursor: pointer; transition: border-color var(--d-fast), box-shadow var(--d-fast), background var(--d-fast); width: 100%; }
.idea-card:hover { border-color: var(--ink-300); box-shadow: var(--shadow-xs); }
.idea-card.on { border-color: var(--sel-border); background: var(--sel-bg); box-shadow: var(--sel-ring); }
.idea-card .ic-tag { display: inline-flex; align-items: center; font-size: 9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: var(--r-pill); margin-bottom: 6px; }
.ic-tag.proof { background: var(--info-soft); color: var(--info-ink); }
.ic-tag.benefit { background: var(--accent-chip-bg); color: var(--accent-chip-ink); }
.ic-tag.myth { background: #fff4e0; color: var(--warn-ink); }
.ic-tag.asmr { background: #f0e6ff; color: #7c3aed; }
.ic-tag.gifting { background: #ffe6f0; color: #be185d; }
.ic-tag.occasion { background: #e0f2f1; color: #00695c; }
[data-theme="dark"] .ic-tag.myth { background: var(--warn-soft); color: var(--warning); }
[data-theme="dark"] .ic-tag.asmr { background: rgba(124,58,237,0.22); color: #c4a3ff; }
[data-theme="dark"] .ic-tag.gifting { background: rgba(190,24,93,0.24); color: #ff9ec4; }
[data-theme="dark"] .ic-tag.occasion { background: rgba(0,105,92,0.3); color: #80cbc4; }
.idea-card .ic-title { font-size: 13px; font-weight: 700; color: var(--ink-1000); letter-spacing: -0.01em; padding-right: 18px; }
.idea-card .ic-line { font-size: 11px; color: var(--ink-500); margin-top: 3px; line-height: 1.4; }
.idea-card .ic-check { position: absolute; top: 11px; right: 11px; width: 16px; height: 16px; border-radius: 50%; background: var(--green-500); color: #fff; display: none; align-items: center; justify-content: center; }
.idea-card.on .ic-check { display: inline-flex; }
.idea-card .ic-check svg { width: 10px; height: 10px; }
.gen-chip { display: inline-flex; align-items: center; gap: 7px; margin-top: 9px; padding: 7px 13px; border-radius: var(--r-pill); border: 1px dashed var(--green-300); background: var(--green-50); color: var(--green-700); cursor: pointer; font-size: 12px; font-weight: 600; transition: background var(--d-fast); }
[data-theme="dark"] .gen-chip { background: rgba(34,197,94,0.1); color: var(--green-300); border-color: rgba(34,197,94,0.35); }
.gen-chip:hover { background: var(--green-100); }
.gen-chip svg { width: 13px; height: 13px; }
.idea-write { position: relative; text-align: left; width: 100%; margin-top: 8px; padding: 11px 13px; border: 1.5px dashed var(--hairline-strong); border-radius: var(--r-md); background: transparent; cursor: pointer; transition: border-color var(--d-fast), background var(--d-fast); display: flex; align-items: center; gap: 9px; }
.idea-write:hover { border-color: var(--green-300); background: var(--accent-soft); }
.idea-write .iw-ic { width: 26px; height: 26px; border-radius: var(--r-sm); background: var(--ink-100); color: var(--ink-600); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
[data-theme="dark"] .idea-write .iw-ic { background: var(--bg-elevated); }
.idea-write .iw-ic svg { width: 14px; height: 14px; }
.idea-write .iw-tx { font-size: 12.5px; font-weight: 600; color: var(--ink-800); }
.idea-write .iw-sub { font-size: 10.5px; color: var(--ink-500); margin-top: 1px; }
.guide-box { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 0 6px 0 13px; height: 42px; border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-surface); transition: border-color var(--d-fast), box-shadow var(--d-fast); }
.guide-box:focus-within { border-color: var(--green-500); box-shadow: var(--focus-ring); }
.guide-box svg.lead { width: 15px; height: 15px; color: var(--green-600); flex-shrink: 0; }
.guide-box input { flex: 1; border: none; background: transparent; outline: none; font-family: inherit; font-size: 13px; color: var(--ink-900); }
.guide-box input::placeholder { color: var(--ink-400); }

/* FORMAT & STAGING — format-first auto-preset (gallery Area 2, Option C) */
.fmt-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.fmt-tile { position: relative; text-align: left; padding: 13px; border: 1.5px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); cursor: pointer; transition: all var(--d-fast); }
.fmt-tile:hover { border-color: var(--ink-300); }
.fmt-tile.on { border-color: var(--sel-border); background: var(--sel-bg); box-shadow: var(--sel-ring); }
.fmt-tile.dim { opacity: 0.42; cursor: not-allowed; }
.fmt-tile .ft-ic { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--ink-100); color: var(--ink-700); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 9px; font-size: 16px; }
[data-theme="dark"] .fmt-tile .ft-ic { background: var(--bg-elevated); }
.fmt-tile.on .ft-ic { background: var(--accent-chip-bg); color: var(--accent-chip-ink); }
.fmt-tile .ft-name { font-size: 13px; font-weight: 700; color: var(--ink-1000); }
.fmt-tile .ft-sub { font-size: 11px; color: var(--ink-500); margin-top: 2px; line-height: 1.4; }
.autopreset { display: flex; align-items: center; gap: 11px; margin-top: 16px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--accent-border); background: var(--accent-soft); }
.autopreset .ap-thumb { width: 52px; height: 33px; flex-shrink: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--media-well); }
.autopreset .ap-thumb video { width: 100%; height: 100%; object-fit: cover; }
.autopreset .ap-tx { flex: 1; min-width: 0; }
.autopreset .ap-lab { font-size: 12.5px; font-weight: 700; color: var(--ink-1000); letter-spacing: -0.005em; }
.autopreset .ap-lab .ap-name { color: var(--green-800); }
[data-theme="dark"] .autopreset .ap-lab .ap-name { color: var(--green-300); }
.autopreset .ap-sub { font-size: 10.5px; color: var(--ink-500); margin-top: 2px; display: inline-flex; align-items: center; gap: 7px; }
.autopreset .ap-sub .ap-auto { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--green-700); }
[data-theme="dark"] .autopreset .ap-sub .ap-auto { color: var(--green-400); }
.autopreset .ap-sub .ap-auto svg { width: 11px; height: 11px; }
.ap-change { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 8px 13px; border-radius: var(--r-pill); border: 1px solid var(--hairline-strong); background: var(--bg-surface); color: var(--ink-800); cursor: pointer; font-size: 12px; font-weight: 600; white-space: nowrap; transition: all var(--d-fast); }
.ap-change:hover { border-color: var(--green-300); }
.ap-change svg { width: 13px; height: 13px; }
.preset-reveal { display: none; margin-top: 14px; }
.preset-reveal.open { display: block; }
.preset-reveal .pr-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.preset-reveal .pr-title { font-size: 12px; font-weight: 700; color: var(--ink-900); }
.preset-back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-pill); border: 1px solid var(--hairline); background: var(--bg-surface); color: var(--ink-600); cursor: pointer; font-size: 11px; font-weight: 600; transition: all var(--d-fast); }
.preset-back:hover { background: var(--hover-surface-2); }
.preset-back svg { width: 12px; height: 12px; }
.stage-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.stage-card { position: relative; text-align: left; border: 1.5px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; background: var(--bg-surface); cursor: pointer; transition: all var(--d-fast); padding: 0; }
.stage-card:hover { border-color: var(--ink-300); box-shadow: var(--shadow-xs); }
.stage-card.on { border-color: var(--green-500); box-shadow: var(--sel-ring); }
.stage-card .sc-vid { position: relative; aspect-ratio: 1.455; background: var(--media-well); overflow: hidden; }
.stage-card .sc-vid video { width: 100%; height: 100%; object-fit: cover; }
.stage-card .sc-grade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.45)); pointer-events: none; }
.stage-card .sc-play { position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.92); color: var(--ink-1000); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.stage-card .sc-play svg { width: 12px; height: 12px; margin-left: 1px; }
.stage-card .sc-check { position: absolute; left: 8px; top: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--green-500); color: #fff; display: none; align-items: center; justify-content: center; }
.stage-card.on .sc-check { display: inline-flex; }
.stage-card .sc-check svg { width: 11px; height: 11px; }
.stage-card .sc-body { padding: 8px 10px 10px; }
.stage-card .sc-name { font-size: 12px; font-weight: 700; color: var(--ink-1000); }
.stage-card .sc-desc { font-size: 10px; color: var(--ink-500); margin-top: 1px; line-height: 1.3; }

/* SCRIPT — auto structure, fit meter, over-length block */
.script-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 13px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--ink-50); margin-bottom: 14px; font-size: 12px; }
[data-theme="dark"] .script-bar { background: var(--bg-elevated); }
.script-bar .seg { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-600); }
.script-bar .seg b { color: var(--ink-900); }
.script-fit { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.script-fit .meter { width: 90px; height: 7px; border-radius: var(--r-pill); background: var(--ink-200); overflow: hidden; }
.script-fit .meter span { display: block; height: 100%; background: var(--green-500); transition: width var(--d-base); }
.script-fit.over .meter span { background: var(--danger); }
.script-fit .txt { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--ink-600); }
.script-fit.over .txt { color: var(--danger); }
.script-overbar { display: none; align-items: center; gap: 10px; padding: 10px 13px; border-radius: var(--r-md); background: var(--danger-soft); border: 1px solid var(--danger-border); margin-bottom: 14px; }
.script-overbar.on { display: flex; }
.script-overbar .so-msg { flex: 1; font-size: 12px; font-weight: 600; color: var(--danger); }
.script-tabs { margin-bottom: 14px; flex-wrap: wrap; }
.script-tabs button { padding: 6px 12px; font-size: 11.5px; }
.script-beats { display: flex; flex-direction: column; gap: 9px; }
.script-beat { border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 11px 13px; background: var(--bg-surface); }
.script-beat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.script-beat-name { font-size: 12px; font-weight: 700; color: var(--ink-900); }
.script-beat-tag { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 6px; border-radius: var(--r-xs); background: var(--accent-chip-bg); color: var(--accent-chip-ink); }
.script-beat-head .secs { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--green-600); font-weight: 700; }
.script-line { font-size: 13px; line-height: 1.5; color: var(--ink-800); outline: none; border-radius: var(--r-sm); padding: 4px 6px; margin: 0 -6px; }
.script-line[contenteditable]:focus { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--green-300); }

/* B-ROLL */
.broll-banner { font-size: 11.5px; color: var(--ink-600); line-height: 1.5; padding: 11px 13px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--ink-50); margin-bottom: 14px; }
[data-theme="dark"] .broll-banner { background: var(--bg-elevated); }
.broll-banner b { color: var(--ink-900); }
.broll-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.broll-tile { position: relative; border: 1.5px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; cursor: pointer; background: var(--media-well); transition: all var(--d-fast); }
.broll-tile:hover { border-color: var(--green-300); }
.broll-tile.on { border-color: var(--green-500); box-shadow: var(--sel-ring-2); }
.broll-tile video { width: 100%; aspect-ratio: 0.5625; object-fit: cover; display: block; }
.broll-tile .bt-check { position: absolute; right: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--green-600); color: #fff; font-size: 11px; display: none; align-items: center; justify-content: center; z-index: 2; }
.broll-tile.on .bt-check { display: inline-flex; }
.broll-tile .bt-play { position: absolute; left: 6px; bottom: 28px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(255,255,255,0.9); color: var(--ink-1000); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.broll-tile .bt-play svg { width: 11px; height: 11px; margin-left: 1px; }
.broll-tile .bt-n { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 7px 6px; background: linear-gradient(180deg, transparent, rgba(0,0,0,0.82)); color: #fff; font-size: 10px; font-weight: 600; }
.broll-tile .bt-cost { position: absolute; left: 6px; top: 6px; font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; color: #fff; background: rgba(34,197,94,0.85); padding: 2px 6px; border-radius: var(--r-pill); }
.broll-upload { border: 1.5px dashed var(--hairline-strong); border-radius: var(--r-md); padding: 20px; text-align: center; cursor: pointer; }
.broll-upload:hover { border-color: var(--green-400); }
.broll-upload .bu-t { font-size: 13px; font-weight: 600; color: var(--ink-800); }
.broll-upload .bu-s { font-size: 11px; color: var(--ink-500); margin-top: 5px; line-height: 1.5; }
.broll-cap { font-size: 11px; color: var(--ink-500); margin-top: 12px; display: flex; align-items: center; gap: 7px; }
.broll-cap.full { color: var(--warn-ink); }

/* CAST (gallery Area 3 cleaner) */
.cast2-note { display: flex; gap: 11px; padding: 12px 14px; border: 1px solid var(--accent-border); border-radius: var(--r-md); background: var(--accent-soft); margin-bottom: 16px; }
.cast2-note .cn-ic { color: var(--green-600); flex-shrink: 0; margin-top: 1px; } .cast2-note .cn-ic svg { width: 17px; height: 17px; }
.cast2-note .cn-t { font-size: 12.5px; font-weight: 700; color: var(--ink-1000); }
.cast2-note .cn-m { font-size: 11.5px; color: var(--ink-600); margin-top: 2px; line-height: 1.45; }
.cast2-note .cn-m b { color: var(--green-700); font-weight: 700; } [data-theme="dark"] .cast2-note .cn-m b { color: var(--green-400); }
.cast2-shell { display: grid; grid-template-columns: 168px 1fr; gap: 18px; height: 312px; }
.cast2-shell > * { min-width: 0; }
.cast2-rail { border-right: 1px solid var(--hairline); padding-right: 16px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.cast2-rail .c2-rh { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); padding: 2px 10px 8px; }
.cast2-railitem { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 11px; border-radius: var(--r-md); border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-700); font-size: 12.5px; font-weight: 600; transition: background var(--d-fast), color var(--d-fast); }
.cast2-railitem:hover { background: var(--hover-surface-2); }
.cast2-railitem.on { background: var(--accent-soft-strong); color: var(--accent-ink); } [data-theme="dark"] .cast2-railitem.on { color: var(--green-300); }
.cast2-railitem svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--ink-500); }
.cast2-railitem.on svg { color: var(--green-600); } [data-theme="dark"] .cast2-railitem.on svg { color: var(--green-400); }
.cast2-railitem .c2-ct { margin-left: auto; font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--ink-400); }
.cast2-railitem.on .c2-ct { color: var(--green-600); }
.cast2-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding-right: 4px; }
.cast2-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto 32px 82px; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--bg-surface); cursor: pointer; width: 100%; text-align: left; transition: border-color var(--d-fast), box-shadow var(--d-fast), background var(--d-fast); }
.cast2-row:hover { border-color: var(--green-300); }
.cast2-row.on { border-color: var(--sel-border); box-shadow: var(--sel-ring); background: var(--sel-bg); }
.cast2-row.gated { opacity: 0.55; cursor: not-allowed; }
.cast2-row.gated:hover { border-color: var(--hairline); }
.c2-av { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--ink-100); box-shadow: 0 0 0 1px var(--hairline) inset; }
[data-theme="dark"] .c2-av { background: var(--bg-elevated); }
.c2-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c2-av.nobody { display: inline-flex; align-items: center; justify-content: center; color: var(--ink-500); }
.c2-av.nobody svg { width: 19px; height: 19px; }
.c2-who { min-width: 0; }
.c2-who .c2-nm { font-size: 13px; font-weight: 700; color: var(--ink-1000); letter-spacing: -0.01em; display: flex; align-items: center; gap: 7px; }
.c2-who .c2-vibe { font-size: 11px; color: var(--ink-500); margin-top: 2px; line-height: 1.35; }
.c2-badge { font-size: 8px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 6px; border-radius: var(--r-xs); white-space: nowrap; }
.c2-badge.default { color: var(--accent-chip-ink); background: var(--accent-chip-bg); }
.c2-badge.real { color: #fff; background: var(--green-600); }
.c2-badge.blocked { color: var(--ink-600); background: var(--ink-100); }
[data-theme="dark"] .c2-badge.blocked { color: var(--ink-400); background: var(--bg-elevated); }
.c2-lang { font-size: 10px; font-weight: 600; color: var(--ink-600); background: var(--ink-100); padding: 4px 9px; border-radius: var(--r-pill); white-space: nowrap; }
[data-theme="dark"] .c2-lang { background: var(--bg-elevated); }
.c2-voice { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--hairline-strong); background: var(--bg-surface); cursor: pointer; color: var(--green-700); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all var(--d-fast); }
.c2-voice:hover { background: var(--green-50); border-color: var(--green-300); }
[data-theme="dark"] .c2-voice { color: var(--green-400); }
.c2-voice svg { width: 15px; height: 15px; }
.c2-voice.playing { background: var(--green-500); color: #fff; border-color: var(--green-500); }
.c2-voice-ph { width: 32px; height: 32px; flex-shrink: 0; }
.c2-cost { text-align: right; }
.c2-cost .c2-amt { font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.c2-cost.free .c2-amt { color: var(--green-700); } [data-theme="dark"] .c2-cost.free .c2-amt { color: var(--green-400); }
.c2-cost.paid .c2-amt { color: var(--ink-900); }
.c2-cost.gated .c2-amt { color: var(--ink-400); }
.c2-cost .c2-unit { display: block; font-size: 9px; font-weight: 500; color: var(--ink-500); margin-top: 1px; }

/* on-screen text preview */
.ontext-grid { display: grid; grid-template-columns: 210px 1fr; gap: 20px; }
.ontext-preview { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.ontext-frame { position: relative; width: 188px; aspect-ratio: 0.5625; background: var(--media-well); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.ontext-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ontext-frame .otc { position: absolute; left: 10px; right: 10px; text-align: center; color: #fff; font-weight: 800; font-size: 13px; text-shadow: 0 2px 8px rgba(0,0,0,0.7); }
.ontext-frame .otc.pos-top { top: 18px; } .ontext-frame .otc.pos-mid { top: 46%; } .ontext-frame .otc.pos-bot { bottom: 50px; }
.ontext-frame .otc.clean { background: rgba(0,0,0,0.5); border-radius: 6px; padding: 3px; } .ontext-frame .otc.minimal { font-weight: 600; font-size: 12px; }
.ontext-frame .ots { position: absolute; left: 10px; bottom: 14px; background: rgba(255,255,255,0.94); color: var(--ink-1000); font-size: 10px; font-weight: 700; padding: 5px 9px; border-radius: var(--r-sm); }
.ontext-pnote { font-size: 10.5px; color: var(--ink-500); }
.ontext-controls { min-width: 0; }

/* audience / music tiles */
.tilegrid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.tile { padding: 13px; border: 1px solid var(--hairline); border-radius: var(--r-md); cursor: pointer; transition: all var(--d-fast); background: var(--bg-surface); display: flex; gap: 11px; align-items: flex-start; }
.tile:hover { border-color: var(--green-300); } .tile.on { border-color: var(--sel-border); background: var(--sel-bg); }
.tile .te { font-size: 21px; flex-shrink: 0; }
.tile .tt { font-size: 13px; font-weight: 700; color: var(--ink-1000); }
.tile .td { font-size: 11px; color: var(--ink-500); margin-top: 2px; line-height: 1.4; }
.tile .tplay { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--bg-surface); cursor: pointer; color: var(--green-700); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: auto; }
.tile .tplay svg { width: 12px; height: 12px; }
.music-rec { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--accent-border); border-radius: var(--r-md); background: var(--accent-soft); margin-bottom: 14px; }
.music-rec .mr-play { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--green-600); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.music-rec .mr-play svg { width: 15px; height: 15px; }
.music-rec .mr-t { font-size: 12.5px; font-weight: 700; color: var(--ink-1000); }
.music-rec .mr-s { font-size: 11px; color: var(--ink-600); }
.music-rec .mr-tag { margin-left: auto; font-size: 9px; font-weight: 700; color: var(--green-700); background: var(--bg-surface); padding: 3px 7px; border-radius: var(--r-pill); border: 1px solid var(--green-200); }

/* reference / space */
.ref-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.ref-tile { position: relative; border: 1.5px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; cursor: pointer; background: var(--media-well); }
.ref-tile:hover { border-color: var(--green-300); }
.ref-tile.on { border-color: var(--green-500); box-shadow: var(--sel-ring-2); }
.ref-tile video { width: 100%; aspect-ratio: 0.5625; object-fit: cover; display: block; }
.ref-tile .rt-n { position: absolute; left: 0; right: 0; bottom: 0; padding: 11px 7px 6px; background: linear-gradient(180deg, transparent, rgba(0,0,0,0.82)); color: #fff; font-size: 10px; font-weight: 600; }
.ref-tile .rt-check { position: absolute; right: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--green-600); color: #fff; font-size: 11px; display: none; align-items: center; justify-content: center; z-index: 2; }
.ref-tile.on .rt-check { display: inline-flex; }
.space-upload { border: 1.5px dashed var(--hairline-strong); border-radius: var(--r-md); padding: 22px; text-align: center; cursor: pointer; margin-bottom: 14px; }
.space-upload:hover { border-color: var(--green-400); }
.space-upload .su-ic { color: var(--green-600); } .space-upload .su-ic svg { width: 26px; height: 26px; }
.space-upload .su-t { font-size: 13px; font-weight: 700; color: var(--ink-900); margin-top: 8px; }
.space-upload .su-s { font-size: 11px; color: var(--ink-500); margin-top: 4px; line-height: 1.5; }

/* breakdown / topup / cost-confirm */
.kv-list { display: flex; flex-direction: column; gap: 2px; }
.kv-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--hairline); }
.kv-row:last-child { border-bottom: none; }
.kv-row .kv-k { font-size: 13px; color: var(--ink-700); } .kv-row .kv-k .kv-s { display: block; font-size: 11px; color: var(--ink-500); }
.kv-row .kv-v { margin-left: auto; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--ink-1000); }
.kv-total { display: flex; align-items: center; margin-top: 8px; padding-top: 12px; border-top: 2px solid var(--hairline-strong); }
.kv-total .kt-k { font-size: 14px; font-weight: 700; } .kv-total .kt-v { margin-left: auto; font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--green-700); }
.pack-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.pack { position: relative; padding: 16px; border: 1.5px solid var(--hairline); border-radius: var(--r-md); cursor: pointer; text-align: center; transition: all var(--d-fast); }
.pack:hover { border-color: var(--green-400); } .pack.best { border-color: var(--green-500); }
.pack .best-tag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 700; color: #fff; background: var(--green-600); padding: 2px 9px; border-radius: var(--r-pill); }
.pack .pk-cr { font-size: 20px; font-weight: 800; font-family: var(--font-display); color: var(--ink-1000); } .pack .pk-pr { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.confirm-cost { text-align: center; padding: 12px 0 4px; }
.confirm-cost .cc-big { font-family: var(--font-display); font-size: 44px; font-weight: 800; color: var(--green-700); letter-spacing: -0.03em; }
.confirm-cost .cc-u { font-size: 13px; color: var(--ink-500); margin-top: 2px; }
.confirm-cost .cc-bal { font-size: 12px; color: var(--ink-600); margin-top: 14px; }
.confirm-cost .cc-bal b { color: var(--ink-900); }
.confirm-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--ink-50); border: 1px solid var(--hairline); margin-bottom: 14px; font-size: 12.5px; color: var(--ink-700); line-height: 1.5; }
[data-theme="dark"] .confirm-line { background: var(--bg-elevated); }
.confirm-line svg { width: 18px; height: 18px; color: var(--green-600); flex-shrink: 0; }
.confirm-line b { color: var(--ink-900); }

/* cascade confirm */
.cascade-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.cascade-row { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); }
.cascade-row .cr-ic { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cascade-row .cr-ic svg { width: 14px; height: 14px; }
.cascade-row.will .cr-ic { background: var(--warn-soft); color: var(--warn-ink); }
.cascade-row.may .cr-ic { background: var(--ink-100); color: var(--ink-600); } [data-theme="dark"] .cascade-row.may .cr-ic { background: var(--bg-elevated); }
.cascade-row.keep .cr-ic { background: var(--accent-chip-bg); color: var(--accent-chip-ink); }
.cascade-row .cr-tx { flex: 1; min-width: 0; }
.cascade-row .cr-n { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.cascade-row .cr-d { font-size: 11px; color: var(--ink-500); margin-top: 1px; }
.cascade-row .cr-tag { font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.cascade-row.will .cr-tag { background: var(--warn-soft); color: var(--warn-ink); }
.cascade-row.may .cr-tag { background: var(--ink-100); color: var(--ink-600); } [data-theme="dark"] .cascade-row.may .cr-tag { background: var(--bg-elevated); }
.cascade-row.keep .cr-tag { background: var(--accent-chip-bg); color: var(--accent-chip-ink); }

/* clone capture flow */
.clone-steps { display: flex; flex-direction: column; gap: 12px; }
.clone-step { display: flex; gap: 13px; align-items: flex-start; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); }
.clone-step .cs-n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-chip-bg); color: var(--accent-chip-ink); font-family: var(--font-mono); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.clone-step .cs-t { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.clone-step .cs-d { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; line-height: 1.45; }
.consent-box { display: flex; gap: 10px; align-items: flex-start; padding: 13px; border: 1px solid var(--accent-border); border-radius: var(--r-md); background: var(--accent-soft); margin-top: 14px; }
.consent-box .cb-check { width: 20px; height: 20px; border-radius: var(--r-xs); border: 1.5px solid var(--green-500); flex-shrink: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--bg-surface); }
.consent-box .cb-check.on { background: var(--green-500); }
.consent-box .cb-check svg { width: 13px; height: 13px; opacity: 0; } .consent-box .cb-check.on svg { opacity: 1; }
.consent-box .cb-tx { font-size: 11.5px; color: var(--ink-700); line-height: 1.5; }

/* compare-looks explainer */
.compare-note { display: flex; gap: 11px; padding: 13px 14px; border: 1px solid var(--accent-border); border-radius: var(--r-md); background: var(--accent-soft); margin-bottom: 14px; }
.compare-note svg { width: 18px; height: 18px; color: var(--green-600); flex-shrink: 0; margin-top: 1px; }
.compare-note .cmn-t { font-size: 12.5px; font-weight: 700; color: var(--ink-1000); }
.compare-note .cmn-m { font-size: 11.5px; color: var(--ink-600); margin-top: 2px; line-height: 1.45; }
.eng-list { display: flex; flex-direction: column; gap: 7px; }
.eng-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); }
.eng-row .er-d { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-chip-bg); color: var(--accent-chip-ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; } .eng-row .er-d svg { width: 13px; height: 13px; }
.eng-row .er-n { font-size: 13px; font-weight: 600; color: var(--ink-900); } .eng-row .er-note { font-size: 11px; color: var(--ink-500); margin-left: auto; }

/* brand dropdown */
.dd { position: fixed; z-index: 1100; min-width: 252px; background: var(--bg-elevated); border: 1px solid var(--hairline); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px; display: none; }
.dd.on { display: block; }
.dd .dd-h { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); padding: 7px 10px 4px; }
.dd-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; }
.dd-item:hover { background: var(--hover-surface); }
.dd-item .ddot { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--green-400), var(--green-700)); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.dd-item .ddn { font-size: 13px; font-weight: 600; color: var(--ink-900); } .dd-item .dds { font-size: 11px; color: var(--ink-500); }
.dd-item.on { background: var(--accent-soft-strong); }
.dd-add { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; color: var(--green-700); font-size: 12.5px; font-weight: 600; border-top: 1px solid var(--hairline); margin-top: 4px; }
.dd-add:hover { background: var(--green-50); } .dd-add svg { width: 14px; height: 14px; }

/* toast / coach */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 1500; opacity: 0; pointer-events: none; transition: all var(--d-base) var(--ease-out); }
.toast-wrap.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast { display: inline-flex; align-items: center; gap: 9px; background: var(--ink-1000); color: var(--ink-0); padding: 11px 18px; border-radius: var(--r-pill); box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 600; }
[data-theme="dark"] .toast { background: var(--bg-elevated); color: var(--ink-900); border: 1px solid var(--hairline); }
.toast .ind { width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); }
.coach { position: fixed; top: 70px; left: 50%; transform: translateX(-50%) translateY(-12px); z-index: 1400; background: var(--bg-surface); border: 1px solid var(--green-200); border-radius: var(--r-pill); box-shadow: var(--shadow-lg); padding: 10px 16px; font-size: 12.5px; color: var(--ink-800); display: none; align-items: center; gap: 9px; }
.coach.on { display: inline-flex; }
.coach .c-ic { color: var(--green-600); } .coach .c-ic svg { width: 15px; height: 15px; }

@media (max-width: 1180px) { .frame-live { grid-template-columns: 1fr; } }

/* ════════════════════════════════════════════════════════════════
   ░ ONBOARDING + BRAND KIT ░ — ADDITIVE. Built strictly on the shared
   tokens/primitives above (--sel-*, --accent-*, .btn, .chip, .field,
   .subj-tile/.input-line, .seg-track). No new colour values; all flips
   with the theme via the existing tokens.
   ════════════════════════════════════════════════════════════════ */

/* — Full-screen onboarding shell — */
.ob-wrap { max-width: 760px; margin: 0 auto; padding: 30px 32px 64px; }
.ob-steps { display: flex; align-items: center; gap: 0; margin: 4px 0 30px; }
.ob-steps .ob-step { display: flex; align-items: center; gap: 9px; }
.ob-steps .ob-num { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-family: var(--font-mono);
  border: 1.5px solid var(--hairline-strong); background: var(--bg-surface); color: var(--ink-500);
  transition: all var(--d-fast); }
.ob-steps .ob-num svg { width: 14px; height: 14px; }
.ob-steps .ob-lbl { font-size: 12px; font-weight: 600; color: var(--ink-500); white-space: nowrap; }
.ob-steps .ob-line { flex: 1; height: 1.5px; background: var(--hairline); margin: 0 12px; min-width: 18px; }
.ob-step.done .ob-num { background: var(--green-500); border-color: var(--green-500); color: var(--amp-hexcoded-color-white); }
.ob-step.done .ob-lbl { color: var(--ink-700); }
.ob-step.cur .ob-num { border-color: var(--sel-border); background: var(--sel-bg); color: var(--accent-ink); box-shadow: var(--sel-ring-2); }
.ob-step.cur .ob-lbl { color: var(--ink-1000); }
.ob-step.done + .ob-line { background: var(--green-400); }

.ob-pane { display: none; }
.ob-pane.on { display: block; animation: obIn var(--d-base) var(--ease-out); }
@keyframes obIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.ob-eyebrow { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-700); }
.ob-h { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; margin: 8px 0 0; color: var(--ink-1000); }
.ob-h em { font-style: normal; color: var(--green-600); }
.ob-sub { font-size: 14px; color: var(--ink-600); margin-top: 9px; line-height: 1.55; max-width: 560px; }
.ob-foot { display: flex; align-items: center; gap: 10px; margin-top: 30px; }
.ob-foot .spacer { flex: 1; }

/* welcome hero badge */
.ob-welcome-badge { width: 64px; height: 64px; border-radius: var(--r-lg); margin-bottom: 18px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700)); color: var(--amp-hexcoded-color-white);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-green-soft); }
.ob-welcome-badge svg { width: 30px; height: 30px; }
.ob-bullets { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 12px; }
.ob-bullets li { display: flex; align-items: flex-start; gap: 11px; font-size: 13.5px; color: var(--ink-700); }
.ob-bullets li .bi { width: 26px; height: 26px; border-radius: var(--r-sm); flex-shrink: 0;
  background: var(--accent-chip-bg); color: var(--accent-chip-ink); display: inline-flex; align-items: center; justify-content: center; }
.ob-bullets li .bi svg { width: 15px; height: 15px; }
.ob-bullets li b { color: var(--ink-1000); font-weight: 600; }

/* connect options (step 2) — reuse subj-tile look, full-width rows */
.ob-connect { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.ob-conn-tile { display: flex; align-items: center; gap: 15px; padding: 16px 18px;
  border: 1.5px solid var(--hairline); border-radius: var(--r-lg); background: var(--bg-surface);
  cursor: pointer; text-align: left; width: 100%; transition: all var(--d-base); }
.ob-conn-tile:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); }
.ob-conn-tile.on { border-color: var(--sel-border); box-shadow: var(--sel-ring-2); background: var(--sel-bg); }
.ob-conn-tile .ci { width: 44px; height: 44px; border-radius: var(--r-md); flex-shrink: 0;
  background: var(--ink-100); color: var(--ink-700); display: inline-flex; align-items: center; justify-content: center; }
.ob-conn-tile.on .ci { background: var(--accent-chip-bg); color: var(--accent-chip-ink); }
.ob-conn-tile .ci svg { width: 22px; height: 22px; }
.ob-conn-tile .ct-t { font-size: 14.5px; font-weight: 700; color: var(--ink-1000); }
.ob-conn-tile .ct-s { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.ob-conn-tile .ct-go { margin-left: auto; flex-shrink: 0; color: var(--ink-400); }
.ob-conn-tile.on .ct-go { color: var(--green-600); }
.ob-conn-tile .ct-go svg { width: 18px; height: 18px; }
.ob-conn-url { margin-top: 12px; display: none; }
.ob-conn-url.on { display: block; }

/* scanning → confirmation */
.ob-scan { margin-top: 22px; padding: 22px; border: 1px solid var(--accent-border); border-radius: var(--r-lg);
  background: var(--accent-soft); display: none; align-items: center; gap: 15px; }
.ob-scan.on { display: flex; }
.ob-scan .scan-sp { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  border: 3px solid var(--accent-border); border-top-color: var(--green-500); animation: spin 0.8s linear infinite; }
.ob-scan.done .scan-sp { border: none; background: var(--green-500); color: var(--amp-hexcoded-color-white); display: inline-flex; align-items: center; justify-content: center; animation: none; }
.ob-scan.done .scan-sp svg { width: 19px; height: 19px; }
.ob-scan .scan-t { font-size: 13.5px; font-weight: 700; color: var(--ink-1000); }
.ob-scan .scan-s { font-size: 12px; color: var(--ink-600); margin-top: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* — BRAND KIT (shared by onboarding step 3 + Settings → Brand Kit) — */
.bk { display: flex; flex-direction: column; gap: 22px; }
.bk-block { border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--bg-surface); padding: 18px 20px; }
.bk-block .bk-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bk-block .bk-title { font-size: 13.5px; font-weight: 700; color: var(--ink-1000); }
.bk-block .bk-hint { font-size: 11.5px; color: var(--ink-500); margin-left: auto; text-align: right; }
.bk-block .bk-spacer { flex: 1; }

/* logo */
.bk-logo-row { display: flex; align-items: center; gap: 16px; }
.bk-logo-prev { width: 76px; height: 76px; border-radius: var(--r-md); flex-shrink: 0;
  border: 1px solid var(--hairline); background: var(--ink-50); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.bk-logo-prev img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.bk-logo-prev .lw { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: -0.02em; color: var(--ink-1000); }
.bk-logo-meta .lm-d { font-size: 12px; color: var(--ink-500); margin-top: 2px; }

/* color swatches */
.bk-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.bk-swatch { display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; border: none; background: transparent; padding: 0; }
.bk-swatch .sw-chip { width: 52px; height: 52px; border-radius: var(--r-md); border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-xs); position: relative; transition: transform var(--d-fast), box-shadow var(--d-fast); }
.bk-swatch:hover .sw-chip { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.bk-swatch.on .sw-chip { box-shadow: var(--sel-ring), var(--shadow-sm); }
.bk-swatch .sw-edit { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: #111; display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--d-fast); }
.bk-swatch:hover .sw-edit { opacity: 1; }
.bk-swatch .sw-edit svg { width: 10px; height: 10px; }
.bk-swatch .sw-hex { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--ink-600); }
.bk-swatch .sw-role { font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-500); }

/* fonts */
.bk-fonts { display: flex; flex-wrap: wrap; gap: 10px; }
.bk-font { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md); background: var(--bg-surface); }
.bk-font .bf-spec { font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-500); }
.bk-font .bf-name { font-size: 15px; font-weight: 700; color: var(--ink-1000); }
.bk-font .bf-name.serif { font-family: var(--font-display); }
.bk-font .bf-change { font-size: 11.5px; font-weight: 600; color: var(--green-700); border: none; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: var(--r-sm); }
.bk-font .bf-change:hover { background: var(--green-50); }

/* tone of voice — segmented cards */
.bk-tones { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.bk-tone { text-align: left; padding: 13px 15px; border: 1.5px solid var(--hairline); border-radius: var(--r-md);
  background: var(--bg-surface); cursor: pointer; transition: all var(--d-fast); }
.bk-tone:hover { border-color: var(--green-400); }
.bk-tone.on { border-color: var(--sel-border); box-shadow: var(--sel-ring-2); background: var(--sel-bg); }
.bk-tone .bt-t { font-size: 13.5px; font-weight: 700; color: var(--ink-1000); display: flex; align-items: center; gap: 7px; }
.bk-tone.on .bt-t .bt-ck { color: var(--green-600); }
.bk-tone .bt-ck { color: transparent; } .bk-tone .bt-ck svg { width: 14px; height: 14px; }
.bk-tone .bt-s { font-size: 11.5px; color: var(--ink-500); margin-top: 3px; line-height: 1.4; }

/* do-not-say chips */
.bk-dns { display: flex; flex-direction: column; gap: 14px; }
.bk-dns-group .dns-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 8px; }
.bk-dns-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dns-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--danger-border); background: var(--danger-soft); color: var(--warn-ink); font-size: 12.5px; font-weight: 600; }
.dns-chip .x { width: 18px; height: 18px; border-radius: 50%; border: none; background: transparent; color: inherit; opacity: 0.6;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dns-chip .x:hover { opacity: 1; background: var(--hover-surface); }
.dns-chip .x svg { width: 12px; height: 12px; }
.dns-add { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 12px; border-radius: var(--r-pill);
  border: 1px dashed var(--hairline-strong); background: transparent; }
.dns-add input { border: none; background: transparent; outline: none; font-family: inherit; font-size: 12.5px; color: var(--ink-900); width: 120px; }
.dns-add input::placeholder { color: var(--ink-400); }
.dns-add .add-go { width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--accent-soft); color: var(--accent-ink);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dns-add .add-go svg { width: 13px; height: 13px; }

/* connected channels (brand-kit view) */
.bk-channels { display: flex; flex-direction: column; gap: 10px; }
.bk-chan { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); }
.bk-chan .chn-ic { width: 34px; height: 34px; border-radius: var(--r-sm); flex-shrink: 0; background: var(--ink-100); color: var(--ink-700); display: inline-flex; align-items: center; justify-content: center; }
.bk-chan .chn-ic svg { width: 17px; height: 17px; }
.bk-chan .chn-n { font-size: 13px; font-weight: 700; color: var(--ink-1000); }
.bk-chan .chn-s { font-size: 11.5px; color: var(--ink-500); margin-top: 1px; }
.bk-chan .chn-state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; }
.bk-chan .chn-state.connected { color: var(--green-700); }
.bk-chan .chn-state.connected svg { width: 14px; height: 14px; }
.bk-chan .chn-state.off { color: var(--ink-500); }

/* settings nav links (reuse for Brand Kit entry) */
.set-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; max-width: 560px; }
.set-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--hairline);
  border-radius: var(--r-lg); background: var(--bg-surface); cursor: pointer; text-align: left; width: 100%; transition: all var(--d-base); }
.set-link:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.set-link.disabled { cursor: default; opacity: 0.62; } .set-link.disabled:hover { transform: none; box-shadow: none; border-color: var(--hairline); }
.set-link .sl-ic { width: 42px; height: 42px; border-radius: var(--r-md); flex-shrink: 0; background: var(--accent-chip-bg); color: var(--accent-chip-ink); display: inline-flex; align-items: center; justify-content: center; }
.set-link.disabled .sl-ic { background: var(--ink-100); color: var(--ink-500); }
.set-link .sl-ic svg { width: 21px; height: 21px; }
/* the text column: title + subtitle must STACK (they were inline → ran together) */
.set-link > span:nth-of-type(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.set-link .sl-t { font-size: 14.5px; font-weight: 700; color: var(--ink-1000); display: block; }
.set-link .sl-s { font-size: 12px; line-height: 1.45; color: var(--ink-500); display: block; }
.set-link .sl-go { margin-left: auto; color: var(--ink-400); flex-shrink: 0; } .set-link .sl-go svg { width: 18px; height: 18px; }
.set-link .sl-tag { display: inline-block; margin-left: 8px; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-500); background: var(--ink-100); border-radius: var(--r-pill); padding: 2px 7px; vertical-align: middle; }
[data-theme="dark"] .set-link .sl-tag { background: var(--bg-elevated); }

/* ════ SETTINGS · two-pane (full single-brand + AGENCY coverage) ════ */
.set2 { display: grid; grid-template-columns: 234px 1fr; gap: 0; border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-surface); box-shadow: var(--shadow-xs); min-height: 560px; }
.set2-nav { border-right: 1px solid var(--hairline); padding: 14px; background: var(--bg-soft); }
.set2-nav .nl { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-400); padding: 6px 11px 8px; }
.set2-item { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: var(--r-md); border: none; background: transparent; cursor: pointer; color: var(--ink-700); width: 100%; text-align: left; font-size: 13.5px; font-weight: 600; transition: background var(--d-fast), color var(--d-fast); }
.set2-item svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--ink-500); transition: color var(--d-fast); }
.set2-item:hover { background: var(--hover-surface); color: var(--ink-1000); }
.set2-item.on { background: var(--accent-soft-strong); color: var(--accent-ink); }
.set2-item.on svg { color: var(--green-600); }
[data-theme="dark"] .set2-item.on, [data-theme="dark"] .set2-item.on svg { color: var(--green-300); }
.set2-item .badge2 { margin-left: auto; font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--green-700); padding: 2px 7px; border-radius: var(--r-pill); border: 1px solid var(--green-200); background: var(--green-50); }
[data-theme="dark"] .set2-item .badge2 { color: var(--green-300); background: color-mix(in srgb, var(--green-500) 12%, transparent); border-color: color-mix(in srgb, var(--green-500) 26%, transparent); }
.set2-sep { height: 1px; background: var(--hairline); margin: 10px 6px; }
.set2-pane { padding: 28px 30px; overflow-y: auto; }
.set2-pane .ph { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.set2-pane .ph .phi { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--green-600); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
[data-theme="dark"] .set2-pane .ph .phi { color: var(--green-300); }
.set2-pane .ph .phi svg { width: 21px; height: 21px; }
.set2-pane .ph h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--ink-1000); display: flex; align-items: center; gap: 9px; }
.set2-pane .ph h2 .b2 { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-700); padding: 3px 8px; border-radius: var(--r-pill); background: var(--green-50); border: 1px solid var(--green-200); }
[data-theme="dark"] .set2-pane .ph h2 .b2 { color: var(--green-300); background: color-mix(in srgb, var(--green-500) 12%, transparent); border-color: color-mix(in srgb, var(--green-500) 26%, transparent); }
.set2-pane .ph .psub { font-size: 13px; color: var(--ink-600); margin-top: 4px; line-height: 1.5; max-width: 520px; }
.set-card { border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--bg-surface); overflow: hidden; box-shadow: var(--shadow-xs); }
.set-card + .set-card { margin-top: 16px; }
.set-row { display: flex; align-items: center; gap: 15px; padding: 16px 18px; transition: background var(--d-fast); }
.set-row + .set-row { border-top: 1px solid var(--hairline); }
.set-row.click { cursor: pointer; }
.set-row.click:hover { background: var(--hover-surface-2); }
.set-row .ri { width: 38px; height: 38px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--green-600); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
[data-theme="dark"] .set-row .ri { color: var(--green-300); }
.set-row .ri svg { width: 18px; height: 18px; }
.set-row .ri.brandmark { color: #fff; background: linear-gradient(135deg, var(--green-400), var(--green-700)); font-weight: 700; font-size: 13px; }
.set-row .rt { min-width: 0; flex: 1; }
.set-row .rt .rn { font-size: 14px; font-weight: 600; color: var(--ink-1000); display: inline-flex; align-items: center; gap: 8px; }
.set-row .rt .rd { font-size: 12.5px; color: var(--ink-500); margin-top: 2px; line-height: 1.45; }
.set-row .rv { margin-left: auto; display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.set-row .rv .val { font-size: 12.5px; color: var(--ink-600); font-weight: 500; }
.set-row .rv .chev { color: var(--ink-400); display: inline-flex; }
.set-row .rv .chev svg { width: 17px; height: 17px; }
.chip-pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-200); white-space: nowrap; }
[data-theme="dark"] .chip-pill { background: color-mix(in srgb, var(--green-500) 12%, transparent); color: var(--green-300); border-color: color-mix(in srgb, var(--green-500) 26%, transparent); }
.chip-pill.current { background: var(--green-500); color: #fff; border-color: transparent; }
.pane-cap { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); margin: 28px 0 13px; }
.pane-cap:first-child { margin-top: 0; }
.add-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px dashed var(--hairline-strong); border-radius: var(--r-md); background: transparent; color: var(--green-700); font-size: 13.5px; font-weight: 600; cursor: pointer; width: 100%; transition: background var(--d-fast), border-color var(--d-fast); margin-top: 14px; text-align: left; }
[data-theme="dark"] .add-row { color: var(--green-300); }
.add-row:hover { background: var(--accent-soft); border-color: var(--green-400); }
.add-row .ai { width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--accent-border); background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.add-row .ai svg { width: 16px; height: 16px; }
.add-row .at { display: flex; flex-direction: column; line-height: 1.25; }
.add-row .ad { font-size: 11.5px; font-weight: 500; color: var(--ink-500); margin-top: 1px; }
.paste-site { display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 8px 0 15px; border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-surface); margin-top: 14px; transition: border-color var(--d-fast), box-shadow var(--d-fast); }
.paste-site:focus-within { border-color: var(--green-500); box-shadow: var(--sel-ring); }
.paste-site .lk { color: var(--ink-400); display: inline-flex; flex-shrink: 0; }
.paste-site .lk svg { width: 17px; height: 17px; }
.paste-site input { flex: 1; border: none; background: transparent; outline: none; font-family: inherit; font-size: 13.5px; color: var(--ink-1000); }
.paste-site input::placeholder { color: var(--ink-400); }
/* tables (billing usage, members) */
.tbl-wrap { border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl thead th { text-align: left; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500); padding: 11px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--hairline); white-space: nowrap; }
table.tbl tbody td { padding: 13px 16px; border-top: 1px solid var(--hairline); color: var(--ink-800); vertical-align: middle; }
table.tbl tbody tr:first-child td { border-top: none; }
table.tbl .cell-brand { display: inline-flex; align-items: center; gap: 10px; }
table.tbl .cell-brand .bd { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
table.tbl .cell-brand .nm { font-weight: 600; color: var(--ink-1000); }
table.tbl .num { font-family: var(--font-mono); font-weight: 600; color: var(--ink-900); }
table.tbl .cell-member { display: inline-flex; align-items: center; gap: 11px; }
table.tbl .cell-member .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--green-400), var(--green-700)); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
table.tbl .cell-member .mn { font-weight: 600; color: var(--ink-1000); }
table.tbl .cell-member .me { font-size: 11.5px; color: var(--ink-500); }
.tbl-foot { padding: 13px 16px; border-top: 1px solid var(--hairline); background: var(--bg-soft); font-size: 12px; color: var(--ink-600); display: flex; align-items: center; gap: 8px; }
.tbl-foot .num { font-family: var(--font-mono); font-weight: 700; color: var(--ink-1000); }
.tbl-foot .spacer { flex: 1; }
.role { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid var(--hairline-strong); color: var(--ink-700); background: var(--bg-surface); white-space: nowrap; }
.role.admin { color: var(--green-700); border-color: var(--green-200); background: var(--green-50); }
[data-theme="dark"] .role.admin { color: var(--green-300); background: color-mix(in srgb, var(--green-500) 12%, transparent); border-color: color-mix(in srgb, var(--green-500) 26%, transparent); }
.brand-access { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.ba-tag { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); background: var(--ink-100); color: var(--ink-700); border: 1px solid var(--hairline); white-space: nowrap; }
.ba-tag.all { background: var(--accent-soft); color: var(--green-700); border-color: var(--accent-border); }
[data-theme="dark"] .ba-tag.all { color: var(--green-300); }
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.plan-card { position: relative; border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-surface); padding: 16px 15px; cursor: pointer; transition: border-color var(--d-fast), box-shadow var(--d-fast), transform var(--d-fast); }
.plan-card:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.plan-card.on { border-color: var(--green-500); box-shadow: var(--sel-ring); background: color-mix(in srgb, var(--green-500) 5%, var(--bg-surface)); }
.plan-card .pn { font-size: 13px; font-weight: 700; color: var(--ink-1000); }
.plan-card .pp { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink-1000); margin-top: 7px; }
.plan-card .pp small { font-family: var(--font-body); font-size: 11px; font-weight: 500; color: var(--ink-500); }
.plan-card .pd { font-size: 11px; color: var(--ink-500); margin-top: 6px; line-height: 1.4; }
.plan-card .pcur { position: absolute; top: 12px; right: 12px; font-size: 9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--green-700); }
[data-theme="dark"] .plan-card .pcur { color: var(--green-300); }
.plan-card.on .pcur { display: inline-flex; align-items: center; gap: 4px; }
.plan-card:not(.on) .pcur { display: none; }
.plan-card .pcur svg { width: 11px; height: 11px; }
.cred-hero { display: flex; align-items: center; gap: 18px; padding: 20px 22px; border-radius: var(--r-md); background: linear-gradient(135deg, color-mix(in srgb, var(--green-500) 14%, var(--bg-surface)), color-mix(in srgb, var(--green-500) 3%, var(--bg-surface))); border: 1px solid var(--green-200); }
[data-theme="dark"] .cred-hero { border-color: color-mix(in srgb, var(--green-500) 26%, transparent); }
.cred-hero .cc { width: 50px; height: 50px; border-radius: var(--r-md); background: linear-gradient(135deg, var(--green-500), var(--green-700)); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--shadow-green-soft); }
.cred-hero .cc svg { width: 24px; height: 24px; }
.cred-hero .cv { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink-1000); line-height: 1; }
.cred-hero .cl { font-size: 12.5px; color: var(--ink-600); margin-top: 5px; }
.cred-hero .cspacer { flex: 1; }
.toggle { width: 40px; height: 24px; border-radius: var(--r-pill); background: var(--green-500); position: relative; flex-shrink: 0; border: none; cursor: pointer; padding: 0; transition: background var(--d-fast); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 19px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); transition: left var(--d-fast); }
.toggle.off { background: var(--ink-300); }
.toggle.off::after { left: 3px; }
.notif-tbl thead th.ch { text-align: center; width: 86px; }
.notif-tbl tbody td.ch { text-align: center; }
.notif-tbl tbody td .toggle { margin: 0 auto; }
.notif-tbl tbody td.evt .en { font-weight: 600; color: var(--ink-1000); }
.notif-tbl tbody td.evt .ed { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }
.lang-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-tag { font-size: 12px; font-weight: 500; padding: 6px 13px; border-radius: var(--r-pill); background: var(--ink-100); color: var(--ink-700); border: 1px solid var(--hairline); cursor: pointer; transition: all var(--d-fast); }
.lang-tag.on { background: var(--green-50); color: var(--green-700); border-color: var(--green-200); }
[data-theme="dark"] .lang-tag.on { background: color-mix(in srgb, var(--green-500) 12%, transparent); color: var(--green-300); border-color: color-mix(in srgb, var(--green-500) 26%, transparent); }
.lang-tag.add { background: transparent; border-style: dashed; color: var(--ink-500); display: inline-flex; align-items: center; gap: 5px; }
.lang-tag.add svg { width: 13px; height: 13px; }
.voice-tbl td .sel { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--hairline-strong); background: var(--bg-surface); font-size: 12.5px; font-weight: 600; color: var(--ink-800); cursor: pointer; }
.voice-tbl td .sel svg { width: 14px; height: 14px; color: var(--ink-400); }
@media (max-width: 1180px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 920px) { .set2 { grid-template-columns: 1fr; } .set2-nav { border-right: none; border-bottom: 1px solid var(--hairline); } }

/* back link (brand-kit view header) */
.bk-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-600);
  border: none; background: transparent; cursor: pointer; padding: 4px 0; }
.bk-back:hover { color: var(--ink-1000); } .bk-back svg { width: 15px; height: 15px; }

@media (max-width: 640px) { .bk-tones { grid-template-columns: 1fr; } .ob-steps .ob-lbl { display: none; } }

/* ═══════════════════════════════════════════════════════════════════════
   APPENDED — only for components NOT defined in the mockup CSS above.
   DO NOT add any class here that is already styled by the mockup.
   ═══════════════════════════════════════════════════════════════════════ */

/* Link reset — Next.js <Link> renders <a>; cards/rows shouldn't underline */
a.pcard, a.prow, a.lib-card, a.choose-tile, a.rail-item, a.rail-logo, a.more,
a.hx-ws-menu-item, a.hx-ws-menu-add, a.hx-nav-item {
  text-decoration: none;
  color: inherit;
}
a.credits { text-decoration: none; }
a.pcard *, a.prow *, a.lib-card *, a.choose-tile *, a.hx-ws-menu-item * { text-decoration: none; }

/* WorkspaceMenu — pill trigger + popover (not in mockup; kept component) */
.hx-ws-menu-wrap { position: relative; display: inline-flex; }
/* .hx-ws-pill removed — trigger now uses mockup .brand-pick */
.brand-pick.is-open { border-color: var(--green-500); box-shadow: var(--sel-ring); }

.hx-ws-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl, var(--shadow-lg));
  z-index: 200; overflow: hidden;
}
.hx-ws-menu-header { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); background: var(--bg-surface); }
.hx-ws-menu-name { font-size: 14px; font-weight: 700; color: var(--ink-1000); }
.hx-ws-menu-plan { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }
.hx-ws-menu-section { padding: 6px; background: var(--bg-surface); }
.hx-ws-menu-section + .hx-ws-menu-section { border-top: 1px solid var(--hairline); }
.hx-ws-menu-heading {
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-500);
  padding: 8px 10px 6px;
}
.hx-ws-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  background: transparent;
  border: none; border-radius: var(--r-md);
  color: var(--ink-900);
  font-size: 13px; font-family: inherit; text-align: left;
  cursor: pointer; transition: background var(--d-fast);
}
.hx-ws-menu-item:hover { background: var(--hover-surface-2); }
.hx-ws-menu-item svg { color: var(--ink-500); flex-shrink: 0; }
.hx-ws-menu-ws-logo {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.hx-ws-menu-ws-name { font-size: 13px; font-weight: 600; color: var(--ink-1000); }
.hx-ws-menu-ws-plan { font-size: 11px; color: var(--ink-500); margin-top: 1px; }
.hx-ws-menu-add {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  border: none; border-top: 1px solid var(--hairline);
  background: transparent;
  font-size: 13px; color: var(--green-700); font-weight: 600;
  cursor: pointer; font-family: inherit; text-align: left;
}
.hx-ws-menu-add:hover { background: var(--hover-surface-2); }

/* ThemeToggle — icon button */
.hx-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  color: var(--ink-700);
  cursor: pointer; transition: all var(--d-fast);
}
.hx-icon-btn:hover { background: var(--hover-surface-2); color: var(--ink-1000); }

/* Modal — used by TopupModal. Built on mockup popup-scrim/popup styles. */
.hx-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
}
.hx-modal {
  width: min(560px, 100%); max-height: 90vh;
  display: flex; flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl, var(--shadow-lg));
  overflow: hidden;
}
.hx-modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 26px 16px; border-bottom: 1px solid var(--hairline); }
.hx-modal-title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-1000); margin: 0; }
.hx-modal-sub { font-size: 12.5px; color: var(--ink-500); margin: 4px 0 0; line-height: 1.5; }
.hx-modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--bg-surface); color: var(--ink-600);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hx-modal-body { flex: 1; padding: 22px 26px; overflow-y: auto; }
.hx-modal-foot { padding: 14px 26px; border-top: 1px solid var(--hairline); display: flex; align-items: center; gap: 10px; }

/* ═══════════════════════════════════════════════════════════════════════
   AUTH SHELL — sign-in / sign-up / verify / onboarding
   ═══════════════════════════════════════════════════════════════════════ */

/* ══════════════ AUTH SHELL ══════════════ */
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
@media (max-width: 860px) { .auth-shell { grid-template-columns: 1fr; } }

/* ── Left hero panel ── */
.auth-hero { display: flex; flex-direction: column; padding: 44px 52px 52px; background: radial-gradient(130% 100% at 50% 0%, #0c2417 0%, #060f0a 70%); position: relative; overflow: hidden; }
.auth-hero::before { content:''; position: absolute; inset: 0; background-image: linear-gradient(rgba(34,197,94,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(34,197,94,0.06) 1px, transparent 1px); background-size: 32px 32px; pointer-events: none; }
.auth-hero::after { content:''; position: absolute; bottom: -120px; left: -80px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(34,197,94,0.12), transparent 70%); pointer-events: none; }
.auth-hero-wm { font-family: var(--font-display, inherit); font-size: 16px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.auth-hero-wm span { width: 8px; height: 8px; border-radius: 50%; background: var(--green-400); flex-shrink: 0; }

.ah-copy { margin: auto 0 0; position: relative; z-index: 1; }
.auth-hero h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.12; color: #fff; margin: 0 0 14px; }
.auth-hero h1 em { font-style: normal; color: var(--green-300); }
.auth-hero p { font-size: 15px; color: rgba(255,255,255,0.6); line-height: 1.6; margin: 0; }

.ah-features { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 9px; position: relative; z-index: 1; }
.ah-features li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: rgba(255,255,255,0.75); }
.ah-features li svg { color: var(--green-400); flex-shrink: 0; }

.ah-stats { display: flex; gap: 28px; margin: 30px 0; position: relative; z-index: 1; }
.ah-stat { display: flex; flex-direction: column; gap: 2px; }
.ah-stat-n { font-family: var(--font-display, inherit); font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.02em; line-height: 1; }
.ah-stat-l { font-size: 11px; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

.ah-quote { border: 1px solid rgba(255,255,255,0.1); border-radius: var(--r-lg); padding: 18px 20px; background: rgba(255,255,255,0.04); position: relative; z-index: 1; margin-top: auto; }
.ahq-text { font-size: 13.5px; color: rgba(255,255,255,0.8); line-height: 1.55; margin: 0 0 14px; font-style: italic; }
.ahq-who { display: flex; align-items: center; gap: 10px; }
.ahq-av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--green-400), var(--green-700)); color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ahq-name { display: block; font-size: 12.5px; font-weight: 700; color: #fff; }
.ahq-role { display: block; font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 1px; }

@media (max-width: 860px) { .auth-hero { display: none; } }

/* ── Right form panel ── */
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 48px 24px; min-height: 100vh; background: var(--bg-canvas); }
.auth-form { width: 100%; max-width: 380px; }

/* mobile-only wordmark */
.auth-form-logo-sm { font-family: var(--font-display, inherit); font-size: 14px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-1000); margin-bottom: 28px; display: flex; align-items: center; gap: 6px; }
.auth-form-logo-sm span { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); }
@media (min-width: 861px) { .auth-form-logo-sm { display: none; } }

.form-title { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink-1000); margin: 0 0 6px; }
.form-sub { font-size: 14px; color: var(--ink-500); margin: 0 0 22px; line-height: 1.5; }

/* Google button */
.auth-google-btn { width: 100%; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-surface); color: var(--ink-900); font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color var(--d-fast), box-shadow var(--d-fast), background var(--d-fast); font-family: inherit; }
.auth-google-btn:hover { border-color: var(--ink-400); box-shadow: var(--shadow-sm); background: var(--hover-surface-2); }
.auth-google-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Perks list (sign-up) */
.auth-perks { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 6px; }
.auth-perks li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-700); }
.auth-perks li svg { color: var(--green-600); flex-shrink: 0; }

/* Divider */
.or-divider { position: relative; text-align: center; margin: 20px 0; font-size: 11.5px; color: var(--ink-400); }
.or-divider::before, .or-divider::after { content:''; position: absolute; top: 50%; width: calc(50% - 56px); height: 1px; background: var(--hairline); }
.or-divider::before { left: 0; } .or-divider::after { right: 0; }

/* Method tabs */
.method-tabs { display: flex; gap: 4px; margin-bottom: 16px; background: var(--bg-soft); border-radius: var(--r-md); padding: 4px; border: 1px solid var(--hairline); }
.method-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-sm); border: none; background: transparent; font-size: 13px; font-weight: 600; color: var(--ink-500); cursor: pointer; transition: all var(--d-fast); }
.method-tab.is-active { background: var(--bg-surface); color: var(--ink-1000); box-shadow: var(--shadow-xs); }
.method-tab svg { width: 13px; height: 13px; }

/* Phone input */
.phone-input { display: flex; gap: 8px; }
.phone-cc { height: 40px; padding: 0 10px; border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-surface); color: var(--ink-900); font-size: 13.5px; cursor: pointer; flex-shrink: 0; font-family: inherit; }
.phone-cc:focus { outline: none; border-color: var(--sel-border); box-shadow: var(--sel-ring); }

/* Generic field */
.field { margin-bottom: 16px; }
.field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-700); margin-bottom: 7px; }
.field-help { display: block; font-size: 11.5px; color: var(--ink-400); margin-top: 6px; line-height: 1.5; }
.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-surface); color: var(--ink-900); font-size: 14px; font-family: inherit; transition: border-color var(--d-fast), box-shadow var(--d-fast); box-sizing: border-box; }
.input:focus { outline: none; border-color: var(--sel-border); box-shadow: var(--sel-ring); }
select.input { cursor: pointer; }

/* Account type tiles (signup / onboarding — "A brand" vs "An agency") */
.acct-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.acct-type {
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  background: var(--bg-surface);
  color: var(--ink-900);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  padding: 14px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--d-fast), background var(--d-fast), box-shadow var(--d-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
}
.acct-type:hover { border-color: var(--ink-500); }
.acct-type:focus-visible {
  outline: none;
  border-color: var(--sel-border);
  box-shadow: var(--sel-ring);
}
.acct-type.is-selected {
  border-color: var(--green-500, #16a34a);
  background: var(--green-50, rgba(22, 163, 74, 0.08));
  box-shadow: 0 0 0 1px var(--green-500, #16a34a) inset;
}
.acct-type-title { font-size: 14px; font-weight: 700; color: var(--ink-1000); }
.acct-type.is-selected .acct-type-title { color: var(--green-700, #15803d); }
.acct-type-sub { font-size: 12px; color: var(--ink-500); line-height: 1.4; }

/* Back link */
.auth-back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-500); background: none; border: none; cursor: pointer; padding: 0; text-decoration: none; }
.auth-back-link:hover { color: var(--ink-1000); }
.auth-back-link svg { width: 14px; height: 14px; }

/* Error */
.auth-error { font-size: 13px; color: var(--red-600, #dc2626); margin: 8px 0 0; line-height: 1.4; }

/* Legal / footer */
.auth-legal { font-size: 11.5px; color: var(--ink-500); margin: 14px 0 0; line-height: 1.55; }
.auth-legal a { color: var(--ink-600); text-decoration: underline; text-decoration-color: var(--ink-300); text-underline-offset: 2px; }
.auth-form-footer { margin-top: 22px; text-align: center; font-size: 13px; color: var(--ink-500); }
.auth-form-footer a { font-weight: 600; color: var(--green-700); text-decoration: none; }
.auth-form-footer a:hover { text-decoration: underline; }

/* OTP row */
.otp-row { display: flex; gap: 8px; justify-content: center; margin: 26px 0 16px; }
.otp-digit { width: 48px; height: 58px; border: 1.5px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-surface); font-size: 26px; font-weight: 800; text-align: center; color: var(--ink-1000); font-family: var(--font-mono, monospace); caret-color: transparent; transition: border-color var(--d-fast), box-shadow var(--d-fast); }
.otp-digit:focus { outline: none; border-color: var(--sel-border); box-shadow: var(--sel-ring); }
.otp-digit.err { border-color: var(--red-400, #f87171); }
.otp-hint { font-size: 12.5px; color: var(--ink-500); text-align: center; }
.otp-resend { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--green-700); background: none; border: none; cursor: pointer; padding: 0; }
.otp-resend:hover { color: var(--green-800); }
[data-theme="dark"] .otp-resend { color: var(--green-300); }

/* Onboarding step indicator */
.ob-wrap { max-width: 760px; margin: 0 auto; padding: 30px 32px 64px; }
.ob-steps { display: flex; align-items: center; gap: 0; margin: 4px 0 30px; }
.ob-steps .ob-step { display: flex; align-items: center; gap: 9px; }
.ob-steps .ob-num { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; font-family: var(--font-mono); border: 2px solid var(--hairline-strong); background: var(--bg-surface); color: var(--ink-500); }
.ob-steps .ob-num svg { width: 14px; height: 14px; }
.ob-steps .ob-lbl { font-size: 12px; font-weight: 600; color: var(--ink-500); white-space: nowrap; }
.ob-steps .ob-line { flex: 1; height: 1.5px; background: var(--hairline); margin: 0 12px; min-width: 18px; }
.ob-step.done .ob-num { background: var(--green-500); border-color: var(--green-500); color: #fff; }
.ob-step.done .ob-lbl { color: var(--ink-700); }
.ob-step.cur .ob-num { border-color: var(--sel-border); background: var(--sel-bg); color: var(--accent-ink); box-shadow: var(--sel-ring-2); }
.ob-step.cur .ob-lbl { color: var(--ink-1000); }
.ob-step.done + .ob-line { background: var(--green-400); }
@media (max-width: 640px) { .ob-steps .ob-lbl { display: none; } }

/* ═══════════════════════════════════════════════════════════════════════
   Credits ledger + Invoices — page-specific styles for kept pages.
   ═══════════════════════════════════════════════════════════════════════ */

/* Header section shared by /credits and /billing/invoices */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 0;
}
.page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; margin: 0; color: var(--ink-1000); }
.page-head p { font-size: 14.5px; color: var(--ink-600); margin: 8px 0 0; line-height: 1.55; max-width: 560px; }

/* Generic card (used inside credits, invoices) */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px;
}

/* Wallet hero — top balance summary */
.wallet-hero { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; padding: 24px 28px; background: var(--bg-surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); }
.wallet-hero-label { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); }
.wallet-hero-val { font-size: 42px; font-weight: 700; color: var(--ink-1000); letter-spacing: -0.02em; line-height: 1.1; }
.wallet-hero-val small { font-size: 16px; font-weight: 500; color: var(--ink-500); margin-left: 8px; }
.wallet-hero-bd { font-size: 13px; color: var(--ink-600); margin-top: 4px; }
.wallet-hero-bd b { color: var(--ink-1000); font-weight: 700; }

/* Wallet lots — two-card grid (subscription + topup) */
.wallet-summary { margin-bottom: 32px; }
.wallet-lots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .wallet-lots { grid-template-columns: 1fr; } }
.wallet-lot { padding: 20px; background: var(--bg-surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); }
.wallet-lot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.wallet-lot-head > span:first-child { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.wallet-lot-expiry { font-size: 11.5px; color: var(--ink-500); font-family: var(--font-mono); }
.wallet-lot-val { font-size: 22px; font-weight: 700; color: var(--ink-1000); letter-spacing: -0.01em; margin-bottom: 8px; }
.wallet-lot-val small { font-size: 13px; font-weight: 500; color: var(--ink-500); margin-left: 6px; }
.wallet-lot-bar { width: 100%; height: 6px; background: var(--ink-100); border-radius: var(--r-pill); overflow: hidden; margin-bottom: 8px; }
.wallet-lot-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-400), var(--green-600)); border-radius: inherit; }
.wallet-lot-sub { font-size: 11.5px; color: var(--ink-500); line-height: 1.5; }

/* Filter pills + table for ledger */
.btn-group {
  display: inline-flex; gap: 4px;
  padding: 4px; background: var(--ink-100);
  border-radius: var(--r-pill);
}
.btn-group .btn { height: 32px; padding: 0 16px; border: 1px solid transparent; background: transparent; border-radius: calc(var(--r-pill) - 4px); font-size: 12.5px; color: var(--ink-700); font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-group .btn:hover { color: var(--ink-1000); }
.btn-group .btn.on { background: var(--bg-surface); color: var(--ink-1000); border-color: var(--hairline); box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,0.04)); }

/* Ledger table */
.ledger-table { width: 100%; border-collapse: collapse; margin-top: 18px; background: var(--bg-surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.ledger-table thead th { text-align: left; padding: 12px 16px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-500); background: var(--ink-50); border-bottom: 1px solid var(--hairline); }
.ledger-table tbody td { padding: 14px 16px; font-size: 13px; color: var(--ink-800); border-top: 1px solid var(--hairline); vertical-align: top; }
.ledger-table tbody tr:hover td { background: var(--bg-soft, var(--ink-50)); }
.ledger-table .num { font-family: var(--font-mono); font-weight: 600; text-align: right; }
.ledger-table .num.pos { color: var(--green-700); }
.ledger-table .num.neg { color: var(--ink-1000); }
.ledger-event { display: inline-flex; align-items: center; gap: 8px; }
.ledger-event .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-300); flex-shrink: 0; }
.ledger-event-text { display: flex; flex-direction: column; }
.ledger-event-label { font-weight: 600; color: var(--ink-1000); }
.ledger-event-id { font-family: var(--font-mono); font-size: 11px; color: var(--ink-500); }
.ledger-ref { color: var(--green-700); font-weight: 500; }
.ledger-ref:hover { text-decoration: underline; }
.ledger-note { display: block; font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }
.ledger-lot { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-600); }
.ledger-lot-subscription { color: var(--green-700); }
.ledger-lot-topup { color: var(--info-ink, var(--ink-700)); }

/* Invoices KPI row + table */
.kpi-row { display: grid; gap: 14px; margin: 24px 0 32px; }
.kpi { padding: 18px; background: var(--bg-surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); }
.kpi .lbl { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500); }
.kpi .val { font-size: 26px; font-weight: 700; color: var(--ink-1000); letter-spacing: -0.01em; margin-top: 6px; }
.kpi .delta { font-size: 11.5px; color: var(--ink-500); margin-top: 4px; }

/* Status badges */
.badge-success { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; background: var(--green-50); color: var(--green-700); border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; }
[data-theme="dark"] .badge-success { background: rgba(34,197,94,0.12); color: var(--green-300); }
.badge-soft { display: inline-flex; padding: 3px 10px; background: var(--ink-100); color: var(--ink-600); border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; }
.badge-info { display: inline-flex; padding: 3px 10px; background: var(--info-soft); color: var(--info-ink); border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; }
.badge-danger { display: inline-flex; padding: 3px 10px; background: var(--danger-soft, #fde2e2); color: var(--danger-ink, #b91c1c); border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; }
.badge-warning { display: inline-flex; padding: 3px 10px; background: var(--warn-soft, #fff4e0); color: var(--warn-ink, #c2410c); border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; }

/* Brand profile — canon ring avatar */
.canon-ring-wrap { width: 64px; height: 64px; border-radius: 50%; padding: 3px; background: conic-gradient(var(--green-500) 0%, var(--green-400) 40%, var(--green-600) 70%, var(--green-500) 100%); flex-shrink: 0; }
.canon-ring-inner { width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, var(--green-600), var(--green-800)); color: white; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }

/* Progress bar */
.progress { width: 100%; height: 6px; background: var(--ink-100); border-radius: var(--r-pill); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--info-soft); background: linear-gradient(90deg, var(--info-ink), color-mix(in srgb, var(--info-ink) 70%, transparent)); border-radius: inherit; }

/* Filter bar pill links (URL → AD eyebrows + similar) — none of these should underline */
.pc-tool, .ck-vl, .ck-nm, .ck-tx, .rl-t, .rl-s, .ar-pill { text-decoration: none !important; }

/* Asset library filter bar — pill segmented + native selects, dark-mode friendly */
.lib-filterbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 22px;
}
.lib-filter-group { display: inline-flex; align-items: center; gap: 6px; }
.lib-filter-label {
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-500);
}
.lib-filter-seg {
  display: inline-flex; gap: 2px;
  padding: 3px;
  background: var(--ink-100);
  border-radius: var(--r-pill);
}
.lib-filter-seg button {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: calc(var(--r-pill) - 3px);
  font-size: 12px; font-weight: 600;
  color: var(--ink-700);
  cursor: pointer; font-family: inherit;
  transition: all var(--d-fast);
}
.lib-filter-seg button:hover { color: var(--ink-1000); }
.lib-filter-seg button.on {
  background: var(--bg-surface);
  border-color: var(--hairline);
  color: var(--ink-1000);
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,0.05));
}
.lib-filter-select {
  appearance: none; -webkit-appearance: none;
  padding: 7px 26px 7px 12px;
  background: var(--bg-surface);
  background-image: url('/icons/select-arrow.svg');
  background-repeat: no-repeat;
  background-position: right 8px center;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  font-size: 12.5px; color: var(--ink-1000); font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: border-color var(--d-fast);
}
.lib-filter-select:hover { border-color: var(--green-400); }
.lib-filter-select:focus { outline: none; border-color: var(--green-500); box-shadow: var(--focus-ring); }

.lib-filter-reset {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  font-size: 11.5px; color: var(--ink-600); font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.lib-filter-reset:hover { background: var(--ink-100); color: var(--ink-1000); }

.lib-empty {
  padding: 48px 24px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px dashed var(--hairline);
  border-radius: var(--r-lg);
}
.lib-empty .le-t { font-size: 14px; color: var(--ink-700); margin-bottom: 14px; }

/* Library project picker dropdown */
.lib-filter-select-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-700);
  cursor: pointer; font-family: inherit;
  transition: all var(--d-fast);
  white-space: nowrap;
}
.lib-filter-select-btn:hover { border-color: var(--green-400); }
.lib-filter-select-btn.is-active { border-color: var(--sel-border); color: var(--accent-ink); background: var(--sel-bg); }
[data-theme="dark"] .lib-filter-select-btn.is-active { color: var(--green-300); }
.lib-proj-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  width: 240px; z-index: 200;
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl, var(--shadow-lg));
  overflow: hidden;
}
.lib-proj-search {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--hairline);
}
.lib-proj-search svg { color: var(--ink-400); flex-shrink: 0; }
.lib-proj-search input {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: inherit; font-size: 12.5px; color: var(--ink-900);
}
.lib-proj-search input::placeholder { color: var(--ink-400); }
.lib-proj-opt {
  display: block; width: 100%;
  padding: 8px 12px;
  text-align: left; font-family: inherit;
  font-size: 13px; color: var(--ink-800);
  background: transparent; border: none; cursor: pointer;
  transition: background var(--d-fast);
}
.lib-proj-opt:hover { background: var(--hover-surface-2); }
.lib-proj-opt.is-active { color: var(--green-700); font-weight: 600; background: var(--sel-bg); }
[data-theme="dark"] .lib-proj-opt.is-active { color: var(--green-300); }
.lib-proj-empty { padding: 10px 12px; font-size: 12.5px; color: var(--ink-400); }

/* ═══════════════════════════════════════════════════════════════════════
   LIFTED VERBATIM from /Users/harish/Documents/projects/design-snapshot.html
   Credits hero/lots (lines 6325-6440) + ledger table (lines 6785-6833).
   These override the hand-written placeholders above.
   ═══════════════════════════════════════════════════════════════════════ */

.wallet-summary {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 980px) {
  .wallet-summary { grid-template-columns: 1fr; }
}

.wallet-hero {
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(34,197,94,0.10), rgba(34,197,94,0.02) 70%), var(--bg-surface);
  border: 1px solid var(--green-100);
  border-radius: 16px;
  display: flex; flex-direction: column; justify-content: center;
}
.wallet-hero-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-700);
}
.wallet-hero-val {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink-1000);
  margin: 6px 0 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.wallet-hero-val span {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-500);
  letter-spacing: 0;
  margin-left: 6px;
}
.wallet-hero-bd {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-600);
}
.wallet-hero-bd b {
  color: var(--ink-1000);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.wallet-hero-bd .dot { color: var(--ink-300); }
.wallet-hero-bd .reserved {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--warning);
  font-weight: 600;
}

.wallet-lots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) { .wallet-lots { grid-template-columns: 1fr; } }

.wallet-lot {
  padding: 18px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}
.wallet-lot-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.wallet-lot-expiry {
  font-size: 11.5px;
  color: var(--ink-500);
  font-weight: 500;
}
.wallet-lot-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-1000);
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}
.wallet-lot-val span {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-500);
  margin-left: 4px;
  letter-spacing: 0;
}
.wallet-lot-bar {
  height: 4px;
  background: var(--ink-100);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.wallet-lot-bar > div {
  height: 100%;
  background: var(--green-500);
  border-radius: 2px;
  transition: width var(--d-base) var(--ease-out);
}
.wallet-lot-sub {
  font-size: 11.5px;
  color: var(--ink-500);
  line-height: 1.45;
}


.ledger-table {
  width: 100%;
  border-collapse: collapse;
}
.ledger-table thead tr {
  text-align: left;
  font-size: 11.5px;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ledger-table th { padding: 12px 20px; font-weight: 600; }
.ledger-table tbody tr { border-top: 1px solid var(--hairline); }
.ledger-table tbody tr:hover { background: var(--ink-50); }
.ledger-table td { padding: 14px 20px; font-size: 13.5px; vertical-align: middle; }

.ledger-event { display: flex; align-items: center; gap: 10px; }
.ledger-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ledger-icon-green { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100); }
[data-theme="dark"] .ledger-icon-green { background: rgba(34,197,94,0.12); color: var(--green-400); border-color: rgba(34,197,94,0.2); }
.ledger-icon-ink   { background: var(--ink-50);   color: var(--ink-800);   border: 1px solid var(--hairline); }
.ledger-icon-warn  { background: var(--warning-soft); color: var(--warning-ink); border: 1px solid var(--warning-soft-bd); }
.ledger-event-text { display: flex; flex-direction: column; min-width: 0; }
.ledger-event-label { font-size: 13.5px; font-weight: 600; color: var(--ink-1000); }
.ledger-event-id { font-size: 11px; color: var(--ink-400); font-family: var(--font-mono); }

.ledger-ref {
  font-weight: 500;
  color: var(--ink-900);
  text-decoration: none;
}
.ledger-ref:hover { color: var(--green-700); text-decoration: underline; }
.ledger-note { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }

.ledger-lot {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ledger-lot-subscription { background: var(--green-50);   color: var(--green-800); border: 1px solid var(--green-100); }
.ledger-lot-topup        { background: #EFF6FF;           color: #1E40AF;           border: 1px solid #BFDBFE; }
[data-theme="dark"] .ledger-lot-subscription { background: rgba(34,197,94,0.12); color: var(--green-300); border-color: rgba(34,197,94,0.25); }
[data-theme="dark"] .ledger-lot-topup        { background: rgba(59,130,246,0.12); color: #7db4ff;          border-color: rgba(59,130,246,0.25); }

/* ── Form primitives — .field / .field-label / .field-help / .input ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 13px; font-weight: 600;
  color: var(--ink-800);
  letter-spacing: -0.01em;
}
.field-help {
  font-size: 12px;
  color: var(--ink-500);
  line-height: 1.5;
}
.input {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-1000);
  outline: none;
  transition: border-color var(--d-fast), box-shadow var(--d-fast);
  -moz-appearance: textfield;
}
.input::-webkit-inner-spin-button,
.input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.input:focus { border-color: var(--green-500); box-shadow: var(--focus-ring); }
.input::placeholder { color: var(--ink-400); }

/* ═══════════════════════════════════════════════════════════════════════
   Topup modal + hx-modal — lifted from design-snapshot.html lines 6484-6900
   ═══════════════════════════════════════════════════════════════════════ */

.topup-mode {
  display: inline-flex; width: 100%;
  background: var(--ink-100);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
[data-theme="dark"] .topup-mode {
  background: rgba(255,255,255,0.06);
  border-color: var(--hairline);
}
.topup-mode-btn {
  flex: 1;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--ink-500);
  cursor: pointer;
  font-family: inherit;
  transition: color var(--d-fast);
}
.topup-mode-btn.is-active {
  background: var(--bg-surface);
  color: var(--ink-1000);
  box-shadow: 0 1px 3px rgba(11,11,15,0.12), 0 0 0 1px rgba(11,11,15,0.06);
}
[data-theme="dark"] .topup-mode-btn.is-active {
  background: rgba(255,255,255,0.10);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.topup-sku-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.topup-sku {
  position: relative;
  text-align: left;
  padding: 16px;
  background: var(--bg-surface);
  border: 1.5px solid var(--hairline);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--d-fast), box-shadow var(--d-fast);
}
.topup-sku:hover { border-color: var(--ink-400); }
.topup-sku.is-selected {
  border-color: var(--green-500);
  background: linear-gradient(180deg, var(--green-50), var(--bg-surface) 80%);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}
[data-theme="dark"] .topup-sku.is-selected {
  background: linear-gradient(180deg, rgba(34,197,94,0.12), var(--bg-surface) 80%);
}
.topup-sku-badge {
  position: absolute;
  top: -10px; left: 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #0B0B0F;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 6px;
}
[data-theme="dark"] .topup-sku-badge { background: #FAFAFA; color: #0B0B0F; }
.topup-sku-check {
  position: absolute;
  top: 12px; right: 12px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green-500);
  color: white;
  display: flex; align-items: center; justify-content: center;
}
.topup-sku-name { font-size: 13px; font-weight: 700; color: var(--ink-700); letter-spacing: 0.02em; text-transform: uppercase; }
.topup-sku-credits {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-1000);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.topup-sku-credits span { font-size: 12px; font-weight: 500; color: var(--ink-500); margin-left: 4px; }
.topup-sku-price {
  font-size: 18px; font-weight: 700;
  color: var(--green-700);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.topup-sku-rate { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; font-variant-numeric: tabular-nums; }
.topup-sku-desc { font-size: 12px; color: var(--ink-600); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--hairline); }

.topup-custom-input { display: flex; align-items: center; gap: 10px; }
.topup-custom-input .input {
  width: 110px; flex-shrink: 0;
  font-family: var(--font-mono); font-size: 20px; font-weight: 700;
  text-align: center; padding: 8px 12px;
  letter-spacing: -0.02em;
}
.topup-custom-unit { font-size: 13px; color: var(--ink-500); font-weight: 500; }
.topup-slider {
  width: 100%;
  margin-top: 12px;
  accent-color: var(--green-500);
}
.topup-slider-ticks {
  display: flex; justify-content: space-between;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
}

.topup-pay { display: flex; flex-direction: column; gap: 6px; }
.topup-pay-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--ink-700);
}
.topup-pay-row:hover { border-color: var(--ink-400); }
.topup-pay-row.is-selected {
  border-color: var(--green-500);
  background: var(--green-50);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
  color: var(--green-800);
}
[data-theme="dark"] .topup-pay-row.is-selected {
  background: rgba(34,197,94,0.10);
  color: var(--green-300);
}
.topup-pay-text { display: flex; flex-direction: column; gap: 2px; }
.topup-pay-title { font-size: 13.5px; font-weight: 600; color: var(--ink-1000); }
.topup-pay-row.is-selected .topup-pay-title { color: var(--green-800); }
[data-theme="dark"] .topup-pay-row.is-selected .topup-pay-title { color: var(--green-300); }
.topup-pay-sub { font-size: 11.5px; color: var(--ink-500); }

/* Topup modal footer — order summary */
.topup-total {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 200px;
  font-size: 12.5px;
  color: var(--ink-600);
}
.topup-total-line {
  display: flex; justify-content: space-between; align-items: baseline;
}
.topup-total-num { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink-800); }
.topup-total-line.is-final {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--ink-1000);
  font-weight: 700;
}
.topup-total-line.is-final .topup-total-num { color: var(--green-700); font-size: 15px; }

/* 2-step pip indicator (used in footer) */
.topup-step-dots {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--ink-500);
}
.step-dot {
  width: 18px; height: 4px; border-radius: 2px;
  background: var(--ink-200);
}
.step-dot.is-on { background: var(--green-500); }
.step-dot-label { margin-left: 6px; font-weight: 500; }

/* Order recap on step 2 */
.topup-order-recap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: 10px;
}
[data-theme="dark"] .topup-order-recap {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.20);
}
.topup-order-credits {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-1000);
  font-variant-numeric: tabular-nums;
}
.topup-order-credits span { font-size: 13px; font-weight: 500; color: var(--ink-500); margin-left: 4px; }
.topup-order-sku { font-size: 12px; color: var(--ink-600); margin-top: 2px; }
.topup-order-sku b { color: var(--ink-900); font-weight: 700; }
.topup-order-edit {
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
}
.topup-order-edit:hover { border-color: var(--ink-400); color: var(--ink-1000); }

/* Custom-amount quick chips */
.topup-custom-quick { display: flex; gap: 6px; margin-top: 10px; }

.topup-pay-row { position: relative; }
.topup-pay-check {
  position: absolute;
  right: 12px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--green-500);
  color: white;
  display: flex; align-items: center; justify-content: center;
}

/* ── Pause modal — impact list ─────────────────────────── */

.hx-modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(11,11,15,0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.hx-modal {
  width: 100%;
  max-height: calc(100vh - 48px);
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 32px 64px -16px rgba(11,11,15,0.35),
    0 12px 24px -12px rgba(11,11,15,0.2);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.hx-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--hairline);
}
.hx-modal-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink-1000);
}
.hx-modal-sub {
  font-size: 13px;
  color: var(--ink-500);
  margin: 4px 0 0;
  line-height: 1.5;
}
.hx-modal-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--ink-50);
  border: 1px solid var(--hairline);
  color: var(--ink-600);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hx-modal-close:hover { background: var(--ink-100); color: var(--ink-1000); }
.hx-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
}
.hx-modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg-surface);
}


/* Wider container for credits + invoices (overrides .page-inner max-width on those pages) */
.credits-wide.page-inner, .invoices-wide.page-inner { max-width: 1320px; padding: 32px 28px 60px; }

/* WorkspaceMenu — force solid background so the popover never shows the page
   through. Some cascade above (link reset / color:inherit) was killing visibility. */
.hx-ws-menu,
.hx-ws-menu-section,
.hx-ws-menu-header {
  background: var(--bg-surface) !important;
}
[data-theme="dark"] .hx-ws-menu,
[data-theme="dark"] .hx-ws-menu-section,
[data-theme="dark"] .hx-ws-menu-header {
  background: #1c1c22 !important;
}
.hx-ws-menu-item {
  color: var(--ink-900) !important;
}
.hx-ws-menu-item .hx-ws-menu-name,
.hx-ws-menu-item .hx-ws-menu-ws-name { color: var(--ink-1000) !important; }
.hx-ws-menu-item .hx-ws-menu-plan,
.hx-ws-menu-item .hx-ws-menu-ws-plan { color: var(--ink-500) !important; }

/* ROOT-CAUSE FIX: .hdr has backdrop-filter which creates a stacking context.
   Without a z-index, later siblings (.page-inner > .hc-hero) paint over any
   popovers anchored inside .hdr. Lifting .hdr above the page content. */
.hdr { position: relative; z-index: 50; }

/* ── BRAND KIT BLOCKS ── */
.bk { display: flex; flex-direction: column; gap: 22px; }
.bk-block { border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--bg-surface); padding: 18px 20px; }
.bk-block .bk-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bk-block .bk-title { font-size: 13.5px; font-weight: 700; color: var(--ink-1000); }
.bk-block .bk-hint { font-size: 11.5px; color: var(--ink-500); margin-left: auto; text-align: right; }
.bk-block .bk-spacer { flex: 1; }
.bk-logo-row { display: flex; align-items: center; gap: 16px; }
.bk-logo-prev { width: 76px; height: 76px; border-radius: var(--r-md); flex-shrink: 0; background: var(--ink-50); border: 1px solid var(--hairline); display: flex; align-items: center; justify-content: center; }
.bk-logo-prev .lw { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: -0.02em; color: var(--ink-1000); }
.bk-logo-meta .lm-d { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.bk-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.bk-swatch { display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; border: none; background: transparent; padding: 0; }
.bk-swatch .sw-chip { width: 52px; height: 52px; border-radius: var(--r-md); border: 1px solid var(--hairline-strong); position: relative; overflow: hidden; transition: transform var(--d-fast), box-shadow var(--d-fast); }
.bk-swatch:hover .sw-chip { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.bk-swatch .sw-edit { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--d-fast); }
.bk-swatch:hover .sw-edit { opacity: 1; }
.bk-swatch .sw-edit svg { width: 10px; height: 10px; color: #000; }
.bk-swatch .sw-hex { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--ink-600); }
.bk-swatch .sw-role { font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-500); }
.bk-fonts { display: flex; flex-wrap: wrap; gap: 10px; }
.bk-font { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-surface); flex: 1; min-width: 160px; }
.bk-font .bf-spec { font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-500); }
.bk-font .bf-name { font-size: 15px; font-weight: 700; color: var(--ink-1000); }
.bk-font .bf-name.serif { font-family: var(--font-display); }
.bk-font .bf-change { font-size: 11.5px; font-weight: 600; color: var(--green-700); border: none; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: var(--r-sm); margin-left: auto; }
.bk-font .bf-change:hover { background: var(--green-50); }
.bk-tones { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.bk-tone { text-align: left; padding: 13px 15px; border: 1.5px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); cursor: pointer; transition: border-color var(--d-fast), box-shadow var(--d-fast), background var(--d-fast); }
.bk-tone:hover { border-color: var(--green-400); }
.bk-tone.on { border-color: var(--sel-border); box-shadow: var(--sel-ring-2); background: var(--sel-bg); }
.bk-tone .bt-t { font-size: 13.5px; font-weight: 700; color: var(--ink-1000); display: flex; align-items: center; gap: 7px; }
.bk-tone.on .bt-t .bt-ck { color: var(--green-600); }
.bk-tone .bt-ck { color: transparent; }
.bk-tone .bt-ck svg { width: 14px; height: 14px; }
.bk-tone .bt-s { font-size: 11.5px; color: var(--ink-500); margin-top: 3px; line-height: 1.4; }
.bk-dns { display: flex; flex-direction: column; gap: 14px; }
.bk-dns-group .dns-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 8px; }
.bk-dns-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dns-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px 6px 12px; border-radius: var(--r-pill); background: var(--ink-100); color: var(--ink-900); font-size: 12.5px; font-weight: 500; }
[data-theme="dark"] .dns-chip { background: var(--bg-elevated); }
.dns-chip .x { width: 18px; height: 18px; border-radius: 50%; border: none; background: transparent; color: inherit; opacity: 0.6; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity var(--d-fast); }
.dns-chip .x:hover { opacity: 1; background: var(--hover-surface); }
.dns-chip .x svg { width: 12px; height: 12px; }
.dns-add { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 12px; border-radius: var(--r-pill); border: 1.5px dashed var(--hairline-strong); color: var(--ink-500); font-size: 12.5px; }
.dns-add input { border: none; background: transparent; outline: none; font-family: inherit; font-size: 12.5px; color: var(--ink-900); width: 120px; }
.dns-add input::placeholder { color: var(--ink-400); }
.dns-add .add-go { width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--green-50); color: var(--green-700); cursor: pointer; display: flex; align-items: center; justify-content: center; }
[data-theme="dark"] .dns-add .add-go { background: rgba(34,197,94,0.1); color: var(--green-400); }
.dns-add .add-go svg { width: 13px; height: 13px; }
.bk-channels { display: flex; flex-direction: column; gap: 10px; }
.bk-chan { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg-surface); }
.bk-chan .chn-ic { width: 34px; height: 34px; border-radius: var(--r-sm); flex-shrink: 0; background: var(--ink-100); color: var(--ink-700); display: inline-flex; align-items: center; justify-content: center; }
.bk-chan .chn-ic svg { width: 17px; height: 17px; }
.bk-chan .chn-n { font-size: 13px; font-weight: 700; color: var(--ink-1000); }
.bk-chan .chn-s { font-size: 11.5px; color: var(--ink-500); margin-top: 1px; }
.bk-chan .chn-state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; }
.bk-chan .chn-state.connected { color: var(--green-700); }
[data-theme="dark"] .bk-chan .chn-state.connected { color: var(--green-400); }
.bk-chan .chn-state.connected svg { width: 14px; height: 14px; }
.bk-chan .chn-state.off { color: var(--ink-500); cursor: pointer; }
.bk-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-600); background: transparent; border: none; cursor: pointer; padding: 0; margin-bottom: 8px; }
.bk-back:hover { color: var(--ink-1000); }
.bk-back svg { width: 15px; height: 15px; }

/* ══════════════════════════════════════════════════════════════════
   PRICING PAGE
   ══════════════════════════════════════════════════════════════════ */
.pr-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
@media (max-width: 960px) { .pr-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pr-cards { grid-template-columns: 1fr; } }

.pr-card { position: relative; display: flex; flex-direction: column; padding: 22px 20px 20px; border: 1.5px solid var(--hairline-strong); border-radius: var(--r-lg); background: var(--bg-surface); cursor: pointer; transition: border-color var(--d-fast), box-shadow var(--d-fast), transform var(--d-fast); min-height: 420px; }
.pr-card:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.pr-card.on { border-color: var(--green-500); box-shadow: var(--sel-ring); background: color-mix(in srgb, var(--green-500) 4%, var(--bg-surface)); }
.pr-card.featured { border-color: var(--green-400); }

.pr-badge { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: var(--green-600); padding: 3px 9px; border-radius: var(--r-pill); margin-bottom: 10px; align-self: flex-start; }
.pr-name { font-size: 14px; font-weight: 700; color: var(--ink-1000); }
.pr-price { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink-1000); margin: 8px 0 4px; line-height: 1; }
.pr-price .pr-per { font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--ink-500); }
.pr-desc { font-size: 12px; color: var(--ink-600); line-height: 1.5; margin-bottom: 14px; }
.pr-divider { height: 1px; background: var(--hairline); margin: 12px 0 14px; }

.pr-features { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pr-features li { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: var(--ink-800); line-height: 1.4; }
.pr-features li svg { flex-shrink: 0; margin-top: 2px; color: var(--green-600); }
.pr-features li.no { color: var(--ink-400); }
.pr-features li.no svg { color: var(--ink-300); }

.pr-compare-tbl thead th:first-child { text-align: left; }

/* ══════════════════════════════════════════════════════════════════
   CHECKOUT PAGE
   ══════════════════════════════════════════════════════════════════ */
.co-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; margin-bottom: 64px; }
@media (max-width: 860px) { .co-wrap { grid-template-columns: 1fr; } }

.co-form { display: flex; flex-direction: column; gap: 0; }
.co-section { border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 16px; background: var(--bg-surface); }
.co-sec-title { font-size: 13px; font-weight: 700; color: var(--ink-1000); margin-bottom: 16px; }
.co-opt { font-weight: 500; color: var(--ink-400); font-size: 11.5px; margin-left: 6px; }
.co-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.co-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .co-row2, .co-row3 { grid-template-columns: 1fr; } }

.co-pay-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.co-pay-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; border-radius: var(--r-sm); border: 1.5px solid var(--hairline-strong); background: var(--bg-soft); font-size: 12.5px; font-weight: 600; color: var(--ink-600); cursor: pointer; transition: all var(--d-fast); }
.co-pay-tab:hover { border-color: var(--green-400); color: var(--ink-1000); }
.co-pay-tab.on { border-color: var(--green-500); background: var(--accent-soft); color: var(--green-700); }
.co-pay-tab svg { width: 15px; height: 15px; }

.co-card-fields { display: flex; flex-direction: column; gap: 2px; }
.co-agree { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--ink-600); line-height: 1.5; margin-top: 4px; cursor: pointer; }
.co-agree input { margin-top: 3px; flex-shrink: 0; width: 14px; height: 14px; accent-color: var(--green-600); cursor: pointer; }

/* Summary card */
.co-summary { position: sticky; top: 80px; border: 1.5px solid var(--hairline-strong); border-radius: var(--r-lg); background: var(--bg-surface); padding: 22px 22px 20px; }
.co-sum-head { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 16px; }
.co-sum-plan { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.csp-name { font-size: 15px; font-weight: 700; color: var(--ink-1000); }
.csp-price { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--ink-1000); }
.csp-price span { font-family: var(--font-body); font-size: 12px; color: var(--ink-500); font-weight: 500; }
.co-sum-feats { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.csf-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-700); }
.csf-row svg { color: var(--green-600); flex-shrink: 0; }
.co-sum-divider { height: 1px; background: var(--hairline); margin: 14px 0; }
.co-sum-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-700); margin-bottom: 7px; }
.co-sum-line.total { font-weight: 700; color: var(--ink-1000); font-size: 14px; margin-bottom: 0; }
.co-secure { text-align: center; font-size: 11.5px; color: var(--ink-500); margin: 10px 0 4px; }
.co-back-link { display: flex; align-items: center; gap: 4px; justify-content: center; font-size: 12px; color: var(--ink-500); margin-top: 6px; }
.co-back-link:hover { color: var(--ink-1000); }

/* Success state */
.co-success { text-align: center; padding: 80px 24px; max-width: 420px; margin: 0 auto; }
.cos-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--green-500); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.co-success h2 { font-size: 22px; font-weight: 700; margin: 0 0 10px; }
.co-success p { font-size: 14px; color: var(--ink-600); line-height: 1.6; margin: 0; }

/* ══════════════════════════════════════════════════════════════════
   SETTINGS — SUBSCRIPTION PANE
   ══════════════════════════════════════════════════════════════════ */
.sub-plan-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border: 1.5px solid var(--green-200); border-radius: var(--r-lg); background: linear-gradient(135deg, color-mix(in srgb, var(--green-500) 8%, var(--bg-surface)), var(--bg-surface)); margin-bottom: 4px; }
[data-theme="dark"] .sub-plan-hero { border-color: color-mix(in srgb, var(--green-500) 26%, transparent); }
.sph-left { display: flex; flex-direction: column; gap: 4px; }
.sph-badge { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-700); background: var(--green-50); border: 1px solid var(--green-200); padding: 3px 9px; border-radius: var(--r-pill); align-self: flex-start; margin-bottom: 2px; }
[data-theme="dark"] .sph-badge { color: var(--green-300); background: color-mix(in srgb, var(--green-500) 12%, transparent); border-color: color-mix(in srgb, var(--green-500) 26%, transparent); }
.sph-price { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink-1000); line-height: 1; }
.sph-price span { font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--ink-500); }
.sph-meta { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.sph-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sub-credits { border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 16px 18px; background: var(--bg-surface); margin-bottom: 4px; }
.sc-top { display: flex; justify-content: space-between; margin-bottom: 10px; }
.sc-used { font-size: 13.5px; font-weight: 600; color: var(--ink-1000); }
.sc-total { font-size: 12.5px; color: var(--ink-500); }
.sc-bar { height: 8px; background: var(--ink-100); border-radius: var(--r-pill); overflow: hidden; }
.sc-fill { height: 100%; border-radius: var(--r-pill); transition: width 0.4s ease; }
.sc-renew { font-size: 11.5px; color: var(--ink-500); margin-top: 8px; }

.sub-plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 900px) { .sub-plan-grid { grid-template-columns: repeat(2, 1fr); } .sub-plan-hero { flex-direction: column; align-items: flex-start; } }

.sub-plan-card { position: relative; padding: 16px 15px; border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--bg-surface); transition: border-color var(--d-fast); }
.sub-plan-card.current { border-color: var(--green-500); background: color-mix(in srgb, var(--green-500) 4%, var(--bg-surface)); }
.spc-cur-tag { position: absolute; top: 10px; right: 10px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--green-700); display: inline-flex; align-items: center; gap: 3px; }
.spc-cur-tag svg { width: 10px; height: 10px; }
[data-theme="dark"] .spc-cur-tag { color: var(--green-300); }
.spc-name { font-size: 13px; font-weight: 700; color: var(--ink-1000); margin-bottom: 4px; }
.spc-price { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--ink-1000); margin-bottom: 6px; }
.spc-price small { font-family: var(--font-body); font-size: 11px; font-weight: 500; color: var(--ink-500); }
.spc-desc { font-size: 11.5px; color: var(--ink-500); line-height: 1.4; }
