/* Styled to the UMassD web brand: blue #003764, navy bars, gold #feC24d,
   link #2c5da7, Bebas Neue display + Soleil-like body. */
:root {
  --umd-blue: #003764;     /* dominant brand blue */
  --umd-navy: #032038;     /* main menu bar */
  --umd-navy-2: #002e53;   /* utility bar */
  --umd-link: #2c5da7;     /* link blue */
  --umd-gold: #feC24d;     /* brand gold */
  --umd-gold-deep: #d98a00;/* gold readable on white */

  --bg: #eef1f6;
  --panel: #ffffff;
  --panel-2: #eef2f7;
  --line: #d3dae6;
  --line-soft: #e4e9f1;
  --text: #2a3340;
  --text-dim: #586577;
  --text-faint: #889;
  --accent: var(--umd-link);
  --radius: 11px;
  --shadow: 0 4px 14px rgba(12, 34, 64, 0.10);
  --shadow-lg: 0 10px 26px rgba(12, 34, 64, 0.18);

  --body-font: "Soleil", "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display-font: "Bebas Neue", "Soleil", "Mulish", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
}

/* ---- Top bar (UMassD navy) ------------------------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: linear-gradient(180deg, var(--umd-navy-2), var(--umd-navy));
  border-bottom: 3px solid var(--umd-gold);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: baseline; gap: 11px; }
.brand-mark {
  font-family: var(--display-font);
  font-size: 28px;
  line-height: 1;
  letter-spacing: 1px;
  color: #fff;
}
.brand-sub {
  font-family: var(--display-font);
  letter-spacing: 1px;
  color: var(--umd-gold);
  font-size: 19px;
}

.controls { display: flex; align-items: center; gap: 14px; }
.setup-btn {
  font-family: var(--body-font); font-size: 14px; font-weight: 600;
  background: #fff; color: var(--umd-blue);
  border: 1px solid #25456d; border-radius: 7px; padding: 8px 14px; cursor: pointer;
  transition: background 0.18s ease;
}
.setup-btn:hover { background: #eef4fb; }

.setup-backdrop { position: fixed; inset: 0; background: rgba(8, 24, 46, 0.32); z-index: 70; animation: fade-in 0.18s ease; }
.setup-menu {
  position: fixed; top: 60px; right: 22px; z-index: 71;
  width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 16px; display: flex; flex-direction: column; gap: 9px;
  transform-origin: top right; animation: pop-in 0.18s ease;
}
.setup-menu[hidden], .setup-backdrop[hidden] { display: none; }
.setup-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.setup-menu h3 { margin: 0; font-family: var(--display-font); font-size: 20px; letter-spacing: 0.6px; color: var(--umd-blue); }
.setup-clear { background: none; border: 0; color: #b42318; font-size: 11px; font-weight: 600; cursor: pointer; padding: 2px; }
.setup-clear:hover { text-decoration: underline; }
.setup-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-dim); }
.setup-field select { font-family: var(--body-font); font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--umd-blue); background: #fff; }
.setup-opt { font-family: var(--body-font); font-size: 13px; font-weight: 600; text-align: left; background: #f6f8fb; color: var(--umd-blue); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; transition: border-color 0.16s ease; }
.setup-opt:hover { border-color: var(--umd-link); }
.setup-opt.danger { color: #b42318; background: #fdf3f2; }
.setup-opt.danger:hover { border-color: #d9534f; }
.setup-done { font-family: var(--body-font); font-size: 13px; font-weight: 700; background: var(--umd-blue); color: #fff; border: 0; border-radius: 8px; padding: 9px 12px; cursor: pointer; margin-top: 2px; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---- Meta row + legend ---------------------------------------------------- */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 14px 24px 4px;
  font-size: 13px;
  color: var(--text-dim);
}
.meta-row .title {
  font-family: var(--display-font);
  letter-spacing: 0.8px;
  color: var(--umd-blue);
  font-size: 26px;
  line-height: 1;
}
.build-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.build-btn {
  font-family: var(--body-font); font-size: 14px; font-weight: 700;
  background: var(--umd-blue); color: #fff; border: 0; border-radius: 8px;
  padding: 9px 16px; cursor: pointer; transition: background 0.18s ease, transform 0.12s ease;
}
.build-btn:hover { background: #024a85; transform: translateY(-1px); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 24px 14px; }
.legend .item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-dim); }
.legend .swatch { width: 12px; height: 12px; border-radius: 3px; }

/* ---- Board (vertical positioned canvas) ----------------------------------- */
.board-scroll { overflow: auto; padding: 10px 24px 28px; }
.board { position: relative; margin: 0; }
.edges {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* ---- Course cards / nodes ------------------------------------------------- */
.card {
  position: relative;
  background: color-mix(in srgb, var(--cat, var(--line)) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--cat, var(--line)) 32%, #fff);
  border-radius: var(--radius);
  padding: 11px 13px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}
.node { position: absolute; z-index: 2; }
.node:hover { z-index: 5; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .code {
  font-weight: 800;
  font-size: 15px;
  color: color-mix(in srgb, var(--cat, var(--umd-blue)) 70%, #15151c);
  text-decoration: none;
  letter-spacing: 0.2px;
}
.card .code:hover { text-decoration: underline; }
.card .code.placeholder { color: var(--text-dim); font-weight: 700; }
.card .cr-badge { font-size: 12px; color: var(--text-faint); flex: 0 0 auto; font-weight: 600; }
.card .title { font-size: 13px; color: var(--text-dim); margin-top: 4px; line-height: 1.4; }

.card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}
.card .foot-l { display: flex; align-items: center; gap: 6px; min-width: 0; }
.card .sem { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.card .term {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #2f7d22;
  background: #eaf6e6;
  border: 1px solid #bfe3b4;
  border-radius: 999px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* requirement placeholder: a blank outline where a class should go */
.node.ghost { background: transparent; border: 2px dashed var(--cat); box-shadow: none; }
.node.ghost:hover { transform: none; box-shadow: var(--shadow); }
.node.ghost.filled { background: #fff; border-style: solid; }
.ghost-title { font-weight: 700; font-size: 13px; color: var(--cat); }
.ghost-sub { font-size: 11px; color: var(--text-faint); margin-top: 5px; }
.ghost-input { width: 100%; margin-top: 7px; font-family: var(--body-font); font-size: 12px; padding: 5px 7px; border: 1px solid var(--cat); border-radius: 6px; color: var(--umd-blue); }
.node.ghost .node-check { display: flex; }
.node.ghost.filled .node-check { background: #2f9e44; border-color: #fff; color: #fff; }

/* ---- Semester divider bands ---------------------------------------------- */
.band {
  position: absolute;
  left: 0;
  height: 0;
  border-top: 1px dashed #c2ccdb;
  z-index: 0;
  pointer-events: none;
}
.band-label {
  position: absolute;
  top: -10px;
  left: 0;
  background: var(--bg);
  padding: 0 10px 0 2px;
  font-family: var(--display-font);
  font-size: 14px;
  letter-spacing: 0.7px;
  color: #8794a8;
  white-space: nowrap;
}

/* ---- Focus highlighting --------------------------------------------------- */
.board.has-focus .card { opacity: 0.3; }
.board.has-focus .card.near { opacity: 1; z-index: 8; }
.board.has-focus .edges { z-index: 4; }

/* completion tutorial */
.board.tutorial .card { opacity: 0.18; }
.board.tutorial .edges { opacity: 0.08; }
.board.tutorial .card.tut-target { opacity: 1; z-index: 30; box-shadow: 0 0 0 3px var(--umd-gold), var(--shadow-lg); }
.tutorial-tip {
  position: fixed; z-index: 90;
  background: var(--umd-blue); color: #fff;
  padding: 9px 13px; border-radius: 9px;
  font-size: 13px; font-weight: 600; max-width: 200px; line-height: 1.35;
  box-shadow: var(--shadow-lg);
  display: none;
}
.tutorial-tip.show { display: block; animation: pop-in 0.2s ease; }
.tut-arrow { position: absolute; bottom: -7px; right: 26px; width: 14px; height: 14px; background: var(--umd-blue); transform: rotate(45deg); }
.card.hl-1up { box-shadow: 0 0 0 4px #2c5da7, var(--shadow); }
.card.hl-1down { box-shadow: 0 0 0 4px #e8730c, var(--shadow); }
.card.hl-2up { box-shadow: 0 0 0 4px #2f9e44, var(--shadow); }
.card.hl-2down { box-shadow: 0 0 0 4px #d9342b, var(--shadow); }
.card.focus { box-shadow: 0 0 0 4px var(--umd-blue), var(--shadow-lg); }

.node.opened { box-shadow: 0 0 0 3px var(--umd-blue), var(--shadow-lg); }

/* completed: fill with the course colour, invert text */
.node.completed { background: var(--cat); border-color: var(--cat); }
.node.completed .code,
.node.completed .title,
.node.completed .cr-badge,
.node.completed .sem { color: #fff; }
.node.completed .term { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.45); color: #fff; }

/* always-present completion circle, top-right of every course */
.node-check {
  position: absolute;
  top: -10px; right: -10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  color: transparent;
  border: 2px solid var(--line);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 7;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s cubic-bezier(.3,1.4,.5,1);
}
.node-check:hover { border-color: #2f9e44; transform: scale(1.12); }
.node.completed .node-check { background: #2f9e44; border-color: #fff; color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }

/* ---- Edges ---------------------------------------------------------------- */
/* `> path` so these never touch the marker arrowheads nested in defs>marker,
   whose inline fill would otherwise be overridden by fill:none. */
.edges > path { fill: none; stroke: #93a2bb; stroke-width: 1.9; opacity: 0.95; transition: opacity 0.2s ease, stroke 0.2s ease, stroke-width 0.2s ease; }
.board.has-focus .edges > path { opacity: 0.18; }
.edges > path.lit, .board.has-focus .edges > path.lit { opacity: 1; stroke-width: 3; }
.edges > path.lit-1up, .board.has-focus .edges > path.lit-1up { stroke: #2c5da7; }
.edges > path.lit-1down, .board.has-focus .edges > path.lit-1down { stroke: #e8730c; }
.edges > path.lit-2up, .board.has-focus .edges > path.lit-2up { stroke: #2f9e44; }
.edges > path.lit-2down, .board.has-focus .edges > path.lit-2down { stroke: #d9342b; }
/* Origin dot at each line's source, sized like the arrowhead, drawn above all
   lines so nothing crosses it; colour and dim follow the edge it belongs to. */
.edges > circle { fill: #93a2bb; opacity: 0.95; transition: opacity 0.2s ease, fill 0.2s ease; }
.board.has-focus .edges > circle { opacity: 0.18; }
.edges > circle.lit, .board.has-focus .edges > circle.lit { opacity: 1; }
.edges > circle.lit-1up, .board.has-focus .edges > circle.lit-1up { fill: #2c5da7; }
.edges > circle.lit-1down, .board.has-focus .edges > circle.lit-1down { fill: #e8730c; }
.edges > circle.lit-2up, .board.has-focus .edges > circle.lit-2up { fill: #2f9e44; }
.edges > circle.lit-2down, .board.has-focus .edges > circle.lit-2down { fill: #d9342b; }
.edges > circle.ghost-dot { opacity: 0.6; }
.board.has-focus .edges > circle.ghost-dot { opacity: 0.14; }
.edges > path.crossing { stroke-dasharray: 2 4; stroke-linecap: round; }
.edges > path.ghost-edge { stroke-dasharray: 5 5; opacity: 0.6; }
.board.has-focus .edges > path.ghost-edge { opacity: 0.14; }
.edges > path.coreq { stroke: var(--umd-gold-deep); stroke-width: 1.8; stroke-dasharray: 4 4; opacity: 0.8; }
.board.has-focus .edges > path.coreq { opacity: 0.12; }

/* ---- Standalone (no-prerequisite) requirements ---------------------------- */
#standalone { padding: 6px 24px 30px; }
#standalone:empty { display: none; }
#standalone h3 {
  margin: 0 0 12px;
  font-family: var(--display-font);
  font-size: 20px;
  letter-spacing: 0.6px;
  color: var(--umd-blue);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
#standalone h3 span {
  font-family: var(--body-font);
  font-weight: 400;
  font-size: 12px;
  color: var(--text-faint);
  text-transform: none;
  letter-spacing: 0;
}
.req-list { display: flex; flex-direction: column; gap: 8px; max-width: 920px; }

.req-group {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--cat);
  border-radius: 9px;
  overflow: hidden;
}
.req-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--body-font);
  color: var(--text);
}
.req-head:hover { background: #f6f8fb; }
.req-swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--cat); flex: 0 0 auto; }
.req-name { font-weight: 700; font-size: 14px; color: var(--umd-blue); }
.req-count {
  font-weight: 800;
  font-size: 12px;
  color: var(--cat);
  background: color-mix(in srgb, var(--cat) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--cat) 35%, #fff);
  border-radius: 999px;
  padding: 1px 8px;
}
.req-cr { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.req-hint { font-size: 11px; color: var(--text-faint); font-style: italic; }
.req-picks { display: flex; flex-wrap: wrap; gap: 5px; }
.req-picks .pick {
  font-size: 11px;
  font-weight: 700;
  color: var(--cat);
  text-decoration: none;
  background: color-mix(in srgb, var(--cat) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--cat) 30%, #fff);
  border-radius: 5px;
  padding: 1px 6px;
}
.req-picks .pick:hover { text-decoration: underline; }
.req-chev { margin-left: auto; color: var(--text-faint); transition: transform 0.15s; }
.req-group.open .req-chev { transform: rotate(90deg); }

.req-body { display: none; padding: 4px 14px 14px; border-top: 1px solid var(--line-soft); }
.req-group.open .req-body { display: block; }
.req-note { margin: 10px 0 12px; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }

.chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.chip:hover { border-color: var(--cat); }
.chip.on {
  border-color: var(--cat);
  background: color-mix(in srgb, var(--cat) 9%, #fff);
  box-shadow: inset 0 0 0 1px var(--cat);
}
.chip.on::before { content: "✓"; color: var(--cat); font-weight: 800; font-size: 12px; }
.chip-code { font-weight: 800; font-size: 12px; color: var(--cat); flex: 0 0 auto; }
.chip-title { font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; }
.chip-term {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 700;
  color: #2f7d22;
  background: #eaf6e6;
  border: 1px solid #bfe3b4;
  border-radius: 999px;
  padding: 1px 6px;
  white-space: nowrap;
}
.chip-link { flex: 0 0 auto; margin-left: 4px; color: var(--text-faint); text-decoration: none; font-size: 12px; }
.chip-link:hover { color: var(--umd-link); }
.chip.extra { border-style: dashed; }              /* scheduled but not on the curated approved list */
.chip.extra .chip-code { opacity: 0.85; }

.req-live {
  font-size: 11px;
  color: #2f7d22;
  margin: 6px 0 12px;
  font-weight: 600;
}

.req-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.req-status { font-size: 11px; color: var(--text-faint); margin-right: auto; }
.req-save {
  background: var(--umd-blue);
  color: #fff;
  border: 0;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--body-font);
  cursor: pointer;
}
.req-save:hover { background: #024a85; }
.req-link { font-size: 12px; font-weight: 600; color: var(--umd-link); text-decoration: none; display: inline-block; margin-top: 4px; }
.req-link:hover { text-decoration: underline; }

/* ---- Schedule builder right panel ----------------------------------------- */
.builder-confirm { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); animation: fade-in 0.2s ease; }

.builder-panel {
  position: fixed; top: 0; right: 0; height: 100%;
  width: 440px; max-width: 92vw;
  background: #fff;
  border-left: 4px solid var(--umd-gold);
  box-shadow: -6px 0 26px rgba(12, 34, 64, 0.22);
  z-index: 60; padding: 18px 20px 30px; overflow-y: auto;
  transform: translateX(104%);
  transition: transform 0.3s cubic-bezier(.2, .8, .2, 1);
}
.builder-panel.open { transform: translateX(0); }
.panel-title { font-family: var(--display-font); font-size: 24px; letter-spacing: 0.6px; color: var(--umd-blue); margin: 4px 0 12px; }
.builder-panel .drawer-close { left: auto; right: 14px; }

.builder-controls { display: flex; flex-wrap: wrap; gap: 18px; margin: 12px 0; }
.builder-controls label { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 7px; }
.builder-controls select, .builder-controls input {
  font-family: var(--body-font);
  font-size: 13px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--umd-blue);
  background: #fff;
}
.builder-controls input { width: 64px; }
.builder-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-faint); font-weight: 700; margin: 12px 0 7px; }

.sched-list { display: flex; flex-direction: column; gap: 6px; }
.sched-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--cat);
  border-radius: 7px;
}
.sched-item .code { font-weight: 800; font-size: 13px; color: var(--cat); text-decoration: none; flex: 0 0 auto; }
.sched-item .code:hover { text-decoration: underline; }
/* middle shrinks so code (#) and cr-badge stay pinned together on one line */
.sched-mid { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.sched-item .sched-title { font-size: 12px; color: var(--text-dim); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-item .cr-badge { flex: 0 0 auto; }
.builder-empty { font-size: 12px; color: var(--text-faint); }
.builder-hint { font-size: 12px; color: var(--text-dim); margin: 10px 0 4px; }
.sched-meta { font-size: 11px; color: var(--text-faint); white-space: nowrap; flex: 0 0 auto; }

.builder-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 10px 0 4px; }
.builder-top label { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.builder-top select, .builder-controls select, .builder-controls input, .q-ctl select, .q-ctl input, .pt-secsel, .ta-input {
  font-family: var(--body-font); font-size: 12px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--umd-blue); background: #fff;
}
.ta-input { width: 100%; max-width: 340px; }
.mode-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mode-toggle button { font-family: var(--body-font); font-size: 12px; font-weight: 700; padding: 6px 16px; border: 0; background: #fff; color: var(--text-dim); cursor: pointer; }
.mode-toggle button.on { background: var(--umd-blue); color: #fff; }
.chk { font-size: 12px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }

/* manual mode tiles */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ptile { border: 1px solid var(--line); border-left: 4px solid var(--cat); border-radius: 8px; padding: 8px 10px; cursor: pointer; background: #fff; transition: box-shadow 0.16s, opacity 0.16s; }
.ptile:hover { box-shadow: var(--shadow); }
.ptile.sel { background: color-mix(in srgb, var(--cat) 10%, #fff); box-shadow: inset 0 0 0 2px var(--cat); }
.ptile.conflict { opacity: 0.5; }
.ptile.unmet { border-style: dashed; }
.pt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pt-code { font-weight: 800; font-size: 13px; color: var(--cat); }
.pt-title { font-size: 11px; color: var(--text-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-sec { font-size: 11px; color: var(--umd-blue); font-weight: 600; margin-top: 4px; }
.pt-note { font-size: 10px; color: var(--text-faint); font-style: italic; margin-top: 4px; }
.pt-secsel { margin-top: 6px; width: 100%; }

/* schedule reminder: this course still needs its other (lecture/lab) component */
.lab-reminder { display: block; width: 100%; text-align: left; margin-top: 6px; padding: 8px 11px; font-size: 12px; font-weight: 600; color: var(--umd-gold-deep); background: #fff8e9; border: 1px solid #f0d79a; border-radius: 7px; cursor: pointer; transition: background 0.15s; }
.lab-reminder:hover { background: #fdefce; }
.comp-fixed { font-size: 12px; font-weight: 700; color: var(--umd-blue); }
.elec-add { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.elec-ctl { font-family: var(--body-font); font-size: 12px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--umd-blue); background: #fff; }
.elec-warn { font-size: 12px; color: #b45309; background: #fff5e6; border: 1px solid #f5d9a8; border-radius: 6px; padding: 6px 9px; }
.elec-detail { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; animation: fade-in 0.2s ease; }
.elec-detail.conflict { border-color: #f3c1bd; background: #fdf3f2; }
.elec-d-title { font-weight: 700; font-size: 13px; color: var(--umd-blue); }
.elec-d-row { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.elec-d-warn { font-size: 12px; color: #b42318; margin-top: 4px; }
.elec-d-actions { display: flex; gap: 8px; margin-top: 10px; }
.elec-ok { font-family: var(--body-font); font-size: 12px; font-weight: 700; padding: 6px 14px; border: 0; border-radius: 7px; background: #2f9e44; color: #fff; cursor: pointer; }
.elec-ok:disabled { background: #b9c2cf; cursor: not-allowed; }
.elec-no { font-family: var(--body-font); font-size: 12px; font-weight: 700; padding: 6px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text-dim); cursor: pointer; }

/* radial (radio) groups + question wizard */
.radials { display: flex; flex-wrap: wrap; gap: 8px; }
.radial { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; cursor: pointer; transition: border-color 0.16s ease, background 0.16s ease; }
.radial:hover { border-color: var(--umd-link); }
.radial input { accent-color: var(--umd-blue); }
.radial.sm { padding: 3px 8px; font-size: 11px; }
.imp-radials { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.imp-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-faint); }
/* the one-at-a-time question is a self-contained cell so it reads as its own step */
.wizard { animation: fade-in 0.22s ease; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.wiz-progress { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--umd-blue); font-weight: 800; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.wizard .q-label { font-size: 16px; }
.wiz-nav { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sched-x { background: none; border: 0; color: var(--text-faint); cursor: pointer; font-size: 12px; padding: 0 2px; flex: 0 0 auto; }
.sched-x:hover { color: #b42318; }

/* auto mode questionnaire */
.q-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.q { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.q.col { flex-direction: column; align-items: flex-start; gap: 7px; }
/* each question in the edit-all list is its own cell too */
.q-list .q { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; box-shadow: var(--shadow); }
.q-label { font-size: 13px; color: var(--text); font-weight: 600; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--body-font); font-size: 11px; font-weight: 700; color: var(--text-dim); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.tag.on { color: #fff; background: var(--umd-blue); border-color: var(--umd-blue); }

.result-card { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-top: 10px; }
.result-head { display: flex; align-items: center; justify-content: space-between; }
.result-head .builder-lbl { margin: 0; }
.result-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.badge-pref { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.badge-pref.ok { color: #1c7a32; background: #e7f6ea; }
.badge-pref.no { color: #b42318; background: #fdeceb; }
.req-save.sm { padding: 4px 10px; font-size: 11px; }

.builder-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.tool-btn { font-family: var(--body-font); font-size: 12px; font-weight: 600; padding: 6px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--umd-blue); cursor: pointer; }
.tool-btn:hover { border-color: var(--umd-blue); }
.tool-btn.on { background: var(--umd-blue); color: #fff; }
.tool-msg { font-size: 12px; color: #2f7d22; font-weight: 600; align-self: center; }
.compare-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.compare-col { border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.compare-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: var(--umd-blue); font-size: 13px; }

/* ---- Course info drawer --------------------------------------------------- */
.drawer {
  position: fixed;
  top: 0; left: 0;
  width: 360px; max-width: 88vw;
  height: 100%;
  background: #fff;
  border-right: 4px solid var(--umd-gold);
  box-shadow: 6px 0 26px rgba(12, 34, 64, 0.22);
  z-index: 60;
  padding: 20px 22px 28px;
  overflow-y: auto;
  transform: translateX(-104%);
  transition: transform 0.28s cubic-bezier(.2, .8, .2, 1);
}
.drawer.open { transform: translateX(0); }
.drawer-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 18px; color: var(--text-faint); cursor: pointer; }
.drawer-close:hover { color: var(--umd-blue); }
.drawer-head { display: flex; align-items: baseline; gap: 10px; border-left: 4px solid var(--cat); padding-left: 10px; margin-top: 8px; }
.drawer-code { font-family: var(--display-font); font-size: 27px; letter-spacing: 0.5px; color: var(--cat); }
.drawer-cr { font-size: 13px; color: var(--text-faint); font-weight: 600; }
.drawer-title { font-size: 17px; color: var(--umd-blue); margin: 8px 0 4px; }
.drawer-terms { font-size: 12px; color: #2f7d22; font-weight: 700; margin-bottom: 10px; }
.drawer-desc { font-size: 13px; color: var(--text-dim); line-height: 1.55; }
.drawer-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-faint); font-weight: 700; margin: 16px 0 8px; }
.drawer-section { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin-bottom: 8px; }
.ds-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ds-name { font-weight: 700; font-size: 13px; color: var(--umd-blue); }
.ds-status { font-size: 10px; font-weight: 700; text-transform: uppercase; border-radius: 999px; padding: 1px 7px; }
.ds-status.open { color: #1c7a32; background: #e7f6ea; }
.ds-status.closed { color: #b42318; background: #fdeceb; }
.ds-row { display: flex; gap: 8px; font-size: 12px; padding: 1px 0; }
.ds-k { color: var(--text-faint); min-width: 74px; flex: 0 0 auto; }
.ds-v { color: var(--text); }
.drawer-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--umd-link); text-decoration: none; }
.drawer-link:hover { text-decoration: underline; }

/* ---- Footer --------------------------------------------------------------- */
.footnote {
  padding: 18px 24px 36px;
  font-size: 12px;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  line-height: 1.6;
}
.footnote a { color: var(--umd-link); }
.footnote b { color: var(--text-dim); }
.footnote kbd {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--text-dim);
}

/* ---- Wide screens: use the extra room ------------------------------------- */
@media (min-width: 1400px) {
  .meta-row { font-size: 14px; }
  .meta-row .title { font-size: 30px; }
  .meta-row .pill { font-size: 13px; padding: 5px 14px; }
  .legend .item { font-size: 13px; }
  .builder-title { font-size: 22px; }
  .req-name { font-size: 15px; }
  .sched-item .code { font-size: 14px; }
  .sched-item .sched-title { font-size: 13px; }
  .band-label { font-size: 15px; }
  .footnote { font-size: 13px; }
}

/* ---- Mobile --------------------------------------------------------------- */
@media (max-width: 680px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .brand-mark { font-size: 23px; }
  .brand-sub { font-size: 16px; }
  .controls { width: 100%; }
  .select-wrap select { width: 100%; }

  .meta-row, .legend { padding-left: 16px; padding-right: 16px; }
  .meta-row .title { font-size: 21px; }
  .builder, .req-list { margin-left: 16px; margin-right: 16px; }
  #standalone, .board-scroll, .footnote { padding-left: 16px; padding-right: 16px; }

  .req-group .req-head { flex-wrap: wrap; }
  .chip-grid, .standalone-grid { grid-template-columns: 1fr; }
  .builder-controls { flex-direction: column; gap: 10px; align-items: stretch; }
  .builder-controls input { width: 100%; }
  .sched-item .sched-title { display: none; }

  .band-label { font-size: 12px; }
}
