/* AI WEB ACADEMY — Практическая лаборатория */
.lab { padding-bottom: 60px; }

.lab-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.lab-meta span {
  font-size: 13px; padding: 6px 12px; border-radius: 999px;
  background: var(--bg-soft, #f1f4f9); color: var(--text-muted, #556);
}

.lab-block { margin: 18px 0; }
.lab-block h3 { margin: 0 0 8px; font-size: 17px; }
.lab-block p, .lab-block li { color: var(--text-muted, #556); line-height: 1.6; font-size: 15px; }
.lab-block ul { margin: 6px 0; padding-left: 20px; }
.lab-block li { margin: 5px 0; }

/* --- этапы --- */
.lab-stage {
  border: 1px solid var(--border, #e3e8ef);
  border-radius: 16px;
  padding: 20px;
  margin: 18px 0;
  background: #fff;
}
.lab-stage-done { border-color: #2f9e6b; }
.lab-stage-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.lab-stage-num {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent, #2f6df6); background: #eaf1ff; padding: 5px 10px; border-radius: 999px;
  white-space: nowrap;
}
.lab-stage-head h3 { margin: 0 0 4px; font-size: 19px; }
.lab-stage-goal { margin: 0; color: var(--text-muted, #556); font-size: 14px; }
.lab-stage-score {
  margin-left: auto; font-weight: 700; font-size: 15px; color: var(--text-muted, #556);
  white-space: nowrap;
}
.lab-stage-score.ok { color: #2f9e6b; }
.lab-stage-bar { height: 6px; background: #eef1f6; border-radius: 999px; margin: 14px 0 10px; overflow: hidden; }
.lab-stage-bar i { display: block; height: 100%; background: var(--accent, #2f6df6); transition: width .3s; }
.lab-stage-done .lab-stage-bar i { background: #2f9e6b; }
.lab-skill { font-size: 13px; color: var(--text-muted, #556); margin: 0 0 12px; }

/* --- редактор --- */
.lab-files { margin: 14px 0; }
.lab-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.lab-tab {
  font: inherit; font-size: 13px; cursor: pointer;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border, #e3e8ef); background: #f7f9fc; color: var(--text-muted, #556);
}
.lab-tab.cur { background: var(--accent, #2f6df6); border-color: var(--accent, #2f6df6); color: #fff; }
.lab-code {
  width: 100%; min-height: 340px; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.55;
  padding: 14px; border-radius: 12px;
  border: 1px solid var(--border, #e3e8ef); background: #0f1526; color: #e6ecff;
  tab-size: 2;
}
.lab-code:focus { outline: 2px solid var(--accent, #2f6df6); outline-offset: 1px; }

.lab-hint { margin: 12px 0; font-size: 14px; }
.lab-hint summary { cursor: pointer; color: var(--accent, #2f6df6); font-weight: 600; }
.lab-hint p { margin: 8px 0 0; color: var(--text-muted, #556); line-height: 1.6; }

.lab-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.lab-btn {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--accent, #2f6df6); color: #fff;
}
.lab-btn:disabled { opacity: .55; cursor: default; }
.lab-btn.ghost { background: #fff; color: var(--text, #1a2233); border-color: var(--border, #e3e8ef); }
.lab-btn.ghost:disabled { color: #8a93a5; }
.lab-attempts { font-size: 13px; color: var(--text-muted, #77808f); }

/* --- проверки --- */
.lab-checks { list-style: none; margin: 12px 0 0; padding: 0; }
.lab-chk { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--border, #e8ecf3); font-size: 14px; }
.lab-chk-mark { font-weight: 700; width: 20px; flex: 0 0 20px; }
.lab-chk-ok .lab-chk-mark { color: #2f9e6b; }
.lab-chk-bad .lab-chk-mark { color: #d64545; }
.lab-chk-new { opacity: .55; }
.lab-chk b { font-weight: 600; }
.lab-chk-fix { color: #b4453c; font-size: 13.5px; margin-top: 3px; line-height: 1.55; }
.lab-chk-why { color: var(--text-muted, #6b7480); font-size: 13px; margin-top: 3px; line-height: 1.55; }

/* --- эталон --- */
.lab-solution { margin-top: 16px; padding: 16px; border-radius: 12px; background: #f7f9fc; border: 1px solid var(--border, #e3e8ef); }
.lab-solution h4 { margin: 0 0 6px; }
.lab-sol-file { margin-top: 12px; }
.lab-sol-file b { font-size: 13px; }
.lab-sol-file pre {
  background: #0f1526; color: #e6ecff; padding: 14px; border-radius: 10px;
  overflow: auto; font-size: 12.5px; line-height: 1.5;
}

/* --- отчёт --- */
.lab-report-top { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.lab-report-score {
  text-align: center; padding: 14px 22px; border-radius: 14px; background: #eaf1ff; color: var(--accent, #2f6df6);
}
.lab-report-score b { display: block; font-size: 30px; }
.lab-report-score span { font-size: 12.5px; }
.lab-muted { color: var(--text-muted, #6b7480); font-size: 13.5px; }
.lab-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lab-table th, .lab-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border, #e8ecf3); }
.lab-table th { color: var(--text-muted, #6b7480); font-weight: 600; font-size: 13px; }
.lab-num { white-space: nowrap; }
.lab-badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #eef1f6; color: #6b7480; }
.lab-badge.ok { background: #e3f6ec; color: #1f7a51; }
.lab-badge.part { background: #fdf1dc; color: #9a6b16; }
.lab-finish {
  margin-top: 16px; padding: 16px; border-radius: 12px;
  background: #e3f6ec; border: 1px solid #b6e3cd; color: #1f6a48; line-height: 1.6;
}
.lab-hint-box {
  margin-top: 16px; padding: 14px; border-radius: 12px;
  background: #fdf6e6; border: 1px solid #f0e0b8; color: #8a6320; line-height: 1.6;
}
.lab-limits ul { padding-left: 20px; margin: 10px 0 0; }
.lab-limits li { color: var(--text-muted, #556); line-height: 1.65; margin: 8px 0; font-size: 14.5px; }
.lab-limits code { background: #f1f4f9; padding: 1px 6px; border-radius: 5px; font-size: 13px; }

@media (max-width: 760px) {
  .lab-stage { padding: 16px; }
  .lab-stage-score { margin-left: 0; width: 100%; }
  .lab-code { min-height: 260px; font-size: 12.5px; }
  .lab-table { font-size: 13px; }
  .lab-table th:nth-child(2), .lab-table td:nth-child(2) { display: none; }
}

/* ===== lab-p2.css ===== */
/* AI WEB ACADEMY — Практическая лаборатория, проект №2 */
.p2-back { margin-top: 14px; font-size: 14px; }
.p2-back a { color: var(--accent, #2f6df6); font-weight: 600; }

.p2-sub { margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--border, #eef1f6); }
.p2-sub h4 { margin: 0 0 10px; font-size: 15px; }

.p2-item { padding: 12px 0; border-bottom: 1px dashed var(--border, #e8ecf3); }
.p2-item:last-child { border-bottom: 0; }
.p2-item-text { margin: 0 0 8px; font-size: 14.5px; line-height: 1.55; }

.p2-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.p2-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; color: var(--text, #1a2233); }

.p2-why, .p2-textarea {
  width: 100%; margin-top: 8px; resize: vertical;
  font: inherit; font-size: 14px; line-height: 1.55;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border, #e3e8ef); background: #fff; color: var(--text, #1a2233);
}
.p2-why:focus, .p2-textarea:focus { outline: 2px solid var(--accent, #2f6df6); outline-offset: 1px; }

.p2-order { list-style: none; margin: 0 0 12px; padding: 0; }
.p2-order-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 6px; border-radius: 10px;
  background: #f7f9fc; border: 1px solid var(--border, #e3e8ef); font-size: 14px;
}
.p2-order-n {
  flex: 0 0 24px; height: 24px; border-radius: 50%;
  background: var(--accent, #2f6df6); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700;
}
.p2-order-text { flex: 1; }
.p2-mini {
  font: inherit; font-size: 13px; cursor: pointer; line-height: 1;
  padding: 5px 9px; border-radius: 8px;
  border: 1px solid var(--border, #e3e8ef); background: #fff; color: var(--text-muted, #556);
}
.p2-mini:hover { border-color: var(--accent, #2f6df6); color: var(--accent, #2f6df6); }

.p2-pool-wrap { margin: 10px 0 4px; }
.p2-pool-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.p2-pool {
  font: inherit; font-size: 13.5px; cursor: pointer; text-align: left;
  padding: 8px 12px; border-radius: 10px;
  border: 1px dashed var(--border, #cfd7e3); background: #fff; color: var(--text, #1a2233);
}
.p2-pool:hover { border-style: solid; border-color: var(--accent, #2f6df6); color: var(--accent, #2f6df6); }

.p2-api { margin: 6px 0 0; padding-left: 20px; }
.p2-api li { font-size: 13.5px; margin: 4px 0; }

@media (max-width: 760px) {
  .p2-opts { flex-direction: column; gap: 6px; }
  .p2-order-item { flex-wrap: wrap; }
}

/* ===== lab-p3.css ===== */
/* AI WEB ACADEMY — Практическая лаборатория, проект №3 (НЕЗУБРИ) */
.p3-back { margin-top: 14px; font-size: 14px; }
.p3-back a { color: var(--accent, #2f6df6); font-weight: 600; }

.p3-sub { margin: 18px 0; padding-top: 14px; border-top: 1px solid var(--border, #eef1f6); }
.p3-sub h4 { margin: 0 0 12px; font-size: 15px; }

.p3-item { padding: 12px 0; border-bottom: 1px dashed var(--border, #e8ecf3); }
.p3-item:last-child { border-bottom: 0; }
.p3-item-text { margin: 0 0 8px; font-size: 14.5px; line-height: 1.55; }
.p3-item-trap { background: #fffaf3; border: 1px solid #f3e3c6; border-radius: 10px; padding: 12px; margin-bottom: 10px; }

.p3-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.p3-radio { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.5; cursor: pointer; color: var(--text, #1a2233); }
.p3-radio input { margin-top: 3px; flex: 0 0 auto; }

.p3-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 18px; }
.p3-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.5; cursor: pointer; }

.p3-cons { margin: 6px 0 8px; padding: 9px 12px; border-left: 3px solid #e0913a; background: #fff6e8; border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.5; color: #7a4a12; }

.p3-why, .p3-textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 1.5;
  padding: 9px 11px; border: 1px solid var(--border, #e2e7f0); border-radius: 9px; background: #fff; color: inherit;
  resize: vertical; margin-top: 6px;
}
.p3-why:focus, .p3-textarea:focus { outline: 2px solid rgba(47, 109, 246, .35); border-color: #2f6df6; }

.p3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; }
.p3-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted, #5c6a85); }
.p3-field input {
  font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--border, #e2e7f0);
  border-radius: 9px; background: #fff; color: inherit; width: 100%; box-sizing: border-box;
}
.p3-field input:focus { outline: 2px solid rgba(47, 109, 246, .35); border-color: #2f6df6; }

.p3-card { border: 1px solid var(--border, #e8ecf3); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: #fff; }
.p3-card h5 { margin: 0 0 6px; font-size: 14.5px; }
.p3-muted { color: var(--muted, #5c6a85); font-size: 13.5px; line-height: 1.5; }
.p3-warn { margin: 0 0 12px; padding: 10px 12px; border-radius: 9px; background: #fff6e8; border: 1px solid #f3e3c6; color: #7a4a12; font-size: 13.5px; line-height: 1.5; }
.p3-live { margin-top: 12px; padding: 11px 13px; border-radius: 10px; background: #eef3ff; font-size: 13.5px; line-height: 1.55; }

.p3-api { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; }

@media (max-width: 760px) {
  .p3-checks, .p3-grid { grid-template-columns: 1fr; }
  .p3-item { padding: 10px 0; }
  .p3-card { padding: 12px; }
}
