/* Noto Kufi Arabic, served from this site rather than Google Fonts: loading it
   from Google would send every visitor's IP address to Google. SIL OFL 1.1 —
   license in assets/fonts/OFL-NotoKufiArabic.txt. Arabic-only subset. */
@font-face { font-family: "Noto Kufi Arabic"; font-weight: 400; font-display: swap; src: url("/assets/fonts/NotoKufiArabic-Regular.woff2") format("woff2"); }
@font-face { font-family: "Noto Kufi Arabic"; font-weight: 600; font-display: swap; src: url("/assets/fonts/NotoKufiArabic-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Noto Kufi Arabic"; font-weight: 700; font-display: swap; src: url("/assets/fonts/NotoKufiArabic-Bold.woff2") format("woff2"); }

/* Speakly site. Plain CSS, no build step, no external requests except the
   Arabic web font (see README). Brand: #4F46E5. */

:root {
  --brand: #4f46e5;
  --brand-dark: #3730a3;
  --brand-soft: #eef2ff;
  --ink: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --paper: #ffffff;
  --ground: #f9fafb;
  --ph-bg: #fef3c7;
  --ph-ink: #78350f;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-ar: "Noto Kufi Arabic", "Geeza Pro", "SF Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ground);
}

html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.9; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-dark); }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  inset-inline-start: -999px;
  top: 0.5rem;
  background: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}
.skip:focus { inset-inline-start: 0.5rem; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
}
.logo {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: var(--brand);
  color: #fff;
  font-family: var(--font);
  font-size: 1.05rem;
}
.main-nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.main-nav a, .site-footer nav a { text-decoration: none; font-weight: 600; color: var(--muted); }
.main-nav a:hover, .site-footer nav a:hover { color: var(--brand); }
.main-nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; }

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.3rem 0 0.8rem;
  font-size: 0.9rem;
}
.lang-switch a {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
}
.lang-switch a[lang="ar"] { font-family: var(--font-ar); }
.lang-switch a[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Content */
main.wrap { padding-top: 2rem; padding-bottom: 3rem; }
h1, h2, h3 { line-height: 1.3; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0 0 0.4rem; }
h2 { font-size: 1.35rem; margin: 2.4rem 0 0.6rem; padding-top: 0.2rem; }
h3 { font-size: 1.08rem; margin: 1.6rem 0 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-inline-start: 1.4rem; }
li { margin-bottom: 0.35rem; }
[id] { scroll-margin-top: 1rem; }

.updated { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.5rem; }
.prevails {
  font-size: 0.95rem;
  background: var(--brand-soft);
  border-inline-start: 4px solid var(--brand);
  padding: 0.6rem 0.9rem;
  border-radius: 0.4rem;
}
.summary {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1rem 1.2rem;
  margin-top: 1.2rem;
}

/* Placeholders the owner must replace: deliberately loud. */
.ph {
  background: var(--ph-bg);
  color: var(--ph-ink);
  padding: 0 0.25em;
  border-radius: 0.2em;
  font-weight: 600;
}

.toc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.9rem 1.2rem 0.4rem;
}
.toc ol { margin-bottom: 0.5rem; }

table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 0.97rem;
  background: var(--paper);
}
th, td {
  text-align: start;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  min-width: 12rem;
}
th { background: var(--brand-soft); }

/* Landing */
.hero { padding: 1.5rem 0 0.5rem; }
.hero h1 { font-size: clamp(2.4rem, 8vw, 3.4rem); color: var(--brand); }
.lede { font-size: 1.25rem; color: var(--muted); max-width: 36rem; }
.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.store {
  display: inline-block;
  padding: 0.75rem 1.2rem;
  border-radius: 0.7rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.store:hover { background: var(--brand-dark); color: #fff; }
.features { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.features li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  margin: 0;
}

/* Support */
.contact-card {
  background: var(--brand-soft);
  border-radius: 0.9rem;
  padding: 1rem 1.25rem 0.25rem;
  margin-top: 1.25rem;
}
.contact-card h2 { margin-top: 0.2rem; }
details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0 1.1rem;
  margin-bottom: 0.75rem;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.85rem 0;
}
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 0.8rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 1.25rem 0 2rem;
  font-size: 0.93rem;
  color: var(--muted);
}
.site-footer p { margin: 0.6rem 0 0; }

@media print {
  .site-header, .site-footer, .skip { display: none; }
  body { background: #fff; }
  details { border: 0; }
}

/* Keep email addresses and Latin placeholders intact inside Arabic text. */
a[href^="mailto:"], .ph { unicode-bidi: isolate; }
