/* Redesigned GPA page (body.gpa-v2): one compact column of white cards on a
   light background, system fonts, and the grading systems as tabs. Loaded
   after the older stylesheets, which still supply the base layout. */
.gpa-v2 .toppading { padding-top: 76px; }
.gpa-v2 .navbar-brand { font-weight: 700; }
.gpa-v2 .middle > br { display: none; }
.gpa-v2 .anti-container { padding-left: 0; padding-right: 0; }

.gpa-v2 #caption { font-size: clamp(24px, 5.6vw, 34px); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; text-align: center !important; margin: 8px 0 16px; padding: 0; }
.gpa-v2 .middle > p.anti-container { color: var(--v2-muted); font-size: 15.5px; line-height: 1.55; margin-bottom: 12px; }

/* Grading systems as tabs. */
.gpa-scale-tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 14px; background: #e6e9ee; border-radius: 12px; }
.gpa-scale-tabs a { flex: 1; padding: 9px 6px; border-radius: 9px; text-align: center; font-size: 14.5px; font-weight: 600; color: #465264; text-decoration: none; white-space: nowrap; }
.gpa-scale-tabs a[aria-current="page"] { background: var(--v2-surface); color: var(--v2-accent-dark); box-shadow: 0 1px 2px rgba(16, 24, 40, .14); }
.gpa-scale-tabs a:focus-visible { outline: 2px solid var(--v2-accent); outline-offset: 1px; }

/* Section labels replace the blue bars. */
.gpa-v2 #prev, .gpa-v2 #grades { background: none; color: var(--v2-muted); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-align: left !important; margin: 16px 2px 6px !important; padding: 0 !important; }

/* Previous average and credits: one card, two fields side by side. */
.gpa-v2 .prevCourse { background: var(--v2-surface) !important; border: 1px solid var(--v2-border); border-radius: 14px; padding: 14px !important; margin: 0 !important; }
.gpa-v2 .prevCourse form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gpa-v2 .prevCourse .row { display: block; margin: 0 !important; }
.gpa-v2 .prevCourse .row > * { width: 100%; max-width: 100%; flex: none; padding: 0; text-align: left !important; }
.gpa-v2 .prevCourse label { font-size: 13.5px; color: #465264; padding: 0 0 4px; }
.gpa-v2 .form-control, .gpa-v2 .form-select { min-height: 44px; font-size: 16px; border-radius: 9px; border-color: var(--v2-control); color: var(--v2-text); }

/* Course table as a card. */
.gpa-v2 .gradesTable { width: 100%; table-layout: fixed; margin: 0 !important; background: var(--v2-surface) !important; color: inherit; border: 1px solid var(--v2-border); border-radius: 14px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.gpa-v2 .gradesTable > :not(caption) > * > * { background: transparent; box-shadow: none; border-bottom-width: 0; }
.gpa-v2 .gradesTable th { padding: 10px 6px; font-size: 12.5px; font-weight: 600; color: var(--v2-muted); background: #fafbfc; border-bottom: 1px solid var(--v2-border); }
.gpa-v2 .gradesTable th:first-child, .gpa-v2 .gradesTable td:first-child { width: 22%; padding-left: 12px; }
.gpa-v2 .gradesTable td { padding: 6px; vertical-align: middle; }
.gpa-v2 .gradesTable tbody tr:last-child td { padding-bottom: 10px; }
.gpa-v2 .Course { font-size: 14px; color: #465264; }
.gpa-v2 .credits, .gpa-v2 .newGrade, .gpa-v2 .oldGrade { width: 100% !important; padding-left: 10px; padding-right: 6px; }

.gpa-v2 #innerAdd { margin: 10px 0 0; }
.gpa-v2 #addButton { background: var(--v2-surface); color: var(--v2-accent-dark); border: 1px solid var(--v2-control); border-radius: 999px; padding: 8px 16px; font-size: 14.5px; font-weight: 600; }
.gpa-v2 .calculator { padding: 14px 0 0; }
.gpa-v2 #calcButton { width: 100%; min-height: 52px; border-radius: 12px; font-size: 17px; font-weight: 700; }

/* Result: two large values in a card. The markup carries inline styles. */
.gpa-v2 #result > .alert { background: var(--v2-surface) !important; border: 1px solid #bcd3ea; border-radius: 14px; padding: 16px !important; margin: 16px 0 !important; }
.gpa-v2 #result table { border: 0 !important; }
.gpa-v2 #result caption { background: none !important; color: var(--v2-muted) !important; text-align: left !important; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; padding: 0 0 8px; }
.gpa-v2 #result td { border: 0 !important; padding: 2px 0 !important; background: none !important; }
.gpa-v2 #result tr:first-of-type td { font-size: 13.5px; font-weight: 600 !important; color: #465264; }
.gpa-v2 #result tr:last-of-type td { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gpa-v2 #result > .alert > p { border: 0; border-radius: 10px; margin: 12px 0 0; padding: 10px 12px !important; font-size: 15px; line-height: 1.45; }
.gpa-v2 #result > .alert > br { display: none; }
.gpa-v2 #gpaNextSteps { font-size: 15px; border-top: 1px solid var(--v2-border); padding-top: 12px; }

/* Secondary tools and the guide text. */
.gpa-v2 .gpa-tool { margin-top: 32px; }
.gpa-v2 .gpa-tool-panel { background: var(--v2-surface) !important; border: 1px solid var(--v2-border); border-radius: 14px; padding: 16px !important; }
.gpa-v2 .middle h2 { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 32px 0 10px !important; }
.gpa-v2 .middle h3 { font-size: 18px; font-weight: 600; margin: 22px 0 8px !important; }
.gpa-v2 .middle p, .gpa-v2 .middle li { font-size: 16px; line-height: 1.65; word-spacing: normal; }

@media (max-width: 500px) {
  .gpa-v2 .toppading { padding-top: 64px; }
  .gpa-v2 .middle { padding-left: 14px; padding-right: 14px; }
  .gpa-v2 .middle > h1 { margin-bottom: 12px; }
}

/* The grade pickers are plain selects; show the usual arrow. */
.gpa-v2 select.newGrade, .gpa-v2 select.oldGrade {
  appearance: none; -webkit-appearance: none; padding-right: 22px;
  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235b6675' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e") no-repeat right 7px center / 12px 12px;
}
.gpa-v2 .calculator { padding-bottom: 20px; }

/* Scale and repeat settings on the A+/A/A− pages. */
.gpa-v2 .gpa-settings-card { background: var(--v2-surface); border: 1px solid var(--v2-border); border-radius: 14px; padding: 14px; margin: 0; }
.gpa-v2 #gpa-settings { border-top: 0; padding-top: 0; margin-top: 0; }
.gpa-v2 #gpa-settings .form-label { font-size: 13.5px; color: #465264; margin-bottom: 4px; }
.gpa-v2 .gpa-help { font-size: 13.5px; color: var(--v2-muted); }

/* Opt-in course memory and the note under a cumulative average below 2.00. */
.gpa-v2 #innerAdd { display: inline-block; }
.gpa-v2 .gpa-remember { margin: 12px 2px 0; font-size: 14.5px; }
.gpa-v2 .gpa-remember label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--v2-text); cursor: pointer; }
.gpa-v2 .gpa-remember input { width: 18px; height: 18px; accent-color: var(--v2-accent); }
.gpa-v2 .gpa-remember span { display: block; margin: 2px 0 0 26px; font-size: 13px; color: var(--v2-muted); }
.gpa-v2 .gpa-low-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff6e0; border: 1px solid #f0d58a; color: #5a4300; font-size: 14.5px; line-height: 1.5; text-align: left; }

/* Keep "Course 1" on one line and the settings help text small. */
.gpa-v2 .gradesTable th:first-child, .gpa-v2 .gradesTable td:first-child { width: 25%; white-space: nowrap; }
.gpa-v2 .Course { font-size: 13.5px; }
.gpa-v2 .middle p.gpa-help { font-size: 13.5px; line-height: 1.5; }
