/* VocaPal — legal, help and 404 pages. Same tokens as the landing page. */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #4f5a72;
  --brand: #2049c7;
  --brand-2: #1a3aa3;
  --brand-soft: #e3e9fb;
  --sun-soft: #fff3d6;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.18);
  --font-latin: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-latin), var(--font-ar); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
:focus-visible { outline: 3px solid #ffb020; outline-offset: 3px; border-radius: 6px; }
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 50; padding: 8px 14px; border-radius: 999px;
  background: var(--brand); color: #fff; text-decoration: none; transform: translateY(-180%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

.site-wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.legal-wrap { width: min(860px, 100%); margin-inline: auto; padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 32px) clamp(64px, 8vw, 96px); }

/* Header */
.legal-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: rgba(243, 245, 249, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-inline-end: auto; }
.brand-mark { width: 32px; height: 32px; color: var(--brand); }
.brand-word { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.top-nav { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.top-nav a { color: #2b3348; text-decoration: none; font-size: 0.96rem; }
.top-nav a:hover { color: var(--brand); }
.pill-cta {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 18px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 0.92rem; text-decoration: none;
}
.pill-cta:hover { background: var(--brand-2); }

/* Content */
.legal-banner {
  margin: 0 0 12px; padding: 12px 16px; border-radius: 14px; background: var(--sun-soft);
  border: 1px solid #f3d48a; color: #3d2a00; font-size: 0.9rem; font-weight: 600;
}
.arabic-note { margin: 0 0 28px; color: var(--muted); font-family: var(--font-ar); font-size: 0.95rem; }
.legal-card { padding: 0; }
.eyebrow { margin: 0 0 6px; color: var(--brand); font-weight: 700; font-size: 0.92rem; }
.legal-card h1 { margin: 0 0 6px; font-size: clamp(2.3rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -0.03em; }
.updated { margin: 0 0 28px; color: var(--muted); font-size: 0.92rem; }
.legal-card > p:first-of-type { margin-top: 0; }
.legal-card h2 {
  margin: 36px 0 10px; padding-top: 28px; border-top: 1px solid var(--line);
  font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.01em;
}
.legal-card p, .legal-card li { color: #2b3348; }
.legal-card ul, .legal-card ol { padding-inline-start: 1.2rem; }
.legal-card li { margin-bottom: 6px; }
.legal-card strong { color: var(--ink); }

.legal-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.legal-nav a {
  display: inline-flex; min-height: 42px; align-items: center; padding: 8px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); text-decoration: none; font-size: 0.94rem;
}
.legal-nav a:hover, .legal-nav a[aria-current="page"] { border-color: var(--brand); color: var(--brand); }
.legal-footer { margin-top: 24px; }
.legal-footer p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.notice { padding: 12px 16px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-2); }

/* Blue footer */
.site-footer { background: var(--brand); color: #fff; padding-block: 44px 36px; }
.footer-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,0.18); }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 4px; font-weight: 800; font-size: 1.05rem; }
.footer-mark { width: 26px; height: 26px; color: #0f2c8a; }
.footer-tag { margin: 0; color: #dfe6ff; font-size: 0.92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: #fff; text-decoration: none; font-size: 0.94rem; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-note { margin: 18px 0 0; color: #dfe6ff; font-size: 0.84rem; }

/* 404 */
.nf { text-align: center; padding-block: clamp(48px, 10vw, 120px); }
.nf svg.nf-mascot { width: 150px; height: 150px; }
.nf h1 { margin: 12px 0 10px; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.15; letter-spacing: -0.03em; }
.nf p { color: var(--muted); max-width: 32rem; margin: 0 auto 26px; }
.nf .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-dark {
  display: inline-flex; align-items: center; min-height: 50px; padding: 10px 22px; border-radius: 10px;
  background: #121521; color: #fff; text-decoration: none; font-weight: 700;
}
.btn-light { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }

@media (max-width: 760px) {
  .top-nav { display: none; }
  .header-row { min-height: 64px; }
  .legal-card h2 { font-size: 1.12rem; margin-top: 28px; padding-top: 22px; }
}

/* Tables on the privacy page (processors, retention) */
.table-wrap { overflow-x: auto; margin: 12px 0 18px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.legal-table th, .legal-table td { padding: 10px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); color: #2b3348; }
.legal-table th { color: var(--ink); font-weight: 700; background: var(--brand-soft); }
.legal-table tr:last-child td { border-bottom: 0; }

/* Contact form (support / contact pages) */
.contact-form { display: grid; gap: 12px; max-width: 560px; margin: 16px 0 8px; }
.contact-form label { display: grid; gap: 4px; font-weight: 600; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; padding: 10px 12px; border: 1px solid #c9d3ea; border-radius: 10px; background: #fff;
}
.contact-form .consent { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form button { justify-self: start; font: inherit; font-weight: 700; padding: 10px 18px; border: 0; border-radius: 999px; background: #2049c7; color: #fff; cursor: pointer; }
.contact-form button[disabled] { opacity: 0.6; cursor: wait; }
.contact-status { min-height: 1.4em; margin: 0; }
.contact-status.error { color: #b3261e; }
.contact-status.ok { color: #1f7a3d; }
