/* Grades-first class pages (grades-first.mjs). Port of utaustin.guide's class page, in the guides'
   DS3 palette: ink bars on a warm white panel, greys by letter, one warm mark for F. */
:root{
  --gf-ink:var(--ds3-ink,var(--fg-ink,#1f1f1f));--gf-muted:var(--ds3-muted,var(--fg-secondary,#6b6b6b));
  --gf-rule:var(--ds3-hairline,var(--fg-line,#e8e8e8));--gf-rule-strong:var(--ds3-line,var(--fg-line-strong,#dcdcdc));
  --gf-raised:#fff;--gf-well:var(--ds3-well,var(--fg-well,#f6f6f4));
  --gf-a:#1f1f1f;--gf-b:#4a4a4a;--gf-c:#8c8c8c;--gf-d:#bdb2a6;--gf-f:#b4553c;--gf-w:#d6d6d2;--gf-signal:#b4553c;
}
.gf{display:flex;flex-wrap:wrap;gap:20px;align-items:stretch;margin:8px 0 40px;color:var(--gf-ink);font-variant-numeric:tabular-nums}
.gf>.gf-dist{flex:1.12 1 440px}.gf>.gf-past{flex:1 1 400px}
.gf.gf-one>.gf-dist{flex-basis:100%}
:root main .gf>p.gf-from{flex:1 1 100%;margin:-6px 0 0;padding:0;border:0;background:none;font-size:13px;color:var(--gf-muted)}
.gf-panel{min-width:0;padding:24px 24px 20px;border:1px solid var(--gf-rule-strong);border-radius:12px;background:var(--gf-raised)}
.gf .gf-panel h2{margin:0 0 16px;font-size:22px;font-weight:600;line-height:1.25;letter-spacing:-.015em}
.gf-head{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));align-items:end;gap:12px;margin:0 0 18px}
.gf-select{display:grid;gap:6px;font-size:14px;color:var(--gf-muted)}
.gf-select select{width:100%;min-width:0;min-height:44px;padding:8px 32px 8px 12px;border:1px solid var(--gf-rule-strong);border-radius:8px;background:var(--gf-raised);color:var(--gf-ink);font:inherit;font-size:16px}
.gf-summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 22px;margin:0 0 18px;color:var(--gf-muted);font-size:14px}
.gf-stat{display:inline-flex;align-items:baseline;gap:8px}
.gf-big{font-size:34px;line-height:1.05;letter-spacing:-.03em;color:var(--gf-ink)}
.gf-n{flex-basis:100%;margin-top:6px;font-size:14px;color:var(--gf-muted)}
.gf-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.gf-bars{display:flex;gap:clamp(6px,1vw,14px);align-items:stretch}
.gf-family{display:flex;flex:var(--gf-span,3) 1 0;gap:clamp(2px,.4vw,6px)}
.gf-bar{display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:stretch;text-align:center}
.gf-bar-pct{font-size:13px;color:var(--gf-muted);margin-bottom:6px}
.gf-bar svg{display:block;width:100%;height:230px;overflow:visible}
.gf-bar rect{fill:var(--gf-b)}
.gf-family-a rect{fill:var(--gf-a)}.gf-family-c rect{fill:var(--gf-c)}.gf-family-d rect{fill:var(--gf-d)}.gf-family-f rect{fill:var(--gf-f)}.gf-family-w rect{fill:var(--gf-w)}
.gf-bar-halo{stroke:#fff;stroke-width:6}
.gf-bar-ref{stroke:var(--gf-ink);stroke-width:2.5}
.gf-bar-letter{margin-top:10px;padding-top:8px;border-top:1px solid var(--gf-rule-strong);font-size:15px;font-weight:500}
.gf-key-line{margin:16px 0 0;font-size:14px;line-height:1.45;color:var(--gf-muted)}
.gf-past{display:flex;flex-direction:column}
.gf-small{font-size:14px;line-height:1.5;color:var(--gf-muted)}
.gf-past-note{margin:0 0 14px}
:root main .gf figure.gf-history{margin:0;padding:0;border:0;background:none;box-shadow:none;max-width:none}
.gf-past [data-gf-slot]{flex:1 1 auto}
.gf-readout{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;min-height:40px;margin-bottom:16px;font-size:15px;color:var(--gf-muted)}
.gf-readout strong{font-size:30px;font-weight:400;letter-spacing:-.03em;color:var(--gf-ink)}
.gf-readout [data-gf-term]{color:var(--gf-ink);font-weight:500}
.gf-plot{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px}
.gf-y{display:flex;flex-direction:column;justify-content:space-between;height:220px;margin:-8px 0;font-size:12.5px;line-height:16px;color:var(--gf-muted);text-align:right}
.gf-area{position:relative;cursor:crosshair;border-radius:4px;touch-action:pan-y}
.gf-area:focus-visible{outline:2px solid var(--gf-ink);outline-offset:6px}
.gf-svg{display:block;width:100%;height:220px;overflow:visible}
.gf-grid line{stroke:var(--gf-rule);stroke-width:1}
.gf-line{fill:none;stroke:var(--gf-ink);stroke-width:2.5;stroke-linejoin:round}
.gf-line-avg{fill:none;stroke:var(--gf-muted);stroke-width:1.5;stroke-dasharray:5 5}
.gf-dot{stroke:var(--gf-ink);stroke-width:7;stroke-linecap:round}
.gf-dot-summer{stroke:var(--gf-c);stroke-width:6}
.gf-marker{stroke:var(--gf-signal);stroke-width:1.5}
.gf-sizes{display:block;width:100%;height:44px;margin-top:14px}
.gf-sizes rect{fill:var(--gf-rule-strong)}
.gf-sizes .gf-size-summer{opacity:.55}
.gf-x{display:flex;justify-content:space-between;margin-top:8px;font-size:13px;color:var(--gf-muted)}
.gf-key{display:flex;flex-wrap:wrap;gap:8px 22px;margin-top:20px;font-size:14px;color:var(--gf-muted)}
.gf-key span::before{content:'';display:inline-block;width:18px;margin-right:8px;vertical-align:middle}
.gf-key-own::before{border-top:2.5px solid var(--gf-ink)}
.gf-key-avg::before{border-top:1.5px dashed var(--gf-muted)}
.gf-key-size::before{height:10px;background:var(--gf-rule-strong)}
.gf-details{margin-top:14px}
.gf-details>summary{display:inline-flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;font-size:15px;font-weight:500;list-style:none}
.gf-details>summary::-webkit-details-marker{display:none}
.gf-details>summary::after{content:'';width:7px;height:7px;margin-top:-4px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}
.gf-details[open]>summary::after{margin-top:4px;transform:rotate(225deg)}
.gf-table-wrap{max-height:520px;overflow:auto;border-top:1px solid var(--gf-rule)}
.gf-table{width:100%;border-collapse:collapse;font-size:15px}
.gf-table :is(th,td){padding:10px 12px;border-bottom:1px solid var(--gf-rule);text-align:right;font-weight:400}
.gf-table :is(th,td):first-child{padding-left:0;text-align:left}
.gf-table :is(th,td):last-child{padding-right:0}
.gf-table thead th{position:sticky;top:0;background:var(--gf-raised);font-size:13px;color:var(--gf-muted)}
.gf-table tbody th{font-weight:500}
:root main p.gf-dek{max-width:62ch;margin:14px 0 22px}

/* Evaluations: one row per instructor, a short meter per rating. */
.gf-evals-section,.gf-evals-moved{margin:0 0 40px}
.gf-evals-section h2,.gf-evals-moved h2{margin:0 0 12px;font-size:24px;font-weight:600;letter-spacing:-.015em}
.gf-lede{max-width:66ch;margin:0 0 18px;font-size:16px;line-height:1.55}
.gf-evals th[scope=row]{font-weight:500}
.gf-evals td{vertical-align:top}
.gf-evals :is(th,td):nth-child(2){text-align:left}
.gf-evals td small{color:var(--gf-muted);font-size:13px}
.gf-evals-wrap{max-height:none}
.gf-score{display:inline-grid;grid-template-columns:auto 88px;align-items:center;gap:2px 10px}
.gf-score b{font-size:18px;font-weight:500}
.gf-score small{grid-column:1/-1;font-size:13px;color:var(--gf-muted)}
.gf-meter{display:block;width:88px;height:6px}
.gf-meter-track{fill:var(--gf-rule)}
.gf-meter-fill{fill:var(--gf-ink)}
.gf-old{padding-top:4px}

/* Sources: one small line or list at the end of the page. */
main [data-fg-sources]{font-size:13px;line-height:1.5;color:var(--gf-muted)}
main details[data-fg-sources]>summary,main details.fg-academic-directory-record>summary{font-size:14px}

/* The class index: one search, tools, subjects as rows. */
:root main p.gf-index-lede{max-width:62ch;margin:12px 0 24px}
.gf-index .ce-filters{display:none}
.gf-index .ce-explorer:has(#ce-query:placeholder-shown) :is(.ce-result-heading,[data-ce-results],[data-ce-subject-matches],[data-ce-empty]){display:none}
.gf-tools{display:flex;flex-wrap:wrap;gap:6px 22px;margin:18px 0 8px;font-size:16px}
:root main .gf-tools a[href]{display:inline-flex;align-items:center;min-height:44px;color:var(--gf-ink);text-decoration-color:var(--gf-rule-strong);text-underline-offset:.22em}
.gf-index-subjects{margin:40px 0}
.gf-index-subjects h2{margin:0 0 14px;font-size:24px;font-weight:600;letter-spacing:-.015em}
.gf-index-subjects h3{margin:28px 0 6px;font-size:15px;font-weight:600;color:var(--gf-muted)}
.gf-az{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
:root main .gf-az a[href]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-height:40px;padding:0;border:1px solid var(--gf-rule-strong);border-radius:999px;color:var(--gf-ink);font-size:14px;text-decoration:none}
:root main .gf-az a[href]:hover{border-color:var(--gf-ink)}
.gf-subjects{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:0 28px;margin:0;padding:0;list-style:none}
:root main .gf-subjects a[href]{display:grid;grid-template-columns:5.2em minmax(0,1fr) auto;align-items:baseline;gap:12px;min-height:44px;padding:10px 0;border-bottom:1px solid var(--gf-rule);color:var(--gf-ink);text-decoration:none}
:root main .gf-subjects a[href]:hover .gf-subject-name{text-decoration:underline;text-underline-offset:.2em}
.gf-subject-code{font-weight:600;font-size:14px;letter-spacing:.01em}
.gf-subject-name{font-size:15px}
.gf-subject-gpa{font-size:15px;font-variant-numeric:tabular-nums}
.gf-subject-gpa.gf-none{font-size:13px;color:var(--gf-muted)}

@media (max-width:640px){
  .gf{gap:14px;margin-bottom:28px}
  .gf-panel{padding:18px 14px 14px}
  .gf-head{grid-template-columns:1fr 1fr;gap:10px}
  .gf-summary{display:grid;grid-template-columns:repeat(3,auto);justify-content:start;gap:4px 22px}
  .gf-stat{display:grid;gap:2px}
  .gf-big{font-size:28px}
  .gf-n{grid-column:1/-1}
  .gf-select select{padding:8px 26px 8px 10px;font-size:15px}
  .gf-bar svg{height:170px}
  .gf-bar-pct{font-size:11.5px}
  .gf-bar-letter{font-size:13px}
  .gf-y,.gf-svg{height:180px}
  .gf-evals thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .gf-evals,.gf-evals tbody{display:block;width:100%}
  .gf-evals tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;padding:14px 0;border-bottom:1px solid var(--gf-rule)}
  .gf-evals th[scope=row]{grid-column:1/-1;padding:0;border:0;font-size:17px}
  .gf-evals td{padding:0;border:0;text-align:left}
  .gf-evals td::before{content:attr(data-label);display:block;margin-bottom:2px;font-size:13px;color:var(--gf-muted)}
  .gf-table-wrap:has(.gf-evals){overflow:visible}
  .gf-subjects{grid-template-columns:1fr}
}
