@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:wght@400;500;700&family=Lexend:wght@400;500;700&display=swap");

.nova-training-body {
  background:
    radial-gradient(circle at top left, rgba(244, 183, 77, 0.24), transparent 28%),
    radial-gradient(circle at top right, rgba(111, 165, 143, 0.2), transparent 25%),
    linear-gradient(180deg, #f6f1e8 0%, #ecf3eb 100%);
}

.nova-training-page {
  display: grid;
  gap: 1rem;
  color: #243126;
}

.nova-training-page h1,
.nova-training-page h2,
.nova-training-page h3,
.nova-training-page h4 {
  font-family: "Lexend", "Manrope", sans-serif;
  line-height: 1.15;
}

.nova-training-page p,
.nova-training-page li,
.nova-training-page button,
.nova-training-page a,
.nova-training-page span,
.nova-training-page strong {
  font-family: "Atkinson Hyperlegible Next", "Manrope", sans-serif;
}

.nova-training-hero,
.nova-question-card,
.nova-highlight-card,
.nova-session-progress-card {
  border-radius: 32px;
}

.nova-training-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 1rem;
  padding: 2rem;
  border: 1px solid rgba(36, 49, 38, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(236, 247, 239, 0.94)),
    rgba(255, 252, 247, 0.92);
  box-shadow: 0 22px 48px rgba(65, 81, 62, 0.12);
}

.nova-hero-aside,
.nova-highlight-card,
.nova-session-progress-card,
.nova-stat-card,
.nova-history-list,
.nova-trend-card,
.nova-history-card {
  display: grid;
  gap: 0.75rem;
}

.nova-highlight-card,
.nova-session-progress-card {
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(36, 49, 38, 0.12);
}

.nova-highlight-card.is-low {
  background:
    linear-gradient(135deg, rgba(184, 90, 73, 0.3), rgba(255, 255, 255, 0.9)),
    rgba(255, 255, 255, 0.9);
  border-color: rgba(184, 90, 73, 0.45);
  box-shadow: inset 0 0 0 2px rgba(184, 90, 73, 0.12);
}

.nova-highlight-card.is-middle {
  background:
    linear-gradient(135deg, rgba(239, 184, 81, 0.34), rgba(255, 255, 255, 0.9)),
    rgba(255, 255, 255, 0.9);
  border-color: rgba(205, 139, 40, 0.42);
  box-shadow: inset 0 0 0 2px rgba(205, 139, 40, 0.1);
}

.nova-highlight-card.is-strong {
  background:
    linear-gradient(135deg, rgba(108, 181, 155, 0.3), rgba(255, 255, 255, 0.92)),
    rgba(255, 255, 255, 0.92);
  border-color: rgba(61, 127, 109, 0.42);
  box-shadow: inset 0 0 0 2px rgba(61, 127, 109, 0.1);
}

.nova-highlight-card.is-low span,
.nova-highlight-card.is-low strong {
  color: #8f3f32;
}

.nova-highlight-card.is-middle span,
.nova-highlight-card.is-middle strong {
  color: #9a6408;
}

.nova-highlight-card.is-strong span,
.nova-highlight-card.is-strong strong {
  color: #2c6452;
}

.nova-highlight-card span,
.nova-stat-card span {
  color: #58745f;
  font-weight: 700;
}

.nova-highlight-card strong,
.nova-stat-card strong {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.nova-primary-link,
.nova-start-button {
  width: 100%;
  text-align: center;
}

.nova-loading-active {
  overflow: hidden;
}

.nova-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(243, 240, 233, 0.78);
  backdrop-filter: blur(10px);
}

.nova-loading-overlay[hidden] {
  display: none !important;
}

.nova-loading-card {
  width: min(100%, 520px);
  display: grid;
  gap: 1rem;
  padding: 1.6rem;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 247, 239, 0.96)),
    rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(36, 49, 38, 0.12);
  box-shadow: 0 24px 56px rgba(65, 81, 62, 0.18);
}

.nova-loading-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
}

.nova-loading-copy,
.nova-loading-progress-label {
  margin: 0;
  color: #546756;
}

.nova-loading-progress {
  height: 1rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(36, 49, 38, 0.1);
}

.nova-loading-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #efb851 0%, #6cb59b 100%);
  transition: width 180ms ease;
}

.nova-stat-grid,
.nova-card-grid {
  display: grid;
  gap: 1rem;
}

.nova-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nova-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nova-card-grid-bottom {
  align-items: start;
}

.nova-stat-card,
.nova-kpi-panel,
.nova-activity-card,
.nova-trend-card,
.nova-history-card,
.nova-question-card {
  background: rgba(255, 255, 255, 0.74);
}

.nova-kpi-panel {
  display: grid;
  gap: 1rem;
}

.nova-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.nova-kpi-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(36, 49, 38, 0.1);
  border-radius: 22px;
  background: rgba(250, 252, 249, 0.86);
}

.nova-kpi-card-math {
  border-color: rgba(205, 139, 40, 0.22);
}

.nova-kpi-card-reading {
  border-color: rgba(61, 127, 109, 0.22);
}

.nova-kpi-card-english {
  border-color: rgba(90, 111, 207, 0.22);
}

.nova-kpi-header,
.nova-kpi-row,
.nova-kpi-main {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.nova-kpi-header strong {
  font-size: 1.1rem;
}

.nova-kpi-header span,
.nova-kpi-main span,
.nova-kpi-row span,
.nova-kpi-empty {
  color: #607165;
  font-weight: 700;
}

.nova-kpi-main {
  align-items: stretch;
}

.nova-kpi-main div {
  flex: 1;
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.nova-kpi-main strong {
  font-size: 1.65rem;
  line-height: 1;
}

.nova-kpi-row strong {
  text-align: right;
}

.nova-kpi-row .is-up {
  color: #2c6452;
}

.nova-kpi-row .is-down {
  color: #9a3f32;
}

.nova-kpi-row .is-flat {
  color: #6b746c;
}

.nova-kpi-spark {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.nova-kpi-dot {
  width: 100%;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(36, 49, 38, 0.12);
}

.nova-kpi-dot.is-strong {
  background: #6cb59b;
}

.nova-kpi-dot.is-middle {
  background: #efb851;
}

.nova-kpi-dot.is-low {
  background: #d77867;
}

.nova-trend-card,
.nova-history-card {
  align-self: stretch;
}

.nova-activity-card {
  display: grid;
  gap: 1rem;
}

.nova-card-top {
  display: grid;
  gap: 0.35rem;
}

.nova-detail-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #4d6050;
  line-height: 1.8;
}

.nova-activity-math {
  background:
    linear-gradient(135deg, rgba(255, 228, 163, 0.42), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.74);
}

.nova-activity-reading {
  background:
    linear-gradient(135deg, rgba(178, 217, 205, 0.45), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.74);
}

.nova-activity-english {
  background:
    linear-gradient(135deg, rgba(176, 191, 241, 0.44), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.74);
}

.nova-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.nova-legend-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
}

.nova-legend-pill-math {
  background: rgba(239, 184, 81, 0.2);
  color: #9a6408;
  border-color: rgba(205, 139, 40, 0.38);
}

.nova-legend-pill-reading {
  background: rgba(108, 181, 155, 0.2);
  color: #2e6a58;
  border-color: rgba(61, 127, 109, 0.35);
}

.nova-legend-pill-english {
  background: rgba(90, 111, 207, 0.16);
  color: #35489d;
  border-color: rgba(90, 111, 207, 0.32);
}

.nova-trend-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.nova-trend-grid-line {
  stroke: rgba(36, 49, 38, 0.12);
  stroke-width: 1;
}

.nova-trend-grid-line-vertical {
  stroke: rgba(36, 49, 38, 0.08);
}

.nova-trend-axis-label {
  fill: #6a7a6d;
  font-size: 0.9rem;
  font-weight: 700;
}

.nova-trend-line {
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nova-trend-line-dashed {
  stroke-width: 4;
  stroke-dasharray: 12 9;
  stroke-linecap: round;
  opacity: 0.8;
}

.nova-trend-point {
  stroke: #fffdf8;
  stroke-width: 3;
}

.nova-trend-series-label {
  font-size: 0.98rem;
  font-weight: 800;
}

.nova-history-list {
  display: block;
}

.nova-history-card {
  min-height: 0;
}

.nova-history-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 22px;
  border: 1px solid rgba(36, 49, 38, 0.1);
  background: rgba(247, 250, 246, 0.88);
  min-height: 8.5rem;
  margin-bottom: 0.75rem;
}

.nova-history-entry p {
  margin: 0.25rem 0 0;
  color: #5b6d5e;
}

.nova-history-list::-webkit-scrollbar {
  width: 10px;
}

.nova-history-list::-webkit-scrollbar-thumb {
  background: rgba(36, 49, 38, 0.2);
  border-radius: 999px;
}

.nova-score-pill,
.nova-tip-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-weight: 700;
}

.nova-score-pill {
  background: #243126;
  color: #fff;
}

.nova-session-hero {
  align-items: start;
  grid-template-columns: 1fr;
}

.nova-session-hero h1 {
  font-size: clamp(1.75rem, 3.3vw, 2.5rem);
}

.nova-session-hero .section-lead {
  margin: 0.15rem 0 0;
  line-height: 1.45;
}

.nova-progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(36, 49, 38, 0.1);
  overflow: hidden;
}

.nova-step-meter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12px, 1fr));
  gap: 0.32rem;
}

.nova-step-meter-segment {
  display: block;
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(36, 49, 38, 0.12);
  transition: background-color 160ms ease, transform 160ms ease;
}

.nova-step-meter-segment.is-correct,
.nova-step-meter-segment.is-done {
  background: #6cb59b;
}

.nova-step-meter-segment.is-wrong {
  background: #d77867;
}

.nova-step-meter-segment.is-current {
  background: #efb851;
  transform: scaleY(1.18);
}

.nova-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #efb851 0%, #6cb59b 100%);
}

.nova-question-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem;
  min-height: 37rem;
  align-content: start;
}

.nova-question-header {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.nova-tip-pill {
  background: rgba(108, 181, 155, 0.18);
  color: #2c6452;
}

.nova-question-progress-block {
  display: grid;
  gap: 0.4rem;
  justify-items: center;
  width: 100%;
  margin-bottom: 0.05rem;
}

.nova-question-progress-top {
  width: 100%;
  display: flex;
  justify-content: center;
}

.nova-question-progress-track {
  width: min(100%, 520px);
  height: 12px;
  border-radius: 999px;
  background: rgba(36, 49, 38, 0.1);
  overflow: hidden;
}

.nova-question-progress-label {
  margin: 0;
  color: #5b6d5e;
  font-weight: 700;
  font-size: 0.95rem;
}

.nova-step-meter-inline {
  width: min(100%, 520px);
}

.nova-passage-card {
  padding: 0.75rem 0.9rem;
  border-radius: 20px;
  background: rgba(247, 249, 247, 0.95);
  border: 1px solid rgba(36, 49, 38, 0.12);
}

.nova-passage-card p,
.nova-question-prompt {
  font-size: clamp(0.98rem, 1.7vw, 1.12rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.nova-math-stem {
  font-family: "Lexend", "Manrope", sans-serif;
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 700;
  text-align: center;
  padding: 0.75rem;
  border-radius: 20px;
  background: rgba(255, 249, 235, 0.9);
  border: 1px solid rgba(239, 184, 81, 0.35);
}

.nova-answer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.nova-answer-button {
  -webkit-appearance: none;
  appearance: none;
  min-height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(36, 49, 38, 0.14);
  background: rgba(255, 255, 255, 0.98);
  color: #243126;
  -webkit-text-fill-color: #243126;
  font-size: clamp(0.98rem, 1.9vw, 1.15rem);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.nova-answer-button:hover,
.nova-answer-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(36, 49, 38, 0.28);
  box-shadow: 0 14px 28px rgba(65, 81, 62, 0.14);
  outline: none;
}

.nova-answer-button.is-correct,
.nova-answer-button.is-correct:hover,
.nova-answer-button.is-correct:focus-visible,
.nova-answer-button[data-feedback-locked="true"].is-correct {
  background: #cfeee3;
  border-color: #3d7f6d;
  color: #13493a;
  box-shadow: none;
  transform: none;
  opacity: 1;
}

.nova-answer-button.is-wrong,
.nova-answer-button.is-wrong:hover,
.nova-answer-button.is-wrong:focus-visible,
.nova-answer-button[data-feedback-locked="true"].is-wrong {
  background: #f5d4cf;
  border-color: #b85a49;
  color: #7f3127;
  box-shadow: none;
  transform: none;
  opacity: 1;
}

.nova-answer-button.is-neutral,
.nova-answer-button.is-neutral:hover,
.nova-answer-button.is-neutral:focus-visible,
.nova-answer-button[data-feedback-locked="true"].is-neutral {
  opacity: 0.5;
  box-shadow: none;
  transform: none;
}

.nova-answer-button[data-feedback-locked="true"] {
  cursor: default;
}

.nova-feedback-panel {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(36, 49, 38, 0.12);
  min-height: 3.5rem;
  align-content: center;
}

.nova-feedback-panel.is-correct {
  background: rgba(108, 181, 155, 0.14);
  border-color: rgba(61, 127, 109, 0.32);
}

.nova-feedback-panel.is-wrong {
  background: rgba(184, 90, 73, 0.1);
  border-color: rgba(184, 90, 73, 0.26);
}

.nova-feedback-panel.is-empty {
  background: transparent;
  border-color: transparent;
}

.nova-feedback-panel.is-empty strong {
  visibility: hidden;
}

.nova-question-footer {
  display: grid;
  gap: 0.6rem;
  margin-top: auto;
  min-height: 7.2rem;
}

.nova-continue-form {
  margin-top: 0;
  display: flex;
  justify-content: center;
}

.nova-continue-form.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.nova-continue-form.is-visible {
  visibility: visible;
}

.nova-continue-form .primary-button {
  min-width: min(320px, 100%);
  min-height: 54px;
  font-size: 1rem;
  opacity: 1;
}

body.is-nova-submitting .nova-question-card {
  opacity: 0.72;
}

.nova-training-page button[disabled]:not(.nova-answer-button) {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.nova-cancel-form {
  justify-self: start;
}

@media (max-width: 900px) {
  .nova-training-hero,
  .nova-stat-grid,
  .nova-kpi-grid,
  .nova-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nova-training-hero,
  .nova-question-card {
    padding: 1.2rem;
  }

  .nova-question-card {
    min-height: 34rem;
  }

  .nova-history-card {
    min-height: 0;
  }

  .nova-answer-form {
    grid-template-columns: 1fr;
  }

  .nova-history-entry {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-height: 900px) {
  .nova-session-hero {
    padding: 1.35rem;
  }

  .nova-question-card {
    min-height: 32rem;
    gap: 0.6rem;
    padding: 0.85rem;
  }

  .nova-passage-card {
    padding: 0.65rem 0.8rem;
  }

  .nova-math-stem {
    font-size: clamp(1.8rem, 5vw, 3rem);
    padding: 0.65rem;
  }

  .nova-answer-button {
    min-height: 50px;
  }

  .nova-feedback-panel {
    min-height: 3rem;
  }

  .nova-question-footer {
    min-height: 6.4rem;
  }

  .nova-continue-form .primary-button {
    min-height: 50px;
  }
}
