/* ====== KDP Mastery — Think Balance Group LLC ====== */

:root {
  --navy: #1a2a44;
  --navy-dark: #12203a;
  --gold: #b8954a;
  --gold-light: #d4c2a0;
  --cream: #f5ecd7;
  --paper: #faf7f0;
  --ink: #22293a;
  --muted: #6b7280;
  --green: #2e7d4f;
  --red: #b3402e;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(26, 42, 68, 0.12);
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, "Segoe UI", Arial, Helvetica, sans-serif;
}

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

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

h1, h2, h3, .brand { font-family: var(--serif); color: var(--navy); }

.hidden { display: none !important; }

/* ---------- Header ---------- */
header {
  background: var(--navy);
  color: var(--cream);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  color: var(--cream);
  font-size: 1.35rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.brand span { color: var(--gold); }

.header-right { display: flex; align-items: center; gap: 12px; }

.user-email { font-size: 0.85rem; color: var(--gold-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: var(--radius);
  transition: opacity 0.15s ease, transform 0.1s ease;
  text-decoration: none;
  text-align: center;
}

.btn:hover { opacity: 0.9; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-navy { background: var(--navy); color: var(--cream); border: 1px solid var(--gold); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--gold);
  padding: 8px 18px;
  font-size: 0.85rem;
}
.btn-link {
  background: none;
  border: none;
  color: var(--navy);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-block { width: 100%; }

/* ---------- Layout ---------- */
main { max-width: 960px; margin: 0 auto; padding: 40px 20px 80px; }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  border-top: 4px solid var(--gold);
}

/* ---------- Landing ---------- */
.hero { text-align: center; padding: 48px 16px 32px; }

.hero .eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: 700;
}

.hero h1 { font-size: 2.6rem; margin: 10px 0 8px; }

.hero .subtitle { font-size: 1.15rem; color: var(--muted); max-width: 620px; margin: 0 auto 26px; }

.price-tag {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 18px;
}

.price-tag small { font-size: 0.9rem; color: var(--muted); font-family: var(--sans); }

.module-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.module-preview .card { padding: 20px; text-align: left; }
.module-preview .card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.module-preview .card p { font-size: 0.88rem; color: var(--muted); }
.module-num {
  display: inline-block;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--serif);
  width: 34px; height: 34px;
  line-height: 34px;
  text-align: center;
  border-radius: 50%;
  margin-bottom: 10px;
  font-weight: bold;
}

/* ---------- Auth ---------- */
.auth-card { max-width: 420px; margin: 30px auto; }
.auth-card h2 { margin-bottom: 6px; }
.auth-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; color: var(--navy); }
.field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d7d3c8;
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--paper);
}
.field input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

.auth-toggle { text-align: center; margin-top: 16px; font-size: 0.9rem; }

.notice {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.notice-error { background: #fbeae7; color: var(--red); border: 1px solid #eec8c0; }
.notice-success { background: #e9f5ee; color: var(--green); border: 1px solid #c4e3d2; }
.notice-info { background: var(--cream); color: var(--navy); border: 1px solid var(--gold-light); }

/* ---------- Paywall ---------- */
.paywall { max-width: 520px; margin: 30px auto; text-align: center; }
.paywall ul { text-align: left; margin: 18px 0 24px 20px; }
.paywall li { margin-bottom: 8px; }

/* ---------- Dashboard ---------- */
.progress-bar-wrap {
  background: #e8e2d4;
  border-radius: 20px;
  height: 12px;
  margin: 18px 0 34px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--navy));
  border-radius: 20px;
  width: 0%;
  transition: width 0.4s ease;
}

.module-list { display: flex; flex-direction: column; gap: 14px; }

.module-row {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  border-left: 5px solid var(--gold);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.module-row:hover { transform: translateX(4px); }

.module-row.locked {
  cursor: not-allowed;
  opacity: 0.55;
  border-left-color: #c9c4b8;
  filter: grayscale(0.4);
}
.module-row.locked:hover { transform: none; }

.module-row.done { border-left-color: var(--green); }

.module-status {
  font-size: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  flex-shrink: 0;
}

.module-row .info { flex: 1; }
.module-row .info h3 { font-size: 1.1rem; }
.module-row .info p { font-size: 0.86rem; color: var(--muted); }

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}
.badge-locked { background: #eceae3; color: var(--muted); }
.badge-open { background: var(--cream); color: var(--gold); border: 1px solid var(--gold-light); }
.badge-done { background: #e9f5ee; color: var(--green); }

/* ---------- Module view ---------- */
.module-header { margin-bottom: 24px; }
.module-header .crumb { font-size: 0.85rem; margin-bottom: 12px; }
.module-header h2 { font-size: 1.9rem; }
.module-header p { color: var(--muted); }

.lesson {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}

.lesson-toggle {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 22px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lesson-toggle::after { content: "+"; color: var(--gold); font-size: 1.3rem; }
.lesson.open .lesson-toggle::after { content: "\2212"; }

.lesson-body { display: none; padding: 0 22px 22px; }
.lesson.open .lesson-body { display: block; }

.btn-listen {
  background: var(--navy);
  color: var(--cream);
  border: 1px solid var(--gold);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 14px;
}
.btn-listen:hover { opacity: 0.9; }

.lesson-body h4 {
  font-family: var(--serif);
  color: var(--navy);
  margin: 18px 0 6px;
  font-size: 1rem;
}
.lesson-body p { margin-bottom: 10px; font-size: 0.95rem; }
.lesson-body ul, .lesson-body ol { margin: 0 0 12px 22px; font-size: 0.95rem; }
.lesson-body li { margin-bottom: 6px; }

.action-step {
  background: var(--cream);
  border-left: 4px solid var(--gold);
  padding: 12px 16px;
  border-radius: 6px;
  margin-top: 14px;
  font-size: 0.92rem;
}

/* ---------- Quiz ---------- */
.quiz-card { margin-top: 30px; }
.quiz-card h3 { font-size: 1.4rem; margin-bottom: 4px; }
.quiz-card > p { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }

.quiz-q { margin-bottom: 22px; }
.quiz-q .q-text { font-weight: 600; margin-bottom: 10px; }

.quiz-option {
  display: block;
  padding: 11px 14px;
  border: 1px solid #ddd8cc;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 0.93rem;
  background: var(--paper);
  transition: border-color 0.12s ease;
}
.quiz-option:hover { border-color: var(--gold); }
.quiz-option input { margin-right: 10px; accent-color: var(--gold); }
.quiz-option.correct { border-color: var(--green); background: #e9f5ee; }
.quiz-option.incorrect { border-color: var(--red); background: #fbeae7; }

.quiz-result { margin-top: 18px; }

/* ---------- Completion ---------- */
.completion {
  text-align: center;
  padding: 50px 24px;
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius);
  border: 2px solid var(--gold);
}
.completion h2 { color: var(--gold); font-size: 2rem; margin-bottom: 12px; }
.completion p { max-width: 560px; margin: 0 auto 10px; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 26px;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid #e6e1d4;
}

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .hero h1 { font-size: 1.9rem; }
  .card { padding: 22px; }
  .module-row { flex-wrap: wrap; }
  header { flex-wrap: wrap; }
}
