/* Taski Legal — shared stylesheet
 * Brand: gradient blue→purple→pink, Apple SF-inspired
 */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: #1d1d1f;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Top navigation bar */
.topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.topbar-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.topbar-brand-name {
    font-weight: 600;
    font-size: 1.05em;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 50%, #AF52DE 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.topbar-brand-suffix {
    color: #8e8e93;
    font-weight: 400;
    margin-left: 4px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.lang-switcher a {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 500;
    color: #6e6e73;
    text-decoration: none;
    transition: all 0.15s ease;
}

.lang-switcher a:hover {
    background: rgba(0, 122, 255, 0.08);
    color: #007AFF;
}

.lang-switcher a.active {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: white;
}

/* Main container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

.container.wide {
    max-width: 1080px;
}

/* Hero header (only on hub index) */
.hero {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 50%, #AF52DE 100%);
    color: white;
    padding: 56px 32px;
    text-align: center;
    border-radius: 24px;
    margin-bottom: 32px;
    box-shadow: 0 20px 60px rgba(88, 86, 214, 0.25);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(8%, 8%); }
}

.hero img {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    margin: 0 auto 18px;
    display: block;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.15em;
    opacity: 0.95;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Document page header (smaller than hero) */
.doc-header {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: white;
    padding: 40px 32px;
    border-radius: 20px;
    margin-bottom: 28px;
    box-shadow: 0 12px 40px rgba(88, 86, 214, 0.18);
}

.doc-header .breadcrumb {
    font-size: 0.85em;
    opacity: 0.85;
    margin-bottom: 8px;
}

.doc-header .breadcrumb a {
    color: white;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
}

.doc-header h1 {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.doc-header .updated {
    font-size: 0.9em;
    opacity: 0.85;
}

/* Beta warning */
.beta-warning {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-left: 5px solid #FF9500;
    padding: 22px 24px;
    margin-bottom: 28px;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(255, 149, 0, 0.12);
}

.beta-warning h2 {
    color: #FF9500;
    margin-bottom: 12px;
    font-size: 1.15em;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    padding: 0;
}

.beta-warning h2::before {
    content: '⚠️';
    font-size: 1.1em;
}

.beta-warning p {
    color: #735c00;
    line-height: 1.7;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.beta-warning p:last-child {
    margin-bottom: 0;
}

/* Hub: category sections */
.category {
    margin-bottom: 36px;
}

.category h2 {
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6e6e73;
    margin-bottom: 14px;
    padding-left: 4px;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.doc-card {
    background: white;
    padding: 20px 22px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(88, 86, 214, 0.12);
    border-color: rgba(88, 86, 214, 0.2);
}

.doc-card .icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.doc-card .text {
    flex: 1;
    min-width: 0;
}

.doc-card .title {
    font-weight: 600;
    font-size: 1em;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.doc-card .desc {
    font-size: 0.88em;
    color: #6e6e73;
    line-height: 1.5;
}

/* Document body */
.content {
    background: white;
    padding: 40px 44px;
    border-radius: 18px;
    box-shadow: 0 4px 26px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.content h2 {
    color: #1d1d1f;
    margin-top: 40px;
    margin-bottom: 16px;
    font-size: 1.45em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.01em;
}

.content h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border-radius: 2px;
    flex-shrink: 0;
}

.content h2:first-child {
    margin-top: 0;
}

.content h3 {
    color: #5856D6;
    margin-top: 26px;
    margin-bottom: 12px;
    font-size: 1.15em;
    font-weight: 600;
}

.content p {
    margin-bottom: 14px;
    color: #333;
    text-align: left;
}

.content ul, .content ol {
    margin: 0 0 18px 24px;
}

.content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.content li::marker {
    color: #5856D6;
}

.content strong {
    color: #1d1d1f;
    font-weight: 600;
}

.content a {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 122, 255, 0.2);
    transition: all 0.15s ease;
}

.content a:hover {
    color: #5856D6;
    border-bottom-color: #5856D6;
}

.highlight {
    background: linear-gradient(135deg, #e8f4ff 0%, #f0e6ff 100%);
    padding: 2px 8px;
    border-radius: 5px;
    color: #5856D6;
    font-weight: 500;
}

.encryption-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.82em;
    font-weight: 600;
    margin: 2px 0;
}

.encryption-badge::before {
    content: '🔒';
}

.contact-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4f8 100%);
    padding: 22px 24px;
    border-radius: 14px;
    margin: 22px 0;
    position: relative;
}

.contact-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 2px;
    background: linear-gradient(135deg, #007AFF, #5856D6, #AF52DE);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.contact-box p {
    margin: 6px 0;
    text-align: left;
    position: relative;
}

/* Tables */
.retention-table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
    font-size: 0.95em;
}

.retention-table th,
.retention-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.retention-table th {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: white;
    font-weight: 600;
}

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

.retention-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* Callout box (for important notes inside docs) */
.callout {
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f3ff 100%);
    border-left: 4px solid #007AFF;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0;
    color: #1d4071;
}

.callout strong {
    color: #007AFF;
}

.callout.warning {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe9cc 100%);
    border-left-color: #FF9500;
    color: #6b4900;
}

.callout.warning strong {
    color: #FF9500;
}

.callout.danger {
    background: linear-gradient(135deg, #ffeded 0%, #ffd6d6 100%);
    border-left-color: #FF3B30;
    color: #7a1414;
}

.callout.danger strong {
    color: #FF3B30;
}

/* Callout text colors with higher specificity to override .content p/li */
.content .callout p,
.content .callout li {
    color: #1d4071;
}
.content .callout strong {
    color: #007AFF;
}
.content .callout.warning p,
.content .callout.warning li {
    color: #6b4900;
}
.content .callout.warning strong {
    color: #FF9500;
}
.content .callout.danger p,
.content .callout.danger li {
    color: #7a1414;
}
.content .callout.danger strong {
    color: #FF3B30;
}

/* Footer */
footer {
    text-align: center;
    padding: 32px 20px;
    color: #6e6e73;
    font-size: 0.88em;
}

footer p:first-child {
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 6px;
}

footer .footer-links {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

footer .footer-links a {
    color: #6e6e73;
    text-decoration: none;
    font-size: 0.88em;
    border-bottom: 1px dotted transparent;
    transition: all 0.15s ease;
}

footer .footer-links a:hover {
    color: #007AFF;
    border-bottom-color: #007AFF;
}

/* TOC (Table of Contents) for long docs */
.toc {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4f8 100%);
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.toc-title {
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6e6e73;
    margin-bottom: 12px;
}

.toc ol {
    margin: 0 0 0 20px;
    padding: 0;
}

.toc li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.toc a {
    color: #007AFF;
    text-decoration: none;
    border-bottom: 1px dotted transparent;
    transition: all 0.15s ease;
}

.toc a:hover {
    border-bottom-color: #007AFF;
}

/* Responsive */
@media (max-width: 768px) {
    .topbar-inner {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .topbar-brand {
        justify-content: center;
    }

    .lang-switcher {
        justify-content: center;
    }

    .container {
        padding: 20px 14px 48px;
    }

    .hero {
        padding: 40px 22px;
    }

    .hero h1 {
        font-size: 1.9em;
    }

    .doc-header {
        padding: 28px 22px;
    }

    .doc-header h1 {
        font-size: 1.5em;
    }

    .content {
        padding: 26px 22px;
    }

    .content h2 {
        font-size: 1.25em;
    }

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

    .retention-table th,
    .retention-table td {
        padding: 10px 12px;
        font-size: 0.88em;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1c1c1e 0%, #000 100%);
        color: #f5f5f7;
    }

    .topbar {
        background: rgba(28, 28, 30, 0.85);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .topbar-brand-suffix {
        color: #8e8e93;
    }

    .lang-switcher a {
        color: #8e8e93;
    }

    .lang-switcher a:hover {
        background: rgba(0, 122, 255, 0.18);
    }

    .doc-card,
    .content {
        background: #1c1c1e;
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
    }

    .doc-card .title {
        color: #f5f5f7;
    }

    .doc-card .desc,
    .content p,
    .content li {
        color: #c7c7cc;
    }

    .content h2,
    .content strong {
        color: #f5f5f7;
    }

    .contact-box {
        background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 100%);
    }
    .content .contact-box p,
    .content .contact-box strong {
        color: #f5f5f7;
    }

    /* Callouts: dark backgrounds tinted with accent color + light readable text */
    .callout {
        background: linear-gradient(135deg, rgba(0, 122, 255, 0.18) 0%, rgba(0, 122, 255, 0.06) 100%);
        border-left-color: #4DA3FF;
        color: #B3D4FF;
    }
    .content .callout p,
    .content .callout li {
        color: #B3D4FF;
    }
    .content .callout strong {
        color: #66A3FF;
    }

    .callout.warning {
        background: linear-gradient(135deg, rgba(255, 149, 0, 0.20) 0%, rgba(255, 149, 0, 0.06) 100%);
        border-left-color: #FFB84D;
        color: #FFD699;
    }
    .content .callout.warning p,
    .content .callout.warning li {
        color: #FFD699;
    }
    .content .callout.warning strong {
        color: #FFB84D;
    }

    .callout.danger {
        background: linear-gradient(135deg, rgba(255, 59, 48, 0.20) 0%, rgba(255, 59, 48, 0.06) 100%);
        border-left-color: #FF6B5C;
        color: #FFB3AC;
    }
    .content .callout.danger p,
    .content .callout.danger li {
        color: #FFB3AC;
    }
    .content .callout.danger strong {
        color: #FF6B5C;
    }

    .beta-warning {
        background: linear-gradient(135deg, rgba(255, 149, 0, 0.18) 0%, rgba(255, 149, 0, 0.05) 100%);
        border-left-color: #FFB84D;
    }
    .beta-warning h2 {
        color: #FFB84D;
    }
    .beta-warning p {
        color: #FFD699;
    }
    .beta-warning strong {
        color: #FFE0B3;
    }
    .beta-warning .highlight {
        background: linear-gradient(135deg, rgba(0, 122, 255, 0.25) 0%, rgba(175, 82, 222, 0.25) 100%);
        color: #B3D4FF;
    }

    .retention-table tr:nth-child(even) {
        background: #2c2c2e;
    }

    .toc {
        background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 100%);
    }

    footer p:first-child {
        color: #f5f5f7;
    }

    footer .footer-links a {
        color: #8e8e93;
    }
}
