/* Shared legal-page styling and the Learn Arabic A1 product identity. */
:root {
    color-scheme: light;
    --primary: #3465e7;
    --primary-hover: #2957cf;
    --primary-strong: #244ebd;
    --primary-dark: #164a86;
    --primary-soft: #edf5ff;
    --background: #ffffff;
    --surface: #ffffff;
    --surface-muted: #f7f9ff;
    --text-primary: #17213d;
    --text-body: #45516a;
    --text-secondary: #5b6981;
    --border: #e4eaf4;
    --border-strong: #d4dfee;
    --shadow-soft: 0 18px 48px rgb(50 74 121 / 7%);
    --shadow-card: 0 8px 28px rgb(50 74 121 / 4%);
    --reading-width: 820px;
}

body { background: #fff; }
main { overflow: clip; }
::selection { color: #17263d; background: #dcecff; }
a:focus-visible { outline: 3px solid #7851e8; outline-offset: 4px; }
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    backdrop-filter: none;
}
.nav-container { min-height: 84px; }
.brand, .footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #17263d;
    font-weight: 850;
    letter-spacing: -0.7px;
}
.brand { font-size: 25px; }
.brand img, .footer-brand img { object-fit: contain; flex-shrink: 0; }
.nav-links { gap: 5px; }
.nav-links a { border-radius: 12px; padding-inline: 16px; }
.nav-links a:hover { color: #155daf; background: #edf5ff; }
.nav-links a[aria-current="page"] { color: #6240c1; background: #f1ecff; }

.legal-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 72px 0 54px;
    background: #fff;
    border-bottom: 1px solid #e8e6f5;
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, #3465e7, #8054df 55%, #d84391) 1;
}
.legal-hero::before {
    content: "";
    position: absolute;
    right: -70px;
    top: -100px;
    width: 320px;
    height: 320px;
    border: 56px solid rgb(128 84 223 / 5%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}
.legal-label {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd2fc;
    border-radius: 999px;
    color: #6240c1;
    background: #f1ecff;
    font-size: 12px;
    letter-spacing: .14em;
}
.legal-hero h1 {
    margin-top: 20px;
    font-weight: 780;
    letter-spacing: -2px;
}
.legal-intro { max-width: 740px; font-size: 18px; }
.legal-updated {
    padding: 7px 13px;
    border-radius: 999px;
    border-color: #e1e5f0;
    background: #fff;
    color: #5b6981;
    font-size: 13px;
}
.legal-content { padding: 34px 0 80px; }
.legal-section {
    --section-accent: #3465e7;
    margin-bottom: 22px;
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid var(--border);
    border-top: 3px solid var(--section-accent);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-card);
}
.legal-section:nth-child(3n + 2) { --section-accent: #8054df; }
.legal-section:nth-child(3n) { --section-accent: #d84391; }
.legal-section:last-child { border-bottom: 1px solid var(--border); margin-bottom: 0; }
.legal-section h2 { font-size: clamp(23px, 3vw, 28px); letter-spacing: -.6px; }
.legal-section h3 { font-size: 20px; }
.legal-section p, .legal-section ul, .legal-section ol { font-size: 16px; line-height: 1.85; }
.legal-section a:not(.primary-button):not(.secondary-button) {
    color: #155daf;
    text-decoration-color: #9ebde0;
}
.legal-section a:not(.primary-button):not(.secondary-button):hover { color: #6240c1; }
.legal-section li::marker { color: var(--section-accent); }
.legal-contact-card {
    border-color: #ddd4f7;
    border-radius: 17px;
    background: #f7f3ff;
}
.legal-contact-card > strong { color: #6240c1; }

.deletion-overview { padding-bottom: clamp(24px, 4vw, 38px); }
.deletion-notice { border-color: #caddf7; border-radius: 17px; background: #edf5ff; }
.deletion-notice > strong { color: #155daf; }
.deletion-method-card { padding: 24px; border-radius: 18px; }
.deletion-method-card-primary {
    border-color: #c6d9f4;
    background: #fafdff;
    box-shadow: 0 10px 26px rgb(20 121 232 / 5%);
}
.deletion-eyebrow { color: #6240c1; }
.deletion-data-card { border-radius: 18px; background: #f7f9ff; }
.deletion-local-note { border-left-color: #7851e8; background: #f6f2ff; }
.primary-button {
    min-height: 54px;
    border: 1px solid #2957cf;
    border-bottom: 4px solid #244ebd;
    border-radius: 14px;
    background: #3465e7;
    box-shadow: none;
}
a.primary-button:hover {
    border-color: #244ebd;
    background: #2957cf;
    box-shadow: 0 8px 18px rgb(20 121 232 / 12%);
}
.secondary-button { border: 1px solid #d5c9f4; color: #6240c1; border-radius: 14px; }
.secondary-button:hover { border-color: #b29be9; background: #f5f0ff; }
.site-footer { border-top: 1px solid var(--border); background: #fff; padding-top: 42px; }
.footer-brand { font-size: 23px; }
.footer-container p { color: #5b6981; }
.footer-links a { border-radius: 10px; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: #6240c1; background: #f5f0ff; }

.error-page {
    background: linear-gradient(140deg, #f3f8ff, #fbf7ff 65%, #fff5fa);
    padding: 70px 0;
}
.error-container { border-radius: 28px; box-shadow: var(--shadow-soft); }
.error-code {
    margin-bottom: 20px;
    color: #7851e8;
    font-size: clamp(68px, 15vw, 100px);
    font-weight: 850;
    letter-spacing: -.06em;
    line-height: 1;
}
.error-container h1 { font-size: clamp(32px, 6vw, 52px); }
.error-article-link { margin: 12px 0 0 8px; }

@media (max-width: 720px) {
    .nav-container { min-height: auto; padding: 9px 0 7px; gap: 4px; }
    .brand { min-height: 48px; font-size: 23px; gap: 9px; }
    .brand img { width: 38px; height: 38px; }
    .nav-links { border-top: 0; padding-top: 0; gap: 3px; }
    .nav-links a { padding: 8px 4px; min-height: 44px; font-size: 13px; }
    .legal-hero { padding: 42px 0 36px; }
    .legal-hero h1 { margin-top: 16px; letter-spacing: -1.4px; }
    .legal-intro { font-size: 17px; }
    .legal-content { padding: 22px 0 48px; }
    .legal-section { margin-bottom: 16px; border-radius: 18px; }
    .legal-section p, .legal-section ul, .legal-section ol { font-size: 16px; }
    .legal-contact-card, .deletion-notice, .deletion-method-card, .deletion-data-card { padding: 19px; }
    .deletion-method-grid, .deletion-data-grid { gap: 16px; }
    .deletion-method-card h3 { font-size: 21px; }
    .legal-section .primary-button { padding-inline: 16px; }
}
@media (max-width: 420px) {
    .legal-section { padding: 22px 18px; }
    .legal-section h2 { font-size: 23px; }
    .legal-section h3 { font-size: 19px; }
    .legal-section ul, .legal-section ol { margin-left: 19px; }
    .deletion-notice, .deletion-method-card, .deletion-data-card, .legal-contact-card { padding: 17px; }
    .error-article-link { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    a.primary-button:hover, .secondary-button:hover { transform: none; }
}
@media print {
    .legal-hero { border: 0; background: #fff; }
    .legal-hero::before { display: none; }
    .legal-section { margin: 0; padding: 20px 0; border: 0; box-shadow: none; }
    .legal-section:last-child { border: 0; }
    .legal-section p, .legal-section ul, .legal-section ol { color: #000; }
}

/* Product legal pages keep the reading layout clear on every screen size. */
.a1-legal .product-brand { font-size: 20px; letter-spacing: -.55px; }
.a1-legal .product-brand img { width: 56px; height: 56px; }
.a1-legal .footer-brand img { width: 48px; height: 48px; }
.product-brand > span { display: block; line-height: 1.3; }
.product-brand small { display: block; margin-top: 2px; font-size: 12px; font-weight: 550; letter-spacing: 0; color: var(--text-secondary); }
.legal-back { display: inline-flex; align-items: center; min-height: 44px; margin: -18px 0 22px; color: #45516a; font-size: 14px; font-weight: 650; }
.legal-back:hover { color: #6240c1; }
.a1-legal .legal-label { font-size: 11px; letter-spacing: .1em; }
.legal-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.legal-facts > div { padding: 20px; border: 1px solid #dee7fb; border-radius: 17px; background: #f6f9ff; }
.legal-facts > div:nth-child(2) { border-color: #e6ddf8; background: #faf7ff; }
.legal-facts > div:nth-child(3) { border-color: #f1dce7; background: #fff8fb; }
.legal-facts strong { display: block; margin-bottom: 6px; color: #244ebd; font-size: 15px; line-height: 1.4; }
.legal-facts > div:nth-child(2) strong { color: #6240c1; }
.legal-facts > div:nth-child(3) strong { color: #ae3574; }
.legal-facts span { display: block; font-size: 13px; line-height: 1.7; }
.legal-contents { padding: 24px 28px; margin-bottom: 28px; border: 1px solid var(--border); border-radius: 20px; background: #fff; }
.legal-contents h2 { margin-bottom: 14px; color: var(--text-primary); font-size: 20px; letter-spacing: -.4px; }
.legal-contents ol { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 22px; }
.legal-contents a { display: block; padding: 7px 0; color: #45516a; font-size: 13px; font-weight: 550; line-height: 1.6; text-decoration: underline; text-decoration-color: #d8deeb; text-underline-offset: 3px; }
.legal-contents a:hover { color: #6240c1; text-decoration-color: currentColor; }
.a1-legal .footer-brand { font-size: 20px; }
.a1-legal .footer-links { flex-wrap: wrap; }
.a1-legal .legal-section { scroll-margin-top: 110px; }
@media (max-width: 720px) {
    .a1-legal .product-brand { font-size: 20px; }
    .a1-legal .product-brand img { width: 48px; height: 48px; }
    .a1-legal .nav-links { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .a1-legal .nav-links a { padding-inline: 12px; }
    .a1-legal .legal-hero h1 { font-size: clamp(36px, 8vw, 46px); }
    .legal-back { margin-top: -12px; margin-bottom: 16px; }
    .legal-facts { grid-template-columns: 1fr; gap: 10px; }
    .legal-facts > div { padding: 16px 20px; }
    .legal-facts strong { margin-bottom: 3px; }
    .legal-contents { padding: 22px 20px; }
    .legal-contents ol { grid-template-columns: 1fr; gap: 2px; }
    .legal-contents a { font-size: 14px; }
    .a1-legal .legal-section { scroll-margin-top: 150px; }
}
@media (prefers-reduced-motion: reduce) {
    .a1-legal { scroll-behavior: auto; }
    html:has(.a1-legal) { scroll-behavior: auto; }
}
@media print {
    .legal-facts, .legal-contents, .legal-back { display: none; }
}
