/* ===== LEDGER NAVIGATION — GLOBAL STYLES ===== */
:root {
  --bg-primary:    #0a0e1a;
  --bg-secondary:  #0f1629;
  --bg-card:       #131c35;
  --accent:        #2563eb;
  --accent-hover:  #1d4ed8;
  --accent-light:  #3b82f6;
  --accent-glow:   rgba(37,99,235,0.35);
  --text-primary:  #e8edf8;
  --text-secondary:#8b9dc3;
  --text-muted:    #4a5a80;
  --border:        rgba(37,99,235,0.18);
  --border-strong: rgba(37,99,235,0.4);
  --success:       #10b981;
  --warning:       #f59e0b;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow:        0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:     0 8px 48px rgba(0,0,0,0.7);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-light); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

/* ===== HEADER / NAV ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,26,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo svg { color: var(--accent-light); }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  flex: 1;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: .88rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .2s, color .2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(37,99,235,0.15);
  color: var(--text-primary);
}

.nav-links a.active { color: var(--accent-light); }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .88rem;
  transition: background .2s, transform .1s;
}

.nav-cta:hover { background: var(--accent-hover) !important; transform: translateY(-1px); }

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 24px 80px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37,99,235,0.15) 0%, transparent 70%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232563eb' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,0.12);
  border: 1px solid var(--border-strong);
  color: var(--accent-light);
  font-size: .8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 30%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--accent-glow);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  background: rgba(37,99,235,0.1);
  color: #fff;
  border-color: var(--accent-light);
}

.btn-lg { padding: 15px 36px; font-size: 1rem; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ===== SECTIONS ===== */
.section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-sm { padding: 48px 24px; }

.section-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ===== CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.cards-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(37,99,235,0.1);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(37,99,235,0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
}

.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--text-secondary); font-size: .9rem; line-height: 1.6; }

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 24px;
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 32px;
  text-align: center;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: .85rem;
}

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }

table { width: 100%; border-collapse: collapse; }

thead { background: rgba(37,99,235,0.12); }

th {
  text-align: left;
  padding: 14px 20px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: .5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 13px 20px;
  font-size: .9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(37,99,235,0.04); color: var(--text-primary); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
}

.badge-green  { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-yellow { background: rgba(245,158,11,0.15);  color: #f59e0b; }
.badge-gray   { background: rgba(107,114,128,0.15); color: #9ca3af; }

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--border);
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  padding: 64px 24px 56px;
  text-align: center;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(37,99,235,0.12) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.page-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 56px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: 12px;
  max-width: 260px;
}

.footer-col h4 {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

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

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

.footer-col a {
  color: var(--text-muted);
  font-size: .88rem;
  transition: color .2s;
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .82rem;
  color: var(--text-muted);
}

/* ===== DOWNLOAD OVERLAY ===== */
.dl-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5,8,16,0.92);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.dl-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.dl-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  width: min(560px, 94vw);
  box-shadow: var(--shadow-lg);
}

.dl-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.dl-header-icon {
  width: 48px;
  height: 48px;
  background: rgba(37,99,235,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.dl-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.dl-header p {
  font-size: .85rem;
  color: var(--text-secondary);
}

.dl-progress-wrap {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.dl-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: 3px;
  transition: width .4s ease;
  box-shadow: 0 0 10px var(--accent-glow);
}

.dl-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.dl-log {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: .78rem;
  color: var(--success);
  min-height: 100px;
  max-height: 130px;
  overflow-y: auto;
  margin-bottom: 24px;
  line-height: 1.8;
}

.dl-log-line { opacity: 0; animation: logFade .3s forwards; }
.dl-log-line::before { content: '> '; color: var(--text-muted); }

@keyframes logFade {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.dl-done {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 0 4px;
}

.dl-done-icon {
  width: 56px;
  height: 56px;
  background: rgba(16,185,129,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.dl-done h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.dl-done p  { color: var(--text-secondary); font-size: .88rem; margin-bottom: 20px; }

.dl-close {
  display: block;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: .88rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.dl-close:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  font-size: .83rem;
  color: var(--text-muted);
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 6px;
  align-items: center;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-secondary); }
.breadcrumb span { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-secondary); }

/* ===== ACCORDION (wiki) ===== */
.accordion { display: flex; flex-direction: column; gap: 10px; }

.acc-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.acc-header {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: .95rem;
  font-weight: 600;
  text-align: left;
  transition: background .2s;
}

.acc-header:hover { background: rgba(37,99,235,0.06); }

.acc-arrow {
  font-size: .75rem;
  color: var(--text-muted);
  transition: transform .25s;
  flex-shrink: 0;
}

.acc-item.open .acc-arrow { transform: rotate(180deg); }

.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
  padding: 0 22px;
}

.acc-item.open .acc-body {
  max-height: 400px;
  padding: 4px 22px 18px;
}

.acc-body p, .acc-body li {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.7;
}

.acc-body ul { padding-left: 18px; margin-top: 8px; }
.acc-body li { margin-bottom: 4px; }

/* ===== CODE BLOCK ===== */
.code-block {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: .82rem;
  color: #a5f3fc;
  margin: 10px 0;
  overflow-x: auto;
}

/* ===== FORM ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

label { font-size: .85rem; font-weight: 600; color: var(--text-secondary); }

input, textarea, select {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: .9rem;
  transition: border-color .2s;
  outline: none;
}

input:focus, textarea:focus, select:focus { border-color: var(--accent-light); }

textarea { resize: vertical; min-height: 120px; }

/* ===== MAP SVG PLACEHOLDER ===== */
.map-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.map-visual svg { opacity: .15; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
}

@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; }
  .dl-box { padding: 28px 22px; }
  .hero { padding: 72px 16px 56px; }
}
