/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #0f1420;
  --bg-card: #131825;
  --bg-card-hover: #181e2e;
  --border: #1c2333;
  --border-accent: #2a3548;
  --text-primary: #e8ecf4;
  --text-secondary: #8892a6;
  --text-muted: #5a6478;
  --accent-green: #00d68f;
  --accent-green-dim: rgba(0,214,143,.12);
  --accent-red: #ff4d6a;
  --accent-red-dim: rgba(255,77,106,.12);
  --accent-blue: #3b82f6;
  --accent-blue-dim: rgba(59,130,246,.12);
  --accent-gold: #f0b90b;
  --accent-gold-dim: rgba(240,185,11,.1);
  --radius: 10px;
  --radius-lg: 16px;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
  --max-width: 1440px;
  --gutter: 24px;
  --header-height: 64px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent-blue); text-decoration: none; transition: color .2s; }
a:hover { color: #5b9bf7; }
img { max-width: 100%; height: auto; }

/* ── Utility ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Ambient Glow ── */
body::before {
  content: '';
  position: fixed;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse, rgba(59,130,246,.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,14,23,.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 1.5rem; color: var(--text-primary);
  letter-spacing: -.02em; white-space: nowrap;
}
.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff;
  font-family: var(--font-body);
}
.logo span { color: var(--accent-green); }

/* Nav */
.main-nav { display: flex; gap: 0; }
.main-nav a {
  padding: 8px 16px; border-radius: 8px;
  font-size: .875rem; font-weight: 500; color: var(--text-secondary);
  transition: all .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--text-primary); background: rgba(255,255,255,.05); }
.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 24px; height: 24px; }

/* ── Ticker Tape Section ── */
.ticker-strip {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

/* ── Section Styles ── */
.section {
  padding: 56px 0;
  position: relative;
  z-index: 1;
}
.section + .section { border-top: 1px solid var(--border); }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
}
.section-subtitle {
  font-size: .9rem;
  color: var(--text-secondary);
  max-width: 480px;
}
.section-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 100px;
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}
.badge-green { background: var(--accent-green-dim); color: var(--accent-green); }
.badge-blue { background: var(--accent-blue-dim); color: var(--accent-blue); }
.badge-gold { background: var(--accent-gold-dim); color: var(--accent-gold); }
.badge-red { background: var(--accent-red-dim); color: var(--accent-red); }

.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ── Hero ── */
.hero {
  padding: 72px 0 40px;
  text-align: center;
  position: relative; z-index: 1;
}
.hero::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(0,214,143,.05) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -.02em;
}
.hero h1 em { font-style: italic; color: var(--accent-green); }
.hero p {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 32px;
}
.hero-stats {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
  margin-top: 20px;
}
.hero-stat { text-align: center; }
.hero-stat .val { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.hero-stat .label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }

/* ── Widget Container ── */
.widget-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.widget-wrap--transparent { background: transparent; border: none; }

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.grid-sidebar { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }

/* ── Quick Stats Bar ── */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.quick-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .25s;
}
.quick-stat-card:hover { border-color: var(--border-accent); background: var(--bg-card-hover); }
.quick-stat-card .qs-label {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); margin-bottom: 4px;
}
.quick-stat-card .qs-symbol { font-weight: 600; font-size: .95rem; color: var(--text-primary); }

/* ── Footer ── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  position: relative; z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { color: var(--text-secondary); font-size: .875rem; margin-top: 12px; max-width: 300px; line-height: 1.6; }
.footer-col h4 {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); margin-bottom: 16px; font-weight: 600;
}
.footer-col ul { list-style: none; }
.footer-col li + li { margin-top: 8px; }
.footer-col a { color: var(--text-secondary); font-size: .875rem; transition: color .2s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--text-muted);
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--text-secondary); }

/* ── CTA Banner ── */
.cta-banner {
  background: linear-gradient(135deg, rgba(0,214,143,.08), rgba(59,130,246,.08));
  border: 1px solid rgba(0,214,143,.15);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  margin: 56px 0;
}
.cta-banner h2 { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 12px; }
.cta-banner p { color: var(--text-secondary); margin-bottom: 24px; max-width: 480px; margin-inline: auto; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 8px; font-weight: 600; font-size: .9rem;
  transition: all .25s; cursor: pointer; border: none;
}
.btn-primary {
  background: var(--accent-green); color: #0a0e17;
}
.btn-primary:hover { background: #00e69a; color: #0a0e17; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,214,143,.2); }
.btn-outline {
  background: transparent; border: 1px solid var(--border-accent); color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--text-secondary); background: rgba(255,255,255,.03); }

/* ── Animations ── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-2, .grid-sidebar { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .quick-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .main-nav {
    display: none; position: fixed; top: var(--header-height); left: 0; right: 0;
    background: var(--bg-secondary); flex-direction: column; padding: 16px;
    border-bottom: 1px solid var(--border); max-height: calc(100vh - var(--header-height)); overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
}
@media (max-width: 768px) {
  :root { --gutter: 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .quick-stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 24px; }
  .cta-banner { padding: 32px 20px; }
  .section { padding: 40px 0; }
}

/* ── Notices ── */
.notice {
  background: var(--bg-card); border: 1px solid var(--border-accent);
  border-radius: var(--radius); padding: 14px 18px;
  font-size: .875rem; color: var(--text-secondary); line-height: 1.6;
}
.notice strong { color: var(--text-primary); }
.notice + .notice { margin-top: 12px; }
.data-note { font-size: .8rem; color: var(--text-muted); margin-top: 10px; }
.hero-points { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-points span {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 100px;
  font-size: .8rem; color: var(--text-secondary); background: var(--bg-card);
}

/* ── Breadcrumbs ── */
.breadcrumbs { font-size: .8rem; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs span[aria-hidden] { margin: 0 6px; }

/* ── Page hero (inner pages) ── */
.page-hero { padding: 48px 0 24px; position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15; letter-spacing: -.02em;
  margin-bottom: 12px;
}
.page-hero .lead { font-size: 1.05rem; color: var(--text-secondary); max-width: 760px; }

/* ── Prose ── */
.prose { max-width: 820px; }
.prose h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; margin: 40px 0 12px; line-height: 1.2; }
.prose h3 { font-size: 1.1rem; margin: 28px 0 8px; color: var(--text-primary); }
.prose p, .prose li { color: var(--text-secondary); font-size: 1rem; }
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--text-primary); }
.prose code { background: var(--bg-card); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.table-wrap { overflow-x: auto; margin: 8px 0 20px; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table, .data-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 420px; }
.prose th, .prose td, .data-table th, .data-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th, .data-table th { color: var(--text-primary); background: var(--bg-card); font-weight: 600; }
.prose td, .data-table td { color: var(--text-secondary); }
.prose tr:last-child td { border-bottom: none; }

/* ── FAQ ── */
.faq details { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text-primary); }
.faq details p { margin: 10px 0 0; }

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 16px 0 8px; }
.card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; transition: all .25s; color: var(--text-primary);
}
.card:hover { border-color: var(--border-accent); background: var(--bg-card-hover); color: var(--text-primary); }
.card h3 { font-size: 1rem; margin-bottom: 6px; }
.card p { font-size: .875rem; color: var(--text-secondary); margin: 0; }

/* ── Market clock ── */
.clock-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 8px 0 24px; }
.clock-box .quick-stat-card .val { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }
.status-open { color: var(--accent-green) !important; }
.status-closed { color: var(--accent-red) !important; }
.status-ext { color: var(--accent-gold) !important; }

@media (max-width: 768px) {
  .page-hero { padding: 32px 0 16px; }
  .prose h2 { font-size: 1.5rem; }
}
.hero { overflow: hidden; }
body::before { max-width: 100vw; }
