/* Boroughly — university page components.
   Extends styles.css / home.css. Uses the existing variables (--mute, etc.)
   and the site's Bricolage / Karla / Spline Sans Mono stack. */

:root {
  --uni-green: #2E6E4E;
  --uni-green-tint: #EAF3EC;
  --uni-rule: #E4E4E0;
  --uni-warn: #8A5A12;
  --uni-warn-tint: #FBF3E4;
}

.eyebrow {
  font-size: 12px;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  margin: 0 0 2px;
}

.tldr {
  background: var(--uni-green-tint);
  border-left: 4px solid var(--uni-green);
  border-radius: 8px;
  padding: 12px 15px;
  margin: 14px 0;
  font-size: 15px;
}

/* ---- campus map ---- */

.mapnote { margin: 6px 0 10px; }
.pc {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-weight: 600;
  background: var(--uni-green-tint);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.mapframe {
  position: relative;
  border: 1px solid var(--uni-rule);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #F2F2EE;
}
.mapframe iframe { width: 100%; height: 100%; border: 0; display: block; }
.mapcredit { font-size: 12px; color: var(--mute); margin: 6px 0 0; }

@media (max-width: 640px) {
  .mapframe { aspect-ratio: 4 / 3; }
}

/* ---- callout ---- */

.callout {
  background: var(--uni-warn-tint);
  border-left: 4px solid var(--uni-warn);
  border-radius: 8px;
  padding: 12px 15px;
  margin: 16px 0;
  font-size: 15px;
}
.callout p { margin: 0; }

/* ---- ranked area table ---- */

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--uni-rule);
  border-radius: 10px;
  margin: 14px 0 18px;
  -webkit-overflow-scrolling: touch;
}

table.arearank {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}

table.arearank th,
table.arearank td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--uni-rule);
}

table.arearank thead th {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mute);
  background: #FAFAF7;
  position: sticky;
  top: 0;
  white-space: nowrap;
}

table.arearank tbody tr:last-child th,
table.arearank tbody tr:last-child td { border-bottom: 0; }

table.arearank tbody tr:nth-child(odd) td,
table.arearank tbody tr:nth-child(odd) th { background: #FDFDFB; }

.th-sub {
  display: block;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  opacity: .75;
}

td.rank {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  color: var(--mute);
  width: 1%;
  white-space: nowrap;
}

table.arearank th[scope="row"] { font-weight: 700; white-space: nowrap; }
table.arearank th[scope="row"] a { text-decoration: none; }
table.arearank th[scope="row"] a:hover { text-decoration: underline; }

.dist {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--mute);
}

td.num {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  white-space: nowrap;
}
td.num sup { color: var(--mute); font-size: 10px; }

td.route { font-size: 13px; }
td.night { font-size: 13px; min-width: 200px; }

/* ---- traps ---- */

ol.traps { padding-left: 20px; margin: 12px 0 0; }
ol.traps li { margin-bottom: 12px; }
ol.traps .why { display: block; font-size: 14px; margin-top: 2px; }

/* ---- cta ---- */

p.cta { margin: 14px 0 4px; }
a.btn {
  display: inline-block;
  background: var(--uni-green);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.3;
}
a.btn:hover { filter: brightness(1.08); }
a.btn:focus-visible { outline: 3px solid #111; outline-offset: 2px; }

/* ---- methodology ---- */

ul.method { font-size: 14px; color: var(--mute); padding-left: 20px; }
ul.method li { margin-bottom: 7px; }
ul.method b { color: inherit; }

p.official { font-size: 14px; margin-top: 18px; }

/* ---- a11y ---- */

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

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

ul.comparelinks { margin: 8px 0 14px; padding-left: 20px; font-size: 15px; }
ul.comparelinks li { margin-bottom: 4px; }
