:root {
  --bg: #0E1330;
  --card: #161C42;
  --line: #262D58;
  --border: #343B66;
  --grid: #2A3160;
  --dash: #4A5288;
  --dash-2: #6A72A8;
  --muted: #A9B0D0;
  --soft: #C9CEE8;
  --amber: #F2B263;
  --amber-hi: #FFD08F;
  --amber-ink: #1A1405;
  --body: Inter, system-ui, sans-serif;
  --display: 'Space Grotesk', Inter, system-ui, sans-serif;
  --track: -0.02em;
  --track-tight: -0.03em;
  --caps: 0.08em;
}
:lang(ar), :lang(ur) {
  --body: 'Noto Sans Arabic', system-ui, sans-serif;
  --display: 'Noto Sans Arabic', system-ui, sans-serif;
  --track: 0;
  --track-tight: 0;
  --caps: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: #fff; font-family: var(--body); font-size: 15px; line-height: 1.4; }
h1, h2, p { margin: 0; }
a { color: var(--amber); }
a:hover { color: var(--amber-hi); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
[dir='rtl'] .flip { transform: scaleX(-1); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* layout helpers */
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.baseline { align-items: baseline; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 320px; }
.push { margin-top: auto; }
.stack-2, .stack-4, .stack-6, .stack-8, .stack-10, .stack-12, .stack-24 { display: flex; flex-direction: column; }
.stack-2 { gap: 2px; } .stack-4 { gap: 4px; } .stack-6 { gap: 6px; } .stack-8 { gap: 8px; }
.stack-10 { gap: 10px; } .stack-12 { gap: 12px; } .stack-24 { gap: 24px; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-2.gap-8 { gap: 8px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.grid-10 { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.w-44 { width: 44px; flex: none; }

/* type */
.brand { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: var(--track); }
.brand.lg { font-size: 24px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: var(--caps); text-transform: uppercase; color: var(--muted); }
.label { font-size: 12px; color: var(--muted); }
.sub { font-size: 15px; color: var(--soft); }
.small { font-size: 14px; }
.lh { line-height: 1.45; }
.soft { color: var(--soft); }
.muted { color: var(--muted); }
.amber { color: var(--amber); }
.strong { font-weight: 600; }
.today { margin-top: 6px; }
.today-num { font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--amber); margin-inline-end: 2px; }
.site .today-num { font-size: 32px; }
[data-count] { font-variant-numeric: tabular-nums; }
.note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.num-xl, .num-md, .num-36, .num-hero, .h-17, .h-20, .h-22, .h-24, .h-30, .h-34 { font-family: var(--display); }
.num-xl { font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: var(--track-tight); }
.num-md { font-weight: 600; font-size: 24px; }
.num-36 { font-weight: 700; font-size: 36px; }
.num-hero { font-weight: 700; font-size: clamp(44px, 6vw, 68px); line-height: 1; letter-spacing: var(--track-tight); }
.h-17 { font-weight: 600; font-size: 17px; line-height: 1.3; }
.h-20 { font-weight: 600; font-size: 20px; }
.h-22 { font-weight: 600; font-size: 22px; }
.h-24 { font-weight: 700; font-size: 24px; }
.h-30 { font-weight: 700; font-size: 30px; line-height: 1.1; letter-spacing: var(--track); }
.h-34 { font-weight: 700; font-size: 34px; line-height: 1.1; letter-spacing: var(--track); }

/* surfaces and controls */
.card { background: var(--card); border-radius: 20px; }
.pad-16 { padding: 16px; }
.pad-20 { padding: 20px; }
.dashed { border: 1px dashed var(--dash); border-radius: 16px; padding: 16px; }
.live { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--amber); }
.live.caps { gap: 8px; font-size: 13px; letter-spacing: var(--caps); text-transform: uppercase; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--amber); flex: none; }
.map { width: 100%; height: auto; display: block; direction: ltr; font-family: var(--body); }

.pill { height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--border); background: transparent; color: var(--soft); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; }
.lang { position: relative; cursor: pointer; }
.lang select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.lang:focus-within { outline: 2px solid #fff; outline-offset: 2px; }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; border: none; text-decoration: none; text-align: center; }
.btn.primary { background: var(--amber); color: var(--amber-ink); font-family: var(--display); font-weight: 700; }
.btn.primary:hover { background: var(--amber-hi); color: var(--amber-ink); }
.btn.primary:disabled { background: var(--grid); color: var(--soft); }
.btn.xl { min-height: 64px; border-radius: 32px; font-size: 19px; padding: 8px 20px; }
.btn.lg { min-height: 60px; border-radius: 30px; font-size: 18px; padding: 8px 32px; }
.btn.md { min-height: 56px; border-radius: 28px; font-size: 17px; padding: 8px 20px; }
.btn.sm { min-height: 48px; border-radius: 24px; font-size: 15px; padding: 6px 20px; }
.btn.sm.wide { min-height: 52px; border-radius: 26px; padding: 6px 26px; font-size: 16px; }
.btn.outline { min-height: 44px; border-radius: 24px; border: 1px solid var(--border); background: transparent; color: #fff; font-weight: 600; font-size: 15px; padding: 6px 18px; }
.btn.outline:hover { border-color: var(--dash-2); color: #fff; }
.btn.outline.sm.wide { border-color: var(--dash); font-family: var(--body); }
.btn.quiet { color: var(--soft); min-height: 48px; }
.btn.fit { flex: none; }
.btn.start { justify-content: flex-start; min-height: 48px; border-radius: 12px; padding: 6px 14px; font-weight: 500; font-size: 16px; text-align: start; }
.link { background: none; border: none; padding: 0; min-height: 24px; color: var(--amber); font-weight: 600; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.link.muted { color: var(--muted); font-weight: 500; }
.link.plain { color: inherit; font-weight: inherit; text-decoration: none; text-align: start; }
.link.plain:hover { text-decoration: underline; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--soft); flex: none; }

input, select { width: 100%; min-width: 0; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: #fff; font-size: 16px; }
input::placeholder { color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }

.bar { height: 10px; border-radius: 5px; background: var(--grid); overflow: hidden; }
.bar > div { height: 100%; background: var(--amber); border-radius: 5px; }

/* pages: one column on a phone, wider with two columns on a desktop */
.page { max-width: 520px; min-height: 100dvh; margin: 0 auto; padding: 0 24px 20px; display: flex; flex-direction: column; gap: 16px; }
.content { flex: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.content.center-all { align-items: center; justify-content: center; text-align: center; }
.content.narrow { width: 100%; max-width: 560px; margin-inline: auto; }
.cols, .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.page .site-head { padding-top: 16px; }
.page .nav-link { display: none; }
.lang-full { display: none; }
a.brand, a.brand:hover { color: #fff; text-decoration: none; }
@media (min-width: 860px) {
  .page { max-width: 1120px; padding-bottom: 48px; gap: 40px; }
  .page .site-head { padding-top: 20px; }
  .page .nav-link { display: flex; }
  .page .tabs { display: none; }
  .lang-short { display: none; }
  .lang-full { display: inline; }
  .content { gap: 28px; }
  .content.narrow { flex: none; }
  .cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .col { gap: 24px; }
  .content .h-30, .content .h-34 { font-size: 48px; letter-spacing: var(--track-tight); }
  .content .sub.small, .content .sub { font-size: 17px; }
  .content .card.pad-16, .content .card.pad-20 { padding: 28px; }
  .content .grid-10 { gap: 12px; }
  .content .h-22 { font-size: 26px; }
  .content .eyebrow { font-size: 13px; }
}
.tile { padding: 14px; border-radius: 16px; display: flex; flex-direction: column; gap: 4px; border: none; text-align: start; color: #fff; min-width: 0; }
button.tile:hover { background: #1B2250; }
.tabs { margin-top: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.tabs a { height: 44px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; color: var(--soft); text-decoration: none; }
.tabs a.on { font-weight: 600; color: var(--amber); }

.relay { display: flex; flex-direction: column; }
.stop { display: flex; align-items: center; gap: 14px; }
.pin { flex: none; width: 14px; height: 14px; border-radius: 50%; margin: 0 6px; }
.pin.from { background: var(--amber); }
.pin.to { border: 2px solid #8C94C2; }
.pin.you { width: 26px; height: 26px; margin: 0; background: #fff; border: 4px solid var(--amber); }
.link-line { width: 2px; height: 18px; background: var(--dash); margin-inline-start: 12px; }
.link-line.lit { background: var(--amber); }

.day { display: block; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--dash); }
.day.kept { background: var(--amber); border-color: var(--amber); }
.day.now { background: #fff; border: 3px solid var(--amber); }

.member { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.member .label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 48px; height: 48px; border-radius: 24px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 16px; border: 2px dashed var(--dash-2); color: var(--soft); }
.avatar.up { background: var(--amber); border: none; color: var(--amber-ink); }

.kid { min-height: 44px; border-radius: 12px; font-size: 15px; font-weight: 600; text-align: start; padding: 0 14px; display: flex; align-items: center; gap: 8px; border: 1px dashed var(--dash-2); background: transparent; color: var(--soft); min-width: 0; }
.kid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kid.here { border: 1px solid var(--amber); background: var(--amber); color: var(--amber-ink); }

/* website */
.site { max-width: 1120px; margin: 0 auto; padding: 0 24px 40px; display: flex; flex-direction: column; gap: 56px; }
.site h1 { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: var(--track-tight); }
.site h2 { font-family: var(--display); font-weight: 700; font-size: 32px; letter-spacing: var(--track); }
.site h2.tight { line-height: 1.15; }
.site .sub { font-size: 16px; }
.site .sub.small, .site .note { font-size: 14px; }
.site-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 20px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.site-nav a { height: 44px; padding: 0 14px; display: flex; align-items: center; color: var(--soft); font-size: 15px; font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: #fff; }
.site-nav a.on { color: var(--amber); font-weight: 600; }
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hero-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.lede { font-size: 18px; line-height: 1.5; color: var(--soft); max-width: 30em; }
.hero-map { flex: 1 1 460px; min-width: 0; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 16px; }
.stat { flex: 1 1 220px; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.stat.gap-10 { gap: 10px; }
.steps { display: flex; flex-wrap: wrap; gap: 16px; }
.step { flex: 1 1 240px; border: 1px solid var(--grid); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.step-t { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--amber); }
.step-b { font-size: 16px; line-height: 1.5; color: var(--soft); }
.dev { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--soft); text-decoration: none; }
.dev:hover { color: var(--amber); }
.dev strong { color: var(--amber); font-weight: 600; }
.dev svg { flex: none; }
.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; font-size: 14px; line-height: 1.5; color: var(--muted); }
#how, #trust, #circle { scroll-margin-top: 20px; }
@media (max-width: 520px) {
  .site { gap: 40px; }
}

/* printable sheets */
.sheet { background: #fff; color: #0E1330; border-radius: 16px; padding: 28px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; border: 6px double var(--amber); }
.sheet-brand { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: var(--track); }
.sheet-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: var(--caps); text-transform: uppercase; color: #5A4210; }
.sheet-name { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.1; letter-spacing: var(--track); }
.sheet-text { font-size: 16px; line-height: 1.5; color: #2A3160; max-width: 28em; }
.sheet-foot { font-family: var(--display); font-weight: 600; font-size: 16px; margin-top: 8px; }
.sheet-dots { display: flex; gap: 10px; margin: 8px 0; }
.sheet-dots span { width: 22px; height: 22px; border-radius: 50%; background: var(--amber); }
.sheet-dots span:last-child { background: #fff; border: 4px solid var(--amber); }
.poster { padding: 48px 28px; gap: 18px; }
.poster .sheet-name { font-size: 40px; }

/* dialog and toast */
dialog { width: min(420px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 32px)); padding: 20px; border: 1px solid var(--border); border-radius: 20px; background: var(--card); color: #fff; }
dialog[open] { display: flex; flex-direction: column; gap: 12px; }
dialog::backdrop { background: rgba(6, 9, 26, 0.7); }
.city-list { overflow-y: auto; display: flex; flex-direction: column; min-height: 240px; margin: 0 -8px; }
.city-list .note { padding: 8px; }
.city-list button { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 0 8px; border: none; border-radius: 10px; background: transparent; color: #fff; font-size: 15px; text-align: start; flex: none; }
.city-list button:hover { background: var(--grid); }
.city-list button.on { color: var(--amber); font-weight: 600; }
#toast { position: fixed; inset-inline: 16px; bottom: 20px; margin: 0 auto; max-width: 400px; padding: 14px 18px; border-radius: 14px; background: #fff; color: #0E1330; font-size: 14px; font-weight: 500; text-align: center; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 10; overflow-wrap: anywhere; }
#toast.show { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  #toast { transition: none; }
}

@media print {
  html, body { background: #fff; }
  .no-print, #toast, dialog { display: none !important; }
  .page { max-width: none; min-height: 0; padding: 0; display: block; }
  .cols { display: block; }
  .sheet { border-radius: 0; min-height: 90vh; justify-content: center; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sheet-name { font-size: 56px; }
  .sheet-text { font-size: 20px; }
}
