:root {
  --paper: #FDFDFD;
  --ink: #1d2433;
  --ink-soft: #5b6273;
  --ink-light: #8584b0;
  --navy: #1b2a5c;
  --red: #c8102e;
  --line: 32px;          /* base line height */
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
/* In-page links (like "ways to pay less") glide to their target, unless the device asks for
   less motion. scroll-padding keeps the target clear of the sticky header. */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/var(--line) var(--font);
}

a { color: var(--navy); }
a:hover { color: var(--red); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- the notebook page ---------- */
.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--line) 40px calc(var(--line) * 2);
}


/* Once the page scrolls, a soft shadow fades in under the sticky header, and fades out back at the top.
   Scroll-driven, so no script; browsers without support just show the plain border. */
@keyframes header-shadow { from { box-shadow: 0 4px 14px rgba(14, 22, 52, 0); } to { box-shadow: 0 4px 14px rgba(14, 22, 52, .1); } }
@supports (animation-timeline: scroll()) {
  .masthead, .lp-nav { animation: header-shadow linear both; animation-timeline: scroll(root); animation-range: 0 40px; }
}

.logo { text-decoration: none; font-weight: 800; font-size: 30px; letter-spacing: -0.02em; line-height: 48px; }
.logo-name { color: var(--navy); }
.logo-tld { color: var(--red); }




.search input {
  width: 100%;
  height: var(--line);
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-bottom: 2px solid var(--navy);
  background: transparent;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  outline: none;
}
.search input::placeholder { color: #9aa0ad; }
.search input:focus { border-bottom-color: var(--red); }

.sentence {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 600;
  line-height: var(--line);
  color: var(--navy);
}
.pick { white-space: nowrap; }
























/* ---------- comparison table ---------- */
.compare { margin-bottom: var(--line); }
.compare h2, .school h2 {
  margin: 0;
  font-size: 20px;
  line-height: var(--line);
  color: var(--navy);
}
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { text-align: left; padding: 0 8px 0 0; height: var(--line); vertical-align: bottom; }
.compare th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 600; }
.compare td.num, .compare th.num { text-align: right; }
.compare td { vertical-align: top; }
.compare tbody td { padding-top: 4px; padding-bottom: 4px; line-height: 1.3; }
.compare tbody tr { cursor: pointer; }
.compare tbody tr:hover td:first-child { color: var(--red); }
.compare .muted { color: var(--ink-soft); font-size: 14px; }

.price { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.price.high, .ink-light { color: var(--ink-light); font-weight: 700; }
.unverified {
  font-size: 13px;
  color: var(--red);
  border: 1px dashed var(--red);
  padding: 0 4px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ---------- school sections ---------- */
.school { margin-top: var(--line); }
.school > summary { cursor: pointer; list-style: none; }
.school > summary::-webkit-details-marker { display: none; }
.school > summary h2::before { content: "+ "; color: var(--red); }
.school[open] > summary h2::before { content: "– "; }




.notes { margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-soft); }
.notes li::before { content: "✎ "; color: var(--red); }
.deal { color: var(--ink); }
.deal b { color: var(--red); }



details.level { margin: 0; }
details.level > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  list-style: none;
}
details.level > summary::-webkit-details-marker { display: none; }
details.level > summary::before { content: "+ "; color: var(--red); font-weight: 800; }
details.level[open] > summary::before { content: "– "; }
details.level > summary .count { color: var(--ink-soft); font-weight: 400; }

.programs {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 300px;
  column-gap: 32px;
}
.programs li { break-inside: avoid; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.programs a { text-decoration: none; color: var(--ink); }
.programs a:hover { color: var(--red); text-decoration: underline; }
.cred { color: var(--ink-soft); font-size: 13px; }

.empty { color: var(--ink-soft); font-style: italic; }

.foot { margin-top: calc(var(--line) * 2); font-size: 14px; color: var(--ink-soft); }
.foot p { margin: 0 0 var(--line); }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .page { padding: var(--line) 16px calc(var(--line) * 2); }


  .logo { font-size: 26px; }


  .sentence { font-size: 17px; line-height: 26px; }
  .pick { white-space: normal; }

  .programs { columns: 1; }
  .programs li { white-space: normal; }
  /* Let "housing not verified" tags wrap so the cost table fits a phone screen. */
  .compare td .unverified { display: inline-block; white-space: normal; line-height: 18px; }

}

/* ---------- price breakdown popup ---------- */
.price[data-tip] { cursor: help; border-bottom: 1px dotted currentColor; }
.price[data-tip]:focus-visible { outline: 2px dashed var(--red); outline-offset: 2px; }
.tip {
  position: fixed;
  z-index: 10;
  display: none;
  min-width: 240px;
  max-width: 320px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--navy);
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(27, 42, 92, .18);
  font-size: 14px;
  line-height: 22px;
  pointer-events: none;
}
.tip.on { display: block; }
.tip-title { font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.tip table { width: 100%; border-collapse: collapse; }
.tip td { padding: 0; }
.tip td.num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; padding-left: 16px; }
.tip-note { color: var(--ink-soft); font-size: 12px; }
.tip-total td { border-top: 1px solid var(--navy); padding-top: 4px; font-weight: 700; color: var(--navy); }
.tip-foot { margin-top: 4px; color: var(--ink-soft); font-size: 12px; }

.school .about { flex-basis: 100%; margin: 0 0 8px; font-size: 15px; line-height: 24px; color: var(--ink); max-width: 72ch; }







.compare h2 + .matrix, .compare table + h2 { margin-top: 24px; }



.school { scroll-margin-top: 200px; }




.chip { margin: var(--line) 0 0; font-weight: 600; color: var(--navy); }



.tip-line { margin: 0 0 4px; }










/* ---------- search results ---------- */
.results { margin-bottom: var(--line); }
.results h2 { margin: 0; font-size: 20px; line-height: var(--line); color: var(--navy); }









@media (max-width: 720px) { .res-meta { flex-basis: 100%; margin-left: 0; white-space: normal; } .result-list li { padding: 14px 4px; } }
mark { background: #ffe58a; color: inherit; padding: 0 1px; border-radius: 2px; }



.programs li { transition: background 1s; scroll-margin-top: 220px; }

/* ---------- pitch feedback ---------- */
.votes { flex-basis: 100%; display: flex; align-items: center; gap: 6px; margin: -2px 0 6px; font-size: 13px; color: var(--ink-soft); }

































/* ---------- share button (js/share.js) ---------- */
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; min-height: 40px;
  font: inherit; font-weight: 700; font-size: 15px; color: var(--navy);
  background: transparent; border: 1px solid #cfd3de; border-radius: 999px; cursor: pointer;
}
.share-btn:hover { border-color: var(--navy); }
.share-btn:focus-visible { outline: 3px dashed var(--red); outline-offset: 3px; }
.share-btn svg { flex: none; }
.share-btn.share-done { color: var(--red); border-color: var(--red); }

/* On narrow phones the button is just a bare icon, until it has something to say. */
@media (max-width: 420px) {
  .share-btn { padding: 6px; min-height: 36px; border-color: transparent; }
  .share-btn .share-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .share-btn.share-done .share-label { position: static; width: auto; height: auto; clip: auto; }
}

/* Phones have no hover: anything with a popup reads as tappable (iPhones also only send taps to such elements). */
@media (hover: none) { [data-tip] { cursor: pointer; } }

.share-offscreen { position: fixed; top: 0; left: -9999px; opacity: 0; }
