:root {
  color-scheme: light;
  --bg: #F6F3EA;
  --panel: #fffdf8;
  --panel2: #ebe7dc;
  --text: #1C1A17;
  --muted: #5b554d;
  --line: #d5d0c4;
  --telegram: #78a9ba;
  --telegram-ink: #356b80;
  --accent: #b1593c;
  --accent-deep: #99503a;
  --accent-soft: #f1e1d8;
  --map-bg: #f0ede3;
  --map-text: #1C1A17;
  --map-muted: #696258;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.55; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 12px; inset-inline-start: 12px; z-index: 20; padding: 10px 14px; transform: translateY(-160%); background: var(--accent); color: #1c1a17; transition: transform .2s ease; }
.skip:focus { transform: translateY(0); }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; height: 76px; align-items: center; justify-content: space-between; padding-inline: max(24px, calc((100% - var(--max)) / 2)); border-bottom: 1px solid var(--line); background: var(--bg); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(14px); }
@media (min-width: 1001px) { .topbar { gap: 24px; justify-content: flex-start; } .header-tools { order: 3; } .nav { order: 2; margin-inline-start: auto; } }
.header-tools { display: flex; align-items: center; gap: 8px; }
.header-tools > .language-menu, .header-tools > #theme-toggle { display: none; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 20px; font-weight: 700; letter-spacing: -.03em; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; min-width: 0; align-items: center; gap: 21px; }
.nav a { display: flex; min-height: 40px; align-items: center; padding: 7px 0; color: var(--muted); font: 500 14px var(--sans); text-decoration: none; }
.theme-toggle { padding: 7px 11px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); color: var(--muted); font: 500 14px var(--sans); cursor: pointer; }
.nav a:hover, .theme-toggle:hover, .footer a:hover { color: var(--accent-deep); }
.theme-toggle { min-height: 38px; }
.language-menu { position: relative; }
.language-toggle { display: inline-flex; min-width: 68px; min-height: 44px; align-items: center; justify-content: center; gap: 6px; padding: 7px 9px; }
.language-toggle svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.5; }
.language-toggle .language-chevron { width: 12px; height: 12px; transition: transform .16s ease; }
.language-toggle[aria-expanded="true"] .language-chevron { transform: rotate(180deg); }
.language-current { font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.language-options { position: absolute; z-index: 15; top: calc(100% + 8px); inset-inline-end: 0; display: grid; width: max-content; min-width: 156px; gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 8px 24px color-mix(in srgb, var(--text) 14%, transparent); }
.language-options[hidden] { display: none; }
.language-options button { position: relative; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: 500 14px var(--sans); text-align: start; cursor: pointer; }
.language-options button:hover, .language-options button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-deep); }
.language-options button[lang="ar"] { text-align: right; }
.language-options button[aria-pressed="true"]::after { content: "✓"; position: absolute; inset-inline-end: 16px; font-size: 12px; }
.language-options button:focus-visible { outline-offset: -2px; }
.floating-tools { position: fixed; z-index: 30; inset-inline-end: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: 0 8px 28px color-mix(in srgb, var(--text) 16%, transparent); backdrop-filter: blur(12px); }
.floating-tools { max-width: calc(100vw - 20px); }
.floating-tools > .floating-language { flex: 0 0 auto; }
.floating-icon { display: inline-flex; width: 44px; height: 44px; flex: 0 0 auto; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--muted); text-decoration: none; cursor: pointer; }
.floating-icon:hover, .floating-icon:focus-visible { border-color: var(--line); background: var(--panel2); color: var(--accent-deep); }
.floating-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.floating-tools > .floating-language { display: block; }
.floating-language { position: relative; }
.floating-language .language-options { top: auto; right: auto; bottom: calc(100% + 12px); inset-inline-end: 0; max-width: calc(100vw - 20px); border-radius: 16px; }
.floating-tools .language-toggle { min-width: 74px; min-height: 44px; border-radius: 999px; }
.floating-tools .language-toggle svg:first-child { width: 18px; height: 18px; }
.floating-tools .language-options { min-width: 144px; }
.floating-tools #theme-toggle-float { padding: 0; }
.floating-tools #theme-toggle-float svg { display: block; width: 22px; height: 22px; }
.install-panel > .copy-status { display: none; }
.nav button { cursor: pointer; }
.nav-cta { padding: 8px 15px !important; border: 1px solid var(--line) !important; border-radius: 3px; color: var(--text) !important; }
.nav-toggle { display: none; }

.hero { display: grid; min-height: 610px; grid-template-columns: .87fr 1.13fr; gap: 48px; align-items: center; padding-block: 64px 72px; }
.eyebrow { margin: 0 0 18px; color: var(--accent-deep); font: 600 11px/1.5 var(--mono); letter-spacing: .09em; }
h1, h2, h3 { min-width: 0; overflow-wrap: break-word; }
.hero h1 { max-width: 580px; margin: 0; font-size: clamp(50px, 5vw, 68px); line-height: .96; letter-spacing: -.045em; }
.hero h1 em { color: var(--accent-deep); font-style: normal; }
.lede { max-width: 450px; margin: 24px 0 27px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 21px; }
.button { padding: 10px 17px; border: 1px solid var(--line); font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .2s ease, border-color .2s ease, background-color .2s ease; }
.button:hover { transform: translateY(-2px); border-color: var(--accent-deep); }
.primary { border-color: var(--accent); background: var(--accent); color: #1c1a17; }
.secondary { color: var(--text); }
.micro { margin-top: 25px; color: var(--muted); font-size: 12px; }
.micro > span { margin-inline: 8px; }
.micro > span:empty { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--accent-deep); vertical-align: middle; }
.map-stage { min-width: 0; overflow: auto; border: 1px solid var(--line); background: var(--map-bg); box-shadow: 8px 8px 0 var(--panel2); -webkit-overflow-scrolling: touch; }
.map-stage { direction: ltr; }
.flow-map { display: block; width: 100%; min-width: 620px; height: auto; }
.map-caption { position: sticky; left: 0; width: max-content; min-width: 100%; background: var(--map-bg); }
.map-stage:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }
.contour { fill: none; stroke: #b6b0a5; stroke-width: 1; opacity: .63; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.7s ease forwards; }
.contour-b { animation-delay: .23s; }
.route-line { fill: none; stroke: var(--telegram-ink); stroke-width: 1.6; stroke-dasharray: 6 7; opacity: .8; animation: routeDash 18s linear infinite; }
.map-node .node-halo { fill: var(--telegram); opacity: .18; transform-box: fill-box; transform-origin: center; animation: pulse 2.6s ease-in-out infinite; }
.map-node .node-dot { fill: var(--telegram-ink); stroke: #fffdf8; stroke-width: 2; }
.map-node.active .node-dot { r: 13; stroke-width: 4; }
.map-node.active .node-halo { r: 29; opacity: .35; }
.map-label { fill: var(--map-text); font: 600 14px var(--mono); letter-spacing: .04em; }
.map-small, .coordinate { fill: var(--map-muted); font: 12px var(--mono); letter-spacing: .04em; }
.flow-packet-dot { fill: var(--telegram-ink); filter: drop-shadow(0 0 4px #9ac4cf); }
.flow-packet-dot.reverse { fill: var(--accent-deep); }
.map-caption { display: flex; justify-content: space-between; gap: 8px; padding: 10px 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.map-indicator { white-space: nowrap; }

.manifesto { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; padding-block: 82px 90px; border-top: 1px solid var(--line); }
.manifesto h2, .section-heading h2, .showcase h2, .security h2, .install h2 { margin: 0; font-size: clamp(36px, 4.5vw, 54px); line-height: 1.02; letter-spacing: -.045em; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; }
.steps article { padding-top: 13px; border-top: 1px solid var(--line); }
.step-no, .cap > span { color: var(--accent-deep); font-size: 13px; }
.steps h3, .cap h3 { margin: 18px 0 8px; font-size: 19px; }
.steps p, .cap p, .section-heading > p:not(.eyebrow), .showcase-copy > p:not(.eyebrow), .install > div > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 15px; }
.capabilities { padding-block: 74px 95px; border-top: 1px solid var(--line); }
.section-heading { max-width: 680px; margin-bottom: 38px; }
.section-heading h2 { margin-bottom: 17px; }
.cap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cap { min-height: 190px; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .2s ease; }
.cap:hover { background: var(--panel); }
.cap h3 { margin-top: 31px; }

.showcase { display: grid; grid-template-columns: minmax(0, 1fr) .75fr; gap: 100px; align-items: center; padding-block: 80px 96px; border-top: 1px solid var(--line); }
.showcase-copy > p:not(.eyebrow) { max-width: 430px; margin-top: 18px; }
.keyboard { display: grid; max-width: 420px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 26px; }
.keyboard span { padding: 8px 10px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; text-align: center; }
.phone { width: 100%; max-width: 370px; justify-self: center; padding: 22px; border: 1px solid var(--line); background: var(--panel); box-shadow: 12px 12px 0 var(--panel2); }
.phone-title { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-weight: 700; }
.phone-title small { color: var(--muted); font-size: 11px; font-weight: 500; }
.phone-label { margin: 20px 0 10px; color: var(--muted); font-size: 12px; }
.provider { display: flex; width: 100%; justify-content: space-between; margin: 5px 0; padding: 11px 12px; border: 1px solid var(--line); background: transparent; color: var(--text); font: 15px var(--sans); text-align: start; cursor: pointer; }
.provider.selected, .provider:hover { border-color: var(--accent-deep); background: var(--accent-soft); }
.model-preview { display: flex; min-height: 74px; flex-direction: column; justify-content: center; gap: 4px; margin-top: 8px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.model-preview span { color: var(--muted); font-size: 12px; }
.model-preview b { font-size: 15px; }
.phone-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.phone-controls button { min-height: 40px; padding: 8px; border: 1px solid transparent; background: var(--panel2); color: var(--text); font-size: 13px; cursor: pointer; }
.phone-controls button:hover { border-color: var(--accent-deep); color: var(--accent-deep); }

.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hero-badges span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font: 500 12px/1.4 var(--sans); color: var(--muted); background: var(--panel); }
.hero-badges .badge-accent { border-color: #30b3ef; color: #0284c7; background: #e0f2fe; font-weight: 600; }
.badge-termux { border-color: #10b981 !important; color: #059669 !important; background: #ecfdf5 !important; font-weight: 600; }
html[data-theme="dark"] .hero-badges .badge-accent { border-color: #38bdf8; color: #7dd3fc; background: #082f49; }
html[data-theme="dark"] .badge-termux { border-color: #34d399 !important; color: #6ee7b7 !important; background: #064e3b !important; }

#session-node:hover .node-dot { r: 15; fill: #30b3ef; }
#session-node:hover .node-halo { r: 34; opacity: .45; }
#session-node:focus-visible { outline: 2px solid #30b3ef; outline-offset: 4px; }

.phone-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0 14px; background: var(--panel2); padding: 4px; border-radius: 8px; }
.mode-tab { border: none; background: transparent; padding: 7px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 6px; transition: background .16s, color .16s; }
.mode-tab.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.agent-switch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.agent-btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 9px 8px; font-size: 12px; font-weight: 500; cursor: pointer; border-radius: 6px; text-align: center; transition: all .16s; }
.agent-btn.selected, .agent-btn:hover { border-color: #30b3ef; color: #0284c7; background: #e0f2fe; font-weight: 600; }
html[data-theme="dark"] .agent-btn.selected, html[data-theme="dark"] .agent-btn:hover { border-color: #38bdf8; color: #7dd3fc; background: #082f49; }

.chat-sim { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; font-size: 13px; }
.chat-sim-user { align-self: flex-end; background: var(--telegram-ink); color: #fff; padding: 6px 12px; border-radius: 12px 12px 2px 12px; font-family: var(--mono); font-size: 12px; }
.chat-sim-bot { background: var(--panel2); border: 1px solid var(--line); padding: 10px 12px; border-radius: 12px 12px 12px 2px; }
.chat-sim-header { font-weight: 700; color: #0284c7; margin-bottom: 4px; font-size: 13px; }
html[data-theme="dark"] .chat-sim-header { color: #38bdf8; }
.chat-sim-status { color: var(--text); font-size: 12px; line-height: 1.4; margin-bottom: 6px; }
.chat-sim-meta { color: var(--muted); font-size: 11px; font-family: var(--mono); }
html[dir="rtl"] .chat-sim-user { align-self: flex-start; border-radius: 12px 12px 12px 2px; }
html[dir="rtl"] .chat-sim-bot { border-radius: 12px 12px 2px 12px; text-align: right; }

.integrations { padding-block: 74px 90px; border-top: 1px solid var(--line); }
.integrations .section-heading > p:not(.eyebrow) { max-width: 620px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.table-wrap:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }
table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: start; }
th, td { padding: 13px 17px; border-bottom: 1px solid var(--line); font-size: 14px; text-align: start; }
th { background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--accent-deep); font-weight: 600; }
.commands { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; padding-block: 70px 90px; border-top: 1px solid var(--line); }
.command-list > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 15px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.command-list code { color: var(--accent-deep); font: 13px var(--mono); }
.command-list span { color: var(--muted); font-size: 14px; }
.security { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; padding-block: 86px 95px; border-top: 1px solid var(--line); }
.security-head a { display: inline-block; margin-top: 25px; color: var(--accent-deep); font-size: 15px; text-decoration: none; }
.security-list { margin: 0; padding: 0; list-style: none; }
.security-list li { position: relative; padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.security-list li::before { position: absolute; top: 21px; left: 1px; width: 6px; height: 6px; border: 1px solid var(--accent-deep); content: ""; }
.install { display: grid; grid-template-columns: .9fr 1.1fr; gap: 85px; padding-block: 80px 95px; border-top: 1px solid var(--line); }
.install-intro { align-self: start; }
.install-method { display: flex; gap: 13px; margin-top: 25px; padding: 16px; border-inline-start: 2px solid var(--telegram); background: color-mix(in srgb, var(--telegram) 10%, var(--panel)); }
.install-method-mark { color: var(--telegram-ink); font: 600 18px var(--mono); }
.install-method strong { font-size: 14px; }
.install-method p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.install-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.install-badges span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); font-size: 12px; }
.install-repo { display: inline-block; margin-top: 24px; }
.install-note { max-width: 42ch; margin-top: 18px !important; font-size: 13px !important; }
.install-note::before { display: inline-block; width: 6px; height: 6px; margin-inline-end: 8px; border-radius: 50%; background: var(--telegram-ink); content: ""; vertical-align: middle; }
.install-panel { min-width: 0; padding: 26px 28px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 16px 40px color-mix(in srgb, var(--text) 10%, transparent); }
.install-panel h3 { margin: 0 0 12px; font-size: 20px; }
.install-panel > p { max-width: 58ch; margin-block: 10px 16px; line-height: 1.7; }
.install-panel > .install-command { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 12px; padding: 10px; border: 1px solid color-mix(in srgb, var(--telegram) 48%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--telegram) 9%, var(--panel)); }
.install-panel > .install-command code { overflow-wrap: anywhere; padding: 10px 12px; border-radius: 8px; background: var(--panel); color: var(--text); font-size: 12px; line-height: 1.8; }
.install-panel > .install-command .copy-button { flex-shrink: 0; }
.install-steps { margin: 0; padding: 0; list-style: none; }
.install-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 13px; padding: 16px 0; border-top: 1px solid var(--line); }
.install-number { color: var(--accent-deep); font: 12px var(--mono); }
.install-steps li strong { display: block; margin-bottom: 8px; font-size: 15px; }
.install-steps li p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.install-command { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.install-command code { min-width: 0; color: var(--text); font: 12px/1.5 var(--mono); overflow-wrap: anywhere; unicode-bidi: isolate; }
.copy-button { display: inline-flex; min-width: 116px; min-height: 48px; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; border: 1px solid var(--telegram-ink); border-radius: 9px; background: var(--telegram); color: #102229; font-size: 14px; font-weight: 700; letter-spacing: .01em; cursor: pointer; transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.copy-button:hover { border-color: var(--telegram-ink); background: color-mix(in srgb, var(--telegram) 80%, white); color: #102229; }
.copy-button:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
.copy-button svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.install-links { display: flex; flex-wrap: wrap; gap: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.install-links a { color: var(--accent-deep); font-size: 13px; text-decoration: none; }
.install-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.copy-status { min-height: 1.5em; margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px 38px; border-top: 1px solid var(--line); }
.footer p { color: var(--muted); font-size: 14px; }
.footer > div { display: flex; flex-wrap: wrap; gap: 18px; }
.footer > div a { color: var(--muted); font-size: 14px; text-decoration: none; }
.footer > div a { display: inline-flex; min-height: 40px; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
html[dir="rtl"] .security-head a span:last-child { display: inline-block; transform: scaleX(-1); }
html[dir="rtl"] .install-command { direction: ltr; }
html[dir="rtl"] .install-steps li { grid-template-columns: minmax(0, 1fr) 34px; }
html[dir="rtl"] .install-number { grid-column: 2; grid-row: 1; }
html[dir="rtl"] .install-steps li > div { grid-column: 1; grid-row: 1; }
html[dir="rtl"] .install-note { text-align: right; }
html[dir="rtl"] .map-stage, html[dir="rtl"] .install-panel { box-shadow: -8px 8px 0 var(--panel2); }
html[dir="rtl"] .map-stage { scroll-padding-inline: 8px; }
html[dir="rtl"] .language-options { direction: rtl; }
html[dir="rtl"] .phone { box-shadow: -12px 12px 0 var(--panel2); }
html[dir="rtl"] .install-method-mark { transform: scaleX(-1); }
html[dir="rtl"] th, html[dir="rtl"] td { text-align: right; }

#main:focus { outline: none; }
::selection { background: var(--accent-soft); color: var(--text); }

:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }
.nav-toggle:focus-visible, .provider:focus-visible, .phone-controls button:focus-visible { outline-offset: 2px; }
.reveal { opacity: 1; transform: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes routeDash { to { stroke-dashoffset: -260; } }
@keyframes pulse { 50% { transform: scale(1.45); opacity: .08; } }

html[data-theme="dark"] { color-scheme: dark; --bg: #171817; --panel: #20211f; --panel2: #292a26; --text: #f2eee5; --muted: #c5beb1; --line: #45453f; --accent: #db8b6b; --accent-deep: #e79b7b; --accent-soft: #392922; --map-bg: #272823; --map-text: #f2eee5; --map-muted: #c5beb1; --telegram: #83b8c4; --telegram-ink: #9bc8d5; }
html[data-theme="dark"] .primary, html[data-theme="dark"] .skip { color: #171817; }
html[data-theme="dark"] .map-stage { box-shadow: 8px 8px 0 var(--panel2); }
html[data-theme="dark"][dir="rtl"] .map-stage { box-shadow: -8px 8px 0 var(--panel2); }
html[data-theme="dark"] .map-node .node-dot { stroke: #272823; }
html[data-theme="dark"] .flow-packet-dot.reverse { fill: var(--accent); }

html[dir="rtl"] body { font-family: Tahoma, Arial, var(--sans); }
html[dir="rtl"] .hero h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; }
html[dir="rtl"] .eyebrow, html[dir="rtl"] .map-label, html[dir="rtl"] .map-small, html[dir="rtl"] .coordinate { letter-spacing: 0; font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif; }
html[dir="rtl"] .hero h1 { line-height: 1.2; }
html[dir="rtl"] h2 { line-height: 1.2; }
html[dir="rtl"] .lede, html[dir="rtl"] .steps p, html[dir="rtl"] .cap p { line-height: 1.8; }
html[dir="rtl"] .nav { direction: rtl; }
html[dir="rtl"] .button, html[dir="rtl"] .phone-controls button { direction: rtl; }
html[dir="rtl"] .provider { text-align: start; }
html[dir="rtl"] table { text-align: start; }
html[dir="rtl"] .security-list li { padding: 12px 22px 12px 0; }
html[dir="rtl"] .security-list li::before { right: 1px; left: auto; }
html[dir="rtl"] .command-list code { direction: ltr; text-align: left; unicode-bidi: isolate; }
html[dir="rtl"] .command-list > div { grid-template-columns: minmax(0, 1fr) 140px; }
html[dir="rtl"] .command-list code { grid-column: 2; grid-row: 1; }
html[dir="rtl"] .command-list span { grid-column: 1; grid-row: 1; }
html[dir="rtl"] .flow-map { direction: ltr; }
html[dir="rtl"] .map-caption { direction: rtl; }
html[dir="rtl"] .provider, html[dir="rtl"] .phone-title > span { direction: ltr; unicode-bidi: isolate; }

@media (max-width: 1000px) {
  .floating-tools > .floating-language { display: block; }
  .topbar { padding-inline: 24px; }
  .header-tools { gap: 8px; }
.nav-toggle { display: flex; width: 44px; height: 44px; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
  .nav-toggle span { width: 16px; height: 1px; background: currentColor; transition: transform .2s ease; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav { position: absolute; top: 76px; inset-inline: 0; display: none; max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain; align-items: stretch; flex-direction: column; gap: 4px; padding: 16px 24px 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
  .nav.open { display: flex; }
  .nav a { display: flex; min-height: 44px; align-items: center; padding: 8px 10px; font-size: 15px; }
  .nav-cta { min-height: 44px; }
  .nav-cta { align-self: flex-start; }
  html[dir="rtl"] .nav-cta { align-self: flex-start; }
  html[dir="rtl"] .nav-toggle { margin-inline-start: 0; }
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 35px; padding-block: 54px 60px; }
  .hero-copy { max-width: 680px; }
  .map-stage { width: min(100%, 720px); justify-self: center; }
  .manifesto { grid-template-columns: 1fr; gap: 30px; }
  .security, .install { grid-template-columns: 1fr; gap: 30px; }
  .commands { grid-template-columns: 1fr; gap: 20px; }
  .command-list { margin-top: 0; }
  .command-list > div { grid-template-columns: 120px minmax(0, 1fr); }
  html[dir="rtl"] .command-list > div { grid-template-columns: minmax(0, 1fr) 120px; }
  .showcase { gap: 45px; }
  .steps { grid-template-columns: 1fr; }
  .steps article { padding-block: 12px; }
  .steps h3 { margin-block: 8px; }
}
@media (prefers-color-scheme: dark) {
  html[data-theme="dark"] .copy-button { color: #102229; }
}
@media (min-width: 1001px) {
  .floating-tools { inset-inline-end: max(24px, calc((100vw - var(--max)) / 2)); bottom: 24px; }
}
@media (max-width: 760px) {
  .topbar { height: 65px; padding-inline: 24px; }
  .wrap { width: calc(100% - 48px); }
  .header-tools { display: flex; align-items: center; gap: 7px; }
  .nav { top: 65px; max-height: calc(100vh - 65px); max-height: calc(100dvh - 65px); gap: 8px; padding: 18px; }
  .nav.open { display: flex; }
  .nav a { min-height: 44px; padding: 9px 10px; font-size: 15px; text-align: start; }
  html[dir="rtl"] .nav a { text-align: right; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 38px; padding-block: 53px 60px; }
  .hero h1 { font-size: clamp(49px, 11vw, 64px); }
  .lede { max-width: 54ch; margin-block: 21px 24px; }
  .map-stage { width: 100%; box-shadow: 6px 6px 0 var(--panel2); }
  .flow-map { width: 100%; min-width: 0; height: auto; max-height: none; }
  .map-label { font-size: 14px; }
  .map-small { font-size: 12px; }
  .manifesto, .commands, .security, .install { display: block; padding-block: 60px; }
  .manifesto h2 { margin-bottom: 34px; }
  .steps { gap: 12px; }
  .capabilities, .integrations, .showcase { padding-block: 60px; }
  .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap { min-height: 175px; padding: 16px; }
  .cap h3 { margin-top: 24px; font-size: 18px; }
  .cap p { font-size: 14px; }
  .showcase { display: grid; grid-template-columns: 1fr; gap: 35px; }
  .phone { justify-self: stretch; max-width: none; }
  .integrations { padding-bottom: 60px; }
  .command-list { margin-top: 25px; }
  .command-list > div { grid-template-columns: 110px minmax(0, 1fr); gap: 8px; }
  .security-list { margin-top: 28px; }
  .install-panel { min-width: 0; margin-top: 28px; padding: 20px 16px 14px; }
  .install-method { margin-top: 18px; }
  .footer { flex-wrap: wrap; }
  .footer p { order: 3; width: 100%; margin: 4px 0 0; }
  html[dir="rtl"] .command-list > div { grid-template-columns: minmax(0, 1fr) 110px; }
}
@media (max-width: 390px) {
  .header-tools { gap: 5px; }
  .brand { gap: 7px; font-size: 18px; }
  .brand img { width: 29px; height: 29px; }
  .floating-tools { inset-inline-end: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); gap: 2px; padding: 4px; }
  .floating-icon { width: 40px; height: 40px; }
  .floating-icon svg { width: 19px; height: 19px; }
  .floating-tools .language-toggle { min-width: 69px; min-height: 44px; gap: 3px; padding-inline: 6px; }
}
@media (max-width: 340px) {
  .floating-tools { inset-inline-end: max(8px, env(safe-area-inset-right)); gap: 2px; padding: 4px; }
  .floating-icon { width: 36px; height: 44px; }
  .floating-tools .language-toggle { min-width: 64px; min-height: 44px; }
  .floating-tools .language-options { inset-inline-end: 0; }
}
@media (max-width: 360px) {
  .topbar { gap: 8px; padding-inline: 18px; }
  .header-tools { gap: 4px; }
  .nav-toggle { width: 40px; height: 44px; }
  html[dir="rtl"] .command-list code,
  html[dir="rtl"] .command-list span { grid-row: auto; }
}
@media (max-width: 560px) {
  .install-panel { padding: 18px 14px 14px; }
  .install-panel > p { font-size: 14px; }
  .install-panel > .install-command { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .install-panel > .install-command code { font-size: 11px; line-height: 1.55; }
  .install-panel > .install-command .copy-button { justify-self: stretch; }
  .install-steps .install-command { align-items: flex-start; flex-direction: column; }
  .install-steps .copy-button { align-self: flex-start; }
  html[dir="rtl"] .install-steps .copy-button { align-self: flex-end; }
}
@media (max-width: 1000px) {
  .install-panel > .install-command { grid-template-columns: minmax(0, 1fr); padding: 6px; }
  .install-panel > .install-command .copy-button { justify-self: stretch; }
}
@media (max-width: 420px) {
  .wrap { width: calc(100% - 36px); }
  .hero h1 { font-size: 49px; }
  .cap-grid { grid-template-columns: 1fr; }
  .cap { min-height: 0; }
  .cap h3 { margin-top: 14px; }
  .command-list > div { grid-template-columns: 92px minmax(0, 1fr); }
  html[dir="rtl"] .command-list > div { grid-template-columns: minmax(0, 1fr) 92px; }
  .map-caption { font-size: 11px; }
  .footer > div { gap: 12px; }
}
@media (max-width: 360px) {
  .brand span { display: none; }
  .hero h1 { font-size: 44px; }
  .install-panel { padding: 14px 10px 10px; }
  .install-panel > .install-command { padding: 6px; }
  .install-panel > .install-command code { font-size: 10px; word-break: break-all; }
  .command-list > div { grid-template-columns: 1fr; gap: 3px; }
  html[dir="rtl"] .command-list > div { grid-template-columns: 1fr; }
  html[dir="rtl"] .command-list code, html[dir="rtl"] .command-list span { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .flow-packet-dot { opacity: .85; }
}
