/* ADA Ratings — editorial navy + gold design system */

:root {
  /* Brand */
  --navy-950: #06142e;
  --navy-900: #0a1f44;
  --navy-800: #0f2d5c;
  --navy-700: #183d76;
  --navy-600: #24538f;
  --navy-50: #eef3fa;
  --gold-500: #d4a72c;
  --gold-600: #a37c12;
  --gold-700: #7a5c0c;
  --gold-50: #fbf5e3;

  /* Neutrals */
  --bg: #ffffff;
  --bg-subtle: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  /* Form control outlines need 3:1 against the page (WCAG 1.4.11). */
  --border-input: #848d9e;
  --text: #101828;
  --text-muted: #475467;
  --text-subtle: #667085;
  --link: #183d76;

  /* Rating scale (white text on each passes 4.5:1) */
  --r-high: #067647;
  --r-mid: #b54708;
  --r-low: #b42318;
  --r-none: #667085;

  --success-bg: #ecfdf3;
  --success-text: #05603a;
  --error-bg: #fef3f2;
  --error-border: #fecdca;
  --error-text: #912018;

  --focus: #2e6be6;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow: 0 6px 16px -4px rgba(16, 24, 40, 0.08), 0 2px 6px -2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 20px 32px -8px rgba(16, 24, 40, 0.12), 0 6px 12px -4px rgba(16, 24, 40, 0.05);

  /* Motion: quick for presses, base for hovers, slow for imagery. */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 420ms;

  --icon-sm: 18px;
  --icon-md: 22px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --container: 1200px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: var(--link); text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.15;
  margin: 0;
  color: var(--navy-900);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy-900);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Programmatic focus targets (skip link, headings after an action) show no ring. */
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-900);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo { height: 30px; width: auto; }
.brand-name {
  padding-left: 12px;
  border-left: 1px solid var(--border-strong);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}
.brand-name b { color: var(--gold-600); font-weight: 600; }

.header-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
.header-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.header-link:hover { color: var(--navy-900); background: var(--surface-2); }
.header-link svg { width: 14px; height: 14px; opacity: 0.7; }
.header-link--cta {
  margin-left: 6px;
  color: #fff;
  background: var(--navy-900);
}
.header-link--cta:hover { color: #fff; background: var(--navy-700); }

/* ---------- Search combobox ---------- */

.search {
  position: relative;
  flex: 1;
  max-width: 420px;
}
.search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 40px;
  font: inherit;
  font-size: 0.94rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-input);
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.search-input:hover { border-color: var(--navy-600); }
.search-input:focus-visible { border-color: var(--navy-600); box-shadow: 0 0 0 4px rgba(36, 83, 143, 0.12); outline: 2px solid var(--focus); outline-offset: 2px; }
.search-input::placeholder { color: var(--text-subtle); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }

.search--hero { max-width: 640px; margin: 0 auto; }
.search--hero .search-input {
  height: 60px;
  font-size: 1.05rem;
  padding: 0 128px 0 54px;
  background: var(--surface);
  border-color: var(--border-input);
  box-shadow: var(--shadow-lg);
}
.search--hero .search-input:focus { border-color: var(--navy-600); box-shadow: var(--shadow-lg), 0 0 0 4px rgba(36, 83, 143, 0.12); }
.search--hero .search-icon { left: 20px; }
.search-submit {
  position: absolute;
  right: 7px; top: 7px;
  height: 46px;
  padding: 0 22px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--navy-900);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.search-submit:hover { background: var(--navy-700); }

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  margin: 0; padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  z-index: 60;
  text-align: left;
}
.search-results[hidden] { display: none; }
.search-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
}
.search-option[aria-selected="true"], .search-option:hover { background: var(--surface-2); }
.search-option img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  background: var(--surface-2);
}
.search-option-text { flex: 1; min-width: 0; }
.search-option-name { font-weight: 600; font-size: 0.95rem; }
.search-option-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-empty { padding: 14px; color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 80px 0 0;
  text-align: center;
  background:
    radial-gradient(800px 360px at 50% -80px, var(--navy-50), transparent 70%),
    var(--bg);
  overflow: hidden;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px 5px 6px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
}
.eyebrow-dot {
  display: inline-grid;
  place-items: center;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-700);
  background: var(--gold-50);
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.1rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 auto 18px;
  max-width: 14ch;
}
.hero h1 em { font-style: italic; color: var(--gold-600); }
.hero-lead {
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.12rem;
  color: var(--text-muted);
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 20px auto 0;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
  color: var(--text-subtle);
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--navy-800);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.chip:hover { border-color: var(--navy-600); background: var(--navy-50); }

.hero-visual {
  position: relative;
  max-width: 1100px;
  margin: 56px auto 0;
  padding: 0 24px;
}
.hero-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 630;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
  margin: -64px auto 0; padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.hero-stats li { padding: 20px 16px; text-align: center; }
.hero-stats li + li { border-left: 1px solid var(--border); }
.hero-stats strong {
  display: block;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.1;
}
.hero-stats span { font-size: 0.86rem; color: var(--text-muted); }

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section--tint { background: var(--bg-subtle); border-block: 1px solid var(--border); }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-kicker {
  display: block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-700);
}
.section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); font-weight: 600; }
.section-head p { color: var(--text-muted); margin-top: 8px; max-width: 560px; }

/* ---------- School cards ---------- */

.school-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0; padding: 0;
  list-style: none;
}
.school-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.school-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}
.school-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.school-code {
  position: absolute;
  left: 14px; top: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--navy-900);
  background: rgba(255, 255, 255, 0.94);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
}
.school-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
  padding: 20px 22px 22px;
}
.school-card h3 { font-size: 1.22rem; font-weight: 600; }
.school-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--text-muted);
}
.school-arrow {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: var(--navy-800);
  background: var(--surface-2);
  flex-shrink: 0;
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.school-arrow svg { width: 16px; height: 16px; }
.school-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.school-card:hover img { transform: scale(1.04); }
.school-card:hover .school-arrow { background: var(--navy-900); color: #fff; transform: translateX(2px); }
.school-card:active, .prof-card:active { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.school-card, .prof-card, .btn, .search-option, .rating-picker label { cursor: pointer; }

/* ---------- Page hero (school) ---------- */

.page-hero {
  position: relative;
  color: #fff;
  background: var(--navy-950);
  overflow: hidden;
}
.page-hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.45;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6, 20, 46, 0.96) 25%, rgba(6, 20, 46, 0.5));
}
.page-hero .container { position: relative; z-index: 1; padding-top: 32px; padding-bottom: 88px; }
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; margin: 28px 0 8px; }
.page-hero-kicker {
  display: inline-block;
  margin-top: 28px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--navy-950);
  background: var(--gold-500);
  border-radius: 999px;
}
.page-hero-kicker + h1 { margin-top: 12px; }
.page-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: 28px 0 0; padding: 0;
  list-style: none;
}
.page-hero-stats li { display: grid; gap: 2px; }
.page-hero-stats strong {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.page-hero-stats span { font-size: 0.84rem; color: rgba(255, 255, 255, 0.72); }

.breadcrumbs ol {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0; padding: 0;
  list-style: none;
  font-size: 0.88rem;
}
.breadcrumbs li + li::before { content: '/'; margin-right: 6px; color: rgba(255, 255, 255, 0.45); }
.breadcrumbs a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.breadcrumbs [aria-current] { color: #fff; font-weight: 500; }
.breadcrumbs--light { padding-top: 28px; }
.breadcrumbs--light li + li::before { color: var(--border-strong); }
.breadcrumbs--light a { color: var(--text-muted); }
.breadcrumbs--light a:hover { color: var(--navy-900); }
.breadcrumbs--light [aria-current] { color: var(--text); }

/* ---------- Dean quote ---------- */

.dean {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 24px;
  align-items: start;
  margin: -48px 0 0;
  position: relative;
  z-index: 2;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.dean img {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  background: var(--surface-2);
}
.dean blockquote {
  position: relative;
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.55;
  font-style: italic;
  color: var(--navy-900);
}
.dean figcaption { font-size: 0.9rem; color: var(--text-muted); }
.dean figcaption strong { color: var(--text); font-weight: 600; }

/* ---------- Toolbar ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.field-inline { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-muted); }
.input, .select {
  height: 44px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgba(36, 83, 143, 0.12);
}
.toolbar .input { flex: 1; min-width: 220px; }
.select {
  padding-right: 36px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.result-count { margin-left: auto; padding-right: 4px; font-size: 0.9rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---------- Professor cards ---------- */

.prof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 20px;
  margin: 0; padding: 0;
  list-style: none;
}
.prof-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.prof-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.prof-card-top { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--border);
}
.prof-card h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; letter-spacing: -0.005em; color: var(--text); line-height: 1.3; }
.prof-title { font-size: 0.85rem; color: var(--text-muted); }
.prof-spec {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prof-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Rating badge ---------- */

.rating-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  padding: 3px 9px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rating-badge small { font-size: 0.78em; font-weight: 500; }
.rating-badge.r-high { background: var(--r-high); }
.rating-badge.r-mid { background: var(--r-mid); }
.rating-badge.r-low { background: var(--r-low); }
.rating-badge.r-none { background: var(--surface-2); color: var(--r-none); font-weight: 500; font-size: 0.82rem; }
.rating-badge.large {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  background: none;
  letter-spacing: -0.02em;
}
.rating-badge.large small { font-family: var(--font-sans); font-size: 0.32em; font-weight: 500; color: var(--text-subtle); opacity: 1; margin-left: 2px; }
.rating-badge.large.r-high { color: var(--r-high); }
.rating-badge.large.r-mid { color: var(--r-mid); }
.rating-badge.large.r-low { color: var(--r-low); }
.rating-badge.large.r-none { font-size: 1.4rem; color: var(--text-subtle); }

/* ---------- Professor page ---------- */

.prof-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
  padding: 24px 0 88px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 28px;
}
.prof-aside { position: sticky; top: calc(var(--header-h) + 24px); text-align: center; overflow: hidden; }
.prof-aside::before {
  content: '';
  display: block;
  height: 72px;
  margin: -28px -28px 0;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
}
.prof-aside .avatar {
  width: 128px; height: 128px;
  margin: -64px auto 16px;
  position: relative;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border);
}
.prof-aside h1 { font-size: 1.55rem; font-weight: 600; margin-bottom: 6px; }
.prof-aside .prof-title { font-size: 0.95rem; }
.prof-inactive {
  margin-top: 12px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--gold-700);
  background: var(--gold-50);
  border-radius: var(--radius-sm);
}
.prof-aside dl {
  text-align: left;
  margin: 22px 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 14px;
}
.prof-aside dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle); }
.prof-aside dd { margin: 2px 0 0; font-size: 0.95rem; }
.prof-aside dd a { text-decoration: none; font-weight: 500; }
.prof-aside dd a:hover { text-decoration: underline; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn svg { width: var(--icon-sm); height: var(--icon-sm); }
.btn-primary { background: var(--navy-900); color: #fff; box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--navy-700); }
.btn-gold { background: var(--gold-500); color: var(--navy-950); box-shadow: var(--shadow-xs); }
.btn-gold:hover { background: #e2b740; }
.btn-ghost { background: var(--surface); color: var(--navy-900); border-color: var(--border-input); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { background: var(--surface-2); }
.btn[disabled], .btn[aria-busy="true"], .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn-block { width: 100%; }
.btn-block + .btn-block { margin-top: 10px; }

.prof-main { display: grid; gap: 24px; min-width: 0; }

.summary {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: center;
}
.summary-score {
  text-align: center;
  padding-right: 36px;
  border-right: 1px solid var(--border);
}
.summary-score p { margin-top: 8px; font-size: 0.9rem; color: var(--text-muted); }
.summary h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 14px; }

.dist { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.dist li {
  display: grid;
  grid-template-columns: 22px 1fr 34px;
  gap: 12px;
  align-items: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.dist li > span:first-child { text-align: right; }
.dist-bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.dist-bar span { display: block; height: 100%; background: var(--gold-600); border-radius: 999px; }
.dist-count { text-align: right; }

.insights {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 36px;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.insight dt { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: 4px; }
.insight dd { margin: 0; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.insight strong { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; color: var(--navy-900); line-height: 1.1; }
.insight-tags { flex: 1 1 260px; }
.insight-tags .tag-list { margin-top: 6px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--navy-800);
  background: var(--navy-50);
  border-radius: 999px;
}
.tag-count {
  min-width: 18px;
  padding: 0 5px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  background: var(--navy-700);
  border-radius: 999px;
}

/* ---------- Review form ---------- */

.review-form { scroll-margin-top: calc(var(--header-h) + 24px); }
.review-form h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 6px; }
.form-hint { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 24px; }
.fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.fieldset legend, .label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 10px;
  padding: 0;
}
.rating-picker {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}
/* Each radio sits exactly over its own number, so a click or tap can only pick that number. */
.rate-option { position: relative; display: grid; }
.rating-picker input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.rating-picker label {
  display: grid;
  place-items: center;
  min-height: 46px;
  font-weight: 600;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.rate-option:hover label { border-color: var(--navy-600); background: var(--navy-50); }
.rating-picker input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.rating-picker input:checked + label { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.rating-scale-hint {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-size: 0.8rem; color: var(--text-subtle);
}
.rating-picker--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 340px; }
.rating-picker--5 + .rating-scale-hint { max-width: 340px; }
.rating-picker--choice { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 220px; }

.form-field { margin-bottom: 22px; }
.course-input { width: 100%; max-width: 220px; text-transform: uppercase; }
.input[aria-invalid="true"] { border-color: var(--r-low); }

.link-btn {
  min-height: 44px;
  margin-top: 4px;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: 0;
  cursor: pointer;
}
.link-btn[hidden] { display: none; }
.link-btn:hover { color: var(--navy-900); }

/* Tag chips: each checkbox sits exactly over its own chip, like the rating picker. */
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-option { position: relative; display: grid; }
.tag-option input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.tag-option label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--border-input);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.tag-option:hover label { border-color: var(--navy-600); background: var(--navy-50); }
.tag-option input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.tag-option input:checked + label { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.tag-option input:checked + label::before { content: "✓"; font-weight: 700; }

.textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  resize: vertical;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.textarea::placeholder { color: var(--text-subtle); }
.textarea[aria-invalid="true"], .fieldset[aria-invalid="true"] .rating-picker label { border-color: var(--r-low); }
.label-hint { font-weight: 400; color: var(--text-muted); }
.state-title { font-family: var(--font-sans); font-size: 1.2rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.char-count { display: block; text-align: right; font-size: 0.8rem; color: var(--text-subtle); margin: 6px 0 16px; font-variant-numeric: tabular-nums; }
.char-count.warn { color: var(--r-mid); font-weight: 600; }
.field-error { color: var(--r-low); font-size: 0.85rem; margin-top: 6px; }
.field-error:empty { display: none; }

.status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
}
.status:empty { display: none; }
.status.success { background: var(--success-bg); color: var(--success-text); }
.status.error { background: var(--error-bg); color: var(--error-text); }

/* ---------- Reviews ---------- */

.reviews-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.reviews-head h2 { font-size: 1.4rem; font-weight: 600; }
.reviews-head h2 .prof-title { font-family: var(--font-sans); font-weight: 500; font-size: 0.95rem; color: var(--text-subtle); }
.review-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.review {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.review-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--text-subtle);
}
.reviews-controls { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.review-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.fact-label { color: var(--text-subtle); }
.review .tag-list { margin-bottom: 10px; }
.review p { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.review.is-new { border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-50); }

/* ---------- Recent reviews ---------- */

.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0; padding: 0;
  list-style: none;
}
.recent-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.recent-card .review-meta { margin: 0; }
.recent-text {
  color: var(--text);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recent-prof {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy-800);
  text-decoration: none;
}
.recent-prof:hover span:first-child { text-decoration: underline; }
.recent-school {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------- Reporting ---------- */

.review-report {
  margin-left: auto;
  min-height: 32px;
  padding: 0 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.review-report:hover { color: var(--r-low); border-color: var(--border); }
.review-reported { margin-left: auto; font-size: 0.82rem; color: var(--text-subtle); }
.report-form {
  margin-top: 14px;
  padding: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.report-form .label { font-size: 0.88rem; }
.report-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.report-row .select, .report-row .input { flex: 1; min-width: 200px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 0.88rem; }

/* ---------- Text pages ---------- */

.prose-wrap { padding-bottom: 88px; }
.prose { max-width: 720px; padding-top: 24px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 600; margin-bottom: 12px; }
.prose h2 { font-size: 1.35rem; font-weight: 600; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--text-muted); }
.prose ul { padding-left: 1.2em; margin: 0; display: grid; gap: 6px; }
.prose-lead { font-size: 1.12rem; }
.prose code { font-size: 0.9em; padding: 1px 6px; background: var(--surface-2); border-radius: 4px; }

/* ---------- Moderation ---------- */

.admin-title { font-size: 2rem; font-weight: 600; margin: 32px 0 20px; }
.admin-login { max-width: 560px; }
.admin-gap { margin-top: 40px; }
.admin-reasons { margin-top: 8px; font-size: 0.86rem; color: var(--r-low); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.admin-delete { color: var(--r-low); }
.admin-badge {
  margin-left: auto;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
}
.admin-badge--pending { background: var(--gold-50); color: var(--gold-700); }
.admin-badge--hidden { background: var(--error-bg); color: var(--error-text); }

/* ---------- States ---------- */

.state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.state h3 { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.state .btn { margin-top: 16px; }
.state.error { border-style: solid; border-color: var(--error-border); background: var(--error-bg); color: var(--error-text); }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, #f9fafb 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius);
  border-color: transparent;
}
.skeleton-card { min-height: 180px; }
.school-grid .skeleton-card { min-height: 300px; border-radius: var(--radius-lg); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0; padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--navy-50);
  color: var(--navy-800);
  box-shadow: inset 0 0 0 1px rgba(36, 83, 143, 0.12);
}
.step-icon svg { width: var(--icon-md); height: var(--icon-md); }
.step h3 { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.005em; color: var(--text); margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 0.95rem; }
.step::after {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 28px; right: 28px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

/* ---------- Stars ---------- */

.stars {
  --pct: 0%;
  position: relative;
  display: inline-block;
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: 2px;
  color: var(--border);
}
.stars::before { content: '★★★★★'; }
.stars::after {
  content: '★★★★★';
  position: absolute; left: 0; top: 0;
  width: var(--pct);
  overflow: hidden;
  white-space: nowrap;
  color: var(--gold-500);
}
.summary-score .stars { margin-top: 12px; }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 48px 56px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(212, 167, 44, 0.22), transparent 65%),
    linear-gradient(135deg, var(--navy-800), var(--navy-950));
}
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 600; margin-bottom: 8px; }
.cta-band p { color: rgba(255, 255, 255, 0.78); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-800);
  text-decoration: none;
}
.link-more:hover { text-decoration: underline; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 56px 0 28px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { max-width: 340px; }
.site-footer h2 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--navy-900); text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-subtle);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .school-grid, .recent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .prof-layout { grid-template-columns: 1fr; }
  .prof-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .header-link--anchor { display: none; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  :root:has(.site-header .search) { --header-h: 116px; }
  .container { padding: 0 16px; }
  .site-header-inner { gap: 12px; height: auto; min-height: var(--header-h); padding-block: 10px; flex-wrap: wrap; }
  .site-header .search { order: 3; flex-basis: 100%; max-width: none; }
  .brand-logo { height: 26px; }
  .brand-name { font-size: 1.05rem; padding-left: 10px; }
  .header-link--secondary { display: none; }
  .hero { padding-top: 48px; }
  .hero-lead { font-size: 1.02rem; }
  .eyebrow { font-size: 0.78rem; }
  .search--hero .search-input { height: 54px; padding-right: 16px; font-size: 1rem; }
  .search-submit { display: none; }
  .hero-visual { margin-top: 36px; padding: 0; }
  .hero-visual img { border-radius: 0; aspect-ratio: 16 / 9; }
  .hero-stats { margin: -40px 16px 0; }
  .hero-stats li { padding: 14px 8px; }
  .hero-stats strong { font-size: 1.5rem; }
  .section { padding: 56px 0; }
  .school-grid, .recent-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 24px; }
  .cta-band .btn { width: 100%; }
  .page-hero .container { padding-bottom: 72px; }
  .dean { grid-template-columns: 1fr; text-align: center; padding: 24px; }
  .dean img { margin: 0 auto; }
  .summary { grid-template-columns: 1fr; gap: 20px; }
  .summary-score { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid var(--border); }
  .card { padding: 22px; }
  .prof-aside::before { margin: -22px -22px 0; }
  .rating-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rating-picker--choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-count { margin-left: 0; width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (forced-colors: active) {
  .rating-picker input:checked + label { outline: 3px solid CanvasText; outline-offset: -3px; }
  .rating-badge, .school-code, .chip, .tag { border: 1px solid CanvasText; }
  .tag-option input:checked + label { outline: 3px solid CanvasText; outline-offset: -3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
