/* ===============================
   CLIMB ORAL EXAM PREP — STYLES
   =============================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue:       #1a56db;
  --blue-light: #e8f0fe;
  --green:      #0e7c4a;
  --green-bg:   #e6f4ed;
  --red:        #c0392b;
  --red-bg:     #fdecea;
  --gray-100:   #f4f6f9;
  --gray-200:   #e2e8f0;
  --gray-400:   #94a3b8;
  --gray-700:   #334155;
  --gray-900:   #0f172a;
  --radius:     8px;
  --shadow:     0 1px 4px rgba(0,0,0,0.08);
  --max-width:  720px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
}

/* --- Screens --- */
.screen {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* --- Header --- */
header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue);
  letter-spacing: 0.01em;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--gray-400);
}

.score-tally {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.progress-bar-track {
  height: 4px;
  background: var(--gray-200);
}

.progress-bar-fill {
  height: 4px;
  background: var(--blue);
  width: 0%;
  transition: width 0.4s ease;
}

/* --- Main content --- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Area label --- */
.area-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
}

/* --- Cards --- */
.card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.card-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.card p {
  font-size: 1rem;
  color: var(--gray-700);
  white-space: pre-wrap;
}

/* Center-card for full-screen states */
.center-card {
  max-width: 480px;
  margin: 10vh auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.center-card h1 {
  font-size: 1.5rem;
  color: var(--gray-900);
}

.center-card p {
  color: var(--gray-700);
}

/* --- Feedback card states --- */
#feedback-card.correct {
  border-color: var(--green);
  background: var(--green-bg);
}

#feedback-card.incorrect {
  border-color: var(--red);
  background: var(--red-bg);
}

#feedback-card .card-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Textarea --- */
textarea {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--gray-900);
  resize: vertical;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-light);
}

/* --- Buttons --- */
.btn-primary {
  background: var(--blue);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary:hover {
  background: #1648c0;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: var(--blue-light);
}

/* --- Muted text --- */
.muted {
  color: var(--gray-400);
  font-size: 0.95rem;
  text-align: center;
  padding: 40px;
}

/* --- Adaptive session banner --- */
.adaptive-banner {
  background: #fff8e1;
  border: 1px solid #f9a825;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 0.9rem;
  color: #7a5800;
}

/* --- Mobile --- */
@media (max-width: 600px) {
  .header-inner {
    padding: 10px 16px;
  }

  main {
    padding: 16px 12px 48px;
  }

  .card {
    padding: 16px;
  }
}
