/* School history only: linked after pages.css by the page's front matter "css": ["p-school-history"].
   AEO package Phase 3 (author a4, 18 Nov 2026); round-2 rework (w2f, 18 Nov 2026): the four eras run on ONE ground with
   ONE spine (an era marker on the line, the head stacked, not the split section head), the whole timeline as a table
   beside the early years, linked photo cards with their destination's name, campus tiles 2 x 2 on phones.
   Tokens from style.css; no new colour. */

/* the hero: a deeper wash under the crumbs, kicker and chips (contrast >= 4.5:1 over the bright sky) */
.phero::before { background: linear-gradient(to top, rgba(7, 39, 36, .95) 0%, rgba(7, 39, 36, .74) 42%, rgba(7, 39, 36, .5) 72%, rgba(7, 39, 36, .7) 100%),
                             linear-gradient(90deg, rgba(7, 39, 36, .74), transparent 66%); }
@media (max-width: 760px) {
  .phero::before { background: linear-gradient(to top, rgba(7, 39, 36, .97) 0%, rgba(7, 39, 36, .88) 52%, rgba(7, 39, 36, .8) 78%, rgba(7, 39, 36, .84) 100%); }
}

/* the current crumb, a touch lighter than the shared .62 so it holds 4.5:1 over the photo */
.phero .crumbs li:last-child { color: rgba(251, 248, 242, .8); }

/* the "today" chapter head: two short paragraphs on the right, both starting on one edge */
.hist-today { display: grid; gap: 14px; justify-self: end; max-width: 46ch; }
.hist-today p { margin: 0; color: var(--muted); }
.hist-today .story__founder { color: var(--ink); justify-self: start; max-width: none; }

/* campus tiles: the name keeps the tile's h3 look, so the page's headings stay its question chapters */
.tile .tile__name { font: 400 25px/1.12 var(--serif); color: var(--pine-dd); margin: 4px 0 2px; }

/* ---------- the journey: one ground, one spine ---------- */
.hist-early { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: clamp(40px, 5vw, 80px); align-items: stretch; }
.hist-line { position: relative; }
.hist-line::before { content: ""; position: absolute; left: 180px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.hist-line--late { padding-top: 70px; }
.hist-line--late::before { top: 0; bottom: 14px; }
.hist-line .chron::before { display: none; }
.hist-journey .chron__item::before { box-shadow: 0 0 0 5px var(--white); }

/* an era: kicker word, question, one paragraph, stacked in the body column; a ring on the spine marks it */
.hist-era { position: relative; padding: 0 0 46px 224px; }
.hist-era + .chron, .chron + .hist-era { margin-top: 0; }
.chron + .hist-era { padding-top: 76px; }
.hist-era::before { content: ""; position: absolute; left: 170px; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); border: 2px solid var(--gold); box-shadow: 0 0 0 6px var(--white); }
.chron + .hist-era::before { top: 78px; }
.hist-era .kicker { margin-bottom: 16px; }
.hist-era .h2 { font-size: clamp(32px, 3.4vw, 50px); max-width: 20ch; margin: 0 0 18px; }
.hist-era > p:last-child { margin: 0; color: var(--muted); max-width: 60ch; }

/* timeline entry names: the .chron__body h3 look, as a name inside its period's chapter */
.chron__body .chron__name { font: 400 clamp(24px, 2vw, 30px)/1.15 var(--serif); color: var(--pine-dd); margin: 0; max-width: none; }
.chron__txt .link-arrow { justify-self: start; }

/* linked photo cards (the photo belongs to the page they open): its name on the photo, as the .next cards do */
.hist-card { position: relative; }
.hist-card > a { position: relative; display: block; color: var(--paper); text-decoration: none; isolation: isolate; }
.hist-card > a::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(to top, rgba(7, 39, 36, .94), rgba(7, 39, 36, .7) 45%, rgba(7, 39, 36, 0)); pointer-events: none; }
.hist-card span { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px; font: 600 14px/1.3 var(--sans); letter-spacing: .02em; color: var(--paper); }
.hist-card span::after { content: " →"; color: var(--gold-l); }
.chron__body .hist-seniors { object-position: 50% 28%; }

/* the whole timeline, beside the early years */
.hist-table { align-self: start; position: sticky; top: calc(var(--hdr-h) + 24px); background: var(--paper); border-radius: 10px; box-shadow: 0 0 0 1px var(--line); padding: 26px 24px 18px; }
.hist-table__title { margin: 0 0 14px; font: 400 24px/1.15 var(--serif); color: var(--pine-dd); }
.hist-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.4; }
.hist-table th { text-align: left; font: 700 12px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); padding: 0 8px 10px 0; border-bottom: 1px solid var(--line); }
.hist-table td { vertical-align: top; padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.hist-table td:first-child { font: 400 17px/1.2 var(--serif); color: var(--pine); white-space: nowrap; }
.hist-table td:nth-child(2) { color: var(--ink); font-weight: 600; }
.hist-table tr:last-child td { border-bottom: 0; }

/* the pine chapter: one line under the tagline */
.hist-thread { max-width: 62ch; margin: clamp(36px, 4vw, 54px) auto 0; text-align: center; display: grid; gap: 18px; justify-items: center; }
.hist-thread p { margin: 0; }

/* the campuses on the way: three named markers above the two read-next cards */
.hist-coming { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 0 0 18px; padding: 0; }
.hist-coming li { display: grid; gap: 8px; padding: 22px 24px; border-radius: 10px; background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.hist-coming small { font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); }
.hist-coming b { font: 400 clamp(26px, 2.4vw, 34px)/1.05 var(--serif); color: var(--pine-dd); }

/* the read-next cards: a deeper wash under their small gold label (shared .next keeps its own elsewhere) */
.next a::before { background: linear-gradient(to top, rgba(7, 39, 36, .94) 0%, rgba(7, 39, 36, .78) 40%, rgba(7, 39, 36, .3) 100%); }

/* questions as h3 (a heading per question for search engines), looking exactly like the summary line */
.faq-item summary h3 { font: inherit; color: inherit; letter-spacing: inherit; margin: 0; }

@media (max-width: 1100px) {
  .hist-early { grid-template-columns: 1fr; }
  .hist-table { position: static; margin-top: 56px; }
  .hist-line--late { padding-top: 56px; }
}
@media (max-width: 760px) {
  .hist-line::before { left: 6px; }
  .hist-era { padding-left: 34px; }
  .hist-era::before { left: -3px; width: 20px; height: 20px; }
  .hist-era .h2 { font-size: clamp(30px, 8.4vw, 40px); }
  .hist-table { padding: 22px 16px 12px; }
  .hist-table table { font-size: 13.5px; }
  .hist-table td:first-child { font-size: 15px; }
  /* the four campus tiles, compact (photo beside the text), so the history starts sooner */
  .hist-campuses { grid-template-columns: 1fr; gap: 12px; }
  .hist-campuses .tile { flex-direction: row; }
  .hist-campuses .tile__img { flex: 0 0 36%; aspect-ratio: auto; }
  .hist-campuses .tile__body { padding: 14px 14px 16px; gap: 6px; }
  .hist-campuses .tile__body p { font-size: 13px; line-height: 1.45; }
  .hist-campuses .tile .tile__name { font-size: 21px; }
  .hist-campuses .pill { font-size: 12px; padding: 6px 8px; letter-spacing: .04em; }
  .hist-coming { grid-template-columns: 1fr; gap: 10px; }
  .hist-coming li { grid-template-columns: auto 1fr; align-items: baseline; gap: 14px; padding: 16px 20px; }
}
