/*
 * The public site, in the product's own colours.
 *
 * The palette is lifted from `frontend/shared/styles.css` rather than invented
 * beside it, because a marketing site in different colours from the thing it
 * sells is a promise broken on the first screen after sign-up.
 *
 * The one rule worth restating, since it is the trap: #bec2ae is a FILL, not
 * an ink. It measures 1.82:1 on white — fine under a dark label on a button,
 * unreadable as text or as a border you are meant to notice. --accent-ink is
 * the same hue carried down until it clears 4.5:1, and that is what headings,
 * links and small print use.
 */

:root {
  --accent: #bec2ae;
  --accent-ink: #686d52;
  --accent-soft: #e8ebe0;
  --accent-text: #16191d;

  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef1;
  --border: #d3d7dd;
  --text: #16191d;
  --text-muted: #5c636d;

  /* A ground dark enough to sit the pale accent on without it vanishing. */
  --deep: #1b1f18;
  --deep-2: #262b22;

  --radius: 14px;
  --radius-sm: 10px;
  --shell: 1160px;

  --font-en: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-ar: 'Tajawal', system-ui, 'Segoe UI', Tahoma, sans-serif;
  --font: var(--font-en);
}

html[lang='ar'] {
  --font: var(--font-ar);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Arabic sits lower in its line and reads better with a little more air. */
html[lang='ar'] body {
  line-height: 1.85;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

html[lang='ar'] h1,
html[lang='ar'] h2,
html[lang='ar'] h3 {
  letter-spacing: 0;
  line-height: 1.35;
}

:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  background: var(--deep);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus {
  inset-inline-start: 0;
}

/* ---- Top bar -------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: none;
}

.brand img {
  height: 30px;
  width: auto;
}

.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav a[aria-current='page'] {
  color: var(--text);
  background: var(--accent-soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.lang {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.lang:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 82%, #000);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--text-muted);
}

.btn-onDeep {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-onDeep:hover {
  background: #fff;
}

.btn-outlineDeep {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-outlineDeep:hover {
  border-color: #fff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

/* ---- Hero slider ---------------------------------------------------------- */

.hero {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 78%);
  border-bottom: 1px solid var(--border);
}

.slider {
  position: relative;
  padding: 72px 0 24px;
}

.slide {
  display: none;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.slide.is-active {
  display: grid;
  animation: slide-in 420ms ease both;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent-ink) 30%, transparent);
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.slide h1 {
  font-size: clamp(30px, 4.4vw, 50px);
  font-weight: 800;
  margin-bottom: 18px;
}

.slide p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 0 26px;
}

.slide-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.slider-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 0 64px;
}

.dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 30px;
  height: 5px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: var(--border);
  cursor: pointer;
}

.dot[aria-selected='true'] {
  background: var(--accent-ink);
}

.arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.arrow:hover {
  border-color: var(--text-muted);
}
/* The arrow glyph points the way the language runs. */
html[dir='rtl'] .arrow svg {
  transform: scaleX(-1);
}

/* ---- The figure beside each slide ----------------------------------------- */

.figure {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 18px 40px -28px rgba(22, 25, 29, 0.4);
}

.figure-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.figure-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  font-size: 14px;
}

.figure-row + .figure-row {
  border-top: 1px dashed var(--border);
}

.figure-row .num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.figure-total {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2px solid var(--text);
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 17px;
}

.figure-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.qr {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  background-image: conic-gradient(var(--text) 25%, transparent 0 50%, var(--text) 0 75%, transparent 0);
  background-size: 12px 12px;
  border: 3px solid var(--text);
  flex: none;
}

/* ---- Sections -------------------------------------------------------------- */

.section {
  padding: 84px 0;
}

.section-tight {
  padding: 60px 0;
}

.section-alt {
  background: var(--bg);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 44px;
}

.section-head h2 {
  font-size: clamp(25px, 3.1vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
}

.section-head p {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0;
}

.page-head {
  padding: 64px 0 8px;
}

.page-head h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 12px;
}

.page-head p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0;
}

/* ---- Trust strip ----------------------------------------------------------- */

.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.trust > div {
  background: var(--surface);
  padding: 24px 22px;
}

.trust strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.trust span {
  font-size: 14px;
  color: var(--text-muted);
}

/*
 * The one link inside the trust strip.
 *
 * `.trust span` is deliberately muted, and a link that inherits that reads as
 * ordinary prose — the download is the only thing in this strip anybody can
 * click, so it has to look clickable without turning the strip into a row of
 * calls to action.
 */
.trust a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.trust a:hover,
.trust a:focus-visible {
  text-decoration-thickness: 2px;
}

/* ---- Feature cards --------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.section-alt .card {
  background: var(--surface);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
}

/* ---- Addresses ------------------------------------------------------------- */

.addresses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.address {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.address h3 {
  font-size: 17px;
  font-weight: 700;
}

.address code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 4px 9px;
  border-radius: 6px;
  align-self: flex-start;
  /* An address reads left-to-right in both languages. */
  direction: ltr;
  unicode-bidi: embed;
}

.address p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  flex: 1;
}

.address a.go {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.address a.go:hover {
  text-decoration: underline;
}

/* ---- Questions ------------------------------------------------------------- */

/*
 * The questions, centred.
 *
 * They were start-aligned, which put them hard against the left in English
 * and hard against the right in Arabic with a column of dead space opposite —
 * the one block on the site whose width is set by readability rather than by
 * the grid. Centred, it sits under a centred heading in both languages and
 * reads the same way round in each.
 */
.faq {
  max-width: 820px;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

/* The heading above it follows, or a centred box sits under an off-centre
   title and looks like a mistake rather than a choice. */
.section-head.is-centred {
  margin-inline: auto;
  text-align: center;
}

.faq details {
  border-bottom: 1px solid var(--border);
}
.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  cursor: pointer;
  padding: 20px 56px 20px 24px;
  font-weight: 600;
  font-size: 16.5px;
  position: relative;
  list-style: none;
}

html[dir='rtl'] .faq summary {
  padding: 20px 24px 20px 56px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  inset-inline-end: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--accent-ink);
  line-height: 1;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details[open] summary {
  background: var(--accent-soft);
}

.faq .answer {
  padding: 4px 24px 22px;
  color: var(--text-muted);
  font-size: 15.5px;
  max-width: 68ch;
}

/* ---- Call to action band ---------------------------------------------------- */

.cta {
  background: var(--deep);
  color: #fff;
  border-radius: var(--radius);
  padding: 54px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta h2 {
  font-size: clamp(23px, 2.8vw, 32px);
  font-weight: 800;
  margin-bottom: 8px;
}

.cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  max-width: 46ch;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Contact ---------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.ways {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.way {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  background: var(--surface);
}

.way h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.way a {
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}
.way a:hover {
  color: var(--accent-ink);
}

.way span {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.form h2 {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 6px;
}

.form > p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-ink) 20%, transparent);
}

/* ---- Support ----------------------------------------------------------------- */

.hours {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 560px;
  background: var(--surface);
}

.hours div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 22px;
  font-size: 15px;
}

.hours div + div {
  border-top: 1px solid var(--border);
}

.hours strong {
  font-weight: 600;
}

.hours span {
  color: var(--text-muted);
}

/* ---- Footer ------------------------------------------------------------------ */

.footer {
  background: var(--deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 60px 0 28px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer .brand img {
  height: 28px;
  /* The mark is black artwork; on the dark ground it is shown in white. */
  filter: brightness(0) invert(1);
}

.footer .brand-name {
  color: #fff;
}

.footer-about {
  font-size: 14.5px;
  margin: 14px 0 0;
  max-width: 34ch;
}

.footer h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 14px;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14.5px;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
}

.social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
}

/* ---- Narrow screens ----------------------------------------------------------- */

@media (max-width: 940px) {
  .slide {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .trust,
  .cards,
  .addresses {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/*
 * The links that only exist when the menu is a menu.
 *
 * Sign in and Start free live in the top bar on a wide screen. There is no
 * room for them beside a hamburger, and dropping them would take the two
 * things most visitors came for off a phone entirely — so they move into the
 * menu instead, as its last two items.
 */
.nav .only-narrow {
  display: none;
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }
  /*
   * Everything in the bar has to fit in 390px beside a hamburger, and it did
   * not: the bar overflowed, the page scrolled sideways, and the hamburger
   * itself was the part pushed off the edge. The two buttons come out, the
   * language toggle stays — it is one word and it is how half the audience
   * reads the site.
   */
  .topbar-inner {
    gap: 10px;
  }
  .topbar-actions .btn {
    display: none;
  }
  .nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 72px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    margin: 0;
    box-shadow: 0 18px 30px -24px rgba(22, 25, 29, 0.5);
  }
  .nav.is-open {
    display: flex;
  }
  .nav a {
    padding: 12px 14px;
  }
  .nav .only-narrow {
    display: block;
    margin-top: 6px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    font-weight: 600;
    color: var(--text);
  }
  .nav .only-narrow-cta {
    border-top: 0;
    margin-top: 2px;
    padding-top: 12px;
    background: var(--accent);
    color: var(--accent-text);
    border-radius: 999px;
    text-align: center;
  }
  .trust,
  .cards,
  .addresses,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 56px 0;
  }
  .slider {
    padding-top: 44px;
  }
  .cta {
    padding: 36px 26px;
  }
  .figure {
    padding: 18px;
  }
}

/*
 * The arrow on a "go" link points the way the reader is travelling.
 *
 * A literal → in right-to-left copy points back at the text it came from,
 * which reads as "return" rather than "continue". Flipped rather than swapped
 * for ←, so the two languages keep one glyph and one string.
 */
.go-arrow {
  display: inline-block;
}

html[dir='rtl'] .go-arrow {
  transform: scaleX(-1);
}

/*
 * Below about a small phone the wordmark beside the logo is the one thing
 * that can go: the mark itself still says who this is, and the alternative
 * is a bar that wraps or scrolls.
 */
@media (max-width: 380px) {
  .brand-name {
    display: none;
  }
}

/* ---- The contact form ------------------------------------------------------- */

.field-hint {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 5px;
  font-weight: 400;
}

.field span em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
}

/*
 * The honeypot, hidden from people without being hidden from a bot.
 *
 * `display: none` is what a bot checks for, so this is moved out of the
 * viewport instead. `aria-hidden` on the wrapper and a negative tabindex keep
 * it away from a screen reader and from the tab order — the two audiences
 * that would otherwise meet a field asking them for a website nobody wants.
 */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-result {
  margin: 14px 0 0;
  font-size: 15px;
  min-height: 1.4em;
}

.form-result.is-good {
  color: var(--success-ink, #0e743a);
  font-weight: 600;
}

.form-result.is-bad {
  color: var(--danger, #b3261e);
  font-weight: 600;
}

/* ---- Terms and privacy ---------------------------------------------------
 *
 * Long-form text, which no other page has. Scoped to .legal so nothing else
 * on the site moves. Logical properties throughout, so the Arabic pages
 * indent and number from the right without a second set of rules.
 */
.legal {
  max-width: 820px;
  margin-inline: auto;
}

.legal-updated {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal-toc {
  margin: 0 0 32px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.legal-toc h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.legal-toc ol {
  margin: 0;
  padding-inline-start: 20px;
  columns: 2;
  column-gap: 32px;
}

.legal-toc li {
  margin: 4px 0;
  break-inside: avoid;
}

.legal a {
  color: var(--accent-ink);
}

.legal section {
  margin: 0 0 28px;
  scroll-margin-top: 96px;
}

.legal section h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.legal p,
.legal li {
  line-height: 1.8;
}

.legal p {
  margin: 0 0 12px;
}

.legal ul {
  margin: 0 0 12px;
  padding-inline-start: 22px;
}

.legal li {
  margin: 6px 0;
}

@media (max-width: 640px) {
  .legal-toc ol {
    columns: 1;
  }
}


/* ---- The Saudi Riyal symbol -------------------------------------------------
 * The glyph is Unicode U+20C1, and most devices cannot draw it yet, so it comes
 * from a font of its own — the same one the app uses, hosted here rather than
 * fetched from a third party the privacy policy does not name. Placed before
 * the figure in both languages, as the app places it, and sized to sit level
 * with the digits. */
@font-face {
  font-family: 'saudi_riyal';
  src: url('/assets/fonts/saudi_riyal.woff2') format('woff2'),
       url('/assets/fonts/saudi_riyal.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
.price-sar {
  direction: ltr;
  unicode-bidi: isolate;
}
.price-sar::before {
  content: '\e900';
  font-family: 'saudi_riyal' !important;
  font-size: 1.25em;
  font-weight: inherit;
  color: inherit;
  margin-inline-end: 0.3em;
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
}

/*
 * The dashboard slide: a small copy of the back office's own dashboard, its
 * colour-topped cards, revenue chart, payment methods and branch split, drawn
 * with the page's own tokens. Decorative (aria-hidden); the slide's text says
 * what it shows.
 */
.dash {
  padding: 16px;
  display: grid;
  gap: 10px;
  min-width: 0;
}
.dash .figure-head {
  margin-bottom: 2px;
  padding-bottom: 10px;
}
.dash .num {
  font-variant-numeric: tabular-nums;
}
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.dash-kpi,
.dash-card,
.dash-strip > div,
.dash-mini > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 0;
}
.dash-kpi {
  border-top: 3px solid var(--tone);
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}
.dash-kpi span,
.dash-strip span,
.dash-mini span {
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-muted);
}
.dash-kpi strong {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}
.dash-card {
  padding: 10px 12px;
}
.dash-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.dash-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
}
/* Time runs left to right in both languages, as on the dashboard itself. */
.dash-chart {
  display: block;
  width: 100%;
  height: 84px;
  direction: ltr;
  overflow: visible;
}
.dash-grid line {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}
.dash-area {
  fill: var(--accent-soft);
}
.dash-line {
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.dash-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dash-pay {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-donut {
  width: 64px;
  height: 64px;
  flex: none;
}
.dash-legend,
.dash-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.dash-legend li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.dash-legend li span:nth-child(2) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}
.dash-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.dash-bars {
  gap: 7px;
}
.dash-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 3px;
}
.dash-bar-label span:first-child {
  color: var(--text-muted);
}
.dash-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.dash-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1e7d45;
}
.dash-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr);
  gap: 8px;
}
.dash-strip > div,
.dash-mini > div {
  padding: 7px 10px;
  display: grid;
  gap: 1px;
  align-content: space-between;
}
.dash-strip strong,
.dash-mini strong {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.dash-strip .dash-net {
  border-top: 3px solid #1e7d45;
  background: var(--accent-soft);
}
.dash-net strong {
  font-size: 15px;
  font-weight: 800;
}
.dash-net em {
  font-style: normal;
  font-size: 10px;
  color: var(--accent-ink);
  font-weight: 700;
}
.dash-mini {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 560px) {
  .dash {
    padding: 12px;
  }
  .dash-kpis,
  .dash-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* A phone keeps the cards and both charts; the branch split and the
     small print would make the slide taller than the screen. */
  .dash-pair {
    grid-template-columns: 1fr;
  }
  .dash-pair > .dash-card + .dash-card,
  .dash-mini {
    display: none;
  }
}
