/* Hand-written baseline so the public pages render without the Tailwind
   build (design 06 §6.9: pages under 50 KB, RTL-first, 48 dp touch targets). */
:root {
  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", "Noto Sans Arabic", "Noto Naskh Arabic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand: #1570ef;      /* logo blue: actions, links */
  --brand-dark: #0d2b6e; /* logo navy */
  --accent: #12a870;     /* logo green */
  --ink: #0f1d3d;
  --muted: #5b6477;
  --bg: #ffffff;
  --card: #ffffff;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: var(--brand); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid #e3e7ef; background: var(--card); }
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.brand .logo { display: block; width: 84px; height: 36px; } /* the name logo, 2.339 times as wide as tall */
.lang-switch { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem; border-radius: 999px; text-decoration: none; font-size: 0.95rem; }
.lang.active { background: var(--brand); color: #fff; }
.site-main { max-width: 760px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.hero h1 { font-size: 1.9rem; line-height: 1.25; margin: 0.5rem 0; }
.lead { font-size: 1.1rem; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.25rem; border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary { background: #eaf2fe; color: var(--brand-dark); }
.how h2 { font-size: 1.3rem; margin-top: 2rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.steps li { display: flex; gap: 0.75rem; align-items: flex-start; background: var(--card); padding: 0.9rem 1rem; border-radius: var(--radius); border: 1px solid #e3e7ef; }
.step-n { flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.notice { background: #fff7ed; border: 1px solid #fed7aa; padding: 0.75rem 1rem; border-radius: var(--radius); }
.apks { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.apks li { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.size { color: var(--muted); font-size: 0.9rem; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem; color: var(--muted); font-size: 0.85rem; border-top: 1px solid #e3e7ef; }
@media print { .site-header, .site-footer, .cta-row { display: none; } }
.legal h2 { font-size: 1.1rem; margin-top: 1.5rem; }
.muted { color: var(--muted); }
.banner { background: #fef3e2; color: #b45309; padding: 0.5rem 0.75rem; border-radius: var(--radius); }
/* /download (Phase 4 P2): one big button, the 32-bit fallback, build facts, counter QR. */
.download .apks { display: grid; gap: 1rem; margin: 1.25rem 0 0.5rem; }
.btn-big { min-height: 64px; font-size: 1.2rem; gap: 0.6rem; padding: 0 1.5rem; }
.btn-icon { width: 28px; height: 28px; flex: 0 0 auto; }
.btn .size { font-weight: 400; opacity: 0.85; margin-inline-start: 0.35rem; }
.apk-alt { display: grid; gap: 0.35rem; }
.hint { color: var(--muted); font-size: 0.95rem; margin: 0.25rem 0; }
.step-icon { width: 24px; height: 24px; flex: 0 0 auto; color: var(--brand-dark); margin-top: 0.15rem; }
.build h2, .qr-card h2 { font-size: 1.15rem; margin-top: 2rem; }
.build-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; margin: 0; }
.build-facts div { background: var(--card); border: 1px solid #e3e7ef; border-radius: var(--radius); padding: 0.6rem 0.8rem; }
.build-facts .wide { grid-column: 1 / -1; }
.build-facts dt { color: var(--muted); font-size: 0.8rem; }
.build-facts dd { margin: 0.15rem 0 0; font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; word-break: break-all; }
.qr-card { text-align: center; }
.qr { width: 200px; max-width: 60vw; margin: 0.5rem auto; background: #fff; padding: 8px; border: 1px solid #e3e7ef; border-radius: var(--radius); }
.qr svg { display: block; width: 100%; height: auto; }
@media print { .qr { width: 240px; } }
/* /account/delete (Phase 4 P13): the deletion request form and its answer. */
.card-form { display: grid; gap: 0.35rem; background: var(--card); border: 1px solid #e3e7ef; border-radius: var(--radius); padding: 1rem; }
.card-form label { font-weight: 600; margin-top: 0.5rem; }
.card-form input, .card-form textarea { width: 100%; min-height: 48px; padding: 0.6rem 0.75rem; border: 1px solid #c7cfdd; border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
.card-form button { border: 0; cursor: pointer; font: inherit; font-weight: 600; margin-top: 0.75rem; }
.field-error { color: #b42318; margin: 0.25rem 0; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.dsr-result { background: #ecfdf3; border: 1px solid #abefc6; padding: 0.75rem 1rem; border-radius: var(--radius); margin: 1rem 0; }
/* /w/{slug} print block (DECISIONS4 P5): hidden on screen, a QR of the page next to the AM code on paper. */
.cv-print { display: none; }
@media print {
  .cv-print { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e3e7ef; break-inside: avoid; }
  .cv-print-qr { width: 34mm; height: 34mm; flex: 0 0 auto; }
  .cv-print-qr svg { width: 100%; height: 100%; }
  .cv-print-scan { font-weight: 600; margin: 0; }
  .cv-print-code { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.06em; margin: 0.25rem 0; }
}
/* Entry page (GET /): live numbers, coverage and languages, the two
   how-it-works lists, support and social links. Logical properties only (RTL). */
.landing-block { margin-top: 2rem; }
.landing-block h2 { font-size: 1.3rem; margin: 0 0 0.75rem; }
.landing-block h3 { font-size: 1.05rem; margin: 1rem 0 0.5rem; }
.stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; }
.stat { display: grid; gap: 0.15rem; background: #f3f7fe; border: 1px solid #dbe6fb; border-radius: var(--radius); padding: 0.9rem 1rem; }
.stat-n { font-size: 1.8rem; line-height: 1.1; color: var(--brand-dark); justify-self: start; }
.stat-workers .stat-n { color: #067a52; }
.cities, .lang-chips, .social-links { list-style: none; padding: 0; margin: 0; }
.cities li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.35rem 0; }
.lang-chips, .social-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.9rem; border-radius: 999px; border: 1px solid #c7d7f5; text-decoration: none; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 1.25rem; }
.support .num { font-weight: 400; margin-inline-start: 0.35rem; unicode-bidi: isolate; }
.support .btn { gap: 0.5rem; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: #eaf2fe; color: var(--brand-dark); }
.social-link:hover, .social-link:focus-visible { background: var(--brand); color: #fff; }
.social-icon { width: 24px; height: 24px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
@media print { .social, .support .btn-icon { display: none; } }
/* /post/{id}, the share page of a work post (BE-P3a): the cover, the verified pill (green, never amber). */
.post-page .post-cover { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: cover; border-radius: var(--radius); background: #eaf2fe; margin: 0.75rem 0; }
.post-pill { display: inline-flex; align-items: center; margin-inline-start: 0.5rem; padding: 0.1rem 0.6rem; border-radius: 999px; background: #e7f7f0; color: #0b6b49; font-size: 0.85rem; font-weight: 600; }
.post-excerpt { overflow-wrap: anywhere; white-space: pre-line; }
/* The legal and help texts published in /admin/legal (admin v2 F9): sub-headings, lists, links, the help page's questions that open. */
.legal { overflow-wrap: anywhere; }
.legal h3 { font-size: 1rem; margin-top: 1.25rem; }
.legal ul, .legal ol { padding-inline-start: 1.5rem; }
.legal li + li { margin-top: 0.35rem; }
.legal details.faq { border: 1px solid #e3e7ef; border-radius: var(--radius); background: var(--card); margin: 0.75rem 0; padding: 0 1rem; }
.legal details.faq > summary { font-weight: 600; cursor: pointer; padding: 0.85rem 0; line-height: 1.4; }
.legal details.faq[open] > summary { border-bottom: 1px solid #e3e7ef; margin-bottom: 0.5rem; }
.legal details.faq > summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.more-legal { display: inline-flex; flex-wrap: wrap; gap: 0.75rem; }
/* The 404 / 5xx page (templates/public/error.templ). Centred, one big button
   home, and the same line in the other three languages under it: a wrong
   link reaches anybody and the language negotiated from the request may not
   be the reader's. */
.errorpage { text-align: center; padding: 1.5rem 0 0; }
.errorpage-status { font-size: 3.4rem; line-height: 1; font-weight: 700; color: var(--brand); margin: 0; }
.errorpage h1 { font-size: 1.5rem; margin: 0.5rem 0; }
.errorpage .lead { margin: 0 auto; max-width: 34rem; }
.errorpage .cta-row { justify-content: center; }
.errorpage-langs { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 0.4rem; color: var(--muted); font-size: 0.92rem; }

/* /w/{slug}: the small card of a worker. The page has no bar: the logo above
   the card, the languages under it. Light and dark. */
.page-wcard { --wc-page: #ffffff; --wc-card: #f3f6fb; --wc-ink: #0f1d3d; --wc-muted: #5b6477; --wc-tonal: #eaf2fe; --wc-on-tonal: #0b4fb3; --wc-primary: #1570ef; --wc-on-primary: #ffffff; --wc-green: #0e8f5c; --wc-off: #cfd6e2; --wc-face: #cfe1fd; --wc-face-ink: #0d2b6e; --wc-ground-1: #dce7fc; --wc-ground-2: #f1f5fd; --wc-round: #ffffff; --wc-round-ink: #0d2b6e;
  display: flex; flex-direction: column; align-items: center; min-height: 100vh; background: var(--wc-page); color: var(--wc-ink); }
.page-wcard .muted { color: var(--wc-muted); }
.page-wcard .site-header { display: contents; }
.page-wcard .brand { order: 0; margin-top: 1rem; }
.page-wcard .site-main { order: 1; width: 100%; max-width: 480px; padding: 0.6rem 1rem 1.25rem; }
.page-wcard .lang-switch { order: 2; justify-content: center; padding: 0 1rem; }
.page-wcard .lang { font-size: 0.85rem; color: var(--wc-muted); padding: 0 0.7rem; }
.page-wcard .lang.active { background: none; color: var(--wc-ink); font-weight: 700; }
.page-wcard .site-footer { order: 3; flex-wrap: wrap; justify-content: center; border: 0; color: var(--wc-muted); }
.page-wcard .site-footer a { color: inherit; }
.page-wcard .site-footer .version { display: none; }
.wcard { display: grid; gap: 0.85rem; }
.wcard-in { display: grid; justify-items: center; gap: 0.5rem; text-align: center; padding-bottom: 1.1rem; border-radius: 28px; overflow: hidden; background: var(--wc-card); }
.wcard-cover { width: 100%; height: 128px; overflow: hidden; }
.wcard-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wcard-cover.plain { display: flex; align-items: flex-end; padding-inline: 1.1rem; background: linear-gradient(var(--wc-ground-1), var(--wc-ground-2)); }
.wcard-cover .job { width: auto; height: 116px; object-fit: contain; object-position: bottom; }
.wcard-face { position: relative; width: 96px; height: 96px; margin-top: -56px; border-radius: 50%; border: 4px solid var(--wc-card); background: var(--wc-card); }
.wcard-face img, .wcard-face .letter { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--wc-face); color: var(--wc-face-ink); font-size: 2.2rem; font-weight: 700; line-height: 1; }
.wcard-face .tick { position: absolute; bottom: -2px; inset-inline-end: -4px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--wc-card); background: var(--wc-green); color: #fff; }
.wcard h1 { margin: 0; padding: 0 1rem; font-size: 1.45rem; line-height: 1.25; overflow-wrap: anywhere; }
.wcard p { margin: 0; padding: 0 1rem; }
.wcard-job { display: flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 34px; line-height: 1.3; }
.wcard-job img { width: 34px; height: 34px; object-fit: contain; flex: 0 0 auto; }
.wcard-facts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.15rem 0.5rem; font-size: 1.05rem; }
.wcard-facts .muted { font-size: 0.85rem; }
.wcard-facts .unseen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wcard-stars { direction: ltr; }
.wcard-stars .off { fill: var(--wc-off); }
.wcard-stars .on { fill: var(--wc-green); }
.wcard-works { position: relative; display: flex; justify-content: center; gap: 8px; width: 100%; padding: 0 1.1rem; min-height: 52px; }
/* one strip of square tiles for them all; each shows its own a little enlarged, so no edge of its neighbour shows */
.wcard-works .tile { position: relative; flex: 1 1 0; min-width: 0; max-width: 33.333%; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: var(--wc-face); }
.wcard-works img { position: absolute; top: -6%; left: -6%; height: 112%; max-width: none; }
.wcard-works.n1 img { width: 112%; }
.wcard-works.n2 img { width: 224%; }
.wcard-works.n3 img { width: 336%; }
.wcard-works .tile.t2 img { left: -118%; }
.wcard-works .tile.t3 img { left: -230%; }
.wcard-works .lock { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--wc-round); color: var(--wc-round-ink); box-shadow: 0 2px 10px rgb(5 16 45 / 20%); }
.wcard-locked { font-size: 0.85rem; }
.wcard-actions { display: grid; gap: 0.6rem; justify-items: stretch; }
.wcard-actions .btn { min-height: 56px; border-radius: 999px; font-weight: 700; text-align: center; }
.wcard-open { background: var(--wc-primary); color: var(--wc-on-primary); }
.wcard-signin { background: var(--wc-tonal); color: var(--wc-on-tonal); }
.wcard-get { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; color: var(--wc-muted); text-decoration: none; }
.wcard-get:hover { text-decoration: underline; }
.page-wcard a:focus-visible { outline-color: var(--wc-primary); }
@media (min-width: 720px) {
  .page-wcard { background: var(--wc-card); }
  .page-wcard .brand { margin-top: 2rem; }
  .wcard { padding: 1.1rem; border-radius: 34px; background: var(--wc-page); box-shadow: 0 8px 40px rgb(13 43 110 / 10%); }
  .wcard-cover { height: 168px; }
}
@media (prefers-color-scheme: dark) {
  .page-wcard { --wc-page: #0d121b; --wc-card: #151b26; --wc-ink: #e9edf4; --wc-muted: #9ea8b9; --wc-tonal: #1c3358; --wc-on-tonal: #a9c8fa; --wc-primary: #5b9bf7; --wc-on-primary: #08111f; --wc-green: #2fc58c; --wc-off: #3a4556; --wc-face: #1c3358; --wc-face-ink: #a9c8fa; --wc-ground-1: #22345a; --wc-ground-2: #172338; --wc-round: #222c3b; --wc-round-ink: #e9edf4; color-scheme: dark; }
  .page-wcard .lg-b { fill: #5b9bf7; }
  .page-wcard .lg-i { fill: #e9edf4; }
  .page-wcard .wcard-face .tick { color: #062a1a; }
}
@media print {
  .page-wcard { --wc-page: #fff; --wc-card: #fff; --wc-ink: #0f1d3d; --wc-muted: #5b6477; --wc-green: #0e8f5c; --wc-off: #cfd6e2; display: block; min-height: 0; color-scheme: light; }
  .page-wcard .site-header { display: none; }
  .wcard-in { border: 1px solid #e3e7ef; }
  .wcard { box-shadow: none; padding: 0; }
  .wcard-works, .wcard-locked, .wcard-actions { display: none; }
}
