/* GradSail: soft pastel cards on a dotted white page, black pill controls, big bold numbers.
   Pastels carry meaning: lavender = credits, mist blue = GPA, blush = requirements still to plan. */
:root {
  --page: #ffffff; --dots: #e3e4e8;
  --card: #f4f4f6; --card-2: #ececef; --white: #ffffff;
  --ink: #000000; --text: #1c1c1f; --muted: #73767d; --line: #e4e4e8;
  --lav: #eef0fd; --lav-ink: #a7b1f6; --lav-deep: #5c68c9;
  --mist: #e7eff4; --mist-ink: #b6c9d5; --mist-deep: #4f6b7c;
  --blush: #fbebf1; --blush-ink: #f3b9cc; --blush-deep: #b04a6d;
  --st-done: var(--lav-ink); --st-prog: var(--blush-ink); --st-plan: var(--mist-ink);
  --accent: #000000; --accent-ink: #ffffff; --dash: #c9cbe0; --school-dot: transparent;
  --r-xl: 30px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --font: "Urbanist", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
/* School colors: the main tint, block colors and active controls follow the school you track.
   University of Tampa: red, gold and cream. UCF: black and gold. Other schools keep the pastels. */
html[data-school="ut"] {
  /* University of Tampa palette: red #981c26, gold #e0c389, cream #f2e5d2, black */
  --lav: #f7efe3; --lav-ink: #981c26; --lav-deep: #7c1620;
  --mist: #f0e1bd; --mist-ink: #e0c389; --mist-deep: #74592a;
  --st-done: #981c26; --st-prog: #e0c389; --st-plan: #e3d4bd;
  --accent: #981c26; --accent-ink: #ffffff; --dash: #d6c3a3; --school-dot: #981c26;
}
html[data-school="ut"] { --blush: #efe3d1; --blush-ink: #e0c389; --blush-deep: #981c26; }
html[data-school="ucf"] { --blush: #e9e4d6; --blush-ink: #969897; --blush-deep: #6f5a2c; }
html[data-school="usf"] { --blush: #e9eee5; --blush-ink: #7b8d71; --blush-deep: #3d4a37; }
html[data-school="ucf"] {
  /* UCF palette: black, gold #e0c389, white, gray #969897 */
  --lav: #f6efe0; --lav-ink: #e0c389; --lav-deep: #6f5a2c;
  --mist: #eeefef; --mist-ink: #969897; --mist-deep: #4c4e4d;
  --st-done: #e0c389; --st-prog: #000000; --st-plan: #c9cbca;
  --accent: #000000; --accent-ink: #e0c389; --dash: #d5c49d; --school-dot: #e0c389;
}
html[data-school="usf"] {
  /* USF palette: white flour #f5f2e7, naturel #d9d0bd, palace green #7b8d71, salamander #323e3e, black forest green #272f2c, gold #c0b283 */
  --lav: #f5f2e7; --lav-ink: #7b8d71; --lav-deep: #4b5a44;
  --mist: #ece6d6; --mist-ink: #c0b283; --mist-deep: #66592f;
  --st-done: #7b8d71; --st-prog: #323e3e; --st-plan: #d9d0bd;
  --accent: #272f2c; --accent-ink: #c0b283; --dash: #cbc3ac; --school-dot: #7b8d71;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); font: 500 16px/1.55 var(--font);
  background-color: var(--page);
  background-image: radial-gradient(var(--dots) 1.1px, transparent 1.3px); background-size: 22px 22px;
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); }
[hidden] { display: none !important; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; display: grid; gap: 18px; }

/* ---------- Type ---------- */
h1 { font: 300 clamp(44px, 7vw, 76px)/0.98 var(--font); letter-spacing: -0.035em; margin: 0; color: var(--ink); }
h1 strong { font-weight: 700; }
h2 { font: 700 22px/1.2 var(--font); letter-spacing: -0.015em; margin: 0; color: var(--ink); }
h3 { font: 700 18px/1.25 var(--font); margin: 0; }
.sub { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.5; max-width: 560px; }
.note { font-size: 14px; color: var(--muted); }
.fine { font-size: 12.5px; color: var(--muted); text-align: center; margin: 8px 0 0; }
.error { color: var(--blush-deep); }

/* ---------- Header ---------- */
header { display: grid; gap: 18px; padding: 6px 0 8px; }
.eyebrow-top { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; justify-self: start;
  background: var(--card); border-radius: 999px; padding: 8px 8px 8px 18px; font-size: 14px; font-weight: 600; color: var(--text); }
.eyebrow-top:not(:has(.hdr-edit:not([hidden]))) { padding-right: 18px; }
#hdr-school::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: var(--school-dot); vertical-align: 0; }
html:not([data-school="ut"]):not([data-school="ucf"]):not([data-school="usf"]) #hdr-school::before { display: none; }
.hdr-edit { border: 0; background: var(--white); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 600 13px var(--font); cursor: pointer; }
.hdr-edit:hover { background: var(--ink); color: var(--white); }
.acct { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); min-height: 36px; }
.acct button, .auth-links button { border: 0; background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 600 13px var(--font); cursor: pointer; }
.acct button:hover, .auth-links button:hover { background: var(--card-2); }

/* ---------- Tabs: pills ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; white-space: nowrap; text-decoration: none; padding: 13px 24px; border-radius: 999px; background: var(--card);
  color: var(--text); font: 600 15px var(--font); transition: background .15s; }
.tab:hover { background: var(--card-2); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
#view-find, #view-tracker, #view-reqs { display: grid; gap: 18px; }

/* ---------- Cards ---------- */
.panel { background: var(--card); border-radius: var(--r-xl); padding: 28px; display: grid; gap: 16px; min-width: 0; }
.panel.tone-lav { background: var(--lav); }
.panel.tone-mist { background: var(--mist); }
.panel.tone-blush { background: var(--blush); }
.grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; }
.grid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 860px) { .grid, .grid.even { grid-template-columns: minmax(0, 1fr); } }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.icon { width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--white); display: grid; place-items: center; }
.icon svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.titled { display: flex; align-items: center; gap: 14px; }

/* ---------- Forms ---------- */
label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
textarea, input, select { font: 500 15px/1.4 var(--font); color: var(--text); background: var(--white); border: 1.5px solid transparent;
  border-radius: var(--r-sm); padding: 12px 14px; width: 100%; }
textarea { resize: vertical; min-height: 120px; }
input::placeholder, textarea::placeholder { color: #a3a6ac; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--ink); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
select { -webkit-appearance: none; appearance: none; padding-right: 34px !important; text-overflow: ellipsis; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 10px 6px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.15fr) minmax(0, 1.15fr); gap: 12px; }
@media (max-width: 520px) { .row, .row3 { grid-template-columns: 1fr; } }
.tform { display: grid; gap: 14px; }
.check { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14.5px; color: var(--text); font-weight: 500; }
.check input { width: auto; accent-color: var(--ink); }
.check .note { flex-basis: 100%; margin-left: 24px; }
.hint { font-size: 13px; color: var(--muted); font-weight: 500; min-height: 1em; }
.hint.filled { color: var(--lav-deep); }
.hint a { color: var(--ink); }

/* ---------- Buttons: pills ---------- */
button { font: 600 15px var(--font); border-radius: 999px; padding: 13px 24px; cursor: pointer; border: 1.5px solid var(--ink); }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.primary:hover { filter: brightness(1.12); }
.ghost, .btnlink { background: var(--white); color: var(--ink); border-color: var(--white); }
.ghost:hover, .btnlink:hover { border-color: var(--ink); }
.small { padding: 9px 16px; font-size: 13.5px; }
button:disabled { opacity: .5; cursor: wait; }
.btnlink { display: inline-block; text-decoration: none; border: 1.5px solid var(--white); border-radius: 999px; font: 600 13.5px var(--font); padding: 9px 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--ink); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ut-link, .course-link { color: var(--ink); text-decoration: underline; text-decoration-color: #c3c5cb; text-underline-offset: 3px; }
.ut-link:hover, .course-link:hover { text-decoration-color: var(--ink); }
.x { border: 0; background: none; color: var(--muted); padding: 4px 8px; font-size: 18px; line-height: 1; }
.del { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 0; background: var(--card); color: var(--muted); font-size: 18px; line-height: 1; display: grid; place-items: center; }
.del:hover { background: var(--ink); color: var(--white); }

/* ---------- Big numbers and the segmented bar ---------- */
.sum-top { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px 16px; }
.big { font: 700 clamp(64px, 11vw, 96px)/0.9 var(--font); letter-spacing: -0.045em; color: var(--ink); font-variant-numeric: tabular-nums; }
.of { font: 500 17px var(--font); color: var(--muted); margin-left: 6px; }
/* Twenty rounded blocks (drawn by the tracker); empty blocks are dashed outlines. */
.bar { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 6px; height: 64px; }
.bar span { display: block; height: 100%; border-radius: 14px; }
.bar .seg-empty { border: 1.5px dashed var(--dash); }
.bar.slim { display: flex; gap: 0; height: 10px; border-radius: 999px; background: var(--white); overflow: hidden; }
.bar.slim span { border-radius: 0; }
@media (max-width: 560px) { .bar { gap: 3px; height: 44px; } .bar span { border-radius: 8px; } }
.seg-done, .k.done { background: var(--st-done); }
.seg-prog, .k.prog { background: var(--st-prog); }
.seg-plan, .k.plan { background: var(--st-plan); }
.keys { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; color: var(--text); }
.keys span { display: inline-flex; align-items: center; background: var(--white); padding: 7px 14px; border-radius: 999px; }
.k { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }

/* ---------- Pills and chips ---------- */
.pill { font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap; background: var(--white); color: var(--text); }
.pill.met { background: var(--white); color: var(--text); }
.pill.track { background: var(--lav); color: var(--lav-deep); }
.pill.short { background: var(--ink); color: var(--white); }
.chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--card); color: var(--text); white-space: nowrap; }
.chip.abroad { background: var(--mist); color: var(--mist-deep); }
.chip.transfer { background: var(--card-2); color: var(--text); }
.tag { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--white); }
.tag.gap { background: var(--blush); color: var(--blush-deep); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { display: inline-block; min-width: 34px; text-align: center; padding: 3px 9px; border-radius: 999px; color: var(--white); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.banner { font-size: 14px; font-weight: 500; padding: 14px 18px; border-radius: var(--r-md); background: var(--blush); color: var(--text); }
.ok { font-size: 14px; padding: 12px 16px; border-radius: var(--r-md); background: var(--lav); color: var(--lav-deep); font-weight: 600; }
.empty { color: var(--muted); text-align: center; padding: 64px 12px; }

/* ---------- My degree ---------- */
.deg-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
@media (max-width: 700px) { .deg-row { grid-template-columns: minmax(0, 1fr); } }
.minors { display: grid; gap: 8px; justify-items: start; }
.minors .lbl { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.minor-list { display: grid; gap: 8px; width: 100%; }
.minor-item { display: flex; gap: 6px; align-items: center; }
.minor-item input { flex: 1; }
.pmark { font-size: 14px; font-weight: 700; color: var(--blush-deep); width: 18px; text-align: center; }
.pmark.known { color: var(--lav-deep); }

/* ---------- GPA ---------- */
.gpa-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .gpa-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gtile { border-radius: var(--r-lg); padding: 18px; display: grid; gap: 4px; background: var(--white); align-content: start; }
.gtile .gl { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.gtile .gv { font: 700 44px/1 var(--font); letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.gtile .gs { font-size: 12.5px; color: var(--muted); }
.gtile.warn { background: var(--blush); }
.gtile.warn .gv { color: var(--blush-deep); }
.gpa-goal { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; padding: 16px; background: rgba(255, 255, 255, .6); border-radius: var(--r-lg); }
.gpa-goal label { display: grid; gap: 6px; }
.reg-note { font-size: 14px; color: var(--text); padding-bottom: 11px; }
.reg-note strong { color: var(--ink); }

/* ---------- Graduation checks ---------- */
.chk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
details.chk { display: block; background: var(--white); border-radius: var(--r-md); margin-bottom: 8px; }
details.chk > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: center; padding: 14px 16px; cursor: pointer; }
details.chk > summary::-webkit-details-marker { display: none; }
details.chk > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
details.chk[open] > summary::after { transform: rotate(45deg); }
.chk-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.chk-num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chk-body { padding: 0 16px 16px; display: grid; gap: 8px; font-size: 13.5px; }
.chk-body p { margin: 0; }
.chk-body .why { color: var(--muted); }
.chk-body ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.chk-body .todo { color: var(--blush-deep); font-weight: 700; }

/* ---------- Course autocomplete and pickers ---------- */
.combo { position: relative; display: block; }
.suggest, .pick-pop, .addas-pop { background: var(--white); border-radius: var(--r-md); box-shadow: 0 18px 50px rgba(20, 20, 30, .14), 0 2px 6px rgba(20, 20, 30, .06); }
.suggest { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; max-height: 300px; overflow-y: auto; }
.suggest li { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; color: var(--text); font-size: 14.5px; }
.suggest li .sc { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.suggest li .sgt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest li .scr { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--card); }
.school-suggest { max-height: 340px; }
.school-suggest .grp { padding: 10px 12px 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: default; }
.school-suggest .grp:hover { background: none; }
.sbadge { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.sbadge.saved { color: var(--lav-deep); font-weight: 700; }

/* ---------- Degree requirements ---------- */
.rq-list { display: grid; gap: 18px; }
.rq-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.rq-head h2 { font-size: 26px; letter-spacing: -0.02em; }
.rq-kind { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.rq-group { display: grid; gap: 6px; background: var(--white); border-radius: var(--r-lg); padding: 14px; }
.rq-gh { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; color: var(--ink); padding: 0 4px 4px; }
.rq-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; background: var(--card); border-radius: var(--r-sm); }
.rq-c { flex: 1 1 200px; }
.rq-c { display: grid; min-width: 0; font-size: 14.5px; }
.rq-r { display: flex; gap: 8px; align-items: center; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.rq-st { font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.rq-st.done { background: var(--lav); color: var(--lav-deep); }
.rq-st.prog { background: var(--blush); color: var(--blush-deep); }
.rq-st.plan { background: var(--mist); color: var(--mist-deep); }
.rq-st.need { background: var(--ink); color: var(--white); }
.rq-notes { margin: 0; padding: 4px 0 0 18px; font-size: 13.5px; color: var(--muted); display: grid; gap: 4px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 0; background: var(--white); color: var(--text); font: 600 13px var(--font); cursor: pointer; }
.opt span { color: var(--lav-deep); }
.opt:hover { background: var(--card-2); }
.pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pick-field { position: relative; flex: 1 1 280px; min-width: 0; }
.pick-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left;
  background: var(--card); border: 1.5px solid transparent; color: var(--muted); font: 500 14.5px var(--font); padding: 11px 14px; border-radius: var(--r-sm); }
.pick-btn.chosen { color: var(--ink); font-weight: 600; }
.pick-btn:hover { border-color: var(--ink); }
.pick-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-caret { color: var(--ink); font-size: 12px; }
.pick-pop { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); padding: 8px; display: grid; gap: 6px; }
.pick-search { padding: 10px 12px; font-size: 14px; background: var(--card); }
.pick-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.pick-list li { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; font-size: 14.5px; }
.pick-list li:hover { background: var(--card); }
.pick-list li .sc { font-weight: 700; white-space: nowrap; }
.pick-list li .sgt { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick button:disabled { opacity: .4; cursor: default; }
.addas { position: relative; display: inline-block; }
.addas .addas-btn { background: var(--white); border-color: var(--white); }
.addas .addas-btn:hover:not(:disabled) { border-color: var(--ink); }
.rq-row .addas .addas-btn { background: var(--white); }
.addas-btn .caret { font-size: 10px; margin-left: 6px; }
.addas-pop { position: absolute; z-index: 40; right: 0; top: calc(100% + 6px); min-width: 180px; list-style: none; margin: 0; padding: 6px; }
.addas-pop li { padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; font-size: 14.5px; font-weight: 600; white-space: nowrap; text-align: left; }
.addas-pop li:hover, .addas-pop li:focus { background: var(--card); outline: none; }
.addas-pop .hd { font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: default; padding: 6px 12px 4px; }
.addas-pop .hd:hover { background: none; }

/* ---------- My courses ---------- */
.secs { display: grid; gap: 22px; }
.sec { display: grid; gap: 10px; }
.sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sec-h h3 { display: flex; align-items: center; gap: 4px; font-size: 19px; }
.sec-h .k { width: 12px; height: 12px; }
.reg { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; padding: 16px; background: var(--white); border-radius: var(--r-lg); }
.reg label { display: grid; gap: 6px; }
.reg input { width: auto; background: var(--card); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 10px; vertical-align: middle; }
th { font-weight: 600; font-size: 13px; color: var(--muted); }
.tt tr:not(.term-row) td { background: var(--white); }
.tt tr:not(.term-row) td:first-child { border-radius: var(--r-md) 0 0 var(--r-md); padding-left: 16px; }
.tt tr:not(.term-row) td:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; padding-right: 12px; }
.tt td select { padding: 7px 10px; font-size: 13.5px; width: auto; background-color: var(--card); border-radius: 10px; background-position: right 10px center; padding-right: 28px !important; }
.tt select.grade { min-width: 70px; }
.term-row td { padding: 10px 4px 0; font-weight: 700; font-size: 14px; color: var(--ink); }
.term-row td span { color: var(--muted); font-weight: 500; }
.cname { font-weight: 700; color: var(--ink); }
.cname a { text-decoration: none; }
.cname a:hover { text-decoration: underline; }
.empty-row td { color: var(--muted); font-size: 13.5px; padding: 8px 4px; background: none !important; }
.ex td { opacity: .55; }
/* Narrow screens: each course becomes a card, name on top, controls underneath. */
@media (max-width: 720px) {
  .table-wrap:has(.tt) { overflow-x: visible; }
  .tt, .tt tbody { display: block; width: 100%; }
  .tt tr:not(.term-row) { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center;
    padding: 14px; margin-bottom: 8px; background: var(--white); border-radius: var(--r-lg); }
  .tt tr:not(.term-row) td { padding: 0 !important; border-radius: 0 !important; min-width: 0; }
  .tt tr:not(.term-row) td:first-child { grid-column: 1 / -1; }
  .tt tr:not(.term-row) td:empty { display: none; }
  .tt tr:not(.term-row) td select { width: 100%; }
  .tt .term-row, .tt .term-row td { display: block; }
  .tt .term-row td { padding: 6px 4px 8px; }
}

/* ---------- Abroad finder ---------- */
.req { background: var(--white); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 12px; }
.req-name { font-size: 13px; font-weight: 700; color: var(--muted); }
.score-box { display: grid; justify-items: center; gap: 4px; width: 68px; text-align: center; }
.score-word { font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.score { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); font: 700 17px var(--font); font-variant-numeric: tabular-nums; }
.score.good, .dot.good { background: var(--lav-ink); color: var(--ink); }
.score.warn, .dot.warn { background: var(--mist-ink); color: var(--ink); }
.score.bad, .dot.bad { background: var(--blush-ink); color: var(--ink); }
.none { background: var(--card); color: var(--muted); }
.good-t { color: var(--lav-deep); } .warn-t { color: var(--mist-deep); } .bad-t { color: var(--blush-deep); } .none-t { color: var(--muted); }
.legend { font-size: 12.5px; color: var(--muted); }
.why-score { margin-top: 6px; font-size: 13.5px; }
.why-score summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.bd { display: grid; gap: 4px; margin-top: 8px; padding: 12px; background: var(--card); border-radius: var(--r-sm); }
.bd-row { display: flex; justify-content: space-between; gap: 10px; }
.bd-pts { font-weight: 700; font-variant-numeric: tabular-nums; }
.cand { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.ctitle { font: 700 17px/1.25 var(--font); margin: 0; color: var(--ink); }
.meta { font-size: 13.5px; color: var(--muted); }
.linkline { margin-top: 4px; font-size: 14.5px; }
.why { margin: 4px 0 0; font-size: 14.5px; }
.detail { display: grid; gap: 10px; padding-top: 12px; border-top: 1.5px dashed var(--line); }
.prq { margin-top: 10px; display: grid; gap: 6px; }
.prq-h { font-size: 13px; font-weight: 700; color: var(--muted); }
.prq-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 12px; background: var(--card); border-radius: var(--r-sm); font-size: 14px; }
.prq-txt { display: grid; min-width: 0; }
.st { flex: none; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.st.met { background: var(--lav); color: var(--lav-deep); } .st.missing { background: var(--ink); color: var(--white); } .st.unsure { background: var(--mist); color: var(--mist-deep); }
.flag { font-size: 13.5px; padding: 9px 13px; border-radius: var(--r-sm); background: var(--card); }
.log { font-size: 13.5px; color: var(--muted); display: grid; gap: 2px; }
.log div::before { content: "› "; color: var(--ink); }
pre { white-space: pre-wrap; font: 14px/1.5 var(--font); background: var(--white); border-radius: var(--r-sm); padding: 14px; margin: 0; max-height: 260px; overflow: auto; }
.school-info { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin-top: -6px; }
.school-info .tagline { padding: 5px 12px; border-radius: 999px; background: var(--white); color: var(--ink); font-weight: 600; }
.school-info .tagline.saved { background: var(--lav); color: var(--lav-deep); }
.school-info .linkbtn { font-size: 13.5px; }
.req-box { display: grid; gap: 12px; padding: 16px; background: var(--white); border-radius: var(--r-lg); }
.req-box input { background: var(--card); }
.req-admin { display: grid; gap: 6px; }
.req-admin li { font-size: 13.5px; }
.searchlog { font-size: 13.5px; color: var(--muted); }
.searchlog summary { cursor: pointer; }

/* ---------- "Coming soon" for schools without full support ---------- */
.soon { display: none; }
html.lite .soon-find, html.noreqs .soon-reqs { display: grid; }
html.lite .full-only, html.noreqs .reqs-only { display: none !important; }

/* ---------- Sign-in and setup ---------- */
.auth { position: fixed; inset: 0; z-index: 100; overflow-y: auto; display: grid; place-items: center; padding: 32px 16px;
  background-color: var(--page); background-image: radial-gradient(var(--dots) 1.1px, transparent 1.3px); background-size: 22px 22px; }
.auth-card { width: 100%; max-width: 440px; background: var(--card); border-radius: 36px; padding: 36px 32px; display: grid; gap: 18px; }
.auth-card .eyebrow-top { background: var(--white); padding: 7px 16px; font-size: 13px; }
.auth-card h2 { font: 300 44px/1 var(--font); letter-spacing: -0.03em; margin: 0; }
.auth-card .sub { font-size: 15.5px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card button[type=submit], .auth-card #auth-guest { width: 100%; }
.auth-card select { width: 100%; }
.auth-links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.auth-links button { background: var(--white); }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1.5px solid var(--line); }
.auth-msg { font-size: 14px; margin: 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--white); color: var(--text); }
.auth-msg.err { background: var(--blush); color: var(--blush-deep); }
.auth-msg[hidden], .auth-card [hidden] { display: none !important; }
.auth-fine { font-size: 12.5px; color: var(--muted); margin: 0; text-align: center; line-height: 1.5; }
@media (max-width: 480px) { .auth-card { padding: 28px 22px; border-radius: 30px; } .auth-card h2 { font-size: 38px; } }

/* ---------- Desktop app check (Claude app only) ---------- */
.diag { font-size: 13.5px; color: var(--muted); display: grid; gap: 10px; }
.diag > summary { cursor: pointer; text-align: center; font-size: 13px; font-weight: 600; list-style: none; }
.diag > summary::-webkit-details-marker { display: none; }
.diag[open] { background: var(--card); border-radius: var(--r-xl); padding: 20px 24px; }
.diag-out { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text); }
.diag-out .r { font-weight: 700; }
.diag-out .r.pass { color: var(--lav-deep); } .diag-out .r.fail { color: var(--blush-deep); } .diag-out .r.wait { color: var(--muted); }
.diag-out code { font-size: 12px; color: var(--muted); word-break: break-word; }

/* ---------- Website-only bits ---------- */
.web-only { display: none; }
html.web .web-only { display: block; }
html.web #diag, html.web label[for="live"] { display: none !important; }
.site-foot { max-width: 1120px; margin: 36px auto 24px; padding: 0 16px; font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.6; }
.test-banner { background: var(--ink); color: var(--white); font: 600 13px/1.4 var(--font); text-align: center; padding: 9px 16px; border-radius: 999px;
  max-width: 1120px; margin: 0 auto 10px; }

@media (max-width: 560px) {
  body { padding-top: 16px; }
  .panel { padding: 20px; border-radius: 26px; }
  .tab { padding: 11px 18px; font-size: 14px; }
  .big { font-size: 64px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Profile form and Settings ---------- */
.pf { display: grid; gap: 14px; }
.pf-group { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
.pf-group + .pf-group { padding-top: 16px; border-top: 1.5px solid var(--line); }
.pf-group legend { float: left; width: 100%; }
.pf-group legend + * { clear: both; }
.pf-group legend { font: 700 15px var(--font); color: var(--ink); padding: 0; margin-bottom: 10px; }
.auth-card .pf-group legend { margin-bottom: 8px; }
.optional { font-weight: 500; color: #9a9da3; }
#onboard .auth-card { max-width: 560px; }
.acct-link { color: var(--ink); background: var(--card); border-radius: 999px; padding: 8px 14px; font: 600 13px var(--font); text-decoration: none; }
.acct-link:hover { background: var(--card-2); }
.danger { color: var(--blush-deep) !important; }
.danger:hover { border-color: var(--blush-deep) !important; }
.actions .auth-msg { padding: 8px 12px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center;
  overflow: hidden; font: 700 11px var(--font); flex: none; margin-left: -8px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 72px; height: 72px; font-size: 24px; margin: 0; }
.avatar-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar-pick .note { flex-basis: 100%; }
.file-btn { position: relative; display: inline-flex; align-items: center; cursor: pointer; background: var(--white); color: var(--ink); border: 1.5px solid var(--white);
  border-radius: 999px; padding: 9px 16px; font: 600 13.5px var(--font); }
.file-btn:hover { border-color: var(--ink); }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-btn:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
#hdr-school::before { display: none; }

/* Settings: a sidebar of sections and one white panel */
.settings { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings[hidden] { display: none !important; }
@media (max-width: 820px) { .settings { grid-template-columns: minmax(0, 1fr); } }
.st-side { background: var(--card); border-radius: var(--r-xl); padding: 20px; display: grid; gap: 6px; position: sticky; top: 16px; }
@media (max-width: 820px) { .st-side { position: static; } }
.st-side-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1.5px solid var(--line); }
.st-side-head h2 { font: 300 30px/1 var(--font); letter-spacing: -0.03em; }
.st-back { width: 40px; height: 40px; border-radius: 50%; background: var(--white); display: grid; place-items: center; flex: none; }
.st-back:hover { background: var(--ink); }
.st-back:hover svg { stroke: var(--white); }
.st-back svg, .st-ico svg, .pw-eye svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.st-group { margin: 12px 4px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.st-nav { display: grid; gap: 4px; }
@media (max-width: 820px) { .st-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-nav button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 18px;
  padding: 8px 10px; font: 600 16px var(--font); color: var(--text); }
.st-nav button:hover { background: var(--card-2); }
.st-nav button[aria-current="page"] { background: var(--lav); color: var(--ink); }
.st-ico { width: 38px; height: 38px; border-radius: 12px; background: var(--white); display: grid; place-items: center; flex: none; }
.st-nav button[aria-current="page"] .st-ico { background: var(--accent); }
.st-nav button[aria-current="page"] .st-ico svg { stroke: var(--accent-ink); }
.st-main { background: var(--white); border-radius: var(--r-xl); padding: 8px 32px 28px; box-shadow: 0 1px 0 var(--line), 0 0 0 1.5px var(--card) inset; min-width: 0; }
@media (max-width: 560px) { .st-main { padding: 4px 18px 22px; } }
.st-head { padding: 22px 0 18px; border-bottom: 1.5px solid var(--line); }
.st-head h2 { font-size: 24px; }
.st-head p, .st-sec-head p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.st-sec { display: grid; gap: 14px; padding: 22px 0; border-bottom: 1.5px solid var(--line); }
.st-sec:last-of-type { border-bottom: 0; }
.st-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.st-sec-head h3 { font-size: 16.5px; }
.st-sec:has(> .st-sec-head:only-child) { gap: 0; }
.st-main input, .st-main select { background: var(--card); }
.st-main .ghost, .st-main .file-btn { background: var(--white); border-color: var(--line); }
.st-main .ghost:hover, .st-main .file-btn:hover { border-color: var(--ink); }
.st-pic { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.st-pic .avatar.big { width: 84px; height: 84px; font-size: 28px; }
#st-photo-note:empty { display: none; }
.st-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.st-inline label { flex: 1 1 260px; }
.st-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding-top: 18px; flex-wrap: wrap; }
.pw { position: relative; display: block; }
.pw input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; }
.pw-eye:hover { background: var(--white); }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span[aria-hidden] { position: absolute; inset: 0; border-radius: 999px; background: var(--card-2); transition: background .15s; }
.switch span[aria-hidden]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#st-open { width: auto; min-width: 220px; }
.avatar-icon { width: 55%; height: 55%; fill: none; stroke: var(--accent-ink); stroke-width: 1.6; stroke-linecap: round; }
.acct-link { display: inline-flex; align-items: center; gap: 8px; }
.acct-link .avatar { margin-left: -6px; width: 24px; height: 24px; font-size: 10px; }
/* Settings is a page of its own */
html.on-settings .wrap > header, html.on-settings .tabs, html.on-settings .acct, html.on-settings .wrap > .fine, html.on-settings .diag { display: none !important; }
html.on-settings .settings { margin-top: 8px; }
.st-nav button:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }
.st-empty { margin: 0; padding: 14px 16px; background: var(--card); border-radius: var(--r-md); }

/* Continue with Google */
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-bottom: 10px; }
.google-btn svg { flex: none; }
.google-btn[hidden] { display: none; }

/* Abroad results: room between the summary pieces and the matches */
#results > h2 { margin: 0 0 16px; }
#results > .ok, #results > .legend, #results > .banner { margin: 0 0 16px; line-height: 1.55; }
#results > .legend { margin-top: -4px; }
#results > .banner { padding: 18px 22px; }
#results > .req { margin-top: 20px; }
.school-info:empty { display: none; }
