/* awraaq.app: the same colours and type as the app (server/web/app/globals.css). */
/* Fonts served from this site (the same files the app uses): nothing is fetched from elsewhere. */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin.woff2) format("woff2"); unicode-range: U+00??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext.woff2) format("woff2"); unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Nastaliq Urdu"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/nastaliq-arabic.woff2) format("woff2"); unicode-range: U+06??, U+750-77F, U+870-891, U+897-8E1, U+8E3-8FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --bg: #ffffff;
  --fg: #18181b;
  --surface: #fafaf9;
  --line: #e4e4e1;
  --line-strong: #d4d4d0;
  --muted: #52525b;
  --subtle: #63636b;
  --brand: #4f46e5;
  --brand-fg: #ffffff;
  --brand-soft: #f1f0ff;
  --brand-soft-fg: #3730a3;
  --danger: #b42318;
  --ok: #067647;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18181b;
    --fg: #f4f4f5;
    --surface: #1f1f23;
    --line: #2e2e34;
    --line-strong: #3f3f46;
    --muted: #b4b4bc;
    --subtle: #a1a1aa;
    --brand: #8b87ff;
    --brand-fg: #16142e;
    --brand-soft: #25234a;
    --brand-soft-fg: #e0deff;
    --danger: #f97066;
    --ok: #47cd89;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 Inter, "Noto Nastaliq Urdu", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.nav a:hover { color: var(--fg); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--fg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn-primary { background: var(--brand); color: var(--brand-fg); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 90%, black); }
.btn-secondary { background: var(--bg); border-color: var(--line-strong); color: var(--fg); }
.btn-secondary:hover { background: var(--surface); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* Hero */
.hero { padding-top: 72px; padding-bottom: 56px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--brand-soft-fg); background: var(--brand-soft); padding: 4px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.08; letter-spacing: -0.03em; margin: 20px auto 18px; max-width: 14ch; text-wrap: balance; }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 40rem; margin: 0 auto; text-wrap: balance; }
.hero .actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 32px; }

/* Waitlist */
.waitlist { display: flex; gap: 8px; max-width: 460px; margin: 32px auto 0; }
.waitlist input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--fg); font: inherit; font-size: 15px; }
.waitlist .btn { height: 44px; }
.form-note { font-size: 13px; color: var(--subtle); margin: 10px 0 0; min-height: 1.6em; }
.form-note.ok { color: var(--ok); }
.form-note.err { color: var(--danger); }

/* Sections */
section { padding: 56px 0; }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 36px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; }
.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.card h3 { font-size: 16px; margin: 12px 0 6px; }
.card p { font-size: 14.5px; color: var(--muted); margin: 0; }
.icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Script showcase: the library is not only in Latin script */
.script { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; color: var(--muted); }
.ticks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Platforms */
.platforms { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.platform { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--bg); }
.platform b { display: block; font-size: 15px; }
.platform span { font-size: 13.5px; color: var(--muted); }

/* Closing call */
.cta { text-align: center; }
.cta .box { border: 1px solid var(--line); border-radius: 20px; padding: 44px 24px; background: linear-gradient(180deg, var(--brand-soft), var(--bg)); }
.cta h2 { font-size: clamp(26px, 3.6vw, 34px); letter-spacing: -0.02em; margin: 0 0 8px; }
.cta p { color: var(--muted); margin: 0; }

/* Help */
.page-head { padding: 48px 0 24px; }
.page-head h1 { font-size: clamp(30px, 4.5vw, 42px); letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 10px; }
.page-head p { color: var(--muted); margin: 0; font-size: 17px; }
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--fg); text-decoration: underline; }
.topics { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); padding-bottom: 56px; }
.topic { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.topic:hover { border-color: var(--brand); }
.topic b { display: block; font-size: 16px; margin-bottom: 4px; }
.topic span { font-size: 14.5px; color: var(--muted); }
.article { padding-bottom: 64px; }
.article h2 { font-size: 22px; letter-spacing: -0.01em; margin: 36px 0 8px; }
.article h3 { font-size: 17px; margin: 24px 0 6px; }
.article p, .article li { color: var(--muted); }
.article li { margin: 4px 0; }
.article strong { color: var(--fg); }
.article .tip { border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--surface); border-radius: 10px; padding: 12px 16px; margin: 20px 0; }
.article .tip p { margin: 0; }
.next { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; font-size: 15px; }
.next a { text-decoration: none; color: var(--brand); font-weight: 600; }

/* Foot */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--subtle); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.foot nav { display: flex; gap: 18px; margin-left: auto; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); }

/* The script section's picture: a mixed library and a highlight, drawn the way the app draws them */
.demo { position: relative; display: grid; gap: 14px; }
.demo-card { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); box-shadow: 0 10px 30px -18px rgb(0 0 0 / 0.35); overflow: hidden; }
.demo-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.demo-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.demo-bar b { margin-left: 8px; font-weight: 600; }
.demo-head, .demo-row { display: grid; grid-template-columns: 1.6fr 1fr 74px; gap: 12px; align-items: center; padding: 0 14px; }
.demo-head { font-size: 12px; font-weight: 600; color: var(--subtle); padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.demo-row { padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.demo-row:last-child { border-bottom: 0; }
.demo-row .t { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.demo-row .t > span, .demo-row .a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-row .a { color: var(--muted); font-size: 13px; }
/* As in the app: a right-to-left title or author starts at its column's start, not its far end. */
.demo-row [dir="rtl"] { text-align: left; }
.demo [lang="ur"], .demo [lang="fa"] { font-family: "Noto Nastaliq Urdu", serif; line-height: 2.1; }
.demo [lang="ar"] { font-family: "Geeza Pro", "Segoe UI", "Noto Naskh Arabic", "Arabic Typesetting", serif; }
.mini { flex: none; width: 26px; height: 38px; border-radius: 3px; display: flex; align-items: center; justify-content: center; text-align: center; font-style: normal; font-size: 6px; line-height: 1.4 !important; font-weight: 600; padding: 2px; color: #fff; overflow: hidden; overflow-wrap: anywhere; hyphens: auto; }
.c1 { background: #7c3aed; } .c2 { background: #0f766e; } .c3 { background: #b45309; } .c4 { background: #be123c; }
.chip { justify-self: start; font-size: 11.5px; font-weight: 600; color: var(--brand-soft-fg); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; }
.demo-mark { display: flex; gap: 14px; padding: 16px 18px; margin-left: 32px; }
.mark-bar { flex: none; width: 4px; border-radius: 4px; background: #ffeb3b; }
.couplet { margin: 0; font-size: 17px; line-height: 2.3; text-align: right; }
.couplet mark { background: color-mix(in srgb, #ffeb3b 55%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.demo-mark .note { margin: 6px 0 0; font-size: 14px; color: var(--muted); background: var(--surface); border-radius: 8px; padding: 6px 10px; }
.demo-mark .meta { margin: 6px 0 0; font-size: 12px; color: var(--subtle); }
.demo-mark .meta [lang="ur"] { line-height: 1.6; }

@media (max-width: 720px) {
  .demo-mark { margin-left: 0; }
  .demo-head, .demo-row { grid-template-columns: 1.5fr 1fr; }
  .demo-head span:last-child, .demo-row .chip { display: none; }
  .nav a.hide-sm { display: none; }
  .hero { padding-top: 48px; padding-bottom: 40px; }
  .waitlist { flex-direction: column; }
  .waitlist input { flex: none; }
  .script { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  .foot nav { margin-left: 0; }
}

/* Help: topic list beside the guide on wide screens */
.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.help-main { max-width: 720px; min-width: 0; }
.help-nav { position: sticky; top: 84px; padding-top: 48px; font-size: 14px; }
.help-nav .help-home { display: block; font-weight: 600; text-decoration: none; margin-bottom: 10px; }
.help-nav ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.help-nav li a { display: block; padding: 6px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.help-nav li a:hover { color: var(--fg); }
.help-nav li a[aria-current="page"] { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.toc { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 4px 0 8px; font-size: 14px; }
.toc b { display: block; margin-bottom: 6px; font-size: 13px; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.04em; }
.toc ul { margin: 0; padding-left: 18px; columns: 2; column-gap: 24px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }
.article h2 { scroll-margin-top: 80px; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); font: 600 12.5px/1.6 Inter, system-ui, sans-serif; color: var(--fg); text-align: center; }
.keys { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: 15px; }
.keys td { padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.keys td:first-child { width: 42%; white-space: nowrap; padding-right: 16px; }
.help-search { position: relative; display: block; margin-top: 22px; }
.help-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--subtle); stroke-width: 2; stroke-linecap: round; }
.help-search input { width: 100%; height: 48px; padding: 0 16px 0 42px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--fg); font: inherit; font-size: 16px; }
.results { display: grid; gap: 12px; padding-bottom: 56px; }
.results mark { background: var(--brand-soft); color: var(--brand-soft-fg); border-radius: 3px; padding: 0 2px; }
.results .none { color: var(--muted); }
@media (max-width: 900px) {
  .help-layout { grid-template-columns: 1fr; gap: 0; }
  .help-nav { display: none; }
  .toc ul { columns: 1; }
}

/* Skip link, FAQ and the 404 page */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--brand); color: var(--brand-fg); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { left: 12px; }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; background: var(--bg); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--subtle); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.faq-more { text-align: center; color: var(--muted); margin: 20px 0 0; }
.faq-more a, .article a { color: var(--brand); }
.notfound { padding: 96px 20px; text-align: center; }
.notfound h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.02em; margin: 0 0 10px; }
.notfound p { color: var(--muted); }
.notfound .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.section-head.start { text-align: left; margin: 0; }
.cta-action { margin-top: 22px; }
.platform .soon { display: table; margin-top: 10px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-style: normal; font-weight: 600; color: var(--muted); background: var(--line); }
