:root {
  --bg: #0f1419;
  --bg-panel: #1f2937;
  --bg-panel-hover: #26313f;
  --border: #374151;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --success: #10b981;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Nav ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 25, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.nav-brand img { height: 34px; width: auto; border-radius: 6px; }
.nav-links { display: flex; gap: 1.6rem; align-items: center; list-style: none; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.45rem 1.1rem;
  border-radius: 7px;
  font-weight: 600;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-hover); }

/* ---------- Layout ---------- */
main { flex: 1; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }

h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.6rem; }
h3 { font-size: 1.15rem; font-weight: 600; }
.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 640px; margin-top: 1rem; }

/* ---------- Hero ---------- */
.hero { padding: 6rem 0 5rem; text-align: center; }
.hero img.hero-logo { height: 90px; border-radius: 14px; margin-bottom: 1.6rem; }
.hero .lead { margin-left: auto; margin-right: auto; }
.hero-ctas { margin-top: 2.2rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 0 24px var(--accent-glow); }
.btn-ghost { border-color: var(--border); color: var(--text-muted); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .icon { font-size: 1.7rem; margin-bottom: 0.7rem; }
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--text-muted); font-size: 0.93rem; }
.card .card-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.card .card-link:hover { color: var(--accent-hover); }

/* ---------- Portal service rows ---------- */
.service-row {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.7rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-bottom: 1rem;
  transition: border-color 0.15s;
}
.service-row:hover { border-color: var(--accent); }
.service-row .icon { font-size: 2rem; flex-shrink: 0; }
.service-row .body { flex: 1; }
.service-row .body h3 { margin-bottom: 0.2rem; }
.service-row .body p { color: var(--text-muted); font-size: 0.92rem; }
.service-row .go { flex-shrink: 0; }
@media (max-width: 640px) {
  .service-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- Panels / misc ---------- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); font-size: 0.88rem; }
.badge {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent-hover);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

code, .mono {
  font-family: "SF Mono", "Fira Code", Menlo, Consolas, monospace;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1rem 0.45rem;
  font-size: 0.86em;
  color: #a5d6ff;
}
pre {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  font-size: 0.88rem;
  margin: 0.8rem 0;
}
pre code { background: none; border: none; padding: 0; }

/* ---------- Help page ---------- */
.toc { list-style: none; margin: 1rem 0 2rem; }
.toc li { margin: 0.35rem 0; }
.toc a { color: var(--accent); text-decoration: none; }
.toc a:hover { color: var(--accent-hover); }
.help-section { margin-bottom: 2.8rem; }
.help-section h3 { margin-bottom: 0.7rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.settings-table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.92rem; }
.settings-table th, .settings-table td {
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
.settings-table th { color: var(--text-muted); font-weight: 600; }
.settings-table td:first-child { color: var(--text-muted); white-space: nowrap; }

/* ---------- FAQ ---------- */
details.faq {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.8rem;
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
details.faq summary::before { content: "▸ "; color: var(--accent); }
details.faq[open] summary::before { content: "▾ "; }
details.faq p { margin-top: 0.7rem; color: var(--text-muted); font-size: 0.93rem; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2.2rem 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.87rem;
}
footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 1.4rem; justify-content: center; margin-bottom: 0.8rem; flex-wrap: wrap; }

/* ---------- Section headers ---------- */
.section-head { text-align: center; margin-bottom: 2.6rem; }
.section-head .lead { margin-left: auto; margin-right: auto; }
