/* Student result presentation only; no changes to teacher/admin pages. */
#visionUploadPanel .vision-privacy-hint {
  margin: 12px 0 0;
  color: #526076;
  font-size: 13px;
  line-height: 1.6;
}

#resultSection #learningDisclosureNotice {
  margin-bottom: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px 20px;
  background: #eff6ff;
  color: #334155;
  line-height: 1.7;
}

#resultSection #learningSourceLabel {
  display: inline-block;
  margin-right: 8px;
  color: #1d4ed8;
  font-weight: 700;
}

#resultSection #learningOutline {
  margin: 12px 0;
  padding-left: 24px;
  line-height: 1.8;
}

#resultSection #learningOutline li {
  margin: 5px 0;
  overflow-wrap: anywhere;
}

#resultSection #learningExpandAll {
  padding: 10px 16px;
  border: 1px solid #1d4ed8;
  border-radius: 8px;
  background: #1d4ed8;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#resultSection #learningExpandAll:hover:not(:disabled) { background: #1e40af; }
#resultSection #learningExpandAll:disabled { background: #e2e8f0; border-color: #cbd5e1; color: #64748b; cursor: default; }

#resultSection .learning-panel,
#resultSection .learning-answer,
#resultSection .learning-step {
  max-width: 100%;
  margin: 0;
}

#resultSection .learning-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  overflow-wrap: anywhere;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

#resultSection .learning-summary::-webkit-details-marker { display: none; }
#resultSection .learning-summary::marker { content: ""; }
#resultSection .learning-summary::after {
  content: "展开 ＋";
  flex: 0 0 auto;
  color: #1d4ed8 !important;
  font-size: 13px;
  font-weight: 600;
}
#resultSection details[open] > .learning-summary::after { content: "收起 −"; }
#resultSection .learning-summary:focus-visible,
#resultSection #learningExpandAll:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .45);
  outline-offset: 4px;
}

#resultSection .learning-panel-title,
#resultSection .learning-step-summary .highlight-title {
  display: block;
  flex: 1;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  font-size: clamp(16px, .25vw + 15px, 19px) !important;
  font-weight: 700;
  line-height: 1.6 !important;
}

#resultSection .learning-panel-body,
#resultSection .learning-step-body {
  max-width: 100%;
  padding-top: 14px;
  overflow-wrap: anywhere;
}

/* Explicit hiding also defeats legacy !important display rules on inner IDs. */
#resultSection details:not([open]) > .learning-panel-body,
#resultSection details:not([open]) > .learning-step-body { display: none !important; }

#resultSection #solutionSteps,
#resultSection .method-solution-steps {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
#resultSection #solutionSteps.hidden,
#resultSection #methodSolutions.hidden { display: none !important; }
#resultSection #solutionSteps > li,
#resultSection .method-solution-steps > li {
  display: block !important;
  margin: 12px 0 !important;
  padding: 0 !important;
  border: 0;
  list-style: none !important;
}
#resultSection #solutionSteps > li::marker,
#resultSection .method-solution-steps > li::marker { content: "" !important; }
#resultSection .learning-step {
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
}
#resultSection .learning-step > .learning-summary { padding: 14px 16px; }
#resultSection .learning-step[open] { background: #fff; }
#resultSection .learning-step-body { padding: 0 16px 16px; overflow-x: auto; }
#resultSection .learning-step-body .text-line { text-align: left !important; }
#resultSection .learning-panel-body .math-block,
#resultSection .learning-step-body .math-block,
#resultSection .learning-panel-body .katex-display,
#resultSection .learning-step-body .katex-display { overflow-x: auto !important; overflow-y: hidden !important; }

@media (max-width: 600px) {
  #resultSection #learningDisclosureNotice { padding: 14px; }
  #resultSection .learning-summary { gap: 10px; }
  #resultSection .learning-summary::after { font-size: 12px; }
  #resultSection .learning-step > .learning-summary { padding: 12px; }
  #resultSection .learning-step-body { padding: 0 12px 12px; }
}
