/* C.U.T Financial Services - theme from logo: black, metallic silver, gold */
:root {
  --bg: #000000;
  --bg-elevated: #0d0d0d;
  --bg-card: #111111;
  --text: #e8e8e8;
  --text-muted: #a0a0a0;
  --silver: #c0c0c0;
  --silver-light: #e0e0e0;
  --gold: #d4af37;
  --gold-light: #f0d875;
  --gold-dim: #b8962e;
  --line: #2a2a2a;
  --accent: #d4af37;
  --danger: #c93030;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
  --header-h: 72px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--silver-light);
  text-decoration: none;
}

a:hover {
  color: var(--gold);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.site-header .logo-wrap {
  display: flex;
  align-items: center;
}

.site-header .logo-wrap img {
  height: 44px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
}

.site-nav a:hover {
  color: var(--gold);
}

/* Nav items shown only when user is logged in (hidden by default for guests) */
.site-nav a.nav-auth-only {
  display: none !important;
}
body.nav-authenticated .site-nav a.nav-auth-only {
  display: revert !important;
}

.site-header .btn-login {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--gold);
  color: #000;
  font-weight: 600;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}

.site-header .btn-login:hover {
  background: var(--gold-light);
  color: #000;
}

/* Main content */
.main-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* Hero (Gunbot-style) */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--silver-light);
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}

.hero .tagline {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.hero .cta-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--gold);
  color: #000;
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--gold-light);
  color: #000;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: transparent;
  color: var(--silver-light);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Section blocks */
.section {
  padding: 60px 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: 1.75rem;
  color: var(--silver-light);
  margin: 0 0 24px;
  text-align: center;
}

.section .sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
}

/* Footer (Bybit-style) */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  padding: 48px 24px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
}

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-brand img {
  height: 40px;
  width: auto;
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 18px;
}

.footer-social a:hover {
  background: var(--line);
  color: var(--gold);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

@media (max-width: 700px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-bottom .copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-bottom .legal {
  display: flex;
  gap: 24px;
}

.footer-bottom .legal a {
  font-size: 13px;
  color: var(--text-muted);
}

/* Page title (inner pages) */
.page-title {
  padding: 48px 0 24px;
  text-align: center;
}

.page-title h1 {
  font-size: 2rem;
  color: var(--silver-light);
  margin: 0 0 8px;
}

.page-title p {
  color: var(--text-muted);
  margin: 0;
}

/* Crypto subdomain link */
.crypto-link {
  color: var(--gold);
  font-weight: 500;
}

.crypto-link:hover {
  color: var(--gold-light);
}

/* Learn article content */
.article-body { max-width: var(--max-width); margin: 0 auto; color: var(--text); }
.article-body h2 { font-size: 1.5rem; color: var(--silver-light); margin: 32px 0 16px; text-align: left; }
.article-body h3 { font-size: 1.2rem; color: var(--silver); margin: 24px 0 12px; }
.article-body p { margin: 0 0 16px; line-height: 1.65; color: var(--text); }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 24px; color: var(--text); }
.article-body li { margin-bottom: 8px; line-height: 1.55; }
.article-body strong { color: var(--silver-light); }
.article-body .term { font-weight: 600; color: var(--gold); }
.article-body .glossary-list { list-style: none; padding-left: 0; }
.article-body .glossary-list li { margin-bottom: 12px; padding-left: 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.article-body th { background: var(--bg-card); color: var(--silver-light); font-weight: 600; }
.article-body td { color: var(--text); }
.article-body .callout { background: var(--bg-card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; padding: 16px; margin: 20px 0; }
.article-body .callout p:last-child { margin-bottom: 0; }
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 32px 0; }

/* Materials-style doc layout: left nav, center content, right TOC */
.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr 200px;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h) - 200px);
}

.doc-nav {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  padding: 24px 16px 48px 24px;
  border-right: 1px solid var(--line);
  background: var(--bg);
  overflow-y: auto;
  max-height: calc(100vh - var(--header-h) - 48px);
}

.doc-nav-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 16px;
  padding: 0;
}

.doc-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-nav li { margin: 0; }

.doc-nav a {
  display: block;
  padding: 6px 0 6px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -2px;
}

.doc-nav a:hover { color: var(--gold); }

.doc-nav a.active {
  color: var(--gold);
  border-left-color: var(--gold);
}

.doc-nav .nav-section { margin-bottom: 20px; }

.doc-nav .nav-section > a {
  font-weight: 600;
  color: var(--silver-light);
}

.doc-nav .nav-sub ul {
  margin-top: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.doc-nav .nav-sub a { font-size: 13px; }

.doc-content-wrap {
  padding: 24px 32px 60px;
  min-width: 0;
}

.doc-content-wrap .article-body .doc-page-title {
  font-size: 1.75rem;
  margin: 0 0 8px;
  padding: 0;
}

.doc-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  padding: 24px 24px 48px 16px;
  border-left: 1px solid var(--line);
  background: var(--bg);
  font-size: 13px;
  overflow-y: auto;
  max-height: calc(100vh - var(--header-h) - 48px);
}

.doc-toc-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.doc-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-toc li { margin: 0 0 6px; }

.doc-toc a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  padding: 2px 0;
  border-left: 2px solid transparent;
  padding-left: 8px;
  margin-left: -2px;
}

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

.doc-toc .toc-h3 { padding-left: 16px; font-size: 12px; }

@media (max-width: 1100px) {
  .doc-layout { grid-template-columns: 200px 1fr; }
  .doc-toc { display: none; }
}

@media (max-width: 768px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-nav {
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
    max-height: none;
    padding: 16px 24px;
  }
  .doc-content-wrap { padding: 24px 16px 60px; }
}
