.task4-page .dt-hero { margin-bottom: 24px; }
.tabs-ready.task4-page .decision-tree-shell { height: auto; min-height: 100vh; overflow: visible; }
.tabs-ready.task4-page .fish-tab-panel { height: auto; min-height: 455px; overflow: visible; }
.task4-card, .task4-extension { padding: 22px; border: 1px solid #cfd8e8; border-radius: 18px; background: rgba(255, 255, 255, 0.96); box-shadow: 0 9px 25px rgba(35, 58, 102, 0.07); }
.task4-card h2, .task4-extension h2 { margin-top: 0; }
.task4-tabs { margin-bottom: 26px; }
.task4-tabs button { min-height: 44px; }
.task4-material-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.task4-material-links-single { grid-template-columns: minmax(0, 420px); margin-bottom: 18px; }
.task4-material-links a { display: block; padding: 11px 13px; border: 1px solid #b9c8df; border-radius: 10px; color: var(--dt-blue); background: #fff; font-weight: 800; text-decoration: none; }
.task4-material-links a:hover { background: #f0f5ff; }
.task4-sections { display: grid; gap: 26px; }
.task4-sections > * { min-width: 0; }
.task4-sections > .fish-tab-panel { width: 100%; min-width: 0; margin-inline: 0; box-sizing: border-box; }
.task4-card { scroll-margin-top: 18px; }
.task4-card > .fish-step-heading { margin-bottom: 18px; }
.task4-data-boundary { margin: 0 0 18px; padding: 11px 13px; border-left: 4px solid #7998d6; color: #405471; background: #f4f7fd; line-height: 1.45; }
.task4-work-order { margin: 0 0 18px; color: var(--dt-ink); font-size: 1.04rem; line-height: 1.55; }
.task4-quiz fieldset { display: grid; gap: 10px; margin: 0 0 18px; padding: 16px; border: 1px solid #cfd8e8; border-radius: 12px; }
.task4-quiz legend { padding: 0 6px; color: var(--dt-ink); font-weight: 850; }
.task4-quiz fieldset label { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 8px; background: #f7f9fe; line-height: 1.5; cursor: pointer; }
.task4-quiz input[type="checkbox"] { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin: .18rem 0 0; accent-color: var(--dt-blue); }
.task4-quiz input[type="checkbox"]:focus-visible { outline: 3px solid rgba(40, 86, 198, .35); outline-offset: 2px; }
.task4-quiz-feedback { margin: 10px 0; }
.task4-learning-note p:last-child { margin-bottom: 0; }
.task4-card > .task4-learning-note[hidden], .task4-learning-note[hidden] { display: none; }
/* Arbeitsschritte als nummerierte Karten: Nummer und Text stehen linksbündig nebeneinander. */
.task4-instructions { display: grid; gap: 10px; padding: 0; list-style: none; text-align: left; counter-reset: task4-step; }
.task4-instructions li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d6dfeb;
  border-left: 4px solid var(--dt-blue);
  border-radius: 12px;
  background: #f7f9fe;
  counter-increment: task4-step;
}
.task4-instructions li::before {
  content: counter(task4-step);
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--dt-blue), var(--dt-violet));
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
}
.task4-instructions li > span { align-self: center; }
.task4-hyperparameter, .task4-table-note { margin: 18px 0; padding: 14px 16px; border: 2px solid #d2aa43; border-radius: 12px; color: #4d3c0f; background: #fff8d9; line-height: 1.5; }
.task4-table-note { border-color: #7998d6; color: #304a72; background: #eef4ff; }
.task4-answer { width: 100%; min-height: 150px; resize: vertical; padding: 15px; border: 2px solid #cbd5e1; border-radius: 13px; color: var(--dt-ink); background: #fff; font: inherit; line-height: 1.6; }
.task4-answer:focus, .task4-table-input:focus { outline: 4px solid rgba(40, 86, 198, 0.13); border-color: var(--dt-blue); }
.task4-answer:disabled { background: #f4f6f9; }
.task4-privacy { margin: 10px 0 0; padding: 10px 12px; border-left: 4px solid #7998d6; color: #405471; background: #f4f7fd; font-size: .86rem; line-height: 1.45; }
.task4-text-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; }
.task4-text-actions .fish-text-meta { margin: 0; flex: 1; }
.task4-table-input { width: 100%; min-width: 84px; padding: 9px; border: 2px solid #cbd5e1; border-radius: 8px; font: inherit; text-align: center; }
.task4-table-input.is-correct { border-color: #5bab94; background: #effaf5; }
.task4-table-input.is-wrong { border-color: #d9949a; background: #fff4f4; }
.task4-learning-note { margin: 12px 0 0; padding: 13px 15px; border-radius: 12px; color: #5c4818; background: #fff8dc; border: 1px solid #e8cf7d; line-height: 1.5; }
.task4-extension { border-width: 2px; border-color: #d3c3f4; background: linear-gradient(180deg, #faf8ff, #fff); }
.task4-no-correction { margin: 18px 0 0; color: #594086; }
.task4-bottom-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.task4-bottom-nav button { min-height: 44px; }

@media (max-width: 760px) {
  .task4-material-links { grid-template-columns: 1fr; }
  .task4-text-actions { align-items: stretch; flex-direction: column; }
  .task4-text-actions .dt-primary-button { width: 100%; }
}

@media (max-width: 430px) {
  .task4-card, .task4-extension { padding: 16px; border-radius: 14px; }
  .task4-tabs { overflow-x: auto; padding-bottom: 6px; }
  .task4-tabs button { min-width: 132px; }
  .task4-bottom-nav button { flex: 1; }
  .task4-quiz fieldset { padding: 12px; }
  .task4-quiz fieldset label { padding: 9px 8px; }
}
