/* Shared stylesheet: landing pages (en, ar, tl, hi, ru, zh), guides and legal pages.
   No external fonts or images. No inline styles are used anywhere (CSP style-src 'self'). Logical properties are used so right-to-left (Arabic) mirrors correctly. */
:root {
  --bg: #f4f6fa; --card: #fff; --ink: #172033; --muted: #4f5b6e; --line: #dde2ec;
  --accent: #1f5fbf; --accent-dark: #164a98; --accent-soft: #e8f0fc;
  --navy: #0f2747; --ok: #17724a; --warn-bg: #fff6dc; --warn-line: #d9a82b;
  --shadow: 0 1px 2px rgba(20, 32, 51, .06), 0 8px 24px rgba(20, 32, 51, .08);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); }
:lang(ar) body, body:lang(ar) { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", system-ui, sans-serif; line-height: 1.75; }
body:lang(hi) { font-family: "Nirmala UI", "Noto Sans Devanagari", "Kohinoor Devanagari", "Segoe UI", system-ui, sans-serif; line-height: 1.7; }
body:lang(zh-Hans) { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Hiragino Sans GB", system-ui, sans-serif; line-height: 1.7; }
img, svg { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
a:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 3px solid #7aa7f0; outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { top: 8px; }

/* ---------- layout ---------- */
.wrap { max-width: 820px; margin: 0 auto; padding: 0 16px; }
.wide { max-width: 1120px; }
header.site .wrap, footer.site .wrap { max-width: 1120px; }
main { padding: 8px 0 40px; }
main.landing { padding: 0; }
main:not(.landing) { overflow-wrap: anywhere; }
section.band { padding: 56px 0; }
section.band.alt { background: #fff; border-block: 1px solid var(--line); }
.center { text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--accent-dark); background: var(--accent-soft); border-radius: 99px; padding: 4px 12px; }

/* ---------- header ---------- */
header.site { background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
header.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; padding-block: 10px; }
header.site a.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
header.site a.brand::before { content: ""; width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(#fff, #fff) 8px 16px / 4px 7px no-repeat, linear-gradient(#fff, #fff) 13px 12px / 4px 11px no-repeat, linear-gradient(#fff, #fff) 18px 7px / 4px 16px no-repeat, linear-gradient(145deg, #2f7be0, #164a98); }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
nav a { color: var(--ink); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; }
nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }
header.site nav a[href="/app/"], header.site nav a.navcta { background: var(--accent); color: #fff; font-weight: 600; }
header.site nav a[href="/app/"]:hover, header.site nav a.navcta:hover { background: var(--accent-dark); color: #fff; }
header.site .wrap .navgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.langs { display: flex; flex-wrap: wrap; gap: 4px; }
.langs a { border: 1px solid var(--line); background: #fff; padding: 3px 10px; font-size: 14px; }
.langs a[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }
.hide-sm { }

/* ---------- typography ---------- */
h1 { font-size: 30px; line-height: 1.2; margin: 28px 0 10px; }
h2 { font-size: 22px; line-height: 1.3; margin: 30px 0 8px; }
h3 { font-size: 18px; line-height: 1.3; margin: 0 0 6px; }
.lead { font-size: 18px; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 14px; }
main.landing h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 10px; }
.sub { color: var(--muted); max-width: 720px; margin: 0 0 28px; font-size: 17px; }
.center .sub { margin-inline: auto; }

/* ---------- buttons ---------- */
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 10px; padding: 10px 20px; text-decoration: none; font-weight: 600; text-align: center; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.alt { background: #fff; color: var(--accent); }
.btn.alt:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn.big { padding: 14px 28px; font-size: 18px; }
.btn.light { background: #fff; color: var(--navy); border-color: #fff; }
.btn.light:hover { background: var(--accent-soft); }

/* ---------- cards, tables (shared with guides and legal) ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; }
.tableWrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; border: 1px solid var(--line); }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
th { background: #eef2f9; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.price { font-size: 28px; font-weight: 700; margin: 4px 0; }
footer.site { border-top: 1px solid var(--line); background: #fff; padding: 22px 0; color: var(--muted); font-size: 14px; }
footer.site a { margin-inline-end: 14px; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(1000px 420px at 50% -80px, #dbe8ff, transparent 70%), linear-gradient(180deg, #eef4ff, var(--bg)); padding: 52px 0 30px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5.2vw, 52px); line-height: 1.15; margin: 14px auto 14px; max-width: 880px; letter-spacing: -.01em; }
.hero .lead { max-width: 740px; margin: 0 auto 8px; font-size: clamp(17px, 2vw, 20px); }
.hero .cta { justify-content: center; margin: 22px 0 14px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; list-style: none; padding: 0; margin: 12px 0 0; }
.chips li { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 14px; font-weight: 600; color: var(--ink); }
.chips svg { width: 16px; height: 16px; color: var(--ok); flex: none; }
.heronote { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

/* ---------- product preview (CSS and inline SVG mock) ---------- */
.mock { margin: 34px auto 0; max-width: 1020px; background: #fff; border: 1px solid #cfd7e6; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; text-align: start; }
.mock .bar { display: flex; align-items: center; gap: 7px; background: #eef2f9; border-bottom: 1px solid var(--line); padding: 10px 14px; }
.mock .dot { width: 11px; height: 11px; border-radius: 50%; background: #c3cbdb; flex: none; }
.mock .bar strong { margin-inline-start: 8px; font-size: 13px; color: var(--muted); font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock .tag { font-size: 12px; font-weight: 700; color: var(--ok); background: #e3f5ec; border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.mock .body { display: grid; grid-template-columns: 1fr; gap: 0; }
.mock .pane { padding: 16px; min-width: 0; }
.mock .pane + .pane { border-top: 1px solid var(--line); }
.mock h3 { font-size: 15px; margin-bottom: 10px; }
.mock table { font-size: 14px; border: 0; }
.mock th { font-size: 12.5px; padding: 6px 8px; white-space: nowrap; }
.mock td { padding: 7px 8px; }
.mock td.num, .mock th.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mock td.neg { color: #8d2323; } .mock td.pos { color: var(--ok); }
.mock td.desc { font-size: 13px; color: #36425a; letter-spacing: .01em; }
.mock bdi { unicode-bidi: isolate; }
.cat { display: inline-block; border-radius: 99px; padding: 1px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.cat.income { background: #e1ecf8; color: #1c4a80; } .cat.groceries { background: #fbf1c9; color: #6a5300; } .cat.dining { background: #dff0da; color: #2c6a21; }
.cat.transport { background: #efe3f2; color: #6a3b78; } .cat.subscriptions { background: #d9f0ee; color: #1f6460; } .cat.health { background: #d8eeec; color: #1f6460; } .cat.rent { background: #fde6cf; color: #8a4a08; }
.rulenote { margin: 12px 0 0; font-size: 13.5px; background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; color: #12376f; }
.sample { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.chartbox { direction: ltr; }
.chartbox svg { width: 100%; height: auto; display: block; }
.chartbox text { font-family: system-ui, "Segoe UI", Roboto, Arial, sans-serif; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; }
.legend li::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-inline-end: 6px; border-radius: 3px; vertical-align: -1px; }
.legend .l-rent::before { background: #f28e2b; } .legend .l-groceries::before { background: #edc948; } .legend .l-dining::before { background: #59a14f; }
.legend .l-transport::before { background: #b07aa1; } .legend .l-subscriptions::before { background: #76b7b2; }

/* ---------- grids of cards ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
section.band.alt .tile { background: var(--bg); }
.tile p { margin: 0; color: var(--muted); }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; margin-bottom: 12px; }
.icon svg { width: 24px; height: 24px; }
.steps { counter-reset: step; }
.step { position: relative; }
.step .num { position: absolute; inset-inline-end: 16px; top: 12px; font-size: 40px; font-weight: 800; color: #dbe4f3; line-height: 1; }
.moreline { margin-top: 18px; }

/* ---------- comparison ---------- */
.compare { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.compare table { border: 0; }
.compare th.us { background: var(--navy); color: #fff; }
.compare td.us { background: #f0f6ff; font-weight: 600; }
.compare td:first-child, .compare th:first-child { font-weight: 700; white-space: nowrap; }
.compare td .yes { color: var(--ok); }
.proof { margin-top: 16px; padding: 12px 16px; background: #eaf7f0; border: 1px solid #b6e0c9; border-radius: 12px; color: #11452c; }
.fine { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

/* ---------- pricing ---------- */
.pricing { display: grid; gap: 16px; grid-template-columns: 1fr; max-width: 820px; margin-inline: auto; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; }
.plan.pro { border: 2px solid var(--accent); box-shadow: var(--shadow); position: relative; }
.plan .badge { position: absolute; top: -13px; inset-inline-start: 24px; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; border-radius: 99px; padding: 3px 12px; }
.plan .amount { font-size: 42px; font-weight: 800; line-height: 1.1; margin: 6px 0 2px; }
.plan .amount small { font-size: 15px; font-weight: 600; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 14px 0 20px; flex: 1; }
.ticks li { position: relative; padding-inline-start: 28px; margin: 7px 0; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: #dff3e9; }
.ticks li::after { content: ""; position: absolute; inset-inline-start: 6px; top: calc(.35em + 3px); width: 5px; height: 9px; border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(45deg); }
[dir="rtl"] .ticks li::after { transform: rotate(45deg); }
.plan .btn { display: block; }

/* ---------- honest limits ---------- */
.limits { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 22px 24px; }
.limits h2 { margin-top: 0; }
.limits ul { margin: 8px 0 0; padding-inline-start: 22px; }
.limits li { margin: 8px 0; }

/* ---------- FAQ ---------- */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; padding: 0 16px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 28px 14px 0; list-style: none; position: relative; }
[dir="rtl"] .faq summary { padding: 14px 0 14px 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 0; top: 10px; font-size: 24px; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 14px; color: var(--muted); }

/* ---------- final CTA + footer ---------- */
.finalcta { background: linear-gradient(135deg, #0f2747, #1b4a8c); color: #fff; text-align: center; padding: 56px 0; }
.finalcta h2 { color: #fff; margin: 0 0 8px; }
.finalcta p { color: #d7e4fa; margin: 0 auto 20px; max-width: 640px; }
footer.site .foot { display: grid; gap: 14px; }
footer.site .links { display: flex; flex-wrap: wrap; gap: 6px 0; }
footer.site .fine { margin: 0; }
footer.site .langs a { margin-inline-end: 0; }

/* ---------- wide screens ---------- */
@media (min-width: 720px) {
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.four { grid-template-columns: repeat(4, 1fr); }
  .pricing { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .mock .body { grid-template-columns: 1.2fr 1fr; }
  .mock .pane + .pane { border-top: 0; border-inline-start: 1px solid var(--line); }
}
@media (max-width: 719px) {
  section.band { padding: 40px 0; }
  .hero { padding: 36px 0 22px; }
  .hide-sm { display: none; }
  header.site nav.main { display: none; }
  .btn.big { width: 100%; }
  .hero .cta .btn { width: 100%; max-width: 360px; }
  .limits { padding: 18px 16px; }
  .compare td:first-child, .compare th:first-child { white-space: normal; }
}
@media (max-width: 520px) { h1 { font-size: 25px; } .mock th, .mock td { padding: 6px 5px; } .mock td.desc { font-size: 12px; } .cat { padding: 1px 7px; font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; }
