:root {
  --ink: #121212;
  /* The accent fills; text, icons and outlines on the ink take
     --accent-on-ink, and text on an accent fill --on-accent. */
  --accent: #F9A929;
  --accent-on-ink: #F9A929;
  --on-accent: #121212;
  --soft: #FEF1DD;
  --text-muted: #5e5e5e;
  --text-secondary: #4a4a4a;
  --on-ink-muted: rgba(255, 255, 255, 0.72);
  --on-ink-fill: rgba(255, 255, 255, 0.08);
  --backdrop: #F4F3EF;
  --disabled-fill: #E4E2DC;
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--backdrop);
  color: var(--ink);
  font-family: Cairo, system-ui, sans-serif;
}

p,
h1,
h2 {
  margin: 0;
}

.page {
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  padding: max(22px, env(safe-area-inset-top)) 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero__logo {
  position: absolute;
  width: 300px;
  height: 338px;
  inset-inline-end: -110px;
  top: -30px;
  opacity: 0.07;
  object-fit: contain;
  pointer-events: none;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.brand__text,
.invite__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__name {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.brand__tagline {
  font-size: 13px;
  color: var(--on-ink-muted);
}

.invite {
  position: relative;
  background: var(--on-ink-fill);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.invite__tile {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.invite__tile--group {
  background: var(--accent);
  color: var(--on-accent);
}

.invite__crest {
  width: 44px;
  height: 50px;
  object-fit: contain;
}

.invite__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invite__initials {
  font-family: Anton, Cairo, sans-serif;
  font-size: 22px;
}

.invite__kicker,
.invite__meta {
  font-size: 12px;
  color: var(--on-ink-muted);
}

.invite__meta:empty {
  display: none;
}

.invite__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.shared {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shared__caption {
  font-size: 15px;
  font-weight: 800;
}

.shared__image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store {
  min-height: 54px;
  padding: 0 20px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--accent-on-ink);
  text-decoration: none;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.store svg {
  flex-shrink: 0;
}

.store:focus-visible,
.other a:focus-visible,
.languages a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.other {
  display: none;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.other a {
  color: var(--ink);
  font-weight: 800;
}

[data-platform="ios"] .store--android,
[data-platform="android"] .store--ios {
  display: none;
}

[data-platform="ios"] .other--android,
[data-platform="android"] .other--ios {
  display: block;
}

.store--disabled {
  background: var(--disabled-fill);
  color: var(--text-muted);
  cursor: default;
}

.store-pending {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-pending__note {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

/* A store that doesn't list the app yet greys its button and says why:
   pending, the store is reviewing it; soon, it's on its way. */
:root:not([data-app-store="live"]) .store--ios.store--live,
:root:not([data-app-store="live"]) .other__link,
[data-app-store="live"] .store-pending.store--ios,
[data-app-store="live"] .other__pending,
:root:not([data-app-store="soon"]) .store--ios .store-pending__note--soon,
[data-app-store="soon"] .store--ios .store-pending__note--pending,
[data-google-play="soon"] .store--android.store--live,
[data-google-play="live"] .store-pending.store--android {
  display: none;
}

/* "On iPhone? Coming soon" would only repeat the greyed button. */
[data-app-store="soon"] .other--ios,
[data-google-play="soon"] .other--android {
  display: none;
}

/* A computer shows both buttons: one "coming soon" under the last is enough. */
[data-platform="desktop"][data-google-play="soon"] .store--ios .store-pending__note--soon {
  display: none;
}

/* The app in a browser: first where no store can install it yet (and on a
   computer, the phones' stores under it), a line under the store otherwise. */
.web-primary,
.web-phones,
.other__web {
  display: none;
}

.web-primary {
  flex-direction: column;
  gap: 12px;
}

.web-note,
.web-phones {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.web-note {
  margin-bottom: 6px;
  line-height: 1.5;
}

[data-web-app="on"][data-platform="desktop"] .web-primary,
[data-web-app="on"][data-platform="ios"]:not([data-app-store="live"]) .web-primary,
[data-web-app="on"][data-platform="android"]:not([data-google-play="live"]) .web-primary {
  display: flex;
}

[data-web-app="on"][data-platform="desktop"] .web-phones,
[data-web-app="on"][data-platform="ios"][data-app-store="live"] .other--web,
[data-web-app="on"][data-platform="android"][data-google-play="live"] .other--web {
  display: block;
}

[data-web-app="on"]:not([data-app-store="live"]) .other__web {
  display: inline;
}

/* "Until the iPhone app is out" only speaks to an iPhone; a group's note
   speaks to everyone. */
:root:not([data-platform="ios"]):not([data-variant="group"]) .web-note {
  display: none;
}

.features-title {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Letter-spacing breaks the joins of Arabic script. */
[dir="rtl"] .features-title {
  letter-spacing: 0;
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}

.feature__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer {
  margin-top: auto;
  padding: 8px 20px max(16px, env(safe-area-inset-bottom));
}

.languages {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
}

.languages a {
  min-height: 44px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
}

.languages a[aria-current="true"] {
  color: var(--ink);
  font-weight: 800;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 16px;
  font-size: 13px;
}

.legal-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  text-underline-offset: 3px;
}

.legal-links a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.legal-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #fff;
}

.legal-header {
  background: var(--ink);
  color: #fff;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.legal-brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
}

.legal-brand__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.legal-brand:focus-visible,
.languages--on-ink a:focus-visible {
  outline: 3px solid var(--accent-on-ink);
  outline-offset: 3px;
}

.languages--on-ink a {
  color: var(--on-ink-muted);
}

.languages--on-ink a[aria-current="true"] {
  color: var(--accent-on-ink);
}

.legal-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px max(40px, env(safe-area-inset-bottom));
}

/* Every language's article ships in the page; legal.js sets data-language
   on <html> before the body renders, and only that article shows. */
.legal-doc {
  display: none;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
}

html:not([data-language]) .legal-doc--default,
html[data-language="fr"] .legal-doc[lang="fr"],
html[data-language="ar"] .legal-doc[lang="ar"],
html[data-language="en"] .legal-doc[lang="en"] {
  display: block;
}

.legal-doc h1 {
  color: var(--ink);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
}

.legal-doc h2 {
  margin-top: 36px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
}

.legal-doc h3 {
  margin: 22px 0 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.legal-doc p,
.legal-doc ul,
.legal-doc ol {
  margin: 10px 0 0;
}

.legal-doc ul,
.legal-doc ol {
  padding-inline-start: 22px;
}

.legal-doc li + li {
  margin-top: 6px;
}

.legal-doc strong {
  color: var(--ink);
  font-weight: 700;
}

.legal-doc a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-doc a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: 2px;
}

.legal-doc .legal-doc__updated {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.legal-doc .legal-lead {
  margin-top: 20px;
  font-size: 18px;
  color: var(--ink);
}

.legal-summary {
  margin-top: 24px;
  padding: 4px 20px 20px;
  border-radius: 18px;
  background: var(--soft);
}

.legal-doc .legal-summary h2 {
  margin-top: 16px;
}

.legal-doc__links {
  margin-top: 44px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  font-size: 14px;
}

.legal-doc .legal-doc__links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
