#site-header-slot {
  position: sticky;
  top: 0;
  z-index: 120;
  min-height: 72px;
}

.site-header {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.24s ease, border-color 0.24s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.footer-logo-img {
  height: 34px;
  width: auto;
  display: block;
  object-fit: contain;
}

[data-theme="dark"] .logo-for-light {
  display: none !important;
}

[data-theme="dark"] .logo-for-dark {
  display: block !important;
}

[data-theme="light"] .logo-for-dark {
  display: none !important;
}

[data-theme="light"] .logo-for-light {
  display: block !important;
}

.brand-badge {
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: var(--exness-yellow);
  color: var(--exness-ink);
  border: 1px solid rgba(15, 23, 28, 0.14);
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.88rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.91rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-link[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 700;
  background: var(--accent-yellow-soft);
  box-shadow: inset 0 -2px 0 var(--exness-yellow);
}

[data-theme="light"] .nav-link[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--exness-ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 38px;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--exness-ink);
  color: var(--exness-yellow);
  border-color: var(--exness-ink);
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background: #22303c;
  color: var(--exness-yellow);
  border-color: var(--exness-yellow);
}

.theme-icon {
  flex-shrink: 0;
}

[data-theme="dark"] .theme-icon-sun {
  display: inline-block;
  color: var(--exness-yellow);
}

[data-theme="dark"] .theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-icon-sun {
  display: none;
}

[data-theme="light"] .theme-icon-moon {
  display: inline-block;
  color: currentColor;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.45rem 0.72rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.site-footer {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-top: 1px solid var(--border-subtle);
  padding: 2.25rem 0 1.4rem;
  margin-top: 3rem;
  transition: background-color 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

[data-theme="dark"] .site-footer {
  background: #0a1014;
  border-top-color: rgba(255, 222, 2, 0.2);
}

.footer-top-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.75rem;
  border-radius: var(--radius-md);
  background: linear-gradient(95deg, var(--accent-yellow-soft) 0%, var(--bg-elevated) 72%);
  border: 1px solid var(--border-accent);
}

.footer-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-positive);
  margin-bottom: 0.15rem;
}

[data-theme="dark"] .footer-kicker {
  color: var(--exness-yellow);
}

.footer-banner-heading {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.footer-outline-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.footer-outline-btn:hover:not(:disabled) {
  background: var(--exness-ink) !important;
  color: var(--exness-yellow) !important;
  border-color: var(--exness-ink) !important;
}

[data-theme="dark"] .footer-outline-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.22);
}

[data-theme="dark"] .footer-outline-btn:hover:not(:disabled) {
  background: var(--exness-yellow) !important;
  color: var(--exness-ink) !important;
  border-color: var(--exness-yellow) !important;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 1.85rem;
  margin-bottom: 1.35rem;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.footer-brand-tag {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 800;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  background: var(--exness-yellow);
  color: var(--exness-ink);
  border: 1px solid rgba(15, 23, 28, 0.14);
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.86rem;
  max-width: 48ch;
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.footer-security-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sec-pill {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  padding: 0.18rem 0.52rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.footer-title {
  font-size: 0.92rem;
  font-weight: 800;
  margin: 0 0 0.55rem;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.footer-links li {
  margin: 0;
  padding: 0;
  line-height: 1.35;
}

.footer-links a,
.footer-link-btn {
  display: inline-block;
  background: none;
  border: none;
  padding: 0.1rem 0;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color 0.16s ease, transform 0.16s ease;
}

.footer-links a:hover,
.footer-link-btn:hover {
  color: var(--text-positive);
  transform: translateX(2px);
}

[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .footer-link-btn:hover {
  color: var(--exness-yellow);
}

.disclaimer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.95rem;
  margin-top: 0;
  font-size: 0.77rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
}

.ib-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(8, 13, 18, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ib-modal-backdrop[hidden] {
  display: none !important;
}

.ib-modal-dialog {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 64px -12px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.ib-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, var(--accent-yellow-soft) 0%, var(--bg-secondary) 100%);
}

.ib-modal-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 800;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  background: var(--exness-yellow);
  color: var(--exness-ink);
  margin-bottom: 0.4rem;
}

.ib-modal-title {
  margin: 0 0 0.25rem;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ib-modal-subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.ib-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ib-modal-close:hover {
  background: var(--exness-ink);
  color: var(--exness-yellow);
}

.ib-modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: grid;
  gap: 0.95rem;
}

.ib-step-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.ib-step-card p {
  margin: 0;
  font-size: 0.89rem;
  color: var(--text-secondary);
  line-height: 1.58;
}

.ib-step-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.ib-step-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.ib-step-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.16rem 0.48rem;
  border-radius: 6px;
  background: var(--exness-yellow);
  color: var(--exness-ink);
}

.ib-ext-link {
  color: var(--text-positive);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: normal;
}

[data-theme="dark"] .ib-ext-link {
  color: var(--exness-yellow);
}

.ib-form-guide-grid {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.ib-field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  font-size: 0.86rem;
}

.ib-field-label {
  font-weight: 700;
  color: var(--text-primary);
}

.ib-field-val {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  min-width: 0;
  color: var(--text-secondary);
}

.ib-code {
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  background: var(--accent-yellow-soft);
  color: var(--text-primary);
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ib-copy-btn {
  font-family: var(--font-sans);
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.18rem 0.52rem;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.ib-copy-btn:hover {
  background: var(--exness-yellow);
  color: var(--exness-ink);
  border-color: var(--exness-yellow-press);
}

.ib-note-box {
  margin-top: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--accent-yellow-soft);
  border-left: 3px solid var(--exness-yellow);
  font-size: 0.83rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.ib-step-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.ib-modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.95rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

@media (max-width: 980px) {
  .footer-grid,
  .ib-step-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .mobile-menu-btn {
    display: inline-flex;
  }

  .header-cta-btn {
    display: none;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.85rem 1.25rem 1rem;
    box-shadow: var(--shadow-card);
    gap: 0.3rem;
  }

  .primary-nav.is-open {
    display: flex;
  }
}

@media (max-width: 480px) {
  .brand-badge,
  .mobile-menu-text {
    display: none;
  }
}

.footer-banner-heading { text-align: start; }
.lang-switcher {
  position: relative;
}

.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 38px;
  padding: 0.4rem 0.68rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.lang-switcher-btn:hover {
  background: var(--exness-ink);
  color: var(--exness-yellow);
  border-color: var(--exness-ink);
}

[data-theme="dark"] .lang-switcher-btn:hover {
  background: #22303c;
  color: var(--exness-yellow);
  border-color: var(--exness-yellow);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 44px -10px rgba(0, 0, 0, 0.55);
  padding: 0.4rem;
  z-index: 220;
  display: grid;
  gap: 0.2rem;
}

.lang-dropdown-menu[hidden] {
  display: none !important;
}

[dir="rtl"] .lang-dropdown-menu {
  right: auto;
  left: 0;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-option:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.lang-option.is-current {
  background: var(--accent-yellow-soft);
  color: var(--text-primary);
  font-weight: 700;
}

.lang-code-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.38rem;
  border-radius: 5px;
  background: var(--exness-yellow);
  color: var(--exness-ink);
  min-width: 28px;
  text-align: center;
}

[dir="rtl"] .footer-link-btn,
[dir="rtl"] .footer-links a {
  text-align: right;
}

[dir="rtl"] .footer-links a:hover,
[dir="rtl"] .footer-link-btn:hover {
  transform: translateX(-2px);
}

[dir="rtl"] .ib-note-box {
  border-left: none;
  border-right: 3px solid var(--exness-yellow);
}
.ib-step-media {
  margin: 0.75rem 0 0;
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  text-align: center;
  overflow: hidden;
}

.ib-step-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 290px;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 6px;
}

@media (max-width: 640px) {
  .ib-step-media {
    padding: 0.35rem;
  }
  .ib-step-media img {
    max-height: 220px;
  }
}
