/* HighAlphaTrading Clean Light Stylesheet (Terms, Privacy, FAQ, Support) */
:root {
  --bg: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --white: #0f172a;
  --text-heading: #0f172a;
  --text-main: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --brand-blue: #008AFE;
  --brand-blue-hover: #006bc5;
  --brand-blue-glow: rgba(0, 138, 254, 0.12);
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: rgba(0, 138, 254, 0.45);
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'IBM Plex Mono', monospace, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body.legal-page {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background ambients - very subtle soft tint */
.legal-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
}

.legal-ambient-1 {
  position: fixed;
  top: -10vw;
  left: 20%;
  width: 50vw;
  height: 40vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 138, 254, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.legal-ambient-2 {
  position: fixed;
  bottom: 5vw;
  right: 10%;
  width: 45vw;
  height: 35vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Hero Section */
.legal-hero {
  position: relative;
  z-index: 1;
  padding: 110px 24px 44px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

@media (max-width: 800px) {
  .legal-hero {
    padding: 90px 20px 32px;
  }
}

.legal-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.legal-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(0, 138, 254, 0.08);
  border: 1px solid rgba(0, 138, 254, 0.22);
  color: #006bc5;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.legal-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #006bc5;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.legal-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  line-height: 1.2;
}

.legal-hero p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 720px;
  margin: 0;
}

.legal-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 16px;
}

.legal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legal-meta-item svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Layout Grid */
.legal-main {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 44px 24px 80px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

/* Sticky Sidebar Table of Contents */
.legal-toc-wrap {
  position: sticky;
  top: 96px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 18px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.legal-toc-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #006bc5;
  text-transform: uppercase;
}

.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-toc-link {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  transition: background 0.15s ease, color 0.15s ease;
}

.legal-toc-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.legal-toc-link.is-active {
  background: rgba(0, 138, 254, 0.09);
  color: #006bc5;
  font-weight: 700;
}

/* Content Column */
.legal-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.legal-section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 34px 32px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.legal-section:hover {
  border-color: var(--border-hover);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.legal-section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.legal-section-num {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-blue);
  letter-spacing: 0.05em;
  flex: none;
}

.legal-section h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

.legal-section p {
  margin: 0 0 16px;
  color: var(--text-main);
  font-size: 14.5px;
  line-height: 1.7;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 16px 20px;
  padding: 0;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.7;
}

.legal-section li {
  margin-bottom: 8px;
}

.legal-section li::marker {
  color: var(--brand-blue);
}

/* Callout Alert Boxes */
.legal-callout {
  margin: 20px 0;
  padding: 20px 22px;
  border-radius: 10px;
  background: #f0f7ff;
  border-left: 4px solid var(--brand-blue);
  border-top: 1px solid #dbeafe;
  border-right: 1px solid #dbeafe;
  border-bottom: 1px solid #dbeafe;
}

.legal-callout.warning {
  background: #fffbeb;
  border-left-color: #d97706;
  border-top-color: #fef3c7;
  border-right-color: #fef3c7;
  border-bottom-color: #fef3c7;
}

.legal-callout.danger {
  background: #fef2f2;
  border-left-color: #e11d48;
  border-top-color: #fee2e2;
  border-right-color: #fee2e2;
  border-bottom-color: #fee2e2;
}

.legal-callout strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-heading);
}

.legal-callout p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.6;
}

/* Action Buttons */
.legal-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand-blue);
  color: #ffffff;
  padding: 12px 26px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 138, 254, 0.25);
  border: 1px solid var(--brand-blue);
}

.legal-cta-btn:hover {
  background: #0077db;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 138, 254, 0.35);
}

.legal-nav-link,
.legal-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: var(--text-heading);
  padding: 11px 22px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.legal-nav-link:hover,
.legal-back-btn:hover {
  background: #f8fafc;
  border-color: var(--border-hover);
  color: #0f172a;
}

/* Footer */
.legal-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  padding: 36px 24px;
}

.legal-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.legal-footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.legal-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-footer-links a:hover {
  color: #0f172a;
}

/* Mobile & Tablet Adjustments */
@media (max-width: 960px) {
  .legal-main {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 24px;
  }

  .legal-toc-wrap {
    position: relative;
    top: 0;
  }

  .legal-toc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px;
  }
}

@media (max-width: 640px) {
  .legal-section {
    padding: 24px 20px;
  }

  .legal-hero {
    padding: 80px 20px 24px;
  }

  .legal-toc-list {
    grid-template-columns: 1fr;
  }

  .legal-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
