:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1d22;
  --muted: #5d606b;
  --line: #e7e4dc;
  --brand: #a8243a;
  --brand-ink: #ffffff;
  --accent: #e8a33d;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141518;
    --surface: #1c1d22;
    --text: #ecebe7;
    --muted: #a2a3aa;
    --line: #2c2e35;
    --brand: #f08391;
    --brand-ink: #1c1012;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
a { color: var(--brand); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 18px; }
.brand img { width: 32px; height: 32px; }
.top nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: 15px; }
.top nav a:hover { color: var(--text); }

/* Hero */
.hero { text-align: center; padding-top: 56px; padding-bottom: 40px; }
.hero .icon { width: 96px; height: 96px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.1; letter-spacing: -0.02em; margin: 20px 0 16px; }
.hero p.lede { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.downloads { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 220px; padding: 12px 22px; border-radius: 12px; text-decoration: none;
  font-weight: 600; font-size: 17px; line-height: 1.3; border: 1px solid transparent;
}
.btn small { font-weight: 400; font-size: 13px; opacity: 0.8; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--muted); }
.hero .note { color: var(--muted); font-size: 14px; margin-top: 16px; }
.hero .badge {
  display: table; margin: 20px auto 0; padding: 4px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text);
  font-size: 14px; font-weight: 600;
}
.hero .badge + h1 { margin-top: 14px; }
.hero .soon { color: var(--text); font-size: 15px; margin: 0 auto 12px; }

/* Phone-app waitlist */
.waitlist {
  margin: 28px auto 0; max-width: 520px; padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.waitlist-row { display: flex; gap: 8px; }
.waitlist-row input {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 14px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
}
.waitlist-row input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.waitlist-row .btn { min-width: 0; padding: 10px 20px; font-size: 16px; cursor: pointer; }
.waitlist-apps { display: flex; gap: 20px; justify-content: center; margin-top: 12px; font-size: 15px; }
.waitlist-apps label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.waitlist-apps input { accent-color: var(--brand); width: 16px; height: 16px; }
.waitlist .fine { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Demo card */
.demo {
  margin: 40px auto 0; max-width: 760px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; text-align: left; box-shadow: 0 20px 50px -30px rgba(60, 16, 24, 0.35);
}
.demo .original { font-size: 22px; line-height: 2; direction: rtl; text-align: right; margin: 0; }
.demo mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }
.demo .bubble {
  margin-top: 18px; border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; color: var(--text);
}
.demo .bubble b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* Sections */
section { padding: 56px 0; }
section h2 { font-size: clamp(26px, 3.6vw, 34px); letter-spacing: -0.01em; text-align: center; margin: 0 0 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.plain { max-width: 680px; margin: 0 auto; }
.plain p, .plain li { color: var(--muted); }
.plain li { margin-bottom: 8px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: var(--muted); margin-right: 16px; }

/* Legal pages */
.doc { max-width: 760px; margin: 0 auto; padding-top: 24px; padding-bottom: 64px; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); margin: 16px 0 4px; }
.doc .updated { color: var(--muted); margin-top: 0; }
.doc h2 { font-size: 21px; margin: 36px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc li { margin-bottom: 6px; }

@media (max-width: 560px) {
  .top nav a { margin-left: 14px; }
  .top nav a.wide { display: none; }
  .btn { width: 100%; }
  .waitlist-row { flex-direction: column; }
  .waitlist-row .btn { width: 100%; }
  .demo { padding: 20px; }
}

/* Language pages, such as /urdu: rendered by the server from the admin portal (apps/server/src/pages.rs) */
.demo .original.ltr { direction: ltr; text-align: left; }
/* Urdu is read in Nastaliq; Apple devices and Windows 11 have a Nastaliq font built in. */
.demo :lang(ur) { font-family: "Noto Nastaliq Urdu", "Urdu Typesetting", "Jameel Noori Nastaleeq", serif; }
.demo .original:lang(ur) { line-height: 2.4; }
.demo .bubble + .bubble { margin-top: 12px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 auto; max-width: 680px; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 18px 20px 18px 64px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 18px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 650; font-size: 15px; }
.steps li b { color: var(--text); display: block; margin-bottom: 2px; }
.starter { text-align: center; }
.starter p { color: var(--muted); max-width: 600px; margin: 0 auto 20px; }
.others { text-align: center; color: var(--muted); font-size: 15px; }
