/* ─── AP Score Calculator Page ─────────────────────────────────────────── */

.score-calc-page {
  --teal: #14b8a6;
  --teal-dark: #0d9488;
  --teal-darker: #0f766e;
  --teal-soft: #ccfbf1;
  --teal-track: #e6f5f3;
  --calc-ink: #1a1a2e;
  --calc-muted: #6b7280;
  --calc-faint: #9ca3af;
  --calc-border: #e8eaed;
  --calc-card-border: #edeef0;
}

.score-calc-page .page--dashboard {
  position: relative;
  min-height: 100vh;
}

.score-calc-content {
  padding: 0;
  min-height: 100vh;
}

.score-calc-inner {
  width: 100%;
  max-width: 1180px;
  padding: 40px 48px 80px;
}

/* ─── Back link ─── */
.score-calc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--teal-dark);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.15s;
}

.score-calc-back:hover {
  color: var(--teal-darker);
}

/* ─── Hero ─── */
.score-calc-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.score-calc-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--calc-ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 12px;
}

.score-calc-subtitle {
  font-size: 1rem;
  color: var(--calc-muted);
  line-height: 1.5;
  margin: 0;
}

.score-mascot-perch {
  position: relative;
  width: 240px;
  height: 200px;
  margin: 0 auto 4px;
  pointer-events: none;
}

.score-mascot-layer {
  position: absolute;
  inset: 0;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.22s ease;
}

.score-mascot-front {
  opacity: 1;
  z-index: 2;
}

.score-mascot-back {
  opacity: 0;
  z-index: 1;
}

.score-mascot-perch.is-crossfading .score-mascot-front {
  opacity: 0;
}

.score-mascot-perch.is-crossfading .score-mascot-back {
  opacity: 1;
}

/* ─── Two-column grid ─── */
.score-calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.score-calc-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── Section cards ─── */
.score-section-card {
  background: #fff;
  border: 1.5px solid var(--calc-card-border);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.score-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.score-section-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--calc-ink);
  margin: 0;
}

.score-points-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 9999px;
  padding: 3px 10px;
}

/* ─── FRQ section heading ─── */
.score-frq-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--calc-ink);
  margin: 14px 0 4px;
}

.score-frq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── Input row: slider + number field ─── */
.score-input-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.score-slider-wrap {
  flex: 1;
  min-width: 0;
}

.score-slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--calc-faint);
  margin-top: 8px;
}

/* ─── Range slider ─── */
.score-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: var(--teal-track);
  outline: none;
  cursor: pointer;
  padding: 4px 0;
  box-sizing: content-box;
  background-clip: content-box;
}

.score-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 9999px;
  background: transparent;
}

.score-slider::-moz-range-track {
  height: 6px;
  border-radius: 9999px;
  background: var(--teal-track);
}

.score-slider::-moz-range-progress {
  height: 6px;
  border-radius: 9999px;
  background: var(--teal);
}

.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--teal);
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.score-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--teal);
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.35);
  cursor: pointer;
}

.score-slider:hover::-webkit-slider-thumb {
  transform: scale(1.08);
}

.score-slider:active::-webkit-slider-thumb,
.score-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.16);
}

/* ─── Number field ─── */
.score-number-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.score-number-input {
  width: 72px;
  height: 48px;
  text-align: center;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--calc-ink);
  background: #fff;
  border: 1.5px solid var(--calc-border);
  border-radius: 10px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
}

.score-number-input::-webkit-outer-spin-button,
.score-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.score-number-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

.score-number-max {
  font-size: 0.9375rem;
  color: var(--calc-faint);
}

.score-section-hint {
  font-size: 0.875rem;
  color: var(--calc-muted);
  margin: 14px 0 0;
}

/* ─── Result card (right column) ─── */
.score-result-card {
  position: sticky;
  top: 32px;
  background: #fff;
  border: 1.5px solid var(--calc-card-border);
  border-radius: 16px;
  padding: 24px 24px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  text-align: center;
}

.score-result-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--calc-ink);
  margin: 0 0 20px;
}

/* ─── Score circle + confetti ─── */
.score-result-circle-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 18px;
  width: 160px;
  height: 140px;
}

.score-result-circle {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: var(--teal-track);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.75rem;
  font-weight: 800;
  color: var(--teal-dark);
  line-height: 1;
}

/* Decorative confetti dots around the circle */
.score-confetti {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.score-confetti--1 { width: 9px;  height: 9px;  background: #fbbf24; top: 10px;  left: 18px; }
.score-confetti--2 { width: 7px;  height: 7px;  background: #8b5cf6; top: 18px;  right: 14px; }
.score-confetti--3 { width: 8px;  height: 8px;  background: #f87171; top: 64px;  right: 4px; }
.score-confetti--4 { width: 7px;  height: 7px;  background: #34d399; bottom: 22px; left: 8px; }
.score-confetti--5 { width: 8px;  height: 8px;  background: #14b8a6; bottom: 14px; right: 30px; }

.score-result-card.is-celebrate .score-confetti {
  opacity: 1;
}

/* ─── Possible score pill ─── */
.score-result-range {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 9999px;
  padding: 6px 14px;
  margin-bottom: 24px;
}

/* ─── Breakdown ─── */
.score-result-breakdown {
  text-align: left;
  margin-bottom: 22px;
}

.score-result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
}

.score-result-label {
  font-size: 0.875rem;
  color: var(--calc-muted);
}

.score-result-figure {
  font-size: 0.875rem;
  color: var(--calc-faint);
}

.score-result-figure b {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--calc-ink);
}

.score-result-divider {
  height: 1px;
  background: var(--calc-border);
}

/* ─── Reset button ─── */
.score-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--teal-dark);
  background: #fff;
  border: 1.5px solid var(--teal);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.score-reset-btn:hover {
  background: var(--teal);
  color: #fff;
}

/* ─── FAQ Section ─── */
.score-faq {
  max-width: 720px;
  margin: 56px 0 0;
  padding-bottom: 24px;
}

.score-faq-heading {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--calc-ink);
  letter-spacing: -0.02em;
  margin: 0 0 36px;
}

.score-faq-item {
  margin-bottom: 36px;
}

.score-faq-item:last-child {
  margin-bottom: 0;
}

.score-faq-question {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--calc-ink);
  margin: 0 0 10px;
  line-height: 1.3;
}

.score-faq-answer {
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.7;
  margin: 0;
}

.score-faq-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--teal-dark);
  text-decoration: none;
  transition: color 0.15s;
}

.score-faq-cta:hover {
  color: var(--teal-darker);
}

/* ─── Responsive ─── */
@media (max-width: 1040px) {
  .score-calc-grid {
    grid-template-columns: 1fr;
  }
  .score-result-card {
    position: static;
    max-width: 420px;
  }
}

@media (max-width: 760px) {
  .score-calc-inner {
    padding: 28px 20px 56px;
  }
  .score-calc-title {
    font-size: 1.875rem;
  }
  .score-calc-hero-mascot {
    width: 100px;
    height: 90px;
  }
  .score-input-row {
    gap: 16px;
  }
}
