/* ===== Design tokens ===== */
:root {
  --c-dark: #0f171c;
  --c-dark-2: #17242c;
  --c-dark-3: #1c2f38;
  --c-yellow: #ffcf01;
  --c-yellow-hover: #ffda39;
  --c-yellow-active: #e7bb00;
  --c-text: #0f171c;
  --c-body: #5a6167;
  --c-muted: #8d9194;
  --c-bg: #f4f5f6;
  --c-white: #ffffff;
  --c-border: #e2e4e6;
  --c-up: #16a34a;
  --c-down: #dc2626;
  --c-link: #3070de;
  --radius: 8px;
  --radius-lg: 16px;
  --header-h: 68px;
  --container: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 12px 30px rgba(15, 23, 28, 0.1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-white);
}
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 120px;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.375;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 250ms var(--ease), color 250ms var(--ease),
              border-color 250ms var(--ease), box-shadow 250ms var(--ease), transform 150ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 54px; padding: 14px 32px; font-size: 1.0625rem; }

.btn-primary { background: var(--c-yellow); color: var(--c-dark); }
.btn-primary:hover { background: var(--c-yellow-hover); }
.btn-primary:active { background: var(--c-yellow-active); }

.btn-outline { background: transparent; color: var(--c-yellow); border-color: rgba(255, 207, 1, 0.6); }
.btn-outline:hover { background: rgba(255, 207, 1, 0.12); border-color: var(--c-yellow); }

.btn-outline-dark { background: transparent; color: var(--c-dark); border-color: rgba(15, 23, 28, 0.25); }
.btn-outline-dark:hover { background: rgba(15, 23, 28, 0.05); border-color: var(--c-dark); }

.btn-ghost { background: transparent; color: var(--c-white); border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--c-white); }

.btn-dark { background: var(--c-dark); color: var(--c-white); }
.btn-dark:hover { background: var(--c-dark-3); }

.link-arrow {
  display: inline-block;
  margin-top: 12px;
  color: var(--c-link);
  font-weight: 600;
  transition: color 200ms var(--ease), transform 200ms var(--ease);
}
.link-arrow:hover { color: var(--c-yellow-active); }

/* ===== Section headings ===== */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--c-muted);
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
}
.hero-eyebrow {
  display: inline-block;
  color: var(--c-yellow-active);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ===== Topbar ===== */
.topbar { background: #0a1014; color: rgba(255, 255, 255, 0.7); font-size: 0.82rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.topbar-links { display: flex; align-items: center; gap: 18px; }
.topbar-links a:hover, .topbar-lang { cursor: pointer; }
.topbar-links a:hover { color: var(--c-yellow); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: var(--c-dark);
  color: var(--c-white);
  transition: box-shadow 250ms var(--ease);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo { display: inline-flex; align-items: center; }
.logo-img { height: 32px; width: auto; display: block; }
@media (min-width: 992px) { .logo-img { height: 36px; } }
.logo-footer .logo-img { height: 34px; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.main-nav a {
  padding: 8px 12px;
  color: var(--c-white);
  font-size: 0.95rem;
  border-radius: 6px;
  transition: color 200ms var(--ease);
}
.main-nav a:hover { color: var(--c-yellow); }
.main-nav a.active { color: var(--c-yellow); }
.main-nav a.active::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--c-yellow);
  border-radius: 2px;
  margin-top: 4px;
}
@media (max-width: 991px) {
  .main-nav a.active::after { display: none; }
  .main-nav a.active { background: rgba(255, 255, 255, 0.06); }
}

/* ===== Page banner (sub-page hero) ===== */
.page-banner {
  background: linear-gradient(135deg, #0f171c 0%, #17242c 55%, #1c2f38 100%);
  color: var(--c-white);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-banner::after {
  content: "";
  position: absolute;
  right: -140px; top: 50%;
  transform: translateY(-50%);
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(255, 207, 1, 0.14) 0%, transparent 70%);
  pointer-events: none;
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 14px; }
.page-banner p { color: rgba(255, 255, 255, 0.8); font-size: 1.1rem; max-width: 680px; margin: 0 auto; }
.breadcrumb { font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--c-yellow); }
.breadcrumb span { margin: 0 8px; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .btn { min-width: 90px; min-height: 40px; padding: 6px 18px; font-size: 0.95rem; }

.nav-toggle-checkbox { display: none; }
.nav-toggle { display: none; }
.header-scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35); }

/* ===== Ticker ===== */
.ticker {
  background: var(--c-dark-2);
  color: var(--c-white);
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ticker-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  padding: 10px 0;
  width: max-content;
  animation: ticker-scroll 40s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); }
.ticker-item b { color: #fff; margin-right: 6px; }
.tk-price { font-variant-numeric: tabular-nums; }
.tk-chg { margin-left: 6px; font-weight: 600; }
.tk-chg.up { color: #4ade80; }
.tk-chg.down { color: #f87171; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #0f171c 0%, #17242c 55%, #1c2f38 100%);
  color: var(--c-white);
  padding: 100px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -140px;
  top: 50%;
  transform: translateY(-50%);
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(255, 207, 1, 0.16) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 740px; }
.hero-title { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.15; font-weight: 700; margin-bottom: 20px; }
.hero-subtitle { font-size: 1.15rem; line-height: 1.6; color: rgba(255, 255, 255, 0.82); margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 24px; color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }

/* ===== Trustbar ===== */
.trustbar { background: var(--c-bg); padding: 28px 0; border-bottom: 1px solid var(--c-border); }
.trustbar-inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px 28px; }
.trustbar-label { color: var(--c-muted); font-size: 0.9rem; }
.trustbar-logos { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-white);
  font-weight: 700;
  font-size: 0.85rem;
  color: #45505a;
  letter-spacing: 0.5px;
}

/* ===== Features ===== */
.features { padding: 80px 0; background: var(--c-bg); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.feature-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(255, 207, 1, 0.15);
  font-size: 1.5rem;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.feature-card p { color: var(--c-body); }
.feature-card-dark { background: var(--c-dark); color: var(--c-white); border-color: var(--c-dark); }
.feature-card-dark .feature-icon { background: rgba(255, 207, 1, 0.2); }
.feature-card-dark p { color: rgba(255, 255, 255, 0.75); }

/* ===== Instruments ===== */
.instruments { padding: 80px 0; }
.instrument-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.instrument-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease);
}
.instrument-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.instrument-media { position: relative; height: 150px; background-size: cover; background-position: center; }
.instrument-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--c-yellow); color: var(--c-dark);
  font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.media-currencies { background: linear-gradient(135deg, #1c2f38, #2c5364); }
.media-metals { background: linear-gradient(135deg, #7a5c00, #d4af37); }
.media-commodities { background: linear-gradient(135deg, #3a2c1e, #b8860b); }
.media-stocks { background: linear-gradient(135deg, #232526, #414345); }
.instrument-body { padding: 22px; }
.instrument-body h3 { font-size: 1.25rem; margin-bottom: 8px; }
.instrument-body p { color: var(--c-body); font-size: 0.95rem; min-height: 44px; }
.instrument-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--c-muted); margin: 12px 0 4px; border-top: 1px solid var(--c-border); padding-top: 12px; }

/* ===== Platform ===== */
.platform { padding: 88px 0; background: var(--c-dark); color: var(--c-white); }
.platform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.platform-text h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-bottom: 18px; }
.platform-text > p { color: rgba(255, 255, 255, 0.75); margin-bottom: 24px; }
.platform-list { display: grid; gap: 12px; margin-bottom: 28px; }
.platform-list li { color: rgba(255, 255, 255, 0.9); }
.platform-downloads { display: flex; flex-wrap: wrap; gap: 12px; }
.platform-downloads .btn { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.18); }
.platform-downloads .btn:hover { background: rgba(255, 255, 255, 0.16); }

.platform-visual { display: flex; justify-content: center; }
.mock-window {
  width: 100%; max-width: 460px;
  background: #0a1014;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}
.mock-bar { display: flex; gap: 8px; padding: 14px 16px; background: rgba(255, 255, 255, 0.05); }
.mock-bar span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.mock-bar span:first-child { background: #f87171; }
.mock-bar span:nth-child(2) { background: #fbbf24; }
.mock-bar span:nth-child(3) { background: #4ade80; }
.mock-chart { padding: 22px; }
.mock-chart-title { font-size: 0.95rem; margin-bottom: 18px; color: rgba(255, 255, 255, 0.85); }
.mock-chart-title .up { color: #4ade80; margin-left: 8px; }
.mock-bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; }
.mock-bars i {
  flex: 1;
  background: linear-gradient(180deg, var(--c-yellow), rgba(255, 207, 1, 0.3));
  border-radius: 4px 4px 0 0;
  animation: bar-rise 1.2s var(--ease) both;
}
@keyframes bar-rise { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); } }

/* ===== Accounts ===== */
.accounts { padding: 80px 0; background: var(--c-bg); }
.account-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.account-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  border: 1px solid var(--c-border);
  background: var(--c-white);
  display: flex;
  flex-direction: column;
}
.account-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.account-price { font-size: 2rem; font-weight: 700; margin-bottom: 20px; }
.account-price span { font-size: 0.85rem; font-weight: 400; color: var(--c-muted); }
.account-features { display: grid; gap: 12px; margin-bottom: 28px; }
.account-features li { color: var(--c-body); }
.account-card .btn { margin-top: auto; }
.account-pro { background: var(--c-dark); color: var(--c-white); border-color: var(--c-dark); transform: translateY(-8px); box-shadow: var(--shadow-card); }
.account-pro .account-price span, .account-pro .account-features li { color: rgba(255, 255, 255, 0.78); }
.account-ribbon {
  position: absolute; top: 18px; right: -34px;
  transform: rotate(45deg);
  background: var(--c-yellow); color: var(--c-dark);
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 40px;
}

/* ===== Steps ===== */
.steps { padding: 80px 0; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.step-item { text-align: center; padding: 32px 24px; background: var(--c-bg); border-radius: var(--radius-lg); }
.step-num {
  width: 56px; height: 56px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--c-yellow); color: var(--c-dark);
  font-size: 1.4rem; font-weight: 700;
}
.step-item h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step-item p { color: var(--c-body); }
.steps-cta { text-align: center; margin-top: 40px; }

/* ===== About / Stats ===== */
.about { padding: 88px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-text h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-bottom: 18px; }
.about-text p { color: var(--c-body); margin-bottom: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stat-item { background: var(--c-bg); border-radius: 12px; padding: 28px; }
.stat-number { font-size: 1.85rem; font-weight: 700; color: var(--c-dark); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--c-muted); font-size: 0.9rem; margin-top: 6px; }

/* ===== Testimonials ===== */
.testimonials { padding: 80px 0; background: var(--c-bg); }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 30px; }
.stars { color: var(--c-yellow-active); letter-spacing: 2px; margin-bottom: 14px; }
.testimonial-card blockquote { color: #3a4147; line-height: 1.7; margin-bottom: 22px; }
.testimonial-card figcaption { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-dark); color: var(--c-yellow); font-weight: 700;
}
.testimonial-card small { display: block; color: var(--c-muted); font-size: 0.8rem; }

/* ===== FAQ ===== */
.faq { padding: 80px 0; }
.faq-inner { max-width: 800px; }
.faq-list { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--c-border); border-radius: 12px; overflow: hidden; background: var(--c-white); }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px;
  background: none; border: none; cursor: pointer;
  font-size: 1.05rem; font-weight: 600; text-align: left; color: var(--c-text);
}
.faq-icon { font-size: 1.4rem; color: var(--c-yellow-active); transition: transform 250ms var(--ease); flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 300ms var(--ease); }
.faq-a p { padding: 0 24px 20px; color: var(--c-body); line-height: 1.7; }

/* ===== CTA ===== */
.cta { background: var(--c-yellow); padding: 72px 0; }
.cta-inner { text-align: center; }
.cta-inner h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); color: var(--c-dark); margin-bottom: 12px; }
.cta-inner p { color: rgba(15, 23, 28, 0.8); margin-bottom: 28px; font-size: 1.125rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
/* CTA sits on yellow: dark solid button (white text) + dark outline button */
.cta .btn-dark {
  background: #0f171c;
  color: #ffffff;
  border: 1px solid #0f171c;
}
.cta .btn-dark:hover { background: #1c2f38; border-color: #1c2f38; }
.cta .btn-outline-dark {
  background: transparent;
  color: #0f171c;
  border: 1px solid rgba(15, 23, 28, 0.5);
}
.cta .btn-outline-dark:hover { background: rgba(15, 23, 28, 0.08); border-color: #0f171c; }

/* ===== Newsletter ===== */
.newsletter { background: var(--c-dark); color: var(--c-white); padding: 56px 0; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.newsletter-inner h3 { font-size: 1.5rem; margin-bottom: 6px; }
.newsletter-inner p { color: rgba(255, 255, 255, 0.7); }
.newsletter-form { display: flex; gap: 12px; flex: 1; max-width: 480px; min-width: 280px; }
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
}
.newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.newsletter-form input:focus { outline: none; border-color: var(--c-yellow); }

/* ===== Footer ===== */
.site-footer { background: var(--c-dark); color: rgba(255, 255, 255, 0.7); padding: 64px 0 40px; }
.footer-nav { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .footer-desc { font-size: 0.9rem; line-height: 1.6; margin: 16px 0; max-width: 260px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  transition: background 200ms var(--ease);
}
.footer-social a:hover { background: rgba(255, 207, 1, 0.2); }
.footer-col h4 { color: var(--c-white); font-size: 1rem; margin-bottom: 16px; }
.footer-col a { display: block; color: rgba(255, 255, 255, 0.65); padding: 6px 0; font-size: 0.9rem; transition: color 200ms var(--ease); }
.footer-col a:hover { color: var(--c-yellow); }
.footer-divider { border: none; border-top: 1px solid rgba(255, 255, 255, 0.12); margin: 40px 0; }
.footer-bottom { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: start; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-badges .trust-chip { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.8); }
.footer-legal p { font-size: 0.8rem; line-height: 1.6; margin-bottom: 12px; }
.footer-legal .copyright { color: rgba(255, 255, 255, 0.5); margin-top: 8px; }

/* ===== Quotes table (markets page) ===== */
.quotes-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.quotes-table { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--c-white); }
.quotes-table th, .quotes-table td { padding: 16px 20px; text-align: right; border-bottom: 1px solid var(--c-border); font-variant-numeric: tabular-nums; }
.quotes-table th { background: var(--c-bg); color: var(--c-muted); font-size: 0.85rem; font-weight: 600; }
.quotes-table th:first-child, .quotes-table td:first-child { text-align: left; }
.quotes-table tbody tr:last-child td { border-bottom: none; }
.quotes-table tbody tr:hover { background: rgba(255, 207, 1, 0.05); }
.quotes-table .sym { font-weight: 700; }
.quotes-table .up { color: var(--c-up); }
.quotes-table .down { color: var(--c-down); }

/* ===== Detail row (instruments page) ===== */
.detail-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 56px 0; border-bottom: 1px solid var(--c-border); }
.detail-row:last-child { border-bottom: none; }
.detail-row.reverse .detail-media { order: 2; }
.detail-media { height: 300px; border-radius: var(--radius-lg); }
.detail-text h2 { font-size: 1.8rem; margin-bottom: 14px; }
.detail-text p { color: var(--c-body); margin-bottom: 16px; }
.detail-list { display: grid; gap: 10px; margin-bottom: 20px; }
.detail-list li { color: var(--c-body); }

/* ===== Contact (faq page) ===== */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.contact-card { text-align: center; background: var(--c-bg); border-radius: var(--radius-lg); padding: 32px; }
.contact-card .contact-icon { font-size: 2rem; margin-bottom: 12px; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.contact-card p { color: var(--c-body); }

/* ===== Form controls (shared) ===== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--c-text); }
.field input, .field select {
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--c-white);
  color: var(--c-text);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--c-yellow); box-shadow: 0 0 0 3px rgba(255, 207, 1, 0.2); }
.field.invalid input { border-color: var(--c-down); }
.field .field-error { color: var(--c-down); font-size: 0.8rem; min-height: 1em; }

/* ===== Toolbar: search + filter ===== */
.table-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.search-box input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: 0.95rem;
  background: var(--c-white);
}
.search-box input:focus { outline: none; border-color: var(--c-yellow); box-shadow: 0 0 0 3px rgba(255, 207, 1, 0.2); }
.search-box::before { content: "🔍"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 0.9rem; opacity: 0.6; }

/* ===== Sortable table headers ===== */
.quotes-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.quotes-table th.sortable:hover { color: var(--c-text); }
.quotes-table th.sortable::after { content: " ⇅"; opacity: 0.4; font-size: 0.8em; }
.quotes-table th.sort-asc::after { content: " ↑"; opacity: 1; color: var(--c-yellow-active); }
.quotes-table th.sort-desc::after { content: " ↓"; opacity: 1; color: var(--c-yellow-active); }
.quotes-table tr.hidden-row { display: none; }
.no-result { text-align: center; padding: 32px; color: var(--c-muted); }
@keyframes flash-up { 0% { background: rgba(22, 163, 74, 0.22); } 100% { background: transparent; } }
@keyframes flash-down { 0% { background: rgba(220, 38, 38, 0.22); } 100% { background: transparent; } }
.tk-price.flash-up { animation: flash-up 700ms var(--ease); }
.tk-price.flash-down { animation: flash-down 700ms var(--ease); }

/* ===== Filter tabs (instruments) ===== */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 8px; }
.filter-tab {
  padding: 8px 20px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-white);
  color: var(--c-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 200ms var(--ease);
}
.filter-tab:hover { border-color: var(--c-yellow); }
.filter-tab.active { background: var(--c-dark); color: var(--c-white); border-color: var(--c-dark); }
.detail-row.filtered-out { display: none; }

/* ===== Order panel (platform) ===== */
.order-panel {
  max-width: 420px;
  margin: 0 auto;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.order-symbol { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.order-symbol select { flex: 1; margin-right: 12px; }
.order-quote { display: flex; gap: 12px; margin-bottom: 18px; }
.order-quote > div { flex: 1; text-align: center; border-radius: 10px; padding: 14px; color: #fff; }
.order-quote .q-bid { background: linear-gradient(135deg, #b91c1c, #dc2626); }
.order-quote .q-ask { background: linear-gradient(135deg, #15803d, #16a34a); }
.order-quote .q-label { font-size: 0.75rem; opacity: 0.85; }
.order-quote .q-val { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-side { display: flex; gap: 10px; margin-bottom: 16px; }
.order-side button {
  flex: 1; padding: 12px; border-radius: var(--radius); border: 1px solid var(--c-border);
  background: var(--c-white); font-weight: 700; cursor: pointer; transition: all 200ms var(--ease);
}
.order-side button.sell.active { background: var(--c-down); color: #fff; border-color: var(--c-down); }
.order-side button.buy.active { background: var(--c-up); color: #fff; border-color: var(--c-up); }
.order-submit { width: 100%; }
.order-feedback { margin-top: 14px; text-align: center; font-weight: 600; min-height: 1.2em; }
.order-feedback.ok { color: var(--c-up); }

/* ===== Calculator (accounts) ===== */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.tool-card { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 32px; }
.tool-card h3 { font-size: 1.3rem; margin-bottom: 20px; }
.calc-results { display: grid; gap: 12px; margin-top: 4px; }
.calc-result { display: flex; justify-content: space-between; padding: 14px 16px; background: var(--c-bg); border-radius: 10px; }
.calc-result .r-label { color: var(--c-body); }
.calc-result .r-value { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ===== Multi-step form (accounts) ===== */
.wizard-progress { display: flex; align-items: center; margin-bottom: 28px; }
.wizard-progress .wp-step { flex: 1; text-align: center; position: relative; color: var(--c-muted); font-size: 0.85rem; }
.wizard-progress .wp-dot {
  width: 34px; height: 34px; margin: 0 auto 8px;
  border-radius: 50%; background: var(--c-bg); border: 2px solid var(--c-border);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  transition: all 200ms var(--ease);
}
.wizard-progress .wp-step.active .wp-dot, .wizard-progress .wp-step.done .wp-dot { background: var(--c-yellow); border-color: var(--c-yellow); color: var(--c-dark); }
.wizard-progress .wp-step.active { color: var(--c-text); font-weight: 700; }
.wizard-progress .wp-line { position: absolute; top: 17px; left: 50%; width: 100%; height: 2px; background: var(--c-border); z-index: -1; }
.wizard-progress .wp-step.done .wp-line { background: var(--c-yellow); }
.wizard-progress .wp-step:last-child .wp-line { display: none; }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.wizard-done { text-align: center; padding: 20px 0; }
.wizard-done .done-icon { font-size: 3rem; margin-bottom: 12px; }

@media (max-width: 767px) {
  .tool-grid { grid-template-columns: 1fr; }
}

/* ===== Contact card as button / link ===== */
.contact-card { text-decoration: none; color: inherit; display: block; }
.contact-card-btn {
  font: inherit; border: none; cursor: pointer; width: 100%;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.contact-card-btn:hover, a.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

/* ===== Modal (WeChat QR) ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15, 23, 28, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 250ms var(--ease), visibility 250ms var(--ease);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  position: relative;
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 360px; width: 100%;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  transform: translateY(16px) scale(0.98);
  transition: transform 250ms var(--ease);
}
.modal-overlay.open .modal-box { transform: none; }
.modal-box h3 { font-size: 1.3rem; margin-bottom: 8px; }
.modal-box p { color: var(--c-body); margin-bottom: 20px; font-size: 0.95rem; }
.modal-qr { width: 220px; height: 220px; margin: 0 auto; border-radius: 10px; border: 1px solid var(--c-border); object-fit: contain; }
.modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: var(--c-bg); color: var(--c-text);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  transition: background 200ms var(--ease);
}
.modal-close:hover { background: var(--c-border); }

/* ===== Scroll progress bar ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--c-yellow), var(--c-yellow-hover));
  z-index: 2000;
  transition: width 80ms linear;
}

/* ===== Theme toggle button ===== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: transparent;
  color: var(--c-white);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 200ms var(--ease), border-color 200ms var(--ease);
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--c-white); }

/* ===== Focus-visible (accessibility) ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.faq-q:focus-visible,
.filter-tab:focus-visible {
  outline: 3px solid var(--c-yellow);
  outline-offset: 2px;
  border-radius: 4px;
}

/* body scroll lock (mobile menu open) */
body.nav-open { overflow: hidden; }

/* ===== Light theme overrides (default is light-ish already; this is the explicit "dark page" theme) ===== */
[data-theme="dark"] {
  --c-text: #e8eaed;
  --c-body: #b3b8bd;
  --c-muted: #8d9194;
  --c-bg: #12191e;
  --c-white: #1a2329;
  --c-border: #2a343b;
}
[data-theme="dark"] body { background: #0b1115; }
[data-theme="dark"] .features,
[data-theme="dark"] .accounts,
[data-theme="dark"] .testimonials { background: #12191e; }
[data-theme="dark"] .feature-card,
[data-theme="dark"] .instrument-card,
[data-theme="dark"] .account-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .tool-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .quotes-table,
[data-theme="dark"] .filter-tab,
[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .search-box input {
  background: #1a2329;
  border-color: #2a343b;
  color: var(--c-text);
}
[data-theme="dark"] .feature-card p,
[data-theme="dark"] .instrument-body p,
[data-theme="dark"] .step-item p,
[data-theme="dark"] .account-features li,
[data-theme="dark"] .testimonial-card blockquote,
[data-theme="dark"] .detail-text p { color: var(--c-body); }
[data-theme="dark"] .step-item,
[data-theme="dark"] .stat-item,
[data-theme="dark"] .contact-card { background: #12191e; }
[data-theme="dark"] .quotes-table th { background: #12191e; color: var(--c-muted); }
[data-theme="dark"] .quotes-table tbody tr:hover { background: rgba(255, 207, 1, 0.08); }

/* Header/topbar/footer stay a fixed dark region in both themes:
   restore real white for their inner text & controls (they must NOT
   follow the themed --c-white token, which becomes dark in dark mode). */
[data-theme="dark"] .site-header {
  background: #0f171c;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .site-header .logo,
[data-theme="dark"] .site-header .logo-text { color: #ffffff; }
[data-theme="dark"] .main-nav { background: #0f171c; }
[data-theme="dark"] .main-nav a { color: #ffffff; }
[data-theme="dark"] .main-nav a:hover,
[data-theme="dark"] .main-nav a.active { color: var(--c-yellow); }
[data-theme="dark"] .nav-toggle span { background: #ffffff; }
[data-theme="dark"] .theme-toggle { color: #ffffff; border-color: rgba(255, 255, 255, 0.25); }
[data-theme="dark"] .theme-toggle:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .btn-ghost { color: #ffffff; border-color: rgba(255, 255, 255, 0.35); }
[data-theme="dark"] .btn-ghost:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .btn-primary { background: var(--c-yellow); color: #0f171c; }
[data-theme="dark"] .topbar { background: #0a1014; color: rgba(255, 255, 255, 0.7); }
[data-theme="dark"] .site-footer { background: #0f171c; color: rgba(255, 255, 255, 0.7); }
[data-theme="dark"] .site-footer .footer-col a { color: rgba(255, 255, 255, 0.65); }
[data-theme="dark"] .site-footer .footer-col a:hover { color: var(--c-yellow); }
[data-theme="dark"] .site-footer .footer-col h4 { color: #ffffff; }
[data-theme="dark"] .footer-desc,
[data-theme="dark"] .footer-legal p { color: rgba(255, 255, 255, 0.65); }
[data-theme="dark"] .newsletter { background: #0f171c; color: #ffffff; }
[data-theme="dark"] .newsletter-inner p { color: rgba(255, 255, 255, 0.7); }
[data-theme="dark"] .platform { background: #0f171c; color: #ffffff; }
[data-theme="dark"] .platform-text > p { color: rgba(255, 255, 255, 0.75); }
[data-theme="dark"] .platform-list li { color: rgba(255, 255, 255, 0.9); }

/* ===== Back to top ===== */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  border: none; border-radius: 50%;
  background: var(--c-yellow); color: var(--c-dark);
  font-size: 1.3rem; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: opacity 250ms var(--ease), transform 250ms var(--ease), background 200ms var(--ease);
  z-index: 900;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--c-yellow-hover); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.revealed { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .topbar { display: none; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--c-dark);
    padding: 8px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-130%);
    transition: transform 300ms var(--ease);
    margin-right: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .nav-toggle-checkbox:checked ~ .main-nav { transform: translateY(0); }
  .header-inner { gap: 12px; }
  .logo { margin-right: auto; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; cursor: pointer; order: 3; }
  .nav-toggle span { display: block; height: 2px; width: 22px; background: var(--c-white); transition: transform 250ms var(--ease), opacity 250ms var(--ease); }
  .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .header-actions .btn-ghost { display: none; }

  .feature-grid, .instrument-grid, .testimonial-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .account-grid { grid-template-columns: 1fr; }
  .account-pro { transform: none; }
  .platform-grid, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-nav { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .detail-row { grid-template-columns: 1fr; gap: 28px; }
  .detail-row.reverse .detail-media { order: 0; }
  .detail-media { height: 220px; }
}

@media (max-width: 640px) {
  .container, .header-inner { padding: 0 16px; }
  .hero { padding: 64px 0 72px; }
  .features, .instruments, .platform, .accounts, .steps, .about, .testimonials, .faq { padding: 56px 0; }
  .feature-grid, .instrument-grid, .testimonial-grid, .steps-grid, .stats-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .footer-bottom { grid-template-columns: 1fr; gap: 20px; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .newsletter-inner { flex-direction: column; align-items: flex-start; }
  .newsletter-form { width: 100%; max-width: none; }
  .account-card { padding: 28px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track, .mock-bars i { animation: none; }
}
