/* Сборка плана от целевого балла. Опирается на переменные темы раздела ЕГЭ. */

.nm-plan {
  margin-top: 8px;
  padding: 26px;
  border: 1.5px solid var(--line-2, rgba(223, 153, 91, .3));
  border-radius: 18px;
  background: var(--surface, #fff);
  box-shadow: var(--shadow-sm, 0 6px 18px rgba(79, 54, 24, .07));
  min-height: 260px;
}

.nm-plan-step { margin-bottom: 18px; }

.nm-plan-step-num {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3, #8B7C66);
}

.nm-plan-step h3 { margin: 0; font-size: 19px; line-height: 1.3; }

.nm-plan-note {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2, #6B5B45);
}

/* ── Шаг 1: предметы ──────────────────────────────────────────────────── */

.nm-plan-subjects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.nm-plan-subject {
  padding: 12px 14px;
  border: 1.5px solid var(--line, rgba(223, 153, 91, .22));
  border-radius: 12px;
  background: var(--bg, #FFFCF5);
  color: var(--ink, #2C2318);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, transform .18s;
}

.nm-plan-subject:hover { border-color: var(--brand, #DF995B); transform: translateY(-1px); }

/* ── Шаг 2: цель ──────────────────────────────────────────────────────── */

.nm-plan-value {
  margin: 0 0 10px;
  font-family: 'Unbounded', system-ui, sans-serif;
  font-size: 34px;
  line-height: 1;
  color: var(--brand-deep, #8C5422);
  font-variant-numeric: tabular-nums;
}

.nm-plan-range {
  width: 100%;
  margin: 0 0 4px;
  accent-color: var(--brand, #DF995B);
}

.nm-plan-scale-hint {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--ink-3, #8B7C66);
}

/* ── Шаг 3: время ─────────────────────────────────────────────────────── */

.nm-plan-time {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}

.nm-plan-time-item {
  display: grid;
  gap: 3px;
  padding: 15px 14px;
  border: 1.5px solid var(--line, rgba(223, 153, 91, .22));
  border-radius: 13px;
  background: var(--bg, #FFFCF5);
  color: var(--ink, #2C2318);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, transform .18s;
}

.nm-plan-time-item:hover { border-color: var(--brand, #DF995B); transform: translateY(-1px); }
.nm-plan-time-item b { font-size: 16px; }
.nm-plan-time-item span { font-size: 12.5px; color: var(--ink-3, #8B7C66); }

/* ── Результат ────────────────────────────────────────────────────────── */

.nm-plan-result-head { margin-bottom: 16px; }
.nm-plan-result-head h3 { margin: 0 0 14px; font-size: 20px; }

.nm-plan-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.nm-plan-num {
  padding: 14px 12px;
  border-radius: 14px;
  background: var(--bg-warm, #FDF3E3);
  text-align: center;
  animation: nm-plan-pop .5s cubic-bezier(.22, 1, .36, 1) both;
}

.nm-plan-num:nth-child(2) { animation-delay: .08s; }
.nm-plan-num:nth-child(3) { animation-delay: .16s; }

.nm-plan-num b {
  display: block;
  font-family: 'Unbounded', system-ui, sans-serif;
  font-size: 30px;
  line-height: 1;
  color: var(--brand-deep, #8C5422);
  font-variant-numeric: tabular-nums;
}

.nm-plan-num-word { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; }
.nm-plan-num-note { display: block; font-size: 12px; color: var(--ink-3, #8B7C66); }

.nm-plan-summary {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.6;
}

.nm-plan-weeks { display: grid; gap: 10px; margin-bottom: 14px; }

.nm-plan-week {
  padding: 14px 16px;
  border-left: 3px solid var(--brand, #DF995B);
  border-radius: 0 12px 12px 0;
  background: var(--bg, #FFFCF5);
  animation: nm-plan-slide .45s cubic-bezier(.22, 1, .36, 1) both;
}

.nm-plan-week-num {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--brand-deep, #8C5422);
}

.nm-plan-week ul { margin: 0; padding-left: 18px; }
.nm-plan-week li { margin-bottom: 4px; font-size: 14px; line-height: 1.45; }

.nm-plan-next {
  padding-top: 16px;
  border-top: 1px dashed var(--line-2, rgba(223, 153, 91, .3));
}

.nm-plan .btn + .btn { margin-left: 8px; }

@keyframes nm-plan-pop {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@keyframes nm-plan-slide {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nm-plan-num, .nm-plan-week { animation: none; }
}

@media (max-width: 560px) {
  .nm-plan { padding: 18px 15px; border-radius: 15px; }
  .nm-plan-numbers { grid-template-columns: 1fr; }
  .nm-plan-num { display: flex; align-items: baseline; gap: 8px; text-align: left; }
  .nm-plan-num b { font-size: 26px; }
  .nm-plan .btn { width: 100%; justify-content: center; }
  .nm-plan .btn + .btn { margin-left: 0; margin-top: 8px; }
}
