/* MP-DTE B.Tech predictor — "Academic Precision" design system (mobile-first, no framework). */
:root {
  --surface: #f7f9fc; --card: #ffffff; --card-2: #f2f4f7;
  --ink: #191c1e; --muted: #434653; --faint: #747685;
  --line: #e2e8f0; --line-2: #c4c6d5;
  --brand: #1f4fbf; --brand-dk: #00379c; --brand-fixed: #dbe1ff; --brand-on-fixed: #003daa;
  --accent: #006c49; --accent-bg: #e6f5ec;
  --safe: #0e9f6e; --safe-bg: #e7f7ef;
  --moderate: #b97f0a; --moderate-bg: #fdf6e3;
  --reach: #d4540f; --reach-bg: #fdeee4;
  --unreach: #64748b; --unreach-bg: #eef1f4;
  --radius: 1rem; --radius-md: .75rem; --radius-sm: .5rem;
  --shadow: 0 4px 20px rgba(31, 79, 191, .05); --shadow-2: 0 6px 24px rgba(31, 79, 191, .09);
  --sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font: 16px/1.6 var(--body); letter-spacing: -0.005em;
}
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .brand { font-family: var(--sans); font-weight: 700; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.faint, .sub { color: var(--faint); }
.sub { display: block; font-size: 11px; font-weight: 400; }
.num, table.results td.num, .num * { font-variant-numeric: tabular-nums; }

/* ---- sticky nav with blur ---- */
.site-nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(247, 249, 252, .82); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 14px; min-height: 64px; flex-wrap: wrap; }
.brand { font-weight: 800; color: var(--brand-dk); font-size: 19px; margin-right: auto; }
.brand:hover { text-decoration: none; }
.nav-toggle { display: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 20px; padding: 4px 12px; cursor: pointer; }
.nav-links { display: flex; gap: 2px; flex-wrap: wrap; }
.nav-links a { padding: 9px 13px; border-radius: var(--radius-sm); color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { background: var(--brand-fixed); color: var(--brand-dk); text-decoration: none; }

main.container { padding-top: 28px; padding-bottom: 56px; }
.page-title { margin: 0 0 4px; font-size: 30px; font-weight: 800; }
.page-subtitle { margin: 0 0 22px; color: var(--muted); font-size: 16px; }

/* ---- hero / home ---- */
.hero { padding: 14px 0 6px; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); font-weight: 800; margin: 12px 0 10px; line-height: 1.1; }
.lead { font-size: 18px; color: var(--muted); max-width: 64ch; }
.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; }
.cta { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; color: var(--ink); box-shadow: var(--shadow); transition: transform .1s ease, box-shadow .1s ease; }
.cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); text-decoration: none; border-color: var(--brand); }
.cta-k { display: block; font-size: 13px; color: var(--faint); font-weight: 600; }
.cta-v { display: block; font-family: var(--sans); font-size: 21px; font-weight: 700; color: var(--brand-dk); margin: 6px 0; }
.cta-alt .cta-v { color: var(--accent); }
.cta-s { display: block; font-size: 13.5px; color: var(--muted); }
.cta-ghost { box-shadow: none; background: transparent; border-style: dashed; font-weight: 600; color: var(--brand-dk); padding: 16px 20px; }
.cta-ghost .cta-v, .cta-ghost { font-family: var(--sans); }
.explainer { margin-top: 30px; }
.explainer h2 { font-size: 22px; }

/* ---- forms ---- */
.predict-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.primary-input { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.primary-input .f-group { flex: 1 1 160px; min-width: 0; }
.f-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.f-group label { font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
input, select { font: 16px var(--body); padding: 12px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); transition: border-color .1s, box-shadow .1s; }
.f-group input, .f-group select { width: 100%; min-width: 0; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-fixed); }
.btn-primary { font-family: var(--sans); background: var(--brand); color: #fff; border: 0; border-radius: var(--radius-md);
  min-height: 52px; padding: 0 22px; font-weight: 700; font-size: 15.5px; cursor: pointer; transition: background .1s; }
.btn-primary:hover { background: var(--brand-dk); }
.hint { font-size: 13px; margin: 8px 0 0; }
.filters-wrap { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.filters-wrap summary { cursor: pointer; font-weight: 700; font-family: var(--sans); color: var(--brand-dk); padding: 8px 0; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 14px; }
.filters-standalone { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.f-group-check { justify-content: flex-end; }
.f-group-tfw { grid-column: 1 / -1; align-self: end; }
.f-group-check .f-check {
  display: flex; align-items: flex-start; gap: 8px; flex-wrap: nowrap; min-height: 44px;
  font-size: 14px; font-weight: 500; line-height: 1.35; letter-spacing: 0; text-transform: none;
  color: var(--ink); cursor: pointer;
}
.f-group-check .f-check strong { font-weight: 700; }
.f-check-text { min-width: 0; }
.f-check .pool { flex: 0 0 auto; margin-left: 2px; margin-top: 1px; }
.f-check input[type="checkbox"], .sim-group-toggle input[type="checkbox"], .hist-filters label.chk input[type="checkbox"] {
  width: 16px; height: 16px; min-width: 16px; flex: 0 0 auto;
  margin: 2px 0 0; padding: 0; border-radius: 3px; cursor: pointer; accent-color: var(--brand);
}

/* ---- banners / caveats ---- */
.caveat { background: var(--moderate-bg); border: 1px solid #f0d98a; border-left: 4px solid var(--moderate);
  border-radius: var(--radius-md); padding: 12px 15px; font-size: 13.5px; margin: 16px 0; color: #6b4e08; }
.banner { border-radius: var(--radius-md); padding: 12px 15px; font-size: 14px; margin: 0 0 16px; }
.banner-info { background: var(--brand-fixed); border: 1px solid #bcd0ff; color: var(--brand-dk); }
.data-error { background: var(--reach-bg); border: 1px solid #f0c4ad; color: #8a2f0c; padding: 15px; border-radius: var(--radius-md); }

/* ---- results ---- */
.results-area { margin-top: 14px; }
.result-summary { font-size: 15px; margin: 10px 0 14px; }
.result-summary strong { font-family: var(--sans); }
.rank-est { background: var(--accent-bg); border: 1px solid #b9e0c8; border-radius: var(--radius-md); padding: 12px 16px; }
.empty { color: var(--muted); padding: 16px 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
table.results { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
table.results th, table.results td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.results thead th { background: var(--card-2); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-family: var(--body); font-weight: 700; }
table.results td.num, table.results th.num { text-align: right; white-space: nowrap; }
table.results tbody tr { border-left: 3px solid transparent; }
table.results tbody tr:hover { background: #fafbff; }
.row-safe { border-left-color: var(--safe); }
.row-moderate { border-left-color: var(--moderate); }
.row-reach { border-left-color: var(--reach); }
.row-unreachable td { color: var(--faint); }
.tfw { color: var(--accent); font-size: 12px; font-weight: 600; }
.fee-v { font-weight: 700; color: var(--brand-dk); white-space: nowrap; }
.fee-v .sub { color: var(--faint); font-weight: 500; }
.pool { font-size: 11px; border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 8px; margin-left: 4px; white-space: nowrap; }
.pool-f { background: #fce7f3; border-color: #f5b6d3; color: #9d174d; }
.pool-tfw { background: var(--accent-bg); border-color: #9ed7bb; color: var(--accent); font-weight: 700; }
details.unreachable { margin-top: 16px; }
details.unreachable summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; font-weight: 600; }

/* ---- pill badges ---- */
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 999px; font-family: var(--body); }
.tag-safe { background: var(--safe-bg); color: var(--safe); }
.tag-moderate { background: var(--moderate-bg); color: var(--moderate); }
.tag-reach { background: var(--reach-bg); color: var(--reach); }
.tag-unreachable { background: var(--unreach-bg); color: var(--unreach); }

/* ---- college cards (explorer) ---- */
.college-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px; }
.college-card h3 { margin: 0 0 2px; font-size: 16.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px 9px; font-size: 12.5px; }
.chip em { color: var(--brand-dk); font-style: normal; font-weight: 700; }
.co-fee { margin: 8px 0 0; font-size: 13.5px; }
.co-fee .fee-v .sub { display: inline; margin-left: 3px; }

/* ---- dashboard / accuracy ---- */
.dash-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 20px; }
.dash-block h2 { margin: 0 0 2px; font-size: 20px; }
.chart-box { position: relative; margin-top: 14px; }
.accuracy-area { margin: 14px 0; }
.accuracy-area h2 { font-size: 20px; margin: 24px 0 8px; }
.yr-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 16px; }
.yr-chip { font-size: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 9px; background: var(--card); font-variant-numeric: tabular-nums; }
.yr-chip b { margin-left: 5px; }
.yr-chip.tag-safe { background: var(--safe-bg); color: var(--safe); border-color: #b9e0c8; }
.yr-chip.tag-moderate { background: var(--moderate-bg); color: var(--moderate); border-color: #f0d98a; }
.yr-chip.tag-reach { background: var(--reach-bg); color: var(--reach); border-color: #f0c4ad; }

/* content pages: narrower, centered column (no huge right-side whitespace) */
body[data-page="methodology"] main.container,
body[data-page="about"] main.container,
body[data-page="accuracy"] main.container { max-width: 940px; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 4px 0 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; border-top: 3px solid var(--brand); }
.stat .n { font-family: var(--sans); font-size: 27px; font-weight: 800; color: var(--brand-dk); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.stat.accent { border-top-color: var(--accent); }
.stat.accent .n { color: var(--accent); }
.pctcell { font-weight: 700; }

/* ---- prose ---- */
.prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 28px; margin-bottom: 18px; }
.prose h2 { font-size: 21px; margin-top: 30px; padding-left: 12px; border-left: 4px solid var(--brand); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 16.5px; margin-top: 20px; color: var(--brand-dk); }
.prose p, .prose li { max-width: 76ch; }
.prose code { background: var(--card-2); padding: 1px 6px; border-radius: var(--radius-sm); font-size: 13.5px; }
.prose table.results { min-width: 0; margin: 10px 0; box-shadow: none; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--card); padding: 24px 0; margin-top: 36px; font-size: 13.5px; color: var(--muted); }
.site-footer p { margin: 6px 0; }

@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .nav-toggle { display: block; min-height: 44px; }
  .nav-links { display: none; flex-direction: column; width: 100%; padding-bottom: 8px; }
  .nav-links.open { display: flex; }
  .cta-row { grid-template-columns: 1fr; }
  .page-title { font-size: 25px; }
  .f-group-tfw { grid-column: 1 / -1; }
}

/* ---- counselling simulator: multi-select filters ---- */
.filters-multi { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: start; }
.ms { position: relative; }
.ms-label { font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
.ms-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 16px var(--body); padding: 12px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; color: var(--ink); cursor: pointer; text-align: left; }
.ms-toggle:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-fixed); }
.ms.ms-active .ms-toggle { border-color: var(--brand); color: var(--brand-dk); font-weight: 600; }
.ms-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-caret { color: var(--faint); flex: none; }
.ms-pop { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-md); box-shadow: var(--shadow-2); padding: 8px; max-height: 320px; overflow-y: auto; }
.ms-search { width: 100%; margin-bottom: 6px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: 14px var(--body); }
.ms-actions { display: flex; gap: 8px; padding: 2px 2px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.ms-actions button { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600; padding: 4px 10px; cursor: pointer; color: var(--brand-dk); }
.ms-list { list-style: none; margin: 0; padding: 0; }
.ms-list li label { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 14px; cursor: pointer; border-radius: var(--radius-sm); }
.ms-list li label:hover { background: var(--card-2); }
.ms-list input { width: auto; }
.sim-tfw { margin-top: 4px; }
.sim-group-toggle { margin-top: 12px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.sim-group-toggle input { width: auto; }

/* ---- counselling simulator: results ---- */
.choice-suggest { background: var(--accent-bg); border: 1px solid #b9e0c8; border-radius: var(--radius); padding: 16px 20px; margin: 8px 0 22px; }
.choice-summary { cursor: pointer; font-family: var(--sans); font-weight: 800; color: var(--accent); padding: 4px 0; }
.choice-body { margin-top: 14px; }
.sub-inline { color: var(--muted); font-family: var(--body); font-size: 12px; font-weight: 700; margin-left: 8px; text-transform: uppercase; letter-spacing: .04em; }
.choice-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.choice-suggest h2 { font-size: 18px; margin: 0; }
.btn-copy { font-family: var(--sans); background: var(--accent); color: #fff; border: 0; border-radius: var(--radius-sm); padding: 8px 16px; min-height: 44px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.btn-copy:hover { filter: brightness(1.05); }
.choice-order { margin: 10px 0 0; padding-left: 24px; }
.choice-order li { margin: 5px 0; }
.choice-order .co-name { font-weight: 600; }
.choice-order .co-rd { margin-left: 4px; }
.sub-note { font-size: 11px; color: var(--moderate); font-weight: 600; }
.round-block { margin: 22px 0; }
.round-title { font-size: 19px; margin: 0 0 10px; padding-left: 12px; border-left: 4px solid var(--brand); }
.round-count { font-size: 12px; font-weight: 700; color: var(--brand-dk); background: var(--brand-fixed); border-radius: 999px; padding: 2px 9px; margin-left: 8px; vertical-align: middle; }
.round-r1u .round-title { border-left-color: var(--moderate); }
.round-r2 .round-title { border-left-color: var(--accent); }
.round-out .round-title { border-left-color: var(--unreach); }
.sim-results .pref-no { font-family: var(--sans); font-weight: 800; color: var(--brand-dk); font-size: 15px; }
.sim-results .co-name { font-weight: 600; display: block; }

/* ---- choice-list strategy selector ---- */
.strat-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.strat-lbl { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.strat-btn { font-family: var(--sans); font-weight: 700; font-size: 13.5px; padding: 7px 16px; cursor: pointer;
  background: var(--card); color: var(--brand-dk); border: 1px solid var(--line-2); border-radius: 999px; min-height: 44px; }
.strat-btn:hover { border-color: var(--brand); }
.strat-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.strat-desc { margin: 0 0 8px; }

/* click-to-sort column headings (simulator + 12th-% predictor) */
.sim-sort-hint { font-size: 13px; margin: 18px 0 6px; }
.results th.sortable { cursor: pointer; user-select: none; -webkit-user-select: none; }
.results th.sortable:hover { color: var(--brand); }
.results th.sorted { color: var(--brand); }
.results th .sort-ar { margin-left: 2px; font-weight: 700; }

/* Branch-ranks "show all" toggle */
.br-more-wrap { text-align: center; margin: 16px 0 4px; }
.br-more {
  font: inherit; font-weight: 600; color: var(--accent, #1f4fbf);
  background: #fff; border: 1px solid var(--accent, #1f4fbf); border-radius: 999px;
  padding: 8px 18px; cursor: pointer; transition: background .15s, color .15s;
}
.br-more:hover { background: var(--accent, #1f4fbf); color: #fff; }

/* ---- Branch ranks: clearer table hierarchy (Academic Precision: Inter tabular data) ---- */
body[data-page="branchrank"] table.results td { vertical-align: middle; padding: 14px 16px; }
body[data-page="branchrank"] table.results tbody tr:hover { background: #f3f6ff; }
body[data-page="branchrank"] .co-name { font-size: 14.5px; font-weight: 600; }
.br-rank { font-weight: 700; font-size: 15px; color: var(--brand-dk); font-variant-numeric: tabular-nums; }
.demand-v { font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
td.num .demand-v + .sub { margin-top: 3px; font-size: 11.5px; }
.hint-more { margin-top: 5px; }
.hint-more summary { cursor: pointer; color: var(--brand-dk); font-weight: 600; padding: 8px 0; }
.hint-more[open] summary { margin-bottom: 4px; }

/* college name -> link to its cut-off-history page; reads as text, reveals as a link on hover */
a.co-link { color: inherit; text-decoration: none; }
a.co-link:hover, a.co-link:focus { color: var(--brand-dk); text-decoration: underline; }
/* explicit "view cut-off history" CTA on predictor / branch-ranks rows */
a.row-cta { display: flex; width: fit-content; align-items: center; min-height: 36px; margin-top: 5px; font-size: 11.5px; font-weight: 600; color: var(--brand); line-height: 1.25; }
a.row-cta:hover, a.row-cta:focus { text-decoration: underline; color: var(--brand-dk); }
/* explorer: search box spans the full filter row */
.f-group-search { grid-column: 1 / -1; }
/* explorer card: whole card is clickable -> lift on hover */
.college-card { transition: border-color .12s, box-shadow .12s; }
.college-card:hover { border-color: var(--brand); box-shadow: var(--shadow-2); }

/* Empty-round explanatory note (e.g. First-Round Upgrade with no options) */
.round-empty {
  margin: 14px 0; padding: 12px 16px; font-size: .92rem; line-height: 1.5;
  background: #f6f8fc; border: 1px dashed #c7d2e8; border-radius: 8px;
}

/* Special horizontal-quota pool tag (Divyang / Defence / Freedom-Fighter / NCC) */
.pool.pool-special { background:#fdeecf; color:#7a4f00; border-color:#e8c98a; }

/* TFW checkbox disabled (other-state domicile — TFW is MP-domicile only) */
label.f-check.disabled { opacity: .5; cursor: not-allowed; }
label.f-check.disabled input { cursor: not-allowed; }

/* Seat-availability horizon badge (when a college's seats typically run out) */
.avail-badge {
  display: inline-block; font-size: .72rem; font-weight: 600; line-height: 1;
  padding: 3px 7px; border-radius: 999px; white-space: nowrap; vertical-align: middle;
  border: 1px solid transparent;
}
.avail-badge.badge-r1 { background:#fde2e1; color:#9b1c1c; border-color:#f3b6b3; }  /* gone earliest */
.avail-badge.badge-up { background:#fdecd2; color:#8a4b00; border-color:#eccb95; }
.avail-badge.badge-r2 { background:#e7eefb; color:#1f4fbf; border-color:#c2d4f4; }
.avail-badge.badge-qe { background:#dcf3e3; color:#1d6b3a; border-color:#aeddbe; }  /* lasts to the % round */

/* ---- single-college cut-off history page ---- */
.crumb { margin: 0 0 6px; font-size: 14px; }
.crumb a { color: var(--muted); text-decoration: none; font-weight: 600; }
.crumb a:hover { color: var(--brand); }
.hist-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin: 16px 0 4px; align-items: end; }
.hist-filters label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px;
  font-weight: 600; color: var(--muted); font-family: var(--sans); }
.hist-filters label.chk { flex-direction: row; align-items: center; gap: 7px; }
.hist-filters label.chk input { width: auto; }
.hist-table { min-width: 720px; }
.fee-history { margin: 18px 0 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.fee-history summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; font-family: var(--sans); font-weight: 800; color: var(--brand-dk); }
.fee-history[open] summary { border-bottom: 1px solid var(--line); }
.fee-summary { font-size: 13px; font-weight: 600; color: var(--muted); }
.fee-history-panel { padding: 12px 14px 14px; }
.fee-year-filter { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 12px; font-family: var(--sans); font-weight: 700; color: var(--ink); }
.fee-year-filter select { min-width: 160px; }
.fee-table { min-width: 780px; }
.college-card h3 a { color: var(--brand-dk); text-decoration: none; }
.college-card h3 a:hover { color: var(--brand); text-decoration: underline; }
.card-cta { margin: 8px 0 0; font-size: 13px; }
.card-cta a { color: var(--brand); text-decoration: none; font-weight: 600; }
.card-cta a:hover { text-decoration: underline; }

/* ---- predictor simplification pass ---- */
.btn-row { width: 100%; margin: 6px 0 0; }
.btn-row .btn-primary { min-width: 260px; }
.form-msg {
  margin: 8px 0 0; min-height: 1.4em; color: var(--muted);
  font-size: 13.5px; line-height: 1.45;
}
.form-msg:empty { display: none; }
.form-msg.is-error {
  color: var(--moderate); border-left: 3px solid var(--moderate);
  background: var(--moderate-bg); border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.primary-input #branch-pick { flex: 1 1 220px; }
#branch-pick .ms { width: 100%; margin: 0 0 12px; }
.how-works { margin: 16px 0 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.how-works summary { cursor: pointer; font-weight: 700; font-family: var(--sans); color: var(--brand-dk); padding: 8px 0; }
.how-works .hint { max-width: 90ch; }
.ms-actions { flex-wrap: wrap; }
.ms-actions .ms-preset { background: var(--brand-fixed); border-color: var(--line-2); }
.btn-secondary {
  font-family: var(--sans); background: var(--card); color: var(--brand-dk);
  border: 1px solid var(--line-2); border-radius: var(--radius-md);
  min-height: 44px; padding: 0 16px; font-weight: 700; font-size: 14.5px;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--brand); background: var(--brand-fixed); }
.modal-overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  position: relative; width: min(440px, calc(100vw - 32px)); background: var(--card);
  color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-2);
  padding: 22px 24px 20px;
}
.modal-close {
  position: absolute; top: 10px; right: 12px; border: 0; background: transparent;
  color: var(--muted); font: 13px var(--body); cursor: pointer; padding: 4px 6px;
}
.modal-close:hover, .modal-close:focus { color: var(--brand-dk); text-decoration: underline; }
.modal-title { margin: 0 54px 8px 0; font-size: 20px; line-height: 1.25; }
.modal-body { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

@media (max-width: 760px) {
  .btn-row .btn-primary { width: 100%; min-width: 0; }
  .modal-actions { justify-content: stretch; }
  .modal-actions button { flex: 1 1 100%; }
}
