/* Vazirmatn (SIL OFL 1.1, see OFL.txt), self-hosted so the page loads nothing from third parties. */
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./vazirmatn-arabic-wght-normal.woff2) format("woff2-variations"), url(./vazirmatn-arabic-wght-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./vazirmatn-latin-wght-normal.woff2) format("woff2-variations"), url(./vazirmatn-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Base rules the page was originally rendered with. */
:root { box-sizing: border-box; }
body { margin: 0; padding: 0; font: 14px -apple-system, BlinkMacSystemFont, sans-serif; }
img { max-width: 100%; }
[hidden]:not([hidden=until-found i]) { display: none !important; }

/* Layout: a 1280×720 stage scaled to fit, a dark ink "screening room" around a light product screen; controls under the stage. Single deliberate look. */
:root {
  --ink: #0b1220;
  --ink-2: #131c30;
  --ink-line: #24304a;
  --paper: #ffffff;
  --panel: #f6f8fb;
  --line: #e3e8ef;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --c-prev: #10b981;
  --c-repair: #f59e0b;
  --c-corr: #6366f1;
  --c-req: #8b5cf6;
  --c-over: #f43f5e;
  --day: #eef2f7;
  --night: #e1e7f0;
  --on-ink: #e8edf7;
  --on-ink-muted: #8d9bb5;
  --font: "Vazirmatn", "Vazir", Tahoma, "Segoe UI", sans-serif;
  color-scheme: dark;
}
html, body { background: var(--ink); }
body { color: var(--on-ink); font-family: var(--font); padding-inline: 16px; padding-block: 20px 28px; }
.shell { max-width: 1280px; margin-inline: auto; display: flex; flex-direction: column; gap: 14px; }
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; direction: rtl; }
.top h1 { margin: 0; font-size: clamp(16px, 2.2vw, 20px); font-weight: 800; letter-spacing: 0; }
.top span { color: var(--on-ink-muted); font-size: 13px; }

.wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; border-radius: 14px; background: var(--ink-2); box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px var(--ink-line); }
.stage { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; background: #e9edf4; overflow: hidden; direction: ltr; font-variant-numeric: tabular-nums; }

/* product screen */
.app { position: absolute; inset: 0; background: var(--paper); }
.app-head { position: absolute; left: 0; right: 0; top: 0; height: 56px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); font-weight: 900; font-size: 22px; color: var(--text); direction: rtl; }
.panel { position: absolute; top: 68px; height: 584px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.side { left: 14px; width: 204px; }
.tl { left: 230px; width: 686px; background: var(--paper); border-color: transparent; }
.cal { left: 928px; width: 338px; }
.p-title { position: absolute; top: 12px; left: 0; right: 0; text-align: center; font-weight: 800; font-size: 15px; color: var(--text); direction: rtl; }

.chip { position: absolute; left: 12px; width: 178px; height: 38px; border-radius: 11px; background: var(--paper); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding-inline: 12px; box-sizing: border-box; direction: rtl; font-size: 13px; font-weight: 700; color: #334155; transition: background .25s, color .25s, border-color .25s; }
.chip b { font-weight: 700; color: #94a3b8; font-size: 12px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.on b { color: #c7d2fe; }
.chip.half { background: #e0e7ff; border-color: var(--accent); }
.chip .tw { color: var(--accent); font-size: 11px; margin-inline-start: auto; margin-inline-end: 8px; }
.chip.on .tw { color: #fff; }
.node { position: absolute; height: 32px; border-radius: 9px; background: var(--accent-soft); border: 1px solid #c7d2fe; display: flex; align-items: center; justify-content: space-between; padding-inline: 10px; box-sizing: border-box; direction: rtl; font-size: 12px; font-weight: 700; color: #3730a3; transition: background .25s, color .25s; }
.node b { font-size: 11px; color: #818cf8; }
.node.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.node.on b { color: #c7d2fe; }

.tl-title { position: absolute; right: 8px; top: 6px; font-weight: 800; font-size: 17px; color: var(--text); direction: rtl; white-space: nowrap; }
.tl-sub { position: absolute; right: 8px; top: 34px; font-size: 11.5px; color: var(--muted); direction: rtl; white-space: nowrap; }
.hr { position: absolute; top: 68px; font-size: 11px; color: var(--muted); transform: translateX(-50%); }
.grid { position: absolute; top: 86px; width: 0; border-left: 1px dashed #e2e8f0; height: 488px; }
.row { position: absolute; left: 0; width: 686px; height: 48px; transition: opacity .35s; }
.row .lbl { position: absolute; left: 0; width: 84px; top: 0; height: 48px; line-height: 48px; text-align: left; font-weight: 700; font-size: 13px; color: #334155; }
.row .d, .row .n { position: absolute; top: 6px; height: 36px; border-radius: 8px; }
.row .d { background: var(--day); }
.row .n { background: var(--night); }
.bar { position: absolute; top: 14px; height: 20px; border-radius: 6px; transform-origin: left center; box-shadow: 0 0 0 1px #fff; transition: opacity .35s; }
.bar.ov { background: var(--c-over); z-index: 2; }

.callout { position: absolute; direction: rtl; background: var(--text); color: #fff; font-size: 12.5px; font-weight: 700; padding: 8px 12px; border-radius: 10px; white-space: nowrap; box-shadow: 0 10px 24px rgba(15,23,42,.25); }
.callout::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: var(--text); transform: translateX(-50%) rotate(45deg); }

.month { position: absolute; top: 14px; left: 0; right: 0; text-align: center; font-weight: 900; font-size: 20px; color: var(--text); direction: rtl; }
.arrow { position: absolute; top: 10px; width: 42px; height: 30px; border-radius: 10px; background: var(--accent-soft); border: 1px solid #c7d2fe; color: var(--accent); font-weight: 900; font-size: 20px; display: grid; place-items: center; }
.wd { position: absolute; top: 56px; width: 40px; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.cell { position: absolute; width: 40px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #334155; transition: opacity .3s, box-shadow .3s; }
.kpi { position: absolute; width: 154px; height: 52px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); text-align: center; direction: rtl; }
.kpi .v { display: block; font-weight: 900; font-size: 21px; margin-top: 4px; line-height: 1.2; }
.kpi .l { display: block; font-size: 10.5px; color: var(--muted); }
.legend { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; direction: rtl; font-size: 11.5px; color: #334155; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 5px; vertical-align: -1px; }

/* popup */
.scrim { position: absolute; inset: 0; background: rgba(15,23,42,.5); }
.pop { position: absolute; left: 330px; top: 196px; width: 620px; height: 340px; border-radius: 20px; background: var(--paper); border: 1px solid #cbd5e1; box-shadow: 0 30px 70px rgba(15,23,42,.35); direction: rtl; transform-origin: 50% 50%; }
.pop h3 { margin: 0; position: absolute; right: 22px; top: 18px; font-size: 19px; font-weight: 900; color: var(--text); }
.pop .sub { position: absolute; right: 22px; top: 50px; font-size: 12px; color: var(--muted); }
.pop .x { position: absolute; left: 18px; top: 16px; width: 34px; height: 34px; border-radius: 50%; background: #f1f5f9; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 900; color: #475569; }
.pcards { position: absolute; right: 16px; left: 16px; top: 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pc { position: relative; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px 12px 12px; display: grid; gap: 5px; font-size: 12px; }
.pc::before { content: ""; position: absolute; right: 6px; top: 12px; bottom: 12px; width: 5px; border-radius: 3px; background: var(--k); }
.pc .h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 900; font-size: 15px; color: var(--text); }
.pc .h span { font-size: 12px; color: var(--k); }
.pc .r { display: flex; gap: 10px; }
.pc .r em { font-style: normal; color: #94a3b8; width: 74px; flex: none; }
.pc .r strong { color: #1e293b; font-weight: 700; }

/* overlays on ink */
.ov-layer { position: absolute; inset: 0; background: radial-gradient(1200px 600px at 70% 30%, #1a2a52 0%, var(--ink) 60%); color: var(--on-ink); direction: rtl; display: flex; flex-direction: column; justify-content: center; padding-inline: 120px; gap: 18px; }
.ov-layer .eyebrow { font-size: 18px; font-weight: 700; color: #a5b4fc; letter-spacing: 0; }
.ov-layer .big { font-size: 64px; font-weight: 900; line-height: 1.2; margin: 0; text-wrap: balance; }
.ov-layer .big em { font-style: normal; color: #fda4af; }
.ov-layer .lead { font-size: 22px; color: var(--on-ink-muted); max-width: 820px; line-height: 1.7; margin: 0; }
.strip { display: flex; gap: 10px; margin-top: 6px; }
.strip span { width: 70px; height: 12px; border-radius: 6px; }
.stats { display: flex; gap: 18px; flex-wrap: wrap; }
.stats div { border: 1px solid #2c3a5c; background: rgba(255,255,255,.04); border-radius: 16px; padding: 14px 22px; min-width: 190px; }
.stats b { display: block; font-size: 34px; font-weight: 900; color: #fff; }
.stats span { font-size: 15px; color: var(--on-ink-muted); }

/* caption */
.cap { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); direction: rtl; background: rgba(11,18,32,.92); color: #fff; border-radius: 999px; padding: 11px 22px 11px 14px; display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 700; white-space: nowrap; box-shadow: 0 14px 34px rgba(11,18,32,.35); }
.cap .num { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.demo { position: absolute; left: 14px; bottom: 14px; font-size: 11px; color: var(--muted); direction: rtl; background: rgba(255,255,255,.85); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }

/* part two: decision lessons */
.learn { padding: 0; display: block; }
.scene { position: absolute; inset: 0; padding: 60px 70px 70px; display: grid; grid-template-columns: 1fr 540px; gap: 52px; align-items: center; direction: rtl; }
.scene.full { grid-template-columns: 1fr; align-content: center; }
.sc-eye { color: #a5b4fc; font-weight: 700; font-size: 17px; }
.sc-q { font-size: 40px; font-weight: 900; line-height: 1.35; margin: 8px 0 18px; text-wrap: balance; color: #fff; }
.sc-where { display: inline-flex; gap: 10px; align-items: center; background: rgba(255,255,255,.06); border: 1px solid #2c3a5c; border-radius: 999px; padding: 8px 16px; font-size: 15px; color: #c7d2fe; }
.sc-where b { background: #4f46e5; color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.sc-ins { font-size: 22px; font-weight: 700; color: #fff; margin-top: 22px; line-height: 1.6; }
.sc-ins em { font-style: normal; color: #fda4af; }
.sc-dec { margin-top: 22px; border-radius: 18px; background: #eef2ff; color: #1e1b4b; padding: 16px 22px; display: grid; gap: 8px; }
.sc-dec .tag { justify-self: start; background: #4f46e5; color: #fff; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 3px 12px; }
.sc-dec .d { font-size: 18px; font-weight: 800; line-height: 1.6; }
.sc-dec .p { font-size: 14.5px; color: #4338ca; font-weight: 700; border-top: 1px dashed #c7d2fe; padding-top: 8px; line-height: 1.6; }
.chart { position: relative; height: 430px; border-radius: 22px; border: 1px solid #24304a; background: rgba(255,255,255,.03); padding: 26px 26px 20px; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; }
.chart h4 { margin: 0; font-size: 15px; color: #c7d2fe; font-weight: 700; }
.chart .fake { position: absolute; left: 18px; bottom: 12px; font-size: 11px; color: #64748b; }
.hb { display: grid; grid-template-columns: 120px 1fr 62px; gap: 12px; align-items: center; font-size: 14px; }
.hb .lb { color: #cbd5e1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb .tr { position: relative; height: 22px; }
.hb .br { position: absolute; right: 0; top: 0; height: 22px; border-radius: 6px; transform-origin: right center; }
.hb .tg { position: absolute; top: -6px; bottom: -6px; border-left: 2px dashed #fbbf24; }
.hb .vl { color: #fff; font-weight: 800; text-align: left; }
.cols { flex: 1; display: flex; align-items: flex-end; gap: 14px; padding-top: 10px; }
.cols .c { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.cols .cb { width: 100%; border-radius: 8px 8px 4px 4px; background: #6366f1; transform-origin: bottom center; }
.cols .cv { font-size: 13px; font-weight: 800; color: #fff; }
.cols .cl { font-size: 12px; color: #94a3b8; }
.eqs { display: flex; gap: 8px; flex-wrap: wrap; }
.eqs span { background: rgba(244,63,94,.14); border: 1px solid rgba(244,63,94,.5); color: #fecdd3; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; }
.strip24 { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.strip24 i { height: 46px; border-radius: 4px; }
.axis24 { display: flex; justify-content: space-between; font-size: 11px; color: #94a3b8; direction: ltr; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; }
.step { border-radius: 20px; border: 1px solid #2c3a5c; background: rgba(255,255,255,.04); padding: 20px; display: grid; gap: 10px; align-content: start; }
.step .n { width: 38px; height: 38px; border-radius: 50%; background: #4f46e5; color: #fff; font-weight: 900; font-size: 18px; display: grid; place-items: center; }
.step b { font-size: 19px; color: #fff; }
.step p { margin: 0; font-size: 15px; color: #94a3b8; line-height: 1.7; }
.chapter { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.chapter .k { font-size: 18px; color: #a5b4fc; font-weight: 700; }
.chapter h2 { margin: 0; font-size: 60px; font-weight: 900; line-height: 1.25; color: #fff; text-wrap: balance; }
.chapter p { margin: 0; font-size: 22px; color: #8d9bb5; }

.logo-img { display: block; width: 560px; max-width: 100%; height: auto; }
.sig .logo-img { width: 520px; }
#logoL { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(900px 500px at 50% 50%, #16244a 0%, var(--ink) 65%); z-index: 40; }
#logoL .logo-img { width: 640px; }
.logo { display: flex; align-items: center; gap: 18px; direction: ltr; }
.logo .wm { font-family: "Vazirmatn", sans-serif; font-weight: 900; font-size: 46px; letter-spacing: -0.5px; color: #fff; line-height: 1; }
.logo .wm small { font-weight: 400; color: #a5b4fc; margin-left: 6px; }
.logo .fa { display: block; font-size: 15px; font-weight: 500; color: #8d9bb5; margin-top: 6px; letter-spacing: 0; direction: rtl; text-align: left; }
.pbi { display: inline-flex; align-items: center; gap: 10px; border: 1px solid #2c3a5c; background: rgba(255,255,255,.05); border-radius: 999px; padding: 8px 18px; font-size: 18px; color: #e8edf7; align-self: flex-start; }
.pbi i { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; }
.pbi i b { width: 5px; border-radius: 2px; background: #f2c811; }
.sig { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: radial-gradient(900px 500px at 50% 45%, #18264a 0%, var(--ink) 65%); direction: rtl; }
.sig .logo .wm { font-size: 64px; }
.sig .line { width: 380px; height: 2px; background: linear-gradient(90deg, transparent, #a5b4fc, transparent); transform-origin: center; }
.sig .t1 { font-size: 22px; color: #e8edf7; font-weight: 700; }
.sig .who { font-size: 18px; color: #fbbf24; font-weight: 800; }
.sig .t2 { font-size: 14px; color: #8d9bb5; }

/* cursor */
.cursor { position: absolute; left: 0; top: 0; width: 26px; height: 32px; pointer-events: none; z-index: 50; filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.ripple { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px solid var(--accent); pointer-events: none; z-index: 49; }

/* controls */
.ctl { display: flex; align-items: center; gap: 12px; direction: ltr; }
.ctl button { font-family: var(--font); font-size: 14px; font-weight: 700; color: var(--on-ink); background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 10px; padding: 8px 16px; cursor: pointer; }
.ctl button:hover { background: #1b2640; }
.ctl button:focus-visible, .ctl input:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.ctl input { flex: 1; min-width: 0; accent-color: #818cf8; }
.ctl output { font-size: 13px; color: var(--on-ink-muted); min-width: 64px; text-align: right; }

/* Narrow screens (added for the website embed): keep the control bar inside the width. */
@media (max-width: 520px) {
  body { padding-inline: 8px; padding-block: 14px 16px; }
  .ctl { flex-wrap: wrap; gap: 8px; }
  .ctl button { padding: 7px 11px; font-size: 13px; white-space: nowrap; }
  .ctl input { flex: 1 1 160px; }
}

/* English version (?lang=en, app.js sets <html lang="en">): the same stage, read left to right. */
html[lang="en"] :is(.top, .app-head, .p-title, .chip, .node, .tl-title, .tl-sub, .callout, .month, .kpi, .legend, .pop, .ov-layer, .cap, .demo, .sig) { direction: ltr; }
html[lang="en"] :is(.tl-title, .tl-sub) { right: auto; left: 8px; }
html[lang="en"] .month { top: 9px; font-size: 18px; line-height: 1.2; }
html[lang="en"] .month small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
html[lang="en"] :is(.pop h3, .pop .sub) { right: auto; left: 22px; }
html[lang="en"] .pop .x { left: auto; right: 18px; }
html[lang="en"] .pc { padding: 12px 12px 12px 18px; }
html[lang="en"] .pc::before { right: auto; left: 6px; }
html[lang="en"] .pc .r em { width: 78px; }
