:root {
  --bg: #f5f8ff;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbe5f2;
  --primary: #0ea5ff;
  --primary-dark: #2563eb;
  --green: #16a34a;
  --shadow: 0 18px 50px rgba(15, 23, 42, .08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 255, .18), transparent 32rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, .12), transparent 34rem),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: #075985;
  font-weight: 800;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header {
  padding: 22px 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  border: 1px solid var(--border);
  overflow: hidden;
}

.logo svg {
  width: 38px;
  height: 38px;
}

.brand-title {
  font-weight: 950;
  font-size: 21px;
  letter-spacing: -.04em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: -4px;
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a,
.button,
.secondary-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .82);
  color: #075985;
  font-size: 14px;
  font-weight: 900;
}

.hero {
  padding: 32px 0 18px;
}

.hero-card,
.card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: clamp(26px, 5vw, 54px);
  overflow: hidden;
  position: relative;
}

.hero-card:after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -120px;
  bottom: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 255, .18), transparent 68%);
}

.eyebrow {
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: .98;
  letter-spacing: -.075em;
}

h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.045em;
  line-height: 1.08;
  margin: 0 0 12px;
}

h3 {
  font-size: 20px;
  margin: 0 0 8px;
  letter-spacing: -.03em;
}

.lead {
  max-width: 800px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 650;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: 0;
  box-shadow: 0 16px 34px rgba(37, 99, 235, .18);
}

.secondary-button {
  background: #e0f2fe;
  border-color: #bae6fd;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 22px;
}

.muted {
  color: var(--muted);
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 10px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 950;
}

.section {
  padding: 18px 0;
}

.notice {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #075985;
  border-radius: 18px;
  padding: 16px;
  font-weight: 800;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin: 8px 0;
}

.footer {
  margin: 28px 0 36px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}

.footer a {
  margin-right: 12px;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

.code {
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 6px;
}

@media (max-width: 820px) {
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .nav {
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1 1 auto;
  }
}



.brand-logo-img {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 14px;
  filter: drop-shadow(0 10px 20px rgba(18, 116, 255, .16));
}

.logo-mark,
.logo {
  display: none;
}



/* Phase 22 exact dashboard logo sizing */
.brand-logo-img {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
  min-height: 48px;
  display: block;
  object-fit: contain;
  flex: 0 0 48px;
  border-radius: 0 !important;
  filter: none !important;
  box-shadow: none !important;
}

.logo-mark,
.logo {
  display: none !important;
}

/* Phase 22 Persian / RTL public pages */
.rtl-page {
  direction: rtl;
  text-align: right;
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}

.rtl-page .topbar,
.rtl-page .brand,
.rtl-page .button-row,
.rtl-page footer {
  direction: rtl;
}

.rtl-page ul,
.rtl-page ol {
  padding-right: 1.4rem;
  padding-left: 0;
}

.rtl-page .brand-logo-img {
  margin-left: .75rem;
  margin-right: 0;
}


/* phase22-live-support-launcher */
.support-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  font-family: inherit;
}

html[dir="rtl"] .support-launcher {
  right: auto;
  left: 22px;
}

.support-fab {
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  box-shadow: 0 18px 46px rgba(14, 165, 233, .34);
}

.support-panel {
  width: min(340px, calc(100vw - 44px));
  margin-bottom: 12px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(148,163,184,.32);
  box-shadow: 0 24px 70px rgba(15,23,42,.22);
  color: #0f172a;
}

.support-panel-title {
  font-size: 1.08rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.support-panel p {
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.65;
}

.support-panel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.support-panel-actions .button,
.support-panel-actions .secondary-button {
  text-align: center;
  cursor: pointer;
  border: 0;
}

@media (max-width: 640px) {
  .support-launcher {
    right: 14px;
    bottom: 14px;
  }

  html[dir="rtl"] .support-launcher {
    right: auto;
    left: 14px;
  }
}


/* Phase 22 same-page support panel; no external chat redirect */
.support-chat-floating {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9998;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 45px rgba(37, 99, 235, .25);
  cursor: pointer;
}

.support-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 82px;
  width: min(390px, calc(100vw - 32px));
  z-index: 9999;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 24px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
  overflow: hidden;
  transform: translateY(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.support-chat-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.support-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #eef7ff, #f8fbff);
  border-bottom: 1px solid rgba(148, 163, 184, .25);
}

.support-chat-close {
  border: 0;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  background: white;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.support-chat-body {
  padding: 18px;
}

.support-chat-start,
.support-chat-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  text-decoration: none;
  cursor: pointer;
}

.support-chat-form {
  display: grid;
  gap: 10px;
}

.support-chat-form label {
  font-weight: 900;
  color: #0f172a;
}

.support-chat-form textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid rgba(148, 163, 184, .4);
  border-radius: 16px;
  padding: 12px;
  font: inherit;
}

.support-chat-note,
.support-chat-email {
  margin: 0;
  color: #64748b;
  font-size: .92rem;
}

html[dir="rtl"] .support-chat-floating,
html[dir="rtl"] .support-chat-panel {
  right: auto;
  left: 22px;
}
