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

:root {
    --orange: #ef641f;
    --orange-dark: #c9470b;
    --orange-soft: #fff0e6;
    --ink: #17212f;
    --muted: #5d6672;
    --navy: #10196a;
    --cream: #fffaf5;
    --surface: #fff;
    --line: #e9e3dc;
    --shadow-sm: 0 8px 24px rgba(27, 35, 48, 0.07);
}

html {
    overflow-x: clip;
}

body {
    font-family: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--cream);
    color: var(--ink);
    line-height: 1.85;
}

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

:focus-visible {
    outline: 3px solid #1179d4;
    outline-offset: 3px;
}

.legal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 76px;
    display: flex;
    align-items: center;
    background-color: rgba(255, 250, 245, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(23, 33, 47, 0.08);
}

.legal-header-inner {
    width: min(calc(100% - 32px), 1180px);
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.legal-brand img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.legal-brand span {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--navy);
}

.legal-header-nav {
    display: flex;
    gap: 8px;
}

.legal-header-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-back {
    background-color: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn-back:hover {
    color: var(--orange-dark);
    border-color: var(--orange);
}

.btn-cta {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 10px 22px rgba(239, 100, 31, 0.2);
}

.btn-cta:hover {
    background: var(--orange-dark);
    box-shadow: 0 12px 24px rgba(239, 100, 31, 0.24);
}

.legal-container {
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(40px, 6vw, 72px) 20px clamp(64px, 8vw, 96px);
}

.legal-container h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--ink);
    margin-bottom: 10px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.legal-date {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 36px;
    display: block;
}

.legal-container h2 {
    font-size: 1.25rem;
    color: var(--ink);
    margin-top: 38px;
    margin-bottom: 12px;
}

.legal-container h3 {
    font-size: 16px;
    color: var(--ink);
    margin-top: 20px;
    margin-bottom: 8px;
}

.legal-container p {
    font-size: 1rem;
    color: #404a57;
    margin-bottom: 14px;
    line-height: 1.9;
}

.legal-container ul,
.legal-container ol {
    padding-right: 20px;
    margin-bottom: 14px;
}

.legal-container ul li,
.legal-container ol li {
    font-size: 1rem;
    color: #404a57;
    margin-bottom: 8px;
    line-height: 1.85;
}

.legal-card {
    background: #fff;
    border-radius: 24px;
    padding: clamp(24px, 5vw, 48px);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}

/* Extra elements for delete account and policies */
.method-card {
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
    border-radius: 14px;
    padding: 22px 20px;
    margin-bottom: 18px;
}

.method-card h3 {
    margin-top: 0;
    color: #ea580c;
    font-size: 17px;
}

.method-steps {
    padding-right: 20px;
    margin: 10px 0 0;
}

.method-steps li {
    font-size: 15px;
    color: #374151;
    margin-bottom: 6px;
    line-height: 1.8;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    margin-bottom: 14px;
    font-size: 14px;
}

.data-table th {
    background: #1f2937;
    color: #fff;
    padding: 10px 14px;
    text-align: right;
    font-weight: 600;
}

.data-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    line-height: 1.7;
    vertical-align: top;
}

.data-table tr:nth-child(even) td {
    background: #f8fafc;
}

.badge-deleted {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    border-radius: 6px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-retained {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    border-radius: 6px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.faq-item {
    border-bottom: 1px solid #f1f5f9;
    padding: 16px 0;
}

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

.faq-q {
    font-weight: 700;
    color: #111827;
    font-size: 15px;
    margin-bottom: 6px;
}

.faq-a {
    color: #374151;
    font-size: 15px;
    line-height: 1.8;
    margin: 0;
}

.contact-box {
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 8px;
}

.contact-box p {
    margin: 0;
}

.contact-box .contact-detail {
    margin-top: 6px;
}

.contact-label {
    font-weight: 600;
    color: #0369a1;
    margin-left: 4px;
}

.legal-footer {
    background-color: #111927;
    color: #e5e7eb;
    padding: 36px 0 24px;
    margin-top: 0;
}

.legal-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legal-footer-links {
    display: flex;
    justify-content: center;
    gap: 8px 22px;
    flex-wrap: wrap;
}

.legal-footer-links a {
    color: #94a3b8;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.legal-footer-links a:hover {
    color: #fff;
}

@media (max-width: 640px) {
    .legal-container h1 {
        font-size: 2rem;
    }
    .legal-container {
        padding: 32px 14px 56px;
    }
    .legal-card {
        padding: 24px 18px;
    }
    .legal-header-nav .btn-cta {
        display: none;
    }
    .legal-header {
        min-height: 68px;
    }
    .legal-header-inner {
        width: min(calc(100% - 28px), 1180px);
    }
    .legal-brand img {
        width: 40px;
        height: 40px;
    }
    .legal-brand span {
        font-size: 1.18rem;
    }
    .legal-header-nav a {
        padding-inline: 12px;
    }
    .data-table {
        display: block;
        width: 100%;
        font-size: 13px;
    }
    .data-table thead {
        display: none;
    }
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }
    .data-table tr {
        margin-bottom: 10px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        overflow: hidden;
    }
    .data-table td {
        padding: 8px 10px;
        overflow-wrap: anywhere;
    }
    .data-table td:last-child {
        border-bottom: 0;
    }
    .badge-deleted,
    .badge-retained {
        white-space: normal;
    }
    .contact-box,
    .contact-box a {
        overflow-wrap: anywhere;
    }
}
