/* SoftPost site pages (privacy, terms, account deletion, support).
   Same tokens, header and footer as the landing page (index.html), plus a
   reading layout for long documents. Keep the header/footer rules in sync
   with index.html when either changes. */

/* Fonts are served from this site, not from Google (no third-party request). */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/assets/fonts/PlusJakartaSans.woff2") format("woff2"); }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/Tajawal-Regular.woff2") format("woff2"); }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/Tajawal-Medium.woff2") format("woff2"); }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/Tajawal-Bold.woff2") format("woff2"); }

:root {
  --ink: #121826;
  --ink-2: #38445a;
  --muted: #5c6b80;
  --blue: #1a46c8;
  --red: #e2182a;
  --blue-soft: #eef3ff;
  --paper: #f3f5fa;
  --card: #fff;
  --line: rgba(18, 24, 38, .08);
  --shadow-sm: 0 10px 28px rgba(22, 40, 90, .08);
  --radius: 22px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: 96px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Plus Jakarta Sans", "Tajawal", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
html[lang="ar"] body { font-family: "Tajawal", "Plus Jakarta Sans", sans-serif; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-weight: 700; letter-spacing: 0; line-height: 1.35; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid rgba(26, 70, 200, .45); outline-offset: 3px; }
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; inset-inline-start: 12px; top: -60px; z-index: 30; padding: 10px 14px; background: #fff; border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* One language visible at a time. html[lang] is set before first paint by the
   inline head script, so there is no flash of the other two languages. */
html[lang="en"] [data-lang]:not([data-lang="en"]),
html[lang="de"] [data-lang]:not([data-lang="de"]),
html[lang="ar"] [data-lang]:not([data-lang="ar"]) { display: none !important; }

/* ---------- Header (same as the landing page) ---------- */
header.site { position: sticky; top: 0; z-index: 20; background: rgba(243, 245, 250, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.nav { min-height: 76px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -.04em; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.links { display: flex; justify-content: center; gap: 26px; }
.links a { color: var(--muted); font-size: 15px; font-weight: 600; }
.links a:hover, .links a:focus-visible { color: var(--ink); }
.actions { display: flex; align-items: center; gap: 10px; }
.languages { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.language { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 36px; border: 0; border-radius: 999px; padding: 0 10px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
.language[aria-pressed="true"], .language[aria-current="page"] { color: #fff; background: var(--ink); }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; border: 0; border-radius: 999px; padding: 15px 26px; background: var(--blue); color: #fff; font-weight: 800; box-shadow: 0 10px 24px rgba(26, 70, 200, .22); transition: transform 150ms var(--ease-out), filter 150ms var(--ease-out); }
.cta:hover { transform: translateY(-1px); filter: brightness(1.06); }
.nav-cta { min-height: 42px; padding: 0 16px; font-size: 14px; box-shadow: none; }

/* ---------- Document hero ---------- */
.doc-hero { padding: 64px 0 36px; text-align: center; }
.doc-hero h1 { margin: 0 auto 14px; max-width: 18ch; font-size: clamp(34px, 5vw, 52px); font-weight: 800; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.doc-hero .lead { margin: 0 auto; max-width: 60ch; color: var(--muted); font-size: 18px; line-height: 1.6; }
.doc-hero .updated { margin: 18px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; }

/* ---------- Reading layout ---------- */
.doc-layout { display: grid; grid-template-columns: minmax(0, 760px); justify-content: center; gap: 48px; padding-bottom: 96px; }
.toc { display: none; }
@media (min-width: 1100px) {
  .doc-layout { grid-template-columns: 220px minmax(0, 760px); }
  .toc { display: block; position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; }
}
.toc-title { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.4; }
.toc a:hover, .toc a:focus-visible { color: var(--ink); background: #fff; }
.toc a[aria-current="true"] { color: var(--blue); background: var(--blue-soft); }

.doc { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 48px 52px; }
.doc section + section { margin-top: 36px; padding-top: 36px; border-top: 1px solid var(--line); }
.doc h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; font-size: 22px; font-weight: 800; line-height: 1.3; letter-spacing: -.02em; }
.doc h2 .num { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: 0; transform: translateY(-2px); }
.doc h3 { margin: 22px 0 8px; font-size: 17px; font-weight: 700; }
.doc p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.75; }
.doc p:last-child { margin-bottom: 0; }
.doc strong { color: var(--ink); font-weight: 700; }
.doc a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc ul, .doc ol { margin: 6px 0 16px; padding: 0; list-style: none; display: grid; gap: 10px; }
.doc li { position: relative; padding-inline-start: 22px; color: var(--ink-2); line-height: 1.7; }
.doc ul > li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .72em; width: 7px; height: 7px; border-radius: 999px; background: var(--blue); }
.doc ol { counter-reset: step; }
.doc ol > li { padding-inline-start: 34px; counter-increment: step; }
.doc ol > li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: .1em; width: 24px; height: 24px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.note { margin: 18px 0 0; padding: 16px 18px; border-radius: 14px; background: var(--blue-soft); color: var(--ink-2); }
.note strong { color: var(--ink); }

/* FAQ (support page) */
.doc details { border-top: 1px solid var(--line); }
.doc details:first-of-type { border-top: 0; }
.doc summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; color: var(--blue); font-weight: 800; }
.doc details[open] summary::after { content: "–"; }
.doc details > :not(summary) { padding-bottom: 16px; }

/* ---------- Footer (same as the landing page) ---------- */
footer.site { padding: 48px 0 24px; background: #fff; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 8px 32px; }
.footer-grid > div + div { border-inline-start: 1px solid var(--line); padding-inline-start: 28px; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 22px; letter-spacing: -.04em; }
.footer-brand img { width: 40px; height: 40px; border-radius: 12px; }
.footer-tag { margin: 28px 0 0; font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; }
.footer-tag > span { display: block; }
.footer-tag .dot { color: var(--red); }
.footer-grid h2 { margin: 0 0 16px; font-size: 16px; font-weight: 800; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { color: var(--muted); font-size: 15px; font-weight: 600; }
.footer-links a:hover, .footer-links a:focus-visible, .footer-links a[aria-current="page"] { color: var(--ink); }
.footer-go { color: var(--blue); font-weight: 700; }
.footer-go i { font-style: normal; }
.footer-go:hover, .footer-go:focus-visible { color: var(--blue); }
html[dir="rtl"] .footer-go i { display: inline-block; transform: scaleX(-1); }
.footer-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.footer-bar p { margin: 0; }
.footer-bar a { color: var(--blue); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.footer-powered { font-size: 16px; font-weight: 700; color: var(--ink); }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .nav { grid-template-columns: 1fr auto; min-height: 64px; }
  .brand { grid-column: 1; grid-row: 1; }
  .actions { grid-column: 2; grid-row: 1; }
  .links { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 18px; overflow-x: auto; padding-bottom: 10px; }
  .nav-cta { display: none; }
  .wrap { width: min(100% - 32px, 1180px); }
  .nav, .links, .actions, .brand { min-width: 0; }
  .doc-hero { padding: 40px 0 24px; }
  .doc { padding: 28px 22px; border-radius: 18px; }
  .doc-layout { padding-bottom: 64px; }
  footer.site { padding-bottom: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 0; text-align: center; }
  .footer-brand-col, .footer-contact { grid-column: 1 / -1; }
  .footer-tag { margin-top: 16px; }
  .footer-grid > div + div { border: 0; padding: 0; }
  .footer-contact { margin-top: 22px; }
  .footer-resources, .footer-legal { margin-top: 26px; padding: 22px 8px 0; border-top: 1px solid var(--line); }
  .footer-legal { border-inline-start: 1px solid var(--line); }
  .footer-links { justify-items: center; }
  .footer-bar { margin-top: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta { transition: none; }
}
