@font-face { font-family: 'Instrument Serif'; src: url('/static/fonts/InstrumentSerif-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/static/fonts/InstrumentSerif-Italic.ttf') format('truetype'); font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/Inter-Variable.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/static/fonts/IBMPlexMono-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Amiri Quran'; src: url('/static/fonts/AmiriQuran-Regular.ttf') format('truetype'); font-display: swap; }

:root { --sage:#cdd5cb; --ink:#1d2117; --ink2:#3c4236; --ink3:#5d6555; --lime:#d6f06b; --card:rgba(255,255,255,.4); --cardb:rgba(255,255,255,.6); --line:rgba(29,33,23,.14);
  --serif:'Instrument Serif',Georgia,serif; --sans:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif; --mono:'IBM Plex Mono',ui-monospace,Menlo,monospace; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--sage); color: var(--ink); font-family: var(--sans); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; line-height: 1.02; }
h1 { font-size: clamp(46px, 7vw, 84px); margin: 16px 0 18px; }
h2 { font-size: clamp(34px, 5vw, 54px); margin: 10px 0 22px; }
h3 { font-size: 26px; margin-bottom: 6px; }
em { font-style: italic; }
.lead { font-size: 18px; color: var(--ink2); max-width: 560px; }
section { padding: 56px 20px; }
section.wrap { padding: 64px 20px 8px; }
section.wrap + section.wrap { border-top: 1px solid var(--line); margin-top: 48px; }
.label + h2 { margin-top: 12px; }

nav.top { position: sticky; top: 0; z-index: 10; background: rgba(205,213,203,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
nav.top .row { height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; font-weight: 500; }
.dot { width: 10px; height: 10px; background: var(--lime); border: 1px solid var(--ink); display: inline-block; }
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 13px 22px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--ink); }
.pill.small { padding: 9px 16px; font-size: 11px; }
.pill.lime { background: var(--lime); }

.hero { padding: 56px 0 30px; overflow: hidden; }
.grid2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.buttons.center { justify-content: center; }
.store { display: flex; align-items: center; gap: 12px; padding: 13px 22px; border-radius: 18px; text-decoration: none; min-width: 230px; border: 1px solid var(--ink); }
.store svg { width: 28px; height: 28px; flex-shrink: 0; }
.store small { display: block; font-size: 12px; opacity: .8; line-height: 1.2; }
.store b { display: block; font-size: 17px; line-height: 1.25; }
.store.android { background: var(--ink); color: var(--sage); }
.store.android:hover { background: #000; }
.store.ios { color: var(--ink3); border-color: var(--line); cursor: not-allowed; }
.note { font-size: 13px; color: var(--ink3); margin-top: 14px; }
.note a { color: var(--ink); }

.phones { position: relative; height: 520px; }
.phone { position: absolute; width: 240px; height: 480px; border-radius: 34px; padding: 18px 14px; background: var(--sage); border: 8px solid #eef2ec; box-shadow: 0 30px 70px rgba(29,33,23,.22); overflow: hidden; font-size: 12px; }
.phone.a { right: 190px; top: 0; z-index: 2; }
.phone.b { right: 0; top: 50px; transform: rotate(4deg); }
.ph-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 8px; letter-spacing: .1em; }
.tag { background: var(--lime); border-radius: 999px; padding: 2px 6px; }
.phone h4 { font-size: 30px; margin: 22px 0 14px; }
.row-card { background: var(--card); border: 1px solid var(--cardb); border-radius: 12px; padding: 9px 11px; margin-bottom: 7px; }
.row-card.lime { background: var(--lime); }
.row-card.ink { background: var(--ink); color: var(--sage); }
.row-card.mono { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.tabs { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; justify-content: space-between; background: rgba(255,255,255,.6); border-radius: 999px; padding: 7px 9px; font-family: var(--mono); font-size: 7px; letter-spacing: .05em; }
.tabs b { background: var(--lime); border-radius: 999px; padding: 2px 6px; font-weight: 500; }

.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 0; }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.strip b { display: block; font-family: var(--serif); font-size: 40px; font-weight: 400; line-height: 1; }
.strip span { font-size: 13px; color: var(--ink3); }

.ayah { padding: 18px 0 0; }
.ayah .ar { font-family: 'Amiri Quran', serif; font-size: clamp(26px, 4vw, 36px); line-height: 2.1; text-align: right; }
.ayah .en { font-size: 18px; margin-top: 8px; }
.ayah .ref { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; margin-top: 8px; }
.ayah sup { font-size: .6em; color: var(--ink3); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--cardb); border-radius: 20px; padding: 22px; backdrop-filter: blur(12px); }
.card p { color: var(--ink2); font-size: 15px; }

.steps { counter-reset: s; list-style: none; display: grid; gap: 12px; max-width: 720px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; font-size: 16px; }
.steps li > span { padding-top: 4px; }
.steps li b { font-weight: 600; }
.steps li::before { content: counter(s); flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; }
.final { text-align: center; padding-bottom: 72px !important; }
.final .lead { margin: 0 auto; }
.footer { border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: 14px; }
.footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
.wrap-row { flex-wrap: wrap; }

/* simple pages */
.page { max-width: 760px; margin: 0 auto; padding: 40px 20px 60px; }
.page h1 { font-size: clamp(40px, 6vw, 60px); }
.page h2 { font-size: 30px; margin: 32px 0 10px; }
.page p, .page li { margin-bottom: 10px; }
.page ul { padding-left: 20px; }
form.stack { display: grid; gap: 12px; max-width: 420px; margin-top: 18px; }
form.stack input { border-radius: 12px; border: 1px solid var(--ink); background: rgba(255,255,255,.55); padding: 13px 14px; font: inherit; }
form.stack button { cursor: pointer; background: var(--ink); color: var(--sage); }
.msg { margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: var(--lime); display: none; }

@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  .phones { height: 500px; max-width: 420px; }
  .phone.a { right: auto; left: 0; }
  .phone.b { right: 0; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .phones { height: 470px; }
  .phone { width: 210px; height: 440px; }
  .phone.b { display: none; }
  .phone.a { left: 50%; transform: translateX(-50%); }
  .store { min-width: 100%; }
}

/* compact landing */
section.compact { padding-top: 40px; padding-bottom: 8px; }
section.compact + section.compact { margin-top: 0; }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 32px; }
.feats h3 { font-size: 24px; }
.feats p { color: var(--ink2); font-size: 14.5px; }
.steps.inline { grid-template-columns: repeat(3, 1fr); max-width: none; margin-top: 14px; }
.hero { padding-bottom: 40px; }
.phones { height: 500px; }
.phone.a { right: auto; left: 50%; transform: translateX(-50%); }
.footer { margin-top: 48px; }
@media (max-width: 860px) {
  .feats { grid-template-columns: repeat(2, 1fr); }
  .steps.inline { grid-template-columns: 1fr; }
  .phones { display: none; }
  .hero { padding-top: 36px; padding-bottom: 8px; }
}
@media (max-width: 480px) { .feats { grid-template-columns: 1fr; gap: 12px; } .feats h3 { font-size: 22px; } }

/* Features by area, version tags, what's new, changelog */
#features h2 { margin-bottom: 8px; }
.fgroup { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); margin: 30px 0 12px; }
.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fcard { background: var(--card); border: 1px solid var(--cardb); border-radius: 18px; padding: 18px 20px; }
.fcard h4 { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.1; margin-bottom: 6px; }
.fcard p { color: var(--ink2); font-size: 14.5px; }
.new { display: inline-block; vertical-align: middle; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; background: var(--lime); border: 1px solid var(--ink); border-radius: 999px; padding: 2px 8px; margin-left: 4px; position: relative; top: -2px; }
.whatsnew { display: grid; grid-template-columns: 220px 1fr; gap: 28px; background: var(--ink); color: #e9eee6; border-radius: 24px; padding: 28px 30px; }
.whatsnew .label, .whatsnew .muted { color: rgba(233,238,230,.6); }
.whatsnew .ver { font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--lime); margin: 8px 0 4px; }
.whatsnew a { color: var(--lime); }
.whatsnew ul { list-style: none; display: grid; gap: 10px; align-content: center; }
.whatsnew li { padding-left: 18px; position: relative; }
.whatsnew li::before { content: ''; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--lime); }
.changelog .rel { border-top: 1px solid var(--line); padding: 26px 0; display: grid; grid-template-columns: 160px 1fr; gap: 20px; }
.changelog .rel .ver { font-family: var(--serif); font-size: 44px; line-height: 1; }
.changelog .rel ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.changelog .rel h3 { font-size: 24px; margin-bottom: 8px; }
@media (max-width: 860px) { .fgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .fgrid { grid-template-columns: 1fr; }
  .whatsnew, .changelog .rel { grid-template-columns: 1fr; gap: 10px; }
  .whatsnew { padding: 22px; }
}
[hidden] { display: none !important; }

/* password field with Show/Hide */
.pw { position: relative; display: block; }
.pw input { width: 100%; padding-right: 78px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.6); cursor: pointer; }
