/* Chinese review candidate: one rule per transition.
   Preserve table row rules, diagram lines and the framed study panel. */

/* The preceding scale comparison already supplies the transition rule. */
body.structure-stage:lang(zh) .technology #particle-comparison + #water-dispersion {
  border-top: 0;
  padding-top: 0;
}

/* Desktop table cells already close the technical matrix. On phones the
   matrix becomes stacked rows without a final bottom rule, so retain the
   animal study's own separator there. */
@media (min-width: 768px) {
  body.structure-stage:lang(zh) .s23-technical .s23-tech-matrix + .s23-animal {
    border-top: 0;
    margin-top: 0;
  }
}

/* A study panel keeps its own frame. Remove only the card boundary directly
   before the inserted panel, rather than stripping all cards of their rules. */
body.structure-stage:lang(zh) #nutrition-directions .function-card:has(+ .context-study-panel),
body.structure-stage:lang(zh) #nutrition-directions #longevity-entry:has(+ .context-study-panel) {
  border-bottom: 0;
}

/* The desktop panel follows a three-card row; all three bottom rules form
   the same redundant boundary. The phone layout has one card per row. */
@media (min-width: 768px) {
  body.structure-stage:lang(zh) #nutrition-directions .function-card:has(+ .function-card + .context-study-panel),
  body.structure-stage:lang(zh) #nutrition-directions .function-card:has(+ .function-card + .function-card + .context-study-panel) {
    border-bottom: 0;
  }
}
