/*
  ServerStellar — page chrome: public site header/footer, signed-in app shell, landing page, dashboard widgets.
  Builds on the tokens and components in app.css. Logical properties throughout so RTL and LTR share one sheet.
*/

/* Tokens repeated here so the page chrome never depends on app.css being refreshed at the same moment */
:root { --accent-2: #7c4dff; --grad: linear-gradient(135deg, #3358e0 0%, #7c4dff 100%); --shadow-sm: 0 1px 2px rgba(17, 24, 39, .06); --shadow-md: 0 8px 24px -8px rgba(17, 24, 39, .14), 0 2px 6px rgba(17, 24, 39, .05); --shadow-lg: 0 24px 48px -16px rgba(51, 88, 224, .28); --sidebar-w: 248px; }
:root[data-theme="dark"] { --accent-2: #a58bff; --grad: linear-gradient(135deg, #5b7cff 0%, #8f6bff 100%); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, .5); --shadow-lg: 0 24px 48px -16px rgba(91, 124, 255, .3); }
.hide-sm { display: inline-flex; }
.spacer { flex: 1; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text); font-weight: 600; font-size: 17px; }
.brand:hover { color: var(--text); }
.brand img { width: 28px; height: 28px; border-radius: var(--r-md); }

.btn { box-shadow: var(--shadow-sm); }
.btn.ghost { box-shadow: none; }
.btn.primary { background-color: #4f46e5; background-image: var(--grad); border-color: transparent; color: #fff; }
.btn.primary:hover { background-image: var(--grad); filter: brightness(1.08); border-color: transparent; color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #fff; }
.btn .ic { width: 16px; height: 16px; }
.card { box-shadow: var(--shadow-sm); }
a.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .15s var(--ease); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text-2); cursor: pointer; line-height: 1; transition: background-color .15s var(--ease), color .15s var(--ease); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .ic { width: 18px; height: 18px; }

/* ---------- Public site header ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .container { display: flex; align-items: center; gap: var(--s8); height: 64px; }
.nav { display: flex; align-items: center; gap: var(--s1); flex: 1; }
.nav a { color: var(--text-2); padding: 0 var(--s3); line-height: 36px; border-radius: var(--r-md); transition: background-color .15s var(--ease), color .15s var(--ease); }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav-mobile-only { display: none; }
.top-actions { display: flex; align-items: center; gap: var(--s2); }
.menu-btn { display: none !important; }
.balance-chip { display: inline-flex; align-items: center; gap: var(--s2); padding: 0 var(--s3); line-height: 34px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); background: var(--surface); font-size: 13px; transition: border-color .15s var(--ease); }
.balance-chip:hover { border-color: var(--line-strong); color: var(--text); }
.balance-chip b { color: var(--text); font-weight: 600; }
.balance-chip .ic { color: var(--accent); }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex !important; }
  .hide-sm { display: none; }
  .topbar .container { gap: var(--s3); height: 60px; }
  .nav { display: none; position: absolute; top: 60px; inset-inline: 0; flex-direction: column; align-items: stretch; padding: var(--s2) var(--s6) var(--s4); background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); }
  .nav.open { display: flex; }
  .nav a { line-height: 44px; }
  .nav-mobile-only { display: block; }
  .spacer-mobile { flex: 1; }
}

/* ---------- Public site footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: var(--s12) var(--s6); color: var(--text-2); font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: var(--s8); }
.footer-grid h4 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: var(--s3); }
.footer-grid a { display: block; color: var(--text-2); line-height: 2.2; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid .brand { display: inline-flex; margin-bottom: var(--s3); }
.footer-about p { max-width: 300px; }
.footer-base { margin-top: var(--s10); padding-top: var(--s5); border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s8); } .footer-about { grid-column: 1 / -1; } }

/* ---------- Signed-in app shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; align-self: flex-start; height: 100vh; flex: none; width: var(--sidebar-w);
  display: flex; flex-direction: column; gap: var(--s5); padding: var(--s5) var(--s4);
  background: var(--surface); border-inline-end: 1px solid var(--line); overflow-y: auto;
}
.sidebar .brand { padding-inline: var(--s2); }
.side-cta { height: 42px; }
.side-nav { display: grid; gap: var(--s1); }
.side-nav a { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s3); line-height: 40px; border-radius: var(--r-md); color: var(--text-2); font-weight: 500; transition: background-color .15s var(--ease), color .15s var(--ease); }
.side-nav a .ic { width: 18px; height: 18px; color: var(--text-3); transition: color .15s var(--ease); }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); }
.side-nav a.active .ic { color: var(--accent); }
.side-foot { margin-top: auto; display: grid; gap: var(--s3); }
.side-wallet { display: grid; gap: var(--s1); padding: var(--s4); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.side-wallet b { font-size: 18px; font-weight: 600; margin-bottom: var(--s2); }
.side-link { display: flex; align-items: center; gap: var(--s2); color: var(--text-3); padding: 0 var(--s2); font-size: 12px; }
.side-link:hover { color: var(--accent); }
.shell-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shell-body > main { flex: 1; }
.app-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: var(--s3); height: 60px; padding-inline: var(--s6); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.app-foot { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; padding: var(--s5) var(--s6); border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; }
.app-foot .links { display: flex; gap: var(--s5); flex-wrap: wrap; }
.app-foot a { color: var(--text-2); }
.shell-scrim { display: none; }
.shell .page { padding-block: var(--s8) var(--s12); }
.shell .container { max-width: 1120px; padding-inline: var(--s6); }

@media (max-width: 900px) {
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 90; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-md); }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: none; }
  .shell-scrim { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(10, 12, 16, .5); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
  body.nav-open .shell-scrim { opacity: 1; pointer-events: auto; }
  .app-top { padding-inline: var(--s4); }
  .app-top .balance-chip { display: inline-flex; }
  .shell .container { padding-inline: var(--s4); }
  .app-foot { padding-inline: var(--s4); }
}
@media (max-width: 480px) { .app-top .btn.ghost { display: none; } }

/* ---------- Dashboard ---------- */
.welcome { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s6); }
.welcome h1 { font-size: 24px; font-weight: 600; }
.welcome p { color: var(--text-2); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); margin-bottom: var(--s6); }
@media (max-width: 1000px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-card { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s5); }
.stat-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent); }
.stat-ico .ic { width: 22px; height: 22px; }
.stat-ico.ok { background: var(--ok-soft); color: var(--ok); }
.stat-ico.warn { background: var(--warn-soft); color: var(--warn); }
.stat-ico.violet { background: color-mix(in srgb, var(--accent-2) 14%, transparent); color: var(--accent-2); }
a.icon-btn { color: var(--text-2); }
a.icon-btn:hover { color: var(--text); }
.stat-card > div:last-child { min-width: 0; }
.stat-card .label { color: var(--text-3); font-size: 12px; }
.stat-card .value { font-size: 22px; font-weight: 600; line-height: 1.5; }
.stat-card .sub { font-size: 12px; color: var(--text-3); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 15px; font-weight: 600; }
.server-item { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); color: inherit; transition: background-color .15s var(--ease); }
.server-item:last-child { border-bottom: 0; }
.server-item:hover { background: var(--surface-2); color: inherit; }
.server-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface-2); color: var(--text-2); }
.server-item .name { font-weight: 600; color: var(--text); }
.server-item .meta { display: flex; gap: var(--s3); flex-wrap: wrap; color: var(--text-3); font-size: 12px; }
.server-item .go { color: var(--text-3); }
[dir="rtl"] .server-item .go, [dir="rtl"] .arrow-ic { transform: scaleX(-1); }
.quick-grid { display: grid; gap: var(--s2); padding: var(--s3); }
.quick { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r-md); color: var(--text); transition: background-color .15s var(--ease); }
.quick:hover { background: var(--surface-2); color: var(--text); }
.quick .stat-ico { width: 38px; height: 38px; border-radius: var(--r-md); }
.quick .stat-ico .ic { width: 18px; height: 18px; }
.quick b { display: block; font-weight: 600; }
.quick span.s { color: var(--text-3); font-size: 12px; }
.tx-item { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); }
.tx-item:last-child { border-bottom: 0; }
.tx-item .d { color: var(--text-3); font-size: 12px; }
.tx-amount { font-weight: 600; white-space: nowrap; }
.tx-amount.in { color: var(--ok); }
.panel .empty { padding: var(--s10) var(--s5); }
.empty-ico { width: 56px; height: 56px; margin: 0 auto var(--s4); display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.empty-ico .ic { width: 26px; height: 26px; }
.skeleton { position: relative; overflow: hidden; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 7%, transparent), transparent); animation: shimmer 1.3s infinite; }
[dir="rtl"] .skeleton::after { animation-direction: reverse; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Page headings inside the shell */
.shell .page-head h1 { font-size: 24px; font-weight: 600; }
.shell .table th { background: var(--surface-2); }
.shell .table th:first-child { border-start-start-radius: 0; }

/* ---------- Landing ---------- */
.lp-hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); padding-block: var(--s10); }
.lp-hero > .container { width: 100%; }
.lp-hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 640px; z-index: -1; background: radial-gradient(40% 50% at 30% 30%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%), radial-gradient(35% 45% at 75% 20%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%); }
.lp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%); mask-image: linear-gradient(to bottom, #000, transparent 75%); opacity: .6; }
.lp-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s12); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s2); padding: 4px var(--s3); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; margin-bottom: var(--s5); }
.lp-hero h1 { font-size: 46px; line-height: 1.45; font-weight: 700; text-wrap: balance; }
.lp-hero h1 em { font-style: normal; color: var(--accent); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) { .lp-hero h1 em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; } }
.lp-hero .lead { margin-top: var(--s5); color: var(--text-2); font-size: 17px; max-width: 520px; }
.lp-cta { display: flex; gap: var(--s3); margin-top: var(--s8); flex-wrap: wrap; }
.lp-cta .btn.lg { height: 52px; padding-inline: var(--s8); }
.lp-trust { display: flex; gap: var(--s6); flex-wrap: wrap; margin-top: var(--s8); color: var(--text-2); font-size: 13px; }
.lp-trust span { display: inline-flex; align-items: center; gap: var(--s2); }
.lp-trust .ic { color: var(--ok); width: 16px; height: 16px; }
@media (max-width: 960px) { .lp-grid { grid-template-columns: 1fr; gap: var(--s10); } .lp-hero h1 { font-size: 34px; } .lp-hero { padding-block: var(--s10); min-height: calc(100svh - 60px); } }

.hero-card { border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.hero-card-bar { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.hero-card-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.hero-card-bar span { margin-inline-start: auto; font-size: 12px; color: var(--text-3); }
.hero-card .row-s { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s4); align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.hero-card .row-s b { font-weight: 600; }
.hero-card .row-s .mono { display: block; color: var(--text-3); direction: ltr; unicode-bidi: isolate; text-align: start; }
[dir="rtl"] .hero-card .row-s .mono { text-align: right; }
.hero-term { direction: ltr; text-align: left; padding: var(--s4); font-family: var(--mono); font-size: 12.5px; line-height: 2; color: var(--text-2); background: #0d1117; color: #c9d1d9; }
.hero-term .p { color: #7ee787; }
.hero-term .d { color: #8b949e; }
.hero-term .cur { display: inline-block; width: 7px; height: 14px; background: #c9d1d9; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.hero-stats div { padding: var(--s3) var(--s4); border-inline-start: 1px solid var(--line); }
.hero-stats div:first-child { border-inline-start: 0; }
.hero-stats b { display: block; font-size: 16px; font-weight: 600; }
.hero-stats span { font-size: 11px; color: var(--text-3); }

.lp-section { padding-block: var(--s16); }
.lp-section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.lp-head { text-align: center; max-width: 620px; margin: 0 auto var(--s10); }
.lp-head .eyebrow { margin-bottom: var(--s3); }
.lp-head h2 { font-size: 32px; font-weight: 700; text-wrap: balance; }
.lp-head p { text-wrap: balance; margin-top: var(--s3); color: var(--text-2); font-size: 15px; }
@media (max-width: 700px) { .lp-section { padding-block: var(--s12); } .lp-head h2 { font-size: 26px; } }

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 1060px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; display: flex; flex-direction: column; gap: var(--s5); padding: var(--s6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); }
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.plan.featured { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.plan .tag { position: absolute; top: -11px; inset-inline-start: var(--s6); padding: 0 var(--s3); line-height: 22px; border-radius: 999px; background-color: #4f46e5; background-image: var(--grad); color: #fff; white-space: nowrap; box-shadow: var(--shadow-sm); font-size: 11px; font-weight: 600; }
.plan-price { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.plan-price .from { font-size: 12px; color: var(--text-3); width: 100%; }
.plan-price b { font-size: 26px; font-weight: 700; line-height: 1.3; }
.plan-price span { color: var(--text-3); font-size: 13px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.plan li { display: flex; align-items: center; gap: var(--s3); color: var(--text-2); }
.plan li .ic { color: var(--accent); width: 18px; height: 18px; }
.plan li b { color: var(--text); font-weight: 600; }
.plan .btn { margin-top: auto; }
.note { text-align: center; color: var(--text-3); font-size: 12px; margin-top: var(--s5); }

.locs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s3); }
.loc { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.loc:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
a.loc { color: var(--text); }
.loc img.emoji { width: 32px; height: 32px; flex: none; }
.loc b { display: block; font-weight: 600; line-height: 1.5; }
.loc span { font-size: 12px; color: var(--text-3); }

.os-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); }
.os-chip { display: inline-flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-weight: 500; }
.os-chip img { width: 26px; height: 26px; object-fit: contain; }
.os-chip img.on-dark { box-sizing: border-box; padding: 3px; border-radius: 50%; background: #12161d; }

.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 960px) { .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .feat-grid { grid-template-columns: 1fr; } }
.feat { padding: var(--s6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: border-color .15s var(--ease), box-shadow .2s var(--ease); }
.lp-section.alt .feat { background: var(--bg); }
.feat:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.feat .stat-ico { margin-bottom: var(--s4); }
.feat h3 { font-size: 16px; font-weight: 600; margin-bottom: var(--s2); }
.feat p { color: var(--text-2); }

.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); counter-reset: n; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; } }
.how > div { counter-increment: n; position: relative; padding: var(--s6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.how > div::before { content: counter(n); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: var(--s4); border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; }
:lang(fa) .how > div::before { content: counter(n, persian); }
.how h3 { font-size: 16px; font-weight: 600; margin-bottom: var(--s1); }
.how p { color: var(--text-2); }

.lp-faq { max-width: 760px; margin-inline: auto; display: grid; gap: var(--s3); }
.lp-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color .15s var(--ease); }
.lp-faq details[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.lp-faq summary { cursor: pointer; padding: var(--s4) var(--s5); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--s3); align-items: center; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; font-weight: 400; }
.lp-faq details[open] summary::after { content: "−"; }
.lp-faq p { color: var(--text-2); padding: 0 var(--s5) var(--s5); }

.lp-final { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s8); align-items: center; padding: var(--s12); border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-md); }
.lp-final::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(45% 90% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), radial-gradient(40% 80% at 100% 100%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%); }
.lp-final > * { position: relative; z-index: 1; }
.lp-final h2 { font-size: 28px; font-weight: 700; }
.lp-final p { margin-top: var(--s2); color: var(--text-2); font-size: 15px; }
.final-points { list-style: none; margin: var(--s5) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); color: var(--text-2); font-size: 13px; }
.final-points li { display: inline-flex; align-items: center; gap: var(--s2); }
.final-points .ic { color: var(--ok); }
.final-actions { display: flex; flex-direction: column; gap: var(--s3); min-width: 220px; }
.final-actions .btn.lg { height: 52px; }
@media (max-width: 760px) { .lp-final { grid-template-columns: 1fr; padding: var(--s8) var(--s6); } .lp-final h2 { font-size: 24px; } .final-actions { min-width: 0; } }

/* Theme-aware terminal in the hero card */
.hero-term { background: var(--surface-2); color: var(--text-2); border-top: 1px solid var(--line); }
.hero-term .p { color: var(--ok); }
.hero-term .d { color: var(--text-3); }
.hero-term .cur { background: var(--text-2); }

/* Round icon buttons in the header, ring only for keyboard focus */
.top-actions .icon-btn { width: 32px; height: 32px; border: 0; border-radius: var(--r-md); background: transparent; box-shadow: none; color: var(--text-2); }
.top-actions .icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:focus:not(:focus-visible) { outline: none; }
/* Mobile: nothing may stick out sideways, and the menu button is a clear tap target */
html, body { overflow-x: clip; }
.top-actions .menu-btn, .app-top .menu-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.menu-btn .ic { width: 20px; height: 20px; }
.app-top .menu-btn { width: 32px; height: 32px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text-2); box-shadow: none; }
.app-top .menu-btn:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 900px) {
  .sidebar { visibility: hidden; transition: transform .25s var(--ease), visibility 0s .25s; }
  .sidebar.open { visibility: visible; transition: transform .25s var(--ease); }
}
@media (max-width: 480px) {
  .topbar .container { gap: var(--s2); }
  .top-actions { gap: var(--s1); }
  .lp-hero h1 { font-size: 30px; }
  .lp-cta .btn.lg { flex: 1; padding-inline: var(--s4); }
  .lp-trust { gap: var(--s3) var(--s5); }
  .hero-card .row-s { gap: var(--s3); }
}
@media (max-width: 900px) { .sidebar.open, [dir="rtl"] .sidebar.open { transform: none; } }

/* Mobile menus: animated panels */
@media (max-width: 900px) {
  /* public site: dropdown card under the header */
  .nav { display: flex; position: absolute; top: calc(100% + 8px); inset-inline: var(--s3); padding: var(--s2); gap: 2px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-md);
         visibility: hidden; opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top; pointer-events: none;
         transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s; }
  .nav.open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .2s var(--ease), transform .2s var(--ease); }
  .nav a { padding: 0 var(--s4); line-height: 46px; border-radius: var(--r-md); color: var(--text); font-weight: 500; opacity: 0; transform: translateY(-4px); transition: opacity .2s var(--ease), transform .2s var(--ease), background-color .15s var(--ease); }
  .nav.open a { opacity: 1; transform: none; }
  .nav.open a:nth-child(2) { transition-delay: .03s; } .nav.open a:nth-child(3) { transition-delay: .06s; }
  .nav.open a:nth-child(4) { transition-delay: .09s; } .nav.open a:nth-child(5) { transition-delay: .12s; } .nav.open a:nth-child(6) { transition-delay: .15s; }
  .nav a.nav-mobile-only { margin-top: var(--s2); text-align: center; background-color: #4f46e5; background-image: var(--grad); color: #fff; }
  .nav a.nav-mobile-only:hover { color: #fff; filter: brightness(1.08); }
  /* theme switch and dashboard live in the menu on phones, not in the header */
  .top-actions .hide-mobile { display: none !important; }
  .nav .nav-theme { display: flex; align-items: center; gap: var(--s2); width: 100%; padding: 0 var(--s4); line-height: 46px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text); font: inherit; font-weight: 500; cursor: pointer; text-align: start;
                    opacity: 0; transform: translateY(-4px); transition: opacity .2s var(--ease), transform .2s var(--ease), background-color .15s var(--ease); }
  .nav.open .nav-theme { opacity: 1; transform: none; }
  .nav .nav-theme:hover { background: var(--surface-2); }
  .nav .nav-theme .ic { width: 20px; height: 20px; color: var(--text-2); }
  .has-site::after { content: ""; position: fixed; inset: 0; z-index: 40; background: rgba(10, 12, 16, .35); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
  .has-site.nav-open::after { opacity: 1; pointer-events: auto; }

  /* dashboard: slide-in drawer */
  .sidebar { width: min(300px, 86vw); border: 0; border-start-end-radius: var(--r-lg); border-end-end-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); transition: transform .3s var(--ease), visibility 0s .3s; }
  .sidebar.open { transition: transform .3s var(--ease); }
  .shell-scrim { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); transition: opacity .3s var(--ease); }
  .side-nav a { opacity: 0; transform: translateX(12px); transition: opacity .25s var(--ease), transform .25s var(--ease), background-color .15s var(--ease), color .15s var(--ease); }
  [dir="ltr"] .side-nav a { transform: translateX(-12px); }
  .sidebar.open .side-nav a { opacity: 1; transform: none; }
  .sidebar.open .side-nav a:nth-child(1) { transition-delay: .08s; } .sidebar.open .side-nav a:nth-child(2) { transition-delay: .12s; }
  .sidebar.open .side-nav a:nth-child(3) { transition-delay: .16s; } .sidebar.open .side-nav a:nth-child(4) { transition-delay: .20s; } .sidebar.open .side-nav a:nth-child(5) { transition-delay: .24s; }
  .side-nav a { line-height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .nav a, .side-nav a { opacity: 1 !important; transform: none !important; } }
/* Amount box + unit label: one seamless control. The input is dir=ltr, so the corners are set per physical side:
   the unit sits at the left in the Persian page and at the right in the English page. */
html[dir="rtl"] .field .input-affix input.input { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
html[dir="rtl"] .field .input-affix .affix { border-radius: var(--r-md) 0 0 var(--r-md); border-right: 0; border-left: 1px solid var(--line-strong); }
html[dir="ltr"] .field .input-affix input.input { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
html[dir="ltr"] .field .input-affix .affix { border-radius: 0 var(--r-md) var(--r-md) 0; border-left: 0; border-right: 1px solid var(--line-strong); }
/* ---------- Wallet history ---------- */
a.tab { display: inline-block; text-decoration: none; }
details.day { border-bottom: 1px solid var(--line); }
details.day:last-child { border-bottom: 0; }
details.day > summary { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); cursor: pointer; list-style: none; }
details.day > summary::-webkit-details-marker { display: none; }
details.day > summary::after { content: ""; width: 8px; height: 8px; margin-inline-start: var(--s2); border-inline-end: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform .15s var(--ease); }
details.day[open] > summary::after { transform: rotate(-135deg); }
details.day > summary:hover { background: var(--surface-2); }
.day-date { font-weight: 500; }
.day-total { margin-inline-start: auto; }
.day-body { background: var(--surface-2); }
.day-body .tx-item { padding-inline-start: var(--s7, 32px); }
/* Public SEO pages (locations, topics, pricing, blog) */
.seo-hero { position: relative; overflow: hidden; padding-block: var(--s12) var(--s10); }
.seo-hero::before { content: ""; position: absolute; inset: -30% -10% auto; height: 520px; z-index: -1; background: radial-gradient(40% 50% at 30% 30%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%), radial-gradient(35% 45% at 75% 20%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 70%); }
.seo-hero h1 { font-size: 38px; line-height: 1.5; font-weight: 700; text-wrap: balance; max-width: 880px; }
.seo-hero .lead { margin-top: var(--s4); color: var(--text-2); font-size: 16px; max-width: 820px; line-height: 2; }
.crumbs ol { list-style: none; margin: 0 0 var(--s5); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); font-size: 13px; color: var(--text-3); }
.crumbs li + li::before { content: "/"; margin-inline-end: var(--s2); color: var(--line-strong); }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent); }
.seo-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 44%), 1fr)); gap: var(--s3); margin: var(--s8) 0 0; max-width: 980px; }
.seo-facts > div { padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.seo-facts dt { font-size: 12px; color: var(--text-3); }
.seo-facts dd { margin: var(--s1) 0 0; font-weight: 600; line-height: 1.7; }
.seo-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.seo-table td.price b { display: block; white-space: nowrap; }
.seo-table td.price small { display: block; color: var(--text-3); font-size: 11px; white-space: nowrap; }
.seo-table td { white-space: nowrap; }
.seo-table td.muted { white-space: normal; min-width: 150px; }
.seo-prose { max-width: 820px; }
.seo-prose h2 { font-size: 24px; font-weight: 700; margin: var(--s10) 0 var(--s3); }
.seo-prose h2:first-child { margin-top: 0; }
.seo-prose h3 { font-size: 18px; font-weight: 700; margin: var(--s6) 0 var(--s2); }
.seo-prose p, .seo-prose li { color: var(--text-2); line-height: 2.05; font-size: 15.5px; }
.seo-prose p + p { margin-top: var(--s3); }
.seo-prose ul, .seo-prose ol { margin: var(--s3) 0; padding-inline-start: var(--s6); display: grid; gap: var(--s2); }
.seo-prose code { font-family: var(--mono, monospace); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; direction: ltr; unicode-bidi: isolate; }
.seo-prose pre { direction: ltr; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); overflow-x: auto; margin: var(--s3) 0; }
.seo-prose pre code { background: none; padding: 0; }
.seo-prose a { color: var(--accent); }
.seo-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--s3); }
.seo-links a { display: flex; flex-direction: column; gap: 2px; padding: var(--s4); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--text); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.seo-links a:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.seo-links small { color: var(--text-3); }
.seo-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); margin-top: var(--s8); }
.seo-chips a { color: var(--text); }
.seo-group-head { margin-bottom: var(--s5); }
.seo-group-head h2 { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: var(--s3); }
.seo-group-head h2 a { color: var(--text); }
.seo-group-head p { color: var(--text-3); margin-top: var(--s1); }
.seo-group-head h2 .flag { width: 36px; height: 27px; }
.lp-section[id] { scroll-margin-top: 72px; }

/* Flag pictures (app/flags.py): a thin ring keeps white flags (Finland, Japan) visible on a white card */
.flag { display: inline-block; flex: none; width: 40px; height: 30px; object-fit: cover; border-radius: 6px; vertical-align: middle;
        background: var(--surface-2); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .10); }
.flag-md { width: 32px; height: 24px; border-radius: 5px; }
.flag-sm { width: 22px; height: 16.5px; border-radius: 3px; }
.cell-flag { display: inline-flex; align-items: center; gap: var(--s2); }
.seo-link-title { display: flex; align-items: center; gap: var(--s2); }

/* Location cards on /vps/: flag and name, the cities, then the starting price */
.loc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: var(--s4); }
.loc-card { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); background: var(--surface); border: 1px solid var(--line);
            border-radius: var(--r-lg); color: var(--text); transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease); }
.loc-card:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.loc-card-head { display: flex; align-items: center; gap: var(--s3); }
.loc-card-head b { font-size: 16px; font-weight: 700; line-height: 1.5; }
.loc-card-cities { font-size: 13px; line-height: 1.8; color: var(--text-3); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.loc-card-foot { margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.loc-card-price { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.loc-card-price b { font-size: 17px; font-weight: 700; color: var(--accent); }
.loc-card-go { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); transition: transform .15s var(--ease); }
.loc-card:hover .loc-card-go { transform: translateX(3px); }
[dir="rtl"] .loc-card-go .ic { transform: scaleX(-1); }
[dir="rtl"] .loc-card:hover .loc-card-go { transform: translateX(-3px); }

/* /pricing/: jump to a country's table */
.loc-jump { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s8); }
.loc-jump a { display: inline-flex; align-items: center; gap: var(--s2); padding: 7px var(--s3); font-size: 13px; font-weight: 500; color: var(--text);
              background: var(--surface); border: 1px solid var(--line); border-radius: 999px; transition: border-color .15s var(--ease); }
.loc-jump a:hover { color: var(--text); border-color: var(--line-strong); }
.blog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); }
.blog-card { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--text); transition: border-color .15s var(--ease), box-shadow .2s var(--ease); }
.blog-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.blog-card h2, .blog-card h3 { font-size: 17px; font-weight: 700; line-height: 1.7; }
.blog-card p { color: var(--text-2); font-size: 14px; }
.blog-card small, .article-meta { color: var(--text-3); font-size: 13px; }
.article-toc { margin: var(--s6) 0; padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); max-width: 820px; }
.article-toc b { display: block; margin-bottom: var(--s2); }
.article-toc ol { margin: 0; padding-inline-start: var(--s5); display: grid; gap: var(--s1); }
.article-toc a { color: var(--text-2); }
:lang(fa) .article-toc ol, :lang(fa) .seo-prose ol { list-style-type: persian; }
@media (max-width: 700px) { .seo-hero h1 { font-size: 28px; } .seo-hero { padding-block: var(--s10) var(--s8); } }
