/* Layout, typography and page spacing inherit the existing grade calculator. */
.fg-wrap { margin-bottom: 60px; }
.fg-card { margin-bottom: 28px; padding: 24px; background: rgba(var(--bs-secondary-rgb), .3); border: 1px solid #e5e5e5; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.fg-card h2 { font-size: 1.15rem; margin-bottom: 20px; }
.fg-step { display: none; }
.fg-wrap h3 { font-size: 1rem; }
.fg-wrap label { display: block; font-weight: 700; margin-bottom: 8px; }
.fg-help { font-size: 14px; line-height: 1.6; margin: 10px 0 16px; }
.fg-cutoffs { display: grid; grid-template-columns: repeat(auto-fit,minmax(90px,1fr)); gap: 12px; margin: 20px 0; }
.fg-cutoffs label { font-size: 13px; }
.fg-wrap summary { color: #235a86; cursor: pointer; }
.fg-curve-toggle { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.fg-curve-toggle label { margin: 0; }
.fg-curve-toggle input { width: 18px; height: 18px; }
#fg-curve-fields { margin-top: 18px; }
.fg-row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.fg-row label { font-size: 14px; }
.fg-final-weight { margin-top: 26px; border-top: 1px solid #ccc; padding-top: 20px; }
.fg-final-weight input, #fg-curve { max-width: 240px; }
.fg-weight { font-size: 14px; margin-top: 14px; }
.fg-actions { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding-top: 5%; }
.fg-actions .btn-success { flex-basis: 100%; max-width: 380px; }
#fg-error { color: #a02121; padding: 14px 0; margin: 20px 0 0; }
.fg-result { scroll-margin-top: 90px; }
.fg-score { font-size: 2.4rem; font-weight: 600; color: #146c43; }
.fg-result table { width: 100%; margin-top: 20px; }
.fg-result th, .fg-result td { padding: 10px 8px; border: 1px solid #ccc; text-align: left; }
.fg-result th { background: #337ab7; color: white; }
.fg-explanation { line-height: 1.7; margin-top: 36px; }
.fg-explanation h2 { text-align: center; }
.fg-explanation h3 { margin-top: 26px; font-weight: 700; }
.fg-formula { padding: 16px 0; }
.fg-wrap [hidden] { display: none !important; }
body:has(.fg-wrap) footer { position: static; height: auto; padding-bottom: 25px; }
.fg-wrap :focus-visible { outline: 3px solid #337ab7; outline-offset: 3px; }
@media (max-width: 991px) and (min-width: 576px) {
  .fg-row { grid-template-columns: 1fr 1fr; }
  .fg-row > div:first-child { grid-column: 1 / -1; }
  .fg-remove { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 575px) {
  .fg-card { padding: 18px; }
  .fg-row { grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid #ccc; }
  .fg-row > div:first-child { grid-column: 1 / -1; }
  .fg-remove { grid-column: 1 / -1; justify-self: start; }
  .fg-actions .btn-success { width: 100%; font-size: 1rem; }
  .fg-result th, .fg-result td { font-size: 13px; padding: 8px 4px; }
}
