/**
 * L00 主系表与非谓语 · 初中讲义专属排版
 * 只作用于 link-handout-junior.html，避免影响高中版与主谓宾讲义。
 */

body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .exam-mini-grid,
body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .handout-overview-grid {
  display: grid;
  gap: 0.7rem;
  margin: 0.75rem 0 0;
}

body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .exam-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .handout-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .exam-mini-card,
body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .pattern-card {
  border: 2px solid rgba(224, 124, 62, 0.2);
  border-radius: 14px;
  background: rgba(255, 251, 247, 0.94);
  padding: 0.75rem 0.85rem;
}

body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .pattern-card--warn {
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(255, 247, 237, 0.96);
}

body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .exam-mini-card h3,
body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .pattern-card h3 {
  margin: 0 0 0.35rem;
  color: #9a3412;
  font-size: 0.92rem;
}

body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .exam-mini-card p,
body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .pattern-card p {
  margin: 0;
  line-height: 1.55;
}

@media print {
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] #sec-1,
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] #sec-2 {
    break-before: auto !important;
    page-break-before: auto !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    padding-bottom: 2.5mm !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] #sec-vocab {
    break-before: page !important;
    page-break-before: always !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] #sec-chant {
    break-before: auto !important;
    page-break-before: auto !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .section-title {
    color: #7c2d12 !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .map-hint {
    margin: 0 0 1.5mm !important;
    font-size: 10.25pt !important;
    line-height: 1.5 !important;
    color: #333 !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .note {
    margin: 1.5mm 0 2mm !important;
    border-left: 2pt solid #c46a2d !important;
    border-style: solid !important;
    background: #fff8f1 !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .exam-mini-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2mm !important;
    margin: 2mm 0 0 !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .handout-overview-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 2.5mm !important;
    margin: 2mm 0 0 !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .exam-mini-card,
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .pattern-card {
    margin: 0 !important;
    padding: 2mm 2.2mm !important;
    border: 0.35pt solid #d8c2aa !important;
    border-top: 1.2pt solid #c46a2d !important;
    border-radius: 2mm !important;
    background: #fffaf5 !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .pattern-card--warn {
    background: #fff7ed !important;
    border-top-color: #9a3412 !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .exam-mini-card h3,
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .pattern-card h3 {
    margin: 0 0 1mm !important;
    font-size: 9.25pt !important;
    line-height: 1.3 !important;
    color: #7c2d12 !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .exam-mini-card p,
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .pattern-card p,
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .compact li {
    font-size: 8.75pt !important;
    line-height: 1.42 !important;
    text-align: left !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] ul.compact {
    margin-top: 0 !important;
    padding-left: 4.5mm !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .panel-count {
    margin: 0 0 1.5mm !important;
    padding: 1.2mm 2mm !important;
    border-left: 2pt solid #c46a2d !important;
    background: #fff7ed !important;
    color: #4a2a16 !important;
    font-size: 9.5pt !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data {
    table-layout: fixed !important;
    font-size: 8.35pt !important;
    line-height: 1.38 !important;
    border-color: #9a9a9a !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data th,
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data td {
    padding: 0.95mm 1.05mm !important;
    border-color: #b8b8b8 !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data th {
    background: #f1e4d8 !important;
    color: #111 !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data th:nth-child(1),
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data td:nth-child(1) {
    width: 6%;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data th:nth-child(2),
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data td:nth-child(2) {
    width: 25%;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data th:nth-child(3),
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data td:nth-child(3) {
    width: 43%;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data th:nth-child(4),
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data td:nth-child(4) {
    width: 26%;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data .en {
    font-family: "Times New Roman", "Georgia", serif !important;
    font-size: 8.55pt !important;
    font-weight: 600 !important;
    color: #111 !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data .zh {
    font-size: 8.05pt !important;
    line-height: 1.4 !important;
    color: #333 !important;
  }

  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] table.data strong {
    font-size: 8.25pt !important;
    color: #5f2a0b !important;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 720px) {
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .exam-mini-grid,
  body.grammar-handout-page.l00-link-handout[data-l00-level="junior"] .handout-overview-grid {
    grid-template-columns: 1fr;
  }
}
