/* Страница «План курсовой работы»: конструктор, шаги, примеры. Токены — из redesign-v2.css. */

/* ---------- Конструктор ---------- */
.pl-field {
  margin: 0 0 14px;
}

.pl-field label,
.pl-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.pl-field label small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
}

.pl-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pl-field input::placeholder {
  color: var(--muted-2);
}

.pl-field input:hover {
  border-color: #cbd5e1;
}

.pl-field input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.pl-label {
  margin-top: 18px;
}

.pl-dirs {
  margin: 0;
}

.pl-seg {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pl-result__topic {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.pl-plan li b {
  overflow-wrap: anywhere;
}

.pl-plan li.is-sub b {
  font-weight: 600;
  color: var(--ink-2);
}

.pl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.pl-actions .btn {
  gap: 8px;
}

/* ---------- Шаги ---------- */
.pl-steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pl-step {
  position: relative;
  padding: 22px 22px 22px 76px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.pl-step__num {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6 0%, var(--blue) 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.pl-step h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.pl-step p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}

.pl-callout {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 24px;
  border: 1px solid #bfdbfe;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 60% 70% at 90% 0%, rgba(37, 99, 235, 0.12), transparent 60%),
    linear-gradient(180deg, var(--blue-soft), #fff);
}

.pl-callout strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--blue-deep);
}

.pl-callout p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}

.pl-callout .btn {
  justify-self: start;
}

/* ---------- Примеры планов ---------- */
.pl-examples {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow:
    0 32px 72px rgba(15, 23, 42, 0.08),
    0 8px 20px rgba(15, 23, 42, 0.03);
  overflow: hidden;
}

.pl-examples__tabs {
  margin: 0;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
}

.pl-example {
  display: grid;
  gap: 20px;
  padding: 24px 20px 26px;
  animation: pl-fade 0.35s var(--ease) both;
}

.pl-example[hidden] {
  display: none;
}

.pl-example__meta {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

.pl-example__head h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.pl-example__io {
  display: grid;
  gap: 8px;
  margin: 0;
}

.pl-example__io div {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
}

.pl-example__io dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.pl-example__io dd {
  margin: 2px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.pl-example__plan,
.pl-example__plan ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pl-example__plan {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(165deg, #f0f5fb 0%, #e6edf7 100%);
}

.pl-example__plan > li {
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}

.pl-example__plan > li.is-extra {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-2);
}

.pl-example__plan > li > b {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pl-example__plan ol {
  display: grid;
  gap: 4px;
  margin: 6px 0 2px;
  padding-left: 14px;
  border-left: 2px solid #bfdbfe;
}

.pl-example__plan ol li {
  font-size: 14.5px;
  color: var(--ink-2);
}

@keyframes pl-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 640px) {
  .pl-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .pl-callout {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 26px 30px;
  }

  .pl-callout strong,
  .pl-callout p {
    grid-column: 1;
  }

  .pl-callout .btn {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .wl-limits:has(> .wl-limits__item:nth-child(5)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .pl-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pl-example {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    gap: 32px;
    padding: 32px 32px 34px;
  }

  .pl-examples__tabs {
    padding: 20px 32px 18px;
  }
}

@media (max-width: 639px) {
  .pl-seg button {
    min-height: 44px;
    font-size: 14px;
  }

  .pl-step {
    padding: 70px 18px 20px;
  }

  .pl-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .pl-examples {
    border-radius: 22px;
  }

  .pl-examples__tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pl-examples__tabs::-webkit-scrollbar {
    display: none;
  }

  .pl-examples__tabs .wl-tab {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pl-example {
    animation: none;
  }
}
