/* SHSAT HQ, shared stylesheet.
   Distinct signature from SHSATinfo: always-on navy header, teal-forward
   secondary accent, directory/timeline layouts instead of card grids.
   Real CSS media queries throughout, no JS-computed layout. */

:root {
  --bc-blue: #2C6D93;
  --deep-navy: #142B41;
  --navy-2: #1A3C58;
  --orange: #F0600F;
  --orange-hover: #C94E09;
  --teal: #15BFA9;
  --teal-deep: #0D8477;
  --off-white: #F7FAFB;
  --white: #FFFFFF;
  --pale: #EEF3F5;
  --line: #E1E7EA;
  --line-strong: #C6D1D6;
  --slate: #5E7380;
  --slate-light: #8A9BA3;
  --ink: #142B41;
  --ink-soft: #32474F;
  --body-text: #48585F;
  --callout-bg: #E8F6F3;

  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', Monaco, 'Courier New', monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius-md: 3px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;
}

h1, h2, h3, .wordmark, .footer-brand { font-family: var(--font-display); }

a { color: var(--teal-deep); text-decoration: none; transition: color 150ms var(--ease-out); }
a:hover { color: var(--deep-navy); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
img { max-width: 100%; display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
.prose { max-width: 800px; margin: 0 auto; padding: 0 40px; }

@media (max-width: 640px) {
  .container, .prose { padding: 0 20px; }
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  background: var(--deep-navy);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--white);
}
.wordmark .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--navy-2);
  background: var(--teal);
  padding: 2px 6px;
  border-radius: 2px;
}
.site-nav { display: flex; align-items: center; gap: 26px; }
.nav-link { font-weight: 500; font-size: 14px; color: #A9C0CC; padding: 4px 1px; position: relative; }
.nav-link:hover { color: var(--white); }
.nav-link.is-active { color: var(--white); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -13px; height: 2px; background: var(--teal);
}

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.menu-btn span { display: block; width: 20px; height: 2px; background: var(--white); }

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 20px;
  background: var(--deep-navy);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 220ms var(--ease-out), opacity 180ms var(--ease-out), padding 220ms var(--ease-out);
}
.mobile-menu .nav-link { padding: 11px 0; font-size: 16px; color: #A9C0CC; border-bottom: 1px solid rgba(255,255,255,0.06); }
.mobile-menu .nav-link.is-active::after { display: none; }
.mobile-menu.is-open { max-height: 320px; opacity: 1; padding: 8px 20px 18px; }

@media (min-width: 720px) { .mobile-menu { display: none; } }
@media (max-width: 719px) {
  .site-header { padding: 14px 20px; }
  .site-nav { display: none; }
  .menu-btn { display: flex; }
}

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

.hero-band {
  background: var(--deep-navy);
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 2px, transparent 2px, transparent 34px);
  padding: 60px 40px 0;
  position: relative;
}
.hero-inner { max-width: 800px; margin: 0 auto; padding-bottom: 38px; position: relative; }
.hero-inner h1 {
  font-weight: 600;
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0 0 16px;
}
.hero-inner p.lead {
  font-size: 16.5px;
  line-height: 1.65;
  color: #AFC5CE;
  margin: 0 0 18px;
  max-width: 65ch;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}
.hero-kicker::before { content: ""; width: 14px; height: 1px; background: var(--teal); }
.hero-meta { font-size: 12.5px; color: #718995; }
.hero-meta a { color: #9FDCD3; font-weight: 600; }

@media (max-width: 640px) {
  .hero-band { padding: 40px 20px 0; }
  .hero-inner { padding-bottom: 30px; }
  .hero-inner h1 { font-size: 29px; }
}

/* ---------- Facts strip ---------- */

.facts-strip {
  background: var(--navy-2);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.facts-row {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 40px;
  display: flex;
  flex-wrap: wrap;
}
.fact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 28px;
  border-left: 1px solid rgba(255,255,255,0.1);
}
.fact-item:first-child { padding-left: 0; border-left: none; }
.fact-num { font-weight: 600; font-size: 22px; color: var(--teal); font-family: var(--font-mono); line-height: 1; }
.fact-label { font-size: 12px; color: #8FA6B1; }

@media (max-width: 640px) {
  .facts-row { padding: 18px 20px; gap: 16px 0; }
  .fact-item { padding: 0 18px; flex: 1 1 42%; }
}

/* ---------- Callout ---------- */

.callout {
  background: var(--callout-bg);
  border-radius: 6px;
  padding: 24px 28px;
}
.callout-label {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal-deep); margin-bottom: 10px;
}
.callout p { font-size: 15.5px; line-height: 1.65; color: var(--ink); margin: 0; font-weight: 500; }

.direct-answer {
  font-size: 16.5px; color: var(--ink-soft); line-height: 1.65; margin: 0 0 18px;
  font-weight: 500; max-width: 65ch;
}

/* ---------- Section content ---------- */

.section { max-width: 800px; margin: 0 auto; padding: 48px 40px; }
.section h2 { font-weight: 600; font-size: 27px; margin: 0 0 14px; color: var(--ink); letter-spacing: -0.01em; }
.section h3 { font-weight: 700; font-size: 16.5px; margin: 0 0 10px; color: var(--teal-deep); }
.body-p { font-size: 15px; color: var(--body-text); line-height: 1.65; margin: 0 0 18px; max-width: 65ch; }
.ul-body { font-size: 15px; color: var(--body-text); line-height: 1.75; margin: 0 0 18px; padding-left: 20px; }
.ul-body li::marker { color: var(--teal-deep); }

@media (max-width: 640px) {
  .section { padding: 34px 20px; }
  .section h2 { font-size: 22px; }
}

/* ---------- Homepage hub cards ---------- */

.hub-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 40px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  counter-reset: hub;
}
.hub-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out), transform 150ms var(--ease-out);
  counter-increment: hub;
  position: relative;
}
.hub-card::before {
  content: "0" counter(hub);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate-light);
  display: block;
  margin-bottom: 14px;
}
.hub-card:hover { border-color: var(--teal); box-shadow: 0 10px 28px -14px rgba(20,50,74,0.28); transform: translateY(-2px); }
.hub-card .hub-kicker { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); margin-bottom: 8px; }
.hub-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--ink); margin: 0 0 8px; letter-spacing: -0.01em; }
.hub-card p { font-size: 14.5px; color: var(--slate); line-height: 1.55; margin: 0 0 16px; }
.hub-card .hub-go { font-size: 13.5px; font-weight: 700; color: var(--teal-deep); display: inline-flex; align-items: center; gap: 6px; transition: gap 150ms var(--ease-out); }
.hub-card:hover .hub-go { gap: 10px; }

@media (max-width: 719px) {
  .hub-grid { grid-template-columns: 1fr; padding: 8px 20px 40px; }
}

/* ---------- "What changed" update callout on home ---------- */

.update-box {
  max-width: 1120px;
  margin: 0 auto 48px;
  padding: 0 40px;
}
.update-box .inner {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: 6px;
  padding: 28px 30px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.update-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  background: var(--deep-navy);
  color: var(--teal);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 2px;
  margin-top: 2px;
}
.update-box h2 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.update-box p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; margin: 0; }

@media (max-width: 640px) {
  .update-box { padding: 0 20px; }
  .update-box .inner { flex-direction: column; padding: 22px; }
}

/* ---------- Registration guide: timeline table + side rail nav ---------- */

.guide-layout { max-width: 1120px; margin: 0 auto; padding: 44px 40px 0; display: grid; grid-template-columns: 200px 1fr; gap: 40px; }
.side-rail { position: sticky; top: 88px; align-self: start; }
.side-rail-label { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); margin-bottom: 14px; }
.side-rail a { display: block; font-size: 14px; color: var(--ink-soft); padding: 7px 0; border-left: 2px solid var(--line); padding-left: 14px; margin-left: -1px; transition: border-color 150ms var(--ease-out), color 150ms var(--ease-out); }
.side-rail a:hover, .side-rail a.is-current { color: var(--teal-deep); border-left-color: var(--teal); font-weight: 600; }
.guide-content { max-width: 760px; }
.guide-content .section { padding: 0 0 48px; max-width: none; }

@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 1fr; padding: 34px 20px 0; }
  .side-rail { display: none; }
}

.timeline-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.timeline-table th, .timeline-table td { text-align: left; padding: 13px 16px; font-size: 14px; }
.timeline-table th { background: var(--pale); font-weight: 600; color: var(--ink); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.timeline-table tr + tr td { border-top: 1px solid var(--line); }
.timeline-table tbody tr { transition: background 120ms var(--ease-out); }
.timeline-table tbody tr:hover { background: var(--off-white); }
.timeline-table .tl-date { font-family: var(--font-mono); font-size: 12.5px; color: var(--teal-deep); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; overflow-x: auto; margin-bottom: 10px; }

.dated-note { font-size: 13px; color: var(--slate-light); line-height: 1.6; margin: 10px 0 20px; }

.checklist-card { background: var(--pale); border: 1px solid var(--line); border-radius: 6px; padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; }
.checklist-item { display: flex; align-items: flex-start; gap: 13px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.4; }
.checkbox { width: 17px; height: 17px; border: 2px solid var(--teal-deep); border-radius: 3px; flex-shrink: 0; margin-top: 1px; position: relative; }
.checkbox::after {
  content: ""; position: absolute; left: 3px; top: 0; width: 5px; height: 9px;
  border-right: 2px solid var(--teal-deep); border-bottom: 2px solid var(--teal-deep);
  transform: rotate(40deg); opacity: 0.35;
}

.btn { display: inline-block; border-radius: var(--radius-md); font-weight: 700; font-size: 14.5px; padding: 13px 24px; transition: background 150ms var(--ease-out), border-color 150ms var(--ease-out), transform 150ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn-teal { background: var(--teal-deep); color: var(--white); border: 2px solid var(--teal-deep); }
.btn-teal:hover { background: var(--teal); border-color: var(--teal); color: var(--white); }
.btn-orange { background: var(--orange); color: var(--white); border: 2px solid var(--orange); }
.btn-orange:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: var(--white); }

/* ---------- Schools directory ---------- */

.directory-intro { max-width: 800px; margin: 0 auto; padding: 44px 40px 8px; }

.borough-group { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
.borough-heading {
  display: flex; align-items: center; gap: 14px;
  margin: 44px 0 18px;
}
.borough-heading h2 { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal-deep); margin: 0; white-space: nowrap; }
.borough-heading .rule { flex: 1; height: 1px; background: var(--line); }

.school-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 120ms var(--ease-out);
}
.school-row:hover { background: var(--off-white); }
.school-row:last-child { border-bottom: none; }
.school-name { font-family: var(--font-display); font-size: 17.5px; font-weight: 600; color: var(--ink); margin: 0 0 5px; letter-spacing: -0.005em; }
.school-meta { font-size: 13px; color: var(--slate); margin: 0 0 9px; }
.school-desc { font-size: 14.5px; color: var(--body-text); line-height: 1.6; margin: 0; max-width: 62ch; }
.school-admit {
  text-align: right;
  white-space: nowrap;
}
.admit-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius-md);
}
.admit-badge.shsat { background: rgba(13,132,119,0.1); color: var(--teal-deep); }
.admit-badge.audition { background: rgba(240,96,15,0.1); color: var(--orange-hover); }

@media (max-width: 640px) {
  .directory-intro, .borough-group { padding-left: 20px; padding-right: 20px; }
  .school-row { grid-template-columns: 1fr; padding: 20px 0; }
  .school-admit { text-align: left; }
}

/* ---------- Related / help band ---------- */

.related { max-width: 800px; margin: 0 auto; padding: 0 40px 8px; }
.related-label { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); margin-bottom: 14px; }
.related-row { display: flex; gap: 22px; flex-wrap: wrap; }
.related-row a { font-size: 14.5px; font-weight: 600; }

@media (max-width: 640px) { .related { padding: 0 20px 8px; } }

.help-band { padding: 60px 40px; }
.help-box {
  max-width: 800px; margin: 0 auto; background: var(--deep-navy);
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 2px, transparent 2px, transparent 34px);
  border-radius: 8px; padding: 40px; text-align: center;
}
.help-box h2 { font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--white); margin: 0 0 10px; letter-spacing: -0.01em; }
.help-box p { font-size: 15px; color: #AFC5CE; line-height: 1.6; margin: 0 0 24px; }

@media (max-width: 640px) {
  .help-band { padding: 44px 20px; }
  .help-box { padding: 28px; }
  .help-box h2 { font-size: 20px; }
}

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

.site-footer { padding: 44px 40px 36px; background: #0D2032; }
.footer-top { max-width: 1120px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; }
.footer-brand { font-weight: 600; font-size: 17px; color: var(--white); margin-bottom: 10px; }
.footer-brand .tag { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: var(--navy-2); background: var(--teal); padding: 2px 6px; border-radius: 2px; margin-left: 6px; }
.footer-desc { font-size: 12.5px; color: #7690A0; max-width: 320px; line-height: 1.6; margin: 0 0 10px; }
.footer-updated { font-size: 11.5px; color: #556E7C; margin: 0; font-family: var(--font-mono); }
.footer-cols { display: flex; gap: 44px; flex-wrap: wrap; }
.footer-col-label { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 13.5px; color: #AFC5CE; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { max-width: 1120px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid #1A3C58; font-size: 11.5px; color: #556E7C; }

@media (max-width: 639px) { .site-footer { padding: 36px 20px 28px; } }
