/* PQ PDF — Legal Pages Shared Styles */
/* CSP-compliant: no inline styles */

/* ===== Variables ===== */
:root {
    --legal-primary:      #ff8c00;
    --legal-primary-dark: #cc7000;
    --legal-secondary:    #ffd700;
    --legal-bg:           #040810;
    --legal-surface:      #0c1525;
    --legal-surface-alt:  #0a1a30;
    --legal-highlight:    #0d1f38;
    --legal-text:         #f0e6d3;
    --legal-text-dim:     #a89070;
    --legal-text-muted:   #5a4a38;
    --legal-border:       #1a2840;
    --legal-border-hover: #2a3c58;
    --legal-link:         #ff8c00;
    --legal-link-hover:   #ffd700;
    --legal-radius:       12px;
    --legal-radius-sm:    8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--legal-bg);
    color: var(--legal-text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ===== Main wrapper ===== */
.legal-main {
    flex: 1;
    position: relative;
    z-index: 10;
}

.legal-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

/* ===== Site Nav Bar ===== */
.legal-nav {
    position: relative;
    z-index: 100;
    background: linear-gradient(135deg, #060c16 0%, #0c1628 50%, #080e1c 100%);
    border-bottom: 1px solid rgba(255, 140, 0, 0.2);
    box-shadow: 0 2px 20px rgba(255, 140, 0, 0.08);
    padding: 0.85rem 1.5rem;
}

.legal-nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.legal-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}

.legal-nav-logo-img {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    border: 1px solid rgba(255, 140, 0, 0.35);
    box-shadow: 0 0 8px rgba(255, 140, 0, 0.2);
    object-fit: cover;
    cursor: pointer;
    position: relative;
    z-index: 10;
    transform-origin: top left;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease,
                border-radius 0.3s ease;
}

.legal-nav-logo-img:hover {
    transform: scale(4);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 8px 40px rgba(255, 140, 0, 0.6);
    border-radius: 6px;
    z-index: 999;
}

.legal-nav:has(.legal-nav-logo-img:hover) {
    overflow: visible;
    z-index: 200;
}

.legal-nav-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-left: 0.5rem;
}

.legal-nav-logo-name {
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--legal-primary), var(--legal-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.legal-nav-logo-sub {
    font-size: 0.65rem;
    color: var(--legal-text-muted);
    line-height: 1.2;
    white-space: nowrap;
}

.legal-nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.legal-nav-link {
    color: var(--legal-text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.legal-nav-link:hover {
    color: var(--legal-primary);
    background: rgba(255, 140, 0, 0.08);
}


.legal-nav-link[aria-current="page"] {
    color: var(--legal-primary);
    background: rgba(255, 140, 0, 0.12);
    border: 1px solid rgba(255, 140, 0, 0.35);
    font-weight: 600;
    cursor: default;
    pointer-events: none;
}

/* ===== Header ===== */
.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--legal-border);
}

.legal-title {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--legal-primary), var(--legal-secondary), var(--legal-primary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGrad 6s ease-in-out infinite;
    margin-bottom: 0.5rem;
}

@keyframes titleGrad {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

.legal-updated {
    font-size: 0.875rem;
    color: var(--legal-text-muted);
    font-style: italic;
}

/* ===== Article body ===== */
.legal-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ===== Sections ===== */
.legal-section {
    background: var(--legal-surface);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius);
    padding: 1.75rem 2rem;
    transition: border-color 0.2s ease;
}

.legal-section:hover {
    border-color: rgba(255, 140, 0, 0.25);
}

.legal-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--legal-primary);
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--legal-border);
}

.legal-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--legal-secondary);
    margin: 1.25rem 0 0.5rem;
}

.legal-section p {
    color: var(--legal-text);
    margin-bottom: 0.75rem;
    font-size: 0.975rem;
}

.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul,
.legal-section ol {
    padding-left: 1.4rem;
    margin: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.legal-section li {
    font-size: 0.975rem;
    color: var(--legal-text);
}

/* Highlighted section (privacy "short version") */
.legal-highlight {
    background: var(--legal-highlight);
    border-color: rgba(255, 140, 0, 0.3);
}

.legal-summary-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.legal-summary-list li {
    font-size: 1rem;
    line-height: 1.5;
}

/* ===== Links ===== */
.legal-link {
    color: var(--legal-link);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 140, 0, 0.3);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.legal-link:hover {
    color: var(--legal-link-hover);
    border-bottom-color: var(--legal-link-hover);
}

/* ===== Table ===== */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.925rem;
    margin-top: 0.75rem;
    border-radius: var(--legal-radius-sm);
    overflow: hidden;
}

.legal-table th {
    background: var(--legal-highlight);
    color: var(--legal-primary);
    font-weight: 700;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--legal-border);
}

.legal-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--legal-border);
    color: var(--legal-text);
    vertical-align: top;
}

.legal-table tr:last-child td { border-bottom: none; }

.legal-table tr:hover td {
    background: rgba(255, 140, 0, 0.04);
}

/* ===== Code ===== */
code {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.875em;
    background: rgba(255, 140, 0, 0.08);
    color: var(--legal-secondary);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    border: 1px solid rgba(255, 140, 0, 0.15);
}

/* ===== Code block ===== */
pre.legal-code {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    background: rgba(255, 140, 0, 0.06);
    color: var(--legal-secondary);
    padding: 1rem 1.25rem;
    border-radius: var(--legal-radius-sm);
    border: 1px solid rgba(255, 140, 0, 0.15);
    overflow-x: auto;
    white-space: pre;
    margin: 0.75rem 0;
    line-height: 1.6;
}

/* ===== Footer ===== */
.pdf-pre-footer-hr {
    border: none;
    border-top: 1px solid rgba(255, 140, 0, 0.12);
    margin: 0;
    position: relative;
    z-index: 10;
}

.pdf-footer {
    background: linear-gradient(135deg, #030710 0%, #060c18 100%);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.pdf-footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.pdf-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.pdf-footer-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(255, 140, 0, 0.25);
    object-fit: cover;
}

.pdf-footer-logo-name {
    font-weight: 700;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #ff8c00, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pdf-footer-copy {
    font-size: 0.825rem;
    color: #7a6a58;
}

.pdf-footer-copy strong { color: #c0a880; }

.pdf-footer-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pdf-footer-link {
    color: #9a8068;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
}

.pdf-footer-link:hover {
    color: #ff8c00;
    background: rgba(255, 140, 0, 0.07);
}

.pdf-footer-sep { color: #2a3c58; font-size: 0.75rem; }

.pdf-footer-tagline {
    font-size: 0.78rem;
    color: #4a3c2c;
}

.pdf-footer-tagline-link {
    color: #5a4a38;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pdf-footer-tagline-link:hover { color: #ff8c00; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .legal-nav { padding: 0.7rem 1rem; }
    .legal-nav-logo-name { font-size: 0.95rem; }
    .legal-nav-link { font-size: 0.8rem; padding: 0.3rem 0.5rem; }
    .legal-wrapper { padding: 2rem 1rem 3rem; }
    .legal-title   { font-size: 1.8rem; }

    .legal-section {
        padding: 1.25rem 1.25rem;
    }

    .legal-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .legal-nav-links { gap: 0; }
    .legal-nav-logo-sub { display: none; }
    .legal-title { font-size: 1.5rem; }
    .legal-section h2 { font-size: 1.05rem; }
}
