/* =========================================
   UMBRAIX AI — PRIVACY PAGE CSS v2026
   "EDITORIAL CLARITY" — Matches style.css
   Solid surfaces. No glass. No blur.
   Light-first :root default.
   ========================================= */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cascadia+Code:wght@400;500;600&display=swap');


/* =========================================
   :ROOT — LIGHT THEME (Default)
   Exact mirror of style.css :root
   ========================================= */
:root {
    /* 1. BRAND */
    --brand-primary: oklch(48% 0.18 268);
    --brand-hover:   oklch(42% 0.20 268);
    --brand-active:  oklch(38% 0.22 268);
    --brand-surface: oklch(96% 0.03 268);

    /* 2. SEMANTIC STATUS */
    --color-success: oklch(52% 0.16 148);
    --color-warning: oklch(62% 0.18 85);
    --color-error:   oklch(54% 0.20 25);
    --color-info:    oklch(54% 0.14 240);

    /* 3. BACKGROUNDS — SOLID */
    --primary-bg: oklch(99.5% 0.002 270);

    /* Solid Surface Layers */
    --surface-0:     #ffffff;
    --surface-1:     #f8f9fb;
    --surface-2:     #f1f3f6;
    --surface-3:     #e8ebf0;
    --surface-hover: #eef0f4;

    /* Input Surfaces */
    --input-bg:       #f4f5f8;
    --input-bg-focus: #ffffff;

    /* Panel */
    --bg-panel:     #ffffff;
    --bg-panel-alt: #f8f9fb;

    /* Code */
    --code-bg:   #f4f5f8;
    --code-text: oklch(28% 0.03 270);

    /* 4. TYPOGRAPHY */
    --text-main:      oklch(12% 0.02 270);
    --text-secondary: oklch(28% 0.02 270);
    --text-muted:     oklch(46% 0.02 270);
    --text-dim:       oklch(60% 0.015 270);
    --text-disabled:  oklch(72% 0.01 270);

    /* Font Families */
    --font-display: 'Space Grotesk', -apple-system, sans-serif;
    --font-body:    'Manrope', -apple-system, sans-serif;
    --font-code:    'Cascadia Code', 'Fira Code', monospace;

    /* Font Scale */
    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;

    /* Line Heights */
    --leading-tight:   1.25;
    --leading-normal:  1.5;
    --leading-relaxed: 1.625;

    /* 5. BORDERS */
    --border-subtle: #e5e8ed;
    --border-medium: #d8dce4;
    --border-strong: #c6ccd6;
    --border-focus:  var(--brand-primary);

    /* 6. SHADOWS — Solid depth, no glow */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.09);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.12);
    --shadow-brand: 0 4px 16px rgba(90, 60, 200, 0.14);

    /* 7. SPACING & RADII */
    --radius-xs:   0.375rem;
    --radius-sm:   0.75rem;
    --radius-md:   1rem;
    --radius-lg:   1.5rem;
    --radius-xl:   2rem;
    --radius-pill: 9999px;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 3rem;

    /* Containers */
    --container-sm: 640px;
    --container-md: 860px;

    /* 8. MOTION */
    --ease-out:    cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 120ms;
    --transition-base: 220ms;
    --transition-slow: 340ms;

    /* NO GLASS — kept at 0 for compat */
    --glass-blur: 0px;
}


/* =========================================
   [data-theme="dark"] — VELOX MIDNIGHT
   ========================================= */
[data-theme="dark"] {
    --brand-primary: oklch(68% 0.20 265);
    --brand-hover:   oklch(74% 0.21 265);
    --brand-active:  oklch(62% 0.22 265);
    --brand-surface: oklch(20% 0.06 265);

    --color-success: oklch(68% 0.20 148);
    --color-warning: oklch(78% 0.18 88);
    --color-error:   oklch(64% 0.22 25);
    --color-info:    oklch(68% 0.18 242);

    --primary-bg: oklch(13% 0.014 272);

    --surface-0:     oklch(13% 0.014 272);
    --surface-1:     oklch(17% 0.016 272);
    --surface-2:     oklch(21% 0.018 272);
    --surface-3:     oklch(25% 0.020 272);
    --surface-hover: oklch(19% 0.017 272);

    --input-bg:       oklch(16% 0.014 272);
    --input-bg-focus: oklch(20% 0.018 272);

    --bg-panel:     oklch(17% 0.016 272);
    --bg-panel-alt: oklch(20% 0.018 272);

    --code-bg:   oklch(17% 0.016 272);
    --code-text: oklch(88% 0.02 265);

    --text-main:      oklch(96% 0.01 265);
    --text-secondary: oklch(88% 0.02 265);
    --text-muted:     oklch(70% 0.025 265);
    --text-dim:       oklch(54% 0.02 265);
    --text-disabled:  oklch(40% 0.015 265);

    --border-subtle: oklch(24% 0.018 272);
    --border-medium: oklch(28% 0.020 272);
    --border-strong: oklch(34% 0.022 272);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.30);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.40);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.50);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.60);
    --shadow-brand: 0 4px 16px rgba(100, 60, 230, 0.22);
}


/* =========================================
   [data-theme="void"] — ABSOLUTE VOID
   ========================================= */
[data-theme="void"] {
    --brand-primary: oklch(72% 0.22 265);
    --brand-hover:   oklch(78% 0.23 265);
    --brand-active:  oklch(66% 0.24 265);
    --brand-surface: oklch(15% 0.08 265);

    --color-success: oklch(70% 0.22 148);
    --color-warning: oklch(80% 0.20 88);
    --color-error:   oklch(66% 0.24 25);
    --color-info:    oklch(70% 0.20 242);

    --primary-bg: #000000;

    --surface-0:     #000000;
    --surface-1:     #0d0d0d;
    --surface-2:     #161616;
    --surface-3:     #202020;
    --surface-hover: #141414;

    --input-bg:       #0a0a0a;
    --input-bg-focus: #111111;

    --bg-panel:     #0d0d0d;
    --bg-panel-alt: #111111;

    --code-bg:   #0d0d0d;
    --code-text: oklch(90% 0.02 265);

    --text-main:      #f5f5f5;
    --text-secondary: #d0d0d0;
    --text-muted:     #888888;
    --text-dim:       #555555;
    --text-disabled:  #383838;

    --border-subtle: #1e1e1e;
    --border-medium: #282828;
    --border-strong: #333333;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.70);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.80);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.85);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.90);
    --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.95);
    --shadow-brand: 0 4px 20px rgba(140, 80, 255, 0.30);
}


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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-main);
    line-height: var(--leading-tight);
}

body, p {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-weight: 500;
}

code, pre { font-family: var(--font-code); }

button, a {
    font-family: var(--font-display);
    font-weight: 600;
    text-decoration: none;
}


/* =========================================
   BODY
   ========================================= */
body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    transform: translateZ(0);
}

/* Allow selection inside content */
.privacy-panel p,
.privacy-panel li,
.privacy-panel h1,
.privacy-panel h2,
.privacy-panel h3,
.privacy-panel h4,
.privacy-panel code,
.privacy-panel strong {
    -webkit-user-select: text;
    user-select: text;
}


/* =========================================
   PAGE FADE-IN ANIMATION
   ========================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* =========================================
   FLOATING HEADER — Transparent, Split Layout
   Matches settings.html header exactly
   ========================================= */
.privacy-floating-header {
    position: fixed;
    top: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: var(--container-md);
    z-index: 200;

    /* Fully transparent — no bg, no border, no blur */
    background: transparent;
    border: none;

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    height: 3rem;
    pointer-events: none;
}

/* Back Button — Standalone solid circle (matches style.css .icon-btn.standalone) */
.privacy-back-btn {
    pointer-events: auto;
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--surface-0);
    color: var(--text-main);
    font-size: var(--text-base);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-base) ease;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.privacy-back-btn:hover {
    background: var(--surface-2);
    color: var(--brand-primary);
    border-color: var(--border-medium);
    transform: translateX(-2px);
    box-shadow: var(--shadow-md);
}

/* Title Pill — Right side */
.privacy-header-title {
    pointer-events: none;
    background: var(--surface-0);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 0 1.25rem;
    height: 2.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.privacy-header-title span {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-main);
}


/* =========================================
   MAIN LAYOUT
   ========================================= */
.privacy-container {
    max-width: var(--container-md);
    margin: 0 auto;
    /* Top padding clears floating header */
    padding: 6.5rem 1.5rem 4rem;
    animation: fadeInUp 0.45s var(--ease-out) both;
}

/* Content Panel — Solid, no glass */
.privacy-panel,
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2.75rem;
    box-shadow: var(--shadow-sm);
    /* NO backdrop-filter */
}


/* =========================================
   POLICY HEADER (Top of document)
   ========================================= */
.policy-header {
    text-align: center;
    margin-bottom: 2.75rem;
    padding-bottom: 2.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.policy-icon-wrap {
    width: 4.5rem;
    height: 4.5rem;
    background: var(--brand-surface);
    border: 1px solid oklch(from var(--brand-primary) l c h / 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.policy-icon-wrap i {
    font-size: 1.75rem;
    color: var(--brand-primary);
}

.policy-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 0.65rem;
}

.last-updated {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.last-updated i { font-size: 0.7rem; }

/* Intro text */
.intro-text {
    font-size: 0.97rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 0;
}


/* =========================================
   HEADINGS
   ========================================= */
h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: left;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Section number badge inside h2 */
.section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--brand-surface);
    border: 1px solid oklch(from var(--brand-primary) l c h / 0.20);
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand-primary);
    flex-shrink: 0;
}

h3 {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brand-primary);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: left;
    margin-top: 1rem;
    margin-bottom: 0.45rem;
}


/* =========================================
   BODY TEXT & LISTS
   ========================================= */
p {
    font-size: 0.93rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 1rem;
}

ul {
    padding-left: 1.4rem;
    margin-bottom: 1.25rem;
}

li {
    font-size: 0.93rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.5rem;
    padding-left: 0.35rem;
}

ul li::marker {
    color: var(--brand-primary);
}

strong {
    color: var(--text-main);
    font-weight: 600;
}

code {
    font-family: var(--font-code);
    background: var(--code-bg);
    color: var(--code-text);
    padding: 0.18em 0.45em;
    border-radius: 4px;
    font-size: 0.875em;
    border: 1px solid var(--border-subtle);
}


/* =========================================
   DIVIDER
   ========================================= */
.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 2rem 0;
    width: 100%;
}


/* =========================================
   HIGHLIGHT BOX (API Key Local-First notice)
   ========================================= */
.highlight-box {
    background: var(--brand-surface);
    border: 1px solid oklch(from var(--brand-primary) l c h / 0.22);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin: 1.75rem 0;
    box-shadow: var(--shadow-xs);
}

.highlight-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: oklch(from var(--brand-primary) l c h / 0.12);
    border: 1px solid oklch(from var(--brand-primary) l c h / 0.20);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.highlight-icon i {
    font-size: 1rem;
    color: var(--brand-primary);
}

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

.highlight-content h4 {
    color: var(--brand-primary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.highlight-content p {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.65;
}


/* =========================================
   WARNING BOX (Third-party data notice)
   ========================================= */
.warning-box {
    background: oklch(98.5% 0.02 85);
    border: 1px solid oklch(88% 0.09 85);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.35rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 1.25rem;
}

[data-theme="dark"] .warning-box,
[data-theme="void"] .warning-box {
    background: oklch(16% 0.05 85);
    border-color: oklch(28% 0.10 85);
}

.warning-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.warning-icon i {
    font-size: 1.05rem;
    color: var(--color-warning);
}

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

.warning-content strong {
    display: block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.warning-content p {
    margin-bottom: 0;
    font-size: 0.87rem;
    line-height: 1.65;
    color: var(--text-muted);
}


/* =========================================
   CONTACT BOX
   ========================================= */
.contact-box {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 0;
    margin-top: 1.25rem;
    overflow: hidden;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    transition: all var(--transition-fast) ease;
    border-radius: var(--radius-lg);
}

.contact-link:hover {
    background: var(--surface-2);
    color: var(--brand-primary);
}

.contact-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--brand-surface);
    border: 1px solid oklch(from var(--brand-primary) l c h / 0.20);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast) ease;
}

.contact-icon i {
    font-size: 1rem;
    color: var(--brand-primary);
}

.contact-link:hover .contact-icon {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.contact-link:hover .contact-icon i {
    color: white;
}

.contact-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.contact-label {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--text-dim);
}

.contact-value {
    font-family: var(--font-code);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--brand-primary);
}

.contact-arrow {
    font-size: 0.75rem;
    color: var(--text-dim);
    transition: all var(--transition-fast) ease;
    flex-shrink: 0;
}

.contact-link:hover .contact-arrow {
    color: var(--brand-primary);
    transform: translate(2px, -2px);
}


/* =========================================
   LINK HIGHLIGHT (inline)
   ========================================= */
.link-highlight {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast) ease;
}

.link-highlight:hover {
    text-decoration: underline;
    color: var(--brand-hover);
}


/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 600px) {
    .privacy-container {
        padding: 5.75rem 1rem 3rem;
    }

    .privacy-floating-header {
        width: 95%;
        top: 1rem;
    }

    .privacy-panel,
    .glass-panel {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }

    .policy-header h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.05rem;
    }

    .highlight-box {
        flex-direction: column;
        gap: 0.85rem;
        padding: 1.1rem;
    }

    .contact-link {
        padding: 1rem;
    }

    .privacy-header-title span {
        font-size: 0.8rem;
        letter-spacing: 0.05em;
    }
}