/* Doqmah · legal documents (privacy policies, terms).
 *
 * Loaded after style.css, which supplies the tokens, the font and the reset.
 * Everything here is written with logical properties, so one file serves the
 * Arabic page (rtl) and the English one (ltr) without a mirrored copy.
 *
 * No inline <style> or style="" on these pages: the site's CSP allows exactly
 * one inline style hash, and that one belongs to 404.html.
 */

.doc {
  padding-block: clamp(28px, 6vw, 56px) clamp(48px, 9vw, 96px);
}

/* ---- masthead ---------------------------------------------------------- */

.doc__mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block-end: 20px;
  border-block-end: 1px solid var(--stone);
}

.doc__home {
  display: inline-flex;
  border-radius: 6px;
}

.doc__home img {
  display: block;
  block-size: auto;
  inline-size: clamp(104px, 20vw, 132px);
}

.doc__back {
  color: var(--red-text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-block-end: 1px solid transparent;
}

.doc__back:hover,
.doc__back:focus-visible {
  border-block-end-color: currentColor;
}

/* ---- title ------------------------------------------------------------- */

.doc__head {
  margin-block-start: clamp(28px, 5vw, 48px);
}

.doc__kicker {
  color: var(--graphite);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.doc__title {
  margin-block-start: 6px;
  font-size: clamp(1.75rem, 5.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.25;
}

.doc__dates {
  margin-block-start: 14px;
  color: var(--graphite);
  font-size: 0.875rem;
}

/* ---- the headline claim ------------------------------------------------ */

.doc__lede {
  margin-block-start: clamp(24px, 4vw, 36px);
  padding: clamp(18px, 3.5vw, 26px);
  background: var(--plaster);
  border: 1px solid var(--stone);
  border-radius: 14px;
  border-inline-start: 4px solid var(--lamp);
}

.doc__lede p {
  font-size: clamp(1.0625rem, 2.6vw, 1.1875rem);
  font-weight: 500;
}

.doc__lede p + p {
  margin-block-start: 10px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--graphite);
}

/* ---- body -------------------------------------------------------------- */

.doc__body {
  max-inline-size: 68ch;
}

.doc__body section {
  margin-block-start: clamp(32px, 5vw, 44px);
}

.doc__body h2 {
  font-size: clamp(1.125rem, 3vw, 1.3125rem);
  font-weight: 600;
  line-height: 1.4;
}

.doc__body h2::before {
  content: counter(doc-section) ".";
  /* isolate: without it the bidi algorithm throws the dot to the far side in rtl */
  display: inline-block;
  unicode-bidi: isolate;
  margin-inline-end: 10px;
  color: var(--lamp);
  font-weight: 500;
}

/* Arabic-Indic digits on the Arabic page, to match the rest of the site */
html:lang(ar) .doc__body h2::before {
  content: counter(doc-section, arabic-indic) ".";
}

.doc__body {
  counter-reset: doc-section;
}

.doc__body section {
  counter-increment: doc-section;
}

.doc__body p,
.doc__body ul {
  margin-block-start: 14px;
}

.doc__body ul {
  padding-inline-start: 1.25em;
}

.doc__body li + li {
  margin-block-start: 8px;
}

.doc__body li::marker {
  color: var(--stone);
}

.doc__body strong {
  font-weight: 600;
}

.doc__body a {
  color: var(--red-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* A short label + value pair, used for what the app stores on the device. */
.doc__pairs {
  margin-block-start: 16px;
  display: grid;
  gap: 1px;
  background: var(--stone);
  border: 1px solid var(--stone);
  border-radius: 12px;
  overflow: hidden;
}

.doc__pair {
  /* the shared reset zeroes h1–h3/p/ul/ol but not dl, whose default block margin
     would otherwise show through as a wide stripe of the grid's background */
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 12em) minmax(0, 1fr);
  gap: 2px 18px;
  padding: 14px 16px;
  background: var(--porcelain);
  font-size: 0.9375rem;
}

.doc__pair dt {
  font-weight: 500;
}

.doc__pair dd {
  margin: 0;
  color: var(--graphite);
}

@media (max-width: 520px) {
  .doc__pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A calm note for something the reader may misread as data collection. */
.doc__note {
  margin-block-start: 16px;
  padding: 14px 16px;
  background: var(--porcelain);
  border: 1px dashed var(--stone);
  border-radius: 12px;
  font-size: 0.9375rem;
  color: var(--graphite);
}

/* ---- sign-off ---------------------------------------------------------- */

.doc__signoff {
  margin-block-start: clamp(40px, 7vw, 64px);
  padding-block-start: 24px;
  border-block-start: 1px solid var(--stone);
  font-size: 0.9375rem;
  color: var(--graphite);
}

.doc__signoff a {
  color: var(--red-text);
}

.doc__signoff p + p {
  margin-block-start: 8px;
}

.doc__lang {
  margin-block-start: 18px;
}
