:root {
  --bg-deep: #050914;
  --bg-card: rgba(11, 19, 38, 0.86);
  --bg-card-solid: #0b1326;
  --border-subtle: rgba(108, 204, 255, 0.22);
  --accent-cyan: #6ce0ff;
  --accent-gold: #ffd166;
  --accent-emerald: #56f0b8;
  --accent-amber: #ffb347;
  --accent-rose: #ff6b8b;
  --text-main: #eef4ff;
  --text-muted: #a9bddb;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: radial-gradient(circle at 18% 8%, #102042 0%, #060b18 42%, #040710 100%);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.68;
  min-height: 100vh;
}

a { color: var(--accent-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(5, 9, 20, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.5rem;
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-links a { color: var(--text-muted); transition: color 0.18s; }
.nav-links a:hover { color: var(--accent-cyan); text-decoration: none; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.hero {
  background: linear-gradient(145deg, rgba(16, 31, 64, 0.88), rgba(7, 13, 28, 0.94));
  border: 1px solid rgba(255, 209, 102, 0.35);
  border-radius: 22px;
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.35);
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 900px;
  margin-bottom: 1.75rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.35rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  border: none;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary {
  background: linear-gradient(135deg, #6ce0ff, #3ab4f2);
  color: #041022;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.section { margin-top: 3.2rem; }

.section-hdr {
  margin-bottom: 1.4rem;
}

.section-hdr h2 {
  font-size: 1.75rem;
  margin-bottom: 0.4rem;
}

.section-hdr p { color: var(--text-muted); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.35rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.55rem;
}

.card h3 {
  font-size: 1.18rem;
  margin-bottom: 0.65rem;
  color: #fff;
}

.card p, .card li {
  color: var(--text-muted);
  font-size: 0.96rem;
}

.card ul { padding-left: 1.2rem; display: grid; gap: 0.5rem; margin-top: 0.5rem; }

.charter-box {
  background: linear-gradient(135deg, rgba(16, 40, 58, 0.78), rgba(11, 20, 40, 0.9));
  border-left: 4px solid var(--accent-emerald);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  border-top: 1px solid rgba(86, 240, 184, 0.25);
  border-right: 1px solid rgba(86, 240, 184, 0.25);
  border-bottom: 1px solid rgba(86, 240, 184, 0.25);
}

.badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.65rem;
}

.badge-green { background: rgba(86, 240, 184, 0.15); color: var(--accent-emerald); border: 1px solid rgba(86, 240, 184, 0.4); }
.badge-amber { background: rgba(255, 179, 71, 0.15); color: var(--accent-amber); border: 1px solid rgba(255, 179, 71, 0.4); }
.badge-red   { background: rgba(255, 107, 139, 0.15); color: var(--accent-rose); border: 1px solid rgba(255, 107, 139, 0.4); }

.tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.tool-pill {
  background: rgba(108, 224, 255, 0.09);
  border: 1px solid rgba(108, 224, 255, 0.28);
  color: #dff6ff;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-family: var(--font-mono);
}

/* Interactive Archive Explorer */
.explorer {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  min-height: 640px;
}

@media (max-width: 900px) {
  .explorer { grid-template-columns: 1fr; }
}

.explorer-sidebar {
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  max-height: 740px;
}

.explorer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
}

.tab-btn {
  flex: 1;
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.9rem 0.5rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(108, 224, 255, 0.06);
}

.search-box {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.search-box input {
  width: 100%;
  background: rgba(4, 9, 20, 0.8);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.file-list {
  overflow-y: auto;
  flex: 1;
  padding: 0.5rem;
}

.file-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 0.25rem;
  display: block;
}

.file-item:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.file-item.active {
  background: rgba(108, 224, 255, 0.12);
  border-color: rgba(108, 224, 255, 0.35);
  color: #fff;
}

.file-item-group {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-gold);
  display: block;
}

.file-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  display: block;
  margin-top: 0.12rem;
  word-break: break-word;
}

.explorer-viewer {
  padding: 1.5rem 1.8rem;
  overflow-y: auto;
  max-height: 740px;
}

.viewer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.viewer-path {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-gold);
}

.viewer-pre {
  background: #050a16;
  border: 1px solid rgba(108, 204, 255, 0.16);
  border-radius: 12px;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #dce9ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
