.grades-page { background: #fff; }
.grades-content { width: min(100% - 32px, 960px); margin-inline: auto; }
.grades-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.grades-hero { padding-block: 48px 8px; }
.grades-hero h1 { max-width: 760px; font-size: 44px; line-height: 1.08; }
.grades-lede { max-width: 680px; margin: 16px 0 0; color: #414c47; font-size: 18px; line-height: 1.6; }
.grades-calculator { padding-block: 24px 8px; }
.grades-note { color: #414c47; }
.grades-calculator-card { padding: 22px; border: 1px solid #d8e4dd; border-radius: 8px; background: #f7faf8; }
.grades-form label { display: block; margin-bottom: 8px; font-weight: 700; }
.grades-form-row { display: flex; flex-wrap: wrap; gap: 10px; }
.grades-form select { min-height: 44px; padding: 0 12px; border: 1px solid #b9c9c0; border-radius: 6px; background: #fff; color: #1c1a17; font: inherit; font-size: 16px; }
.grades-form select[data-grades-system] { flex: 1 1 200px; }
.grades-form select[data-grades-grade] { flex: 0 1 140px; }
.grades-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.grades-result dt { grid-row: 1; color: #416456; font: 700 12px 'JetBrains Mono', monospace; text-transform: uppercase; }
.grades-result dd { grid-row: 2; margin: 0; font-size: 26px; font-weight: 700; color: #1c1a17; }
.grades-calc-links { display: grid; gap: 8px; margin: 18px 0 0; color: #414c47; line-height: 1.55; }
.grades-calc-links a, .grades-quiet a, .grades-faq a { color: #12613d; font-weight: 700; text-underline-offset: 3px; }
.grades-pyramid { padding-block: 40px 8px; }
.grades-pyramid > p { max-width: 640px; color: #414c47; line-height: 1.6; }
.grades-pyramid-card { margin: 18px 0 0; padding: 20px; border: 1px solid #d8e4dd; border-radius: 8px; max-width: 520px; }
.grades-toggle { display: inline-flex; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 8px; background: #eef3ef; }
.grades-toggle button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: #414c47; font: inherit; font-weight: 600; cursor: pointer; }
.grades-toggle button[aria-pressed="true"] { background: #fff; color: #12613d; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }
.grades-pyramid-bars { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.grades-pyramid-bars li { display: grid; grid-template-columns: 64px minmax(0, 1fr) 28px; gap: 10px; align-items: center; }
.grades-pyramid-bars .grades-bar { height: 18px; border-radius: 4px; background: #2bb39a; }
.grades-pyramid-bars [data-grades-pyramid-grade] { font-weight: 700; text-align: right; }
.grades-pyramid-card figcaption { margin-top: 12px; color: #6f6658; font-size: 13px; }
.grades-table-section { padding-block: 40px 8px; }
.grades-table-wrap { margin-top: 16px; overflow-x: auto; }
.grades-table { width: 100%; max-width: 560px; border-collapse: collapse; text-align: left; }
.grades-table th, .grades-table td { padding: 10px 14px; border-bottom: 1px solid #e3ebe6; }
.grades-table thead th { color: #416456; font: 700 12px 'JetBrains Mono', monospace; text-transform: uppercase; }
.grades-table tbody th { font-weight: 700; }
.grades-table tbody tr.is-match { background: #fff2e8; }
.grades-table tbody tr.is-match th, .grades-table tbody tr.is-match td { color: #8a3a10; }
.grades-quiet { margin: 14px 0 0; }
.grades-faq { padding-block: 40px 8px; }
.grades-faq h3 { margin: 22px 0 0; font-size: 19px; }
.grades-faq p { max-width: 680px; margin: 8px 0 0; color: #414c47; line-height: 1.65; }
.grades-close { padding-block: 40px 64px; }
.grades-close-box { padding: 28px; border-radius: 8px; background: #eaf3ee; }
.grades-close-box p { margin: 10px 0 18px; color: #414c47; }
.grades-close-box .button { display: inline-flex; }
@media (max-width: 640px) {
  .grades-hero { padding-block: 32px 4px; }
  .grades-hero h1 { font-size: 32px; }
  .grades-lede { font-size: 16px; }
  .grades-result dd { font-size: 22px; }
  .grades-calculator-card, .grades-pyramid-card { padding: 16px; }
}
