/* EM Faculty Census Explorer */
:root {
  --green: #006747; --green-strong: #00563b; --green-tint: #e6f0eb; --green-tint-2: #d3e6dc;
  --gold: #cfc493; --gold-tint: #f5f1e1; --gold-ink: #6e5f1c; --gold-line: #e3dbb7;
  --bg: #f4f6f5; --surface: #ffffff; --surface-2: #f0f3f1; --border: #dce3df; --border-strong: #c3ccc7;
  --text: #1b2521; --muted: #56645e; --faint: #7f8b86;
  --bar: #2f7d5b; --bar-track: #e8eeeb;
  --focus: #1464d8; --danger: #a4262c;
  --shadow: 0 1px 2px rgba(15, 23, 20, .06), 0 8px 24px rgba(15, 23, 20, .08);
  --shadow-sm: 0 1px 2px rgba(15, 23, 20, .05), 0 2px 8px rgba(15, 23, 20, .04);
  --shadow-pop: 0 2px 6px rgba(15, 23, 20, .08), 0 14px 36px rgba(15, 23, 20, .16);
  --radius: 10px; --radius-lg: 14px;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2356645e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green: #3a9d73; --green-strong: #56b68c; --green-tint: #17281f; --green-tint-2: #1f3a2d;
    --gold: #d6ca97; --gold-tint: #2a2717; --gold-ink: #e3d8a8; --gold-line: #4a4426;
    --bg: #0e1311; --surface: #151c18; --surface-2: #1b2420; --border: #29342f; --border-strong: #3a4842;
    --text: #e4ebe7; --muted: #a3b1ab; --faint: #7d8b85;
    --bar: #4fae84; --bar-track: #25302b;
    --focus: #7fb0ff; --danger: #ff8a8f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-pop: 0 2px 6px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .55);
    --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23a3b1ab' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--green); text-underline-offset: 2px; }
a:hover { color: var(--green-strong); }
button { font: inherit; color: inherit; }
input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 6px; z-index: 90; }
.skip:focus { left: 8px; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* header */
.site-header { background: var(--green); color: #fff; border-bottom: 3px solid #cfc493; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-header { background: #0b3a28; border-bottom-color: #8a8253; } }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand h1 { margin: 0; font: 700 22px/1.15 var(--font-head); letter-spacing: .2px; }
.brand h1 a { color: #fff; text-decoration: none; }
.tagline { margin: 3px 0 0; color: #cfe3d8; font-size: 13px; line-height: 1.35; }
.t-short { display: none; }
.header-links { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: rgba(0, 0, 0, .16); }
.header-links a { color: #e9f3ee; font-weight: 600; font-size: 14px; text-decoration: none; padding: 7px 14px; border-radius: 8px; white-space: nowrap; }
.header-links a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.header-links a[aria-current="page"] { background: #fff; color: #00563b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .header-links a[aria-current="page"] { background: #e4ebe7; color: #0b3a28; } }
@media (max-width: 719.98px) {
  .t-long { display: none; } .t-short { display: inline; }
  .brand-mark { width: 34px; height: 34px; } .brand h1 { font-size: 19px; }
  .header-links { width: 100%; } .header-links a { flex: 1 1 0; text-align: center; padding: 7px 4px; font-size: 13.5px; }
}

/* loading */
.loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 80px 0; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 6px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-strong); border-color: var(--green-strong); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { background: #1f7a55; border-color: #1f7a55; } :root:not([data-theme="light"]) .btn-primary:hover { background: #26946a; border-color: #26946a; } }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 13px; border-radius: 7px; text-decoration: none; }
.link-btn { border: 0; background: none; color: var(--green); font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 2px 4px; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 2px; }
.icon-btn { border: 0; background: none; font-size: 24px; line-height: 1; padding: 2px 8px; cursor: pointer; color: var(--muted); border-radius: 8px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--green); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }

/* question builder */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 410px); margin: 22px 0 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.b-main { padding: 18px 22px 16px 14px; min-width: 0; }
.b-side { padding: 18px 22px 18px; min-width: 0; background: var(--surface-2); border-left: 1px solid var(--border); border-radius: 0 var(--radius-lg) 0 0; }
@media (max-width: 959.98px) { .builder { grid-template-columns: minmax(0, 1fr); } .b-side { border-left: 0; border-top: 1px solid var(--border); border-radius: 0; } .b-examples { padding-left: 22px; } }
.b-titles { padding-left: 64px; }
.b-titles h2 { margin: 0; font: 700 21px/1.25 var(--font-head); }
.b-sub { margin: 3px 0 14px; color: var(--muted); font-size: 13.5px; }
.b-line, .b-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 32px; column-gap: 8px; align-items: start; }
.b-line { grid-template-columns: 56px minmax(0, 1fr); align-items: center; }
.b-join { padding-top: 8px; text-align: right; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.b-line .b-join { padding-top: 0; }
.b-showline { margin-bottom: 8px; }
.b-showline .view-switch { justify-self: start; }
.b-rows { display: grid; gap: 6px; }
.b-row { padding: 0; }
.b-what { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.b-ctl { display: contents; }
.b-field { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 4px 10px 4px 12px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; }
.b-field:hover { border-color: var(--green); }
.chev { width: 12px; height: 12px; color: var(--faint); flex: none; }
.b-opt, .b-and { color: var(--muted); font-size: 14px; }
select.b-op { min-height: 34px; padding: 4px 30px 4px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface) var(--chev) no-repeat right 10px center / 12px 12px; color: var(--text); font-size: 14px; -webkit-appearance: none; appearance: none; cursor: pointer; max-width: 100%; }
select.b-op:hover { border-color: var(--green); }
.b-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; max-width: 100%; padding: 5px 10px 5px 12px; border: 1px solid var(--green-tint-2); background: var(--green-tint); color: var(--green-strong); border-radius: 8px; font-weight: 600; font-size: 14px; line-height: 1.35; text-align: left; cursor: pointer; }
.b-pick > span { min-width: 0; }
.b-pick .chev { color: var(--green); }
.b-pick:hover { border-color: var(--green); }
.b-pick.empty { background: var(--surface); border: 1px dashed var(--border-strong); color: var(--muted); font-weight: 500; }
.b-num { width: 86px; min-height: 34px; padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.b-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.b-seg button { border: 0; background: var(--surface); min-height: 32px; padding: 0 16px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted); }
.b-seg button + button { border-left: 1px solid var(--border-strong); }
.b-seg button:hover { color: var(--text); }
.b-seg button[aria-pressed="true"] { background: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .b-seg button[aria-pressed="true"] { background: #1f7a55; } }
.b-warn { color: var(--danger); font-size: 12.5px; font-weight: 600; }
.b-rm { width: 32px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 8px; color: var(--faint); cursor: pointer; }
.b-rm svg { width: 12px; height: 12px; }
.b-rm:hover { background: var(--surface-2); color: var(--danger); }
.b-row.off .b-what { opacity: .55; }
.b-off { grid-column: 2 / 3; margin-top: 3px; font-size: 12.5px; color: var(--gold-ink); }
.b-empty { margin: 0 0 4px 64px; padding: 8px 12px; border: 1px dashed var(--border-strong); border-radius: 8px; color: var(--muted); font-size: 13.5px; }
.b-actions { margin-top: 10px; }
.b-act-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.b-add { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 14px 4px 10px; border: 1px dashed var(--green); background: transparent; color: var(--green-strong); border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; }
.b-add svg { width: 14px; height: 14px; }
.b-add:hover, .b-add[aria-expanded="true"] { background: var(--green-tint); border-style: solid; }
.b-spacer { flex: 1 1 auto; }
.filters-toggle .badge { margin-left: 2px; }
.b-ask-l { display: block; margin: 0 0 8px; font: 700 17px/1.3 var(--font-head); }
.b-ask-row { display: flex; gap: 8px; }
.b-ask-row input { flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--text); font-size: 15px; }
.b-ask-row input::placeholder { color: var(--faint); }
.b-ask-row .btn { min-height: 40px; padding: 0 18px; border-radius: 9px; }
.b-ask-hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.b-ask-hint a { font-weight: 600; }
.b-ask-note { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--green-tint-2); font-size: 13px; color: var(--text); }
.b-ask-note:empty { display: none; }
.b-examples { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 22px 14px 78px; border-top: 1px solid var(--border); }
.b-ex-l { margin-right: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.b-ex { display: inline-flex; align-items: center; padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13.5px; line-height: 1.4; text-decoration: none; }
.b-ex:hover { border-color: var(--green); background: var(--green-tint); color: var(--green-strong); }
@media (max-width: 719.98px) {
  .builder { margin-top: 14px; }
  .b-main { padding: 14px 12px 14px 4px; } .b-side { padding: 14px 14px 16px; }
  .b-titles { padding-left: 52px; }
  .b-line, .b-row { grid-template-columns: 44px minmax(0, 1fr) 32px; column-gap: 8px; }
  .b-line { grid-template-columns: 44px minmax(0, 1fr); }
  .b-join { font-size: 10.5px; letter-spacing: .05em; }
  .b-empty { margin-left: 52px; }
  .b-off { grid-column: 2 / 4; }
  .b-examples { padding: 12px 14px 14px; }
  .b-ex:nth-of-type(n+5) { display: none; }
}

/* popovers: field menu and value picker */
.b-pop { position: absolute; z-index: 70; width: 380px; max-width: calc(100vw - 24px); max-height: min(480px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; }
.pop-head { padding: 12px 12px 10px; border-bottom: 1px solid var(--border); }
.pop-title { margin: 0 0 8px; font-weight: 700; font-size: 14.5px; }
.pop-op { font-weight: 500; color: var(--muted); }
.pop-search { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 14px; }
.pop-hint { margin: 7px 0 0; font-size: 12px; color: var(--faint); }
.pop-list { overflow: auto; overscroll-behavior: contain; padding: 6px; flex: 1 1 auto; min-height: 0; }
.pop-group + .pop-group { margin-top: 4px; }
.pop-gl { margin: 6px 10px 2px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pop-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 7px 10px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; }
.pop-item:hover, .pop-item:focus-visible { background: var(--green-tint); outline-offset: -2px; }
.pop-item[disabled] { opacity: .5; cursor: default; background: none; }
.pi-l { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 600; font-size: 14px; }
.pi-h { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.pi-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gold-ink); background: var(--gold-tint); border: 1px solid var(--gold-line); border-radius: 999px; padding: 0 6px; line-height: 1.6; }
.pi-tag.used { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.pop-opt { display: flex; align-items: flex-start; gap: 9px; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 14px; line-height: 1.35; }
.pop-opt:hover { background: var(--surface-2); }
.pop-opt input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--green); }
.pop-opt.ind { padding-left: 30px; }
.pop-opt.grp { font-weight: 700; }
.po-l { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.po-s { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.po-n { flex: none; color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pop-foot { display: flex; align-items: center; gap: 6px 10px; padding: 8px 10px; border-top: 1px solid var(--border); background: var(--surface-2); }
.pop-foot .btn { margin-left: auto; }
.b-scrim { position: fixed; inset: 0; z-index: 69; background: rgba(8, 14, 11, .45); }
body.pop-open { overflow: hidden; }
@media (max-width: 719.98px) {
  .b-pop { position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-width: none; max-height: 78vh; border-radius: 16px 16px 0 0; border-bottom: 0; }
  .pop-opt, .pop-item { padding-top: 9px; padding-bottom: 9px; }
  .pop-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

/* the filter drawer ("All filters") */
.layout { padding-bottom: 36px; }
.filters { position: fixed; z-index: 45; top: 0; bottom: 0; left: 0; width: min(400px, 92vw); overflow: auto; overscroll-behavior: contain; padding: 0 18px 28px; background: var(--surface); border-right: 1px solid var(--border); box-shadow: var(--shadow-pop); transform: translateX(-105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
.filters.open { transform: none; visibility: visible; transition: transform .22s ease; }
@media (prefers-reduced-motion: reduce) { .filters, .filters.open { transition: none; } }
body.filters-open::after { content: ""; position: fixed; inset: 0; background: rgba(8, 14, 11, .4); z-index: 44; }
.filters-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; margin: 0 -18px; padding: 14px 18px 10px; background: var(--surface); border-bottom: 1px solid var(--border); }
.filters-head h2 { flex: 1; margin: 0; font: 700 19px/1.2 var(--font-head); }
.filters-sub { margin: 10px 0 2px; font-size: 13px; color: var(--muted); }
.fgroup { border-top: 1px solid var(--border); padding: 12px 0 4px; }
.fgroup:first-child { border-top: 0; }
.fgroup > h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.fgroup .hint { margin: -4px 0 8px; font-size: 12.5px; color: var(--faint); }
.fgroup.people-only.hidden-by-view { display: none; }
.fsub { margin: 10px 0 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.checks { display: grid; gap: 2px; }
.check { display: flex; align-items: flex-start; gap: 8px; padding: 3px 4px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.check:hover { background: var(--surface-2); }
.check input { margin: 3px 0 0; accent-color: var(--green); width: 15px; height: 15px; flex: none; }
.check .lbl { flex: 1; }
.check .n { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tri { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 4px 10px; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--border-strong); }
.seg button[aria-pressed="true"] { background: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: #1f7a55; } }
.row2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.num-in, .sel { border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 8px; background: var(--surface); color: var(--text); font-size: 14px; }
.num-in { width: 76px; }
.sel { max-width: 100%; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.presets button { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.presets button:hover { background: var(--surface-2); color: var(--text); }
details.more-filters > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--green); padding: 8px 0; list-style: none; }
details.more-filters > summary::-webkit-details-marker { display: none; }
details.more-filters > summary::before { content: "+ "; }
details.more-filters[open] > summary::before { content: "– "; }

/* results */
.results { min-width: 0; }
.results:focus { outline: none; }
.results-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin: 0 0 12px; }
.rb-main { flex: 1 1 420px; min-width: 0; }
.result-count { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.result-desc { margin: 5px 0 0; font-size: 14px; line-height: 1.6; }
.rd-k { margin-right: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.rd-c { display: inline-block; max-width: 100%; margin: 1px 0; padding: 0 8px; border-radius: 6px; background: var(--green-tint); border: 1px solid var(--green-tint-2); line-height: 1.6; }
.rd-and { color: var(--muted); font-size: 13px; }
.result-summary { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.rb-tools { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search { position: relative; flex: 1 1 320px; min-width: 0; }
.search input { width: 100%; padding: 10px 12px 10px 38px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 15px; }
.search input::placeholder { color: var(--faint); }
.search-icon { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: var(--faint); }
.search-sm { flex: 0 0 260px; }
.search-sm input { height: 36px; padding: 0 12px 0 34px; font-size: 14px; }
.search-sm .search-icon { left: 11px; width: 16px; height: 16px; }
.dl-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 65; width: 360px; max-width: calc(100vw - 32px); padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); }
.menu-head { margin: 6px 10px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.menu-check { display: flex; align-items: center; gap: 8px; margin: 0 4px 4px; padding: 7px 8px; border-radius: 8px; background: var(--green-tint); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.menu-check input { accent-color: var(--green); width: 15px; height: 15px; margin: 0; }
.menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--green-tint); outline-offset: -2px; }
.mi-l { font-weight: 700; font-size: 14px; }
.mi-h { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
@media (max-width: 719.98px) {
  .rb-tools { flex: 1 1 100%; }
  .search-sm { flex: 1 1 100%; }
  .menu { left: 0; right: auto; }
  .result-count { font-size: 20px; }
}
.view-switch { display: inline-flex; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.view-switch button { border: 0; background: transparent; padding: 6px 16px; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.view-switch button:hover { color: var(--text); }
.view-switch button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 0 0 1px var(--border); }
.view-switch .count { font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; margin-left: 3px; }
.view-switch button[aria-selected="true"] .count { color: var(--green); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--green-tint); color: var(--text); border: 1px solid var(--green-tint-2); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13px; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 5px; border-radius: 999px; }
.chip button:hover { color: var(--text); background: var(--green-tint-2); }
.table-wrap { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 120px); box-shadow: var(--shadow-sm); } /* relative: screen-reader-only text in cells stays inside the scroll area on narrow screens */
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.data th, table.data td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
table.data thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--muted); white-space: nowrap; border-bottom-color: var(--border-strong); }
table.data thead th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
table.data thead th button:hover { color: var(--text); }
table.data thead th .arrow { font-size: 10px; opacity: .35; }
table.data thead th[aria-sort] { color: var(--text); }
table.data thead th[aria-sort] .arrow { opacity: 1; color: var(--green); }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num button { flex-direction: row-reverse; }
td.ctr, th.ctr { text-align: center; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; }
td a.rowlink { color: var(--text); font-weight: 600; text-decoration: none; }
table.data td.w-name { min-width: 220px; }
table.data td.w-chair { min-width: 150px; }
table.data td.w-type { min-width: 120px; }
table.data td.w-prog { min-width: 200px; }
@media (max-width: 719.98px) { table.data td.w-name { min-width: 170px; } table.data td.w-prog { min-width: 160px; } }
td a.rowlink:hover { color: var(--green); text-decoration: underline; }
td a.plink { color: var(--muted); text-decoration: none; }
td a.plink:hover { color: var(--green); text-decoration: underline; }
.zero { color: var(--faint); }
.zero sup { font-size: 10px; margin-left: 1px; }
.yes { color: var(--green); font-weight: 700; }
.dash { color: var(--faint); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--border-strong); color: var(--muted); background: var(--surface); white-space: nowrap; }
.pill.on { background: var(--green-tint); border-color: var(--green-tint-2); color: var(--green-strong); }
.pill.gold { background: var(--gold-tint); border-color: var(--gold-line); color: var(--gold-ink); }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
.more { text-align: center; margin: 12px 0 0; }
.empty { text-align: center; color: var(--muted); padding: 28px 0; }
.table-note { color: var(--faint); font-size: 12.5px; margin: 10px 2px 0; }
@media (max-width: 719.98px) { .col-opt { display: none; } table.data { font-size: 13.5px; } table.data th, table.data td { padding: 7px 8px; } }

/* overlay panel */
.overlay { position: fixed; inset: 0; z-index: 60; }
.scrim { position: absolute; inset: 0; background: rgba(8, 14, 11, .45); }
.panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(900px, 100vw); background: var(--bg); box-shadow: var(--shadow); display: flex; flex-direction: column; outline: none; }
.panel-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.panel-actions { display: flex; gap: 8px; }
.panel-body { overflow: auto; padding: 18px 16px 40px; }
@media (min-width: 720px) { .panel-body { padding: 22px 28px 48px; } }
body.no-scroll { overflow: hidden; }
.d-kicker { margin: 0; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.d-title { margin: 4px 0 4px; font: 700 26px/1.2 var(--font-head); }
.d-sub { margin: 0 0 10px; color: var(--muted); }
.d-pills { margin: 10px 0 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 15px; }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
@media (min-width: 720px) { .facts { grid-template-columns: 1fr 1fr; column-gap: 28px; } }
.facts > div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted); font-size: 13.5px; }
.facts dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.facts dd .sub { display: block; color: var(--muted); font-size: 12.5px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .k { color: var(--muted); font-size: 12.5px; }
.bars { display: grid; gap: 6px; }
.barrow { display: grid; grid-template-columns: 130px 1fr 92px; align-items: center; gap: 10px; font-size: 13.5px; }
.barrow .track { height: 12px; background: var(--bar-track); border-radius: 4px; overflow: hidden; }
.barrow .fill { height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }
.barrow .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .two { grid-template-columns: 1fr 1fr; } }
.note { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.prose p, .prose li { max-width: 72ch; }
.prose h3 { margin-top: 18px; }
.prose dl dt { font-weight: 700; margin-top: 10px; }
.prose dl dd { margin: 2px 0 0 0; color: var(--muted); }

/* footer & toast */
.site-footer { border-top: 1px solid var(--border); color: var(--faint); font-size: 12.5px; padding: 16px 0 26px; }
.site-footer p { margin: 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.footer-inner > p:first-child { max-width: 90ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { color: var(--muted); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #1b2521; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 14px; z-index: 80; box-shadow: var(--shadow); }

/* disambiguation notes */
.search-note { margin: 0 0 10px; padding: 9px 12px; border-radius: 8px; background: var(--gold-tint); border: 1px solid var(--gold-line); color: var(--text); font-size: 13.5px; }
.callout-note { margin: 0 0 16px; padding: 11px 14px; border-radius: var(--radius); background: var(--gold-tint); border: 1px solid var(--gold-line); font-size: 14px; }
.callout-note .sub { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }

/* group summary with figure */
.summary { margin-top: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 16px 14px; scroll-margin-top: 12px; }
.summary:focus { outline: none; }
.summary-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.summary-titles { min-width: 0; flex: 1 1 360px; }
.summary-kicker { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.summary h2 { margin: 0 0 2px; font-size: 18px; }
.summary-sub { margin: 0; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.summary-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.ctl { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sum-fig { margin: 4px 0 12px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.sum-fig svg { display: block; width: 100%; height: auto; }
.sum-table-wrap { max-height: none; }
table.sum-table tbody tr { cursor: default; }
table.sum-table tbody tr:hover td, table.sum-table tbody tr:hover th { background: transparent; }
table.sum-table tbody th { text-align: left; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.sum-table tbody tr:last-child th { border-bottom: 0; }
table.sum-table tr.all th, table.sum-table tr.all td { background: var(--green-tint); font-weight: 700; }
table.sum-table thead th { position: static; }
.summary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.summary-actions .btn:disabled { opacity: .5; cursor: not-allowed; }
table.sum-table td.num { white-space: nowrap; }
@media (max-width: 719.98px) { .summary { padding: 12px; } .summary-controls { width: 100%; } .ctl { flex: 1 1 100%; } .ctl .sel { width: 100%; } .results-actions { flex-wrap: wrap; } table.sum-table th, table.sum-table td { padding: 7px 7px; } }

/* row selection (limits the summary) */
table.data th.sel-col, table.data td.sel-col { width: 1%; padding: 0; text-align: center; vertical-align: top; }
table.data thead th.sel-col { vertical-align: middle; }
table.data thead th.sel-col { z-index: 3; }
.pick-hit { display: flex; align-items: flex-start; justify-content: center; min-width: 40px; min-height: 40px; padding-top: 11px; cursor: pointer; }
thead .pick-hit { align-items: center; padding-top: 0; }
.pick-hit input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); cursor: pointer; }
.pick-hit input:disabled { cursor: default; }
table.data tbody tr.picked td { background: var(--green-tint); }
table.data tbody tr.picked:hover td { background: var(--green-tint-2); }
.selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: var(--green-tint); border: 1px solid var(--green-tint-2); font-size: 13.5px; }
.selbar .sel-text { margin: 0; font-weight: 600; flex: 1 1 100%; }
.sel-items { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.sel-item { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 3px 1px 10px; font-size: 12.5px; }
.sel-item .sel-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.sel-item button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 5px; border-radius: 999px; }
.sel-item button:hover { color: var(--text); background: var(--green-tint-2); }
.sel-more { color: var(--muted); font-size: 12.5px; align-self: center; }
.sel-actions { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.sum-sel { margin: 6px 0 0; display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--green-tint); border: 1px solid var(--green-tint-2); font-size: 13px; font-weight: 600; }
.sum-sel .link-btn { font-size: 13px; }
#fg-chair .checks + .checks { margin-top: 2px; }
@media (max-width: 719.98px) { .sel-item .sel-name { max-width: 220px; } .pick-hit { min-width: 36px; } }
/* listed academic title filter */
#fg-title .ttl-find { width: 100%; margin: 0 0 6px; }
.ttl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin: 0 0 6px; }
.ttl-tools .ttl-count { flex: 1 1 100%; font-size: 12.5px; color: var(--faint); }
.ttl-tools .link-btn { padding-left: 0; font-size: 13px; }
.ttl-list { max-height: 264px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: 8px; padding: 4px; background: var(--surface); }
.ttl-list { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; }
.ttl-list .check { font-size: 13.5px; }
.ttl-list .check .lbl { min-width: 0; overflow-wrap: anywhere; }
.ttl-list .ttl-none { margin: 4px; }
table.data td.w-rank { min-width: 165px; }
table.data td.w-rank .sub { max-width: 240px; }
/* the two title filters are separate areas: normalized rank title and department/program described title */
.fgroup.farea { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); padding: 10px 12px 8px; margin: 10px 0 12px; }
.fgroup.farea:first-child { margin-top: 2px; }
.fgroup.farea + .fgroup:not(.farea) { border-top: 0; padding-top: 4px; }
.fgroup.farea > h3 { color: var(--text); }
.fgroup.farea .check:hover { background: var(--surface); }
.fgroup.farea .ttl-list { background: var(--surface); }
#f-st { flex: 1 1 100%; }
/* Ask the data: plain-language questions */
.ask { max-width: 980px; margin: 0 auto; padding: 18px 0 40px; }
.ask-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ask-head h2 { margin: 4px 0 6px; font: 700 26px/1.2 var(--font-head); }
.ask-sub { margin: 0 0 14px; color: var(--muted); max-width: 78ch; }
.ask-form { display: flex; gap: 8px; margin: 0 0 12px; }
.ask-form input { flex: 1 1 auto; min-width: 0; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 16px; }
.ask-form input::placeholder { color: var(--faint); }
.ask-form .btn { padding: 10px 18px; border-radius: 12px; }
.ask-examples, .ask-follow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; }
.ask-follow { margin: 14px 0 0; }
.ask-try { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.chip-btn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; cursor: pointer; text-align: left; max-width: 100%; }
.chip-btn:hover { background: var(--green-tint); border-color: var(--green-tint-2); color: var(--green-strong); }
.chip-btn .sub { display: block; color: var(--muted); font-size: 12px; }
.ask-choices { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.ask-choices .chip-btn { border-radius: 10px; }
.ask-log { display: grid; gap: 18px; margin: 6px 0 16px; }
.ask-turn { display: grid; gap: 8px; }
.ask-who { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ask-q { justify-self: end; max-width: min(100%, 720px); background: var(--green-tint); border: 1px solid var(--green-tint-2); border-radius: 14px 14px 4px 14px; padding: 10px 14px; }
.ask-q p { margin: 0; font-size: 15px; }
.ask-a { background: var(--surface); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 14px 16px 12px; outline: none; }
.ask-read { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 10px; font-size: 13px; }
.ask-read .k { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.ask-read .chip { padding: 2px 10px; }
.ask-read .chip-m { background: var(--gold-tint); border-color: var(--gold-line); }
.ask-vs, .ask-of { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 0 2px; }
.ask-warn { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: var(--gold-tint); border: 1px solid var(--gold-line); font-size: 13.5px; }
.ask-block { padding: 6px 0 10px; }
.ask-block + .ask-block { border-top: 1px solid var(--border); padding-top: 14px; }
.ask-text { margin: 0 0 10px; font-size: 15px; max-width: 90ch; }
.ask-fig { margin: 4px 0 12px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.ask-fig svg { display: block; width: 100%; height: auto; }
.ask-table { max-height: 480px; margin: 0 0 6px; }
.ask-table table.sum-table th.num .sub { display: block; font-weight: 500; color: var(--faint); font-size: 11.5px; }
.ask-table .pc { color: var(--muted); font-size: 12.5px; }
.ask-table table.data tbody tr { cursor: default; }
.ask-table table.ask-people tbody tr { cursor: default; }
.ask-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.ask-actions-all { margin-top: 12px; }
.ask-meta { margin-top: 10px; text-align: right; }
.ask-meta .link-btn { font-size: 12.5px; color: var(--muted); }
.ask-list { margin: 0 0 6px; padding-left: 20px; }
.ask-list li { margin: 4px 0; max-width: 90ch; }
.ask-foot { max-width: 90ch; }
@media (max-width: 719.98px) { .ask { padding-top: 12px; } .ask-head h2 { font-size: 21px; } .ask-form { flex-direction: column; } .ask-form .btn { justify-content: center; } .ask-a { padding: 12px 12px 10px; } .ask-q { max-width: 100%; } }
.ask, .ask-log, .ask-turn, .ask-a, .ask-q, .ask-block, .ask-table, .ask-fig { min-width: 0; max-width: 100%; }
.ask-read .chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.ask-choices .chip-btn, .ask-follow .chip-btn, .ask-examples .chip-btn { white-space: normal; overflow-wrap: anywhere; }
.ask-q p, .ask-text { overflow-wrap: anywhere; }
.ask-actions .btn { white-space: normal; text-align: left; max-width: 100%; }
.added-note { margin: 4px 0 10px; padding: 6px 10px; border-left: 3px solid var(--gold); background: var(--gold-tint); color: var(--gold-ink); font-size: 12.5px; }
/* About the data: whole-census downloads */
.dl-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.dl-all > span { min-width: 220px; font-weight: 600; }
