@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
/* Standard build: digits stay Latin (0-9), like the workspace of the app itself. */
@font-face {
  font-family: "Vazirmatn";
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/Vazirmatn-Variable.woff2") format("woff2");
}

:root {
  color-scheme: dark light;
  --bg: #0d1015;
  --card: #151920;
  --line: #232a36;
  --fg: #e6eaf2;
  --fg-soft: #c9d0dc;
  --muted: #8a93a3;
  --accent: #4c8dff;
  --accent-btn: #2f6fe4;
  --accent-fg: #fff;
  --accent-text: #7fb0ff;
  --accent-soft: rgba(76, 141, 255, 0.14);
  --ok: #4cb86b;
  --no: #8a93a3;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fb;
    --card: #fff;
    --line: #dde3ec;
    --fg: #141a24;
    --fg-soft: #2f3a4b;
    --muted: #5d687a;
    --accent: #2f6fe4;
    --accent-btn: #2459c0;
    --accent-text: #2459c0;
    --accent-soft: rgba(47, 111, 228, 0.1);
    --ok: #2a8a49;
    --no: #7a8496;
    --shadow: 0 24px 60px rgba(30, 50, 90, 0.18);
  }
}
html[lang="fa"] {
  --font: "Vazirmatn", "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--accent-text);
}
code,
kbd {
  font-family: var(--mono);
  direction: ltr;
  unicode-bidi: isolate;
}
code {
  background: var(--accent-soft);
  padding: 0 0.4em;
  border-radius: 5px;
  font-size: 0.9em;
  line-height: 1;
}
kbd {
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.05em 0.45em;
  font-size: 0.85em;
  color: var(--fg-soft);
  white-space: nowrap;
}
.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* header */
header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
header.top .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}
.brand img {
  width: 28px;
  height: 28px;
}
nav.links {
  display: flex;
  gap: 18px;
  margin-inline-start: auto;
  align-items: center;
}
nav.links a {
  color: var(--fg-soft);
  text-decoration: none;
  font-size: 14px;
}
nav.links a:hover {
  color: var(--accent-text);
}
.lang {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 10px;
}
@media (max-width: 760px) {
  nav.links a:not(.lang):not(.gh) {
    display: none;
  }
}

/* hero */
.hero {
  text-align: center;
  padding: 72px 0 40px;
}
.hero h1 {
  font-size: clamp(34px, 5.6vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 auto 18px;
  max-width: 17ch;
}
html[lang="fa"] .hero h1 {
  letter-spacing: 0;
  line-height: 1.35;
  max-width: 20ch;
}
.hero h1,
section h2 {
  text-wrap: balance;
}
.hero p.lead,
.card p,
section > .wrap > p.sub {
  text-wrap: pretty;
}
.hero p.lead {
  font-size: 19px;
  color: var(--fg-soft);
  text-wrap: balance;
  max-width: 640px;
  margin: 0 auto 28px;
}
.btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--fg);
  background: var(--card);
}
.btn.primary {
  background: var(--accent-btn);
  border-color: var(--accent-btn);
  color: var(--accent-fg);
}
.btn:hover {
  filter: brightness(1.08);
}
.small {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 14px;
}
.shot {
  margin: 44px auto 0;
  max-width: 1040px;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--card);
}
.shot img {
  width: 100%;
  height: auto;
}

/* sections */
section {
  padding: 64px 0;
}
section h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.2;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
html[lang="fa"] section h2 {
  letter-spacing: 0;
  line-height: 1.4;
}
section > .wrap > p.sub {
  color: var(--muted);
  max-width: 680px;
  margin: 0 0 34px;
  font-size: 17px;
}
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.card p {
  margin: 0;
  color: var(--fg-soft);
  font-size: 15px;
}
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 1px 8px;
  margin-bottom: 8px;
}

/* steps */
ol.steps {
  list-style: none;
  counter-reset: s;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
ol.steps li {
  counter-reset: none;
  counter-increment: s;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
}
ol.steps li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
  margin-bottom: 10px;
  font-family: var(--mono);
}
ol.steps b {
  display: block;
  margin-bottom: 4px;
}
ol.steps span {
  color: var(--fg-soft);
  font-size: 15px;
}

/* tables */
.tbl {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 15px;
}
th,
td {
  padding: 12px 16px;
  text-align: start;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
th {
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
}
th.me,
td.me {
  background: var(--accent-soft);
}
td.me {
  font-weight: 600;
}
.y {
  color: var(--ok);
  font-weight: 600;
}
.n {
  color: var(--no);
}
.cols + .note {
  text-align: center;
}
.note {
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
}

/* two columns */
.cols {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.cols > * {
  min-width: 0;
}
@media (max-width: 860px) {
  .cols {
    grid-template-columns: minmax(0, 1fr);
  }
}
.card code {
  overflow-wrap: anywhere;
}
pre {
  direction: ltr;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font: 13.5px/1.6 var(--mono);
  margin: 0;
}
.keys {
  display: grid;
  gap: 8px 28px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.keys div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
}
.keys span {
  color: var(--fg-soft);
}

/* downloads */
.dl {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.dl a {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--fg);
}
.dl a:hover {
  border-color: var(--accent);
}
.dl a.you {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.dl b {
  display: block;
  font-size: 17px;
}
.dl span {
  color: var(--muted);
  font-size: 14px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
}
