/* Native RU/UK lessons use the shared MOST Learn typography roles. */
.grammar-guide { display: grid; gap: 28px; min-width: 0; max-width: 76ch; margin-inline: auto; overflow-wrap: anywhere; }
.grammar-guide > *, .grammar-guide-section > * { min-width: 0; }
body #workspace .grammar-guide :where(p, li, dd, dt, blockquote, td, th) { font: var(--type-body); }
body #workspace .grammar-guide h3 { font: var(--type-card-title); margin: 0 0 var(--space-section-below); }
body #workspace .grammar-guide h5 { font: var(--type-subsection-title); margin: 0 0 8px; }
.grammar-guide p { margin: 0 0 14px; }
.grammar-guide p:last-child { margin-bottom: 0; }
.grammar-guide :where(ul, ol) { margin: 12px 0 0; padding-left: 24px; }
.grammar-guide li + li { margin-top: 8px; }
.grammar-guide-objective, .grammar-guide-summary { background: #eef5ff; border: 1px solid #d6e3f4; border-radius: 14px; padding: 20px; }
.grammar-guide-terms dl { display: grid; gap: 16px; margin: 0; }
.grammar-guide-terms dl > div { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 3fr); gap: 16px; }
body #workspace .grammar-guide-terms dt { font: var(--type-subsection-title); }
.grammar-guide-terms dd { margin: 0; }
.grammar-guide-section { padding-top: 24px; border-top: 1px solid #e1e8f1; }
.grammar-guide-example { background: #f6f9fd; border-left: 3px solid #6f9cdb; border-radius: 0 12px 12px 0; padding: 18px; margin: 20px 0; }
.grammar-guide-example blockquote { margin: 0; color: #193e6a; }
body #workspace .grammar-guide-example figcaption, body #workspace .grammar-guide-translation { font: var(--type-secondary-language); color: var(--most-helper, #42536b); margin-top: 8px; }
.grammar-guide-example mark { background: #dfeaff; color: #174f9e; padding: 0 2px; border-radius: 3px; font-weight: 600; }
.grammar-guide-analysis { border-top: 1px solid #dce6f3; margin-top: 16px; padding-top: 14px; }
.grammar-guide-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; margin: 20px 0; border: 1px solid #d6e3f4; border-radius: 12px; }
.grammar-guide-table-wrap table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: auto; }
.grammar-guide-table-wrap caption { padding: 14px; text-align: left; font: var(--type-subsection-title); }
body #workspace .grammar-guide-table-wrap :where(th, td) { white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: none; padding: 12px; vertical-align: top; border-top: 1px solid #d6e3f4; text-align: left; }
body #workspace .grammar-guide-table-wrap th { font: var(--type-subsection-title); background: #f1f6fd; }
/* Wider tables scroll inside their own card; grammatical words and headers stay intact. */
.grammar-guide-mistake { border: 1px solid #e0e5ec; border-radius: 12px; padding: 18px; margin-top: 20px; }
body #workspace .grammar-guide-mistake :where(.grammar-guide-error-label, .grammar-guide-correct-label) { font: var(--type-label); margin-bottom: 4px; }
.grammar-guide-error-label, .grammar-guide-wrong { color: #9b3434; }
.grammar-guide-correct-label { color: #246244; }
.grammar-guide-wrong { text-decoration: line-through; text-decoration-thickness: 1px; }
.grammar-guide-detail, .grammar-guide-sources { border: 1px solid #d6e3f4; border-radius: 12px; padding: 16px; }
.grammar-guide :where(summary, a) { overflow-wrap: anywhere; }
.grammar-guide summary { cursor: pointer; font: var(--type-subsection-title); }
.grammar-guide details[open] > summary { margin-bottom: 16px; }
.grammar-guide-sources a { color: #205ca7; text-underline-offset: 3px; }
.grammar-guide :where(summary, a, .grammar-guide-table-wrap):focus-visible { outline: 3px solid #80b0f9; outline-offset: 3px; }
.grammar-guide-actions button { white-space: normal; }
.grammar-guide-prerequisites ul { padding: 0; list-style: none; display: grid; gap: 10px; }
.grammar-guide-prerequisites li { margin: 0; }
.grammar-guide-prerequisites button { width: 100%; text-align: left; white-space: normal; }
.grammar-guide-prerequisites button span { display: block; font: var(--type-secondary-language); margin-top: 4px; }
@media (max-width: 600px) {
  .grammar-guide { gap: 24px; }
  .grammar-guide-terms dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .grammar-guide-objective, .grammar-guide-summary, .grammar-guide-example, .grammar-guide-mistake { padding: 14px; }
  body #workspace .grammar-guide-table-wrap :where(th, td) { padding: 8px; }
}
