/* TradeXecute public marketing site */
:root {
  --mk-bg: #ffffff;
  --mk-surface: #f8f9fb;
  --mk-text: #1a1d23;
  --mk-muted: #5a6370;
  --mk-border: #e2e6ea;
  --mk-accent: #0d6efd;
  --mk-accent-hover: #0b5ed7;
  --mk-hero-bg: #0a0a0a;
  --mk-hero-text: #f5f5f5;
  --mk-announce-bg: #111827;
  --mk-announce-text: #e5e7eb;
  --mk-header-h: 4rem;
  --mk-announce-h: 2.25rem;
  --mk-scroll-offset: calc(var(--mk-announce-h) + var(--mk-header-h) + 0.75rem);
  --mk-brand-lockup-h: 3.25rem;
}

body.marketing-body {
  background: var(--mk-bg);
  color: var(--mk-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

body.marketing-body.mk-docs-page {
  scroll-behavior: smooth;
}

.mk-announce {
  background: var(--mk-announce-bg);
  color: var(--mk-announce-text);
  font-size: 0.875rem;
  text-align: center;
  padding: 0.5rem 1rem;
}

.mk-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--mk-bg);
  border-bottom: 1px solid var(--mk-border);
  min-height: var(--mk-header-h);
}

.mk-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.mk-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--mk-text);
  line-height: 0;
}

/* Icon + Title wordmark — one lockup, equal height, tight join on light header */
.mk-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0;
  line-height: 0;
  mix-blend-mode: multiply;
}

.mk-brand-lockup-part {
  display: block;
  height: var(--mk-brand-lockup-h);
  width: auto;
  max-height: var(--mk-brand-lockup-h);
  object-fit: contain;
  object-position: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.mk-brand-lockup-title {
  max-width: min(11rem, 38vw);
  margin-left: -0.125rem;
}

.mk-brand-fallback {
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
}

.mk-footer-brand-col {
  min-width: 0;
}

.mk-footer-brand {
  display: inline-block;
  margin-bottom: 0.75rem;
  line-height: 0;
  background: transparent;
  text-decoration: none;
}

/*
 * Logo 1 is a light-background asset (white matte + dark text).
 * Dark-mode filter: white matte → black (matches footer), text/icon stay vivid.
 */
.mk-footer-logo {
  display: block;
  height: 3.75rem;
  width: auto;
  max-width: min(15rem, 72vw);
  object-fit: contain;
  background: transparent;
  border: none;
  box-shadow: none;
  mix-blend-mode: normal;
  filter: invert(1) hue-rotate(180deg);
}

.mk-nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 992px) {
  .mk-nav-desktop { display: flex; }
  .mk-hamburger { display: none !important; }
}

.mk-nav-link {
  color: var(--mk-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  border: none;
  background: transparent;
  cursor: pointer;
}

.mk-nav-link:hover,
.mk-nav-link:focus {
  color: var(--mk-text);
  background: var(--mk-surface);
}

.mk-dropdown {
  position: relative;
}

.mk-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 14rem;
  background: var(--mk-bg);
  border: 1px solid var(--mk-border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 0.375rem 0;
  z-index: 1050;
}

.mk-dropdown:hover .mk-dropdown-menu,
.mk-dropdown:focus-within .mk-dropdown-menu {
  display: block;
}

.mk-dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--mk-text);
  text-decoration: none;
  font-size: 0.9375rem;
}

.mk-dropdown-item:hover {
  background: var(--mk-surface);
}

.mk-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.125rem;
  background: var(--mk-accent);
  color: #fff !important;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  white-space: nowrap;
}

.mk-cta:hover {
  background: var(--mk-accent-hover);
  color: #fff;
}

.mk-cta-outline {
  background: transparent;
  color: var(--mk-accent) !important;
  border: 1px solid var(--mk-accent);
}

.mk-cta-outline:hover {
  background: rgba(13, 110, 253, 0.08);
}

.mk-hero {
  background: var(--mk-hero-bg);
  color: var(--mk-hero-text);
  padding: 4rem 0 4.5rem;
  text-align: center;
}

.mk-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  max-width: 42rem;
  margin: 0 auto 1rem;
  line-height: 1.2;
}

.mk-hero .lead {
  color: #cbd5e1;
  max-width: 40rem;
  margin: 0 auto 2rem;
  font-size: 1.0625rem;
}

.mk-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.mk-section {
  padding: 3.5rem 0;
}

.mk-section-alt {
  background: var(--mk-surface);
}

.mk-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.mk-broker-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.mk-broker-logo {
  width: 6.5rem;
  height: 2.75rem;
  object-fit: contain;
  filter: grayscale(20%);
  opacity: 0.92;
}

.mk-value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.mk-value-card {
  background: var(--mk-bg);
  border: 1px solid var(--mk-border);
  border-radius: 0.625rem;
  padding: 1.25rem;
}

.mk-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.mk-product-card {
  border: 1px solid var(--mk-border);
  border-radius: 0.625rem;
  padding: 1.5rem;
  background: var(--mk-bg);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.mk-product-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.mk-badge-progress {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #fef3c7;
  color: #92400e;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.mk-ai-ads-section {
  background: linear-gradient(180deg, #ffffff 0%, var(--mk-surface) 100%);
}

.mk-ai-ads-page {
  max-width: 72rem;
}

.mk-ai-ads-copy {
  padding-top: 0.25rem;
}

.mk-ai-ads-lead {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--mk-text);
  margin-bottom: 1.25rem;
}

.mk-ai-ads-copy p {
  color: var(--mk-muted);
  margin-bottom: 1rem;
}

.mk-ai-ads-video-panel {
  position: sticky;
  top: calc(var(--mk-scroll-offset) + 0.5rem);
}

.mk-ai-ads-video-wrap {
  width: min(100%, 20rem);
  max-height: min(78vh, 35.5rem);
  margin-inline: auto;
  border-radius: 0.875rem;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid var(--mk-border);
  box-shadow: 0 1.25rem 2.5rem rgba(17, 24, 39, 0.12);
  aspect-ratio: 9 / 16;
}

@media (min-width: 992px) {
  .mk-ai-ads-video-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .mk-ai-ads-video-wrap {
    margin-inline: 0 0;
    margin-left: auto;
    width: min(100%, 18.5rem);
  }

  .mk-ai-ads-video-caption {
    text-align: right;
    max-width: 18.5rem;
    margin-left: auto;
  }
}

.mk-ai-ads-video-caption {
  margin-top: 0.75rem;
}

.mk-ai-ads-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a0a0a;
}

.mk-footer {
  background: #111827;
  color: #9ca3af;
  padding: 2.5rem 0 1.5rem;
  font-size: 0.875rem;
}

.mk-footer a {
  color: #d1d5db;
  text-decoration: none;
}

.mk-footer a:hover {
  color: #fff;
}

.mk-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.mk-docs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .mk-docs-layout {
    grid-template-columns: 240px 1fr;
    align-items: start;
  }
}

.mk-docs-toc {
  position: sticky;
  top: var(--mk-scroll-offset);
  font-size: 0.875rem;
}

@media (min-width: 992px) {
  .mk-docs-toc.mk-tradexecute-nav {
    max-height: calc(100vh - var(--mk-scroll-offset) - 2rem);
    overflow-y: auto;
  }
}

.mk-docs-toc a {
  display: block;
  padding: 0.25rem 0 0.25rem 0.625rem;
  margin-left: -0.625rem;
  color: var(--mk-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.mk-docs-toc a:hover {
  color: var(--mk-accent);
}

.mk-docs-toc a.is-active {
  color: var(--mk-accent);
  font-weight: 600;
  border-left-color: var(--mk-accent);
}

.mk-docs-content h2[id],
.mk-docs-content h3[id] {
  scroll-margin-top: var(--mk-scroll-offset);
}

.mk-docs-content h2 {
  font-size: 1.375rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--mk-border);
}

.mk-docs-content h2:first-child {
  border-top: none;
  margin-top: 0;
}

.mk-docs-content h3 {
  font-size: 1.0625rem;
  margin-top: 1.25rem;
}

.mk-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  visibility: hidden;
}

.mk-mobile-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.mk-mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s;
}

.mk-mobile-drawer.open .mk-mobile-drawer-backdrop {
  opacity: 1;
}

.mk-mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(20rem, 88vw);
  height: 100%;
  background: var(--mk-bg);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  overflow-y: auto;
}

.mk-mobile-drawer.open .mk-mobile-drawer-panel {
  transform: translateX(0);
}

.mk-mobile-nav-link {
  display: block;
  padding: 0.625rem 0;
  color: var(--mk-text);
  text-decoration: none;
  border-bottom: 1px solid var(--mk-border);
}

.mk-contact-form .form-label {
  font-weight: 500;
  font-size: 0.9375rem;
}

.mk-auth-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--mk-muted);
  text-decoration: none;
  font-size: 0.9375rem;
}

.mk-auth-back:hover {
  color: var(--mk-accent);
}

.mk-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.mk-module-card {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--mk-border);
  border-radius: 0.625rem;
  text-decoration: none;
  color: var(--mk-text);
  background: var(--mk-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mk-module-card:hover {
  border-color: var(--mk-accent);
  box-shadow: 0 4px 16px rgba(13, 110, 253, 0.08);
  color: var(--mk-text);
}

.mk-feature-panels {
  min-width: 0;
}

.mk-feature-panel[hidden] {
  display: none !important;
}

.mk-feature-panel.is-active {
  display: block;
}

.mk-feature-tree {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.mk-feature-tree ul {
  list-style: circle;
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.25rem;
}

.mk-feature-tree ul ul {
  list-style: square;
}

.mk-feature-tree li {
  margin-bottom: 0.35rem;
}

.mk-feature-tree-item > strong {
  color: var(--mk-text);
}

.mk-feature-tree a {
  color: var(--mk-accent);
  text-decoration: none;
}

.mk-feature-tree a:hover {
  text-decoration: underline;
}

.mk-tradexecute-nav a.is-active {
  color: var(--mk-accent);
  font-weight: 600;
  border-left-color: var(--mk-accent);
}

.mk-tradexecute-nav .mk-nav-group {
  margin: 0.15rem 0;
}

.mk-tradexecute-nav .mk-nav-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% + 0.625rem);
  padding: 0.25rem 0.5rem 0.25rem 0.625rem;
  margin-left: -0.625rem;
  background: none;
  border: 0;
  border-left: 2px solid transparent;
  color: var(--mk-muted);
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  list-style: none;
}

.mk-tradexecute-nav .mk-nav-parent::-webkit-details-marker {
  display: none;
}

.mk-tradexecute-nav .mk-nav-parent::marker {
  content: "";
}

.mk-tradexecute-nav .mk-nav-parent:hover {
  color: var(--mk-accent);
}

.mk-tradexecute-nav .mk-nav-group.is-open > .mk-nav-parent,
.mk-tradexecute-nav details.mk-nav-group[open] > .mk-nav-parent {
  color: var(--mk-text);
  font-weight: 600;
}

.mk-tradexecute-nav .mk-nav-parent::after {
  content: "";
  flex-shrink: 0;
  width: 0.35rem;
  height: 0.35rem;
  margin-left: 0.5rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.mk-tradexecute-nav .mk-nav-group.is-open > .mk-nav-parent::after,
.mk-tradexecute-nav details.mk-nav-group[open] > .mk-nav-parent::after {
  transform: rotate(45deg);
}

.mk-tradexecute-nav .mk-nav-children {
  padding: 0.1rem 0 0.35rem;
}

.mk-tradexecute-nav .mk-nav-children a {
  padding-left: 1.35rem;
  font-size: 0.8125rem;
}

.mk-callout {
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--mk-border);
  background: var(--mk-surface);
}

.mk-callout-tip {
  border-left: 3px solid var(--mk-accent);
}

.mk-callout-benefit {
  border-left: 3px solid #059669;
  background: #ecfdf5;
}

.mk-callout-warn {
  border-left: 3px solid #d97706;
  background: #fffbeb;
}

.mk-formula-sheet {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.55;
  white-space: pre-wrap;
  background: var(--mk-surface);
  border: 1px solid var(--mk-border);
  border-radius: 0.5rem;
  padding: 1rem 1.125rem;
  overflow-x: auto;
}

.mk-workflow-steps {
  padding-left: 1.25rem;
}

.mk-workflow-steps > li {
  margin-bottom: 1rem;
}

.mk-workflow-steps > li > strong {
  display: block;
  margin-bottom: 0.25rem;
}

.mk-leg-table th {
  font-size: 0.8125rem;
}

.mk-journey-block {
  padding: 1rem 1.125rem;
  border: 1px solid var(--mk-border);
  border-radius: 0.5rem;
  background: var(--mk-surface);
}

.columns-md-2 {
  column-count: 1;
}

@media (min-width: 768px) {
  .columns-md-2 {
    column-count: 2;
    column-gap: 2rem;
  }
}

.mk-ebook-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .mk-ebook-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .mk-ebook-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.mk-ebook-card {
  border: 1px solid var(--mk-border);
  border-radius: 0.625rem;
  background: var(--mk-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mk-ebook-cover-link {
  display: block;
  aspect-ratio: 2 / 3;
  max-height: 220px;
  overflow: hidden;
  background: var(--mk-surface);
}

.mk-ebook-cover-link img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: contain;
  object-position: center top;
}

.mk-ebook-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mk-ebook-card-body h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.mk-ebook-price {
  font-weight: 700;
  margin: 0.5rem 0;
}

.mk-ebook-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mk-ebook-chip {
  font-size: 0.8125rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--mk-border);
  text-decoration: none;
  color: var(--mk-text);
}

.mk-ebook-chip.active {
  background: var(--mk-accent, #2563eb);
  color: #fff;
  border-color: transparent;
}

.mk-ebook-detail-row {
  max-width: 960px;
}

.mk-ebook-detail-cover {
  width: 180px;
  max-width: min(180px, 42vw);
  flex-shrink: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--mk-border);
  background: var(--mk-surface);
  line-height: 0;
}

.mk-ebook-thumb,
.mk-ebook-detail-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 270px;
  object-fit: contain;
  object-position: center top;
}

.mk-ebook-detail-info {
  min-width: 0;
}

.mk-ebook-detail-actions {
  position: relative;
  z-index: 1;
}

.mk-ebook-detail-actions .mk-cta {
  position: static;
  display: inline-flex;
}

.mk-ebook-cart-cover-cell {
  width: 56px;
  vertical-align: middle;
}

.mk-ebook-cart-thumb,
.mk-cart-table img {
  display: block;
  width: 48px;
  max-width: 48px;
  height: 72px;
  max-height: 72px;
  object-fit: cover;
  border-radius: 0.25rem;
}
