/* ==========================================================================
   Hallmark · genre: modern-minimal · macrostructure: Marquee Hero ·
   theme: Cobalt · enrichment: none · nav: N1b · footer: Ft2
   design-system: design.md · designed-as-app
   ==========================================================================
   Cobalt — cool engineered paper, one electric cobalt signal, hairline
   rulers, Space Grotesk display + Inter body + JetBrains Mono labels.

   This file owns ALL design tokens. Legacy names (`--primary`, `--bg-*`,
   `--text-*`, `--border-*`, `--gray-*`) are aliased to Cobalt values so
   the existing application sheet re-colors without per-rule edits.
   ========================================================================== */

:root {
    /* ---------- Cobalt palette (canonical names) ---------- */
    --color-paper:      oklch(98.5% 0.004 250);
    --color-paper-2:    oklch(96% 0.005 250);
    --color-paper-3:    oklch(93% 0.006 250);
    --color-ink:        oklch(24% 0.02 258);
    --color-ink-2:      oklch(34% 0.018 257);
    --color-ink-3:      oklch(46% 0.015 255);
    --color-rule:       oklch(88% 0.01 250);
    --color-rule-2:     oklch(78% 0.012 250);
    --color-accent:     oklch(58% 0.20 256);
    --color-accent-2:   oklch(51% 0.19 256);
    --color-accent-3:   oklch(46% 0.18 256);
    --color-accent-ink: oklch(99% 0.002 250);
    --color-accent-soft: oklch(95.5% 0.02 254);
    --color-focus:      oklch(58% 0.20 256);
    --color-record:     oklch(58% 0.22 25);
    --color-record-ink: oklch(99% 0.002 25);
    --color-graphite:   oklch(21% 0.016 260);
    --color-graphite-2: oklch(24% 0.016 260);
    --color-graphite-3: oklch(28% 0.016 260);
    --color-graphite-ink:   oklch(93% 0.004 250);
    --color-graphite-ink-2: oklch(80% 0.012 250);
    --color-graphite-rule:  oklch(34% 0.02 260);

    /* ---------- Semantic (light) ---------- */
    --success: oklch(62% 0.16 155);
    --success-hover: oklch(57% 0.15 155);
    --success-subtle: oklch(95% 0.03 155);
    --warning: oklch(78% 0.13 80);
    --warning-hover: oklch(72% 0.13 80);
    --warning-subtle: oklch(96% 0.02 80);
    --error: oklch(58% 0.2 27);
    --error-hover: oklch(53% 0.19 27);
    --error-subtle: oklch(95% 0.03 25);
    --info: oklch(62% 0.16 250);
    --info-hover: oklch(57% 0.16 250);
    --info-subtle: oklch(95% 0.02 252);
    --danger: oklch(58% 0.2 27);
    --danger-hover: oklch(53% 0.19 27);

    /* ---------- Legacy aliases → Cobalt (light) ---------- */
    --primary: var(--color-accent);
    --primary-hover: var(--color-accent-2);
    --primary-active: var(--color-accent-3);
    --primary-subtle: oklch(58% 0.20 256 / 0.08);
    --primary-subtle-hover: oklch(58% 0.20 256 / 0.14);

    --gray-50:  oklch(98.5% 0.004 250);
    --gray-100: oklch(96% 0.005 250);
    --gray-200: oklch(93% 0.006 250);
    --gray-300: oklch(88% 0.01 250);
    --gray-350: oklch(82% 0.012 250);
    --gray-400: oklch(72% 0.014 252);
    --gray-500: oklch(58% 0.016 254);
    --gray-600: oklch(46% 0.015 255);
    --gray-700: oklch(37% 0.017 256);
    --gray-800: oklch(30% 0.019 257);
    --gray-900: oklch(24% 0.02 258);

    --bg-default: var(--color-paper);
    --bg-elevated: var(--color-paper);
    --bg-subtle: var(--color-paper-2);
    --bg-muted: var(--color-paper-3);
    --bg-overlay: oklch(21% 0.016 260 / 0.55);
    --bg-glass: oklch(98.5% 0.004 250 / 0.82);

    --text-default: var(--color-ink);
    --text-secondary: var(--color-ink-2);
    --text-tertiary: var(--color-ink-3);
    --text-placeholder: var(--color-ink-3);
    --text-disabled: oklch(72% 0.014 252);
    --text-muted: var(--color-ink-3);

    --border-light: var(--color-rule);
    --border-default: var(--color-rule);
    --border-strong: var(--color-rule-2);
    --border-subtle: var(--color-rule);
    --border-focus: var(--color-focus);

    --shadow-xs: 0 1px 2px oklch(24% 0.02 258 / 0.03);
    --shadow-sm: 0 1px 3px oklch(24% 0.02 258 / 0.05), 0 1px 2px oklch(24% 0.02 258 / 0.03);
    --shadow-md: 0 4px 6px oklch(24% 0.02 258 / 0.05), 0 2px 4px oklch(24% 0.02 258 / 0.04);
    --shadow-lg: 0 10px 15px oklch(24% 0.02 258 / 0.05), 0 4px 6px oklch(24% 0.02 258 / 0.05);
    --shadow-xl: 0 20px 25px oklch(24% 0.02 258 / 0.06), 0 10px 10px oklch(24% 0.02 258 / 0.04);
    --shadow-focus: 0 0 0 3px oklch(58% 0.20 256 / 0.2);

    /* ---------- Fonts ---------- */
    --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    /* ---------- Type scale ---------- */
    --text-display: clamp(2.5rem, 5vw + 0.5rem, 4.75rem);
    --text-3xl: clamp(1.875rem, 3vw + 0.5rem, 2.75rem);
    --text-2xl: 1.375rem;
    --text-xl: 1.1875rem;
    --text-lg: 1.0625rem;
    --text-base: 0.9375rem;
    --text-base-medium: 0.9375rem;
    --text-sm: 0.8125rem;
    --text-sm-medium: 0.8125rem;
    --text-xs: 0.75rem;
    --text-xs-caps: 0.6875rem;

    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.01em;
    --tracking-caps: 0.06em;

    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.6;

    /* ---------- Radii (6px tool / 10px card language) ---------- */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-full: 9999px;

    /* ---------- Spacing · 4pt named scale ---------- */
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;

    /* ---------- Motion (Cobalt — composed, no bounce) ---------- */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --transition-fast: 160ms var(--ease-out);
    --transition-base: 240ms var(--ease-out);
    --transition-slow: 420ms var(--ease-out);
    --transition-spring: 240ms var(--ease-out);

    --icon-size-sm: 14px;
    --icon-size-base: 16px;
    --icon-size-lg: 20px;
    --icon-size-xl: 24px;
    --icon-stroke: 1.5px;
}

/* ==========================================================================
   Dark mode — graphite paper, light ink, same cobalt accent
   ========================================================================== */

:root.dark {
    --color-paper:      oklch(21% 0.016 260);
    --color-paper-2:    oklch(24% 0.018 258);
    --color-paper-3:    oklch(27% 0.02 257);
    --color-ink:        oklch(97% 0.004 250);
    --color-ink-2:      oklch(90% 0.008 250);
    --color-ink-3:      oklch(76% 0.012 250);
    --color-rule:       oklch(32% 0.02 258);
    --color-rule-2:     oklch(42% 0.025 258);
    --color-accent:     oklch(75% 0.15 256);
    --color-accent-2:   oklch(80% 0.14 256);
    --color-accent-3:   oklch(84% 0.12 256);
    --color-accent-ink: oklch(20% 0.02 258);
    --color-accent-soft: oklch(26% 0.05 256);
    --color-focus:      oklch(75% 0.15 256);
    --color-record:     oklch(68% 0.2 25);
    --color-record-ink: oklch(20% 0.02 25);
    --color-graphite:   oklch(16% 0.014 260);
    --color-graphite-2: oklch(19% 0.016 260);
    --color-graphite-3: oklch(23% 0.016 260);
    --color-graphite-ink:   oklch(93% 0.004 250);
    --color-graphite-ink-2: oklch(80% 0.012 250);
    --color-graphite-rule:  oklch(30% 0.02 260);

    --success: oklch(72% 0.14 155);
    --success-hover: oklch(77% 0.13 155);
    --success-subtle: oklch(24% 0.04 155);
    --warning: oklch(80% 0.12 80);
    --warning-hover: oklch(85% 0.11 80);
    --warning-subtle: oklch(26% 0.03 80);
    --error: oklch(70% 0.17 27);
    --error-hover: oklch(75% 0.16 27);
    --error-subtle: oklch(26% 0.04 27);
    --info: oklch(74% 0.14 250);
    --info-hover: oklch(79% 0.13 250);
    --info-subtle: oklch(26% 0.04 252);
    --danger: oklch(70% 0.17 27);
    --danger-hover: oklch(75% 0.16 27);

    --primary: var(--color-accent);
    --primary-hover: var(--color-accent-2);
    --primary-active: var(--color-accent-3);
    --primary-subtle: oklch(75% 0.15 256 / 0.14);
    --primary-subtle-hover: oklch(75% 0.15 256 / 0.22);

    --gray-50:  oklch(21% 0.016 260);
    --gray-100: oklch(24% 0.018 258);
    --gray-200: oklch(27% 0.02 257);
    --gray-300: oklch(32% 0.02 258);
    --gray-350: oklch(38% 0.022 258);
    --gray-400: oklch(48% 0.024 258);
    --gray-500: oklch(60% 0.02 258);
    --gray-600: oklch(76% 0.012 250);
    --gray-700: oklch(86% 0.008 250);
    --gray-800: oklch(92% 0.006 250);
    --gray-900: oklch(97% 0.004 250);

    --bg-default: var(--color-paper);
    --bg-elevated: var(--color-paper);
    --bg-subtle: var(--color-paper-2);
    --bg-muted: var(--color-paper-3);
    --bg-overlay: oklch(16% 0.014 260 / 0.6);
    --bg-glass: oklch(21% 0.016 260 / 0.82);

    --text-default: var(--color-ink);
    --text-secondary: var(--color-ink-2);
    --text-tertiary: var(--color-ink-3);
    --text-placeholder: oklch(60% 0.02 258);
    --text-disabled: oklch(48% 0.024 258);
    --text-muted: var(--color-ink-3);

    --border-light: var(--color-rule);
    --border-default: var(--color-rule);
    --border-strong: var(--color-rule-2);
    --border-subtle: var(--color-rule);

    --shadow-xs: 0 1px 2px oklch(16% 0.014 260 / 0.4);
    --shadow-sm: 0 1px 3px oklch(16% 0.014 260 / 0.5), 0 1px 2px oklch(16% 0.014 260 / 0.4);
    --shadow-md: 0 4px 6px oklch(16% 0.014 260 / 0.5), 0 2px 4px oklch(16% 0.014 260 / 0.4);
    --shadow-lg: 0 10px 15px oklch(16% 0.014 260 / 0.5), 0 4px 6px oklch(16% 0.014 260 / 0.4);
    --shadow-xl: 0 20px 25px oklch(16% 0.014 260 / 0.6), 0 10px 10px oklch(16% 0.014 260 / 0.4);
    --shadow-focus: 0 0 0 3px oklch(75% 0.15 256 / 0.3);
}

/* ==========================================================================
   ScreenRecord.in - Application Stylesheet

   All design tokens now live in tokens.css (Cobalt). The legacy :root /
   :root.dark token blocks were removed from this file; this sheet only
   carries component rules, all of which resolve through the aliases in
   tokens.css. Structural redesign lives in theme.css (imported last).
   ========================================================================== */

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-default);
    background: var(--bg-default);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

img, video {
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Accessibility - Visually Hidden
   ========================================================================== */

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

/* ==========================================================================
   Hero Section - SEO Content
   ========================================================================== */

.hero-section {
    text-align: center;
    padding: var(--space-8) var(--space-4) var(--space-6);
    margin-bottom: var(--space-4);
}

.hero-eyebrow {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--primary-subtle);
    color: var(--primary);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
    letter-spacing: 0.02em;
}

.hero-content h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
    line-height: 1.15;
}

.hero-subtitle {
    font-size: var(--text-base);
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
}

.recorder-microcopy {
    text-align: center;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: var(--space-2);
}

.recorder-privacy {
    text-align: center;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: var(--space-1);
    margin-bottom: var(--space-2);
}

.hero-video {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 2px var(--primary-subtle), 0 0 20px var(--primary-subtle);
    cursor: pointer;
    transition: box-shadow var(--transition-fast);
}

.hero-video:hover {
    box-shadow: 0 0 0 2px var(--primary), 0 0 30px var(--primary-subtle);
}

/* Video Tooltip */

/* ==========================================================================
   Features Section - SEO Content
   ========================================================================== */

.features-section {
    padding: var(--space-6) 0;
    margin-bottom: var(--space-6);
    margin-top: var(--space-6);
}

.features-section > h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    text-align: center;
    margin-bottom: var(--space-4);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
}

.feature-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all var(--transition-fast);
}

.feature-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.feature-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: var(--text-base-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.feature-card p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* ==========================================================================
   How To Use Section - SEO Content
   ========================================================================== */

.howto-section {
    padding: var(--space-6) 0;
    margin-bottom: var(--space-4);
}

.howto-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    text-align: center;
    margin-bottom: var(--space-4);
}

.howto-steps kbd {
    display: inline-block;
    padding: 1px 6px;
    font-family: var(--font-mono, monospace);
    font-size: 0.85em;
    background: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-default);
    vertical-align: baseline;
}

/* Keyboard Shortcuts Section */

.shortcuts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3) var(--space-5);
}

.shortcuts-list li {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.shortcuts-list kbd {
    display: inline-block;
    padding: 2px 8px;
    font-family: var(--font-mono, monospace);
    font-size: var(--text-xs);
    background: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-default);
    min-width: 1.5em;
    text-align: center;
}

.howto-steps {
    list-style: none;
    counter-reset: howto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.howto-steps li {
    counter-increment: howto;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    position: relative;
}

.howto-steps li::before {
    content: counter(howto);
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
}

.howto-steps li strong {
    display: block;
    font-size: var(--text-sm-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.howto-steps li p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* ==========================================================================
   FAQ Section - SEO Content
   ========================================================================== */

.faq-section {
    padding: var(--space-6) 0;
    margin-bottom: var(--space-6);
}

.faq-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    text-align: center;
    margin-bottom: var(--space-4);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
}

.faq-item dt {
    font-size: var(--text-sm-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.faq-item dd {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* ==========================================================================
   Focus States - Style
   ========================================================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: var(--space-2) var(--space-4);
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* ==========================================================================
   App Header - Style
   ========================================================================== */

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-5);
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

:root.dark .app-header {
    background: rgba(15, 17, 23, 0.85);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}

.app-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: var(--text-default);
    padding: var(--space-1) var(--space-2);
    margin-left: calc(-1 * var(--space-2));
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.app-logo:hover {
    background: var(--bg-subtle);
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--color-record);
    flex-shrink: 0;
}

.logo-icon-dot {
    animation: rec-pulse 1.6s var(--ease-in-out) infinite;
}

.logo-text {
    font-size: var(--text-base-medium);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-tight);
    color: var(--text-default);
}

.app-menu-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.app-menu-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-default);
    border-color: var(--border-light);
}

.app-menu-btn:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.app-menu-btn svg {
    width: 18px;
    height: 18px;
    position: absolute;
    inset: 0;
    margin: auto;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

/* When the toggle is "open", swap the hamburger for the X. The
   `body.menu-open` class is set by common.js / ui.js after either
   the command palette or the mobile menu opens. */

/* When either the command palette or the mobile menu is open, raise
   the header above the overlay so the toggle button stays tappable
   for closing. Without this, the second tap to close the menu would
   land on the panel/backdrop instead of the toggle. */

body.menu-open .app-header {
    z-index: 300;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Primary site nav. Lives in the header on desktop; hidden on mobile
   where the mobile menu (#mobile-menu) handles discovery. */

.app-header-nav {
    display: none;
    align-items: center;
    gap: var(--space-1);
    padding: 4px;
    margin-left: var(--space-2);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
}

.app-header-nav-link {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
    white-space: nowrap;
}

.app-header-nav-link:hover {
    background: var(--bg-default);
    color: var(--text-default);
    box-shadow: var(--shadow-xs);
}

.app-header-nav-link[aria-current="page"] {
    color: var(--text-default);
    background: var(--bg-default);
    box-shadow: var(--shadow-sm);
}

/* "My Videos" link only renders for signed-in users. It sits at the
   end of the nav and gets a subtle primary tint so it stands out as
   the user's home for saved recordings. */

.app-header-nav-link--videos {
    color: var(--primary);
}

.app-header-nav-link--videos:hover {
    color: var(--primary-hover);
    background: var(--primary-subtle);
    box-shadow: none;
}

.app-header-nav-link--videos[aria-current="page"] {
    color: white;
    background: var(--primary);
    box-shadow: var(--shadow-sm);
}

.app-header-nav-link--videos[aria-current="page"]:hover {
    background: var(--primary-hover);
}

@media (min-width: 768px) {
    .app-header-nav {
        display: flex;
    }
}

/* Auth CTAs in the header. Shown only on desktop; mobile surfaces Sign
   in / Create account inside the mobile menu. */

.app-header-auth {
    display: none;
    align-items: center;
    gap: var(--space-2);
    margin-left: var(--space-2);
    padding-left: var(--space-3);
    border-left: 1px solid var(--border-light);
}

.app-header-auth-link {
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.app-header-auth-link:hover {
    background: var(--bg-subtle);
    color: var(--text-default);
}

.app-header-auth-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: white;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-active) 100%);
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    box-shadow: 0 1px 2px rgba(94, 106, 210, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.app-header-auth-cta:hover {
    background: linear-gradient(180deg, var(--primary-hover) 0%, var(--primary) 100%);
    box-shadow: 0 4px 12px rgba(94, 106, 210, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.app-header-auth-cta:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(94, 106, 210, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
    .app-header-auth {
        display: flex;
    }
}

/* ==========================================================================
   User Menu - Style
   ========================================================================== */

/* ==========================================================================
   Command Menu - Style
   ========================================================================== */

.command-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    pointer-events: none;
}

.command-menu:not(.hidden) {
    pointer-events: auto;
}

.command-backdrop {
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-fast);
}

.command-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--bg-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    overflow: hidden;
    animation: slideDown var(--transition-spring);
}

.command-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.command-search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.command-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-base);
    color: var(--text-default);
    outline: none;
}

.command-input::placeholder {
    color: var(--text-placeholder);
}

.command-results {
    max-height: 320px;
    overflow-y: auto;
    padding: var(--space-2);
}

.command-group {
    padding: var(--space-1) 0;
}

.command-group-label {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs-caps);
    font-weight: var(--font-medium);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.command-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-default);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.command-item:hover,
.command-item.selected {
    background: var(--bg-subtle);
}

.command-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* `button_to` for sign-out renders as <form><button>; flatten the
   form so the button sits flush with the other command items. */

.command-item-form {
    display: contents;
}

.command-item svg.icon-sun,
.command-item svg.icon-moon {
    display: none;
}

html:not(.dark) .command-item svg.icon-sun {
    display: block;
}

html:not(.dark) .command-item svg.icon-moon {
    display: none;
}

html.dark .command-item svg.icon-sun {
    display: none;
}

html.dark .command-item svg.icon-moon {
    display: block;
}

.command-item span:first-of-type {
    flex: 1;
}

.command-shortcut {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.command-footer {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-2) var(--space-4);
    border-top: 1px solid var(--border-light);
    background: var(--bg-subtle);
}

.command-hint {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* ==========================================================================
   Mobile Menu - Style
   Replaces the command palette on viewports < 768px. Slides in from
   the right edge of the viewport and traps focus while open.
   ========================================================================== */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.mobile-menu:not(.hidden) {
    pointer-events: auto;
}

.mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-fast);
}

.mobile-menu-panel {
    position: relative;
    width: min(360px, 100%);
    max-width: 100%;
    height: 100%;
    background: var(--bg-default);
    border-left: 1px solid var(--border-light);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    /* Leave room at the top so the header toggle remains tappable
       while the menu is open — tapping it a second time should
       close the menu. */
    padding-top: calc(var(--space-4) + 48px);
    padding-left: var(--space-2);
    padding-right: var(--space-2);
    padding-bottom: var(--space-6);
    animation: slideInRight var(--transition-base);
}

:root.dark .mobile-menu-panel {
    background: var(--bg-elevated);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-1) var(--space-2) 0;
    margin-bottom: var(--space-1);
}

.mobile-menu-header-label {
    font-size: var(--text-sm-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
}

.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.mobile-menu-close:hover {
    background: var(--bg-muted);
    color: var(--text-default);
}

.mobile-menu-close svg {
    width: 18px;
    height: 18px;
}

.mobile-menu-section {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-light);
}

.mobile-menu-section:last-child {
    border-bottom: none;
}

.mobile-menu-label {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs-caps);
    font-weight: var(--font-medium);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-default);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
    min-height: 44px;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
    background: var(--bg-subtle);
}

.mobile-menu-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* Sun/Moon swap for the dark-mode toggle. */

.mobile-menu-item svg.icon-sun,
.mobile-menu-item svg.icon-moon {
    display: none;
}

html:not(.dark) .mobile-menu-item svg.icon-sun {
    display: block;
}

html:not(.dark) .mobile-menu-item svg.icon-moon {
    display: none;
}

html.dark .mobile-menu-item svg.icon-sun {
    display: none;
}

html.dark .mobile-menu-item svg.icon-moon {
    display: block;
}

.mobile-menu-item span {
    flex: 1;
}

/* `button_to` for sign-out renders as <form><button>; flatten the
   form so the button sits flush with the other items. */

.mobile-menu-item-form {
    display: contents;
}

/* Auth CTAs in the mobile menu. Match the desktop header's CTA styling
   so the call to action is consistent across breakpoints. */

.mobile-menu-item--cta {
    color: white;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-active) 100%);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(94, 106, 210, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    margin-top: var(--space-1);
}

.mobile-menu-item--cta:hover {
    background: linear-gradient(180deg, var(--primary-hover) 0%, var(--primary) 100%);
    color: white;
}

.mobile-menu-item--cta svg {
    color: white;
}

.mobile-menu-item--cta-secondary {
    color: var(--primary);
    background: var(--primary-subtle);
    font-weight: 600;
}

.mobile-menu-item--cta-secondary:hover {
    background: var(--primary-subtle-hover);
    color: var(--primary);
}

.mobile-menu-item--cta-secondary svg {
    color: var(--primary);
}

/* Hide the mobile menu on desktop. The command palette covers the
   same surface area on >= 768px. */

@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
}

/* Hide the command palette on mobile. The mobile menu replaces it
   on viewports < 768px; the desktop header keeps its full nav + auth
   links visible instead. */

@media (max-width: 767px) {
    .command-menu {
        display: none !important;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ==========================================================================
   Main Content
   ========================================================================== */

#main-content {
    display: flex;
    flex-direction: column;
    padding: var(--space-6) var(--space-4);
    max-width: 900px;
    margin: 0 auto;
    min-height: 70vh;
}

/* ==========================================================================
   Recording Controls - Card Style
   ========================================================================== */

.recording-controls {
    background: var(--bg-default);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: 0 0 20px var(--primary-subtle), 0 0 40px var(--primary-subtle);
}

.controls-header {
    margin-bottom: var(--space-4);
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.config-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.config-card:hover {
    border-color: var(--border-default);
    background: var(--bg-default);
}

.config-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.config-input:checked + .config-icon {
    background: var(--primary-subtle);
    color: var(--primary);
}

.config-input:checked ~ .config-check {
    opacity: 1;
    transform: scale(1);
}

.config-input:checked ~ .config-content .config-title {
    color: var(--primary);
}

.config-card:has(.config-input:checked) {
    border-color: var(--primary);
    background: var(--primary-subtle);
}

.config-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.config-icon svg {
    width: 18px;
    height: 18px;
}

.config-content {
    flex: 1;
    min-width: 0;
}

.config-title {
    display: block;
    font-size: var(--text-sm-medium);
    font-weight: var(--font-medium);
    color: var(--text-default);
    margin-bottom: 2px;
}

.config-desc {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.config-check {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: var(--radius-full);
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-spring);
}

.config-check svg {
    width: 10px;
    height: 10px;
}

.config-summary {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.config-summary svg {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
}

/* Start Recording Button */

.btn-record {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-record:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-record:active:not(:disabled) {
    background: var(--primary-active);
}

.btn-record:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-record svg {
    width: 18px;
    height: 18px;
}

.btn-record-shortcut {
    font-size: var(--text-xs);
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
}

/* Recording Action Buttons - Pause/Stop below start button */

.recording-action-buttons {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.btn-action-record {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-action-record svg {
    width: 16px;
    height: 16px;
}

.btn-pause {
    background: var(--warning);
    color: white;
}

.btn-pause:hover {
    background: var(--warning-hover);
}

.btn-stop {
    background: var(--error);
    color: white;
}

.btn-stop:hover {
    background: var(--error-hover);
}

/* ==========================================================================
   Preview Area
   ========================================================================== */

.preview-area {
    margin-top: var(--space-4);
}

.preview-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gray-900);
    box-shadow: var(--shadow-md);
    width: 100%;
}

.preview-video {
    width: 100%;
    display: block;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recording-timer {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    width: fit-content;
}

.timer-dot {
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: var(--radius-full);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.btn-stop {
    background: var(--error);
}

.btn-stop:hover {
    background: var(--error-hover);
}

.paused-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.paused-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--warning);
    color: white;
    border-radius: var(--radius-md);
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    letter-spacing: 0.05em;
    animation: pulse 2s ease-in-out infinite;
}

.paused-badge svg {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   PiP Info
   ========================================================================== */

.pip-info {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--warning-subtle);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    margin: var(--space-3) 0;
}

.pip-info svg {
    width: 18px;
    height: 18px;
    color: var(--warning);
    flex-shrink: 0;
    margin-top: 1px;
}

.pip-info-content {
    flex: 1;
}

.pip-info-content p {
    font-size: var(--text-sm);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.pip-info-content strong {
    font-weight: var(--font-medium);
}

.pip-buttons {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.pip-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pip-btn-primary {
    background: var(--warning);
    color: white;
    border: none;
}

.pip-btn-primary:hover {
    background: var(--warning-hover);
}

.pip-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.pip-btn-secondary:hover {
    background: var(--bg-subtle);
}

/* ==========================================================================
   Sidebar - Style
   ========================================================================== */

#sidebar {
    position: fixed;
    right: -380px;
    top: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-default);
    border-left: 1px solid var(--border-light);
    transition: right var(--transition-slow);
    overflow: hidden;
    z-index: 150;
    display: flex;
    flex-direction: column;
}

#sidebar.open {
    right: 0;
}

.filter-btn {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--border-default);
    color: var(--text-default);
}

.filter-btn.active {
    background: var(--primary-subtle);
    border-color: var(--primary);
    color: var(--primary);
}

.saved-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-3);
}

.saved-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-3);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    transition: all var(--transition-fast);
}

.saved-card:hover {
    border-color: var(--border-default);
}

.saved-card-thumbnail {
    width: 100%;
    height: 320px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-muted);
    margin-bottom: var(--space-3);
}

.saved-card-thumbnail--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.saved-card-thumbnail--placeholder svg {
    width: 64px;
    height: 64px;
}

.saved-card-content {
    flex: 1;
    min-width: 0;
}

.saved-card-title {
    font-size: var(--text-sm-medium);
    font-weight: var(--font-medium);
    color: var(--text-default);
    margin-bottom: var(--space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-3);
}

.saved-card-actions {
    display: flex;
    gap: var(--space-1);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-action svg {
    width: 12px;
    height: 12px;
}

.saved-card-shared {
    margin-top: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.saved-card-shared-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
}

.saved-card-shared-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.saved-card-shared-value {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-default);
    line-height: 1.1;
}

.saved-card-shared-label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: 2px;
}

.saved-card-shared-progress {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.saved-card-shared-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.saved-card-shared-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

.saved-card-shared-progress-text {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.saved-card-shared-share-btn {
    display: block;
    margin: var(--space-2) auto 0;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--primary);
    background: var(--primary-subtle);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.saved-card-shared-share-btn:hover {
    background: var(--primary-subtle-hover);
}

.saved-card-shared-links {
    display: flex;
    gap: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
}

.saved-card-shared-link {
    flex: 1;
    text-align: center;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.saved-card-shared-link:hover {
    background: var(--bg-muted);
    color: var(--text-default);
}

.saved-card-shared-link-primary {
    background: var(--primary-subtle);
    color: var(--primary);
}

.saved-card-shared-link-primary:hover {
    background: var(--primary-subtle-hover);
    color: var(--primary);
}

.btn-play {
    background: var(--primary-subtle);
    color: var(--primary);
}

.btn-play:hover {
    background: var(--primary-subtle-hover);
}

.btn-download {
    background: var(--success-subtle);
    color: var(--success);
}

.btn-download:hover {
    background: rgba(70, 167, 88, 0.15);
}

.btn-delete {
    background: var(--error-subtle);
    color: var(--error);
}

.btn-delete:hover {
    background: rgba(227, 72, 80, 0.15);
}

.btn-share {
    background: var(--primary-subtle);
    color: var(--primary);
}

.btn-share:hover {
    background: var(--primary-subtle-hover);
}

.btn-shared {
    background: var(--success-subtle);
    color: var(--success);
}

.btn-shared:hover {
    opacity: 0.85;
}

/* Sync Button */

/* Sync Progress */

.sync-progress {
    margin-bottom: var(--space-2);
}

.sync-progress-bar {
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-1);
}

.sync-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.sync-progress-text {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-align: center;
    display: block;
}

.empty-state {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

/* ==========================================================================
   Storage Pie Chart - Floating Right
   ========================================================================== */

.storage-pie {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-4);
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-default);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    box-shadow: var(--shadow-md);
    z-index: 100;
    overflow: hidden;
    width: auto;
    min-width: 48px;
    transition: all var(--transition-fast);
}

.storage-pie:hover {
    gap: var(--space-3);
    padding: var(--space-3);
}

.storage-pie-chart {
    position: relative;
    width: 40px;
    height: 40px;
}

.pie-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pie-bg {
    fill: none;
    stroke: var(--bg-muted);
    stroke-width: 3;
}

.pie-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.3s ease, stroke 0.3s ease;
}

.pie-progress.warning {
    stroke: var(--warning);
}

.pie-progress.danger {
    stroke: var(--error);
}

.pie-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

#storage-percent {
    font-size: 8px;
    font-weight: var(--font-medium);
    color: var(--text-secondary);
}

.storage-pie-info {
    display: flex;
    flex-direction: column;
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.storage-pie:hover .storage-pie-info {
    width: auto;
    opacity: 1;
}

.storage-pie-info .storage-info {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ==========================================================================
   Modals - Style
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-fast);
}

.modal {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 64px);
    background: var(--bg-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: modal-enter var(--transition-spring);
}

.modal-content {
    padding: var(--space-4);
}

.modal-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-subtle);
    color: var(--text-default);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

.modal-video {
    width: 100%;
    border-radius: var(--radius-md);
}

.modal-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-subtle);
}

/* Filename Modal */

.form-group {
    margin-bottom: var(--space-3);
}

.form-input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-default);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}

.filename-input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-default);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.filename-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.filename-preview {
    padding: var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.filename-preview-text {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-default);
    word-break: break-all;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.btn-secondary {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-muted);
    color: var(--text-default);
}

.btn-primary {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-danger {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: white;
    background: var(--danger);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-danger:hover {
    background: var(--danger-hover);
}

/* Naming Pattern Modal */

.naming-pattern-modal-content {
    max-width: 520px;
}

.naming-pattern-modal-content h2 {
    font-size: var(--text-base-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-4);
}

.naming-pattern-select {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-default);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.naming-pattern-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.custom-pattern-group {
    margin-top: var(--space-3);
}

.naming-pattern-custom {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    color: var(--text-default);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.naming-pattern-custom:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.naming-tokens {
    margin: var(--space-3) 0;
}

.naming-tokens > label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.token-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.token {
    padding: 2px var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--primary);
    background: var(--primary-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.token:hover {
    background: var(--primary-subtle-hover);
}

.pattern-preview {
    padding: var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
}

.pattern-preview-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-1);
}

.pattern-preview-text {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-default);
    word-break: break-all;
}

/* Shortcuts Modal */

.shortcuts-modal {
    max-width: 400px;
}

.shortcuts-modal h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    text-align: center;
    margin-bottom: var(--space-4);
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
}

.shortcut-item kbd {
    min-width: 56px;
    padding: var(--space-1) var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-default);
    background: var(--bg-default);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    text-align: center;
}

.shortcut-desc {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ==========================================================================
   Delete Confirmation Modal - Style
   ========================================================================== */

.delete-confirm-modal-content,
.delete-all-confirm-modal-content {
    max-width: 420px;
}

.delete-confirm-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--error-subtle);
    border-radius: var(--radius-md);
    color: var(--error);
    margin-bottom: var(--space-3);
}

.delete-confirm-icon svg {
    width: 16px;
    height: 16px;
}

.delete-confirm-modal-content h2,
.delete-all-confirm-modal-content h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.delete-confirm-message {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.delete-confirm-message strong {
    color: var(--text-default);
    font-weight: var(--font-medium);
}

.delete-all-confirm-input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    color: var(--text-default);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.delete-all-confirm-input:focus {
    outline: none;
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-subtle);
}

.delete-all-confirm-input::placeholder {
    color: var(--text-placeholder);
    text-transform: none;
    letter-spacing: normal;
}

#delete-all-confirm-ok:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Toast Notifications - Style
   ========================================================================== */

#error-notifications {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.flash-message {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 90%;
    width: 400px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    text-align: center;
}

.flash-message.flash-success {
    background: var(--success-subtle);
    color: var(--success);
    border: 1px solid var(--success);
}

.flash-message.flash-error {
    background: var(--error-subtle);
    color: var(--error);
    border: 1px solid var(--error);
}

.toast {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 90%;
    width: 400px;
    animation: toast-enter var(--transition-spring);
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

.toast.warning {
    border-color: var(--warning);
}

.toast.info {
    border-color: var(--info);
}

.toast-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.info .toast-icon {
    color: var(--info);
}

.toast-message {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-default);
}

.toast-close {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toast-close:hover {
    background: var(--bg-muted);
    color: var(--text-default);
}

@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-exit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
}

/* ==========================================================================
   Keyboard Shortcuts Button
   ========================================================================== */

.shortcuts-info-btn {
    position: fixed;
    bottom: var(--space-4);
    left: var(--space-4);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-default);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    z-index: 100;
}

.shortcuts-info-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-default);
}

.shortcuts-info-btn svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* ==========================================================================
   Skeleton Loading
   ========================================================================== */

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   Capability Warnings
   ========================================================================== */

.capability-warning {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--warning-subtle);
    border: 1px solid rgba(214, 158, 46, 0.2);
    border-radius: var(--radius-md);
    margin: var(--space-2) 0;
    font-size: var(--text-sm);
    color: var(--warning);
}

.capability-warning svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ==========================================================================
   Browser Not Supported Warning
   ========================================================================== */

.browser-warning {
    padding: var(--space-4);
    background: var(--error-subtle);
    border: 1px solid rgba(227, 72, 80, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
}

.browser-warning h3 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--error);
    margin-bottom: var(--space-2);
}

.browser-warning p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.browser-warning p:last-child {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* ==========================================================================
   Error Recovery
   ========================================================================== */

.error-recovery {
    background: var(--bg-default);
    border: 1px solid var(--error);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin: var(--space-2) 0;
}

.error-recovery.warning {
    border-color: var(--warning);
}

.error-message {
    font-size: var(--text-sm);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.retry-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.retry-btn:hover:not(:disabled) {
    background: var(--primary-hover);
}

.retry-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.inline-error {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px var(--space-2);
    background: var(--error-subtle);
    border: 1px solid var(--error);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--error);
}

.inline-retry-btn {
    padding: 2px var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.inline-retry-btn:hover:not(:disabled) {
    background: var(--primary-hover);
}

/* ==========================================================================
   Mobile Optimizations
   ========================================================================== */

/* Hide screen sharing toggle on mobile - not supported */

@media (max-width: 768px) {
    .config-card[data-config="screen"] {
        display: none;
    }
    
    /* Adjust grid to account for hidden screen toggle */
    .config-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .shortcuts-info-btn {
        display: none;
    }
}

/* ==========================================================================
   Touch Target Optimization - Minimum 44px
   ========================================================================== */

/* Increase touch targets for all interactive elements */

.config-card {
    min-height: 56px;
    padding: var(--space-3) var(--space-4);
}

.btn-record {
    min-height: 52px;
    padding: var(--space-4) var(--space-4);
}

.btn-action-record {
    min-height: 48px;
}

.app-menu-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

.modal-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

.filter-btn {
    min-height: 36px;
    padding: var(--space-2) var(--space-3);
}

.btn-action {
    min-height: 36px;
    padding: var(--space-2) var(--space-3);
}

.pip-btn {
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
}

.btn-secondary,
.btn-primary {
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
}

.command-item {
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
}

.shortcuts-info-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

.storage-pie {
    min-height: 52px;
    padding: var(--space-3);
}

/* ==========================================================================
   Landscape Orientation Handling
   ========================================================================== */

@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        padding: var(--space-4) var(--space-3);
        margin-bottom: var(--space-3);
    }

    .hero-content h1 {
        font-size: var(--text-xl);
    }

    .hero-subtitle {
        font-size: var(--text-sm);
        max-width: 400px;
    }
    
    .recording-controls {
        padding: var(--space-3);
    }
    
    .controls-header {
        margin-bottom: var(--space-3);
    }
    
    .config-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
        margin-bottom: var(--space-3);
    }
    
    .config-card {
        padding: var(--space-2) var(--space-3);
        min-height: 48px;
    }
    
    .config-icon {
        width: 32px;
        height: 32px;
    }
    
    .config-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .config-title {
        font-size: var(--text-xs);
    }
    
    .config-desc {
        display: none;
    }
    
    .config-summary {
        padding: var(--space-1) var(--space-2);
        font-size: var(--text-xs);
        margin-bottom: var(--space-2);
    }
    
    .btn-record {
        min-height: 44px;
        padding: var(--space-2) var(--space-3);
    }
    
    #main-content {
        padding: var(--space-3) var(--space-3);
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .app-header {
        padding: var(--space-2) var(--space-3);
    }

    #main-content {
        padding: var(--space-4) var(--space-3);
    }

    .config-grid {
        grid-template-columns: 1fr;
    }

    #sidebar {
        width: 100%;
        right: -100%;
    }

    .command-container {
        max-width: 100%;
        margin: 0 var(--space-3);
    }

    .storage-pie {
        bottom: var(--space-3);
        right: var(--space-3);
        padding: var(--space-2);
    }

    .modal {
        max-width: 100%;
        margin: 0 var(--space-3);
    }
}

@media (max-width: 480px) {
    .saved-card-thumbnail {
        height: 100px;
    }

    .command-footer {
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    .toast {
        min-width: auto;
        max-width: calc(100vw - 32px);
    }
    
    /* Further simplify for very small screens */
    .recording-controls {
        padding: var(--space-3);
    }
    
    .controls-header {
        margin-bottom: var(--space-3);
    }
    
    .config-summary {
        font-size: var(--text-xs);
    }
    
    .btn-record-shortcut {
        display: none;
    }
}

/* ==========================================================================
   Landscape Mode Class (for JS-triggered landscape handling)
   ========================================================================== */

.landscape-mode .hero-eyebrow,
.landscape-mode .hero-subtitle {
    display: none;
}

.landscape-mode .hero-content h1 {
    font-size: var(--text-lg);
}

/* ==========================================================================
    Footer - Style
    ========================================================================== */

.app-footer {
    padding: var(--space-6) var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border-top: 1px solid var(--border-light);
    margin-top: auto;
    background: var(--bg-subtle);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2) var(--space-4);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
}

.footer-nav a:hover {
    color: var(--primary);
    background: var(--primary-subtle);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.footer-credit {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

.footer-credit a {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--font-medium);
}

.footer-credit a:hover {
    text-decoration: underline;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin: 0;
}

.footer-legal a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--primary);
}

.footer-legal .link-separator {
    color: var(--border-default);
    font-size: 10px;
}

.app-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: color var(--transition-fast);
}

.app-footer a:hover {
    color: var(--primary-hover);
}

/* ==========================================================================
     Legal Pages - Privacy Policy & Terms of Service
     ========================================================================== */

.legal-container {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-4);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-6);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--primary-hover);
}

.legal-container h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.last-updated {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-bottom: var(--space-8);
}

.legal-container section {
    margin-bottom: var(--space-6);
}

.legal-container h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-3);
}

.legal-container p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-3);
}

.legal-container ul {
    list-style: disc;
    padding-left: var(--space-5);
    margin-bottom: var(--space-3);
}

.legal-container li {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-2);
}

.legal-container strong {
    font-weight: var(--font-medium);
    color: var(--text-default);
}

/* Responsive for legal pages */

@media (max-width: 768px) {
    .legal-container {
        padding: var(--space-6) var(--space-4);
    }

    .legal-container h1 {
        font-size: var(--text-xl);
    }

    .legal-container h2 {
        font-size: var(--text-base-medium);
    }

    .legal-container p,
    .legal-container li {
        font-size: var(--text-sm);
    }
}

/* ==========================================================================
     Testimonials Page
     ========================================================================== */

.testimonials-page {
    padding: var(--space-6) var(--space-4);
    max-width: 1000px;
    margin: 0 auto;
}

.testimonials-page .page-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.testimonials-page .page-header h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: 0;
}

.testimonials-page .page-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-1) 0 0 0;
}

.testimonials-hero {
    text-align: center;
    padding: var(--space-4) var(--space-6);
    margin-bottom: var(--space-6);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.testimonials-hero h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.testimonials-hero p {
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.testimonial-card {
    background: var(--bg-default);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all var(--transition-fast);
}

.testimonial-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-sm);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-subtle);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.testimonial-avatar svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.testimonial-info h3 {
    font-size: var(--text-base-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: 0;
}

.testimonial-role {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 2px 0 0 0;
}

.testimonial-company {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin: 2px 0 0 0;
}

.testimonial-quote {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-light);
    font-style: italic;
}

.testimonial-submit {
    text-align: center;
    padding: var(--space-6);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.testimonial-submit h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.testimonial-submit p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.testimonial-submit .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.testimonial-submit .btn-primary:hover {
    background: var(--primary-hover);
}

.testimonial-submit .btn-primary svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
     Feedback Modal
     ========================================================================== */

.feedback-modal-content {
    max-width: 600px;
}

.feedback-modal-content h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-4);
}

/* ==========================================================================
    PRO Coming Soon Banner
    ========================================================================== */

.pro-banner {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin: var(--space-6) 0;
    text-align: center;
}

.pro-banner h2 {
    font-size: var(--text-base-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: var(--space-2) 0 var(--space-1);
}

.pro-banner p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.pro-badge {
    display: inline-block;
    padding: 2px var(--space-2);
    background: var(--primary-subtle);
    color: var(--primary);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}

.btn-pro-signup {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-pro-signup:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-pro-signup svg {
    width: 18px;
    height: 18px;
}

/* PRO Modal */

.pro-modal-content {
    max-width: 480px;
}

.pro-modal-header {
    text-align: center;
    margin-bottom: var(--space-4);
}

.pro-badge-small {
    display: inline-block;
    padding: 2px var(--space-2);
    background: var(--primary-subtle);
    color: var(--primary);
    font-size: var(--text-xs-caps);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
}

.pro-modal-header h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
}

.pro-modal-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-4);
}

.pro-email-form {
    margin-bottom: var(--space-3);
}

.pro-signup-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.pro-signup-form .form-group {
    margin-bottom: 0;
}

.pro-signup-form .btn {
    width: 100%;
}

.pro-email-input {
    width: 100%;
    padding: var(--space-3);
    font-size: var(--text-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-default);
    color: var(--text-default);
}

.pro-email-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.pro-modal-note {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-align: center;
    margin-top: var(--space-3);
}

/* PRO Success State */

.pro-success {
    text-align: center;
    padding: var(--space-4);
}

.pro-success-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-subtle);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-4);
}

.pro-success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--success);
}

.pro-success h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.pro-success p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

/* ==========================================================================
   Videos Page
   ========================================================================== */

.videos-page {
    padding: var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
}

.videos-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.videos-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.back-btn:hover {
    background: var(--bg-default);
    color: var(--text-default);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.breadcrumbs {
    max-width: var(--content-max-width, 1200px);
    margin: 0 auto;
    padding: 16px;
    font-size: var(--text-sm, 14px);
    color: var(--text-tertiary, #6b7280);
    max-width: 900px;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: var(--text-tertiary, #9ca3af);
    margin-right: 6px;
}

.breadcrumb-link {
    color: var(--text-tertiary, #6b7280);
    text-decoration: none;
    transition: color var(--transition-fast, 150ms ease);
}

.breadcrumb-link:hover {
    color: var(--text-default);
    text-decoration: underline;
}

.breadcrumb-current {
    color: var(--text-default);
    font-weight: var(--font-medium, 500);
}

.videos-header-left h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: 0;
}

.recordings-count {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-1) 0 0 0;
}

.videos-header-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.videos-header-actions .btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.videos-header-actions .btn svg {
    width: 16px;
    height: 16px;
}

.videos-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.videos-search {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    flex: 1;
    max-width: 400px;
}

.videos-search svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.videos-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-base);
    color: var(--text-default);
    outline: none;
}

.videos-search input::placeholder {
    color: var(--text-secondary);
}

.videos-filters {
    display: flex;
    gap: var(--space-2);
}

.videos-filters .filter-btn {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: none;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.videos-filters .filter-btn:hover {
    background: var(--bg-default);
    color: var(--text-default);
}

.videos-filters .filter-btn.active {
    background: var(--primary);
    color: white;
}

.videos-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.videos-load-more {
    display: flex;
    justify-content: center;
    margin-top: var(--space-6);
}

/* ==========================================================================
   Share Modal
   ========================================================================== */

.share-modal {
    max-width: 400px;
}

.share-uploading {
    padding: var(--space-4) 0;
    text-align: center;
}

.share-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
    background: var(--primary-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-icon {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.upload-icon {
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.share-video-info {
    margin-bottom: var(--space-4);
}

.share-video-title {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--text-default);
    margin-bottom: var(--space-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.share-video-size {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.share-progress {
    margin-bottom: var(--space-4);
}

.share-progress-bar {
    height: 8px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.share-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.share-progress-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    display: block;
    text-align: center;
}

.share-complete {
    text-align: center;
    padding: var(--space-4) 0;
}

.share-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    background: var(--success-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--success);
}

.share-success-text {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.share-modal-notice,
.share-upload-notice,
.share-completed-notice {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-4);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

.share-modal-notice {
    margin-top: var(--space-2);
}

.share-upload-notice {
    margin-top: var(--space-3);
    margin-bottom: var(--space-3);
}

.share-completed-notice {
    margin-bottom: var(--space-4);
}

.share-url-container {
    text-align: left;
    margin-bottom: var(--space-6);
}

.share-url-container label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.share-url-input {
    display: flex;
    gap: var(--space-2);
    background: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-1);
}

.share-url-input input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: transparent;
    color: var(--text-default);
    min-width: 0;
}

.share-url-input input:focus {
    outline: none;
}

.share-url-input .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.share-actions {
    display: flex;
    justify-content: center;
}

.share-actions .btn {
    min-width: 140px;
}

.share-error {
    text-align: center;
    padding: var(--space-4) 0;
}

.share-error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    background: var(--error-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-error-icon svg {
    width: 48px;
    height: 48px;
    color: var(--error);
}

.share-auth-required {
    text-align: center;
    padding: var(--space-3) 0;
}

.share-auth-required.hidden { display: none; }

.share-auth-icon {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-3);
}

.share-auth-icon svg {
    width: 48px;
    height: 48px;
    color: var(--primary);
    background: var(--primary-subtle, rgba(37, 99, 235, 0.1));
    border-radius: 50%;
    padding: 12px;
}

.share-auth-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-default);
}

.share-auth-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.5;
}

.share-auth-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
}

/* ==========================================================================
   Auth Pages (Devise: sign in, sign up, password reset, edit account)
   ========================================================================== */

.auth-page {
    display: flex;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-default);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.05));
}

.auth-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-default);
    margin: 0 0 var(--space-2);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 var(--space-5);
    line-height: 1.5;
}

.auth-form {
    margin-bottom: var(--space-4);
}

.auth-form .form-input {
    padding: 10px 12px;
    font-size: 14px;
}

.auth-form .form-group--inline {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.auth-form .form-label--inline {
    margin-bottom: 0;
    font-weight: 400;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.form-actions {
    margin-top: var(--space-4);
}

.btn-full {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
}

.auth-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-danger {
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
}

.auth-danger-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-default);
    margin: 0 0 var(--space-2);
}

.auth-danger-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 var(--space-3);
}

#error_explanation {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
}

#error_explanation h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--error);
    margin: 0 0 var(--space-2);
}

#error_explanation ul {
    margin: 0;
    padding-left: var(--space-4);
    color: var(--text-default);
    font-size: 13px;
}

.share-error-text {
    font-size: var(--text-base);
    color: var(--text-default);
    margin-bottom: var(--space-4);
}

/* ==========================================================================
   Watch Page
   ========================================================================== */

.watch-page {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.watch-container {
    width: 100%;
    max-width: 900px;
}

.watch-header {
    margin-bottom: var(--space-6);
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.watch-header .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.watch-header .back-btn:hover {
    background: var(--bg-default);
    color: var(--text-default);
}

.watch-header .back-btn svg {
    width: 20px;
    height: 20px;
}

.watch-header h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: 0;
    flex: 1;
}

.watch-meta {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-2) 0 0 0;
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.video-wrapper {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-6);
    position: relative;
}

.watch-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.watch-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.watch-actions .btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.watch-actions .btn svg {
    width: 16px;
    height: 16px;
}

.privacy-notice {
    margin-top: var(--space-6);
    padding: var(--space-4);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
}

.privacy-notice p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

.privacy-notice a {
    color: var(--primary);
    text-decoration: none;
}

.privacy-notice a:hover {
    text-decoration: underline;
}

.delete-data-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.delete-data-link:hover {
    color: var(--error);
}

/* ==========================================================================
   Analytics Page
   ========================================================================== */

.analytics-page {
    min-height: calc(100vh - 140px);
    padding: var(--space-6);
}

.analytics-container {
    max-width: 900px;
    margin: 0 auto;
}

.analytics-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.analytics-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-left: auto;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.export-btn:hover {
    background: var(--bg-muted);
    color: var(--text-default);
}

.watching-now {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.watching-now-text {
    white-space: nowrap;
}

.watching-now-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
    transition: background var(--transition-base);
}

.watching-now-active .watching-now-dot {
    background: var(--success);
    box-shadow: 0 0 0 4px var(--success-subtle);
    animation: pulse 2s ease-in-out infinite;
}

.watching-now-active {
    color: var(--text-default);
    border-color: var(--success-subtle);
}

.watching-now-inactive {
    opacity: 0.8;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
    .watching-now-active .watching-now-dot {
        animation: none;
    }
}

.analytics-header .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.analytics-header .back-btn:hover {
    background: var(--bg-default);
    color: var(--text-default);
}

.analytics-header .back-btn svg {
    width: 20px;
    height: 20px;
}

.analytics-header h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
}

.analytics-title {
    font-size: var(--text-lg);
    line-height: 1.3;
}

.analytics-token {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-normal);
    color: var(--text-tertiary);
    margin-top: var(--space-0);
    word-break: break-all;
}

.analytics-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-top: var(--space-1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    cursor: help;
    transition: border-color var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--border-default);
}

.stat-icon {
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-default);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

.viewers-section,
.comments-section {
    margin-bottom: var(--space-8);
}

.viewers-section h2,
.comments-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-4);
}

.viewers-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.viewers-table th,
.viewers-table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.viewers-table th {
    background: var(--bg-subtle);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.viewers-table td {
    color: var(--text-default);
    font-size: var(--text-sm);
}

.progress-bar {
    position: relative;
    height: 8px;
    background: var(--bg-subtle);
    border-radius: var(--radius-full);
    overflow: hidden;
    min-width: 80px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
}

.progress-text {
    position: absolute;
    right: -35px;
    top: -2px;
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.device-info {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.viewers-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}

.viewers-section-header h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

.viewers-total {
    color: var(--text-secondary);
    font-weight: var(--font-normal);
    font-size: var(--text-base);
}

.viewers-sort {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.viewers-sort-label {
    color: var(--text-secondary);
}

.viewers-sort-select {
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-default);
    font-size: var(--text-sm);
    font-family: inherit;
    cursor: pointer;
}

.viewers-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.viewers-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.pagination-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--font-medium);
}

.pagination-link:hover {
    text-decoration: underline;
}

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

.comments-list {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.comment-item {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: baseline;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-timestamp {
    font-size: var(--text-sm);
    color: var(--primary);
    font-weight: var(--font-medium);
    min-width: 50px;
}

.comment-author {
    font-weight: var(--font-medium);
    color: var(--text-default);
}

.comment-content {
    color: var(--text-default);
    flex: 1 1 100%;
}

.edited-badge {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-style: italic;
}

.empty-state {
    padding: var(--space-8);
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
}

/* Responsive */

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Analytics chart */

.analytics-chart-section {
    margin-bottom: var(--space-8);
}

.analytics-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

.analytics-chart-header h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

.analytics-range-pills {
    display: inline-flex;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: 2px;
    gap: 2px;
}

.range-pill {
    appearance: none;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.range-pill:hover {
    color: var(--text-default);
}

.range-pill[aria-pressed="true"] {
    background: var(--bg-elevated);
    color: var(--text-default);
    box-shadow: var(--shadow-xs);
}

.analytics-chart {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    min-height: 240px;
    position: relative;
}

.analytics-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.analytics-chart-area {
    fill: var(--primary-subtle);
    stroke: none;
}

.analytics-chart-line {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.analytics-chart-dot {
    fill: var(--primary);
    stroke: var(--bg-elevated);
    stroke-width: 2;
}

.analytics-chart-grid {
    stroke: var(--border-subtle);
    stroke-width: 1;
    stroke-dasharray: 2 4;
}

.analytics-chart-axis-label {
    font-size: 11px;
    fill: var(--text-tertiary);
    font-family: inherit;
}

.analytics-chart-summary {
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
}

.analytics-chart-empty {
    color: var(--text-secondary);
    text-align: center;
    padding: var(--space-8) var(--space-4);
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .range-pill {
        transition: none;
    }
}

/* Audience retention curve */

.analytics-retention-section {
    margin-bottom: var(--space-8);
}

.analytics-retention-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
}

.analytics-retention-hint {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.analytics-retention {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    min-height: 220px;
}

.analytics-retention-callout {
    margin: var(--space-3) 0 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
}

.top-moments {
    list-style: none;
    padding: 0;
    margin: var(--space-3) 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-2);
}

.top-moment {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.top-moment-label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.top-moment-value {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-default);
}

/* Traffic sources */

.analytics-traffic-section {
    margin-bottom: var(--space-8);
}

.analytics-traffic-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
}

.analytics-traffic-hint {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.traffic-sources {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.traffic-source-row {
    display: grid;
    grid-template-columns: minmax(0, 140px) 1fr auto;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
}

.traffic-source-row:last-child {
    border-bottom: none;
}

.traffic-source-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-default);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.traffic-source-bar-track {
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.traffic-source-bar {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

.traffic-source-meta {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    white-space: nowrap;
}

.traffic-source-share {
    color: var(--text-tertiary);
}

/* Geography */

.analytics-geography-section {
    margin-bottom: var(--space-8);
}

.analytics-geography-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
}

.analytics-geography-hint {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.geography-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.geography-row {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
}

.geography-row:last-child {
    border-bottom: none;
}

.geography-row-main {
    display: grid;
    grid-template-columns: minmax(0, 100px) 1fr auto;
    align-items: center;
    gap: var(--space-3);
}

.geography-country {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-default);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.geography-bar-track {
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.geography-bar {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

.geography-meta {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    white-space: nowrap;
}

.geography-cities {
    list-style: none;
    padding: var(--space-2) 0 0 calc(100px + var(--space-3));
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
}

.geography-city {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.geography-city-name::before {
    content: '·';
    margin-right: var(--space-1);
    color: var(--text-tertiary);
}

.geography-city-viewers {
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Comment Button & Timeline
   ========================================================================== */

.video-wrapper {
    position: relative;
}

.comment-btn {
    position: absolute;
    bottom: 60px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.comment-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.comment-btn svg {
    width: 20px;
    height: 20px;
}

.comment-timeline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    pointer-events: none;
    z-index: 5;
    margin: 0 16px;
}

.comment-marker {
    position: absolute;
    bottom: 0;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    pointer-events: auto;
    transition: transform var(--transition-fast);
}

.comment-marker:hover {
    transform: translateX(-50%) scale(1.3);
}

.comment-popup {
    position: fixed;
    z-index: 100;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    min-width: 200px;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(-50%) translateY(-100%);
}

.comment-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--bg-elevated);
}

.comment-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.comment-popup-name {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    color: var(--text-default);
}

.comment-popup-time {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.comment-popup-content {
    font-size: var(--text-sm);
    color: var(--text-default);
    word-wrap: break-word;
}

.comment-modal {
    width: 400px;
    max-width: calc(100vw - 32px);
}

.comment-modal h2 {
    margin-bottom: var(--space-2);
}

.comment-timestamp-display {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.comment-timestamp-display span {
    color: var(--primary);
    font-weight: var(--font-medium);
}

.comment-modal .form-input {
    width: 100%;
    margin-bottom: var(--space-3);
}

.comment-emojis {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
    flex-wrap: wrap;
}

.emoji-btn {
    background: none;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-1) var(--space-2);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1;
}

.emoji-btn:hover {
    background: var(--bg-subtle);
    transform: scale(1.1);
}

/* Responsive */

@media (max-width: 768px) {
    .videos-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .videos-header-actions {
        width: 100%;
    }

    .videos-header-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .videos-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .videos-search {
        max-width: none;
    }

    .videos-filters {
        justify-content: center;
    }

    .videos-grid {
        /* already single column via flex-direction: column */
    }
}

/* ==========================================================================
   View Transitions (Page Transitions)
   ========================================================================== */

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    animation: 200ms ease-out both view-fade-out;
}

::view-transition-new(root) {
    animation: 250ms ease-out both view-fade-in;
}

/* Persist these elements across navigations */

.app-header {
    view-transition-name: app-header;
}

.app-footer {
    view-transition-name: app-footer;
}

.app-logo {
    view-transition-name: app-logo;
}

@keyframes view-fade-out {
    to { opacity: 0; }
}

@keyframes view-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
     Print Styles
     ========================================================================== */

@media print {
    .app-header,
    #sidebar,
    .storage-pie,
    .shortcuts-info-btn,
    .command-menu,
    .app-footer {
        display: none !important;
    }

    #main-content {
        max-width: 100%;
        padding: 0;
    }
}

/* ==========================================================================
   Changelog Page
   ========================================================================== */

.changelog-page {
    padding: var(--space-6) var(--space-4);
    max-width: 800px;
    margin: 0 auto;
}

.changelog-page .page-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.changelog-page .page-header h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: 0;
}

.changelog-page .page-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-1) 0 0 0;
}

.changelog-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.changelog-version {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.version-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.version-number {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--primary);
    font-family: var(--font-mono);
}

.version-date {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.changelog-changes {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.changelog-changes .change {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.change-type {
    display: inline-block;
    padding: 2px var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.change.feature .change-type {
    background: var(--success-subtle);
    color: var(--success);
}

.change.improvement .change-type {
    background: var(--info-subtle);
    color: var(--info);
}

.change.fix .change-type {
    background: var(--warning-subtle);
    color: var(--warning);
}

/* ==========================================================================
    Integrations Page
    ========================================================================== */

.integrations-page {
    padding: var(--space-6) var(--space-4);
    max-width: 1000px;
    margin: 0 auto;
}

.integrations-page .page-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.integrations-page .page-header h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: 0;
}

.integrations-page .page-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-1) 0 0 0;
}

.integrations-hero {
    text-align: center;
    padding: var(--space-4) var(--space-6);
    margin-bottom: var(--space-6);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.integrations-hero h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.integrations-hero p {
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.integration-card {
    background: var(--bg-default);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all var(--transition-fast);
}

.integration-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-sm);
}

.integration-card.available:hover {
    border-color: var(--primary);
}

.integration-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.integration-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.integration-card.available .integration-icon {
    background: var(--primary-subtle);
}

.integration-card.available .integration-icon svg {
    color: var(--primary);
}

.integration-card h3 {
    font-size: var(--text-base-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.integration-card p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.status-badge {
    display: inline-flex;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-sm);
}

.status-badge.available {
    background: var(--success-subtle);
    color: var(--success);
}

.status-badge.coming-soon {
    background: var(--bg-muted);
    color: var(--text-secondary);
}

.integrations-cta {
    text-align: center;
    padding: var(--space-6);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.integrations-cta h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.integrations-cta p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.integrations-cta .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.integrations-cta .btn-secondary:hover {
    background: var(--bg-muted);
    color: var(--text-default);
}

.integrations-cta .btn-secondary svg {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
    Features Page
    ========================================================================== */

.features-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.features-page .page-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.features-page .page-header .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.features-page .page-header .back-btn:hover {
    background: var(--bg-default);
    color: var(--text-default);
}

.features-page .page-header .back-btn svg {
    width: 20px;
    height: 20px;
}

.features-page .page-header h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: 0;
}

.features-page .page-header .page-subtitle {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin: var(--space-1) 0 0 0;
}

.feature-hero {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    background: var(--bg-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-8);
}

.feature-hero h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.feature-hero p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.feature-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
    padding: var(--space-8) 0;
    border-bottom: 1px solid var(--border-light);
}

.feature-section-reverse {
    direction: rtl;
}

.feature-section-reverse .feature-content {
    direction: ltr;
}

.feature-content {
    order: 1;
}

.feature-content .feature-icon-large {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
}

.feature-content .feature-icon-large svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.feature-content h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-3);
}

.feature-content p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    padding: var(--space-1) 0;
}

.feature-list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: var(--font-semibold);
}

.feature-visual {
    order: 2;
}

.feature-mockup {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.use-cases-section {
    padding: var(--space-8) 0;
}

.use-cases-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    text-align: center;
    margin-bottom: var(--space-6);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

.use-case-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all var(--transition-fast);
}

.use-case-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.use-case-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.use-case-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.use-case-card h3 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.use-case-card p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
}

.comparison-section {
    padding: var(--space-8) 0;
}

.comparison-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    text-align: center;
    margin-bottom: var(--space-6);
}

.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.comparison-table th,
.comparison-table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
    background: var(--bg-subtle);
    font-weight: var(--font-semibold);
    color: var(--text-default);
}

.comparison-table td {
    color: var(--text-secondary);
}

.comparison-table td.check {
    color: var(--success);
    font-weight: var(--font-semibold);
}

.comparison-table td.cross {
    color: var(--error);
}

.comparison-table td.partial {
    color: var(--warning);
}

.cta-section {
    text-align: center;
    padding: var(--space-8) 0;
}

.cta-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.cta-section p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.btn-primary-large {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary-large:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary-large svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .feature-section {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .feature-section-reverse {
        direction: ltr;
    }
    
    .feature-content,
    .feature-visual {
        order: unset;
    }
}

/* ==========================================================================
    Blog Page
    ========================================================================== */

.blog-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.blog-page .page-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.blog-page .page-header .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.blog-page .page-header .back-btn:hover {
    background: var(--bg-default);
    color: var(--text-default);
}

.blog-page .page-header .back-btn svg {
    width: 20px;
    height: 20px;
}

.blog-page .page-header h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: 0;
}

.blog-page .page-header .page-subtitle {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin: var(--space-1) 0 0 0;
}

.blog-hero {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    background: var(--bg-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-8);
}

.blog-hero h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.blog-hero p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-4);
}

.blog-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.blog-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.blog-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card-image {
    height: 160px;
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image svg {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
}

.blog-card-content {
    padding: var(--space-4);
}

.blog-card-category {
    display: inline-block;
    padding: 2px var(--space-2);
    background: var(--primary-subtle);
    color: var(--primary);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-2);
}

.blog-card h3 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
    line-height: var(--leading-tight);
}

.blog-card p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-date {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.blog-newsletter {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    background: var(--bg-subtle);
    border-radius: var(--radius-lg);
    margin-top: var(--space-8);
}

.blog-newsletter h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.blog-newsletter p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.newsletter-form {
    display: flex;
    gap: var(--space-2);
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: var(--space-3);
    font-size: var(--text-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-default);
    color: var(--text-default);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.newsletter-btn {
    padding: var(--space-3) var(--space-4);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.newsletter-btn:hover {
    background: var(--primary-hover);
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

/* ==========================================================================
    Blog Post Page
    ========================================================================== */

.blog-post-page {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

.blog-post-page .page-header {
    margin-bottom: var(--space-6);
}

.blog-post-page .page-header .back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: color var(--transition-fast);
    width: unset;
    padding: 0 8px;
}

.blog-post-page .page-header .back-btn:hover {
    color: var(--primary-hover);
}

.blog-post-page .page-header .back-btn svg {
    width: 16px;
    height: 16px;
}

.blog-post {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.blog-post-header {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.blog-post-category {
    display: inline-block;
    padding: 2px var(--space-2);
    background: var(--primary-subtle);
    color: var(--primary);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-2);
}

.blog-post h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: 0 0 var(--space-3) 0;
    line-height: var(--leading-tight);
}

.blog-post-meta {
    display: flex;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.blog-post-content {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.blog-post-content h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: var(--space-6) 0 var(--space-3) 0;
}

.blog-post-content h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: var(--space-4) 0 var(--space-2) 0;
}

.blog-post-content p {
    margin-bottom: var(--space-4);
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-5);
}

.blog-post-content li {
    margin-bottom: var(--space-2);
}

.blog-post-content a {
    color: var(--primary);
    text-decoration: none;
}

.blog-post-content a:hover {
    text-decoration: underline;
}

.blog-post-content kbd {
    display: inline-block;
    padding: 2px var(--space-2);
    background: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
}

.blog-post-footer {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
}

.back-to-blog:hover {
    color: var(--primary-hover);
}

.back-to-blog svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Shared Recordings (My Videos page)
   ========================================================================== */

.shared-recordings {
    margin-bottom: var(--space-8);
}

.shared-recordings h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
}

.shared-recordings-hint {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.shared-recordings-empty-state {
    padding: var(--space-8);
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-lg);
}

.shared-recordings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

.shared-recording-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.shared-recording-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-sm);
}

.shared-recording-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-2);
}

.shared-recording-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-recording-title a {
    color: var(--text-default);
    text-decoration: none;
}

.shared-recording-title a:hover {
    color: var(--primary);
}

.shared-recording-date {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.shared-recording-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
}

.shared-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.shared-stat-value {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-default);
    line-height: 1.1;
}

.shared-stat-label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: 2px;
}

.shared-recording-progress {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.shared-recording-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.shared-recording-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

.shared-recording-progress-text {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.shared-recording-last-viewed,
.shared-recording-empty {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin: 0;
}

.shared-recording-empty {
    color: var(--text-tertiary);
    font-style: italic;
}

.shared-recording-card-footer {
    display: flex;
    gap: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
}

.shared-recording-link {
    flex: 1;
    text-align: center;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.shared-recording-link:hover {
    background: var(--bg-muted);
    color: var(--text-default);
}

.shared-recording-link-primary {
    background: var(--primary-subtle);
    color: var(--primary);
}

.shared-recording-link-primary:hover {
    background: var(--primary-subtle-hover);
    color: var(--primary);
}

@media (max-width: 600px) {
    .shared-recordings-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Hallmark · genre: modern-minimal · macrostructure: Marquee Hero ·
   theme: Cobalt · enrichment: none · nav: N1b · footer: Ft2
   design-system: design.md · designed-as-app
   ==========================================================================
   Cobalt overlay. Imported last (after tokens + style) so same-specificity
   rules here win. Preserves every JS/Stimulus hook in the base sheet; this
   layer only recomposes the visual fingerprint.
   ========================================================================== */

/* ---------- Base ---------- */

html, body {
    overflow-x: clip;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--color-paper);
    color: var(--color-ink-2);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    color: var(--color-ink);
    font-style: normal;
}

p, li {
    overflow-wrap: break-word;
}

::selection {
    background: var(--color-accent-soft);
    color: var(--color-ink);
}

/* Mono machine labels — the Cobalt readout voice. */


kbd {
    font-family: var(--font-mono);
    font-size: var(--text-xs-caps);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--color-ink-3);
}

/* ---------- Reveal (fade + 10px rise, ease-out) ---------- */

.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
}

.reveal.is-in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .logo-icon-dot {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ---------- Page frame — 1100 column; themed sections fill it ---------- */

#main-content {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Header — N1b bordered bar with ⌘K ---------- */

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-2) var(--space-6);
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-rule);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2);
    margin-left: calc(-1 * var(--space-2));
    border-radius: var(--radius-md);
    color: var(--color-ink);
    transition: background var(--transition-fast);
}

.app-logo:hover {
    background: var(--color-paper-2);
}

.logo-icon {
    width: 22px;
    height: 22px;
    color: var(--color-record);
}

.logo-icon-dot {
    animation: rec-pulse 1.6s var(--ease-in-out) infinite;
}

.logo-text {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    color: var(--color-ink);
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.app-header-nav {
    display: none;
    align-items: center;
    gap: var(--space-2);
}

.app-header-nav-link {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-ink-2);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.app-header-nav-link:hover {
    color: var(--color-ink);
    background: var(--color-paper-2);
}

.app-header-nav-link[aria-current="page"] {
    color: var(--color-accent);
}

.app-header-nav-link--videos {
    color: var(--color-accent);
}

.app-header-nav-link--videos:hover {
    color: var(--color-accent-2);
    background: var(--color-accent-soft);
}

.app-header-nav-link--videos[aria-current="page"] {
    color: var(--color-accent-ink);
    background: var(--color-accent);
}

@media (min-width: 768px) {
    .app-header-nav {
        display: flex;
    }
}

/* Light / dark toggle — the sun/moon pair sits beside the ⌘K pill */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--color-paper);
    border: 1px solid var(--color-rule-2);
    border-radius: var(--radius-md);
    color: var(--color-ink-2);
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--color-accent);
    color: var(--color-ink);
}

.theme-toggle-icon {
    width: 16px;
    height: 16px;
}

.theme-toggle-icon--moon {
    display: none;
}

html.dark .theme-toggle-icon--sun {
    display: none;
}

html.dark .theme-toggle-icon--moon {
    display: block;
}

@media (max-width: 767px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
}

/* ⌘K affordance — the bordered search pill. #menu-toggle drives the
   existing command menu; we only change how it looks on desktop. */

#menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: 36px;
    padding: 0 var(--space-3);
    background: var(--color-paper);
    border: 1px solid var(--color-rule-2);
    border-radius: var(--radius-md);
    color: var(--color-ink-2);
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

#menu-toggle:hover {
    border-color: var(--color-accent);
    color: var(--color-ink);
}

#menu-toggle .menu-toggle-kbd {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-ink-3);
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-sm);
    padding: 1px 5px;
    background: var(--color-paper-2);
}

#menu-toggle .menu-toggle-icon {
    display: none;
}

@media (max-width: 767px) {
    #menu-toggle {
        width: 36px;
        padding: 0;
    }
    #menu-toggle .menu-toggle-kbd {
        display: none;
    }
    #menu-toggle .menu-toggle-icon {
        display: block;
    }
}

/* Auth CTAs */

.app-header-auth {
    display: none;
    align-items: center;
    gap: var(--space-4);
    margin-left: var(--space-2);
    padding-left: var(--space-4);
    border-left: 1px solid var(--color-rule);
}

.app-header-auth-link {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-ink-2);
    text-decoration: none;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.app-header-auth-link:hover {
    color: var(--color-ink);
    background: var(--color-paper-2);
}

.app-header-auth-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-accent-ink);
    background: var(--color-accent);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.app-header-auth-cta:hover {
    background: var(--color-accent-2);
}

.app-header-auth-cta:active {
    transform: translateY(1px);
}

@media (min-width: 768px) {
    .app-header-auth {
        display: flex;
    }
}

/* /videos guest prompt — the "Sign in to see your shared recordings"
   empty state. Lay the auth CTA buttons side by side with breathing
   room, wrapping to a column on narrow screens. */

.empty-state.guest-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.empty-state.guest-prompt p {
    margin: 0;
}

@media (min-width: 768px) {
    .empty-state.guest-prompt {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ---------- Hero — Marquee statement, recorder is the instrument ---------- */

.hero-section {
    text-align: left;
    padding: var(--space-16) var(--space-6) var(--space-10);
    width: 100%;
}

.hero-eyebrow {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: var(--text-xs-caps);
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-6);
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: var(--text-display);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    line-height: 1.05;
    color: var(--color-ink);
    max-width: 14ch;
    margin-bottom: var(--space-6);
    overflow-wrap: anywhere;
    min-width: 0;
}

.hero-subtitle {
    font-size: var(--text-lg);
    color: var(--color-ink-2);
    max-width: 46ch;
    line-height: var(--leading-relaxed);
}

@media (min-width: 768px) {
    .hero-content h1 {
        font-size: clamp(3rem, 7vw + 0.5rem, 5.5rem);
    }
}

/* ---------- The Recorder — light instrument band (graphite in dark) ---------- */

#recording-controls {
    background: var(--color-paper-2);
    color: var(--color-ink);
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-xl);
    width: 100%;
    margin: 0 0 var(--space-16);
    padding: var(--space-8);
    position: relative;
}

#recording-controls .controls-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

#recording-controls .controls-header::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-record);
    box-shadow: 0 0 0 3px oklch(58% 0.22 25 / 0.25);
    animation: rec-pulse 1.6s var(--ease-in-out) infinite;
}

@keyframes rec-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

#recording-controls .controls-header h2 {
    font-family: var(--font-mono);
    font-size: var(--text-xs-caps);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--color-ink-2);
    font-weight: 500;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
    .config-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.config-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-paper);
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.config-card:hover {
    border-color: var(--color-accent);
}

.config-card.active {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
}

.config-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.config-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--color-paper-3);
    color: var(--color-ink-2);
    flex-shrink: 0;
}

.config-icon svg {
    width: 18px;
    height: 18px;
}

.config-card.active .config-icon {
    background: var(--color-accent);
    color: var(--color-accent-ink);
}

.config-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.config-title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-ink);
}

.config-desc {
    font-size: var(--text-xs);
    color: var(--color-ink-2);
}

.config-check {
    margin-left: auto;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    flex-shrink: 0;
}

.config-card.active .config-check {
    display: flex;
}

.config-check svg {
    width: 14px;
    height: 14px;
}

.config-summary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-ink-2);
    margin-bottom: var(--space-4);
}

.config-summary svg {
    width: 14px;
    height: 14px;
    color: var(--color-accent);
}

/* Record button — the cobalt primary inside the band */

.btn-record {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding: 14px 28px;
    background: var(--color-accent);
    color: var(--color-accent-ink);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-record svg {
    width: 16px;
    height: 16px;
    color: var(--color-record);
}

.btn-record:hover:not(:disabled) {
    background: var(--color-accent-2);
}

.btn-record:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-record:disabled {
    background: var(--color-paper-3);
    color: var(--color-ink-3);
    cursor: not-allowed;
}

.btn-record:disabled svg {
    color: var(--color-ink-3);
}

.btn-record-shortcut {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    border: 1px solid var(--color-rule-2);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
}

.recorder-microcopy,
.recorder-privacy {
    text-align: left;
    font-size: var(--text-xs);
    color: var(--color-ink-2);
    margin-top: var(--space-3);
}

/* Pause / Stop — secondary instruments */

.recording-action-buttons {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.btn-action-record {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 12px 20px;
    background: transparent;
    border: 1px solid var(--color-rule-2);
    border-radius: var(--radius-md);
    color: var(--color-ink);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.btn-action-record:hover {
    border-color: var(--color-accent);
}

.btn-action-record svg {
    width: 14px;
    height: 14px;
}

.btn-pause svg {
    color: var(--color-ink-2);
}

.btn-stop svg {
    color: var(--color-record);
}

/* Preview + timer */

.preview-area {
    margin-top: var(--space-6);
}

.preview-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-paper-3);
}

.preview-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: var(--color-paper-3);
}

.recording-timer {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    padding: 6px 12px;
    background: oklch(16% 0.014 260 / 0.7);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-graphite-ink);
}

.timer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-record);
    animation: rec-pulse 1.6s var(--ease-in-out) infinite;
}

.paused-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paused-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: oklch(16% 0.014 260 / 0.7);
    border-radius: var(--radius-lg);
    font-family: var(--font-mono);
    font-size: var(--text-xs-caps);
    letter-spacing: var(--tracking-caps);
    color: var(--color-graphite-ink);
}

/* PiP info */

.pip-info {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: var(--color-paper);
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-lg);
    color: var(--color-ink-2);
}

.pip-btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.pip-btn-primary {
    background: var(--color-accent);
    color: var(--color-accent-ink);
    border: none;
}

.pip-btn-primary:hover {
    background: var(--color-accent-2);
}

.pip-btn-secondary {
    background: transparent;
    color: var(--color-ink);
    border: 1px solid var(--color-rule-2);
}

.pip-btn-secondary:hover {
    border-color: var(--color-accent);
}

/* ---------- Section voice — stacked kicker above roman display ---------- */

.features-section,
.howto-section,
.faq-section {
    width: 100%;
    padding: var(--space-16) var(--space-6);
}

.features-section > h2,
.howto-section > h2,
.faq-section > h2 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    color: var(--color-ink);
    margin-bottom: var(--space-10);
}

/* Features — asymmetric spec rows, hairline-ruled */

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-8);
    border-top: 1px solid var(--color-rule);
}

.feature-card {
    background: none;
    border: none;
    border-bottom: 1px solid var(--color-rule);
    border-radius: 0;
    padding: var(--space-8) var(--space-4) var(--space-8) 0;
    transition: padding-left var(--transition-base);
}

.feature-card:hover {
    padding-left: var(--space-4);
}

.feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    margin-bottom: var(--space-4);
}

.feature-icon svg {
    width: 20px;
    height: 20px;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: var(--space-2);
}

.feature-card p {
    color: var(--color-ink-2);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    max-width: 40ch;
}

@media (max-width: 767px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* How-it-works — numbered stages */

.howto-section {
    border-top: 1px solid var(--color-rule);
}

.howto-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-8);
    counter-reset: step;
}

.howto-steps li {
    counter-increment: step;
    padding-top: var(--space-6);
    border-top: 2px solid var(--color-ink);
}

.howto-steps li::before {
    content: "0" counter(step);
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-caps);
    color: var(--color-accent);
    margin-bottom: var(--space-3);
}

.howto-steps li strong {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: var(--space-2);
}

.howto-steps li p {
    color: var(--color-ink-2);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.howto-steps kbd {
    padding: 1px 6px;
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-sm);
    background: var(--color-paper-2);
}

@media (max-width: 767px) {
    .howto-steps {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }
}

/* FAQ — hairline rows, no cards */

.faq-section {
    border-top: 1px solid var(--color-rule);
}

.faq-list {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--color-rule);
    max-width: none;
}

.faq-item {
    padding: var(--space-6) var(--space-4);
    border-top: 1px solid var(--color-rule);
}

.faq-item dt {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: var(--space-2);
}

.faq-item dd {
    color: var(--color-ink-2);
    line-height: var(--leading-relaxed);
    max-width: 70ch;
}

/* ---------- PRO — light CTA band (graphite in dark) ---------- */

.pro-banner {
    width: 100%;
    margin: var(--space-8) 0 var(--space-16);
    padding: var(--space-10) var(--space-8);
    background: var(--color-paper-2);
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-xl);
    text-align: left;
}

.pro-badge,
.pro-badge-small {
    display: inline-block;
    padding: 3px 10px;
    font-family: var(--font-mono);
    font-size: var(--text-xs-caps);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--color-accent);
    background: var(--color-paper);
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.pro-banner h2 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    color: var(--color-ink);
    margin-bottom: var(--space-3);
}

.pro-banner p {
    color: var(--color-ink-2);
    margin-bottom: var(--space-6);
}

.btn-pro-signup {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 12px 24px;
    background: var(--color-accent);
    color: var(--color-accent-ink);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.btn-pro-signup:hover {
    background: var(--color-accent-2);
}

.btn-pro-signup svg {
    width: 16px;
    height: 16px;
}

/* ---------- Generic buttons — 6px cobalt voice ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: var(--text-sm);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn svg {
    width: 15px;
    height: 15px;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-accent-ink);
    border: 1px solid var(--color-accent);
}

.btn-primary:hover {
    background: var(--color-accent-2);
    border-color: var(--color-accent-2);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-ink);
    border: 1px solid var(--color-rule-2);
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-danger {
    background: transparent;
    color: var(--color-danger);
    border: 1px solid oklch(58% 0.2 27 / 0.4);
}

.btn-danger:hover {
    background: var(--color-error-subtle);
    border-color: var(--color-danger);
}

/* ---------- Footer — Ft2 inline single line ---------- */

.app-footer {
    border-top: 1px solid var(--color-rule);
    padding: var(--space-8) var(--space-6);
    width: 100%;
    max-width: none;
    margin: 0;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 0;
    border-bottom: 0;
}

.footer-nav a {
    font-size: var(--text-sm);
    color: var(--color-ink-2);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.footer-nav a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-3);
    padding-top: var(--space-4);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.footer-credit,
.footer-legal {
    font-size: var(--text-xs);
    color: var(--color-ink-3);
    line-height: var(--leading-normal);
}

.footer-credit a,
.footer-legal a {
    color: var(--color-ink-2);
    text-decoration: none;
}

.footer-credit a:hover,
.footer-legal a:hover {
    color: var(--color-accent);
}

.link-separator {
    margin: 0 4px;
}

/* ---------- Features page — capture readouts (no fake browser chrome) ---------- */

.feature-mockup {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-4);
    min-height: 240px;
    background: var(--color-graphite);
    color: var(--color-graphite-ink-2);
    border: 1px solid var(--color-graphite-rule);
    border-radius: var(--radius-lg);
}

.mockup-kicker {
    font-family: var(--font-mono);
    font-size: var(--text-xs-caps);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--color-accent);
}

.mockup-art {
    width: 100%;
    max-width: 260px;
    color: var(--color-graphite-ink);
}

/* Capture-readout artwork — layered shapes, not flat icons */

.mockup-art .m-frame {
    stroke: var(--color-graphite-rule);
}

.mockup-art .m-soft {
    stroke: var(--color-graphite-ink-2);
}

.mockup-art .m-faint {
    stroke: var(--color-graphite-ink);
    opacity: 0.45;
}

.mockup-art .m-accent {
    stroke: var(--color-accent);
}

.mockup-art .m-media {
    fill: var(--color-graphite-3);
}

.mockup-art .m-selection {
    stroke: var(--color-accent);
    fill: none;
}

.mockup-art .m-record-dot {
    fill: var(--color-record);
}

.mockup-link {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-graphite-ink);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-graphite-rule);
    border-radius: var(--radius-md);
    background: var(--color-graphite-2);
}

:root.dark .feature-mockup {
    background: var(--color-graphite);
    border-color: var(--color-graphite-rule);
}

:root.dark .mockup-link {
    background: var(--color-paper-3);
    border-color: var(--color-rule);
}

/* ---------- Command menu — spotlight, hairline panel ---------- */

.command-menu {
    position: fixed;
    inset: 0;
    z-index: 300;
}

.command-backdrop {
    position: absolute;
    inset: 0;
    background: var(--color-bg-overlay);
    backdrop-filter: blur(2px);
}

.command-container {
    position: relative;
    max-width: 560px;
    margin: var(--space-20) auto 0;
    background: var(--color-paper);
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.command-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-rule);
}

.command-search-icon {
    width: 16px;
    height: 16px;
    color: var(--color-ink-3);
}

.command-input {
    flex: 1;
    border: none;
    background: none;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    color: var(--color-ink);
    outline: none;
}

.command-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: var(--space-2);
}

.command-group {
    margin-bottom: var(--space-2);
}

.command-group-label {
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-mono);
    font-size: var(--text-xs-caps);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--color-ink-3);
}

.command-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    color: var(--color-ink);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.command-item:hover,
.command-item.active {
    background: var(--color-accent-soft);
}

.command-item svg {
    width: 16px;
    height: 16px;
    color: var(--color-ink-2);
    flex-shrink: 0;
}

.command-item span {
    flex: 1;
    font-size: var(--text-sm);
}

.command-shortcut {
    flex: 0 !important;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-ink-3);
    padding: 2px 6px;
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-sm);
}

.command-item-form {
    display: block;
}

.command-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-5);
    border-top: 1px solid var(--color-rule);
}

.command-hint {
    font-family: var(--font-mono);
    font-size: var(--text-xs-caps);
    color: var(--color-ink-3);
}

/* ---------- Mobile menu — graphite sheet ---------- */

.mobile-menu-panel {
    position: absolute;
    inset: 0 0 0 auto;
    width: min(100%, 360px);
    background: var(--color-paper);
    border-left: 1px solid var(--color-rule);
    padding: var(--space-4);
    /* Keep the top strip clear of the sticky header so the header's
       toggle button (which swaps to an X when the menu is open) stays
       tappable above the panel. Without this, the panel's own close
       button collides with the raised header and can't be clicked. */
    padding-top: calc(var(--space-4) + 48px);
    overflow-y: auto;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-2) var(--space-4);
}

.mobile-menu-header-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs-caps);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--color-ink-3);
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--color-ink-2);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-close:hover {
    background: var(--color-paper-2);
    color: var(--color-ink);
}

.mobile-menu-close svg {
    width: 18px;
    height: 18px;
}

.mobile-menu-section {
    padding: var(--space-4) 0;
    border-top: 1px solid var(--color-rule);
}

.mobile-menu-label {
    padding: 0 var(--space-2) var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs-caps);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--color-ink-3);
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3) var(--space-2);
    border-radius: var(--radius-md);
    color: var(--color-ink);
    background: none;
    border: none;
    text-align: left;
    font-size: var(--text-base);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.mobile-menu-item:hover {
    background: var(--color-paper-2);
}

.mobile-menu-item svg {
    width: 18px;
    height: 18px;
    color: var(--color-ink-2);
}

.mobile-menu-item--cta {
    color: var(--color-accent-ink);
    background: var(--color-accent);
    font-weight: 600;
}

.mobile-menu-item--cta:hover {
    background: var(--color-accent-2);
}

.mobile-menu-item--cta-secondary {
    border: 1px solid var(--color-rule-2);
}

.mobile-menu-item-form {
    display: block;
}

/* ---------- Flash + toasts ---------- */

.flash-message {
    max-width: 1100px;
    margin: var(--space-4) auto;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    border: 1px solid var(--color-rule);
}

.flash-success {
    color: var(--success);
    background: var(--success-subtle);
    border-color: oklch(62% 0.16 155 / 0.3);
}

.flash-error {
    color: var(--error);
    background: var(--error-subtle);
    border-color: oklch(58% 0.2 27 / 0.3);
}

/* ---------- Inner-page headers (workbench voice) ---------- */

.page-header,
.videos-page-header {
    width: 100%;
    margin: 0 0 var(--space-8);
    padding: var(--space-12) var(--space-6) var(--space-8);
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

/* Beat the base per-page `align-items: center` so the back button and
   title sit on the same top line (workbench voice), not vertically
   centered as a group. */

#main-content .page-header,
#main-content .videos-page-header {
    align-items: flex-start;
}

/* The videos header nests the back button + title inside .videos-header-left,
   which base centers; undo that so the button lines up with the h1 line. */

.videos-header-left {
    align-items: flex-start;
}

.page-header h1,
.videos-page-header h1 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    color: var(--color-ink);
    line-height: var(--leading-tight);
}

/* Beat the base per-page `font-size` so the display voice holds on every
   inner page (features, blog, testimonials, changelog, integrations). */

#main-content .page-header h1,
#main-content .videos-page-header h1 {
    font-size: var(--text-3xl);
    margin: 0;
}

.page-subtitle {
    color: var(--color-ink-2);
    margin-top: var(--space-2);
    max-width: 52ch;
}

.back-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-md);
    color: var(--color-ink-2);
    text-decoration: none;
    flex-shrink: 0;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.back-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.back-btn svg {
    width: 16px;
    height: 16px;
}

/* Nudge the page-header back button down onto the title's optical
   center line (the h1 line box is taller than the button). */

.page-header .back-btn,
.videos-page-header .back-btn {
    margin-top: 8px;
}

/* Breadcrumbs — align to the same 1100px content column as #main-content
   instead of the base 900px cap, so the trail lines up with the page
   header below it instead of floating inward. */

.breadcrumbs {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-4);
}

/* ---------- Workbench pages — analytics + watch align to inner-page voice ---------- */

.analytics-header,
.watch-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-10) var(--space-6) var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.analytics-header-actions {
    margin-left: auto;
}

.analytics-title,
.watch-header h1 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    color: var(--color-ink);
}

.analytics-subtitle {
    color: var(--color-ink-2);
    font-size: var(--text-sm);
    margin-top: var(--space-1);
}

.analytics-token {
    color: var(--color-accent);
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-ink-2);
    background: var(--color-paper-2);
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-md);
    text-decoration: none;
    white-space: nowrap;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.export-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Watching-now indicator */

.watching-now {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px 12px;
    background: var(--color-paper-2);
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-ink-2);
}

.watching-now-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-ink-3);
}

.watching-now-active .watching-now-dot {
    background: var(--color-accent);
    animation: rec-pulse 1.6s var(--ease-in-out) infinite;
}

.watching-now-inactive .watching-now-dot {
    background: var(--color-ink-3);
}

/* Stat cards — hairline, no heavy shadow */

.stat-card {
    background: var(--color-paper);
    border: 1px solid var(--color-rule);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.stat-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    margin-bottom: var(--space-3);
}

.stat-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-ink);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs-caps);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--color-ink-3);
}

/* ---------- Dark-mode refinements ---------- */

:root.dark #recording-controls {
    background: var(--color-graphite);
    border-color: var(--color-graphite-rule);
    color: var(--color-graphite-ink);
}

:root.dark #recording-controls .controls-header h2 {
    color: var(--color-graphite-ink-2);
}

:root.dark .config-card {
    background: var(--color-graphite-2);
    border-color: var(--color-graphite-rule);
}

:root.dark .config-card.active {
    background: var(--color-graphite-3);
}

:root.dark .config-icon {
    background: var(--color-graphite-3);
    color: var(--color-graphite-ink-2);
}

:root.dark .config-card.active .config-icon {
    background: var(--color-accent);
    color: var(--color-accent-ink);
}

:root.dark .config-title {
    color: var(--color-graphite-ink);
}

:root.dark .config-desc,
:root.dark .config-summary,
:root.dark .recorder-microcopy,
:root.dark .recorder-privacy {
    color: var(--color-graphite-ink-2);
}

:root.dark .btn-record:disabled {
    background: var(--color-graphite-3);
    color: var(--color-graphite-ink-2);
}

:root.dark .btn-record:disabled svg {
    color: var(--color-graphite-ink-2);
}

:root.dark .btn-record-shortcut {
    border-color: oklch(99% 0.002 250 / 0.3);
}

:root.dark .btn-action-record {
    border-color: var(--color-graphite-rule);
    color: var(--color-graphite-ink);
}

:root.dark .btn-pause svg {
    color: var(--color-graphite-ink-2);
}

:root.dark .preview-container,
:root.dark .preview-video {
    background: var(--color-graphite);
}

:root.dark .pip-info {
    background: var(--color-graphite-2);
    border-color: var(--color-graphite-rule);
    color: var(--color-graphite-ink-2);
}

:root.dark .pip-btn-secondary {
    color: var(--color-graphite-ink);
    border-color: var(--color-graphite-rule);
}

:root.dark .pro-banner {
    background: var(--color-graphite);
    border-color: var(--color-graphite-rule);
}

:root.dark .pro-banner h2 {
    color: var(--color-graphite-ink);
}

:root.dark .pro-banner p {
    color: var(--color-graphite-ink-2);
}

:root.dark .pro-badge,
:root.dark .pro-badge-small {
    background: var(--color-graphite-2);
    border-color: var(--color-graphite-rule);
}

:root.dark .feature-icon {
    background: var(--color-accent-soft);
}

:root.dark .app-header {
    background: var(--color-paper);
}

:root.dark .hero-eyebrow {
    background: var(--color-accent-soft);
}
