/* ============================================
   GSCLS Scribe
   Record. Transcribe. Summarise.
   ============================================ */

/* Fonts */
@font-face {
    font-family: 'Fira Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/fira-sans-regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Fira Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/fira-sans-bold.ttf') format('truetype');
}

:root {
    /* GSCLS Brand Colors */
    --navy: #264876;
    --navy-dark: #1a3255;
    --navy-light: #3a5d8a;
    --cyan: #33BBED;
    --cyan-dark: #1a9fd4;
    --cyan-light: #5fcdf5;
    --green: #59AA47;
    --green-dark: #468a38;
    --green-light: #7bc46b;

    /* Semantic Colors */
    --color-bg: #f4f6f9;
    --color-surface: #ffffff;
    --color-surface-elevated: #ffffff;
    --color-text: #1e2a3b;
    --color-text-secondary: #5a6978;
    --color-text-muted: #8a96a5;
    --color-border: #e2e6ec;
    --color-border-strong: #cdd4de;
    --color-danger: #dc3545;
    --color-danger-bg: #fef2f2;
    --color-warning: #f59e0b;
    --color-warning-bg: #fffbeb;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Typography */
    --font-sans: 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', SFMono-Regular, ui-monospace, monospace;

    /* Effects */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(30, 42, 59, 0.06);
    --shadow-md: 0 4px 12px rgba(30, 42, 59, 0.08);
    --shadow-lg: 0 8px 24px rgba(30, 42, 59, 0.12);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* Dark mode — explicit toggle */
[data-theme="dark"] {
    --color-bg: #111318;
    --color-surface: #1a1d24;
    --color-surface-elevated: #22262f;
    --color-text: #e0e4ea;
    --color-text-secondary: #a0a8b5;
    --color-text-muted: #6b7280;
    --color-border: #2d323c;
    --color-border-strong: #3d4450;
    --color-danger-bg: #2d1618;
    --color-warning-bg: #2d2714;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Dark mode — system preference (when no explicit toggle set) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg: #111318;
        --color-surface: #1a1d24;
        --color-surface-elevated: #22262f;
        --color-text: #e0e4ea;
        --color-text-secondary: #a0a8b5;
        --color-text-muted: #6b7280;
        --color-border: #2d323c;
        --color-border-strong: #3d4450;
        --color-danger-bg: #2d1618;
        --color-warning-bg: #2d2714;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    }
}

/* Dark mode overrides for elements with hardcoded backgrounds */
[data-theme="dark"] .settings-overlay {
    background: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] textarea,
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="text"],
[data-theme="dark"] select {
    background: var(--color-surface-elevated);
    color: var(--color-text);
    border-color: var(--color-border);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .settings-overlay {
        background: rgba(0, 0, 0, 0.6);
    }

    :root:not([data-theme="light"]) textarea,
    :root:not([data-theme="light"]) input[type="password"],
    :root:not([data-theme="light"]) input[type="text"],
    :root:not([data-theme="light"]) select {
        background: var(--color-surface-elevated);
        color: var(--color-text);
        border-color: var(--color-border);
    }
}

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

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   Initialisation Overlay
   ============================================ */
.init-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity var(--transition-slow);
}

.init-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.init-content {
    text-align: center;
    max-width: 360px;
    padding: var(--space-xl);
}

.init-logo {
    height: 5rem;
    width: auto;
    margin-bottom: var(--space-xl);
    filter: brightness(0) invert(1);
}

.init-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.init-content > p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
}

/* Mic + waves animation */
.init-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.init-mic {
    width: 56px;
    height: 56px;
    animation: mic-pulse 2s ease-in-out infinite, color-shift 4s ease-in-out infinite;
}

.init-mic svg {
    width: 100%;
    height: 100%;
}

@keyframes mic-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes color-shift {
    0%, 100% { color: var(--cyan); }
    33% { color: var(--green); }
    66% { color: #7eb8da; }
}

.init-waves {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 40px;
}

.init-waves span {
    display: block;
    width: 5px;
    border-radius: 3px;
    animation: wave 1s ease-in-out infinite, bar-color-shift 4s ease-in-out infinite;
}

.init-waves span:nth-child(1) { height: 35%; animation-delay: 0s, 0s; }
.init-waves span:nth-child(2) { height: 65%; animation-delay: 0.12s, 0.5s; }
.init-waves span:nth-child(3) { height: 45%; animation-delay: 0.24s, 1s; }

@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.6); }
}

@keyframes bar-color-shift {
    0%, 100% { background: var(--cyan); }
    33% { background: var(--green); }
    66% { background: #7eb8da; }
}

.init-version {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: calc(-1 * var(--space-sm));
    margin-bottom: var(--space-md);
}

.init-quip {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    min-height: 1.5em;
    margin-top: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    transition: opacity 0.3s ease;
}


.init-estimate {
    margin-top: var(--space-sm);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.init-progress {
    margin-top: var(--space-md);
}

.init-progress .progress-bar {
    background: rgba(255, 255, 255, 0.2);
}

.init-progress .progress-fill {
    background: var(--cyan);
}

.init-progress .progress-text {
    color: rgba(255, 255, 255, 0.7);
}

#btn-skip-init {
    margin-top: var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    transition: all var(--transition-fast);
}

#btn-skip-init:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Header - pdftool-aligned
   ============================================ */
header {
    background: var(--color-surface);
    border-bottom: 2px solid var(--navy);
    position: sticky;
    top: 0;
    z-index: 100;
}

[data-theme="dark"] header {
    border-bottom-color: var(--cyan);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) header {
        border-bottom-color: var(--cyan);
    }
}

.header-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.header-logo {
    height: 2.5rem;
    width: auto;
    flex-shrink: 0;
}

.header-wordmark {
    min-width: 0;
}

header h1 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.015em;
    line-height: 1.1;
}

[data-theme="dark"] header h1 {
    color: var(--cyan);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) header h1 {
        color: var(--cyan);
    }
}

.subtitle {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    margin-top: 0.125rem;
    letter-spacing: 0.01em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Header privacy link — outlined green pill (matches pdftool) */
.header-privacy-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--green);
    background: #f0f9ed;
    border: 1px solid var(--green);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background var(--transition-fast);
    white-space: nowrap;
}

.header-privacy-link:hover {
    background: #e3f2de;
}

.header-privacy-link svg {
    width: 0.875rem;
    height: 0.875rem;
}

[data-theme="dark"] .header-privacy-link {
    background: rgba(89, 170, 71, 0.12);
}

[data-theme="dark"] .header-privacy-link:hover {
    background: rgba(89, 170, 71, 0.22);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .header-privacy-link {
        background: rgba(89, 170, 71, 0.12);
    }
    :root:not([data-theme="light"]) .header-privacy-link:hover {
        background: rgba(89, 170, 71, 0.22);
    }
}

/* Theme toggle — sun/moon icon button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--color-bg);
    border-color: var(--color-border-strong);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .icon-sun { display: none; color: #f4c430; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* Settings Trigger */
.settings-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.settings-trigger:hover {
    background: var(--color-bg);
    color: var(--navy);
    border-color: var(--color-border-strong);
}

[data-theme="dark"] .settings-trigger:hover {
    color: var(--cyan);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .settings-trigger:hover {
        color: var(--cyan);
    }
}

.settings-trigger svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 560px) {
    .header-inner { padding: 0.625rem 1rem; }
    .header-privacy-link span { display: none; }
    .header-privacy-link { padding: 0.375rem; }
    .header-wordmark .subtitle { display: none; }
}

/* ============================================
   Recording Strip - Compact Top Bar
   ============================================ */
.recording-strip {
    background: var(--navy);
    padding: var(--space-sm) var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    color: #ffffff;
}

.recording-strip.idle {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.recording-controls {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-record {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.5rem 1.25rem;
    background: var(--green);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-record:hover:not(:disabled) {
    background: var(--green-dark);
    transform: translateY(-1px);
}

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

.btn-record .record-dot {
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
}

.btn-stop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-danger);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-stop:hover:not(:disabled) {
    background: #c82333;
}

.btn-stop:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-stop svg {
    width: 14px;
    height: 14px;
}

.timer {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 600;
    min-width: 5ch;
    color: inherit;
}

.timer.recording {
    color: var(--cyan-light);
}

.recording-strip.idle .timer {
    color: var(--color-text-muted);
}

#visualiser {
    flex: 1 1 auto;
    min-width: 80px;
    max-width: 300px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
}

.recording-strip.idle #visualiser {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cyan-light);
}

.recording-strip.idle .live-indicator {
    color: var(--green);
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Only pulse when recording (not idle/ready) */
.recording-strip:not(.idle) .live-dot {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.recording-status {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
}

.recording-strip.idle .recording-status {
    color: var(--color-text-secondary);
}

/* Audio Source Toggle - Hidden by default */
.audio-source-toggle {
    display: none;
}

.audio-source-toggle:not([hidden]) {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.75rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
}

.recording-strip.idle .toggle-label {
    color: var(--color-text-secondary);
}

.toggle-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--cyan);
}

/* ============================================
   Main Content - Two Column Layout
   ============================================ */
main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-xl);
    max-width: 1600px;
    margin: 0 auto;
    min-height: calc(100vh - 180px);
}

/* Content Panels */
.content-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.panel-header h2 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.panel-header h2 svg {
    width: 18px;
    height: 18px;
    color: var(--cyan);
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.panel-body {
    flex: 1;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Progress Indicators */
.progress-container {
    margin-bottom: var(--space-md);
}

.progress-bar {
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--cyan-light) 100%);
    border-radius: 2px;
    width: 0%;
    transition: width var(--transition-base);
}

.progress-text {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Text Areas */
.transcript-area,
.summary-area {
    flex: 1;
    width: 100%;
    min-height: 300px;
    padding: var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.7;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text);
    resize: none;
    transition: all var(--transition-fast);
}

.transcript-area:not(:disabled),
.summary-area:not(:disabled) {
    background: var(--color-surface);
}

.transcript-area:focus,
.summary-area:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(51, 187, 237, 0.15);
}

.transcript-area::placeholder,
.summary-area::placeholder {
    color: var(--color-text-muted);
}

/* Summary Panel Extras */
.summary-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.summary-type-selector {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.summary-type-selector label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.summary-type-selector select {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.summary-type-selector select:focus {
    outline: none;
    border-color: var(--cyan);
}

.summary-controls {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Agenda Input */
.agenda-input-container {
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.agenda-input-container > label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.agenda-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-sm);
}

.agenda-tab {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-sans);
    border: none;
    background: var(--color-surface);
    color: var(--color-text-muted);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.agenda-tab.active {
    background: var(--color-surface);
    color: var(--navy);
    box-shadow: inset 0 -2px 0 var(--cyan);
}

.agenda-tab-content {
    background: var(--color-surface);
    border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
    padding: var(--space-sm);
}

.agenda-textarea {
    width: 100%;
    min-height: 80px;
    padding: var(--space-sm);
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    border: none;
    background: transparent;
    color: var(--color-text);
    resize: vertical;
}

.agenda-textarea:focus {
    outline: none;
}

.file-upload-area {
    padding: var(--space-lg);
    text-align: center;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
}

.file-upload-area.dragover {
    border-color: var(--cyan);
    background: rgba(51, 187, 237, 0.05);
}

.btn-link {
    background: none;
    border: none;
    color: var(--cyan);
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: var(--font-sans);
    padding: 0;
}

.btn-link:hover {
    color: var(--navy);
}

.agenda-filename {
    margin-top: var(--space-sm);
    font-weight: 600;
    color: var(--green);
}

/* ============================================
   Buttons (pdftool-aligned)
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--navy);
    color: #ffffff;
}

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

[data-theme="dark"] .btn-primary {
    background: var(--cyan);
    color: #0a1424;
}

[data-theme="dark"] .btn-primary:hover:not(:disabled) {
    background: var(--cyan-light);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn-primary {
        background: var(--cyan);
        color: #0a1424;
    }
    :root:not([data-theme="light"]) .btn-primary:hover:not(:disabled) {
        background: var(--cyan-light);
    }
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--color-bg);
    color: var(--navy);
    border-color: var(--color-border-strong);
}

[data-theme="dark"] .btn-secondary:hover:not(:disabled) {
    color: var(--cyan);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn-secondary:hover:not(:disabled) {
        color: var(--cyan);
    }
}

.btn-accent {
    background: var(--green);
    color: #ffffff;
}

.btn-accent:hover:not(:disabled) {
    background: var(--green-dark);
}

.btn-danger {
    background: var(--color-danger);
    color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.btn-small {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.btn-icon {
    padding: 0.375rem;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.btn-icon:hover:not(:disabled) {
    background: var(--color-bg);
    color: var(--navy);
}

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

/* ============================================
   Settings Slide-out Panel
   ============================================ */
.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 42, 59, 0.4);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.settings-overlay.active {
    opacity: 1;
    visibility: visible;
}

.settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 90vw;
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    z-index: 501;
    display: flex;
    flex-direction: column;
}

.settings-panel.active {
    transform: translateX(0);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.settings-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--navy);
}

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

.settings-close:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.settings-close svg {
    width: 20px;
    height: 20px;
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
}

.settings-section {
    margin-bottom: var(--space-xl);
}

.settings-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

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

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.form-group .hint,
.settings-section > .hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
    line-height: 1.5;
}

.input-group {
    display: flex;
    gap: var(--space-sm);
}

.input-group input {
    flex: 1;
}

input[type="password"],
input[type="text"],
select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    transition: all var(--transition-fast);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(51, 187, 237, 0.15);
}

.prompt-area {
    width: 100%;
    min-height: 100px;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    resize: vertical;
    line-height: 1.6;
}

.prompt-area:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(51, 187, 237, 0.15);
}

/* Prompt preset details */
.prompt-details {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.prompt-details summary {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}

.prompt-details summary:hover {
    background: var(--color-border);
}

.prompt-details[open] summary {
    border-bottom: 1px solid var(--color-border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.prompt-details .form-group {
    padding: var(--space-sm);
    margin: 0;
}

.prompt-details .prompt-area {
    min-height: 120px;
    font-size: 0.75rem;
}

.hint-success {
    color: var(--green) !important;
}

/* ============================================
   Recovery Banner
   ============================================ */
.banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-xl);
    font-size: 0.8125rem;
    background: var(--color-warning-bg);
    border-bottom: 1px solid var(--color-warning);
}

/* Respect hidden attribute */
.banner[hidden] {
    display: none;
}

.banner > span {
    flex: 1;
    color: var(--color-text);
}

.banner-actions {
    display: flex;
    gap: var(--space-sm);
}

/* ============================================
   Session History
   ============================================ */
.history-section {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
}

.history-list {
    max-height: 250px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    gap: var(--space-sm);
}

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

.history-item-info {
    flex: 1;
    min-width: 0;
}

.history-item-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
}

.history-item-meta {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
}

.history-item-preview {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-actions {
    display: flex;
    gap: 4px;
}

.history-item-status {
    display: inline-block;
    font-size: 0.625rem;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.history-item-status.complete {
    background: rgba(89, 170, 71, 0.15);
    color: var(--green);
}

.history-item-status.incomplete {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

/* History expiry countdown */
.history-expiry {
    font-size: 0.625rem;
    color: var(--color-text-muted);
    margin-left: var(--space-xs);
}

.history-expiry.expiry-warning {
    color: var(--color-warning);
}

.history-expiry.expiry-urgent {
    color: var(--color-danger);
    font-weight: 700;
}

/* History pagination */
.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
}

.history-page-info {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ============================================
   Site Footer (pdftool-aligned)
   ============================================ */
.site-footer {
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-2xl);
    padding: var(--space-lg) var(--space-lg);
    background: transparent;
}

.site-footer[hidden] {
    display: none;
}

.site-footer-inner {
    max-width: 72rem;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-tagline {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.footer-brand {
    color: var(--navy);
    font-weight: 600;
}

[data-theme="dark"] .footer-brand {
    color: var(--cyan);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .footer-brand {
        color: var(--cyan);
    }
}

.footer-tagline a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
    text-underline-offset: 2px;
    transition: color var(--transition-fast);
}

.footer-tagline a:hover {
    color: var(--color-text-secondary);
}

.footer-meta {
    font-size: 0.625rem;
    color: var(--color-text-muted);
    opacity: 0.75;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
}

.footer-meta .footer-version::after {
    content: '—';
    margin-left: 0.375rem;
    opacity: 0.5;
}

.footer-capability {
    font-family: var(--font-mono);
    letter-spacing: 0.01em;
}

.footer-credits {
    font-size: 0.625rem;
    color: var(--color-text-muted);
    opacity: 0.6;
    line-height: 1.7;
    max-width: 48rem;
    margin: 0 auto;
}

.footer-credits span {
    color: var(--color-text-secondary);
    opacity: 0.9;
}

.api-status {
    font-size: 0.625rem;
    color: var(--green);
    font-weight: 600;
}

.api-status[hidden] {
    display: none;
}

.diagnostics-info {
    font-family: var(--font-mono);
    font-size: 0.625rem;
}

/* ============================================
   Status Text
   ============================================ */
.status-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.status-text.error {
    color: var(--color-danger);
}

.status-text.success {
    color: var(--green);
}

/* ============================================
   Auth — inline prompt + account chip
   Matches GSCLS palette; uses surface + cyan accent
   to read as "informational" rather than error/success.
   ============================================ */
.auth-prompt {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    margin-top: var(--space-sm);
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--cyan);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    animation: auth-prompt-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-prompt[hidden] {
    display: none;
}

@keyframes auth-prompt-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-prompt-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--cyan) 14%, transparent);
    color: var(--cyan-dark);
}

[data-theme="dark"] .auth-prompt-icon,
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .auth-prompt-icon {
        background: color-mix(in srgb, var(--cyan) 22%, transparent);
        color: var(--cyan-light);
    }
}

.auth-prompt-body {
    flex: 1;
    min-width: 0;
}

.auth-prompt-title {
    font-weight: 700;
    color: var(--color-text);
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.005em;
}

.auth-prompt-message {
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0 0 var(--space-sm) 0;
}

.auth-prompt-message strong {
    color: var(--color-text);
    font-weight: 600;
}

.auth-prompt-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.auth-prompt-status {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.auth-prompt-status.error {
    color: var(--color-danger);
}

/* Microsoft sign-in button — follows Microsoft's brand guidance
   (white/neutral background, dark text, 4-colour logo). */
.btn-signin-ms {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem 0.5rem 0.625rem;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0;
    cursor: pointer;
    transition:
        border-color var(--transition-fast),
        background var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

.btn-signin-ms:hover:not(:disabled) {
    border-color: var(--navy);
    background: var(--color-surface-elevated);
    box-shadow: var(--shadow-sm);
}

.btn-signin-ms:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-signin-ms:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

.btn-signin-ms:disabled {
    opacity: 0.6;
    cursor: wait;
}

.ms-logo {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Account chip in settings panel */
.auth-chip {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-md);
    transition: border-color var(--transition-base);
}

.auth-chip[data-state="signed-in"] {
    border-color: color-mix(in srgb, var(--green) 35%, var(--color-border));
}

.auth-chip-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0;
    background: var(--color-border);
    color: var(--color-text-muted);
    transition: background var(--transition-base), color var(--transition-base);
}

.auth-chip[data-state="signed-in"] .auth-chip-avatar {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: #ffffff;
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--cyan) 40%, transparent);
}

.auth-chip-info {
    flex: 1;
    min-width: 0;
}

.auth-chip-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
}

.auth-chip[data-state="signed-in"] .auth-chip-label {
    color: var(--green-dark);
}

[data-theme="dark"] .auth-chip[data-state="signed-in"] .auth-chip-label {
    color: var(--green-light);
}

.auth-chip-email {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-chip[data-state="signed-out"] .auth-chip-email,
.auth-chip[data-state="loading"] .auth-chip-email {
    color: var(--color-text-secondary);
    font-weight: 500;
}

.auth-chip-action {
    flex-shrink: 0;
    background: none;
    border: 1px solid transparent;
    color: var(--color-text-secondary);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-sm);
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast);
}

.auth-chip-action:hover {
    background: var(--color-bg);
    color: var(--color-text);
    border-color: var(--color-border);
}

.auth-chip-action:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 1px;
}

.auth-chip-action[data-action="signin"] {
    color: var(--navy);
    border-color: var(--color-border);
    background: var(--color-surface);
}

[data-theme="dark"] .auth-chip-action[data-action="signin"] {
    color: var(--cyan-light);
}

.auth-chip-action[data-action="signin"]:hover {
    border-color: var(--navy);
    background: var(--color-surface-elevated);
}

/* ============================================
   Legacy Panel Styles (compatibility)
   ============================================ */
.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.panel h2 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--navy);
}

.panel-primary {
    border-color: var(--green);
}

details.panel summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
}

details.panel summary::-webkit-details-marker {
    display: none;
}

details.panel summary h2 {
    margin-bottom: 0;
}

details.panel summary::after {
    content: "▸";
    margin-left: var(--space-sm);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    transition: transform var(--transition-fast);
}

details.panel[open] summary::after {
    transform: rotate(90deg);
}

.settings-content-legacy {
    margin-top: var(--space-md);
}

.memory-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
        padding: var(--space-md);
    }

    .recording-strip {
        padding: var(--space-sm) var(--space-md);
        flex-wrap: wrap;
    }

    #visualiser {
        order: 10;
        width: 100%;
        flex: none;
        margin-top: var(--space-sm);
    }
}

@media (max-width: 768px) {
    header {
        padding: var(--space-md);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .header-logo {
        height: 1.75rem;
    }

    header h1 {
        font-size: 1.125rem;
    }

    .subtitle {
        display: none;
    }

    .settings-panel {
        width: 100%;
    }

    .banner {
        padding: var(--space-sm) var(--space-md);
        flex-direction: column;
        align-items: flex-start;
    }

    .banner-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Collapsible panels on mobile */
    .content-panel {
        border-radius: var(--radius-md);
    }

    .panel-header {
        cursor: pointer;
        user-select: none;
        padding: var(--space-sm) var(--space-md);
    }

    .panel-header::after {
        content: '';
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--color-text-muted);
        border-bottom: 2px solid var(--color-text-muted);
        transform: rotate(45deg);
        transition: transform var(--transition-fast);
        margin-left: auto;
    }

    .content-panel.collapsed .panel-header::after {
        transform: rotate(-45deg);
    }

    .content-panel.collapsed .panel-body {
        display: none;
    }

    .panel-body {
        padding: var(--space-md);
    }

    .transcript-area,
    .summary-area {
        min-height: 150px;
        font-size: 0.875rem;
    }

    /* Recording strip mobile improvements */
    .recording-strip {
        padding: var(--space-sm) var(--space-md);
    }

    .recording-controls {
        width: 100%;
        justify-content: center;
    }

    .btn-record {
        padding: var(--space-sm) var(--space-lg);
    }

    .timer {
        font-size: 1.25rem;
    }

    /* Summary options mobile */
    .summary-options {
        gap: var(--space-sm);
    }

    .summary-type-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-type-selector label {
        margin-bottom: var(--space-xs);
    }

    .agenda-textarea {
        min-height: 80px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    main {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }

    .panel-header h2 {
        font-size: 0.875rem;
    }

    .btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
    }

    .btn-record {
        padding: var(--space-sm) var(--space-md);
    }
}

/* ============================================
   Actionstep Modal
   ============================================ */
.actionstep-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 42, 59, 0.4);
    z-index: 600;
    transition: opacity var(--transition-base);
}

.actionstep-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 480px;
    max-width: 92vw;
    max-height: 80vh;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 601;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.actionstep-overlay[hidden],
.actionstep-modal[hidden] {
    display: none;
}

.actionstep-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.actionstep-modal-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

.actionstep-modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    flex: 1;
}

.actionstep-modal-footer {
    padding: var(--space-sm) var(--space-lg);
    border-top: 1px solid var(--color-border);
    min-height: 2.5rem;
}

.matter-results {
    margin-top: var(--space-sm);
    max-height: 300px;
    overflow-y: auto;
}

.matter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xs);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.matter-item:hover {
    background: var(--color-bg);
    border-color: var(--color-border-strong);
}

.matter-item-info {
    flex: 1;
    min-width: 0;
}

.matter-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.matter-item-ref {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.matter-item .btn {
    flex-shrink: 0;
    margin-left: var(--space-sm);
}

.matter-sending {
    pointer-events: none;
    opacity: 0.6;
}

/* Dark mode overrides */
[data-theme="dark"] .actionstep-overlay {
    background: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .actionstep-modal-header h3 {
    color: var(--color-text);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .actionstep-overlay {
        background: rgba(0, 0, 0, 0.6);
    }

    :root:not([data-theme="light"]) .actionstep-modal-header h3 {
        color: var(--color-text);
    }
}

/* ============================================
   Privacy Page
   ============================================ */
.privacy-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.privacy-body > main.privacy-main {
    flex: 1;
}

main.privacy-main {
    display: block;
    grid-template-columns: none;
    max-width: 44rem;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
    width: 100%;
    min-height: 0;
    gap: 0;
}

.privacy-back {
    display: inline-block;
    font-size: 0.8125rem;
    color: var(--navy);
    text-decoration: none;
    margin-bottom: var(--space-lg);
    transition: color var(--transition-fast);
}

.privacy-back:hover {
    text-decoration: underline;
}

[data-theme="dark"] .privacy-back {
    color: var(--cyan);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .privacy-back {
        color: var(--cyan);
    }
}

.privacy-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .privacy-title {
    color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .privacy-title {
        color: #ffffff;
    }
}

.privacy-lede {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.privacy-body-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.privacy-body-content section {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.privacy-body-content h2 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.005em;
    margin-bottom: 0.125rem;
}

[data-theme="dark"] .privacy-body-content h2 {
    color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .privacy-body-content h2 {
        color: #ffffff;
    }
}

.privacy-body-content p {
    line-height: 1.7;
}

.privacy-body-content strong {
    color: var(--color-text);
    font-weight: 600;
}

.privacy-body-content ul {
    list-style: disc;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.privacy-body-content li {
    line-height: 1.65;
}

.privacy-emphasis {
    padding: 0.75rem 1rem;
    background: color-mix(in srgb, var(--green) 8%, transparent);
    border-left: 3px solid var(--green);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 500;
}

.privacy-intro {
    margin-bottom: 0.25rem;
}

.privacy-credits {
    color: var(--color-text-muted);
}

.privacy-credits strong {
    color: var(--color-text-secondary);
}

/* Numbered steps box */
.privacy-steps {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

[data-theme="dark"] .privacy-steps {
    background: var(--color-surface-elevated);
    border-color: var(--color-border);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .privacy-steps {
        background: var(--color-surface-elevated);
        border-color: var(--color-border);
    }
}

.privacy-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.privacy-step-num {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius-full);
    background: var(--navy);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

[data-theme="dark"] .privacy-step-num {
    background: var(--cyan);
    color: #0a1424;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .privacy-step-num {
        background: var(--cyan);
        color: #0a1424;
    }
}

.privacy-step p {
    margin: 0;
    padding-top: 0.0625rem;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
