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

:root {
  --bg: #ffffff;
  --band: #ffffff;
  --panel: #ffffff;
  --panel-2: #f7f7f7;
  --line: #e9e9e9;
  --line-strong: #5200ff;
  --gold: #5200ff;
  --purple: #5200ff;
  --purple-dark: #3d00bf;
  --cyan: #3cffd0;
  --green: #309875;
  --red: #ee0033;
  --text: #131313;
  --muted: #4a4a4a;
  --dim: #636363;
  --radius: 0px;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(82,0,255,.28);
  outline-offset: 3px;
}

.shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand img {
  display: block;
  width: 164px;
  max-width: 44vw;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  text-transform: none;
}

.nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: inherit;
  padding: 2px 0 0;
  text-transform: none;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  border-bottom-color: var(--purple);
  color: var(--purple);
}

.page-band {
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.page-band-inner {
  position: relative;
  min-height: 300px;
  border-left: 1px solid var(--text);
  padding: 48px 320px 38px 26px;
}

.page-band-inner::after {
  content: "SCHOOL\A PROFILE";
  position: absolute;
  top: 40px;
  right: 0;
  width: min(280px, 32vw);
  height: calc(100% - 80px);
  min-height: 210px;
  display: grid;
  place-items: center;
  white-space: pre-line;
  background: var(--text);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 86px);
  font-weight: 800;
  line-height: .82;
  text-align: center;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--purple);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-band h1,
.hero-name {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-band h1 {
  max-width: 780px;
  margin: 8px 0 0 !important;
  font-size: clamp(58px, 10vw, 112px) !important;
  line-height: .86 !important;
}

main.shell {
  padding-top: 30px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) 320px;
  gap: 18px;
  padding: 0 0 18px;
}

.hero-main,
.facts-panel,
.module,
.game-card,
.pill-card,
.link-card,
.empty {
  border: 1px solid var(--text);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.hero-main {
  display: grid;
  grid-template-columns: 132px minmax(0,1fr);
  gap: 22px;
  align-items: start;
  min-height: 100%;
  padding: 22px;
}

.school-mark {
  width: 132px;
  height: 132px;
  border: 1px solid var(--text);
  border-radius: 0;
  background: var(--panel-2);
  color: var(--purple);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.school-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

#schoolMarkInitials {
  color: var(--purple) !important;
}

.hero-info { min-width: 0; }

.hero-name {
  margin: 6px 0 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: .88;
}

.hero-name span {
  color: var(--purple) !important;
}

.hero-copy {
  max-width: 740px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip,
.badge,
.card-action {
  border-radius: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .04em;
}

.chip {
  border: 1px solid var(--text);
  background: #fff;
  color: var(--text);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.facts-panel {
  align-self: stretch;
  padding: 18px;
}

.module-title {
  margin: 0 0 14px;
  color: var(--purple);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.facts {
  display: grid;
  gap: 0;
}

.fact {
  display: grid;
  grid-template-columns: 106px minmax(0,1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.fact:first-child { padding-top: 0; }
.fact:last-child { border-bottom: 0; padding-bottom: 0; }
.fact dt { color: var(--muted); font-size: 12px; }
.fact dd { color: var(--text); font-weight: 800; font-size: 13px; }

.app-grid {
  display: grid;
  grid-template-columns: minmax(0,1.45fr) 320px;
  gap: 18px;
  padding-bottom: 52px;
}

.stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.module { overflow: hidden; }

.module:hover,
.game-card:hover,
.pill-card:hover,
.link-card:hover {
  border-color: var(--purple);
  background: #fbfbfb;
}

.module-pad { padding: 20px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-note {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.game-card {
  background: #fff;
  padding: 14px;
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge {
  border: 1px solid var(--text);
  background: #fff;
  color: var(--text);
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge.win {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.badge.loss {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.badge.upcoming,
.badge.final {
  background: #fff;
  color: var(--purple);
  border-color: var(--purple);
}

.matchup {
  margin-top: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.score-line {
  margin-top: 7px;
  color: var(--purple);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.pill-grid,
.link-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.pill-grid {
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
}

.pill-card {
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}

.link-card {
  display: block;
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.link-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
}

.empty {
  color: var(--muted);
  padding: 24px 16px;
  line-height: 1.5;
  text-align: center;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

.fun-facts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.fun-facts-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.fun-facts-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin-top: 7px;
  background: var(--cyan);
  border: 1px solid var(--text);
}

.module-pad > p {
  color: var(--muted) !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
}

.module-pad > p + p {
  color: var(--dim) !important;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px !important;
  letter-spacing: .04em;
  text-transform: uppercase;
}

footer {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 24px 16px;
  text-align: center;
  font-size: 12px;
}

footer a {
  color: var(--purple);
  font-weight: 800;
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

@media (max-width: 960px) {
  .hero,
  .app-grid {
    grid-template-columns: 1fr;
  }

  .facts-panel {
    align-self: start;
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px 14px;
    font-size: 13px;
  }

  .page-band-inner {
    min-height: 0;
    padding: 32px 0 0 18px;
  }

  .page-band-inner::after {
    position: static;
    width: 100%;
    min-height: 190px;
    margin-top: 26px;
  }

  .page-band h1 {
    font-size: clamp(46px, 15vw, 72px) !important;
  }

  main.shell { padding-top: 24px; }

  .hero-main {
    grid-template-columns: 82px minmax(0,1fr);
    gap: 14px;
    padding: 16px;
  }

  .school-mark {
    width: 82px;
    height: 82px;
    font-size: 1.6rem;
  }

  .hero-name {
    font-size: clamp(32px, 11vw, 52px);
  }

  .hero-copy {
    grid-column: 1 / -1;
  }

  .chip-row {
    grid-column: 1 / -1;
  }

  .module-pad {
    padding: 16px;
  }

  .fact {
    grid-template-columns: 92px minmax(0,1fr);
  }
}

@media (max-width: 430px) {
  .shell {
    width: min(100% - 24px, 1220px);
  }

  .hero-main {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .chip-row {
    grid-column: auto;
  }
}
