/* Theme
 * Every color is a role, defined once as light-dark(<light>, <dark>). With no
 * choice made, color-scheme follows the OS; the navbar toggle (theme.js) sets
 * data-theme on <html>, which forces one side. Light values were checked for
 * WCAG contrast (4.5:1 for text) against the backgrounds they sit on.
 */
:root {
    color-scheme: light dark;

    /* Backgrounds */
    --color-bg: light-dark(#fff, #000);                /* page */
    --color-surface: light-dark(#efefef, #333);        /* striped rows, tiles, terms */
    --color-card: light-dark(#f6f6f6, #222);           /* cards */
    --color-row: light-dark(#f3f3f3, #282828);         /* schedule rows */
    --color-row-alt: light-dark(#e6e6e6, #444);        /* schedule rows, alternate */
    --color-field: light-dark(#f8f8f8, #383838);       /* inputs, form panels */
    --color-header: light-dark(#e9e4e2, #111);         /* card headers */
    --color-group: light-dark(#f2dfd8, #3b2722);       /* group rows (application headers): an accent tint */
    --color-navbar: light-dark(#d6d6d6, #595959);
    --color-border: light-dark(#bbb, #666);            /* quiet rules and input borders */
    --color-highlight: #c8ebfb;                        /* the row being dragged; same in both */
    --color-backdrop: light-dark(rgb(0 0 0 / 35%), rgb(0 0 0 / 65%));  /* behind a modal dialog */

    /* Text */
    --color-text: light-dark(#1a1a1a, #fff);
    --color-text-soft: light-dark(#5c5c5c, #aaa);      /* secondary labels */
    --color-text-muted: light-dark(#6e6e6e, #777);     /* speculative, passed */
    --color-navbar-text: light-dark(#1f1f1f, #ddd);
    --color-on-highlight: #111;

    /* Accents */
    --color-accent: light-dark(#9a4a36, #e2beb5);      /* links, buttons, card borders */
    --color-accent-hover: light-dark(#b8410f, #f9a070);
    --color-warn: light-dark(#b03a22, #e28871);        /* notes, unconfirmed, remove, credit ovals */
    --color-good: light-dark(#2e6b31, #b5e2b6);        /* complete */
    --color-good-hover: light-dark(#1b5e20, #90ee90);
    --color-current: light-dark(#8a5a00, #ffebcd);     /* the current term */
    --color-rating: light-dark(#c25e00, #ffa500);      /* rating stars */

    /* Scale */
    --spacing-xs: 2px; --spacing-sm: 5px; --spacing-md: 10px; --spacing-lg: 25px;
    --radius-sm: 5px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 15px;
    --font-xs: 8pt; --font-sm: 9pt; --font-base: 10pt; --font-md: 10.5pt; --font-lg: 11pt;
    --font-xl: 12pt; --font-2xl: 15pt; --font-3xl: 17pt; --font-4xl: 24pt; --font-5xl: 28pt;
    --min-width: 680px; --max-width: 1920px;
    /* Where sticky rows stop: under the navbar, and under a page's title row. */
    --top-below-navbar: 42.5px; --top-below-title: 93px;
    /* A grad school card's indent rule, and the school stripe that meets it. */
    --rule-width: 3px;
    --width-content: 1200px;                           /* every page's content column */
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* Base & Resets */
html { min-width: var(--min-width); }
body {
    min-height: 100vh; min-width: var(--min-width); max-width: var(--max-width);
    background: var(--color-bg); color: var(--color-text);
    cursor: default; font: var(--font-xl) Arial, sans-serif; margin: 0 auto;
}
ul { margin: 0; padding: 0; }
select { background: var(--color-bg); color: var(--color-text); }
a { color: var(--color-accent); text-decoration: none; }
a:is(:link, :visited):hover { color: var(--color-accent-hover); }
th { padding: 3px; font-style: italic; font-weight: bold; }
/* Every page's content: centered, at most --width-content wide; the navbar stays full width. */
.page-content { max-width: var(--width-content); margin: var(--spacing-md) auto; padding-inline: var(--spacing-md); }

/* Components */
.button {
    color: var(--color-bg); border: 2px solid transparent;
    background: var(--color-accent); border-radius: var(--radius-xl);
    padding: var(--spacing-sm) var(--spacing-md); margin: var(--spacing-sm);
}
.button:hover { border-color: var(--color-warn); color: var(--color-warn); background: transparent; }

.card {
    border: 2px solid var(--color-accent); border-radius: var(--radius-xl);
    padding: 8px; background: var(--color-card);
}
.card-header {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: var(--color-header); border-bottom: 1px solid var(--color-accent); padding: 8px;
}

.credits-oval {
    font-size: var(--font-xs); font-weight: bold; background: var(--color-warn);
    color: var(--color-bg); border-radius: var(--radius-sm); padding: 1px 3.5px 0 2.5px;
}
.credits-oval-complete { background: var(--color-good); min-width: 11px; margin-left: var(--spacing-sm); }
/* At the start or end of a term's title row, nudged down to the title's baseline. */
.credits-oval-start { margin-left: var(--spacing-sm); margin-top: 1px; }
.credits-oval-end { margin-right: var(--spacing-sm); margin-top: 1px; }
.credits-oval-fit { min-width: 0; }
.credits-oval-total { font-size: var(--font-2xl); margin-top: var(--spacing-md); text-align: right; }

/* Theme toggle: a navbar item that is a button */
.theme-toggle { background: none; border: 0; cursor: pointer; font: inherit; }

/* Click-to-copy (copy.js): reads as text with a copy icon on the left, not as a button. */
.copy { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--color-accent); text-align: left; white-space: nowrap; }
.copy:hover { color: var(--color-accent-hover); }

/* The confirmation dialog (_confirm_dialog.html, confirm.js). */
.dialog {
    background: var(--color-card); color: var(--color-text); max-width: 32em;
    border: 2px solid var(--color-accent); border-radius: var(--radius-lg); padding: var(--spacing-lg);
}
.dialog::backdrop { background: var(--color-backdrop); }
.dialog-buttons { display: flex; justify-content: flex-end; gap: var(--spacing-sm); }
.button-quiet { background: transparent; color: var(--color-accent); border-color: var(--color-accent); }

/* Actions are real buttons, so the keyboard reaches them; these strip the
   browser's button look. An icon button (add, remove, star) and a small
   icon beside a value (edit, external link), quiet until hovered. */
:is(.icon-button, .inline-icon, .editable, .menu-option) {
    background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left;
}
.inline-icon { font-size: var(--font-sm); margin-inline: var(--spacing-xs); color: var(--color-text-soft); }
:is(.icon-button, .inline-icon):hover { color: var(--color-accent-hover); }

/* Tooltips (tooltips.js): Tippy's "site" theme, from the tokens, so it follows light and dark.
   pre-line keeps the line breaks some titles carry (the course palette's). */
.tippy-box[data-theme~="site"] {
    background: var(--color-header); color: var(--color-text); border: 1px solid var(--color-border);
    font-size: var(--font-base); white-space: pre-line;
}
.tippy-box[data-theme~="site"] > .tippy-arrow { color: var(--color-header); }

/* A small solid rounded label; gray unless a modifier colors it. Text in the page
   background color reads on every fill in both themes (checked for 4.5:1). */
.badge {
    display: inline-block; font-size: var(--font-sm); font-weight: bold; padding: 2px var(--spacing-sm);
    border-radius: var(--radius-xl); white-space: nowrap;
    background: var(--color-text-muted); color: var(--color-bg);
}
/* A menu (graduate/_menu.html): the closed value opens a small list of
   options, loaded when first opened, over whatever is below. */
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-options {
    position: absolute; z-index: 50; top: calc(100% + var(--spacing-xs)); left: 0;
    display: flex; flex-direction: column; align-items: flex-start; gap: var(--spacing-xs);
    padding: var(--spacing-sm); background: var(--color-card); color: var(--color-text);
    border: 1px solid var(--color-border); border-radius: var(--radius-md);
}
.menu-right .menu-options { left: auto; right: 0; }  /* menus near a card's right edge */
.menu-row { display: flex; gap: var(--spacing-xs); }
.menu-option:disabled { cursor: default; opacity: 0.5; }  /* the current value */
.menu-text-option { padding: 1px var(--spacing-sm); }
.menu-text-option:hover:not(:disabled) { color: var(--color-accent-hover); }

/* Inline editing (graduate/_editable.html, _field_editor.html, inline-edit.js). */
.editable { white-space: pre-line; }  /* a note or summary keeps its line breaks */
.editable:hover { text-decoration: underline dotted var(--color-text-soft); }
.editable-empty { color: var(--color-text-muted); font-style: italic; font-size: var(--font-sm); }
.inline-editor { display: inline-flex; align-items: center; gap: var(--spacing-xs); width: 100%; }
.inline-editor-wide { display: flex; flex-wrap: wrap; }
/* The editor takes its cell: its input shrinks to fit, and the marks after the
   value (a professor's star and research link) stand aside until it closes. */
.inline-editor > :is(input, select) { flex: 1 1 auto; min-width: 0; }
.inline-editor ~ * { display: none; }
/* Controls that only matter while editing show when their row is hovered or
   holds focus: see-through rather than hidden, so the keyboard still reaches them. */
:is(tr, .tracker-contact, .tracker-facts) :is(.hover-only, .editable-empty) { opacity: 0; }
:is(tr, .tracker-contact, .tracker-facts):is(:hover, :focus-within) :is(.hover-only, .editable-empty),
:is(.hover-only, .editable-empty):focus-visible { opacity: 1; }
.primary-mark { color: var(--color-text); }
.primary-toggle { color: var(--color-text-muted); }
/* Professor rows read from the top; the rating chip (2em) is taller than a line of
   text, so pull it into the line rather than let it push the row's first line down. */
.tracker-member > td { vertical-align: top; }
.tracker-member .interest-wrap { margin-block: -0.3em; }

/* Application statuses (graduate/_status_badge.html), by status code. */
.badge-applying { background: var(--color-current); }
.badge-submitted { background: var(--color-highlight); color: var(--color-on-highlight); }
.badge-admitted, .badge-accepted_offer { background: var(--color-good); }
.badge-rejected { background: var(--color-warn); }
/* GRE policy (graduate/_gre_badge.html); not accepted stays gray. */
.badge-gre-required { background: var(--color-warn); }
.badge-gre-optional { background: var(--color-current); }
.badge-gre-not_required { background: var(--color-good); }
/* How much a faculty letter matters (graduate/_faculty_contact_badge.html):
   warm by adviser, the plain badge when central, outlined when discouraged. */
.badge-contact-adviser { background: var(--color-current); }
.badge-contact-discouraged {
    background: transparent; color: var(--color-text-muted); box-shadow: inset 0 0 0 1px var(--color-text-muted);
}

/* Typography */
.note { font-style: italic; color: var(--color-warn); }
.tiny-note { font-style: italic; font-size: var(--font-sm); }
.tiny-text { font-size: var(--font-sm); }
.small-text { font-size: var(--font-base); }
.description { font-family: "Lucida Sans", sans-serif; font-size: var(--font-md); }

/* Layout Utilities */
.center { text-align: center; }
.right-text-align { text-align: right; }
.indent { margin: 1em; }
.indent-lg { margin-left: var(--spacing-lg); }
.space-between { justify-content: space-between; }
.nowrap { white-space: nowrap; }
.margin-left-auto { margin-left: auto; }
.margin-left-md { margin-left: var(--spacing-md); }
.margin-left-lg { margin-left: var(--spacing-lg); }
.margin-right-sm { margin-right: var(--spacing-sm); }
.margin-right-md { margin-right: var(--spacing-md); }
.margin-lg { margin: var(--spacing-lg); }
.full-width { width: 100%; }
.align-normal { align-items: normal; }
.self-start { align-self: start; }
.fix { position: sticky; z-index: 99; }
.clickable { cursor: pointer; }

/* Flexbox */
.flex-row-wrap { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; }
.flex-row-nowrap { display: flex; flex-direction: row; align-items: center; }
.flex-column { display: flex; flex-direction: column; }

/* State Classes */
.presumed { color: var(--color-warn); }
.inactive { pointer-events: none; cursor: default; }
.speculative, .text-muted { color: var(--color-text-muted); }
.text-soft { color: var(--color-text-soft); }
.speculative:hover { color: var(--color-good-hover); }
.red { color: var(--color-warn); }
.yellow { color: var(--color-current); }
.green { color: var(--color-good); }

/* Navigation */
.navbar {
    background: var(--color-navbar); position: sticky; justify-content: space-around;
    top: 0; z-index: 100; padding: var(--spacing-sm);
}
.navbar-item { color: var(--color-navbar-text); text-decoration: none; font-size: var(--font-2xl); padding: var(--spacing-sm) var(--spacing-md); }
.navbar :is(a, button):hover { background: var(--color-navbar-text); color: var(--color-bg); border-radius: var(--radius-md); }
.naked-header { top: var(--top-below-navbar); padding-top: 7px; background: var(--color-bg); }

/* Titles */
.huge-title { font-weight: bold; font-size: var(--font-5xl); padding-left: var(--spacing-sm); margin-right: var(--spacing-lg); }
.big-title { font-size: var(--font-4xl); margin: var(--spacing-md); }
.title { font-size: var(--font-3xl); margin: 7px; }
.filter-control { margin: 0 var(--spacing-md); }

/* Tables */
thead.courses { position: sticky; z-index: 98; top: var(--top-below-title); background: var(--color-bg); }
table, table > thead > tr > th, table > tbody > tr > td {
    margin-bottom: 45px; vertical-align: top; padding: 7px 4px; border-collapse: collapse;
}
table > tbody > tr:nth-child(odd) > :is(td, th) { background: var(--color-surface); }

/* Courses */
.course-offerings { flex-wrap: wrap; max-height: 43px; }
.course-offering { font-style: italic; font-size: var(--font-base); padding: var(--spacing-xs); }
.course-interest { row-gap: 7px; }
.requirement { margin: var(--spacing-md); flex-basis: 25%; flex-grow: 1; }

/* Course Palette */
.course-palette { display: grid; grid-template-columns: repeat(auto-fill, 194px); }
.palette-item {
    display: grid; grid-template-columns: repeat(5, auto); grid-template-rows: 22px auto auto 28px;
    grid-template-areas: "number number number number areas" "main main main main areas"
        "offering offering offering offering offering" "major major major rating rating";
    border: 1px solid var(--color-accent); border-radius: var(--radius-lg);
    background: var(--color-surface); padding: var(--spacing-sm); margin: var(--spacing-sm);
    column-gap: 6px;
}
.palette-item-taken { border-color: var(--color-good); }
.palette-item-taken .palette-detail-number a { color: var(--color-good); }
.palette-item-taken .palette-item-offering:not(.speculative, .inactive) { color: var(--color-good); }

.palette-detail-number { grid-area: number; }
.palette-areas { grid-area: areas; font-size: var(--font-xs); width: min-content; justify-self: end; text-align: right; }
.palette-item-body { grid-area: main; font-size: var(--font-lg); font-style: italic; margin-bottom: 4px; }
.palette-item-offerings {
    grid-area: offering; display: grid; grid-template-rows: repeat(3, auto);
    gap: var(--spacing-xs); grid-auto-flow: column; max-height: 60px; padding: 3px; align-self: end;
}
.palette-item-offering { font-size: var(--font-sm); font-weight: bold; cursor: pointer; }
.palette-item-offering:hover { color: var(--color-good-hover); }
.palette-course-major { grid-area: major; align-self: end; }
.palette-course-average-rating { grid-area: rating; align-self: end; margin-left: auto; }

.divider { border-bottom: 1px solid var(--color-accent); }

/* Schedule & Plan */
.schedule-container { border-bottom: 1px solid var(--color-warn); padding-block: var(--spacing-md); }
.schedule { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.plan-requirements {
    display: grid; grid-template-columns: repeat(6, auto);
    border: 1px solid var(--color-accent); column-gap: 4px; padding: var(--spacing-xs);
}
.plan-major-requirements { grid-template-columns: repeat(4, auto); }
.plan-requirement-area { text-align: right; white-space: nowrap; }
.plan-requirement-credits { white-space: nowrap; }

/* Term/Quarter */
.term-quarter {
    border: 1px solid var(--color-accent); border-radius: var(--radius-md);
    background: var(--color-surface); margin: 3px; padding: var(--spacing-sm);
}
.term-quarter-complete { border-color: var(--color-good); }
.term-quarter-current { border-color: var(--color-current); }
.term-quarter-current .credits-oval { background: var(--color-current); }
.term-quarter-current .term-class-remove { color: var(--color-current); }
.term-quarter-current .term-class-remove:hover { color: var(--color-accent); }
.term-title { margin-inline: auto; color: var(--color-accent); }
.term-title-complete { color: var(--color-good); }
.term-title-current { color: var(--color-current); }

.term-class { background: var(--color-row); }
.term-class:nth-child(odd) { background: var(--color-row-alt); }
.term-class:first-of-type {
    background: var(--color-bg); border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    width: 100%; font-size: var(--font-base); font-weight: bold;
}
.term-class:last-of-type { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
/* The row being dragged (Sortable's ghostClass); listed after the rules above so it wins. */
.term-class.term-class-ghost { background: var(--color-highlight); color: var(--color-on-highlight); }
.term-class-number { margin-right: 3px; font-size: var(--font-xs); }
.term-class-title { width: 100%; font-style: italic; }
.term-class-speculative { color: var(--color-text-soft); }
.term-class-remove { margin-inline: var(--spacing-sm); color: var(--color-warn); cursor: pointer; }
.term-class-remove:hover { color: var(--color-accent); }

/* Admin/Django */
.related-widget-wrapper-5-columns { column-count: 5; float: left; overflow: hidden; }

/* Rating System */
.rating-list { list-style: none; }
.rating-list li { float: right; padding: var(--spacing-sm); }
.rating-list li:is(:hover, :hover ~ li) { color: var(--color-rating); }
.unchecked { color: transparent; }
.checked { color: var(--color-rating); }

/* Forms */
.form-container { margin: var(--spacing-lg); background: var(--color-field); padding: var(--spacing-md); }
.form-element { margin: var(--spacing-md); }

/* Graduate applications */
.tracker-table { width: 100%; margin: 0; }
/* Each application is a card with its own table; fixed layout on the shared
   columns (_faculty_cols.html) keeps every card and the headings aligned. */
.tracker-card {
    border: 1px solid var(--color-border); border-radius: var(--radius-lg);
    margin-block: var(--spacing-md);
}
/* Rounded by its corner cells, not by clipping, so a menu (the status menu)
   can open past the card's edge. Separate borders let a cell's corner round. */
.tracker-card > .tracker-table { border-collapse: separate; border-spacing: 0; }
/* The card's corners are its first and last rows' (a card may have several
   tbodies: a grad professor is one). Where the last row is a professor's
   log row, the bottom corners belong to the cells spanning down to it. */
.tracker-card > .tracker-table > tbody:first-of-type > tr:first-child > td:first-child { border-top-left-radius: var(--radius-lg); }
.tracker-card > .tracker-table > tbody:first-of-type > tr:first-child > td:last-child { border-top-right-radius: var(--radius-lg); }
.tracker-card > .tracker-table > tbody:last-of-type > tr:last-child > td:first-child { border-bottom-left-radius: var(--radius-lg); }
.tracker-card > .tracker-table > tbody:last-of-type > tr:last-child > td:last-child { border-bottom-right-radius: var(--radius-lg); }
.tracker-card > .tracker-table > tbody:last-of-type > tr.grad-log-row:last-child > td { border-radius: 0; }
.tracker-card > .tracker-table > tbody:last-of-type > tr:has(+ tr.grad-log-row:last-child) > td[rowspan]:first-child { border-bottom-left-radius: var(--radius-lg); }
.tracker-card > .tracker-table > tbody:last-of-type > tr:has(+ tr.grad-log-row:last-child) > td[rowspan]:last-child { border-bottom-right-radius: var(--radius-lg); }
.tracker-card > .tracker-table { table-layout: fixed; }
.tracker-col-gutter { width: var(--spacing-lg); }
.tracker-col-interest { width: 5em; }
.grad-col-professor { width: 20%; }
.grad-col-email { width: 22%; }
.grad-col-taking { width: 6em; }
.tracker-col-actions { width: 4.5em; }
.tracker-table > tbody > tr.tracker-header-row > td { background: var(--color-group); }
/* The application header's facts in fixed slots, so each lines up across
   cards whatever the title's length; a missing fact leaves its slot empty.
   GRE and the deadline sit on the right, each in a fixed slot too, so a
   longer date (Priority Dec 1, 2026) cannot shift the GRE badge. Widths fit
   the longest value a slot takes (Accepted offer, GRE not accepted); a
   long title wraps inside its slot. */
.grad-header-grid {
    display: grid; align-items: center; column-gap: var(--spacing-md); row-gap: var(--spacing-xs);
    grid-template-columns: 21em 7.5em 2.5em 1fr 9.5em 10.5em 11em 3.5em;
    grid-template-areas: "title status top . contact gre deadline actions"
                         "notes notes notes notes notes notes notes notes";
}
/* The add and remove icons share the grid's centering, so they line up with the date. */
.grad-h-actions { grid-area: actions; white-space: nowrap; justify-self: end; }
.grad-h-title { grid-area: title; }
.grad-h-status { grid-area: status; }
.grad-h-top { grid-area: top; }
.grad-h-gre { grid-area: gre; }
.grad-h-contact { grid-area: contact; }
.grad-h-deadline { grid-area: deadline; white-space: nowrap; justify-self: end; }
.grad-h-notes { grid-area: notes; }
/* The job tracker's employer card (industry/_target_card.html): the same idea,
   its own slots, so each fact lands in the same place on every card. */
.jobs-header-grid {
    display: grid; align-items: center; column-gap: var(--spacing-md); row-gap: var(--spacing-xs);
    grid-template-columns: 22em 12em 5.5em 6.5em 2.5em 6em 1fr 3.5em;
    grid-template-areas: "title sector place tie interest tier date actions" "notes notes notes notes notes notes notes notes";
}
.jobs-h-title { grid-area: title; }
.jobs-h-sector { grid-area: sector; }
.jobs-h-place { grid-area: place; }
.jobs-h-tie { grid-area: tie; }
.jobs-h-interest { grid-area: interest; }
.jobs-h-tier { grid-area: tier; }
.jobs-h-date { grid-area: date; white-space: nowrap; justify-self: end; }
.jobs-h-actions { grid-area: actions; white-space: nowrap; justify-self: end; }
.jobs-h-notes { grid-area: notes; }
/* An opening and a person under the card's header, each on fixed columns so they align across cards. */
.jobs-opening-row, .jobs-person-row { display: grid; align-items: baseline; column-gap: var(--spacing-md); }
.jobs-opening-row { grid-template-columns: minmax(14em, 1fr) 8em 10em 9em 7em 9em; }
.jobs-person-row { grid-template-columns: minmax(14em, 1fr) 14em 16em 9em; }
/* Where an employer is, and how Carleton knows it (the card's header badges). */
.badge-metro { background: var(--color-good); }
.badge-outstate { background: var(--color-current); }
.badge-tie { background: var(--color-highlight); color: var(--color-on-highlight); }
/* Job application statuses (industry), by status code; the grad ones above by theirs. */
.badge-job-applied { background: var(--color-highlight); color: var(--color-on-highlight); }
.badge-job-screening, .badge-job-interviewing { background: var(--color-current); }
.badge-job-offer, .badge-job-accepted_offer { background: var(--color-good); }
.badge-job-rejected, .badge-job-closed_no_reply { background: var(--color-warn); }
/* A letter's status (graduate/_draft_status.html); a plain draft keeps the default badge. */
.badge-letter-ready { background: var(--color-current); }
.badge-letter-sent { background: var(--color-good); }
/* A letter's changes (graduate/draft_diff.html). */
.diff-text del { color: var(--color-warn); }
.diff-text ins { color: var(--color-good); }
/* The indent: a narrow first column the header row spans and professor rows
   leave empty, in the page background (so the stripes start at the indent),
   with an accent rule down it from the header to the block's last row. */
.tracker-table .tracker-gutter { padding: 0; }  /* width: .tracker-col-gutter */
.tracker-table > tbody > tr.tracker-member > td.tracker-gutter {
    background: var(--color-bg); border-left: var(--rule-width) solid var(--color-accent);
}
/* In a card's last row the gutter cell carries the card's rounded corner, so
   the rule sweeps along the curve at the bottom: kept on purpose. */
/* A school's official colors (_application_block.html sets --school,
   --school-second and --school-text, the text color worked out for
   contrast): the header row, with a stripe of the second color along its
   foot (not text, so shown whatever its contrast), and the indent rule.
   The stripe is painted from the rule's width onward, so the primary runs
   unbroken from the header down into the rule. Badges and chips keep their
   colors, ringed so they stand out on any school color; an unconfirmed
   deadline keeps its "?". */
.tracker-card.school-colored > .tracker-table > tbody > tr.tracker-header-row > td {
    color: var(--school-text);
    background: linear-gradient(var(--school-second), var(--school-second))
                right bottom / calc(100% - var(--rule-width)) var(--rule-width) no-repeat,
                var(--school);
    padding-bottom: calc(var(--spacing-sm) + var(--rule-width));
}
.school-colored .tracker-header-row :is(a, .red, .inline-icon, .icon-button, .editable, .editable-empty) {
    color: var(--school-text);
}
.school-colored .tracker-header-row :is(.badge, .interest) { box-shadow: 0 0 0 2px var(--school-text); }
/* An outlined chip (below 4) is see-through; on a school color it gets the page behind it. */
.school-colored .tracker-header-row :is(.interest:not(.interest-high), .badge-contact-discouraged) { background: var(--color-bg); }
.school-colored > .tracker-table > tbody > tr.tracker-member > td.tracker-gutter { border-left-color: var(--school); }
/* A professor on an application card is a tbody of two rows (facts, then
   their contact log), striped as one: by tbody, not by row. The first tbody
   is the card's header, so the first professor is unstriped. */
.tracker-table > tbody.grad-professor > tr > td:not(.tracker-gutter) { background: none; }
.tracker-table > tbody.grad-professor:nth-of-type(odd) > tr > td:not(.tracker-gutter) { background: var(--color-surface); }
.taking-mark { font-size: var(--font-3xl); }
/* Under a professor, sections with their own headings: the contact log, then
   their key papers (graduate/_papers.html), each a list of rows. */
.grad-section + .grad-section { margin-top: var(--spacing-sm); }
.grad-section-title {
    font-weight: bold; color: var(--color-text-soft); border-bottom: 1px solid var(--color-text-muted);
    margin-bottom: var(--spacing-xs);
}
.paper-role { font-weight: bold; }
.inline-form { display: inline; }
.inline-form label { cursor: pointer; }
/* A control that is reachable but not seen: the file input inside its icon label. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.grad-log { display: flex; flex-direction: column; }
.grad-log-item { padding: var(--spacing-xs) var(--spacing-sm); }
/* An unsent letter in a professor's log: a bordered row of its own above the
   contacts, neutral in color but plain to see; the whole row opens it. */
.grad-log-draft {
    display: flex; align-items: center; gap: var(--spacing-sm); color: var(--color-text);
    border: 1px solid var(--color-text-muted); border-radius: var(--radius-md); background: var(--color-bg);
    padding: var(--spacing-xs) var(--spacing-sm); margin-bottom: var(--spacing-xs); text-decoration: none;
}
.grad-log-draft:hover { border-color: var(--color-text); }
/* The same rows on the letters page (graduate/letters.html), full size. */
.letters-row { font-size: var(--font-base); padding: var(--spacing-sm) var(--spacing-md); margin-bottom: var(--spacing-sm); }
/* The count of unsent letters at the top of the list: a bordered button-sized link to the letters page. */
.letters-count {
    color: var(--color-text); text-decoration: none; font-size: var(--font-xl); white-space: nowrap;
    border: 1px solid var(--color-text-muted); border-radius: var(--radius-md); padding: var(--spacing-xs) var(--spacing-md);
}
.letters-count:hover { border-color: var(--color-text); }
/* The rows of a list alternate; the "log contact" line below the log is not a row. */
.grad-log > .grad-log-item:nth-child(odd) { background: var(--color-row-alt); }
.grad-log-add { padding: var(--spacing-xs) var(--spacing-sm); }
/* Hovering anywhere on a professor shows all their hover controls, the log's "log contact" too. */
.grad-professor:is(:hover, :focus-within) :is(.hover-only, .editable-empty) { opacity: 1; }
/* A color's swatch (_color_value.html sets --swatch). */
.swatch {
    display: inline-block; width: 1em; height: 1em; vertical-align: middle;
    background: var(--swatch); border: 1px solid var(--color-border); border-radius: var(--radius-sm);
}
.tracker-add > summary { color: var(--color-accent); margin-block: var(--spacing-sm); }
.tracker-table-section { text-align: left; padding-top: var(--spacing-lg); color: var(--color-accent); }
.tracker-header-facts { column-gap: var(--spacing-md); }
/* An interest rating (_interest.html): a round chip sized in em, so it scales with its text. */
.interest {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2em; height: 2em; padding-inline: 2px; box-sizing: border-box;
    border: 2px solid currentColor; border-radius: 1em; font-size: var(--font-base); font-weight: bold;
}
.interest-high { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.interest-mid { color: var(--color-accent); }
.interest-low { color: var(--color-text-muted); }
.interest-none { border-color: transparent; color: var(--color-text-muted); }
/* The provisional mark sits just right of the chip, level with its top, out
   of the flow, so a chip with one lines up with a chip without; it touches
   neither the chip nor the row above. */
.interest-wrap { position: relative; display: inline-block; }
.interest-provisional {
    position: absolute; top: 0; left: calc(100% + var(--spacing-xs));
    color: var(--color-text-soft); font-size: var(--font-sm);
    background: var(--color-bg); border-radius: 50%;
}
.tracker-add { column-gap: var(--spacing-sm); margin-block: var(--spacing-md); }
/* A requirement's document versions (_checklist_panel.html): one grid, so the
   version, date and location line up from row to row, the new-version inputs
   included; each row is display: contents so its cells join the grid. */
.checklist-versions {
    display: grid; grid-template-columns: auto minmax(8em, max-content) max-content 1fr auto;
    align-items: center; gap: var(--spacing-xs) var(--spacing-md);
}
.checklist-versions > .checklist-version { display: contents; }
:is(.tracker-table, .tracker-panel) :is(input[type="text"], input[type="email"], input[type="url"], textarea) {
    width: 100%; box-sizing: border-box;
}
/* Text boxes grow with their text (inline-edit.js), so none needs a scrollbar or a resize handle. */
textarea { overflow-y: hidden; resize: none; }
:is(.tracker-table, .tracker-panel, .tracker-add) :is(input:not([type="checkbox"]), textarea) {
    margin-block: var(--spacing-xs); background: var(--color-field); color: var(--color-text);
    border: 1px solid var(--color-border); font: inherit;
}
.tracker-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); column-gap: var(--spacing-lg); }
.tracker-panel { margin-block: var(--spacing-md) var(--spacing-lg); }
.tracker-facts {
    display: grid; grid-template-columns: max-content 1fr; gap: var(--spacing-sm) var(--spacing-md);
    margin: var(--spacing-md) 0;
}
.tracker-facts > :nth-child(odd) { color: var(--color-text-soft); }
.tracker-contact { border-top: 1px solid var(--color-border); padding-block: var(--spacing-md); }
.tracker-contact-form { margin-block: var(--spacing-md); }
