/* FX Help — legal pages stylesheet */

:root {
  --bg: #0B0F14;
  --surface: #11171F;
  --surface-elevated: #161D27;
  --border: #1F2733;
  --primary: #14F195;
  --secondary: #00D4FF;
  --tertiary: #A78BFA;
  --text: #FFFFFF;
  --text-muted: #8A94A6;
  --text-soft: #C5CDD9;
  --error: #FF4D6A;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 10% 0%, rgba(20, 241, 149, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(0, 212, 255, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.header-logo img {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}

.header-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-brand .name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.header-brand .name .accent {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-brand .tag {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Hamburger button (mobile only) ─────────────────────────────────── */
.legal-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  margin-left: auto;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.legal-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.legal-nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.legal-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.legal-nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header-nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
}

.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: color 120ms ease;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--text);
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

/* The legal landing page uses a wider container so the 3 doc cards sit on
   one row at desktop. Long-form text pages keep the narrower 800px main
   so reading line-length stays comfortable. */
main.legal-home {
  max-width: 1100px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  background: rgba(20, 241, 149, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(20, 241, 149, 0.18);
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.meta strong {
  color: var(--text-soft);
}

h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
  scroll-margin-top: 90px;
}

h2 .num {
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
  margin-right: 10px;
  font-weight: 600;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 8px;
}

p {
  margin: 0 0 14px;
}

ul, ol {
  margin: 0 0 18px 22px;
}

li {
  margin-bottom: 8px;
}

a {
  color: var(--secondary);
  text-decoration: underline;
  text-decoration-color: rgba(0, 212, 255, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 120ms ease;
}

a:hover {
  text-decoration-color: var(--secondary);
}

strong {
  color: var(--text);
  font-weight: 600;
}

code, kbd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 18px 22px;
  margin: 24px 0;
  border-radius: 8px;
}

.callout.warning {
  border-left-color: var(--error);
  background: linear-gradient(180deg, rgba(255, 77, 106, 0.04), transparent);
}

.callout.info {
  border-left-color: var(--secondary);
}

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

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 36px;
}

.toc-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.toc ol {
  margin: 0;
  list-style: decimal-leading-zero;
  padding-left: 28px;
  columns: 2;
  column-gap: 28px;
}

@media (max-width: 640px) {
  .toc ol { columns: 1; }

  /* Collapse the header nav into a slide-down menu under the hamburger. */
  .legal-nav-toggle { display: flex; }
  .header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    background: rgba(11, 15, 20, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
  }
  .header-nav.is-open {
    max-height: 320px;
    padding-top: 8px;
    padding-bottom: 16px;
  }
  .header-nav a {
    padding: 14px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .header-nav a:last-child { border-bottom: none; }

  /* One card per row on phones. */
  .cards { grid-template-columns: 1fr; }
}

.toc li {
  margin-bottom: 6px;
  break-inside: avoid;
}

.toc a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
}

.toc a:hover {
  color: var(--primary);
}

.contact-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin: 40px 0 20px;
}

.contact-card h3 {
  margin-top: 0;
  font-size: 18px;
}

.contact-card .field {
  display: flex;
  gap: 12px;
  margin: 10px 0;
  font-size: 15px;
}

.contact-card .field .label {
  color: var(--text-muted);
  width: 80px;
  flex-shrink: 0;
}

footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

footer .links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

footer .links a {
  color: var(--text-muted);
  text-decoration: none;
}

footer .links a:hover {
  color: var(--primary);
}

footer .copyright {
  color: var(--text-muted);
}

/* ---------- Index / hub page ---------- */
.hero {
  text-align: center;
  padding: 32px 0 12px;
}

.hero h1 {
  font-size: clamp(32px, 5.5vw, 48px);
}

.hero p {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 540px;
  margin: 0 auto;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 40px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.card .card-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--secondary);
  font-weight: 700;
}

.card h3 {
  color: var(--text);
  font-size: 18px;
  margin: 0;
}

.card p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.55;
}

/* Print-friendly (reviewers sometimes save as PDF) */
@media print {
  body {
    background: #fff;
    color: #111;
  }
  .header, footer, .header-nav { display: none; }
  main { max-width: 100%; padding: 0; }
  h1, h2, h3, strong { color: #000; }
  a { color: #0050b3; }
  .toc, .callout, .contact-card { border: 1px solid #ccc; background: #fafafa; }
}
