/* Design plan
   Concept: tilework meets ticker tape. A lapis-dark market terminal framed by khatam (eight-point star) geometry.
   Colour : lapis ink backgrounds, firouzeh (turquoise) for "up" and actions, saffron for emphasis, rose-red for "down".
   Type   : Bricolage Grotesque (display), Instrument Sans (text), Vazirmatn (Persian), JetBrains Mono (data).
   Layout : full-bleed bands, one 1200px column, hero = copy + live order-book panel, everything else in calm grids. */

:root {
  color-scheme: dark;
  --bg: #0a1020;
  --bg-2: #0e1730;
  --surface: #111c3a;
  --surface-2: #16234a;
  --line: #22305a;
  --line-2: #2c3d70;
  --ink: #e8eef9;
  --ink-2: #b6c3e0;
  --muted: #8fa1c7;
  --teal: #2ec4b6;
  --teal-ink: #062a27;
  --saffron: #f5b53d;
  --red: #f0556a;
  --lapis: #5b7cfa;
  --code-bg: #0a1230;
  --glow: rgba(46, 196, 182, 0.14);
  --s1: #3987e5; /* categorical slot 1 (validated palette, dark step) */
  --s2: #d95926; /* slot 2 */
  --s3: #199e70; /* slot 3 */
  --grid: #2c2c2a;
  --font-display: "Bricolage Grotesque", "Vazirmatn", "Segoe UI", system-ui, sans-serif;
  --font-text: "Instrument Sans", "Vazirmatn", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 14px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f3f6fc;
    --bg-2: #e9eef9;
    --surface: #ffffff;
    --surface-2: #f0f4fb;
    --line: #d5ddee;
    --line-2: #c3cee6;
    --ink: #0b1530;
    --ink-2: #34426b;
    --muted: #5f6e95;
    --teal: #0e9488;
    --teal-ink: #ffffff;
    --saffron: #b87500;
    --red: #d6334a;
    --lapis: #3454d1;
    --code-bg: #0b1530;
    --glow: rgba(14, 148, 136, 0.12);
    --s1: #2a78d6;
    --s2: #eb6834;
    --s3: #1baf7a;
    --grid: #e1e0d9;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fc;
  --bg-2: #e9eef9;
  --surface: #ffffff;
  --surface-2: #f0f4fb;
  --line: #d5ddee;
  --line-2: #c3cee6;
  --ink: #0b1530;
  --ink-2: #34426b;
  --muted: #5f6e95;
  --teal: #0e9488;
  --teal-ink: #ffffff;
  --saffron: #b87500;
  --red: #d6334a;
  --lapis: #3454d1;
  --code-bg: #0b1530;
  --glow: rgba(14, 148, 136, 0.12);
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --grid: #e1e0d9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:lang(fa) body, html[lang="fa"] body { font-family: "Vazirmatn", var(--font-text); line-height: 1.85; }
html[lang="fa"] .display, html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3 { font-family: "Vazirmatn", var(--font-display); letter-spacing: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }
code, pre, .mono { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
section { padding-block: clamp(56px, 8vw, 104px); position: relative; }
.band { background: var(--bg-2); border-block: 1px solid var(--line); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron);
  margin: 0 0 14px;
}
html[lang="fa"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 14px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 62ch; margin: 18px 0 0; }
.section-head { max-width: 780px; margin-bottom: clamp(32px, 4vw, 52px); }

/* ------------------------------------------------------------------ nav */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
.nav { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-family: var(--font-display); font-size: 18px; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; gap: 20px; margin-inline-start: auto; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--ink-2); padding: 6px 2px; }
.nav-links a:hover { color: var(--ink); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn, .pill-btn {
  appearance: none; border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  height: 36px; min-width: 36px; padding: 0 12px; border-radius: 999px; cursor: pointer; font: 600 13px var(--font-text);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.icon-btn:hover, .pill-btn:hover { background: var(--surface); }
.star-count { font-family: var(--font-mono); font-size: 12px; color: var(--saffron); }
@media (max-width: 860px) { .nav-links { display: none; } .nav-tools { margin-inline-start: auto; } }
.brand { white-space: nowrap; }
@media (max-width: 520px) { .nav { gap: 10px; } .brand { font-size: 15px; gap: 7px; } .brand svg { width: 26px; height: 26px; } .gh-label { display: none; } .pill-btn { padding: 0 10px; } .nav-tools { gap: 6px; } }

/* ------------------------------------------------------------------ ticker */
.tape { border-bottom: 1px solid var(--line); background: var(--bg); overflow: hidden; direction: ltr; }
.tape-track { display: flex; gap: 38px; width: max-content; padding: 9px 0; animation: tape 70s linear infinite; font-family: var(--font-mono); font-size: 13px; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-item { display: inline-flex; gap: 10px; white-space: nowrap; }
.tape-item b { font-family: var(--font-text); color: var(--ink); font-weight: 700; direction: rtl; unicode-bidi: isolate; }
.up { color: var(--teal); } .down { color: var(--red); }
@keyframes tape { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------ hero */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 7vw, 100px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image: url("assets/tiles.svg"); background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 70% 80% at 85% 20%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 85% 20%, #000 0%, transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 64px); align-items: center; position: relative; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { font-size: clamp(40px, 6.4vw, 78px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero .lead { margin-top: 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; align-items: center; }
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none; font: 700 15px var(--font-text);
  padding: 13px 22px; border-radius: 12px; display: inline-flex; align-items: center; gap: 9px;
}
.btn-primary { background: var(--teal); color: var(--teal-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--surface); }

.cmd {
  display: flex; align-items: stretch; margin-top: 26px; max-width: 640px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--code-bg); overflow: hidden; direction: ltr;
}
.cmd code { flex: 1; min-width: 0; padding: 13px 16px; font-size: 13.5px; color: #dbe6ff; white-space: pre-wrap; word-break: break-all; line-height: 1.55; }
.cmd .prompt { color: var(--saffron); user-select: none; margin-right: 8px; }
.copy {
  appearance: none; border: 0; border-left: 1px solid var(--line-2); background: #0f1a3d; color: #b6c3e0; cursor: pointer;
  padding: 0 16px; font: 600 12.5px var(--font-text); min-width: 78px;
}
.copy:hover { background: #162350; color: #fff; }
.copy.done { color: var(--teal); }
.works { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; }
.chip { border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 11px; font-size: 13px; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 60%, transparent); }

/* order-book panel */
.panel {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--bg-2) 96%, transparent));
  border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--glow); overflow: hidden; direction: ltr;
}
.panel-head { display: flex; align-items: baseline; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head .sym { font: 800 22px "Vazirmatn", var(--font-display); }
.panel-head .nm { color: var(--muted); font-size: 13px; }
.panel-head .live { margin-inline-start: auto; display: inline-flex; gap: 7px; align-items: center; font: 500 12px var(--font-mono); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 var(--teal); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.panel-price { display: flex; align-items: baseline; gap: 14px; padding: 18px 20px 6px; }
.panel-price .p { font: 700 40px var(--font-mono); letter-spacing: -0.03em; }
.badge { font: 600 13px var(--font-mono); padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal); }
.badge.neg { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); }
.ladder { padding: 8px 20px 14px; display: grid; gap: 4px; font: 12.5px var(--font-mono); }
.lvl { display: grid; grid-template-columns: 68px 1fr 92px; align-items: center; gap: 12px; height: 22px; }
.lvl .px { color: var(--muted); text-align: right; }
.lvl .bar { height: 14px; border-radius: 3px; transition: width 0.9s cubic-bezier(.3, .7, .2, 1); }
.lvl.ask .bar { background: var(--red); opacity: 0.85; } .lvl.bid .bar { background: var(--teal); opacity: 0.85; }
.lvl .vol { color: var(--ink-2); font-size: 11.5px; }
.mid { height: 1px; background: var(--line-2); margin: 6px 0; }
.panel-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.panel-stats div { padding: 14px 20px; border-inline-end: 1px solid var(--line); }
.panel-stats div:last-child { border-inline-end: 0; }
.panel-stats dt { font: 500 11px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 0; }
.panel-stats dd { margin: 4px 0 0; font: 700 17px var(--font-mono); }
.snap { padding: 8px 20px 14px; font: 11px var(--font-mono); color: var(--muted); }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: clamp(40px, 6vw, 72px); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: color-mix(in srgb, var(--surface) 60%, transparent); direction: ltr; }
.stats > div { padding: 22px 24px; border-inline-end: 1px solid var(--line); }
.stats > div:last-child { border-inline-end: 0; }
.stats b { display: block; font: 800 clamp(26px, 3.4vw, 38px) var(--font-display); letter-spacing: -0.03em; }
.stats span { color: var(--muted); font-size: 14px; }
html[lang="fa"] .stats { direction: rtl; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } .stats > div:nth-child(2) { border-inline-end: 0; } .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* ------------------------------------------------------------------ problem cards */
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .cards3 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0 0 14px; color: var(--ink-2); font-size: 15.5px; }
.snippet { background: var(--code-bg); color: #cfdcff; border-radius: 10px; padding: 12px 14px; font: 12.5px/1.6 var(--font-mono); overflow-x: auto; direction: ltr; text-align: left; white-space: pre; margin: 0; }
.snippet .bad { color: #ff8a9a; } .snippet .good { color: #62e0d3; } .snippet .dim { color: #7f92bd; }

/* ------------------------------------------------------------------ compare terminals */
.versus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .versus { grid-template-columns: minmax(0, 1fr); } }
.term { border-radius: 16px; border: 1px solid var(--line-2); background: var(--code-bg); overflow: hidden; direction: ltr; min-width: 0; }
.term header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #1b2a57; color: #9fb1da; font: 600 13px var(--font-text); }
.term header i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #f0556a; }
.term header i:nth-child(2) { background: #f5b53d; } .term header i:nth-child(3) { background: #2ec4b6; }
.term header span { margin-inline-start: 8px; }
.term header button { margin-inline-start: auto; }
.term pre { margin: 0; padding: 18px 18px 22px; font: 13px/1.75 var(--font-mono); color: #cfdcff; min-height: 330px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.term pre .p { color: #f5b53d; } .term pre .ok { color: #62e0d3; } .term pre .no { color: #ff8a9a; } .term pre .dim { color: #7f92bd; }
.term.bad { box-shadow: inset 0 3px 0 var(--red); } .term.good { box-shadow: inset 0 3px 0 var(--teal); }
.mini { font: 600 12px var(--font-text); padding: 5px 11px; border-radius: 999px; border: 1px solid #2c3d70; background: transparent; color: #b6c3e0; cursor: pointer; }
.mini:hover { background: #162350; }

/* ------------------------------------------------------------------ benchmarks */
.bench-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .bench-grid { grid-template-columns: minmax(0, 1fr); } }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; min-width: 0; direction: ltr; }
.chart-card h3 { font-size: 18px; } .chart-card .sub { color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
html[lang="fa"] .chart-card { direction: rtl; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-inline-end: 7px; vertical-align: -1px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; direction: ltr; }
.chart text { font-family: var(--font-text); fill: var(--ink-2); }
.chart .val { font-family: var(--font-mono); font-size: 11.5px; fill: var(--ink); }
.chart .tick { font-family: var(--font-mono); font-size: 10.5px; fill: var(--muted); }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
html[data-theme="dark"] .chart .gridline, :root:not([data-theme="light"]) .chart .gridline { stroke: var(--line); }
.chart .bar { cursor: default; }
.chart .bar:hover { filter: brightness(1.12); }
.tooltip {
  position: fixed; z-index: 100; pointer-events: none; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 8px 11px; font: 12.5px/1.5 var(--font-text); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); max-width: 260px;
}
.tooltip b { font-family: var(--font-mono); }
details.tbl { margin-top: 12px; font-size: 13px; color: var(--muted); }
details.tbl summary { cursor: pointer; }
.table-wrap { overflow-x: auto; margin-top: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: start; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
td.num { font-family: var(--font-mono); text-align: end; }
.traps { margin-top: 22px; }
.trap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; font-size: 14.5px; }
.trap:last-child { border-bottom: 0; }
.trap .k { font: 600 11px var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); display: block; margin-bottom: 4px; }
.trap .wrong { color: var(--red); font-family: var(--font-mono); } .trap .right { color: var(--teal); font-family: var(--font-mono); }
@media (max-width: 760px) { .trap { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.note { color: var(--muted); font-size: 14px; max-width: 80ch; margin-top: 18px; }
.note a { color: var(--teal); }
.scr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 24px; align-items: start; margin-bottom: 22px; }
@media (max-width: 900px) { .scr-grid { grid-template-columns: minmax(0, 1fr); } }
.scr-chat { display: grid; gap: 12px; min-width: 0; }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.bubble .who { display: block; font: 600 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.bubble p { margin: 0; color: var(--ink); font-size: 16.5px; line-height: 1.7; }
.bubble.agent { border-color: var(--line-2); box-shadow: inset 3px 0 0 var(--teal); }
.bubble.agent pre { margin: 0; font: 13.5px/1.7 var(--font-mono); color: #cfdcff; background: var(--code-bg); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; direction: ltr; text-align: left; }
.scr-meta { margin: 0; color: var(--muted); font: 13px var(--font-mono); direction: ltr; text-align: left; }
.scr-table td { white-space: nowrap; }
.scr-table th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
.scr-table td, .scr-table th { padding: 10px 11px; }
.scr-table td.num { font-family: var(--font-mono); text-align: right; direction: ltr; }
.scr-table .up { color: var(--teal); }
.scr-cards { margin-top: 6px; }
.agent-table td.bar-cell { min-width: 150px; }
.hbar { display: inline-block; height: 10px; border-radius: 3px; vertical-align: middle; margin-inline-end: 8px; }

/* ------------------------------------------------------------------ install */
.install { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.clients { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.clients .group { flex-basis: 100%; margin: 10px 0 0; font: 500 11.5px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--saffron); }
.clients .group:first-child { margin-top: 0; }
html[lang="fa"] .clients .group { letter-spacing: 0; text-transform: none; font-size: 13px; }
.client-btn {
  appearance: none; text-align: start; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 9px 14px; border-radius: 999px;
  cursor: pointer; font: 600 14px var(--font-text); display: inline-flex; align-items: center; gap: 9px;
}
.client-btn:hover { border-color: var(--line-2); color: var(--ink); }
.client-btn[aria-selected="true"] { background: color-mix(in srgb, var(--teal) 14%, var(--surface)); border-color: var(--teal); color: var(--ink); }
.client-btn small { color: var(--teal); font: 600 10.5px var(--font-mono); letter-spacing: 0.04em; }
.install-pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.install-pane h3 { margin-bottom: 4px; }
.install-pane .row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.code { position: relative; margin-top: 14px; direction: ltr; }
.code pre { margin: 0; background: var(--code-bg); color: #cfdcff; border-radius: 12px; padding: 16px 18px; font: 13px/1.7 var(--font-mono); overflow-x: auto; border: 1px solid #1b2a57; }
.code .copy { position: absolute; top: 10px; right: 10px; border: 1px solid #2c3d70; border-radius: 8px; min-width: 0; padding: 6px 12px; background: #0f1a3d; }
.install-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
@media (max-width: 900px) { .install-top { grid-template-columns: minmax(0, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.step h3 { font-size: 16px; margin-bottom: 8px; } .step p { margin: 0 0 10px; font-size: 14.5px; color: var(--ink-2); }
.step .cmd { margin-top: 8px; }
.step .cmd code { font-size: 12px; padding: 10px 12px; }
.step .copy { min-width: 64px; }

/* ------------------------------------------------------------------ examples */
.examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .examples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .examples { grid-template-columns: minmax(0, 1fr); } }
.ex { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ex q { font: 600 17px/1.7 "Vazirmatn", var(--font-text); quotes: none; direction: rtl; text-align: right; display: block; }
.ex .tools { display: flex; flex-wrap: wrap; gap: 6px; direction: ltr; margin-top: auto; }
.ex .tools span { font: 12px var(--font-mono); padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--teal); border: 1px solid var(--line); }
.ex p { margin: 0; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------------ tools */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.search { flex: 1; min-width: 220px; max-width: 420px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); border-radius: 10px; padding: 10px 14px; font: 500 15px var(--font-text); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.seg button { appearance: none; background: transparent; border: 0; color: var(--ink-2); padding: 9px 14px; cursor: pointer; font: 600 13.5px var(--font-text); border-inline-end: 1px solid var(--line); }
.seg button:last-child { border-inline-end: 0; }
.seg button[aria-pressed="true"] { background: color-mix(in srgb, var(--teal) 16%, var(--surface)); color: var(--ink); }
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tools-grid { grid-template-columns: minmax(0, 1fr); } }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.tool[open] { border-color: var(--teal); grid-column: span 1; }
.tool summary { cursor: pointer; list-style: none; }
.tool summary::-webkit-details-marker { display: none; }
.tool .n { font: 700 14.5px var(--font-mono); color: var(--teal); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; direction: ltr; }
.tool .n small { font: 500 10.5px var(--font-mono); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.tool .d { margin: 7px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.tool .params { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 13px; color: var(--muted); direction: ltr; text-align: left; }
.tool .params b { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }
.tool .params i { color: var(--saffron); font-style: normal; }

/* ------------------------------------------------------------------ trust */
.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .trust { grid-template-columns: minmax(0, 1fr); } }
.fact { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.fact .ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--teal); font: 800 16px var(--font-mono); }
.fact h3 { font-size: 17px; margin-bottom: 4px; } .fact p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ------------------------------------------------------------------ faq / footer */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font: 700 18px var(--font-display); list-style: none; display: flex; justify-content: space-between; gap: 18px; }
html[lang="fa"] .faq summary { font-family: "Vazirmatn", var(--font-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 24px var(--font-mono); color: var(--teal); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 12px 0 0; color: var(--ink-2); max-width: 74ch; }
footer { border-top: 1px solid var(--line); padding-block: 44px 56px; color: var(--muted); font-size: 14.5px; }
.foot { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .foot a { text-decoration: none; } .foot a:hover { color: var(--ink); }
.disclaimer { margin-top: 28px; max-width: 90ch; font-size: 13.5px; }
.cta-final { text-align: center; }
.tour { display: block; width: 100%; max-width: 880px; margin: 30px auto 6px; border-radius: 16px; border: 1px solid var(--line-2); background: #000; aspect-ratio: 16 / 9; }
.cta-final .cmd { margin-inline: auto; } .cta-final .cta-row { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .tape-track { animation: none; }
}

/* ------------------------------------------------------------------ launch film */
.film-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.film-stage { width: 100%; margin-inline: auto; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); background: #000; box-shadow: 0 30px 80px -34px rgba(0, 0, 0, 0.7); }
.film-stage[data-ratio="tall"] { aspect-ratio: 9 / 16; max-width: min(100%, 340px); }
.film-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.film-toggle { display: flex; width: max-content; max-width: 100%; gap: 4px; margin: 16px auto 0; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; }
.film-toggle .seg { appearance: none; border: 0; background: transparent; color: var(--ink-2); font: 600 14px var(--font-text); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.film-toggle .seg:hover { color: var(--ink); }
.film-toggle .seg[aria-pressed="true"] { background: var(--teal); color: var(--teal-ink); }
.film-note { margin: 14px auto 0; max-width: 62ch; text-align: center; font-size: 13px; color: var(--muted); }
.film-panels { display: grid; gap: 16px; min-width: 0; }
.film-card { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 20px 22px; min-width: 0; }
.film-sub { margin: 6px 0 14px; color: var(--muted); font-size: 14px; }
.dl-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px 10px; align-items: center; }
.dl-l { font-size: 14px; font-weight: 600; color: var(--ink-2); padding-inline-end: 8px; }
.dl-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink); text-decoration: none; font: 700 14px var(--font-text); }
.dl-btn small { color: var(--muted); font-weight: 500; font-size: 12px; font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; }
.dl-btn:hover { background: var(--surface-2); border-color: var(--teal); }
.film-subs { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.film-subs a { color: var(--teal); }
.share-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.share-btn { appearance: none; cursor: pointer; text-decoration: none; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink); font: 600 14px var(--font-text); }
.share-btn:hover { background: var(--surface-2); border-color: var(--teal); }
.share-btn.primary { background: var(--teal); color: var(--teal-ink); border-color: var(--teal); }
.share-btn[hidden] { display: none; }
.film-label { display: block; margin: 4px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.film-card textarea { width: 100%; resize: vertical; min-height: 92px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--code-bg); color: var(--ink); font: 14px/1.7 var(--font-text); }
.film-card textarea.mono { min-height: 76px; font: 12.5px/1.55 var(--font-mono); direction: ltr; text-align: left; }
.film-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mini-btn { appearance: none; cursor: pointer; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: transparent; color: var(--ink); font: 600 13px var(--font-text); }
.mini-btn:hover { background: var(--surface-2); }
.mini-btn.done { color: var(--teal); border-color: var(--teal); }
@media (max-width: 960px) { .film-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .film-card { padding: 16px; } .dl-grid { grid-template-columns: 1fr 1fr; } .dl-l { grid-column: 1 / -1; padding-top: 6px; } }
