:root {
  /* school colors */
  --navy: #003057;
  --navy-deep: #00223f;
  --blue: #0071ce;
  --blue-press: #005ca8;
  --sky: #9dcbeb;
  --sky-soft: #e6f1fa;

  /* RMP-style score colors (semantic, keep them) */
  --q-good: #7ff6c3;
  --q-ok: #fff170;
  --q-bad: #ff9c9c;
  --q-none: #e4e4e4;

  --ink: #111;
  --ink-soft: #4a4a4a;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --card: #f7f7f7;
  --white: #fff;

  --font-display: 'Poppins', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --font-logo: Georgia, 'Times New Roman', serif;

  --page: 1180px;
  --list: 876px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 17px/1.45 var(--font-body);
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--white); }
html { scroll-padding-top: 140px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
#app:focus { outline: none; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: baseline; gap: 0.18em; text-decoration: none; font-family: var(--font-logo); line-height: 1; white-space: nowrap; }
.logo-my { color: var(--sky); font-size: 0.8em; font-style: italic; }
.logo-word { color: var(--white); font-size: 1.5em; font-weight: 600; letter-spacing: -0.01em; }
.topbar .logo { font-size: 18px; }
.logo-xl { font-size: clamp(30px, 6vw, 46px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 28px; border-radius: 999px; border: 2px solid transparent;
  font: 700 16px var(--font-display); text-decoration: none; cursor: pointer;
  transition: transform 150ms var(--ease), background-color 150ms;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: var(--white); min-width: 150px; }
.btn-primary:hover { background: var(--blue-press); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: var(--white); }
.btn-outline:hover { background: var(--sky-soft); }
.btn-pill { min-height: 38px; padding: 0 18px; font-size: 14px; background: var(--white); color: var(--navy); }
.btn-pill:hover { background: var(--sky); }
.btn-wide { width: 100%; min-height: 54px; font-size: 17px; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ---------- top bar ---------- */
.topbar { background: var(--navy-deep); color: var(--white); position: sticky; top: 0; z-index: 10; box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.08); }
.topbar-home { position: absolute; inset: 0 0 auto; background: transparent; box-shadow: none; }
.topbar-inner { max-width: var(--page); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 20px; justify-content: space-between; }
.topbar-search { flex: 1; display: flex; gap: 8px; max-width: 680px; min-width: 0; }
.topbar-search input, .topbar-search select {
  height: 40px; border: 0; border-radius: 999px; padding: 0 18px; background: var(--white); color: var(--ink); min-width: 0; width: 0;
}
.topbar-search input { flex: 1.3; }
.topbar-search select { flex: 1; cursor: pointer; }
.icon-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--blue); color: var(--white); display: grid; place-items: center; font-size: 18px; cursor: pointer; transition: background-color 150ms; }
.icon-btn:hover { background: var(--blue-press); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background:
    radial-gradient(60% 80% at 15% 100%, rgb(0 113 206 / 0.55), transparent 70%),
    repeating-linear-gradient(115deg, rgb(255 255 255 / 0.035) 0 2px, transparent 2px 26px),
    var(--navy);
  padding: 140px var(--gutter) 96px;
}
.hero::after {
  content: ''; position: absolute; width: 520px; height: 520px; right: -170px; top: -260px;
  border-radius: 50%; background: var(--sky); opacity: 0.18;
}
.hero-inner { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; text-align: center; display: grid; justify-items: center; gap: 28px; }
.hero h1 { font: 400 clamp(24px, 4vw, 32px)/1.2 var(--font-display); }
.hero h1 b { font-weight: 700; }
.hero-search { position: relative; width: 100%; }
.hero-search input {
  width: 100%; height: 58px; border: 0; border-radius: 999px; padding: 0 24px 0 58px; font-size: 19px; color: var(--ink);
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.25); transition: box-shadow 200ms var(--ease);
}
.hero-search input:focus { outline: none; box-shadow: 0 0 0 4px var(--sky), 0 12px 40px rgb(0 0 0 / 0.25); }
.hero-search-icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: var(--navy); font-size: 22px; display: flex; }
.hero-link { font-weight: 700; color: var(--white); text-underline-offset: 3px; }
.hero-link:hover { color: var(--sky); }

/* ---------- pages ---------- */
.page { max-width: var(--page); margin: 0 auto; padding: 40px var(--gutter); }
.page-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
.section-title { font: 700 22px var(--font-display); margin-bottom: 18px; }
.results-title { font: 400 24px/1.3 var(--font-body); margin-bottom: 28px; max-width: var(--list); }
.eyebrow { display: block; font: 700 12px var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; }
.eyebrow-light { color: var(--sky); }
.recent { padding-top: 0; padding-bottom: 64px; }

/* ---------- teacher card (search) ---------- */
.card-list { display: grid; gap: 20px; max-width: var(--list); }
.t-card {
  display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 24px 28px;
  background: var(--card); text-decoration: none; border-left: 4px solid transparent;
  transition: border-color 150ms, background-color 150ms;
}
.t-card:hover { background: var(--sky-soft); border-left-color: var(--blue); }
.t-card-score { display: grid; justify-items: center; align-content: start; gap: 8px; }
.t-card-body h3 { font: 800 21px/1.2 var(--font-display); }
.t-dept { margin: 8px 0 2px; }
.t-card-stats { margin: 10px 0 0; }
.t-card-stats b { font: 800 17px var(--font-display); margin-right: 2px; }
.vsep { display: inline-block; width: 1px; height: 16px; background: var(--ink); margin: 0 10px; vertical-align: -2px; }

.qbox { display: grid; place-items: center; width: 72px; height: 64px; font: 800 30px var(--font-display); }
.q-good { background: var(--q-good); }
.q-ok { background: var(--q-ok); }
.q-bad { background: var(--q-bad); }
.q-none, .q-diff { background: var(--q-none); }

.empty-cta { display: grid; justify-items: start; gap: 12px; margin-top: 40px; max-width: var(--list); }
.empty-cta p { margin: 0; font-size: 19px; }

/* ---------- teacher page ---------- */
.tp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 56px; align-items: start; }
.tp-score { display: flex; align-items: flex-start; gap: 10px; }
.tp-big { font: 800 clamp(64px, 9vw, 80px)/0.9 var(--font-display); letter-spacing: -0.03em; }
.tp-of { font: 700 22px var(--font-display); color: var(--muted); margin-top: 4px; }
.tp-based { margin: 14px 0 30px; font-weight: 600; }
.tp-name { font: 800 clamp(34px, 5vw, 44px)/1.05 var(--font-display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.tp-where { margin: 16px 0 28px; max-width: 34ch; }
.tp-where a { font-weight: 700; color: var(--navy); }
.tp-feedback { display: flex; margin-bottom: 30px; }
.tp-feedback > div { display: grid; justify-items: center; padding: 0 24px; }
.tp-feedback > div:first-child { padding-left: 0; border-right: 1px solid var(--ink); }
.tp-feedback b { font: 800 32px var(--font-display); }
.mini-title { font: 700 16px var(--font-display); margin: 36px 0 12px; }

.panel { background: var(--card); padding: 22px 20px; }
.panel + .panel { margin-top: 32px; }
.panel h2 { font: 700 19px var(--font-display); margin-bottom: 18px; }
.panel-blue { background: var(--sky-soft); }
.dist-row { display: grid; grid-template-columns: 110px 1fr 28px; align-items: center; gap: 14px; margin-bottom: 18px; }
.dist-label { text-align: right; }
.dist-track { height: 36px; background: var(--line); overflow: hidden; }
.dist-bar { display: block; height: 100%; background: var(--blue); transform-origin: left; animation: grow 700ms var(--ease) both; }
.dist-count { text-align: right; font-size: 18px; }
@keyframes grow { from { transform: scaleX(0); } }
.similar { display: flex; flex-wrap: wrap; gap: 16px 22px; }
.similar a { display: flex; align-items: center; gap: 8px; text-decoration: none; max-width: 150px; line-height: 1.15; }
.similar a:hover span:last-child { text-decoration: underline; }
.sbox { flex: none; padding: 8px 8px; background: var(--blue); color: var(--white); font: 700 16px var(--font-display); }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 4px 14px; border-radius: 14px; background: var(--card); font: 600 13px var(--font-body); text-transform: uppercase; letter-spacing: 0.02em; }
.tp-main .tags li { background: var(--sky-soft); color: var(--navy); }
.r-card .tags li { background: var(--white); }

.flash { max-width: var(--page); margin: 20px auto 0; padding: 12px 20px; background: var(--q-good); font-weight: 700; width: calc(100% - 2 * var(--gutter)); animation: rise 400ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- rating cards ---------- */
.ratings { padding-top: 8px; padding-bottom: 72px; }
.r-card { display: grid; grid-template-columns: 88px 1fr; gap: 28px; padding: 24px 28px; background: var(--card); max-width: var(--list); margin-bottom: 20px; }
.r-scores { display: grid; gap: 14px; align-content: start; justify-items: center; text-align: center; }
.r-scores .eyebrow { margin-bottom: 6px; }
.r-head { display: flex; justify-content: space-between; gap: 12px; }
.r-course { font: 800 17px var(--font-display); }
.r-head time { font-weight: 700; }
.r-meta { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.r-comment { margin: 16px 0 18px; max-width: 62ch; }
.r-votes { display: flex; align-items: center; gap: 4px; margin-top: 20px; }
.vote { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 6px 12px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 18px; transition: color 150ms, background-color 150ms; }
.vote span { font-size: 15px; font-weight: 600; }
.vote:hover { background: var(--line); color: var(--ink); }
.vote[aria-pressed='true'] { color: var(--blue); }
.vote-down svg { transform: scaleY(-1); }
.report { margin-left: auto; min-height: 44px; padding: 6px 12px; border: 0; background: none; border-radius: 6px; color: var(--muted); font-size: 14px; text-decoration: underline; cursor: pointer; }
.report:hover { color: #8a0012; background: var(--line); }
.report:disabled { text-decoration: none; cursor: default; }

/* ---------- rate / add forms ---------- */
.rate-head { background: var(--navy); color: var(--white); padding: 40px 0 36px; }
.rate-head h1 { font: 800 clamp(30px, 5vw, 40px)/1.1 var(--font-display); margin: 6px 0 6px; overflow-wrap: anywhere; }
.rate-head p:last-child { margin: 0; color: var(--sky); }
.rate-form { padding-top: 28px; padding-bottom: 72px; display: grid; gap: 18px; }
.q-card { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 24px; background: var(--white); min-width: 0; }
.q-card legend { float: left; width: 100%; font: 700 18px var(--font-display); margin-bottom: 16px; }
.req { color: #d0021b; }
.opt { font: 400 14px var(--font-body); color: var(--muted); margin-left: 4px; }
.q-card input:not([type]), .q-card select, .q-card textarea {
  width: 100%; border: 1px solid #c9c9c9; border-radius: 6px; padding: 12px 14px; background: var(--white);
}
.q-card input:not([type]):focus-visible, .q-card select:focus-visible, .q-card textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.q-card textarea { resize: vertical; min-height: 140px; }

.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; clear: both; }
.seg { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 2px; height: 56px; background: #ededed; border: 1px solid #8a8a8a; font: 700 18px var(--font-display); color: #4a4a4a; transition: background-color 150ms, color 150ms; }
.seg + .seg span { border-left: 0; }
.seg.picked span { box-shadow: inset 0 0 0 3px var(--ink); font-size: 20px; }
.seg.picked span::after { content: '✓'; font-size: 16px; }
.seg:first-child span { border-radius: 28px 0 0 28px; }
.seg:last-child span { border-radius: 0 28px 28px 0; }
.seg:hover span { background: #dcdcdc; }
.seg input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; position: relative; z-index: 1; }
.lvl-good .seg.on span { background: var(--q-good); color: var(--ink); }
.lvl-ok .seg.on span { background: var(--q-ok); color: var(--ink); }
.lvl-bad .seg.on span { background: var(--q-bad); color: var(--ink); }
.lvl-diff .seg.on span { background: var(--blue); color: var(--white); }
.scale-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.scale-pick { color: var(--ink); font-family: var(--font-display); }

.yesno { display: flex; gap: 12px; clear: both; }
.yesno label, .tag-picker label { position: relative; cursor: pointer; }
.yesno input, .tag-picker input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.yesno span { display: grid; place-items: center; min-width: 104px; height: 46px; border-radius: 999px; border: 2px solid var(--navy); font: 700 16px var(--font-display); color: var(--navy); transition: background-color 150ms, color 150ms; }
.yesno input:checked + span { background: var(--navy); color: var(--white); }
.yesno input:focus-visible + span, .tag-picker input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 10px; clear: both; }
.tag-picker span { display: flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px; background: var(--white); border: 1px solid #767676; font: 600 14px var(--font-body); text-transform: uppercase; letter-spacing: 0.02em; transition: background-color 150ms; }
.tag-picker label:hover span { background: var(--line); }
.tag-picker input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.tag-picker input:checked + span::before { content: '✓ '; white-space: pre; }
.guidelines { clear: both; background: var(--sky-soft); border-left: 4px solid var(--navy); padding: 12px 16px; margin-bottom: 14px; font-size: 15px; }
.guidelines ul { margin: 6px 0 0; padding-left: 18px; }
.counter { margin: 6px 0 0; text-align: right; font-size: 14px; color: var(--muted); }
.form-error { margin: 0; padding: 12px 16px; background: #ffe3e3; color: #8a0012; font-weight: 600; border-radius: 6px; }

/* ---------- saved / bookmark ---------- */
.topbar-nav { display: flex; align-items: center; gap: 14px; flex: none; }
.topbar-link { display: inline-flex; align-items: center; gap: 6px; color: var(--white); text-decoration: none; font: 600 14px var(--font-display); }
.topbar-link svg { font-size: 18px; }
.topbar-link:hover { color: var(--sky); }
.topbar-link .count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--blue); font-size: 12px; text-align: center; line-height: 20px; }
.save-btn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink); font-size: 24px; cursor: pointer; transition: background-color 150ms, color 150ms, transform 150ms var(--ease); }
.save-btn:hover { background: var(--line); }
.save-btn:active { transform: scale(0.9); }
.save-btn[aria-pressed='true'] { color: var(--blue); }
.save-btn[aria-pressed='true'] svg { fill: currentColor; }
.t-card { position: relative; grid-template-columns: 120px 1fr auto; }
.t-card .save-btn { position: relative; z-index: 1; align-self: start; }
.t-card-link { text-decoration: none; }
.t-card-link::after { content: ''; position: absolute; inset: 0; }
.t-card-link:focus-visible { outline: none; }
.t-card:has(.t-card-link:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.tp-title { display: flex; align-items: flex-start; gap: 8px; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 600; color: var(--navy); }

/* ---------- home: departments ---------- */
.browse { padding-top: 40px; padding-bottom: 64px; }
.dept-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.dept-chip { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: var(--sky-soft); color: var(--navy); text-decoration: none; font-weight: 600; transition: background-color 150ms; }
.dept-chip span { min-width: 24px; padding: 0 7px; border-radius: 12px; background: var(--white); font-size: 13px; text-align: center; line-height: 22px; }
.dept-chip:hover { background: var(--sky); }
.dept-chip.is-empty { background: var(--card); color: var(--muted); }

/* ---------- ratings sort / filter ---------- */
.ratings-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; max-width: var(--list); margin-bottom: 18px; }
.ratings-head .section-title { margin: 0; }
.ratings-controls { display: flex; gap: 8px; }
.ratings-controls select { height: 40px; border: 1px solid #c9c9c9; border-radius: 999px; padding: 0 14px; background: var(--white); cursor: pointer; }
.filter-note { margin: -6px 0 16px; }

/* ---------- submitted ---------- */
.submitted { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 28px; padding-bottom: 72px; }

/* ---------- admin ---------- */
.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; max-width: var(--list); }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: var(--list); margin-bottom: 36px; }
.admin-stats div { display: grid; gap: 2px; padding: 16px; background: var(--sky-soft); color: var(--navy); }
.admin-stats b { font: 800 28px var(--font-display); }
.admin-list { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 12px; max-width: var(--list); }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: var(--card); }
.admin-row b { display: block; font: 700 17px var(--font-display); }
.admin-row .r-comment { margin: 8px 0 0; }
.admin-row-rating { align-items: flex-start; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.admin-empty { margin: 0 0 40px; }
.btn-sm { min-height: 36px; min-width: 0; padding: 0 16px; font-size: 14px; }
.btn-danger { background: #b00020; color: var(--white); }
.btn-danger:hover { background: #8a0019; }
.pill-hidden { font-style: normal; padding: 1px 8px; border-radius: 999px; background: var(--q-bad); color: var(--ink); }

/* ---------- policies ---------- */
.legal { padding-top: 24px; padding-bottom: 72px; max-width: 760px; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.legal-tabs a { padding: 8px 16px; border-radius: 999px; background: var(--card); color: var(--navy); text-decoration: none; font-weight: 600; }
.legal-tabs a:hover { background: var(--sky-soft); }
.legal-tabs a[aria-current='page'] { background: var(--navy); color: var(--white); }
.legal-notice { margin: 0 0 28px; padding: 14px 18px; background: var(--sky-soft); border-left: 4px solid var(--navy); }
.legal h2 { font: 700 20px var(--font-display); margin: 32px 0 10px; color: var(--navy); }
.legal p, .legal li { max-width: 68ch; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--blue); font-weight: 600; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.agree input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--blue); }
.agree a { color: var(--blue); font-weight: 600; }
.guidelines a { display: inline-block; margin-top: 6px; color: var(--navy); font-weight: 700; }
.join-disclaimer { max-width: 60ch; margin: -20px auto 32px; font-size: 14px; color: var(--muted); }
.join-disclaimer a { color: var(--navy); font-weight: 600; }

/* ---------- review-pass additions ---------- */
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 18px; background: var(--white); color: var(--ink); font-weight: 700; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: min(92vw, 520px); padding: 14px 20px; border-radius: 10px; background: var(--ink); color: var(--white); font-weight: 600; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity 200ms, transform 200ms var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast:empty { display: none; }
.hero-badge { margin: 0; padding: 6px 14px; border-radius: 999px; background: rgb(255 255 255 / 0.12); border: 1px solid rgb(255 255 255 / 0.35); font-size: 14px; font-weight: 600; }
.topbar-link { min-height: 44px; min-width: 44px; justify-content: center; }
.card-grid { max-width: none; }
@media (min-width: 1100px) { .card-grid { grid-template-columns: 1fr 1fr; } }
.how { padding-top: 8px; padding-bottom: 56px; }
.how-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how-list li { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--sky-soft); color: var(--navy); }
.how-list svg { flex: none; font-size: 26px; stroke-width: 1.6; }
.how-list a { color: var(--navy); font-weight: 700; }
.how .join-disclaimer { margin: 0; max-width: 80ch; }
.pending { padding-bottom: 0; }
.pending-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: var(--list); }
.pending-item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border-left: 4px solid var(--muted); }
.pending-item.is-approved { background: #e9fbf2; border-left-color: #1d8a55; }
.pending-item span { flex: 1; min-width: 200px; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.results-head .results-title { margin-bottom: 12px; }
.sort-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.sort-label select, .compare-add select { height: 44px; border: 1px solid #8a8a8a; border-radius: 999px; padding: 0 14px; background: var(--white); cursor: pointer; }
.search-hint { margin: -4px 0 20px; font-size: 15px; }
.did-you-mean { font-size: 19px; }
.did-you-mean a { color: var(--blue); font-weight: 700; }
.saved-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.tp-empty { display: grid; gap: 4px; margin-bottom: 28px; padding: 20px; background: var(--sky-soft); color: var(--navy); }
.tp-empty b { font: 800 26px var(--font-display); }
.small-sample { margin: -18px 0 24px; padding: 8px 12px; background: #fff7d6; border-left: 4px solid #b38600; font-size: 15px; max-width: 46ch; }
.teaches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -12px 0 24px; }
.teaches-label { font-weight: 700; margin-right: 4px; }
.course-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--navy); color: var(--navy); text-decoration: none; font-weight: 600; font-size: 15px; }
.course-chip:hover { background: var(--sky-soft); }
.course-chip[aria-current='true'] { background: var(--navy); color: var(--white); }
.tldr { margin: -8px 0 24px; max-width: 46ch; }
.tag-count { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 8px; background: var(--white); color: var(--navy); }
.share-btn { min-height: 44px; }
.panel-sub { margin: -10px 0 16px; font-size: 14px; }
.dist-bar-navy { background: var(--navy); }
.qbox-sm { width: 52px; height: 40px; font-size: 18px; display: inline-grid; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.course-table, .compare-table { border-collapse: collapse; width: 100%; max-width: var(--list); }
.course-table th, .course-table td, .compare-table th, .compare-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.course-table thead th { font: 700 14px var(--font-display); color: var(--ink-soft); }
.course-table a { color: var(--navy); font-weight: 700; }
.course-table tr.is-active { background: var(--sky-soft); }
.course-table-wrap { padding-top: 0; }
.compare { max-width: var(--page); }
.compare-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 20px; }
.compare-add { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.compare-table { max-width: none; min-width: 560px; table-layout: fixed; }
.compare-table tbody th { width: 160px; font-weight: 600; color: var(--ink-soft); }
.compare-table thead th { font: 800 19px/1.2 var(--font-display); vertical-align: top; }
.compare-table thead th a { text-decoration: none; }
.compare-table thead th a:hover { text-decoration: underline; }
.compare-table td .tags li { font-size: 12px; }
.compare-table q { display: block; font-size: 15px; }
.remove-btn { display: block; margin-top: 4px; font: 600 14px var(--font-body); color: var(--muted); min-height: 32px; }
.best { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--navy); color: var(--white); font-size: 12px; font-weight: 700; vertical-align: middle; }
.badge-mine { padding: 1px 8px; border-radius: 999px; background: var(--navy); color: var(--white); font-size: 12px; font-weight: 700; align-self: center; }
.r-card-mine { outline: 2px solid var(--navy); }
.field-help { margin: 8px 0 0; font-size: 14px; color: var(--ink-soft); }
.q-card.has-error { border-color: #b00020; box-shadow: inset 4px 0 0 #b00020; }
.counter.is-near { color: #8a6100; font-weight: 600; }
.counter.is-over { color: #b00020; font-weight: 700; }
.post-note { padding: 14px 18px; background: var(--sky-soft); border-left: 4px solid var(--navy); font-size: 15px; }
.post-note p { margin: 0 0 6px; }
.post-note p:last-child { margin: 0; }
.post-note a { color: var(--navy); font-weight: 700; }

/* ---------- admin mode ---------- */
.admin-pill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: #ffd24d; color: var(--ink); font: 700 13px var(--font-display); text-decoration: none; }
.admin-pill:hover { background: #ffdf80; }
.admin-note { margin: -12px 0 24px; max-width: var(--list); }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; padding: 10px 12px; background: #fff7d6; border: 1px solid #e6c55c; border-radius: 8px; }
.admin-bar-label { font: 800 12px var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; color: #6b5200; margin-right: 4px; }
.admin-inline { display: inline-flex; gap: 2px; padding-left: 8px; margin-left: 4px; border-left: 2px solid #e6c55c; }
.report-danger { color: #b00020; }
.admin-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; max-width: var(--list); margin-bottom: 40px; padding: 16px 20px; background: var(--card); }
.admin-add label { display: block; font-weight: 600; margin-bottom: 4px; }
.admin-add input, .admin-add select, .admin-edit input, .admin-edit select { width: 100%; height: 44px; border: 1px solid #8a8a8a; border-radius: 6px; padding: 0 12px; background: var(--white); }
.admin-add .form-error, .admin-edit .form-error { grid-column: 1 / -1; }
.admin-all-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; max-width: var(--list); margin-bottom: 18px; }
.admin-all-head .section-title { margin: 0; }
.admin-filter input { height: 44px; width: min(320px, 100%); border: 1px solid #8a8a8a; border-radius: 999px; padding: 0 16px; }
.admin-row b a { color: var(--navy); }
.admin-edit { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: center; width: 100%; }
.remember { margin-top: 14px; }
@media (max-width: 700px) {
  .admin-add, .admin-edit { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
.footer { background: var(--navy-deep); color: rgb(255 255 255 / 0.75); padding: 28px var(--gutter); text-align: center; font-size: 14px; }
.footer p { margin: 4px 0; }
.footer-disclaimer { max-width: 760px; margin: 0 auto 12px !important; line-height: 1.5; }
.footer-disclaimer b { color: var(--white); font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.footer-btn { min-height: 44px; border: 0; background: none; padding: 0; color: var(--sky); font-weight: 600; text-decoration: underline; cursor: pointer; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--sky); font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .tp { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 700px) {
  .topbar-link-text { display: none; }
  .topbar .logo { font-size: 15px; }
  .topbar-nav { gap: 10px; }
  .topbar-nav .btn-pill { padding: 0 12px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-row { flex-direction: column; align-items: stretch; }
  .topbar-inner { flex-wrap: wrap; gap: 12px; }
  .topbar-search { order: 3; flex-basis: 100%; max-width: none; display: grid; grid-template-columns: 1fr 104px auto; gap: 6px; }
  .topbar-search input, .topbar-search select { width: 100%; padding: 0 12px; }
  .topbar-inner { padding-top: 8px; padding-bottom: 10px; }
  .how-list { grid-template-columns: 1fr; }
  .results-head { flex-direction: column; align-items: flex-start; }
  .ratings-controls { flex-wrap: wrap; }
  .hero { padding-top: 110px; padding-bottom: 72px; }
  .t-card { grid-template-columns: 76px 1fr auto; gap: 12px; padding: 20px 12px 20px 16px; }
  .t-card .qbox { width: 60px; height: 54px; font-size: 24px; }
  .t-card-stats { font-size: 15px; }
  .r-card { grid-template-columns: 1fr; gap: 16px; padding: 20px 16px; }
  .r-scores { grid-template-columns: auto auto; justify-content: start; gap: 16px; }
  .r-head { flex-direction: column; gap: 2px; }
  .dist-row { grid-template-columns: 96px 1fr 24px; gap: 10px; }
  .q-card { padding: 18px 16px 20px; }
  .seg span { height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
