.workspace-eyebrow { font-size:.75rem; letter-spacing:.12em; font-weight:800; color:var(--en-teal); }
.workspace-selectors { display:flex; align-items:end; gap:1rem; }
.workspace-selectors label { display:grid; gap:.4rem; font-size:.8rem; font-weight:700; color:var(--gw-soft); flex:1; min-width:0; }
.workspace-selectors select { font-weight:600; color:var(--en-navy); padding:.8rem; }
.workspace-selectors a { padding:.8rem; }
/* One short conversion line under the scale dropdown (see GradeScaleSummary); the full description is on the country page. */
.workspace-description { color:var(--gw-soft); font-size:.85rem; margin:.6rem 0 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.workspace-description.is-warning { white-space:normal; color:#b45309; font-size:.85rem; }
/* --gw-soft: the secondary text colour of the calculator (labels, hints, helper lines): darker than the site's muted grey so it stays readable at small sizes. */
.workspace-grid { --gw-soft:#475467; display:grid; grid-template-columns:minmax(0,1fr) 290px; gap:1.5rem; align-items:start; }
.workspace-main { min-width:0; }
.workspace-courses-panel { padding:1.25rem; }
.workspace-side { position:sticky; top:100px; }
.gpa-workspace h2 { font-size:1rem; margin:0; }
.workspace-toolbar { display:flex; justify-content:space-between; align-items:center; gap:.5rem; margin-bottom:1rem; }
.workspace-toolbar > div { display:flex; gap:.5rem; }
.workspace-courses { width:100%; table-layout:fixed; }
.workspace-courses th { color:var(--gw-soft); font-size:.8rem; font-weight:600; padding:.5rem .35rem; vertical-align:bottom; }
.workspace-courses th:nth-child(1) { width:16%; }
.workspace-courses th:nth-child(2) { width:30%; }
.workspace-courses th:nth-child(3) { width:21%; }
.workspace-courses th:nth-child(4) { width:10%; }
.workspace-courses th:nth-child(5) { width:15%; }
.workspace-courses th:nth-child(6) { width:8%; }
.workspace-courses td { padding:.65rem .35rem; vertical-align:top; border-top:1px solid var(--en-border); }
.workspace-courses .form-control,.workspace-courses .form-select { font-size:.93rem; padding-block:.5rem; padding-inline-start:.65rem; min-height:2.5rem; min-width:0; }
.workspace-courses .row-scale { margin-top:.4rem; font-size:.85rem; color:var(--gw-soft); }
/* In the grade cell the result line comes right under the grade; "Different scale?" and its dropdown come after it. */
.workspace-courses .grade-cell { display:flex; flex-direction:column; }
.workspace-courses .grade-cell .grade-editor { order:1; }
.workspace-courses .grade-cell .workspace-row-note { order:2; }
.workspace-courses .grade-cell .row-scale-toggle { order:3; align-self:flex-start; }
.workspace-courses .grade-cell .row-scale { order:3; }
.workspace-courses .row-scale-toggle { display:block; padding:0; margin-top:.25rem; font-size:.72rem; text-decoration:none; }
.workspace-courses .form-check-input { margin: .65rem auto; display:block; }
.workspace-courses .remove-course { padding:.4rem; color:var(--gw-soft); }
.workspace-row-note { font-size:.8rem; margin-top:.3rem; overflow-wrap:anywhere; color:var(--gw-soft); }
.workspace-row-note.error { color:#b42318; }
/* A course's result ("A+ · 4.0 points · 3.00 U.S. credits") is the answer to the row: a tinted line under the grade, red-tinted when the row needs attention. */
.workspace-courses .workspace-row-note:not(:empty) { margin-top:.4rem; padding:.2rem .5rem; font-size:.75rem; line-height:1.3; color:var(--en-navy); background:rgba(15,168,161,.1); border-left:3px solid var(--en-teal); border-radius:.35rem; }
/* On a wide table the result is one line: the box is as wide as its text (up to 20rem, then it wraps) and may run over the empty space under the Credits column.
   An error wraps inside its own column, and so does the result when the Credits cell has a note of its own. */
.workspace-courses .grade-cell .workspace-row-note:not(.error) { align-self:flex-start; width:max-content; max-width:20rem; }
.workspace-courses tr:has(.credit-review-note:not(:empty)) .grade-cell .workspace-row-note { width:auto; align-self:stretch; }
.workspace-courses .workspace-row-note.error:not(:empty) { color:#b42318; background:#fef3f2; border-left-color:#b42318; }
/* Short rules under the table; the long explanation of the weighting bonus is folded away. */
.workspace-hint { margin-top:1.1rem; padding-top:1rem; border-top:1px solid var(--en-border); color:var(--gw-soft); font-size:.9rem; line-height:1.5; }
.workspace-hint p { margin:0 0 .5rem; }
.workspace-hint summary { width:fit-content; cursor:pointer; color:var(--en-navy-2); font-weight:600; }
.workspace-hint details p { margin:.5rem 0 0; }
/* While a new calculation runs the last results stay (dimmed) so nothing collapses and the table does not jump. */
#gpa-workspace.calculating .workspace-row-note,
#gpa-workspace.calculating .workspace-terms,
#gpa-workspace.calculating .workspace-stat strong,
#gpa-workspace.calculating .workspace-summary dd { opacity:.45; }
/* "Calculating…" comes and goes on every change: keep its line so the buttons below it do not move. */
#calculationStatus { min-height:1.5em; }
#gpaResults { scroll-margin-top:5rem; }
.workspace-stat { display:grid; margin:1.2rem 0; }
.workspace-stat > span { color:var(--gw-soft); font-size:.9rem; }
.workspace-stat strong { color:var(--en-navy); font-size:3rem; letter-spacing:-.05em; line-height:1.2; }
.workspace-stat small { color:var(--gw-soft); font-size:.8rem; }
.workspace-stat.secondary { padding-bottom:1.25rem; border-bottom:1px solid var(--en-border); }
.workspace-stat.secondary strong { font-size:1.7rem; }
.workspace-summary dl > div { display:flex; justify-content:space-between; gap:.8rem; font-size:.88rem; margin:.6rem 0; }
.workspace-summary dt { font-weight:400; color:var(--gw-soft); }
.workspace-summary dd { font-weight:700; margin:0; }
.workspace-exports { display:grid; gap:.5rem; margin-top:1rem; }
.workspace-exports button { font-size:.85rem; }
.workspace-terms { display:flex; flex-wrap:wrap; gap:.75rem; margin-top:1rem; }
.workspace-terms-title { flex:0 0 100%; }
.workspace-term { background:#fff; border:1px solid var(--en-border); border-radius:.75rem; padding:.85rem 1rem; font-size:.88rem; flex:1; min-width:160px; }
.workspace-term strong { display:block; color:var(--en-navy); margin-bottom:.3rem; overflow-wrap:anywhere; }
.workspace-how h2 { margin-bottom:.8rem; }
.workspace-how-steps { margin:0; padding-left:1.25rem; font-size:.93rem; line-height:1.55; color:#344054; }
.workspace-how-steps li + li { margin-top:.4rem; }
.workspace-how-links { margin:1rem 0 0; font-size:.9rem; }
.workspace-how .small { font-size:.85rem; }
/* The tabs and the upload bar below them are one card (the upload bar is only there while the Upload tab is open). */
.entry-bar:has(+ .tab-content .tab-pane.active .transcript-bar) { margin-bottom:0; border-bottom-left-radius:0; border-bottom-right-radius:0; border-bottom-color:transparent; }
.entry-bar + .tab-content .transcript-bar { border-top-left-radius:0; border-top-right-radius:0; border-top:0; }
/* Narrow screens only (CSS hides it from 992px up, where the results are beside the table): the GPA stays in view while courses are typed. */
.gpa-bar { position:fixed; left:0; right:0; bottom:0; z-index:1030; display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); background:var(--en-navy); color:#fff; box-shadow:0 -4px 16px rgba(10,36,87,.25); }
.gpa-bar[hidden] { display:none; }
.gpa-bar-text strong { margin:0 .1rem; font-size:1.2rem; }
.gpa-bar .btn { white-space:nowrap; }
body:has(.gpa-bar:not([hidden])) { padding-bottom:4.2rem; }
/* Slim upload bar (Upload Transcript tab): icon · text · Choose file, status line below; a file can be dropped on it. */
.transcript-bar { margin-bottom:1.5rem; padding:1rem 1.25rem; background:#f8fafc; }
.transcript-bar.dragover { border-color:var(--en-teal); box-shadow:0 0 0 3px rgba(15,168,161,.15); }
/* The drop box: a white dashed box with the icon, the words and the button; a file dragged over the bar lights it up. */
.transcript-bar-row { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; padding:1rem 1.25rem; background:#fff; border:1.5px dashed #c3cfdf; border-radius:.85rem; }
.transcript-bar.dragover .transcript-bar-row { background:rgba(15,168,161,.06); border-color:var(--en-teal); }
.transcript-bar-icon { flex:none; display:inline-grid; place-items:center; width:2.9rem; height:2.9rem; border-radius:50%; background:rgba(15,168,161,.12); font-size:1.5rem; color:var(--en-navy-2); }
.transcript-bar-text { flex:1 1 0; min-width:12rem; }   /* shrinks first, so the button stays on the right */
.transcript-bar-title { font-weight:700; font-size:1.05rem; color:var(--en-navy); }
.transcript-bar-sub { margin-top:.1rem; color:var(--gw-soft, #475467); }
/* Choose file with the secondary "Combine up to 3 files" button under it, both as wide as the wider one. */
.transcript-bar-action { display:flex; flex-direction:column; gap:.5rem; }
.transcript-bar-action .btn { padding:.6rem 1.2rem; white-space:nowrap; }
/* Under the file types, smaller: where the report is saved and how many are left. */
.transcript-bar-saved { margin-top:.45rem; font-size:.8rem; line-height:1.4; color:var(--gw-soft, #475467); }
/* "Stored privately · Privacy", small and centred under the buttons. */
.transcript-bar-privacy { text-align:center; font-size:.8rem; color:var(--gw-soft, #475467); }
.transcript-bar-privacy .bi { color:var(--en-navy-2); }
.transcript-bar-privacy a { text-decoration:underline; }
.transcript-stage { margin-top:.75rem; padding-top:.75rem; border-top:1px solid var(--en-border); }
.transcript-stage-list { list-style:none; margin:.5rem 0 .75rem; padding:0; display:flex; flex-direction:column; gap:.35rem; }
.transcript-stage-item { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; padding:.35rem .6rem; background:#fff; border:1px solid var(--en-border); border-radius:.5rem; }
.transcript-stage-name { flex:1 1 10rem; min-width:0; overflow-wrap:anywhere; font-size:.9rem; }
.transcript-stage-buttons { display:flex; gap:.25rem; margin-left:auto; }
.transcript-bar-status { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; margin-top:.75rem; padding-top:.75rem; border-top:1px solid var(--en-border); }
@media (max-width:1199px) { .workspace-grid { grid-template-columns:minmax(0,1fr) 260px; gap:1rem; } }
@media (min-width:992px) { .gpa-bar { display:none !important; } }
@media (max-width:991px) {
    .workspace-grid { grid-template-columns:1fr; } .workspace-side { position:static; }
    /* Public page: one column, so the order is the order of use: the courses, then the results, then the explanation, then the offers. */
    .workspace-grid.is-reordered { gap:1rem; }
    .workspace-grid.is-reordered > .workspace-main, .workspace-grid.is-reordered > .workspace-side { display:contents; }
    .workspace-grid.is-reordered .workspace-main > *, .workspace-grid.is-reordered .workspace-side > * { margin:0 !important; }
    .workspace-grid.is-reordered .workspace-summary { order:1; }
    .workspace-grid.is-reordered .workspace-how { order:2; }
    .workspace-grid.is-reordered .workspace-side > .panel:not(.workspace-summary) { order:3; }
    .workspace-grid.is-reordered .workspace-main > .entry-bar:has(+ .tab-content .transcript-bar) + .tab-content { margin-top:-1rem !important; }
    .workspace-grid.is-reordered .tab-content .transcript-bar { margin-bottom:0; }
}
@media (max-width:767px) {
    .transcript-bar-action, .transcript-bar-action .btn { width:100%; }
    .transcript-bar-action .btn { justify-content:center; text-align:center; }
}
@media (max-width:600px) {
    .workspace-selectors { flex-direction:column; align-items:stretch; }
    /* "View scale" is a link on a phone, not a second full-width button under the dropdown. */
    .workspace-selectors a.btn { align-self:flex-start; padding:.1rem 0; border:0; background:none; box-shadow:none; color:var(--en-navy-2); text-align:left; text-decoration:underline; }
    .workspace-description { white-space:normal; }
    .workspace-courses-panel { padding:1rem .85rem; }
    .workspace-toolbar { align-items:stretch; flex-direction:column; }
    .workspace-toolbar > div { width:100%; } .workspace-toolbar .btn { flex:1; padding:.55rem .5rem; }
    /* Phones: every course is a card (Course 1, 2, ...) with its fields stacked in the order of the table: term, course, grade + result line, credits + bonus.
       Inputs are 16px (smaller makes iPhones zoom the page on focus) and 46px high, labels are readable, and the remove button sits in the card's corner. */
    .workspace-courses thead { display:none; } .workspace-courses,.workspace-courses tbody { display:block; }
    .workspace-courses tbody { counter-reset:course; }
    .workspace-courses tr { counter-increment:course; position:relative; display:grid; grid-template-columns:1fr 1fr; gap:.7rem .75rem; margin-bottom:.9rem; padding:.8rem .85rem 1rem; background:#f8fafc; border:1px solid var(--en-border); border-radius:.85rem; }
    .workspace-courses tr::before { content:"Course " counter(course); grid-column:1 / -1; align-self:center; min-height:2rem; padding-right:3rem; font-size:.85rem; font-weight:700; color:var(--en-navy); }
    .workspace-courses td { display:block; min-width:0; padding:0; border:0; }
    .workspace-courses td::before { content:attr(data-label); display:block; margin-bottom:.3rem; font-size:.8rem; font-weight:600; color:var(--en-navy); }
    .workspace-courses td:nth-child(1) { order:1; grid-column:1 / -1; }
    .workspace-courses td:nth-child(2) { order:2; grid-column:1 / -1; }
    .workspace-courses td:nth-child(3) { order:3; grid-column:1 / -1; }
    .workspace-courses td:nth-child(4) { order:4; }
    .workspace-courses td:nth-child(5) { order:5; }
    .workspace-courses td:last-child { position:absolute; top:.35rem; right:.4rem; }
    .workspace-courses td:last-child::before { display:none; }
    .workspace-courses .form-control,.workspace-courses .form-select { min-height:2.9rem; padding-block:.55rem; padding-inline-start:.8rem; font-size:16px; background-color:#fff; }
    .workspace-courses .remove-course { display:grid; place-items:center; width:2.75rem; height:2.75rem; padding:0; font-size:1.05rem; }
    .workspace-courses .row-scale-toggle { margin-top:.4rem; padding:.25rem 0; font-size:.85rem; }
    .workspace-courses .row-scale { margin-top:.5rem; font-size:16px; }
    .workspace-courses .workspace-row-note:not(:empty) { font-size:.85rem; padding:.45rem .65rem; }
    .workspace-courses .grade-cell .workspace-row-note:not(.error) { align-self:stretch; width:auto; max-width:none; }
    #addRow { width:100%; padding:.75rem; font-size:1rem; }
}
@media print {
    .workspace-grid { display:block; } .workspace-side { position:static; }
    .workspace-selectors,.row-scale,.remove-course { display:none !important; }
    .workspace-summary { break-inside:avoid; } .workspace-courses tr { break-inside:avoid; }
    .workspace-courses input,.workspace-courses select { border:0; appearance:none; }
}
