:root {
  color-scheme: dark;
  --ink: #f4f7fb;
  --muted: #9aa8ba;
  --subtle: #68778b;
  --bg: #07101d;
  --panel: #0c1726;
  --panel-2: #111e2f;
  --line: rgba(164, 186, 214, .16);
  --line-strong: rgba(164, 186, 214, .28);
  --teal: #20d6c7;
  --teal-soft: rgba(32, 214, 199, .13);
  --gold: #f4b942;
  --gold-soft: rgba(244, 185, 66, .14);
  --orange: #ff8b5c;
  --red: #ff6f7d;
  --blue: #6ca8ff;
  --shadow: 0 24px 80px rgba(0,0,0,.24);
  --surface-glass: rgba(10,21,35,.86);
  --field: #081320;
  --field-2: #0a1625;
  --chip: #101d2d;
  --dialog: #0a1524;
  --raised: #0f1b2b;
  --raised-2: #0f1c2d;
  --card-start: rgba(17,30,47,.95);
  --card-end: rgba(11,23,38,.92);
  --card-sticky-start: #111e2f;
  --card-sticky-end: #0b1726;
  --card-hover-start: rgba(20,36,55,.98);
  --card-hover-end: rgba(12,27,43,.96);
  --summary-start: rgba(17,30,47,.94);
  --summary-end: rgba(10,21,35,.94);
  --summary-lead-start: rgba(22,61,67,.72);
  --summary-lead-end: rgba(11,28,42,.95);
  --body-glow-1: rgba(32,214,199,.10);
  --body-glow-2: rgba(108,168,255,.08);
  --logo-tile: #f7f7f4;
}

:root[data-theme="light"] {
  color-scheme: light;
  --ink: #171a1e;
  --muted: #66707b;
  --subtle: #858d96;
  --bg: #f3f1e9;
  --panel: #fffefa;
  --panel-2: #f8f6ef;
  --line: rgba(26,31,36,.11);
  --line-strong: rgba(26,31,36,.20);
  --teal: #006f91;
  --teal-soft: rgba(0,111,145,.10);
  --gold: #c4942d;
  --gold-soft: rgba(196,148,45,.12);
  --blue: #76bdf2;
  --shadow: 0 20px 55px rgba(38,43,48,.08);
  --surface-glass: rgba(255,254,250,.92);
  --field: #f8f7f2;
  --field-2: #fffefa;
  --chip: #f5f3ec;
  --dialog: #fffefa;
  --raised: #f8f6ef;
  --raised-2: #f5f3ec;
  --card-start: #fff;
  --card-end: #fff;
  --card-sticky-start: #fff;
  --card-sticky-end: #fff;
  --card-hover-start: #fff;
  --card-hover-end: #fff;
  --summary-start: rgba(255,254,250,.98);
  --summary-end: rgba(247,245,237,.98);
  --summary-lead-start: rgba(229,247,249,.98);
  --summary-lead-end: rgba(246,250,246,.98);
  --body-glow-1: rgba(0,142,184,.08);
  --body-glow-2: rgba(196,148,45,.08);
}

* { box-sizing: border-box; }
[hidden] { display: none!important; }
html { scroll-behavior: smooth; overscroll-behavior-y: none; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 14% -10%, var(--body-glow-1), transparent 32rem),
    radial-gradient(circle at 86% 8%, var(--body-glow-2), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font: 500 16px/1.45 "DM Sans", system-ui, sans-serif;
  overscroll-behavior-y: none;
}
.pull-refresh-stage {
  position: fixed;
  z-index: 1;
  inset: 0 0 auto;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 14px;
  background: #1BDBDB;
  color: #041217;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .14s ease, visibility .14s ease;
}
.pull-refresh-logo { width: 58px; height: 58px; display: block; object-fit: contain; }
.pull-refresh-build { display: block; color: rgba(4,18,23,.9); font: 500 11px/1.25 "DM Sans", system-ui, sans-serif; letter-spacing: .02em; text-align: center; }
.pull-refresh-message { font: 700 15px/1.4 "Manrope", system-ui, sans-serif; letter-spacing: .01em; text-align: center; }
.pull-active .pull-refresh-stage { opacity: 1; visibility: visible; }
.pull-active #app-shell,
.pull-active #auth-gate { position: relative; z-index: 2; transform: translate3d(0, var(--pull-offset, 0px), 0); transition: transform .22s cubic-bezier(.2,.75,.25,1); }
.pull-settling #app-shell,
.pull-settling #auth-gate { transition: transform .22s cubic-bezier(.2,.75,.25,1); }
.pull-dragging #app-shell,
.pull-dragging #auth-gate { transition: none; }
.pull-refreshing .pull-refresh-stage { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .pull-refresh-stage,
  .pull-active #app-shell,
  .pull-active #auth-gate,
  .pull-settling #app-shell,
  .pull-settling #auth-gate { transition: none; }
}
.brand-plane { display: none; }
.auth-loading-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  background: #1BDBDB;
  color: #041217;
  text-align: center;
}
.auth-pending .auth-loading-screen { display: grid; }
.auth-pending #auth-gate,
.auth-pending #app-shell,
.auth-pending .skip-link { visibility: hidden; }
.auth-loading-screen img { width: 58px; height: 58px; }
.auth-loading-screen strong { font: 700 15px/1.4 "Manrope", system-ui, sans-serif; letter-spacing: .01em; }
.auth-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(4,18,23,.22);
  border-top-color: #041217;
  border-radius: 50%;
  animation: auth-loading-spin .8s linear infinite;
}
@keyframes auth-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .auth-loading-spinner { animation: none; border-top-color: #041217; }
}
button, input, select { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, .school-card-button:focus-visible {
  outline: 3px solid rgba(32,214,199,.72);
  outline-offset: 2px;
}
.skip-link { position: fixed; left: 16px; top: -48px; z-index: 50; background: var(--teal); color: #03100e; padding: 10px 16px; border-radius: 8px; font-weight: 800; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute!important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.auth-gate {
  --ink: #1d2126;
  --muted: #59636e;
  --subtle: #74808c;
  --line: #e4e2d9;
  --line-strong: #c9c8bf;
  --field-2: #fff;
  --surface-glass: #fff;
  --raised: #f4f3ee;
  min-height: 100svh;
  padding: 28px 18px;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  overflow-y: auto;
  background: #02070d;
}
.auth-gate-layout { width: min(540px, 100%); display: grid; justify-items: stretch; gap: 11px; }
.auth-gate::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -7%;
  background: url("./football-login-bg.jpg") center 62% / cover no-repeat;
  transform: rotate(-1.7deg) scale(1.08);
  filter: saturate(.92) contrast(1.08);
}
.auth-gate::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 72% 44%, rgba(5,156,184,.18), transparent 42%),
    linear-gradient(112deg, rgba(1,6,12,.94) 0%, rgba(3,11,20,.78) 48%, rgba(2,7,13,.89) 100%);
  pointer-events: none;
}
.auth-gate-card {
  width: 100%;
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 28px;
  background: rgba(250,249,245,.97);
  box-shadow: 0 34px 100px rgba(0,0,0,.56);
  position: relative;
  overflow: visible;
}
.beta-starburst {
  width: 92px;
  height: 92px;
  position: absolute;
  z-index: 12;
  top: -37px;
  right: 26px;
  display: grid;
  place-items: center;
  background: #1BDBDB;
  color: #062223;
  clip-path: polygon(50% 0%,61% 17%,79% 7%,80% 28%,100% 29%,84% 44%,98% 58%,77% 62%,82% 83%,62% 75%,50% 100%,39% 77%,19% 88%,22% 65%,0% 58%,17% 43%,2% 27%,24% 25%,25% 5%,42% 18%);
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.24));
  transform: rotate(20deg);
}
.beta-starburst span { font: 900 17px/1 "Manrope", sans-serif; letter-spacing: .08em; transform: rotate(-20deg); }
.auth-gate h1 { margin: 0; font-size: clamp(30px, 7vw, 46px); line-height: 1.02; max-width: 470px; }
.auth-intro { margin: 18px 0 26px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.google-button-host { width: 100%; max-width: 400px; min-height: 44px; margin-inline: auto; display: flex; justify-content: center; }
.google-button-host > div { width: 100%!important; }
.google-button-host iframe { margin-inline: auto!important; }
.google-button-fallback { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; border: 1px solid #747775; border-radius: 4px; background: #fff; color: #1f1f1f; font: 500 14px/20px "Google Sans", "Roboto", Arial, sans-serif; cursor: pointer; }
.google-button-fallback:hover { background: #f8faff; box-shadow: 0 1px 2px rgba(60,64,67,.3); }
.google-button-fallback:focus-visible { outline: 3px solid rgba(66,133,244,.32); outline-offset: 2px; }
.google-mark { width: 18px; height: 18px; flex: 0 0 18px; }
.auth-privacy { margin: 18px 0 0; color: var(--subtle); font-size: 12px; line-height: 1.55; text-align: center; }
.auth-error { margin: 16px 0 0; padding: 11px 13px; border: 1px solid rgba(158,53,64,.28); border-radius: 10px; background: rgba(158,53,64,.08); color: #8e2631; font-size: 13px; }
.auth-gate .provider-button { background: #fff; color: #1d2126; border-color: #bfc4ca; }
.auth-gate .provider-button:hover:not(:disabled) { border-color: #008eb8; background: #f7fcfd; }
.auth-gate .primary-button { background: #1d2126!important; color: #fff!important; border-color: #1d2126!important; text-transform: none!important; letter-spacing: 0!important; }
.auth-gate .primary-button:hover { background: #343a40!important; }
.auth-gate .text-button { color: #006c88!important; background: transparent!important; border-color: transparent!important; text-transform: none!important; letter-spacing: 0!important; }
.auth-gate .eyebrow { text-transform: none; letter-spacing: .035em; font-size: 13px; }
.auth-gate input::placeholder { color: #8a929b; }
.auth-visual { display: none; }
.invite-form { display: grid; gap: 8px; }
.invite-form[hidden], .returning-access[hidden] { display: none; }
.invite-form > label { color: var(--muted); font-size: 13px; font-weight: 800; }
.invite-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.invite-entry input { width: 100%; min-height: 52px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.invite-entry button { min-width: 118px; }
.invite-form small { color: var(--subtle); font-size: 12px; }
.request-code-toggle { width: 100%; min-height: 38px; margin-top: 7px; }
.request-code-toggle[hidden], .request-success[hidden] { display: none; }
.request-code-form { display: grid; gap: 13px; }
.request-code-form[hidden] { display: none; }
.form-kicker { margin: 0 0 4px; color: #006f91; font-size: 13px; font-weight: 700; }
.request-form-heading h2 { margin: 3px 0 7px; }
.request-form-heading p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.request-code-form > label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.request-code-form input[type="text"], .request-code-form input[type="email"], .request-code-form input[inputmode="numeric"] { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--ink); }
.request-code-form label small { color: var(--subtle); font-size: 11px; font-weight: 500; }
.request-positions { margin: 0; padding: 0; border: 0; }
.request-positions legend { margin-bottom: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }
.request-positions legend span { margin-left: 5px; color: var(--subtle); font-size: 11px; font-weight: 500; }
.request-positions > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.request-positions label { min-height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.request-positions input { accent-color: #008eb8; }
.request-honeypot { position: absolute!important; left: -10000px!important; width: 1px!important; height: 1px!important; overflow: hidden!important; }
.request-submit { width: 100%; min-height: 48px; }
.request-success { margin: 0; padding: 11px 13px; border: 1px solid rgba(18,109,105,.22); border-radius: 10px; background: rgba(27,219,219,.11); color: #126d69; font-size: 13px; line-height: 1.45; }
.returning-access { display: grid; gap: 9px; margin: 0 0 20px; }
.returning-access > span { color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; }
.access-divider { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--subtle); font-size: 12px; font-weight: 700; }
.access-divider::before,
.access-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.access-divider[hidden] { display: none; }
.google-access-panel { display: grid; gap: 10px; }
.google-access-panel[hidden] { display: none; }
.invite-confirmed { display: flex; align-items: center; gap: 9px; margin-bottom: 2px; color: #126d69; font-size: 13px; }
.invite-confirmed span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(27,219,219,.2); font-weight: 900; }
.change-invite { justify-self: center; min-height: 34px; }
.beta-canvas-note { margin: 1px auto 0; max-width: 720px; color: rgba(255,255,255,.76); font-size: 12px; line-height: 1.45; text-align: center; }
.legal-footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px 18px; color: var(--subtle); font-size: 12px; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand-mark { width: 25px; height: 25px; flex: 0 0 25px; object-fit: contain; }
.legal-footer nav { display: flex; gap: 16px; }
.legal-footer a { color: inherit; text-decoration: none; }
.legal-footer a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.auth-legal-footer { color: rgba(255,255,255,.62); }
.auth-legal-footer .footer-brand-mark { filter: invert(1); opacity: .82; }
.auth-theme-preview {
  width: 36px;
  height: 36px;
  justify-self: center;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.58);
  opacity: .72;
  transition: opacity .18s ease, border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.auth-theme-preview:hover,
.auth-theme-preview:focus-visible { opacity: 1; color: #fff; border-color: rgba(27,219,219,.58); background: rgba(27,219,219,.12); transform: translateY(-1px); }
.auth-theme-preview-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-theme-preview-sun { display: none; }
.auth-gate.auth-preview-dark .auth-theme-preview-moon { display: none; }
.auth-gate.auth-preview-dark .auth-theme-preview-sun { display: block; }
.app-legal-footer { margin-top: 22px; padding: 18px 0 2px; border-top: 1px solid var(--line); }
.legal-page { min-height: 100svh; background: #f3f4f1; color: #1d2126; }
.legal-page-shell { width: min(800px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 54px; }
.legal-brand { display: inline-flex; align-items: center; gap: 10px; color: #1d2126; text-decoration: none; font-weight: 800; }
.legal-brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #1BDBDB; font-size: 12px; }
.legal-document { margin-top: 28px; padding: clamp(26px, 6vw, 58px); border: 1px solid #d8dad7; border-radius: 22px; background: #fffefa; box-shadow: 0 18px 50px rgba(23,28,32,.08); }
.legal-document h1 { margin: 0; font-size: clamp(32px, 6vw, 48px); }
.legal-updated { margin: 8px 0 30px; color: #737b83; font-size: 13px; }
.legal-document h2 { margin: 30px 0 8px; font-size: 20px; }
.legal-document p, .legal-document li { color: #4f5963; line-height: 1.7; }
.legal-document ul { padding-left: 22px; }
.legal-document a { color: #006f91; }
.legal-page .legal-footer { margin-top: 20px; color: #737980; }
[data-theme="dark"] .app-legal-footer .footer-brand-mark { filter: invert(1); }
.access-expired-panel { align-self: center; padding: clamp(42px, 6vw, 76px); }
.access-expired-panel .primary-button { width: 100%; min-height: 50px; }
.onboarding-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0 20px; }
.onboarding-grid label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.onboarding-grid input, .onboarding-grid select { width: 100%; min-height: 46px; margin: 0; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--ink); }
.onboarding-grid select {
  height: 46px;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%23636b76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  line-height: 46px;
  -webkit-appearance: none;
  appearance: none;
}
.location-help { display: block; color: var(--subtle); font-size: 12px; font-weight: 500; line-height: 1.35; }
.location-autocomplete { position: relative; min-width: 0; height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); }
.location-autocomplete:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(32,214,199,.10); }
.location-autocomplete > input { width: 100%; min-width: 0; height: 100%; padding: 0; border: 0!important; outline: 0!important; background: transparent!important; box-shadow: none!important; color: var(--ink); }
.location-search-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: var(--subtle); stroke-width: 2; stroke-linecap: round; }
.location-autocomplete .search-clear { margin-right: -6px; }
.location-suggestions { position: absolute; z-index: 80; left: 0; right: 0; top: calc(100% + 6px); max-height: 260px; margin: 0; padding: 6px; overflow-y: auto; list-style: none; border: 1px solid #c9c8bf; border-radius: 12px; background: #fff; box-shadow: 0 16px 34px rgba(20,25,30,.18); color: #1d2126; }
.location-suggestions[hidden] { display: none; }
.location-suggestion { width: 100%; padding: 10px 11px; border: 0; border-radius: 8px; background: transparent; color: #1d2126; text-align: left; font-size: 14px; line-height: 1.35; }
.location-suggestion:hover,
.location-suggestion:focus-visible { background: #edf8fa; outline: 2px solid #008eb8; outline-offset: -2px; }
.location-suggestion strong,
.location-suggestion span { display: block; }
.location-suggestion span { margin-top: 2px; color: #66717c; font-size: 12px; }
.location-attribution { padding: 7px 10px 4px; color: #6b747d; font-size: 11px; text-align: right; }
.location-attribution img { display: inline-block; width: 120px; height: auto; }
.onboarding-submit { width: 100%; min-height: 50px; }
.onboarding-signout { width: 100%; margin-top: 9px; }
.visually-hidden { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
.identity-setup { display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: center; gap: 24px; margin: 24px 0 22px; }
.avatar-editor { display: grid; justify-items: center; gap: 9px; text-align: center; }
.avatar-editor img { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; border: 3px solid var(--line-strong); background: var(--logo-tile); }
.avatar-upload-button { display: inline-flex!important; align-items: center; justify-content: center; min-height: 36px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink)!important; background: var(--surface-glass); cursor: pointer; font-size: 12px!important; font-weight: 800!important; }
.avatar-upload-button:hover { border-color: var(--teal); }
.avatar-editor small { color: var(--subtle); font-size: 10px; }
.identity-name-field { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.identity-name-field input { width: 100%; min-height: 52px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--ink); font-size: 17px; }
.onboarding-identity-summary { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; margin: 22px 0 2px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.onboarding-identity-summary img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--logo-tile); }
.onboarding-identity-summary div { display: grid; }
.onboarding-identity-summary span { color: var(--muted); font-size: 12px; }
.onboarding-identity-summary .text-button { min-height: 36px; padding: 0 11px; }

@media (min-width: 960px) {
  body.branded-plane-page:has(#auth-gate:not([hidden])) .brand-plane {
    position: fixed;
    z-index: 2;
    inset: 0 0 auto;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: #1BDBDB;
  }
  body.branded-plane-page:has(#auth-gate:not([hidden])) .brand-plane img {
    width: 50px;
    height: 50px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.13));
  }
  .auth-gate {
    padding: 96px 32px 32px;
    background: #1BDBDB;
  }
  .auth-gate::before,
  .auth-gate::after { display: none; }
  .auth-gate-card {
    width: min(1120px, 100%);
    min-height: min(700px, calc(100svh - 124px));
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid #d8dad7;
    border-radius: 24px;
    background: #faf9f5;
    box-shadow: 0 24px 70px rgba(23,28,32,.13);
  }
  .auth-gate-layout { width: min(1120px, 100%); gap: 12px; }
  .beta-canvas-note { color: rgba(4,18,23,.76); }
  .auth-legal-footer { color: rgba(4,18,23,.68); }
  .auth-legal-footer .footer-brand-mark { filter: none; opacity: .8; }
  .beta-starburst { left: clamp(36px, 6vw, 76px); right: auto; }
  #signin-panel,
  .onboarding-panel,
  .access-expired-panel {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    width: 100%;
    padding: clamp(42px, 6vw, 76px);
  }
  #signin-panel { padding-top: clamp(96px, 8vw, 112px); }
  .auth-visual {
    display: block;
    grid-column: 2;
    grid-row: 1;
    min-height: 100%;
    position: relative;
    overflow: hidden;
    background: #07111b;
    border-radius: 0 24px 24px 0;
  }
  .auth-visual::before {
    content: "";
    position: absolute;
    inset: -7%;
    background: url("./football-login-bg.jpg") 55% 60% / cover no-repeat;
    transform: rotate(-1.7deg) scale(1.09);
    filter: saturate(.95) contrast(1.08);
  }
  .auth-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(145deg, rgba(1,7,12,.22), rgba(1,8,14,.62)),
      radial-gradient(circle at 58% 45%, rgba(0,142,184,.15), transparent 44%);
  }
}

.app-shell { width: min(1540px, 100%); margin: 0 auto; padding: 0 28px 56px; }
:root { --sticky-user-header-height: 108px; }
.topbar { position: sticky; top: 0; z-index: 80; min-height: var(--sticky-user-header-height); display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: var(--bg); box-shadow: none; }
.topbar.is-stuck { box-shadow: 0 6px 12px rgba(0,0,0,.2); }
.topbar-identity { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; }
.header-menu-wrap { position: relative; flex: 0 0 auto; }
.header-menu-trigger { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.header-menu-trigger:hover, .header-menu-trigger[aria-expanded="true"] { background: var(--panel-2); color: var(--ink); }
.header-menu-trigger:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.header-menu-trigger svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.header-menu-drawer { position: fixed; inset: 0 auto 0 0; width: min(360px, 88vw); height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow-y: auto; border: 0; border-right: 1px solid var(--line-strong); background: var(--dialog); color: var(--ink); box-shadow: 14px 0 42px rgba(0,0,0,.28); transform: translateX(-100%); transition: transform .24s cubic-bezier(.2,.75,.25,1); }
.header-menu-drawer[open] { transform: translateX(0); }
.header-menu-drawer::backdrop { background: rgba(3,9,16,.58); backdrop-filter: blur(1px); }
.header-menu-drawer:focus { outline: none; }
.header-menu-drawer-heading { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.header-menu-drawer-heading h2 { font-size: 19px; }
.header-menu-drawer-close { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 400 30px/1 "DM Sans", sans-serif; cursor: pointer; }
.header-menu-drawer-close:hover { background: var(--panel-2); color: var(--ink); }
.header-menu-drawer-close:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.header-menu-drawer-nav { display: grid; gap: 6px; padding: 16px 12px; }
.header-menu-drawer-nav button { min-height: 52px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 700 15px/1.2 "DM Sans", sans-serif; text-align: left; cursor: pointer; }
.header-menu-drawer-nav button:hover { background: var(--panel-2); color: var(--teal); }
.header-menu-drawer-nav button:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .header-menu-drawer { transition: none; } }
.brand-copy { position: relative; min-width: 0; flex: 1; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.brand-copy h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-profile-meta { margin: 4px 0 0; overflow: hidden; color: var(--teal); font: 700 11px/1.2 "Manrope", sans-serif; letter-spacing: .12em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.eyebrow { margin: 0 0 4px; color: var(--teal); font: 700 12px/1.2 "Manrope", sans-serif; letter-spacing: .12em; text-transform: uppercase; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 0; font: 750 clamp(21px, 2vw, 30px)/1.15 "Manrope", sans-serif; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font: 750 22px/1.2 "Manrope", sans-serif; letter-spacing: -.025em; }
h3 { font-family: "Manrope", sans-serif; }


.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 15px; }

.conference-sync-notice { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; padding: 11px 14px; border: 1px solid rgba(32,214,199,.34); border-radius: 14px; background: rgba(32,214,199,.08); color: var(--muted); font-size: 13px; line-height: 1.45; }
.conference-sync-notice[hidden] { display: none; }
.conference-sync-notice svg { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 1px; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.conference-sync-notice p { display: flex; flex-wrap: wrap; gap: 0 5px; margin: 0; }
.conference-sync-notice strong { color: var(--ink); }
.profile-button { min-height: 42px; display: inline-flex; align-items: center; gap: 9px; padding: 5px 11px 5px 6px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-glass); color: var(--ink); text-align: left; }
.profile-button:hover { border-color: var(--teal); }
.profile-button img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.profile-button span { display: grid; line-height: 1.05; }
.profile-button b { font-size: 12px; }
.profile-button small { color: var(--subtle); font-size: 10px; }
.header-avatar-button { width: 60px; height: 60px; min-height: 60px; flex: 0 0 60px; padding: 0; gap: 0; overflow: hidden; border: 0; border-radius: 50%; background: transparent; }
.header-avatar-button:hover { border-color: transparent; box-shadow: 0 0 0 3px rgba(32,214,199,.28); }
.header-avatar-button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.header-avatar-button img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.header-avatar-button span { display: none; }
.theme-toggle { width: 40px; height: 40px; min-height: 40px; flex: 0 0 40px; aspect-ratio: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface-glass); color: var(--ink); font-weight: 700; font-size: 13px; }
.theme-toggle span { display: none; }
.theme-toggle:hover { border-color: var(--teal); }
.theme-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-moon { display: none; }
:root[data-theme="light"] .theme-icon-sun { display: none; }
:root[data-theme="light"] .theme-icon-moon { display: block; }

.summary-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 22px 0; }
.summary-card { width: 100%; min-height: 118px; padding: 19px 21px; display: flex; flex-direction: column; justify-content: center; text-align: left; color: var(--ink); font: inherit; background: linear-gradient(145deg, var(--summary-start), var(--summary-end)); border: 1px solid var(--line); border-radius: 9px; position: relative; overflow: hidden; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.summary-card::after { content:""; position:absolute; inset:auto -20px -36px auto; width:100px; height:100px; border:1px solid rgba(255,255,255,.06); border-radius:50%; }
.summary-card:hover { transform: translateY(-2px); border-color: rgba(32,214,199,.55); }
.summary-card:focus-visible { outline: 3px solid rgba(32,214,199,.38); outline-offset: 3px; }
.summary-card[aria-pressed="true"] { border-color: var(--teal); background: linear-gradient(135deg, var(--summary-lead-start), var(--summary-lead-end)); box-shadow: 0 0 0 2px rgba(32,214,199,.16), var(--shadow); }
.summary-card[aria-pressed="true"] .summary-label { color: var(--teal); }
.summary-label { color: var(--muted); font-size: 14px; }
.summary-card strong { font: 800 32px/1.15 "Manrope", sans-serif; letter-spacing: -.04em; margin: 5px 0 2px; }
.summary-note { color: var(--subtle); font-size: 13px; }
.saved-summary { border-style: dashed; }
.mobile-discovery { display: none; }

.workspace { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 18px; align-items: start; }
.filter-dialog { display: block; position: static; width: auto; max-width: none; height: auto; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: visible; }
.filters, .results-panel { background: var(--surface-glass); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.filters { border-radius: 10px; padding: 20px; position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2b3b4f transparent; }
.filter-dialog-close, .filter-dialog-actions { display: none; }
.filter-heading, .results-toolbar, .weight-label { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.text-button { border: 0; background: transparent; color: var(--teal); padding: 7px 0; font-weight: 700; font-size: 14px; }
.search-combobox { position: relative; min-width: 0; margin: 19px 0; }
.search-field { height: 46px; border: 1px solid var(--line-strong); background: var(--field); border-radius: 12px; display: flex; align-items: center; gap: 9px; padding: 0 12px; margin: 0; }
.search-field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(32,214,199,.10); }
.search-field svg { width: 18px; fill: none; stroke: var(--subtle); stroke-width: 2; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); min-width: 0; }
.search-field input::-webkit-search-cancel-button, .mobile-search-field input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-field input::placeholder { color: #637287; }
.search-clear { width: 32px; height: 32px; flex: 0 0 32px; display: inline-grid; place-items: center; margin-right: -6px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--subtle); }
.search-clear:hover { background: rgba(32,214,199,.12); color: var(--ink); }
.search-clear:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.search-clear svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
input:placeholder-shown + .search-clear { display: none; }
.search-suggestions { position: absolute; z-index: 30; top: calc(100% + 7px); left: 0; right: 0; max-height: min(58vh, 430px); overflow-y: auto; padding: 7px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--dialog); box-shadow: 0 18px 50px rgba(0,0,0,.28); }
.search-suggestion-group + .search-suggestion-group { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); }
.search-suggestion-heading { padding: 6px 8px 5px; color: var(--subtle); font: 800 11px/1.1 "Manrope", sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.search-suggestion { width: 100%; min-height: 50px; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); text-align: left; }
.search-suggestion:hover, .search-suggestion[aria-selected="true"] { background: rgba(32,214,199,.12); }
.search-suggestion-logo { width: 36px; height: 36px; font-size: 10px; }
.search-suggestion-copy { min-width: 0; display: grid; gap: 2px; }
.search-suggestion-copy strong, .search-suggestion-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggestion-copy strong { font: 750 14px/1.25 "Manrope", sans-serif; }
.search-suggestion-copy small { color: var(--muted); font-size: 12px; }
.search-suggestion-facet { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 750 10px/1 "Manrope", sans-serif; }
.filter-group { border-top: 1px solid var(--line); padding: 18px 0 0; margin: 18px 0 0; }
.filter-group > label, .filter-group legend { color: #c2ccda; font-size: 14px; font-weight: 700; }
fieldset.filter-group { border-right: 0; border-bottom: 0; border-left: 0; padding-left: 0; padding-right: 0; }
fieldset.filter-group legend { padding-right: 8px; }
select {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  padding: 0 42px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background-color: var(--field);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%23636b76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.check-stack { display: grid; gap: 9px; margin-top: 12px; }
.conference-filter details { position: relative; margin-top: 8px; }
.conference-filter summary { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field-2); color: var(--ink); cursor: pointer; list-style: none; }
.conference-filter summary::-webkit-details-marker { display: none; }
.conference-filter details[open] summary { border-color: var(--teal); border-radius: 12px 12px 0 0; }
.conference-options { max-height: 290px; overflow-y: auto; border: 1px solid var(--line-strong); border-top: 0; border-radius: 0 0 12px 12px; background: var(--field-2); }
.conference-option { min-height: 40px; display: flex; align-items: center; gap: 9px; padding: 8px 11px; color: var(--ink); font-size: 13px; cursor: pointer; }
.conference-option + .conference-option { border-top: 1px solid var(--line); }
.conference-option-all { font-weight: 750; color: var(--ink); background: color-mix(in srgb, var(--teal) 8%, transparent); }
.conference-option input { accent-color: var(--teal); }
.conference-option:has(input:disabled) { color: var(--subtle); cursor: not-allowed; }
.check-row, .toggle-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; cursor: pointer; }
.check-row input, .toggle-row input { width: 17px; height: 17px; accent-color: var(--teal); }
.check-row b { font-weight: 600; color: #c8d1dd; }
.check-row small { margin-left: auto; color: var(--subtle); }
.split-fields { display: grid; gap: 14px; }
.toggle-row + .toggle-row { margin-top: 10px; }
.weight-card { margin-top: 20px; padding: 15px; background: linear-gradient(145deg, rgba(32,214,199,.09), rgba(108,168,255,.06)); border: 1px solid rgba(32,214,199,.18); border-radius: 7px; }
.weight-label label { font-size: 14px; font-weight: 700; color: #cfd7e1; }
.weight-label strong { color: var(--teal); }
input[type="range"] { width: 100%; accent-color: var(--teal); margin: 14px 0 5px; }
.range-labels { display: flex; justify-content: space-between; color: var(--subtle); font-size: 11px; }

.results-panel { border-radius: 10px; min-height: 720px; overflow: clip; }
.results-toolbar { padding: 21px 24px 18px; border-bottom: 1px solid var(--line); }
.results-toolbar h2 { font-size: 25px; }
.sort-control { display: flex; align-items: center; gap: 10px; }
.sort-control label { color: var(--muted); font-size: 14px; white-space: nowrap; }
.sort-control select { width: 180px; margin: 0; }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; min-height: 0; padding: 0 24px; }
.active-filters:not(:empty) { padding-top: 12px; padding-bottom: 4px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--chip); color: var(--muted); border-radius: 999px; padding: 6px 10px; font-size: 12px; }
.conference-quick-filters { display: flex; flex-wrap: wrap; gap: 7px; padding: 16px 24px 4px; }
.conference-chip { min-height: 32px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--muted); font: 650 12px/1.2 "Manrope", sans-serif; transition: background .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease; }
.conference-chip.is-active { border: 1px solid var(--teal); background: linear-gradient(135deg, var(--summary-lead-start), var(--summary-lead-end)); color: var(--teal); box-shadow: 0 0 0 2px rgba(32,214,199,.16); font-weight: 750; }
.conference-chip.is-unavailable { border-style: dashed; color: var(--subtle); opacity: .55; cursor: help; }
.conference-filter-feedback { margin: 7px 24px 0; padding: 8px 10px; border: 1px solid rgba(244,185,66,.38); border-radius: 9px; background: rgba(244,185,66,.10); color: var(--muted); font-size: 12px; }
.school-list { padding: 12px; display: grid; gap: 8px; }

.school-card {
  position: relative;
  min-height: 204px;
  height: auto;
  background: linear-gradient(120deg, var(--card-start), var(--card-end));
  border: 1px solid var(--school-opportunity-color, var(--line-strong));
  border-radius: 7.5px;
  overflow: clip;
  transition: border-color .18s ease, background .18s ease;
}

.school-card:hover { border-color: var(--school-opportunity-color, var(--line-strong)); background: linear-gradient(120deg, var(--card-hover-start), var(--card-hover-end)); }
:root[data-theme="light"] .school-card,
:root[data-theme="light"] .school-card:hover { border-color: var(--school-opportunity-color, #494d51); }
:root { --sticky-school-header-gap: 0px; }
.school-sticky-zone { position: relative; }
.school-sticky-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.school-sticky-header { position: sticky; top: var(--sticky-user-header-height); z-index: 70; display: grid; grid-template-columns: minmax(0,1fr) auto 42px; align-items: center; margin: -1px -1px 0; border: 1px solid var(--school-opportunity-color, var(--line-strong)); border-bottom: 0; border-radius: 7px 7px 0 0; background: linear-gradient(120deg, var(--card-sticky-start), var(--card-sticky-end)); box-shadow: none; }
:root[data-theme="light"] .school-sticky-header { border-color: var(--school-opportunity-color, #494d51); }
.school-sticky-header.is-stuck { border-radius: 7px 7px 0 0; box-shadow: 0 6px 12px rgba(0,0,0,.2); }
body.has-sticky-school .school-sticky-header.is-stuck { box-shadow: none; }
.school-heading-button { width: 100%; min-width: 0; display: grid; grid-template-columns: 54px 46px minmax(0,1fr); align-items: start; gap: 14px; padding: 13px 12px 12px; border: 0; border-radius: 7px 7px 0 0; color: inherit; background: transparent; text-align: left; }
.school-identity { min-width: 0; display: grid; align-content: center; }
.school-card-button { position: relative; width: 100%; display: grid; grid-template-columns: minmax(250px, 1fr) 208px 22px; align-items: start; gap: 14px; border: 0; color: inherit; background: transparent; padding: 0 132px 0 126px; text-align: left; }
.school-card-footer-spacer { height: 17px; }
.school-details-main { min-width: 0; }
.rank-block { display: grid; place-items: center; border-right: 1px solid var(--line); min-height: 48px; }
.rank-label { color: var(--subtle); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.rank-number { font: 800 19px/1.2 "Manrope", sans-serif; }
.team-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #06111c; background: var(--logo-tile); border: 1px solid rgba(28,34,39,.08); font: 800 13px/1 "Manrope", sans-serif; letter-spacing: -.04em; overflow: hidden; }
.team-mark img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; object-position: center center; }
.team-mark img[hidden] { display: none; }
.team-mark-fallback { width: 100%; height: 100%; display: grid; place-items: center; background: var(--fallback-color, var(--blue)); }
.team-mark-fallback[hidden] { display: none; }
.school-main { min-width: 0; }
.school-title-row { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.team-name { margin: 0 0 2px; font-size: 17px; line-height: 1.2; letter-spacing: -.02em; }
.conference-name { color: var(--subtle); font-size: 12px; }
.tier-pill {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(170px, 34vw);
  margin: 8px 12px 8px 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  font: 800 12px/1.15 ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: normal;
  text-align: center;
}
.school-tier-high, .school-map-tier-high { --school-opportunity-color: #154e32; }
.school-tier-probable, .school-map-tier-probable { --school-opportunity-color: #174e72; }
.school-tier-possible, .school-map-tier-possible { --school-opportunity-color: #67500a; }
.school-tier-low, .school-map-tier-low { --school-opportunity-color: #7a3e12; }
.school-tier-filled, .school-map-tier-filled { --school-opportunity-color: #842b37; }

.tier-high { color: #154e32; background: #ccebd9; }
.tier-probable { color: #174e72; background: #d7eafb; }
.tier-possible { color: #67500a; background: #f4e3a7; }
.tier-low { color: #7a3e12; background: #f4d3b7; }
.tier-filled { color: #842b37; background: #f1cdd2; }
.school-assessment { color: #aeb9c7; margin: 8px 0 0; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.signal-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.signal { border: 1px solid var(--line); border-radius: 999px; color: #8fa0b3; padding: 4px 8px; font-size: 11px; }
.signal.emphasis { border-color: rgba(244,185,66,.25); color: #e9c77b; background: var(--gold-soft); }
.school-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; border-left: 1px solid var(--line); padding-left: 17px; }
.fit-score { grid-column: 1 / -1; }
.fit-score > span, .metric-pair span { display: block; color: var(--subtle); font-size: 11px; }
.fit-score strong { font: 800 22px/1.1 "Manrope", sans-serif; color: var(--teal); }
.score-track { height: 4px; background: rgba(255,255,255,.08); border-radius: 4px; margin-top: 7px; overflow: hidden; }
.score-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #68e5b4); border-radius: inherit; }
.metric-pair strong { display: block; margin-top: 2px; font-size: 13px; color: #d7dfe9; }
.card-chevron { width: 18px; fill: none; stroke: #5e7087; stroke-width: 2; }
.school-map-focus { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 4px; border: 0; background: transparent; color: var(--teal); font: 800 12px/1 "DM Sans", sans-serif; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; cursor: pointer; transition: color .15s ease; }
.school-map-focus:hover:not(:disabled) { color: var(--ink); }
.school-map-focus:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.school-map-focus:disabled { cursor: not-allowed; opacity: .45; }
.school-map-focus svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.school-save-actions { position: absolute; right: 14px; top: 50%; translate: 0 -50%; display: grid; gap: 7px; z-index: 2; }
.save-school { min-width: 104px; height: 36px; display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--field-2); color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1; white-space: nowrap; }
.save-school:hover { color: var(--ink); border-color: var(--teal); }
.save-school[aria-pressed="true"] { color: var(--ink); border-color: var(--teal); background: rgba(32,214,199,.14); box-shadow: inset 0 0 0 1px rgba(32,214,199,.14); }
.save-icon { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.favorite-school[aria-pressed="true"] .save-icon path { fill: currentColor; }
.target-school .target-center { fill: none; }
.target-school[aria-pressed="true"] .target-center { fill: currentColor; }
.save-label { display: inline-block; }
.empty-state { text-align: center; padding: 100px 24px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--muted); }
.primary-button { border: 0; background: var(--teal); color: #03100e; padding: 10px 16px; border-radius: 10px; font-weight: 800; }

.school-dialog { width: min(760px, calc(100vw - 28px)); max-height: min(900px, calc(100vh - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--dialog); color: var(--ink); box-shadow: 0 30px 110px rgba(0,0,0,.35); overflow: hidden; }
.school-dialog::backdrop { background: rgba(2,7,13,.72); backdrop-filter: blur(7px); }
.dialog-shell { position: relative; max-height: inherit; overflow-y: auto; padding: 28px; }
.dialog-close { position: sticky; float: right; top: 0; z-index: 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font-size: 25px; line-height: 1; }
.detail-heading { display: flex; align-items: center; gap: 15px; padding-right: 44px; }
.detail-identity { flex: 1 1 auto; min-width: 0; }
.detail-team-mark { width: 58px; height: 58px; flex: 0 0 auto; border-radius: 50%; }
.detail-team-mark img { width: 100%; height: 100%; }
.detail-kicker { color: var(--teal); text-transform: uppercase; letter-spacing: .11em; font: 700 12px/1.2 "Manrope", sans-serif; }
.detail-title { margin: 0 0 2px; font-size: 17px; line-height: 1.2; letter-spacing: -.02em; }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: var(--muted); }
.detail-tier-pill { max-width: none; margin: 0; }
.detail-confidence { color: var(--muted); font-size: 13px; }
.detail-save-actions { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.secondary-button { min-height: 36px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--field-2); color: var(--ink); font-size: 12px; font-weight: 800; }
.secondary-button:hover { border-color: var(--teal); }
.secondary-button[aria-pressed="true"] { color: #06201a; border-color: var(--teal); background: var(--teal); }
.detail-score-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 22px 0; }
.detail-score { border: 1px solid var(--line); background: var(--raised-2); border-radius: 13px; padding: 13px; }
.detail-score span { color: var(--subtle); font-size: 12px; }
.detail-score strong { display: block; margin-top: 2px; font: 750 20px/1.2 "Manrope", sans-serif; }
.detail-callout { padding: 18px; border: 1px solid rgba(32,214,199,.2); border-radius: 15px; background: linear-gradient(135deg, rgba(32,214,199,.09), rgba(108,168,255,.05)); }
.detail-callout h3 { margin: 0 0 7px; font-size: 14px; color: var(--teal); }
.detail-callout p { margin: 0; color: #c2cddb; }
.detail-section { margin-top: 25px; }
.detail-section h3 { margin: 0 0 11px; font-size: 16px; }
.detail-section > p { color: var(--muted); }
.roster-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.roster-table th { text-align: left; color: var(--subtle); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.roster-table td { padding: 11px 10px; border-bottom: 1px solid rgba(164,186,214,.10); vertical-align: top; }
.roster-table td:last-child { color: var(--muted); }
.roster-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mini-flag { font-size: 10px; padding: 2px 5px; border-radius: 5px; background: rgba(255,255,255,.06); color: #b7c2d0; }
.mini-flag.depart { color: #ffc0c6; background: rgba(255,111,125,.1); }
.mini-flag.projected { color: #7de9df; background: rgba(32,214,199,.1); }
.coach-list { display: grid; gap: 9px; }
.coach-card { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--raised); }
.coach-card-head { display: flex; justify-content: space-between; gap: 10px; }
.coach-card strong { font-family: "Manrope", sans-serif; }
.coach-title { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.coach-links { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.coach-links a { color: var(--teal); font-size: 13px; text-decoration: none; }
.coach-links a:hover { text-decoration: underline; }
.pipeline-box { color: var(--muted); background: var(--raised); border-left: 3px solid var(--gold); padding: 13px 15px; border-radius: 0 10px 10px 0; font-size: 14px; }
.pipeline-box + .pipeline-box { margin-top: 9px; }
.future-offer-box { border-left-color: var(--blue); }
.future-offer-box a { color: var(--teal); text-decoration: none; white-space: nowrap; }
.future-offer-box a:hover { text-decoration: underline; }
.source-note { margin-top: 22px; color: var(--subtle); font-size: 12px; }

.profile-dialog { width: min(800px, calc(100vw - 28px)); max-height: min(920px, calc(100vh - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--dialog); color: var(--ink); box-shadow: 0 30px 110px rgba(0,0,0,.35); overflow: hidden; }
.profile-dialog::backdrop { background: rgba(2,7,13,.72); backdrop-filter: blur(7px); }
.access-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--dialog); color: var(--ink); box-shadow: 0 30px 110px rgba(0,0,0,.4); overflow: hidden; }
.access-dialog::backdrop { background: rgba(2,7,13,.78); backdrop-filter: blur(7px); }
.access-dialog-shell { display: grid; justify-items: center; padding: 32px; text-align: center; }
.access-dialog-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 50%; background: var(--gold); color: #17130a; font: 900 24px/1 "Manrope", sans-serif; }
.access-dialog .eyebrow { margin: 0 0 8px; }
.access-dialog h2 { margin: 0; font: 800 26px/1.15 "Manrope", sans-serif; letter-spacing: -.035em; }
.access-dialog p:not(.eyebrow) { margin: 14px 0 24px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.access-dialog .primary-button { width: 100%; min-height: 48px; }
.profile-shell { position: relative; max-height: inherit; display: flex; flex-direction: column; overflow: hidden; }
.profile-dialog-close { position: absolute; float: none; top: 18px; right: 18px; }
.profile-view-panel { padding-top: 44px; }
.profile-view-hero { display: grid; justify-items: center; padding: 8px 48px 12px; text-align: center; }
.profile-photo-display { display: grid; justify-items: center; gap: 9px; margin-bottom: 20px; }
.profile-photo-display > img { width: clamp(144px, 34vw, 188px); height: clamp(144px, 34vw, 188px); object-fit: cover; border: 3px solid var(--line); border-radius: 50%; background: var(--panel-2); }
.profile-photo-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--bg);
  overscroll-behavior: contain;
}
.profile-photo-dialog::backdrop { background: var(--bg); }
.profile-photo-editor { width: 100%; height: 100%; min-height: 100svh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--bg); }
.profile-photo-editor-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 56px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 18px 8px; border-bottom: 1px solid var(--line); }
.profile-photo-editor-header h2 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 750; text-align: center; }
.profile-photo-editor-cancel,
.profile-photo-editor-done { min-height: 40px; border: 0; background: transparent; font: 750 15px/1 "DM Sans", sans-serif; cursor: pointer; }
.profile-photo-editor-cancel { justify-self: start; padding: 0 8px 0 0; color: var(--muted); }
.profile-photo-editor-done { justify-self: end; min-width: 56px; padding: 0 12px; border-radius: 999px; color: var(--panel); background: var(--teal); }
.profile-photo-editor-done:disabled { opacity: .52; cursor: wait; }
.profile-photo-editor-stage { display: grid; align-content: center; justify-items: center; gap: 18px; min-height: 0; padding: 18px 20px; }
.profile-photo-crop-viewport { position: relative; width: min(82vw, 54vh, 440px); aspect-ratio: 1; overflow: hidden; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--panel-2); touch-action: none; cursor: grab; }
.profile-photo-crop-viewport:active { cursor: grabbing; }
.profile-photo-crop-viewport img { position: absolute; display: block; max-width: none; user-select: none; pointer-events: none; }
.profile-photo-crop-help { margin: 0; color: var(--muted); text-align: center; font-size: 14px; }
.profile-photo-editor-controls { width: min(100%, 520px); justify-self: center; display: grid; gap: 10px; padding: 18px 24px calc(env(safe-area-inset-bottom, 0px) + 20px); border-top: 1px solid var(--line); background: var(--panel); }
.profile-photo-zoom-label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 750; }
.profile-photo-zoom-label > span { display: flex; align-items: center; justify-content: space-between; }
.profile-photo-zoom-label output { color: var(--ink); font-variant-numeric: tabular-nums; }
.profile-photo-zoom-label input { width: 100%; margin: 0; accent-color: var(--teal); }
.profile-photo-crop-status { min-height: 1.4em; margin: 0; color: var(--muted); text-align: center; font-size: 13px; }
@media (max-height: 620px) {
  .profile-photo-editor-stage { grid-template-columns: auto 1fr; justify-items: start; gap: 16px; }
  .profile-photo-crop-viewport { width: min(48vh, 36vw, 440px); }
  .profile-photo-crop-help { align-self: end; padding-bottom: 16px; }
  .profile-photo-editor-controls { grid-column: 1 / -1; }
}
.profile-edit-open { min-height: 38px; margin: 14px 0 26px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel-2); color: var(--teal); font: 800 14px/1 "DM Sans", sans-serif; cursor: pointer; }
.profile-edit-open:hover { border-color: var(--teal); background: var(--teal-soft); }
.profile-view-signout { min-height: 36px; margin-top: 8px; padding: 0 10px; }
.profile-view-hero .eyebrow { margin: 0 0 6px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.profile-view-hero h2 { margin: 0; font-size: clamp(28px, 7vw, 38px); }
.profile-view-hero > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 16px; line-height: 1.45; }
.profile-view-details h3 { margin: 0 0 16px; font-size: 18px; }
.profile-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.profile-facts > div { min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.profile-facts .profile-fact-home { grid-column: 1 / -1; }
.profile-facts dt, .profile-view-ncaa span { color: var(--muted); font-size: 13px; font-weight: 700; }
.profile-facts dd { margin: 4px 0 0; color: var(--ink); font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.profile-view-links-empty { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.profile-view-ncaa { display: grid; gap: 4px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.profile-view-ncaa strong { color: var(--ink); font-size: 16px; letter-spacing: .04em; }
.profile-view-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.profile-view-section-heading h3 { margin: 0; }
.profile-view-section-heading > div { min-width: 0; }
.profile-view-section-heading > div p { margin: 5px 0 0; }
.profile-section-edit { flex: 0 0 auto; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--teal); font: 800 13px/1 "DM Sans", sans-serif; cursor: pointer; }
.profile-section-edit:hover { border-color: var(--teal); background: var(--teal-soft); }
.profile-view-facts { grid-template-columns: 1fr; gap: 0; }
.profile-view-facts .profile-link-fact { grid-column: 1 / -1; padding: 13px 0; border: 0; border-radius: 0; background: transparent; }
.profile-view-facts .profile-link-fact + .profile-link-fact { border-top: 1px solid var(--line); }
.profile-view-url-text { min-width: 0; flex: 1 1 auto; display: block; overflow: hidden; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.profile-link-fact dd { display: flex; align-items: center; gap: 12px; }
.profile-link-fact dd > a, .profile-link-fact dd > span { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.profile-link-fact dd > a { color: var(--ink); text-decoration: none; }
.profile-link-fact dd > a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.profile-view-facts .profile-view-copy { position: static; z-index: auto; flex: 0 0 auto; min-height: 32px; min-width: 0; justify-content: flex-end; padding: 2px 0; color: var(--teal); font-size: 13px; transform: none; }
.profile-view-facts .profile-view-copy svg { width: 16px; height: 16px; }
.profile-view-facts .profile-view-copy:hover:not(:disabled) { color: var(--ink); }
.profile-scroll { min-height: 0; padding: 28px; overflow-y: auto; }
.profile-scroll { min-height: 0; padding: 28px; overflow-y: auto; }
.profile-edit-tools { display: flex; justify-content: center; margin: 0 0 20px; }
.profile-edit-photo { position: relative; width: clamp(144px, 38vw, 188px); aspect-ratio: 1; overflow: hidden; border-radius: 50%; }
.profile-edit-photo > img { width: 100%; height: 100%; display: block; border: 3px solid var(--line); border-radius: 50%; background: var(--panel-2); object-fit: cover; }
.profile-photo-edit-icon { position: absolute; inset: 0; width: 100%; height: 100%; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; appearance: none; background: rgba(0,0,0,.16); color: #fff; opacity: 1; -webkit-tap-highlight-color: transparent; cursor: pointer; transition: none; }
.profile-photo-edit-icon:hover, .profile-photo-edit-icon:active, .profile-photo-edit-icon:focus, .profile-photo-edit-icon:focus-visible { border: 0; background: rgba(0,0,0,.16); color: #fff; opacity: 1; box-shadow: none; outline: 0 !important; transform: none; }
.profile-photo-edit-icon svg { width: 56px; height: 56px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; filter: drop-shadow(0 1px 2px rgba(0,0,0,.38)); }
.profile-grid, .profile-links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 24px; }
.profile-grid label, .profile-links-grid label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.profile-grid input, .profile-links-grid input { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--ink); }
.url-field { display: grid; gap: 7px; min-width: 0; }
.ncaa-id-field { grid-column: 1 / -1; max-width: calc(50% - 7px); }
.url-input-wrap { position: relative; min-width: 0; }
.url-input-wrap input { padding-right: 94px; }
.copy-url-button {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 12px;
  min-width: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  cursor: pointer;
  transform: translateY(-50%);
}
.copy-url-button:hover:not(:disabled) { color: var(--ink); }
.copy-url-button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.copy-url-button:disabled { opacity: .42; cursor: not-allowed; }
.copy-url-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy-url-button.is-copied { background: transparent; color: var(--teal); }
.profile-grid select {
  width: 100%;
  height: 46px;
  min-height: 46px;
  margin-top: 0;
  padding: 0 42px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background-color: var(--field);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%23636b76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  color: var(--ink);
  line-height: 46px;
  -webkit-appearance: none;
  appearance: none;
}
.profile-section { margin-top: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-2); }
.profile-personal-section .profile-grid { margin-top: 0; }
.profile-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.profile-section-heading h3 { margin: 0 0 5px; font-size: 16px; }
.profile-section-heading p { margin: 0; color: var(--muted); font-size: 13px; max-width: 580px; }



.integration-badge { flex: 0 0 auto; border: 1px solid rgba(244,185,66,.25); border-radius: 999px; background: var(--gold-soft); color: #e9c77b; padding: 6px 9px; font-size: 11px; font-weight: 800; }
.provider-grid { display: grid; grid-template-columns: minmax(220px, 360px); gap: 9px; margin-top: 15px; }
.provider-button { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field-2); color: var(--ink); font-weight: 800; }
.provider-button:disabled { cursor: not-allowed; opacity: .56; }
.google-provider { border-color: rgba(108,168,255,.34); }
.integration-badge.connected { color: #154e32; border-color: rgba(32,160,100,.28); background: #ccebd9; }
.profile-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 28px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--dialog); box-shadow: 0 -12px 28px rgba(0,0,0,.08); }
#profile-dialog:not(.is-editing) .profile-footer { display: none; }
.profile-footer .primary-button { width: min(100%, 340px); }
.profile-footer .primary-button:disabled { cursor: not-allowed; opacity: .42; filter: saturate(.45); }
.profile-footer .profile-cancel-button { min-height: 48px; min-width: 112px; padding: 0 20px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel-2); color: var(--muted); font: 750 14px/1 "DM Sans", sans-serif; cursor: pointer; }
.profile-footer .profile-cancel-button:hover { border-color: var(--teal); color: var(--ink); }
.profile-signout-link {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 14px/1 "DM Sans", sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.profile-signout-link:hover { color: var(--teal); }

:root[data-theme="light"] .filter-group > label,
:root[data-theme="light"] .filter-group legend,
:root[data-theme="light"] .check-row b,
:root[data-theme="light"] .weight-label label { color: #30363d; }
:root[data-theme="light"] .search-field input::placeholder,
:root[data-theme="light"] .school-assessment,
:root[data-theme="light"] .signal,
:root[data-theme="light"] .detail-callout p { color: var(--muted); }
:root[data-theme="light"] .signal.emphasis { color: #765615; }
:root[data-theme="light"] .metric-pair strong { color: #30363d; }
:root[data-theme="light"] .score-track { background: rgba(26,31,36,.10); }
:root[data-theme="light"] .tier-low { color: #59636e; }
:root[data-theme="light"] .tier-filled { color: #9e3540; }
:root[data-theme="light"] .mini-flag { background: rgba(26,31,36,.07); color: #56616d; }
:root[data-theme="light"] .mini-flag.depart { color: #9e3540; background: rgba(180,55,67,.09); }
:root[data-theme="light"] .mini-flag.projected { color: #006b78; background: rgba(0,142,184,.1); }
:root[data-theme="light"] .summary-card::after { border-color: rgba(26,31,36,.06); }
:root[data-theme="light"] .school-dialog::backdrop { background: rgba(29,32,35,.42); }
:root[data-theme="light"] .profile-dialog::backdrop { background: rgba(29,32,35,.42); }
:root[data-theme="light"] .access-dialog::backdrop { background: rgba(29,32,35,.52); }
:root[data-theme="light"] .integration-badge { color: #765615; }

/* Two Deep-inspired, high-contrast light controls */
:root[data-theme="light"] button:focus-visible,
:root[data-theme="light"] input:focus-visible,
:root[data-theme="light"] select:focus-visible,
:root[data-theme="light"] .school-card-button:focus-visible {
  outline-color: var(--teal);
  outline-offset: 2px;
}
:root[data-theme="light"] .theme-toggle,
:root[data-theme="light"] .text-button,
:root[data-theme="light"] .primary-button {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}
:root[data-theme="light"] .theme-toggle {
  color: #17191c;
  background: #fff;
  border: 2px solid #cbc9c1;
  border-radius: 50%;
}
:root[data-theme="light"] .theme-toggle:hover {
  color: #fff;
  background: #17191c;
  border-color: #17191c;
}
:root[data-theme="light"] .text-button {
  color: #17191c;
  background: #fff;
  border: 1px solid #cbc9c1;
  border-radius: 6px;
  padding: 7px 10px;
}
:root[data-theme="light"] .text-button:hover {
  color: #fff;
  background: #17191c;
  border-color: #17191c;
}
:root[data-theme="light"] .primary-button {
  color: #fff;
  background: #17191c;
  border: 2px solid #17191c;
  border-radius: 8px;
}
:root[data-theme="light"] .primary-button:hover { background: #33373c; }
:root[data-theme="light"] select {
  color: #17191c;
  background-color: var(--field);
  border-color: var(--line-strong);
  font-weight: 700;
}

select:focus-visible,
.profile-grid input:focus-visible,
.profile-links-grid input:focus-visible,
.onboarding-grid input:focus-visible,
.identity-name-field input:focus-visible {
  outline: 0;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(32,214,199,.10);
}
:root[data-theme="light"] .signal {
  color: #4b4a45;
  background: #fff;
  border-color: #d0cdc4;
  border-radius: 5px;
  font-size: 12px;
}
:root[data-theme="light"] .signal.emphasis {
  color: #4b4a45;
  background: #fff;
  border-color: #aaa79d;
  border-left: 3px solid #b27b00;
}
:root[data-theme="light"] .school-card:hover { border-color: #494d51; }

@media (max-width: 1080px) {
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .workspace { grid-template-columns: 250px minmax(0,1fr); }
  .school-heading-button { grid-template-columns: 45px 42px minmax(0,1fr); gap: 11px; }
  .school-card-button { grid-template-columns: minmax(220px,1fr) 150px 18px; gap: 11px; padding-right: 124px; padding-left: 109px; }
  .school-metrics { grid-template-columns: 1fr; }
  .fit-score { grid-column: auto; }
  .metric-pair:nth-of-type(3) { display: none; }
}

@media (max-width: 820px) {
  .app-shell { padding: 0 14px 32px; }
  :root { --sticky-user-header-height: 88px; }
  .topbar {
    min-height: var(--sticky-user-header-height);
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar-actions { gap: 8px; }
  .summary-grid { display: flex; gap: 8px; margin: 0 -14px; padding: 12px 14px 10px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 14px; scrollbar-width: none; }
  .summary-grid::-webkit-scrollbar { display: none; }
  .summary-card { flex: 0 0 clamp(96px, calc((100vw - 49px) / 3.5), 116px); width: auto; min-width: 0; min-height: 66px; padding: 10px 11px; border-radius: 6px; scroll-snap-align: start; }
  .summary-card strong { margin: 2px 0 0; font-size: 19px; }
  .summary-label { font-size: 11.5px; }
  .summary-note { display: none; }
  .mobile-discovery { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 10px; }
  .mobile-search-combobox { margin: 0; }
  .mobile-search-field { min-width: 0; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); }
  .mobile-search-field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(32,214,199,.10); }
  .mobile-search-field svg, .mobile-filter-button svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .mobile-search-field svg { color: var(--subtle); }
  .mobile-search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
  .mobile-search-combobox .search-suggestions { z-index: 80; max-height: min(48vh, 390px); }
  .mobile-filter-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--ink); font-weight: 750; }
  .mobile-filter-button strong { min-width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--teal); color: #041216; font-size: 11px; }
  .workspace { grid-template-columns: 1fr; }
  .filter-dialog { display: none; }
  .filter-dialog[open] { display: block; position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: min(86vh, 760px); margin: 0; border: 0; border-radius: 24px 24px 0 0; overflow: hidden; background: var(--dialog); box-shadow: 0 -24px 80px rgba(0,0,0,.42); }
  .filter-dialog::backdrop { background: rgba(2,7,13,.68); backdrop-filter: blur(5px); }
  .filter-dialog .filters { position: relative; top: auto; max-height: min(86vh, 760px); padding: 22px 18px 90px; border: 0; border-radius: 24px 24px 0 0; box-shadow: none; overflow-y: auto; }
  .filter-dialog-close { position: absolute; top: 12px; right: 14px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--panel-2); color: var(--ink); font-size: 24px; line-height: 1; }
  .filter-dialog .filter-heading { padding-right: 46px; }
  .filter-dialog .search-combobox { display: none; }
  .filter-dialog-actions { position: sticky; bottom: -90px; z-index: 3; display: block; margin: 22px -18px -90px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--dialog); }
  .filter-dialog-actions .primary-button { width: 100%; min-height: 48px; }
  .split-fields { grid-template-columns: 1fr 1fr; }
  .school-heading-button { grid-template-columns: 42px minmax(0,1fr); gap: 10px; padding: 11px 12px 10px; }
  .school-card-button { grid-template-columns: minmax(0,1fr) 130px 16px; gap: 10px; padding: 0 12px 14px 64px; }
  .rank-block { display: none; }
}

@media (max-width: 590px) {
  body.branded-plane-page {
    --mobile-brand-plane-height: clamp(96px, 14svh, 112px);
    background: #1BDBDB;
  }
  .brand-plane {
    position: fixed;
    z-index: 0;
    inset: 0 0 auto;
    height: var(--mobile-brand-plane-height);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
    pointer-events: none;
    background: #1BDBDB;
    box-shadow: inset 0 -1px rgba(0,0,0,.08), 0 12px 26px rgba(4,25,27,.16);
  }
  .brand-plane img {
    width: 50px;
    height: 50px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.13));
  }
  .branded-plane-page .auth-gate,
  .branded-plane-page .app-shell { position: relative; z-index: 1; box-shadow: 0 -10px 24px rgba(4,25,27,.14); }
  .branded-plane-page .auth-gate {
    margin-top: var(--mobile-brand-plane-height);
    min-height: calc(100svh - var(--mobile-brand-plane-height));
  }
  .branded-plane-page .app-shell {
    min-height: 100svh;
    background:
      radial-gradient(circle at 14% -10%, var(--body-glow-1), transparent 32rem),
      radial-gradient(circle at 86% 8%, var(--body-glow-2), transparent 28rem),
      var(--bg);
  }
  .invite-entry { grid-template-columns: 1fr; }
  .invite-entry button { width: 100%; }
  .auth-gate { padding: 0; align-items: start; background: #02070d; }
  .auth-gate-layout { width: 100%; gap: 12px; }
  .auth-gate-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.42);
  }
  .auth-gate::before,
  .auth-gate::after { display: none; }
  .auth-visual {
    order: -1;
    display: block;
    width: 100%;
    height: clamp(190px, 54vw, 230px);
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    background: #07111b;
  }
  .auth-visual::before {
    content: "";
    position: absolute;
    inset: -5%;
    background: url("./football-login-bg.jpg") 55% 63% / cover no-repeat;
    transform: scale(1.06);
    filter: saturate(.98) contrast(1.08);
  }
  .auth-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(1,7,12,.08), rgba(1,7,12,.55));
  }
  #signin-panel,
  .onboarding-panel,
  .access-expired-panel { padding: 38px 22px 28px; }
  .beta-starburst { width: 76px; height: 76px; top: 158px; right: 18px; }
  .beta-starburst span { font-size: 14px; }
  .auth-gate h1 { max-width: 310px; font-size: clamp(29px, 8.5vw, 36px); line-height: 1.02; }
  .auth-gate .eyebrow { margin-bottom: 7px; font-size: 12px; }
  .auth-intro { margin: 13px 0 20px; font-size: 15px; line-height: 1.48; }
  .returning-access { margin: 0 0 18px; }
  .auth-privacy { display: none; }
  .beta-canvas-note { padding: 0 22px; }
  .auth-legal-footer { padding: 0 18px 18px; }
  .auth-theme-preview { margin: -4px 0 18px; }
  .profile-dialog { width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .onboarding-grid { grid-template-columns: 1fr; }
  .identity-setup { grid-template-columns: 1fr; }
  h1 { font-size: 18px; }
  .brand-copy .eyebrow { display: none; }
  .header-profile-meta { margin-top: 3px; font-size: 10px; letter-spacing: .1em; }
  .theme-toggle { width: 40px; padding: 0; justify-content: center; }
  .theme-toggle span { display: none; }
  .header-avatar-button { width: 60px; height: 60px; min-height: 60px; flex-basis: 60px; padding: 0; }

  .summary-grid { gap: 7px; }
  .summary-card { min-height: 62px; min-width: 0; padding: 9px 10px; border-radius: 5.5px; }
  .summary-card strong { font-size: 18px; }
  .mobile-filter-button span { display: none; }
  .mobile-filter-button { width: 44px; padding: 0; }
  .mobile-filter-button:has(strong:not([hidden])) { width: auto; padding: 0 9px; }
  .filters, .results-panel { border-radius: 8px; }
  .split-fields { grid-template-columns: 1fr; }
  .results-toolbar { align-items: flex-end; padding: 18px 16px; }
  .results-toolbar h2 { font-size: 21px; }
  .conference-quick-filters { gap: 6px; padding: 13px 16px 3px; }
  .conference-chip { min-height: 31px; padding: 6px 10px; font-size: 11.5px; }
  .conference-filter-feedback { margin: 7px 16px 0; }
  .sort-control { display: block; }
  .sort-control label { display: block; margin-bottom: 4px; }
  .sort-control select { width: 145px; }
  .results-panel { width: calc(100% + 28px); margin-right: -14px; margin-left: -14px; }
  .school-list { padding: 12px; gap: 12px; }
  .school-heading-button { grid-template-columns: 38px minmax(0,1fr); gap: 10px; padding: 11px 12px 10px; }
  .school-card-button {
    grid-template-columns: minmax(0,1fr) 34px;
    grid-template-areas: "school-details school-affordance" "school-metrics school-metrics";
    align-items: center;
    column-gap: 12px;
    row-gap: 8px;
    padding: 0 12px 0 60px;
  }
  .school-details-main {
    grid-area: school-details;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-2);
  }
  .school-card-footer-spacer { height: 61px; }
  .team-mark { width: 38px; height: 38px; border-radius: 50%; }
  .school-save-actions { top: auto; right: 12px; bottom: 11px; translate: 0; display: flex; }
  .school-metrics { grid-area: school-metrics; grid-column: 1 / -1; border: 0; padding: 8px 0 0; grid-template-columns: 1fr 1fr; }
  .fit-score { grid-column: 1 / -1; }
  .metric-pair:nth-of-type(3) { display: block; }
  .card-chevron {
    grid-area: school-affordance;
    position: static;
    align-self: center;
    justify-self: center;
    width: 30px;
    height: 30px;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--panel-2);
    fill: none;
    stroke: var(--teal);
    stroke-width: 2.4;
  }
  .tier-pill { display: inline-flex; max-width: min(148px, 34vw); margin: 8px 10px 8px 0; padding: 5px 7px; font-size: 10px; }
  .school-assessment { -webkit-line-clamp: 3; }
  .detail-score-row { grid-template-columns: 1fr 1fr; }
  .detail-score:last-child { grid-column: 1 / -1; }
  .dialog-shell { padding: 21px 16px; }
  .detail-title { overflow-wrap: anywhere; }
  .detail-heading { align-items: flex-start; flex-wrap: wrap; padding-right: 0; gap: 10px 12px; }
  .detail-identity { flex: 1 1 calc(100% - 70px); width: auto; }
  .detail-save-actions { width: 100%; margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .detail-save-actions .save-school { width: 100%; min-width: 0; justify-content: center; }
  .profile-scroll { padding: 21px 16px; }
  .profile-avatar-editor { gap: 3px; }
  .profile-avatar-editor img { width: 46px; height: 46px; border-width: 0; }
  .profile-avatar-editor label { min-height: 22px; font-size: 10.5px; }
  .profile-avatar-editor label svg { width: 12px; height: 12px; flex-basis: 12px; }
  .profile-grid, .profile-links-grid, .provider-grid { grid-template-columns: 1fr; }
  .profile-footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .profile-footer .primary-button { width: auto; flex: 1 1 auto; }
  .profile-footer .profile-cancel-button { flex: 0 0 auto; }
  .profile-signout-link { flex: 0 0 auto; }
  .ncaa-id-field { max-width: none; }
  .roster-table th:nth-child(4), .roster-table td:nth-child(4) { display: none; }
}

/* Wide landscape login: fixed form rail + fluid photo; portrait tablets keep the card layout above. */
@media (min-width: 960px) and (orientation: landscape) {
  body.branded-plane-page:has(#auth-gate:not([hidden])) .brand-plane {
    position: fixed;
    z-index: 8;
    inset: 24px auto auto 0;
    width: 460px;
    height: 48px;
    padding-left: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    pointer-events: none;
    background: transparent;
  }
  body.branded-plane-page:has(#auth-gate:not([hidden])) .brand-plane::after {
    content: "BETA";
    color: #1d2126;
    font: 800 12px/1 "Manrope", sans-serif;
    letter-spacing: .12em;
  }
  body.branded-plane-page:has(#auth-gate:not([hidden])) .brand-plane img {
    width: 38px;
    height: 38px;
    padding: 0;
    display: block;
    object-fit: contain;
    filter: none;
  }
  .auth-gate {
    min-height: 100svh;
    padding: 0;
    display: block;
    overflow: hidden;
    background: #02070d;
  }
  .auth-gate-layout {
    position: relative;
    width: 100%;
    min-height: 100svh;
    gap: 0;
  }
  .auth-gate-card {
    width: 100%;
    min-height: 100svh;
    display: grid;
    grid-template-columns: 460px minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
  }
  #signin-panel,
  .onboarding-panel,
  .access-expired-panel {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    width: 460px;
    min-height: 100svh;
    max-height: 100svh;
    padding: 88px 48px 126px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    background: #faf9f5;
  }
  #signin-panel[hidden],
  .onboarding-panel[hidden],
  .access-expired-panel[hidden] { display: none; }
  .auth-visual {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 100svh;
    border-radius: 0;
  }
  .auth-visual::before {
    inset: -5%;
    background-position: 55% 58%;
    transform: rotate(-1.2deg) scale(1.08);
  }
  .auth-visual::after {
    background:
      linear-gradient(180deg, rgba(1,7,12,.24), rgba(1,8,14,.58)),
      radial-gradient(circle at 58% 42%, rgba(0,142,184,.14), transparent 44%);
  }
  .beta-starburst { display: none; }
  .beta-canvas-note {
    position: absolute;
    z-index: 9;
    left: 48px;
    right: auto;
    bottom: 28px;
    width: 364px;
    max-width: none;
    margin: 0;
    color: #66717c;
    text-align: left;
  }
  .auth-legal-footer {
    position: absolute;
    z-index: 5;
    left: 460px;
    right: 0;
    bottom: 24px;
    width: auto;
    padding-inline: 32px;
    color: rgba(255,255,255,.76);
  }
  .auth-legal-footer .footer-brand-mark {
    filter: invert(1);
    opacity: .86;
  }
  .auth-theme-preview {
    position: absolute;
    z-index: 6;
    top: 26px;
    right: 28px;
    margin: 0;
  }
}

/* Signed-out dark-mode preview: intentionally transient and scoped to the login experience. */
.auth-gate.auth-preview-dark {
  --ink: #f4f7fb;
  --muted: #b4c0ce;
  --subtle: #8c9aaa;
  --line: rgba(164,186,214,.18);
  --line-strong: rgba(164,186,214,.36);
  --field: #0b1726;
  --field-2: #0b1726;
  --surface-glass: #0b1726;
  --raised: #111e2f;
  background: #02070d;
  color: #f4f7fb;
}
.auth-gate.auth-preview-dark h1 { color: #f4f7fb; }
.auth-gate.auth-preview-dark .auth-gate-card { border-color: rgba(164,186,214,.22); background: rgba(7,16,29,.98); box-shadow: 0 34px 100px rgba(0,0,0,.7); }
.auth-gate.auth-preview-dark .invite-entry input,
.auth-gate.auth-preview-dark .request-code-form input[type="text"],
.auth-gate.auth-preview-dark .request-code-form input[type="email"],
.auth-gate.auth-preview-dark .request-code-form input[inputmode="numeric"],
.auth-gate.auth-preview-dark .request-positions label,
.auth-gate.auth-preview-dark .onboarding-grid input,
.auth-gate.auth-preview-dark .onboarding-grid select,
.auth-gate.auth-preview-dark .identity-name-field input { border-color: var(--line-strong); background: #0b1726; color: var(--ink); }
.auth-gate.auth-preview-dark input::placeholder { color: #78879a; }
.auth-gate.auth-preview-dark .primary-button { border-color: #1bdbdb!important; background: #1bdbdb!important; color: #031314!important; }
.auth-gate.auth-preview-dark .primary-button:hover { background: #55e5df!important; }
.auth-gate.auth-preview-dark .text-button { color: #55dfe0!important; }
.auth-gate.auth-preview-dark .form-kicker,
.auth-gate.auth-preview-dark .legal-footer a:hover { color: #55dfe0; }
.auth-gate.auth-preview-dark .request-success,
.auth-gate.auth-preview-dark .invite-confirmed { color: #7ce8e3; }
.auth-gate.auth-preview-dark .auth-error { border-color: rgba(255,111,125,.35); background: rgba(255,111,125,.1); color: #ff9aa5; }
.auth-gate.auth-preview-dark .beta-canvas-note { color: rgba(244,247,251,.76); }
.auth-gate.auth-preview-dark .auth-legal-footer { color: rgba(244,247,251,.62); }
.auth-gate.auth-preview-dark .auth-legal-footer .footer-brand-mark { filter: invert(1); opacity: .82; }

@media (min-width: 960px) {
  .auth-gate.auth-preview-dark { background: #02070d; }
  .auth-gate.auth-preview-dark #signin-panel,
  .auth-gate.auth-preview-dark .onboarding-panel,
  .auth-gate.auth-preview-dark .access-expired-panel {
    background: #07101b;
    box-shadow: 10px 0 30px rgba(0,0,0,.24);
  }
  .auth-gate.auth-preview-dark .beta-canvas-note {
    color: rgba(244,247,251,.7);
  }
  body.branded-plane-page:has(#auth-gate.auth-preview-dark:not([hidden])) .brand-plane::after {
    color: #f4f7fb;
  }
  body.branded-plane-page:has(#auth-gate.auth-preview-dark:not([hidden])) .brand-plane img {
    filter: invert(1) drop-shadow(0 3px 6px rgba(0,0,0,.2));
  }
}

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


/* Compact landscape login: reuse the desktop form rail and photo composition on phones. */
@media (min-width: 600px) and (max-width: 959px) and (orientation: landscape) and (max-height: 600px) {
  body.branded-plane-page:has(#auth-gate:not([hidden])) .brand-plane {
    position: fixed;
    z-index: 8;
    inset: calc(env(safe-area-inset-top, 0px) + 10px) auto auto calc(env(safe-area-inset-left, 0px) + 18px);
    width: min(48vw, 430px);
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    pointer-events: none;
    background: transparent;
  }
  body.branded-plane-page:has(#auth-gate:not([hidden])) .brand-plane::after {
    content: "BETA";
    color: #1d2126;
    font: 800 11px/1 "Manrope", sans-serif;
    letter-spacing: .12em;
  }
  body.branded-plane-page:has(#auth-gate:not([hidden])) .brand-plane img {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
    filter: none;
  }
  .auth-gate {
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    padding: 0;
    display: block;
    overflow: hidden;
    background: #02070d;
  }
  .auth-gate::before,
  .auth-gate::after { display: none; }
  .auth-gate-layout {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    gap: 0;
  }
  .auth-gate-card {
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(340px, 48vw) minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
  }
  #signin-panel,
  .onboarding-panel,
  .access-expired-panel {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    max-height: 100dvh;
    padding: 54px clamp(24px, 4vw, 38px) 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-padding-block: 54px 18px;
    background: #faf9f5;
  }
  #signin-panel:focus-within,
  .onboarding-panel:focus-within { scroll-behavior: smooth; }
  #signin-panel input,
  #signin-panel select,
  .onboarding-panel input,
  .onboarding-panel select,
  .onboarding-panel button { scroll-margin-block: 18px; }
  .auth-visual {
    display: block;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 100svh;
    height: 100dvh;
    border-radius: 0;
  }
  .beta-starburst,
  .beta-canvas-note { display: none; }
  .auth-legal-footer {
    position: fixed;
    z-index: 8;
    left: max(340px, 48vw);
    right: 0;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
    width: auto;
    padding-inline: 12px;
    color: rgba(255,255,255,.76);
    font-size: 10px;
  }
  .auth-legal-footer .footer-brand-mark { filter: invert(1); opacity: .82; }
  .auth-theme-preview {
    position: fixed;
    z-index: 9;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    margin: 0;
  }
  .auth-gate.auth-preview-dark .auth-gate-card { background: rgba(7,16,29,.98); }
  .auth-gate.auth-preview-dark #signin-panel,
  .auth-gate.auth-preview-dark .onboarding-panel,
  .auth-gate.auth-preview-dark .access-expired-panel { background: #07101b; }
}

.school-sticky-surface { display: contents; }

/* Keep the mobile profile shadow and school-header clearance stable while scrolling. */
@media (max-width: 820px) {
  :root { --sticky-school-header-gap: 12px; }
  .topbar {
    padding-bottom: 0;
    box-shadow: 0 6px 12px rgba(0,0,0,.2);
  }
  .topbar.is-stuck,
  html.standalone-app .topbar,
  html.standalone-app .topbar.is-stuck,
  html.standalone-app body.has-sticky-school .topbar.is-stuck {
    box-shadow: 0 6px 12px rgba(0,0,0,.2);
  }
  .school-card {
    position: relative;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .school-sticky-header,
  .school-sticky-header.is-stuck {
    position: sticky;
    top: var(--sticky-user-header-height);
    z-index: 90;
    display: block;
    margin: -1px -1px 0;
    padding: var(--sticky-school-header-gap) 0 0;
    border: 0;
    border-radius: 0;
    background: var(--panel);
    isolation: isolate;
    box-shadow: none;
  }
  .school-sticky-surface {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto 42px;
    align-items: center;
    isolation: isolate;
    overflow: visible;
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: var(--card-sticky-start);
  }
  :root[data-theme="light"] .school-sticky-surface {
    border-color: #494d51;
  }
  .school-card-button {
    width: calc(100% + 2px);
    margin-inline: -1px;
    border: 0 solid var(--line-strong);
    border-right-width: 1px;
    border-left-width: 1px;
    border-radius: 0;
    background: linear-gradient(120deg, var(--card-start), var(--card-end));
  }
  :root[data-theme="light"] .school-card-button {
    border-color: #494d51;
  }
  .school-card-footer {
    position: static;
    width: calc(100% + 2px);
    min-height: 0;
    margin-inline: -1px;
    border: 0 solid var(--line-strong);
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-radius: 0 0 7.5px 7.5px;
    background: linear-gradient(120deg, var(--card-start), var(--card-end));
  }
  :root[data-theme="light"] .school-card-footer {
    border-color: #494d51;
  }
  html.standalone-app .app-shell {
    padding-top: var(--sticky-user-header-height);
  }
  html.standalone-app .topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    width: 100%;
    min-height: var(--sticky-user-header-height);
    margin: 0;
    padding-inline: 14px;
    isolation: isolate;
  }
}


/* Results view tabs and Google Maps school pins */
.results-view-tabs {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin: 18px clamp(16px, 3vw, 28px) 14px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.results-view-tab {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 1px 10px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: .95rem;
  font-weight: 650;
  cursor: pointer;
  transition: color .15s ease;
}
.results-view-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .15s ease;
}
.results-view-tab:hover { color: var(--ink); }
.results-view-tab[aria-selected="true"] {
  color: var(--ink);
}
.results-view-tab[aria-selected="true"]::after {
  transform: scaleX(1);
}
.results-view-tab:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}
.results-view-panel[hidden] { display: none !important; }
.map-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px clamp(16px, 3vw, 28px);
}
.map-view-toolbar p { margin: 0; color: var(--muted); font-size: .95rem; }
.map-view-actions { display: flex; align-items: center; gap: 8px; }
.map-zoom-button, .map-reset-button {
  min-height: 42px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: var(--panel);
  font-weight: 750;
}
.map-zoom-button { width: 44px; font-size: 1.35rem; line-height: 1; }
.map-zoom-button:hover, .map-reset-button:hover { border-color: var(--teal); background: var(--teal-soft); }
.map-reset-button { padding: 0 17px; }
.school-map-status { margin: 12px 18px; color: var(--muted); text-align: center; }
.school-map-canvas {
  display: block;
  width: 100%;
  height: min(680px, 68vh);
  min-height: 480px;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--panel-2);
  touch-action: pan-x pan-y;
}
.school-map-logo-pin {
  display: grid;
  width: 58px;
  height: 58px;
  padding: 4px;
  place-items: center;
  border: 3px solid var(--school-opportunity-color, var(--teal));
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .22);
  overflow: hidden;
  cursor: pointer;
}
.school-map-focused { outline: 4px solid var(--teal); outline-offset: 4px; box-shadow: 0 0 0 9px rgba(32,214,199,.22), 0 2px 8px rgba(15, 23, 42, .22); transform: scale(1.12); z-index: 2000!important; }
.school-map-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.school-map-pin-no-logo {
  color: #17202a;
  font: 800 14px/1 "Manrope", sans-serif;
  text-align: center;
}
.school-map-cluster-pin {
  display: grid;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #087c91;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .28);
  font: 800 15px/1 "Manrope", sans-serif;
}
.school-map-distance-label {
  padding: 3px 6px;
  border-radius: 5px;
  color: #66717c;
  background: rgba(255,255,255,.88);
  font: 700 12px/1.2 "DM Sans", sans-serif;
  white-space: nowrap;
}
.school-map-home-label {
  padding: 3px 6px;
  border: 1px solid rgba(8,124,145,.25);
  border-radius: 5px;
  color: #087c91;
  background: rgba(255,255,255,.94);
  font: 700 12px/1.2 "DM Sans", sans-serif;
  white-space: nowrap;
}
.school-map-status-error { color: #842b37; }
.map-empty-state { padding: 12px 18px; margin: 0; color: var(--muted); text-align: center; }
.map-source-note { margin: 8px clamp(16px, 3vw, 28px) 16px; color: var(--subtle); font-size: .82rem; }
@media (max-width: 600px) {
  .results-view-tabs { margin-block: 14px 10px; }
  .results-view-tab { min-height: 36px; padding: 6px 8px; font-size: .95rem; }
  .map-view-toolbar { align-items: flex-start; flex-direction: column; }
  .school-map-canvas {
    height: 50vh;
    height: 50dvh;
    min-height: 50vh;
  }
  .school-map-logo-pin { width: 54px; height: 54px; }
}


/* One-time beta tester update */
.whats-new-dialog {
  width: min(560px, calc(100vw - 32px));
  max-width: 560px;
  max-height: min(780px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
}
.whats-new-dialog::backdrop {
  background: rgba(5, 12, 17, .76);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.whats-new-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(780px, calc(100dvh - 32px));
  overflow: hidden;
}
.whats-new-visual {
  position: relative;
  display: grid;
  min-height: 132px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 120%, rgba(27,219,219,.13), transparent 48%),
    #050708;
}
.whats-new-brand-mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(0,0,0,.38);
}
.whats-new-brand-mark img {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  object-fit: cover;
}
.whats-new-dialog .dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  float: none;
  border-color: rgba(255,255,255,.18);
  color: #fff;
  background: rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.whats-new-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 32px 24px;
}
.whats-new-scroll .eyebrow {
  margin: 0 0 7px;
}
.whats-new-scroll h2 {
  margin: 0 0 10px;
  font: 800 clamp(1.65rem, 4vw, 2.1rem)/1.08 "Manrope", sans-serif;
  letter-spacing: -.04em;
}
.whats-new-intro {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.55;
}
.whats-new-groups {
  display: grid;
  gap: 22px;
}
.whats-new-group {
  display: grid;
  gap: 14px;
}
.whats-new-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--subtle);
  font: 700 .75rem/1 "Manrope", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.whats-new-separator::before,
.whats-new-separator::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: var(--line);
}
.whats-new-separator span {
  flex: 0 0 auto;
}
.whats-new-marker {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
}
.whats-new-marker-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--teal);
}
.whats-new-marker-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.whats-new-marker-content {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.whats-new-marker-content strong {
  color: var(--ink);
  font: 700 .96rem/1.35 "Manrope", sans-serif;
}
.whats-new-marker-content small {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
}
.whats-new-footer {
  padding: 16px 32px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.whats-new-continue {
  width: 100%;
  min-height: 48px;
}
@media (max-width: 600px) {
  .whats-new-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
  }
  .whats-new-shell {
    max-height: calc(100dvh - 20px);
  }
  .whats-new-visual {
    min-height: 108px;
  }
  .whats-new-brand-mark {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }
  .whats-new-brand-mark img {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }
  .whats-new-dialog .dialog-close {
    top: 12px;
    right: 12px;
  }
  .whats-new-scroll {
    padding: 24px 22px 20px;
  }
  .whats-new-scroll h2 {
    font-size: 1.55rem;
  }
  .whats-new-groups {
    gap: 20px;
  }
  .whats-new-footer {
    padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  }
}


/* Keep filters, profile, and school details full-viewport on touch devices. */
@media (max-width: 820px) {
  #school-dialog,
  #profile-dialog,
  #filter-dialog[open] {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    overscroll-behavior: none;
  }
  #school-dialog .dialog-shell {
    width: 100%;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  #profile-form {
    width: 100%;
    height: 100%;
    max-height: 100%;
  }
  #profile-dialog .profile-scroll {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  #filter-dialog[open] {
    padding: 0;
    overflow: hidden;
    background: var(--dialog);
    box-shadow: none;
  }
  #filter-dialog .filters {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    padding: calc(22px + env(safe-area-inset-top)) 18px calc(92px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  #filter-dialog .filter-dialog-close {
    top: calc(12px + env(safe-area-inset-top));
    right: 14px;
  }
  #filter-dialog .filter-heading { padding-right: 46px; }
  #filter-dialog .search-combobox { display: none; }
  #filter-dialog .filter-dialog-actions {
    position: fixed;
    inset: auto 0 0;
    z-index: 3;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--dialog);
  }
  #filter-dialog .filter-dialog-actions .primary-button { width: 100%; min-height: 48px; }
}
/* Profile edit footer: equal controls with a consistent size and shape. */
.profile-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.profile-footer .primary-button,
.profile-footer .profile-cancel-button { width: 100%; min-width: 0; min-height: 48px; padding: 0 12px; border-radius: 12px; font-family: "DM Sans", sans-serif; font-size: 14px; font-weight: 800; line-height: 1; letter-spacing: 0; text-transform: none; }
:root[data-theme="light"] .profile-footer .primary-button,
:root[data-theme="light"] .profile-footer .profile-cancel-button { font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; letter-spacing: .055em; text-transform: uppercase; }

/* Keep modal close controls visually steady after tap or keyboard focus. */
.dialog-close:focus, .dialog-close:focus-visible,
.filter-dialog-close:focus, .filter-dialog-close:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}


/* Keep profile link rows compact and separated by subtle rules. */
.profile-edit-facts { margin-top: 24px; gap: 0; }
.profile-edit-facts .profile-link-fact { padding: 13px 0; border: 0; border-radius: 0; background: transparent; }
.profile-edit-facts > .profile-link-fact ~ .profile-link-fact,
#profile-custom-links .profile-link-fact { border-top: 1px solid var(--line); }
.profile-edit-facts .profile-link-fact dt label { display: block; margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.profile-edit-facts .profile-link-fact dd { gap: 10px; }
#profile-custom-links { display: contents; }
.profile-edit-link-input { width: 100%; min-width: 0; min-height: 32px; padding: 0; border: 1px solid transparent; border-radius: 5px; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; }
.profile-edit-link-input:focus { border-color: var(--line-strong); outline: 0; background: var(--field); }
.profile-edit-link-input::placeholder { color: var(--subtle); font-weight: 500; }
.custom-profile-link { grid-column: 1 / -1; }
.custom-profile-link dt { margin: 0; }
.custom-profile-link dd.custom-profile-link-fields {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: end;
  gap: 14px 12px;
  margin: 0;
}
.custom-profile-link-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font: 700 13px/1.2 "DM Sans", sans-serif;
}
.custom-profile-link-field input,
.custom-profile-link-field select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font: 700 15px/1.35 "DM Sans", sans-serif;
}
.custom-profile-link-field select { padding-right: 32px; }
.custom-profile-link-field input::placeholder { color: var(--subtle); font-weight: 500; }
.custom-profile-link-url-field .profile-edit-link-input { font-size: 14px; }
.custom-profile-link-url-field { grid-column: 1 / -1; }
.custom-profile-link-remove {
  justify-self: start;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 13px/1 "DM Sans", sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.custom-profile-link-remove:hover { color: var(--ink); }
.profile-add-link { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; margin-top: 10px; padding: 0; border: 0; background: transparent; color: var(--teal); font: 700 14px/1 "DM Sans", sans-serif; cursor: pointer; }
.profile-add-link span { font-size: 20px; line-height: 1; }
.profile-add-link:hover { color: var(--ink); }
@media (max-width: 600px) {
  .profile-edit-facts .profile-link-fact { padding: 12px 0; }
  .profile-edit-link-input { font-size: 14px; }
  .custom-profile-link dd.custom-profile-link-fields { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .custom-profile-link-url-field { grid-column: auto; }
}


/* Icon link sits beside the distance value inside each school result card. */
.distance-metric-pair { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.distance-metric-copy { min-width: 0; }
.school-map-focus { width: 30px; height: 30px; min-height: 30px; flex: 0 0 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; color: var(--teal); background: transparent; text-decoration: none; cursor: pointer; }
.school-map-focus:hover:not([aria-disabled="true"]) { color: var(--ink); background: var(--teal-soft); }
.school-map-focus:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.school-map-focus[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.school-map-focus svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.school-card-button { cursor: pointer; }


/* X-style immersive avatar crop flow */
.profile-photo-dialog {
  color: #fff;
  background: #05070b;
  overflow: hidden;
  overscroll-behavior: none;
}
.profile-photo-dialog::backdrop { background: #05070b; }
.profile-photo-editor {
  position: relative;
  display: block;
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  background: #05070b;
  color: #fff;
}
.profile-photo-editor-header {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: 72px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 18px 10px;
  border: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.5), transparent);
}
.profile-photo-editor-header h2 {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}
.profile-photo-dialog .crop-icon-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(10,10,12,.88);
  box-shadow: 0 1px 6px rgba(0,0,0,.24);
  cursor: pointer;
  transition: none;
  -webkit-tap-highlight-color: transparent;
}
.profile-photo-dialog .crop-icon-button svg,
.profile-photo-rotate svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile-photo-dialog .crop-icon-button:active,
.profile-photo-dialog .crop-icon-button:hover,
.profile-photo-dialog .crop-icon-button:focus {
  color: #fff;
  background: rgba(10,10,12,.88);
  opacity: 1;
  transform: none;
}
.profile-photo-dialog .crop-icon-button:focus { outline: none; box-shadow: 0 1px 6px rgba(0,0,0,.24); }
.profile-photo-dialog .crop-icon-button:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 3px; }
.profile-photo-dialog .crop-icon-button:disabled { opacity: .48; cursor: wait; }
.profile-photo-editor-stage {
  position: absolute;
  inset: 0;
  display: block;
  min-height: 0;
  padding: 0;
}
.profile-photo-crop-viewport {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #08090c;
  touch-action: none;
  cursor: grab;
}
.profile-photo-crop-viewport:active { cursor: grabbing; }
.profile-photo-crop-viewport img {
  position: absolute;
  display: block;
  max-width: none;
  max-height: none;
  object-fit: fill;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.profile-photo-crop-guide {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(92vw, 70vh, 640px);
  aspect-ratio: 1;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 50%;
  box-shadow: 0 0 0 120vmax rgba(0,0,0,.58);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.profile-photo-rotate {
  position: absolute;
  z-index: 2;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 30px);
  left: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  color: #fff;
  background: rgba(10,10,12,.82);
  transform: translateX(-50%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.profile-photo-rotate:active,
.profile-photo-rotate:hover,
.profile-photo-rotate:focus { color: #fff; background: rgba(10,10,12,.82); transform: translateX(-50%); }
.profile-photo-rotate:focus { outline: none; }
.profile-photo-rotate:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 3px; }
.profile-photo-editor-controls { display: none; }
@media (max-height: 520px) {
  .profile-photo-crop-guide { width: min(68vh, 62vw, 500px); }
  .profile-photo-editor-header { min-height: 56px; padding-top: calc(env(safe-area-inset-top, 0px) + 6px); }
  .profile-photo-rotate { bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); }
}


/* Make the distance and map pin read as one inline map link. */
.distance-metric-pair { justify-content: flex-start; }
.distance-metric-copy { display: grid; justify-items: start; gap: 4px; }
.school-map-focus {
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  flex: 0 0 auto;
  justify-content: flex-start;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--teal);
  background: transparent;
  font: inherit;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}
.school-map-focus:hover:not([aria-disabled="true"]) { color: var(--ink); background: transparent; }
.school-map-focus:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 3px; }
.school-map-focus:disabled { opacity: .45; cursor: not-allowed; }
.school-map-focus svg { width: 17px; height: 17px; }
.school-map-focus .distance-value { color: inherit; font-size: .95rem; font-weight: 750; }
@media (max-width: 600px) {
  .distance-metric-copy { gap: 3px; }
  .school-map-focus { gap: 5px; }
}


/* Read-only recruiting links sit directly on the parent section with divider rules. */
#profile-view-links {
  margin-top: 22px;
}
.profile-view-facts .profile-view-link-fact {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.profile-view-facts .profile-view-link-fact + .profile-view-link-fact {
  border-top: 1px solid var(--line);
}
.profile-view-facts .profile-view-link-fact dt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.profile-view-facts .profile-view-link-fact dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  margin: 9px 0 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.profile-view-facts .profile-view-link-label {
  color: var(--teal);
  text-decoration: none;
}
.profile-view-facts .profile-view-link-label:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.profile-view-facts .profile-view-link-fact .profile-view-url-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-view-facts .profile-view-link-fact .profile-view-copy {
  flex: 0 0 auto;
  min-height: 32px;
  min-width: 0;
  padding: 2px 0;
  color: var(--teal);
  font-size: 13px;
}
.profile-view-facts .profile-view-link-fact .profile-view-copy:hover:not(:disabled) {
  color: var(--ink);
}
@media (max-width: 600px) {
  #profile-view-links { margin-top: 20px; }
  .profile-view-facts .profile-view-link-fact { padding: 15px 0; }
  .profile-view-facts .profile-view-link-fact dd { gap: 9px; }
}
/* Give profile edits an explicit result when validation or cloud persistence fails. */
.profile-footer { flex-wrap: wrap; }
.profile-save-status { flex: 1 0 100%; order: -1; margin: 0 auto 2px; color: var(--muted); font: 650 13px/1.4 "DM Sans", sans-serif; text-align: center; }
.profile-save-status[hidden] { display: none; }

/* Keep save errors above the equal-width edit actions. */
.profile-save-status { grid-column: 1 / -1; flex: 1 0 100%; width: 100%; margin: 0 0 2px; text-align: center; }

/* Put external navigation in context with each read-only profile URL. */
.profile-view-link-label { color: var(--teal); font-size: inherit; font-weight: inherit; text-decoration: none; }
.profile-view-link-label:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.profile-view-link-label:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 2px; }

/* Keep the longer sort labels readable inside the compact mobile control. */
.sort-control select { font-size: 14px; font-weight: 700; }

/* Match Score explainer control and popover */
.match-score-label { display: inline-flex!important; align-items: center; gap: 4px; width: max-content; }
.match-score-info { width: 22px; height: 22px; flex: 0 0 22px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--subtle); vertical-align: middle; }
.match-score-info:hover { color: var(--teal); background: var(--teal-soft); }
.match-score-info:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.match-score-info svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.match-score-tooltip { position: fixed; z-index: 1001; width: min(290px, calc(100vw - 32px)); padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); font: 500 13px/1.45 "DM Sans", system-ui, sans-serif; }

/* Keep the Match Score value stacked beneath its label on school cards. */
.fit-score > strong { display: block; margin-top: 2px; }

/* Match the Roster Need value to the distance metric's type scale. */
.metric-pair .opportunity-score { font-size: .95rem; font-weight: 750; }

/* Use an inverse surface so the Match Score explainer stays distinct in either theme. */
.match-score-tooltip {
  border-color: rgba(32,214,199,.72);
  background: #f8f6ef;
  color: #171a1e;
  box-shadow: 0 18px 44px rgba(0,0,0,.34), 0 0 0 1px rgba(32,214,199,.16);
}
:root[data-theme="light"] .match-score-tooltip {
  border-color: rgba(32,214,199,.74);
  background: #102638;
  color: #f4f7fb;
  box-shadow: 0 18px 44px rgba(0,0,0,.32), 0 0 0 1px rgba(3,16,24,.16);
}


/* Keep the sort control with the card results it changes. */
.card-sort-control {
  justify-content: flex-end;
  margin: 0 clamp(16px, 3vw, 28px) 14px;
}
@media (max-width: 600px) {
  .card-sort-control {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  .card-sort-control label { margin: 0; }
  .card-sort-control select { width: min(180px, 48vw); }
}


/* Compact card sorting into the same low-profile tab language as the view switcher. */
.sort-options {
  display: flex;
  align-items: flex-end;
  gap: clamp(12px, 2.2vw, 22px);
  margin: 0 clamp(16px, 3vw, 28px) 12px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sort-options::-webkit-scrollbar { display: none; }
.sort-option {
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 1px 8px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: .78rem;
  font-weight: 650;
  white-space: nowrap;
}
.sort-option::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--teal);
  content: "";
  transform: scaleX(0);
  transition: transform .16s ease;
}
.sort-option.is-active { color: var(--ink); }
.sort-option.is-active::after { transform: scaleX(1); }
.sort-option:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }


/* Give the update modal a quieter, light-surface brand area and title-case CTA. */
.whats-new-visual {
  min-height: 84px;
  background: var(--panel);
}
.whats-new-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 5px 14px rgba(0,0,0,.12);
}
.whats-new-brand-mark img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}
.whats-new-dialog .dialog-close {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--field);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.whats-new-scroll { padding-top: 22px; }
.whats-new-continue,
:root[data-theme="light"] .whats-new-dialog .whats-new-continue {
  font-family: inherit;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
@media (max-width: 600px) {
  .whats-new-visual { min-height: 76px; }
  .whats-new-brand-mark,
  .whats-new-brand-mark img {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }
  .whats-new-scroll { padding-top: 20px; }
}


/* Give stalled startup a clear recovery state instead of leaving the spinner indefinitely. */
.auth-loading-error {
  max-width: 30rem;
  margin: 0;
  color: rgba(4,18,23,.78);
  font-size: 14px;
  line-height: 1.45;
}
.auth-loading-retry {
  min-height: 42px;
  padding: 0 22px;
  border: 1px solid rgba(4,18,23,.2);
  border-radius: 999px;
  color: #fff;
  background: #041217;
  font-weight: 700;
}
.auth-loading-retry:hover { background: #17323a; }
.auth-loading-retry:focus-visible { outline: 3px solid #041217; outline-offset: 3px; }
.auth-loading-screen.is-recovery { gap: 14px; }


/* Present What's New as three short slides with a fixed brand and intro header. */
.whats-new-shell {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.whats-new-visual {
  min-height: 82px;
  background: var(--panel);
}
.whats-new-brand-mark,
.whats-new-brand-mark img {
  width: 54px;
  height: 54px;
  border-radius: 15px;
}
.whats-new-heading {
  padding: 16px 32px 8px;
}
.whats-new-heading .eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font: 750 .76rem/1.2 "Manrope", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.whats-new-heading .whats-new-intro {
  margin: 0;
  font-size: .94rem;
  line-height: 1.45;
}
.whats-new-scroll {
  padding: 18px 32px 16px;
}
.whats-new-step[hidden] { display: none; }
.whats-new-step {
  gap: 18px;
}
.whats-new-step .whats-new-separator {
  margin-bottom: 2px;
  color: var(--teal);
}
.whats-new-footer {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}
.whats-new-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font: 650 12px/1.2 "DM Sans", sans-serif;
}
.whats-new-progress-track {
  display: flex;
  flex: 1 1 auto;
  gap: 5px;
  max-width: 96px;
}
.whats-new-progress-track i {
  display: block;
  height: 4px;
  flex: 1 1 0;
  border-radius: 999px;
  background: var(--line-strong);
}
.whats-new-progress-track i.is-current,
.whats-new-progress-track i.is-complete {
  background: var(--teal);
}
.whats-new-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.whats-new-back {
  min-width: 84px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: var(--field);
  font: 700 14px/1 "DM Sans", sans-serif;
  cursor: pointer;
}
.whats-new-back[hidden] { display: none; }
.whats-new-actions .whats-new-continue { flex: 1 1 auto; }
@media (max-width: 600px) {
  .whats-new-shell { max-height: calc(100dvh - 20px); }
  .whats-new-visual { min-height: 76px; }
  .whats-new-brand-mark,
  .whats-new-brand-mark img {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }
  .whats-new-heading { padding: 12px 22px 6px; }
  .whats-new-heading .whats-new-intro { font-size: .88rem; }
  .whats-new-scroll { padding: 16px 22px 14px; }
  .whats-new-step { gap: 16px; }
  .whats-new-footer {
    gap: 10px;
    padding: 12px 22px calc(12px + env(safe-area-inset-bottom));
  }
}


/* Sort selection uses the compact ShadCN Base UI segmented-tabs treatment. */
.sort-options {
  box-sizing: border-box;
  min-height: 44px;
  align-items: center;
  gap: 3px;
  margin: 0 clamp(16px, 3vw, 28px) 14px;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  background: var(--panel-2);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  touch-action: pan-x;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sort-options::-webkit-scrollbar { display: none; }
.sort-option {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.sort-option::after { content: none; }
.sort-option:hover:not(.is-active) {
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 58%, transparent);
}
.sort-option.is-active {
  border-color: var(--line);
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(0,0,0,.10), 0 1px 3px rgba(0,0,0,.06);
}
.sort-option:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}
@media (max-width: 600px) {
  .sort-options {
    min-height: 42px;
    margin-bottom: 14px;
    touch-action: pan-x;
  }
  .sort-option {
    min-height: 32px;
    padding-inline: 10px;
    font-size: .76rem;
  }
}


/* Keep the What's New stepper frame fixed across slides. */
.whats-new-dialog {
  box-sizing: border-box;
  height: min(720px, calc(100dvh - 32px));
}
.whats-new-shell {
  height: 100%;
  max-height: 100%;
  min-height: 0;
}
.whats-new-scroll {
  min-height: 0;
  overflow-y: auto;
}
@media (max-width: 600px) {
  .whats-new-dialog {
    height: min(720px, calc(100dvh - 20px));
  }
}

/* Athlete drawer branding and navigation treatments. */
.header-menu-brand { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; font-weight: 800; }
.header-menu-brand img { width: 30px; height: 30px; flex: 0 0 auto; object-fit: contain; }
.header-menu-drawer-nav { gap: 8px; }
.header-menu-drawer-nav button[data-header-menu-action="whats-new"],
.header-menu-drawer-nav button[data-header-menu-action="profile"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.header-menu-drawer-nav button[data-header-menu-action="whats-new"] {
  color: var(--teal);
  background: var(--teal-soft);
}
.header-menu-drawer-nav button[data-header-menu-action="whats-new"]:hover {
  background: var(--teal-soft);
  color: var(--teal);
}
.header-menu-drawer-nav button[data-header-menu-action="profile"] {
  color: var(--ink);
  background: transparent;
}
.header-menu-drawer-nav button[data-header-menu-action="signout"] {
  min-height: 46px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--muted);
  text-decoration: none;
}
.header-menu-drawer-nav button[data-header-menu-action="signout"]:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
  color: var(--ink);
}

/* Drawer navigation rows with profile identity and clear destinations. */
.header-menu-drawer-nav {
  display: grid;
  align-content: start;
  gap: 4px;
}
.header-menu-drawer-nav .header-menu-drawer-item {
  width: 100%;
  text-decoration: none!important;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.header-menu-drawer-nav .header-menu-drawer-item:hover {
  background: var(--panel-2);
  color: var(--ink);
}
.header-menu-profile-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}
.header-menu-item-label {
  min-width: 0;
  flex: 1 1 auto;
  text-decoration: none!important;
}
.header-menu-drawer-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-menu-drawer-nav .header-menu-drawer-item[data-header-menu-action="whats-new"] {
  background: transparent;
  color: var(--ink);
}
.header-menu-drawer-nav .header-menu-drawer-item[data-header-menu-action="whats-new"]:hover {
  background: var(--panel-2);
  color: var(--ink);
}
.header-menu-drawer-divider {
  width: auto;
  height: 1px;
  margin: 12px 14px;
  border: 0;
  background: var(--line);
}
.header-menu-drawer-nav button.header-menu-signout[data-header-menu-action="signout"] {
  justify-self: start;
  width: max-content;
  min-width: 0;
  min-height: 42px;
  margin: 0 14px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.2;
  text-transform: none;
  text-decoration: none;
}
.header-menu-drawer-nav button.header-menu-signout[data-header-menu-action="signout"]:hover {
  background: #000;
  color: #fff;
  text-transform: none;
}


/* Build 154 profile appearance row */
.profile-theme-preference { margin: 28px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-theme-toggle { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field-2); color: var(--ink); font: 700 14px/1.2 "DM Sans", sans-serif; text-align: left; }
.profile-theme-toggle:hover { border-color: var(--teal); background: var(--teal-soft); }
.profile-theme-toggle:focus-visible { outline: 3px solid rgba(32,214,199,.72); outline-offset: 2px; }
.profile-theme-leading { display: inline-flex; align-items: center; gap: 11px; }
.profile-theme-leading .theme-icon { width: 19px; height: 19px; }
.profile-theme-current { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 650; }
.profile-theme-chevron { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-theme-toggle .theme-icon-sun { display: block; }
.profile-theme-toggle .theme-icon-moon { display: none; }
:root[data-theme="dark"] .profile-theme-toggle .theme-icon-sun { display: none; }
:root[data-theme="dark"] .profile-theme-toggle .theme-icon-moon { display: block; }

/* The profile header note action is a compact, single-icon global action. */
#header-new-note.header-note-action {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  max-width: 60px;
  max-height: 60px;
  flex: 0 0 60px;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 12%, var(--field-2));
  color: var(--ink);
}
#header-new-note.header-note-action:hover {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 20%, var(--field-2));
  color: var(--ink);
}
:root[data-theme="light"] #header-new-note.header-note-action,
:root[data-theme="light"] #header-new-note.header-note-action:hover {
  border-color: #8f6819;
}
#header-new-note.header-note-action:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}
#header-new-note.header-note-action .rs-note-icon {
  display: block;
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* Startup skeleton keeps the board structure in place while session and data load. */
body.auth-pending #app-shell { visibility: visible; }
body.auth-pending #app-shell > :not(#board-skeleton) { visibility: hidden; }
body.auth-pending #auth-gate,
body.auth-pending .skip-link { visibility: hidden; }
body.auth-pending .auth-loading-screen { display: none; }
.auth-loading-screen.is-recovery:not([hidden]) {
  display: grid;
  background: rgba(6, 13, 20, .72);
  color: #f5f7fa;
  backdrop-filter: blur(6px);
}
.board-skeleton { display: none; }
body.auth-pending .board-skeleton { display: block; }
.skeleton-block {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  background: var(--line);
  color: transparent;
}
.skeleton-block::after {
  position: absolute;
  inset: 0;
  content: "";
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.13), transparent);
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}
@keyframes skeleton-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .skeleton-block::after { animation: none; }
}
.skeleton-topbar { pointer-events: none; }
.skeleton-avatar { width: 42px; height: 42px; border-radius: 50%; }
.skeleton-topbar-copy { width: min(270px, 32vw); display: grid; gap: 8px; }
.skeleton-topbar-copy .skeleton-block:first-child { width: 62%; height: 18px; }
.skeleton-topbar-copy .skeleton-block:last-child { width: 86%; height: 12px; }
.skeleton-note { width: 40px; height: 40px; }

.skeleton-summary-grid { pointer-events: none; }
.skeleton-label { width: 86px; height: 12px; }
.skeleton-count { width: 52px; height: 28px; margin: 8px 0 6px; }
.skeleton-note-line { width: 80%; height: 10px; }
.skeleton-mobile-discovery { display: none; pointer-events: none; }
.skeleton-heading { width: 62%; height: 22px; margin-bottom: 24px; }
.skeleton-search { height: 42px; margin-bottom: 22px; }
.skeleton-filter-group { height: 54px; margin-bottom: 18px; }
.skeleton-results .results-toolbar { display: grid; gap: 10px; }
.skeleton-results-title { width: 150px; height: 25px; }
.skeleton-quick-filters,
.skeleton-view-tabs,
.skeleton-sort-options { display: flex; gap: 8px; padding: 14px 24px 4px; }
.skeleton-quick-filters .skeleton-block { width: 80px; height: 32px; border-radius: 999px; }
.skeleton-view-tabs .skeleton-block { width: 92px; height: 36px; }
.skeleton-sort-options { padding-top: 12px; padding-bottom: 8px; }
.skeleton-sort-options .skeleton-block { width: 78px; height: 28px; border-radius: 999px; }
.skeleton-school-card {
  min-height: 168px;
  display: grid;
  grid-template-columns: 54px 46px minmax(0, 1fr) 180px;
  grid-template-rows: 48px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  pointer-events: none;
}
.skeleton-school-mark { grid-column: 2; grid-row: 1; width: 46px; height: 46px; border-radius: 50%; }
.skeleton-school-name { grid-column: 3; grid-row: 1; width: min(230px, 90%); height: 20px; }
.skeleton-school-copy { grid-column: 3; grid-row: 2; width: 78%; height: 42px; align-self: start; }
.skeleton-school-score { grid-column: 4; grid-row: 1 / span 2; height: 74px; }
.auth-loading-screen.is-recovery { z-index: 1000; }
@media (max-width: 820px) {
  .skeleton-mobile-discovery { display: grid; }
  .skeleton-mobile-discovery .skeleton-block:first-child { height: 44px; }
  .skeleton-mobile-discovery .skeleton-block:last-child { width: 94px; height: 44px; }
  .skeleton-filters { display: none; }
  .skeleton-quick-filters { display: none; }
  .skeleton-school-card {
    min-height: 156px;
    grid-template-columns: 34px 42px minmax(0,1fr);
    grid-template-rows: 44px 1fr;
    gap: 8px;
    padding: 10px;
  }
  .skeleton-school-mark { grid-column: 2; width: 40px; height: 40px; }
  .skeleton-school-name { grid-column: 3; }
  .skeleton-school-copy { grid-column: 2 / span 2; width: 90%; }
  .skeleton-school-score { display: none; }
  .skeleton-sort-options { overflow: hidden; }
  .skeleton-sort-options .skeleton-block { flex: 0 0 78px; }
}

/* Build 157: the dashboard skeleton is the only normal startup loading surface.
   Keep the legacy auth-loading element available to recovery JS, but never paint
   the obsolete full-screen teal overlay above the skeleton. */
body .auth-loading-screen,
body .auth-loading-screen.is-recovery:not([hidden]) { display: none !important; }
body.auth-pending #app-shell { visibility: visible; }
body.auth-pending #board-skeleton { display: block; }

/* Compact theme control and New actions (Build 156 follow-up). */
.header-action-separator{height:24px;width:1px;background:var(--line-strong);flex:none}
.header-theme-quick{display:grid;place-items:center;width:34px;height:34px;padding:7px;border:0;border-radius:8px;background:transparent;color:var(--ink);cursor:pointer}
.header-theme-quick:hover{background:var(--teal-soft)}
.header-theme-quick svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
:root[data-theme="light"] .header-theme-quick .quick-theme-sun{display:none}
:root[data-theme="dark"] .header-theme-quick .quick-theme-moon{display:none}
.header-new-wrap{position:relative;flex-shrink:0}
.header-new-button{display:inline-flex;align-items:center;gap:5px;padding:8px 12px;background:var(--gold-soft);border:1px solid var(--gold);border-radius:8px;color:var(--ink);font-weight:800;cursor:pointer;white-space:nowrap}
.header-new-button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}
.header-new-menu{position:absolute;right:0;top:calc(100% + 7px);min-width:190px;z-index:80;background:var(--panel);border:1px solid var(--line-strong);border-radius:10px;padding:6px;box-shadow:var(--shadow)}
.header-new-menu[hidden]{display:none}
.header-new-menu button{display:block;width:100%;border:0;border-radius:7px;background:transparent;color:var(--ink);padding:11px 12px;text-align:left;cursor:pointer}
.header-new-menu button:hover{background:var(--teal-soft)}

/* Compact header action: icon-only plus, with accessible 40px target. */
.header-new-button{width:40px;height:40px;min-width:40px;display:grid;place-items:center;padding:0;font-size:25px;line-height:1;border-radius:10px}

/* Build 164: one desktop grid, with all sections participating in sizing. */
@media (min-width: 821px) {
  .school-card {
    display: grid;
    grid-template-columns: minmax(0,1fr) 148px;
    align-items: stretch;
    min-height: 244px;
    height: auto;
    overflow: hidden;
  }
  .school-sticky-zone {
    position: relative;
    grid-column: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .school-sticky-header {
    position: relative;
    top: auto;
    margin: 0;
    min-width: 0;
    border: 0;
    border-radius: 0;
    z-index: 1;
  }
  .school-sticky-surface { min-width: 0; }
  .school-heading-button { min-width: 0; }
  .school-card-button {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(125px,190px) 18px;
    align-items: start;
    gap: 14px;
    width: 100%;
    min-width: 0;
    min-height: 155px;
    padding: 18px 16px 22px;
    box-sizing: border-box;
  }
  .school-details-main, .school-metrics { min-width: 0; }
  .school-card-footer {
    grid-column: 2;
    grid-row: 1;
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 12px 12px 12px 0;
    transform: none;
    border: 0;
    background: transparent;
  }
  .school-card-footer-spacer { display: none; }
  .school-save-actions {
    position: static;
    display: grid;
    gap: 8px;
    width: 100%;
    min-width: 0;
    translate: none;
    transform: none;
  }
  .school-save-actions > button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }
}
@media (min-width: 821px) and (max-width: 1200px) {
  .school-card-button {
    grid-template-columns: minmax(0,1fr) 18px;
    gap: 12px;
  }
  .school-details-main { grid-column: 1; grid-row: 1; }
  .school-metrics { grid-column: 1; grid-row: 2; }
  .school-card-button > .card-chevron { grid-column: 2; grid-row: 1; }
}

/* Build 165: use the compact mobile card composition at tablet widths too. */
@media (min-width: 591px) and (max-width: 820px) {
  .school-list { padding: 12px; gap: 12px; }
  .school-heading-button { grid-template-columns: 38px minmax(0,1fr); gap: 10px; padding: 11px 12px 10px; }
  .team-mark { width: 38px; height: 38px; border-radius: 50%; }
  .school-card-button {
    grid-template-columns: minmax(0,1fr) 34px;
    grid-template-areas: "school-details school-affordance" "school-metrics school-metrics";
    align-items: center;
    column-gap: 12px;
    row-gap: 8px;
    padding: 0 12px 0 60px;
  }
  .school-details-main {
    grid-area: school-details;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-2);
  }
  .school-card-footer-spacer { height: 61px; }
  .school-save-actions {
    top: auto;
    right: 12px;
    bottom: 11px;
    translate: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .school-metrics {
    grid-area: school-metrics;
    grid-column: 1 / -1;
    border: 0;
    padding: 8px 0 0;
    grid-template-columns: 1fr 1fr;
  }
  .fit-score { grid-column: 1 / -1; }
  .metric-pair:nth-of-type(3) { display: block; }
  .card-chevron {
    grid-area: school-affordance;
    position: static;
    align-self: center;
    justify-self: center;
    width: 30px;
    height: 30px;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--panel-2);
    fill: none;
    stroke: var(--teal);
    stroke-width: 2.4;
  }
  .tier-pill { display: inline-flex; max-width: min(148px,34vw); margin: 8px 10px 8px 0; padding: 5px 7px; font-size: 10px; }
  .school-assessment { -webkit-line-clamp: 3; }
}

/* Teal Header appearance: preserve the light theme everywhere except profile header. */
:root[data-header-theme="teal"] .topbar {
  background: #1BDBDB;
  border-bottom-color: rgba(0, 48, 51, .18);
  color: #061c20;
}
:root[data-header-theme="teal"] .topbar .topbar-identity,
:root[data-header-theme="teal"] .topbar .header-menu-trigger,
:root[data-header-theme="teal"] .topbar .header-theme-quick,
:root[data-header-theme="teal"] .topbar .header-action-separator {
  color: #061c20;
}
:root[data-header-theme="teal"] .topbar .header-menu-trigger:hover,
:root[data-header-theme="teal"] .topbar .header-theme-quick:hover {
  background: rgba(0, 50, 53, .11);
}
:root[data-header-theme="teal"] .topbar .header-action-separator {
  background: rgba(0, 50, 53, .22);
}
:root[data-header-theme="teal"] .topbar .topbar-identity .profile-meta,
:root[data-header-theme="teal"] .topbar .topbar-identity .profile-subtitle {
  color: #064b56;
}

/* Dark appearance shares the branded teal header while retaining dark content surfaces. */
:root[data-theme="dark"][data-header-theme="teal"] .topbar {
  background: #1BDBDB;
  color: #061c20;
}
:root[data-theme="dark"][data-header-theme="teal"] .topbar .profile-name,
:root[data-theme="dark"][data-header-theme="teal"] .topbar .topbar-name,
:root[data-theme="dark"][data-header-theme="teal"] .topbar .topbar-identity strong,
:root[data-theme="dark"][data-header-theme="teal"] .topbar .header-menu-trigger,
:root[data-theme="dark"][data-header-theme="teal"] .topbar .header-theme-quick {
  color: #061c20;
}
:root[data-theme="dark"][data-header-theme="teal"] .topbar .profile-meta,
:root[data-theme="dark"][data-header-theme="teal"] .topbar .profile-subtitle {
  color: #064b56;
}

/* Build 168: accessible branded header typography and unframed New action. */
:root[data-header-theme="teal"] .topbar .header-profile-meta {
  color: #073b48;
}
.header-new-button,
:root[data-theme="light"] .header-new-button,
:root[data-theme="dark"] .header-new-button,
:root[data-header-theme="teal"] .topbar .header-new-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  box-shadow: none;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}
:root[data-header-theme="teal"] .topbar .header-new-button { color: #061c20; }
.header-new-button:hover { background: var(--teal-soft); }
:root[data-header-theme="teal"] .topbar .header-new-button:hover { background: rgba(0,50,53,.11); }
.header-new-button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
