/* Shabnam (Farsi-digits cut, SIL Open Font License) is self-hosted for the Farsi page; files live in /fonts. */
@font-face { font-family: "Shabnam"; font-weight: 400; font-display: swap; src: url("/fonts/Shabnam-FD.woff2") format("woff2"), url("/fonts/Shabnam-FD.woff") format("woff"); }
@font-face { font-family: "Shabnam"; font-weight: 500; font-display: swap; src: url("/fonts/Shabnam-Medium-FD.woff2") format("woff2"), url("/fonts/Shabnam-Medium-FD.woff") format("woff"); }
@font-face { font-family: "Shabnam"; font-weight: 700; font-display: swap; src: url("/fonts/Shabnam-Bold-FD.woff2") format("woff2"), url("/fonts/Shabnam-Bold-FD.woff") format("woff"); }

:root {
  --bg: #070914;
  --bg-2: #0b0f1f;
  --surface: #111629;
  --surface-2: #161c33;
  --border: rgba(148, 163, 255, 0.12);
  --border-strong: rgba(148, 163, 255, 0.22);
  --text: #eef1ff;
  --muted: #9aa3c7;
  --faint: #6b7397;
  --blue: #38bdf8;
  --indigo: #6366f1;
  --violet: #8b5cf6;
  --green: #34d399;
  --grad: linear-gradient(135deg, #38bdf8 0%, #6366f1 55%, #8b5cf6 100%);
  --radius: 18px;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.mono { font-family: var(--mono); }
.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 40px); }
.muted { color: var(--muted); }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(99, 102, 241, .8); }
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgba(99, 102, 241, 1); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn .size { font-weight: 500; opacity: .75; font-size: 13px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 20, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 30px; align-self: stretch; }
.nav-links a {
  position: relative; display: flex; align-items: center; height: 100%;
  color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
/* Current section: brighter label plus a gradient bar sitting on the header's bottom border. */
.nav-links a::after {
  content: ""; position: absolute; inset-inline: -4px; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--grad); transform: scaleX(0); opacity: 0; transition: transform .25s ease, opacity .25s ease;
}
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { color: var(--muted); font-size: 14px; font-weight: 600; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); transition: color .2s, border-color .2s; }
.lang-switch:hover { color: var(--text); border-color: var(--border-strong); }

/* Hero */
.hero { position: relative; padding: 96px 0 110px; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5; pointer-events: none; }
.glow-a { width: 560px; height: 560px; background: #2563eb; top: -220px; left: -160px; opacity: .35; }
.glow-b { width: 520px; height: 520px; background: #7c3aed; top: 40px; right: -180px; opacity: .3; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .04);
  color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
h1 { font-size: clamp(44px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -.035em; margin: 22px 0 22px; font-weight: 800; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 540px; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { margin: 18px 0 0; color: var(--faint); font-size: 14px; }

/* Hero visual (app mock) */
.hero-visual { position: relative; min-height: 520px; }
.menubar {
  display: flex; align-items: center; gap: 14px; height: 34px; padding: 0 14px;
  border-radius: 12px; background: rgba(22, 28, 51, .75); border: 1px solid var(--border);
  backdrop-filter: blur(10px); font-size: 13px; color: var(--muted);
}
.menubar-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--grad); opacity: .8; }
.menubar-spacer { flex: 1; }
.menubar-item { display: inline-flex; align-items: center; gap: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .08); color: var(--text); }
.menubar-clock { font-weight: 600; color: var(--text); }
.flag { font-size: 17px; line-height: 1; }
.speed-lines { display: inline-flex; flex-direction: column; font-family: var(--mono); font-size: 9.5px; line-height: 1.15; font-weight: 500; }
.speed-lines b, .speed-pill b { font-weight: 600; }
.dl { color: var(--green); }
.ul { color: var(--blue); }

.popover {
  position: absolute; top: 52px; right: 8px; width: 340px;
  padding: 16px; border-radius: 20px;
  background: rgba(17, 22, 41, .9); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); backdrop-filter: blur(20px);
}
.pop-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pop-flag { font-size: 42px; line-height: 1; }
.pop-country { font-weight: 700; font-size: 18px; }
.pop-city { color: var(--muted); font-size: 13px; }
.pop-refresh { margin-left: auto; color: var(--muted); font-size: 18px; }
.pop-card { background: rgba(255, 255, 255, .035); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.pop-title { font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 3px 0; }
.row > span:first-child { color: var(--muted); }
.row .mono { font-size: 12.5px; }
.badge { font-style: normal; font-size: 10.5px; font-weight: 700; color: #7dd3fc; background: rgba(56, 189, 248, .15); padding: 2px 7px; border-radius: 999px; margin-right: 4px; }
.pop-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--faint); }
.pop-btn { background: rgba(255, 255, 255, .08); border: 1px solid var(--border-strong); color: var(--text); padding: 3px 10px; border-radius: 7px; font-weight: 600; }

.toast {
  display: flex; align-items: center; gap: 12px; width: 290px;
  padding: 12px 14px; border-radius: 16px;
  background: rgba(22, 28, 51, .92); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.hero-visual .toast { position: absolute; left: -10px; bottom: -18px; animation: float 6s ease-in-out infinite; }
.toast-flag { font-size: 30px; line-height: 1; }
.toast-title { font-weight: 700; font-size: 14px; }
.toast-sub { color: var(--muted); font-size: 12px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Sections */
.section { padding: 96px 0; position: relative; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 14px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  display: block; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border); transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.feature-card h3 { margin: 18px 0 8px; font-size: 20px; letter-spacing: -.01em; }
.feature-card p { margin: 0; color: var(--muted); font-size: 15px; }
.icon-chip { width: 46px; height: 46px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 8px 24px -8px rgba(99, 102, 241, .9); }
.icon-chip svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Detail blocks */
.stack { display: grid; gap: 28px; }
.detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  padding: 48px; border-radius: 24px; background: var(--bg-2); border: 1px solid var(--border);
}
.detail.reverse .detail-copy { order: 2; }
.kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.detail h3 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -.025em; margin: 10px 0 14px; }
.detail p { color: var(--muted); margin: 0 0 18px; font-size: 16.5px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-inline-start: 30px; color: var(--text); font-size: 15px; }
.checks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm-1.6 17.2-5-5 1.8-1.8 3.2 3.2 6.8-6.8 1.8 1.8-8.6 8.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm-1.6 17.2-5-5 1.8-1.8 3.2 3.2 6.8-6.8 1.8 1.8-8.6 8.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.detail-visual {
  min-height: 260px; border-radius: 18px; display: grid; place-items: center; padding: 28px;
  background:
    radial-gradient(60% 80% at 30% 20%, rgba(56, 189, 248, .14), transparent 70%),
    radial-gradient(60% 80% at 80% 90%, rgba(139, 92, 246, .16), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
}
.toast-static { width: auto; max-width: 320px; }

.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 380px; }
.mini { background: rgba(255, 255, 255, .04); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.mini span { display: block; font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.mini b { font-size: 15px; font-weight: 600; }

.speed-demo { display: grid; gap: 18px; justify-items: center; }
.speed-pill {
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 12px;
  background: rgba(7, 9, 20, .7); border: 1px solid var(--border-strong);
}
.speed-pill .speed-lines { font-size: 12px; }
.speed-pill.single { font-family: var(--mono); font-size: 13px; gap: 14px; }

.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; max-width: 420px; }
.gauge { text-align: center; padding: 18px 8px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); }
.gauge span { display: block; font-size: 12px; color: var(--faint); margin-bottom: 6px; }
.gauge b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.gauge small { font-size: 12px; color: var(--muted); font-weight: 600; }

.widgets { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: center; }
.widget { border-radius: 22px; background: rgba(255, 255, 255, .06); border: 1px solid var(--border-strong); padding: 16px; height: 160px; box-shadow: var(--shadow); }
.widget.small { width: 160px; display: flex; flex-direction: column; }
.widget.medium { width: 320px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.w-flag { font-size: 40px; line-height: 1; }
.widget.small .w-country { margin-top: auto; }
.w-left { display: flex; flex-direction: column; }
.w-left .w-country { margin-top: auto; }
.w-country { font-weight: 700; font-size: 16px; }
.w-ip, .w-city { color: var(--muted); font-size: 12px; }
.w-right { display: flex; flex-direction: column; font-size: 12px; }
.w-right span { color: var(--faint); font-size: 10.5px; }
.w-right b { font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-right small { margin-top: auto; color: var(--faint); font-size: 10.5px; }

/* Interactive "Make it yours" demo. Colours come from --d-* so the Theme control can restyle it. */
.settings-demo {
  --d-win: rgba(7, 9, 20, .72); --d-text: var(--text); --d-muted: var(--muted); --d-border: var(--border-strong);
  --d-track: rgba(255, 255, 255, .16); --d-chip: rgba(255, 255, 255, .06); --d-active: rgba(255, 255, 255, .14);
  position: relative; width: 100%; max-width: 340px; display: grid; gap: 12px;
}
.settings-demo[data-theme-resolved="light"] {
  --d-win: #f6f7fb; --d-text: #141832; --d-muted: #5d6380; --d-border: rgba(20, 24, 50, .12);
  --d-track: rgba(20, 24, 50, .2); --d-chip: rgba(20, 24, 50, .07); --d-active: #fff;
}
.demo-menubar, .settings-mock {
  background: var(--d-win); border: 1px solid var(--d-border); color: var(--d-text);
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.demo-menubar .menubar-clock { color: var(--d-text); }
.demo-menubar { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; }
.demo-speed { max-width: 110px; overflow: hidden; white-space: nowrap; transition: max-width .3s ease, opacity .25s ease; }
.settings-demo[data-live-speed="off"] .demo-speed { max-width: 0; opacity: 0; }
.settings-demo[data-theme-resolved="light"] .demo-speed .dl { color: #059669; }
.settings-demo[data-theme-resolved="light"] .demo-speed .ul { color: #0284c7; }
.settings-mock { display: grid; gap: 10px; padding: 16px; border-radius: 16px; }
.set-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 3px 0; border: 0; background: none;
  color: inherit; font: inherit; font-size: 14px; text-align: start; cursor: pointer;
}
.tog { width: 34px; height: 20px; border-radius: 999px; background: var(--d-track); position: relative; flex: none; transition: background .2s; }
.tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: left .2s ease; }
.set-row[aria-checked="true"] .tog { background: var(--grad); }
.set-row[aria-checked="true"] .tog::after { left: 16px; }
.seg { display: flex; background: var(--d-chip); border-radius: 10px; padding: 3px; }
.seg button {
  flex: 1; padding: 5px 0; border: 0; border-radius: 8px; background: none; color: var(--d-muted);
  font: inherit; font-size: 13px; cursor: pointer; transition: background .2s, color .2s;
}
.seg button:hover { color: var(--d-text); }
.seg button[aria-checked="true"] { background: var(--d-active); color: var(--d-text); font-weight: 600; }
.settings-demo[data-theme-resolved="light"] .seg button[aria-checked="true"] { box-shadow: 0 1px 3px rgba(20, 24, 50, .15); }
.set-row:focus-visible, .seg button:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }
/* Drops in at the top-right, where macOS shows notifications. */
.demo-toast {
  position: absolute; top: 40px; right: -24px; width: 290px; transform: translateY(-10px); opacity: 0;
  pointer-events: none; transition: opacity .3s ease, transform .3s ease; z-index: 2;
}
.demo-toast.show { opacity: 1; transform: translateY(0); }
.settings-demo[data-theme-resolved="light"] .demo-toast { background: rgba(255, 255, 255, .96); border-color: var(--d-border); color: var(--d-text); }
.settings-demo[data-theme-resolved="light"] .demo-toast .toast-sub { color: var(--d-muted); }
.demo-hint { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--faint); font-size: 14px; }
.demo-hint::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); flex: none; }
/* "Show live speed" off also hides the speeds in the hero's menu bar preview. */
html.no-live-speed .menubar-item .speed-lines { display: none; }

/* Download */
.download::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 60% at 50% 0%, rgba(99, 102, 241, .16), transparent 70%);
}
.dl-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 920px; margin: 0 auto; }
.dl-card {
  display: flex; flex-direction: column; gap: 14px; padding: 30px; border-radius: 22px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
}
.dl-soon:not(.dl-card-wide) .soon-pill { align-self: flex-start; margin-top: auto; }
.dl-card-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; }
.dl-card-wide .dl-os { margin-bottom: 0; }
.dl-ext-icon { fill: none !important; stroke: var(--text); stroke-width: 1.6; stroke-linejoin: round; }
.dl-soon { border-style: dashed; border-color: var(--border-strong); }
.dl-soon .dl-os { opacity: .85; }
.soon-pill {
  flex: none; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
  color: #c4b5fd; background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .35);
}
.dl-card.recommended { border-color: rgba(99, 102, 241, .6); box-shadow: 0 0 0 1px rgba(99, 102, 241, .25), 0 30px 60px -30px rgba(99, 102, 241, .6); }
.dl-os { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.dl-os svg { width: 42px; height: 42px; fill: var(--text); flex: none; }
.dl-os h3 { margin: 0; font-size: 22px; }
.dl-os p { margin: 0; color: var(--muted); font-size: 14px; }
.dl-card .recommended-tag { display: none; }
/* Two-line buttons (label + size) so the Mac and Windows rows match in height. */
.btn.btn-stack { flex-direction: column; gap: 2px; height: auto; min-height: 62px; padding: 10px 16px; line-height: 1.25; white-space: normal; text-align: center; }
.btn.btn-stack .size { font-size: 12.5px; }
.dl-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Pinned to the bottom so both cards end at the same line. */
.howto { margin-top: auto; padding-top: 6px; color: var(--muted); font-size: 14px; }
.howto summary { cursor: pointer; color: var(--text); font-weight: 600; list-style: none; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: " +"; color: var(--faint); }
.howto[open] summary::after { content: " –"; }
.howto ol { margin: 10px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { border-radius: 16px; background: var(--bg-2); border: 1px solid var(--border); padding: 0 22px; transition: border-color .2s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 36px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 26px; }
.footer nav a { color: var(--muted); font-size: 14px; }
.footer nav a:hover { color: var(--text); }
.copyright { margin: 0; color: var(--faint); font-size: 14px; }

/* Responsive */
@media (max-width: 960px) {
  .hero { padding: 64px 0 80px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { min-height: 500px; max-width: 460px; width: 100%; margin: 0 auto; }
  .cards-3 { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; padding: 32px; gap: 28px; }
  .detail.reverse .detail-copy { order: 0; }
  .dl-grid { grid-template-columns: 1fr; }
}
.detail > *, .dl-card, .hero-inner > * { min-width: 0; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .btn-block { white-space: normal; height: auto; min-height: 48px; padding: 12px 18px; flex-wrap: wrap; row-gap: 2px; text-align: center; }
  .dl-card { padding: 22px; }
  .dl-card-wide { flex-direction: column; align-items: flex-start; }
  .dl-buttons { gap: 8px; }
  .dl-buttons .btn.btn-stack { padding: 10px 6px; font-size: 14px; }
  .dl-buttons .btn.btn-stack .size { font-size: 11.5px; }
  .section { padding: 72px 0; }
  .hero-visual { min-height: 0; }
  .popover { position: relative; top: auto; right: auto; width: 100%; margin-top: 14px; }
  .hero-visual .toast { position: relative; left: auto; bottom: auto; width: 100%; margin-top: 14px; animation: none; }
  .detail { padding: 24px; border-radius: 20px; }
  .widget.medium { width: 100%; }
  .gauges { grid-template-columns: 1fr; }
  .gauge b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-visual .toast { animation: none; }
  .btn, .feature-card { transition: none; }
}

/* Farsi (RTL). App mockups keep dir="ltr" because the app UI is English. */
html[dir="rtl"] { --font: "Shabnam", Tahoma, system-ui, sans-serif; }
html[dir="rtl"] body { line-height: 1.9; }
html[dir="rtl"] [dir="ltr"] { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.6; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] .brand, html[dir="rtl"] .eyebrow, html[dir="rtl"] .kicker { letter-spacing: 0; }
html[dir="rtl"] h1 { line-height: 1.3; font-size: clamp(40px, 5.8vw, 68px); }
html[dir="rtl"] h2 { line-height: 1.45; }
html[dir="rtl"] .detail h3 { line-height: 1.5; }
html[dir="rtl"] .kicker { font-size: 14px; }
html[dir="rtl"] .faq summary { font-size: 16.5px; }
html[dir="rtl"] .brand span { font-family: "Inter", system-ui, sans-serif; }
.lang-switch[lang="fa"] { font-family: "Shabnam", Tahoma, system-ui, sans-serif; }
.nowrap { white-space: nowrap; }
/* The Farsi-numerals font would turn Latin digits in product names (x64, macOS 14) into Persian digits. */
html[dir="rtl"] bdi { font-family: "Inter", system-ui, sans-serif; }

/* Live visitor line: the visitor's own country and IP, from /api/geo. */
.visitor {
  display: inline-flex; align-items: center; gap: 10px; margin: 22px 0 0; padding: 8px 14px 8px 12px;
  border-radius: 999px; background: rgba(52, 211, 153, .08); border: 1px solid rgba(52, 211, 153, .25);
  font-size: 14px; color: var(--muted); max-width: 100%;
}
.visitor[hidden] { display: none; }
.visitor b { color: var(--text); font-weight: 600; }
.visitor .mono { color: var(--text); font-size: 13px; }
.visitor-label { min-width: 0; overflow-wrap: anywhere; }
.visitor-flag, .geo-flag { display: inline-block; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.visitor-flag { width: 24px; height: 18px; flex: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.flag .geo-flag { width: 20px; height: 15px; vertical-align: -2px; }
.pop-flag .geo-flag { width: 48px; height: 36px; border-radius: 5px; }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
