/* ============================================================
   Site-17 — Bybit Institutional Guide
   Design DNA: Enterprise Financial (Goldman Sachs / BlackRock)
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --bg: #12141A;
  --surface: #1A1D26;
  --elevated: #222630;
  --primary: #1E3A5F;
  --primary-dark: #152B47;
  --accent: #F7A600;
  --accent-muted: rgba(247,166,0,.12);
  --text: #E0E4EA;
  --text-2: #8A90A0;
  --compliance: #3A7CA5;
  --compliance-muted: rgba(58,124,165,.12);
  --border: rgba(255,255,255,.06);
  --border-accent: rgba(247,166,0,.35);
  --success: #2ECC71;
  --warning: #F7A600;
  --danger: #E74C3C;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,.35);
  --max-w: 1080px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #ffb833; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* --- Typography --- */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 3.5vw, 42px); margin-bottom: 16px; }
h2 { font-size: clamp(22px, 2.5vw, 32px); margin-bottom: 12px; }
h3 { font-size: clamp(17px, 1.8vw, 22px); margin-bottom: 8px; }
.report-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); }
.legal-text { font-size: 13px; font-weight: 400; line-height: 1.7; color: var(--text-2); }
.metric-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

/* --- Layout --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.grid-2 { display: grid; grid-template-columns: 60% 40%; gap: 48px; align-items: start; }
.grid-2.reverse { grid-template-columns: 40% 60%; }

/* --- Navigation --- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(18,20,26,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 15px; }
.nav-logo img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-2); font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  background: var(--accent); color: #0a0a0a; font-size: 13px; font-weight: 600;
  padding: 8px 18px; border-radius: var(--radius); transition: background .2s;
}
.nav-cta:hover { background: #ffb833; color: #0a0a0a; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1a3f6b 100%);
  padding: 80px 0 64px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(247,166,0,.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; text-align: center; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-muted); color: var(--accent);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  padding: 6px 16px; border-radius: 20px; margin-bottom: 24px;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.hero h1 { color: #fff; margin-bottom: 16px; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero p { color: rgba(255,255,255,.7); max-width: 620px; margin: 0 auto 32px; font-size: 16px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }

/* --- Metrics Band --- */
.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin-top: 8px;
}
.metric {
  background: var(--surface); padding: 28px 24px; text-align: center;
  transition: background .2s;
}
.metric:hover { background: var(--elevated); }
.metric-value { font-size: clamp(26px, 3vw, 36px); font-weight: 700; color: #fff; line-height: 1.1; margin-bottom: 6px; }
.metric-unit { font-size: 14px; font-weight: 400; color: var(--text-2); }
.metric-desc { font-size: 13px; color: var(--text-2); margin-top: 8px; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; padding: 12px 24px;
  border-radius: var(--radius); transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #0a0a0a; }
.btn-primary:hover { background: #ffb833; color: #0a0a0a; transform: translateY(-1px); }
.btn-secondary { background: var(--elevated); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: rgba(255,255,255,.15); background: rgba(34,38,48,.9); }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--border-accent); }
.btn-outline:hover { background: var(--accent-muted); border-color: var(--accent); }
.btn-sm { font-size: 13px; padding: 8px 16px; }

/* --- Section --- */
.section { padding: 72px 0; }
.section-label { margin-bottom: 12px; }
.section-title { color: #fff; margin-bottom: 8px; }
.section-desc { color: var(--text-2); max-width: 560px; }
.section + .section { border-top: 1px solid var(--border); }

/* --- Card --- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: rgba(255,255,255,.1); transform: translateY(-2px); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--compliance-muted); color: var(--compliance);
  font-size: 20px; margin-bottom: 20px;
}
.card h3 { color: #fff; margin-bottom: 8px; font-size: 18px; }
.card p { color: var(--text-2); font-size: 14px; line-height: 1.65; }

/* --- Service Tiers Table --- */
.tier-table { width: 100%; border-collapse: collapse; }
.tier-table thead th {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-2); padding: 16px 20px; text-align: left;
  background: var(--elevated); border-bottom: 1px solid var(--border);
}
.tier-table thead th:first-child { border-radius: var(--radius-lg) 0 0 0; }
.tier-table thead th:last-child { border-radius: 0 var(--radius-lg) 0 0; }
.tier-table tbody td {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text); background: var(--surface);
  vertical-align: middle;
}
.tier-table tbody tr:last-child td { border-bottom: none; }
.tier-table tbody tr:hover td { background: var(--elevated); }
.tier-table .criterion { font-weight: 500; color: var(--text); }
.tier-table .recommended {
  border-left: 3px solid var(--accent);
}
.tier-table .recommended td:first-child {
  padding-left: 17px;
}
.tier-highlight {
  background: var(--accent-muted); color: var(--accent); font-weight: 600;
  padding: 3px 10px; border-radius: 4px; font-size: 12px;
  display: inline-block;
}
.tier-check { color: var(--success); font-weight: 700; }
.tier-cross { color: var(--text-2); }

/* --- CTA Block --- */
.cta-block {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg); padding: 48px; text-align: center;
  border: 1px solid rgba(255,255,255,.05);
}
.cta-block h2 { color: #fff; margin-bottom: 12px; }
.cta-block p { color: rgba(255,255,255,.65); max-width: 520px; margin: 0 auto 28px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- FAQ Accordion --- */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%; text-align: left; padding: 20px 0;
  font-size: 15px; font-weight: 500; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  transition: color .2s;
}
.faq-question:hover { color: #fff; }
.faq-icon {
  width: 24px; height: 24px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--elevated); transition: transform .3s;
  font-size: 14px; color: var(--text-2);
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease;
  padding: 0;
}
.faq-item.open .faq-answer { max-height: 500px; padding-bottom: 20px; }
.faq-answer p { color: var(--text-2); font-size: 14px; line-height: 1.7; }

/* --- Compliance Badges --- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 4px; font-size: 12px; font-weight: 600;
}
.badge-compliance { background: var(--compliance-muted); color: var(--compliance); }
.badge-accent { background: var(--accent-muted); color: var(--accent); }
.badge-success { background: rgba(46,204,113,.1); color: var(--success); }

/* --- Risk Cards --- */
.risk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.risk-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  border-left: 3px solid var(--elevated);
}
.risk-card.high { border-left-color: var(--danger); }
.risk-card.medium { border-left-color: var(--warning); }
.risk-card.low { border-left-color: var(--compliance); }
.risk-card h3 { color: #fff; font-size: 16px; margin-bottom: 8px; }
.risk-card p { color: var(--text-2); font-size: 14px; }
.risk-level {
  display: inline-flex; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 12px;
}
.risk-level.high { color: var(--danger); }
.risk-level.medium { color: var(--warning); }
.risk-level.low { color: var(--compliance); }

/* --- Guide Steps --- */
.step-list { counter-reset: step; }
.step-item {
  display: grid; grid-template-columns: 56px 1fr; gap: 24px;
  padding: 32px 0; border-bottom: 1px solid var(--border);
  counter-increment: step;
}
.step-item:last-child { border-bottom: none; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--elevated); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: var(--accent);
}
.step-item h3 { color: #fff; margin-bottom: 8px; font-size: 18px; }
.step-item p { color: var(--text-2); font-size: 14px; }

/* --- Compliance Timeline --- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px;
  width: 1px; background: var(--border);
}
.timeline-item { position: relative; padding: 20px 0; }
.timeline-item::before {
  content: ''; position: absolute; left: -27px; top: 26px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--compliance); border: 2px solid var(--bg);
}
.timeline-item h3 { color: #fff; font-size: 16px; margin-bottom: 6px; }
.timeline-item p { color: var(--text-2); font-size: 14px; }

/* --- Extended Legal Footer --- */
.footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  max-width: var(--max-w); margin: 0 auto; padding: 0 32px;
}
.footer-brand p { color: var(--text-2); font-size: 13px; margin-top: 12px; max-width: 280px; }
.footer-col h4 {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-2); margin-bottom: 16px;
}
.footer-col a { display: block; color: var(--text-2); font-size: 13px; padding: 4px 0; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-legal {
  max-width: var(--max-w); margin: 40px auto 0; padding: 24px 32px 0;
  border-top: 1px solid var(--border);
}
.footer-legal p { color: var(--text-2); font-size: 12px; line-height: 1.7; }
.footer-bottom {
  max-width: var(--max-w); margin: 16px auto 0; padding: 16px 32px 0;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 12px; color: var(--text-2); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 12px; color: var(--text-2); }
.footer-bottom-links a:hover { color: var(--text); }

/* --- Page Header (inner pages) --- */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 56px 0 48px; border-bottom: 1px solid var(--border);
}
.page-header-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.page-header h1 { color: #fff; margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,.65); max-width: 560px; }

/* --- Glossary --- */
.glossary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.glossary-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
}
.glossary-term { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.glossary-def { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* --- Best Practices --- */
.practice-list { display: grid; gap: 12px; }
.practice-item {
  display: flex; gap: 16px; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.practice-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--compliance-muted); color: var(--compliance);
  border-radius: 8px; font-size: 16px;
}
.practice-item h3 { color: #fff; font-size: 15px; margin-bottom: 4px; }
.practice-item p { color: var(--text-2); font-size: 14px; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--elevated); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2c3040; }

/* --- Selection --- */
::selection { background: var(--primary); color: #fff; }
