:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-2: #243044;
  --text: #f0f4f8;
  --muted: #94a3b8;
  --accent: #c9a227;
  --accent-hover: #dbb94a;
  --danger: #ef4444;
  --success: #22c55e;
  --border: #334155;
  --radius: 12px;
  --font: 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--text); }

main.container { padding: 2rem 1.25rem 4rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

.btn-primary { background: var(--accent); color: #111; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-text { background: none; color: var(--muted); padding: 0.5rem; }
.btn-block { width: 100%; }

.inline-form { display: inline; }

.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.features { padding: 2rem 0 4rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-grid article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.pricing { padding: 2rem 0 4rem; }
.pricing h2 { text-align: center; margin-bottom: 2rem; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tier-slug {
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.pricing-card ul {
  list-style: none;
  color: var(--muted);
  flex: 1;
}

.pricing-card li {
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.pricing-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.auth-card {
  max-width: 420px;
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.auth-card h1 { margin-bottom: 1.5rem; }

.form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.form input,
.form textarea,
.form select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
}

.form textarea { min-height: 80px; resize: vertical; }

.form-footer { margin-top: 1.5rem; text-align: center; color: var(--muted); font-size: 0.9rem; }

.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.alert-error { border-color: var(--danger); color: #fca5a5; }
.alert-success { border-color: var(--success); color: #86efac; }

.dashboard-header { margin-bottom: 2rem; }
.tier-badge { color: var(--muted); margin-top: 0.5rem; }

.module-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.chapter-list { list-style: none; margin-top: 1rem; }

.chapter-list li { border-top: 1px solid var(--border); }
.chapter-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  color: var(--text);
}

.chapter-list a:hover .chapter-title { color: var(--accent); }

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
}

.badge-success { background: rgba(34, 197, 94, 0.2); color: var(--success); }

.chapter-page .back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.chapter-desc { color: var(--muted); margin-bottom: 1.5rem; }

.player-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.player-wrapper audio { width: 100%; margin-bottom: 0.75rem; }
.player-hint { font-size: 0.85rem; color: var(--muted); }

.resources-block ul { list-style: none; }
.resources-block li { margin-bottom: 0.75rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.stat-value { display: block; font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.85rem; color: var(--muted); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th { color: var(--muted); font-weight: 600; }

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.admin-panel h2 { margin-bottom: 1rem; font-size: 1.1rem; }

@media (max-width: 600px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-header nav { flex-wrap: wrap; }
}
