/* Refero OpenAI Style Reference, adapted to IMT. See DESIGN.md. */
:root {
  --ink:#252743;
  --muted:#666666;
  --hover:#171820;
  --line:#2527431f;
  --paper:#ffffff;
  --surface-ash:#f1f1f1;
  --measure-display:1200px;
  --measure-reading:800px;
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:20px;
  --space-6:24px;
  --space-8:32px;
  --space-10:40px;
  --space-12:48px;
  --space-16:64px;
  --space-20:80px;
  --space-24:96px;
  --text-footer:.875rem;
  --text-caption:.9375rem;
  --text-control:1rem;
  --text-body:1.0625rem;
  --text-lead:1.25rem;
  --text-section:1.375rem;
  --text-heading:1.75rem;
  --text-page:2.25rem;
  --text-display:2.75rem;
  --text-display-compact:1.5rem;
  --radius-photo:6px;
  --radius-action:9999px;
  --target-control:44px;
  --target-row:52px;
  --measure-label:88px;
  --reader-height:800px;
  --reader-min-height:560px;
  --reader-mobile-height:620px;
  --measure-prose:75ch;
  --home-header-height:112px;
  --home-header-mobile:96px;
  --home-cover-width:184px;
  --catalog-cover-width:200px;
  --catalog-cover-tablet:160px;
  --catalog-cover-mobile:112px;
  --institute-label-width:224px;
  --giving-label-width:144px;
}
body { font-size:var(--text-body); line-height:1.75; background:var(--paper); }
.site-page { --page-width:var(--measure-reading); --gutter:var(--space-6); }
.home-page,.publications-page,.education-page { --page-width:var(--measure-display); --gutter:var(--space-10); }
.site-page .site-header,.site-page .site-footer { --page-width:var(--measure-display); --gutter:var(--space-10); }
.site-page .site-header { min-height:88px; gap:var(--space-8); flex-wrap:wrap; }
.site-page .brand img { width:148px; }
.site-page .header-nav { gap:var(--space-8); flex-wrap:wrap; min-width:0; max-width:100%; }
.site-page .header-nav a,.site-page .header-support { font-size:var(--text-control); font-weight:500; }
.site-page .header-support { min-width:0; padding:0; background:transparent; color:var(--ink); border-radius:0; }
.site-page .header-support:hover { color:var(--muted); }
.site-page .header-support[aria-current] { font-weight:600; }
.site-page .subpage { padding-block:var(--space-8) var(--space-12); }
.site-page .subpage h1 { font-size:var(--text-heading); font-weight:600; line-height:1.5; letter-spacing:-.025em; text-wrap:pretty; }
.site-page:is(.about-page,.publications-page,.education-page,.support-page) .subpage h1 { font-size:var(--text-page); }
.site-page .record-heading h1 { font-size:var(--text-heading); }
.site-page .subpage-title,.site-page .record-heading { margin-bottom:var(--space-8); }
.site-page .catalog-heading .subpage-title,.site-page .programme-heading .subpage-title { margin:0; }
.breadcrumb { font-size:var(--text-caption); }
.section-index a,.programme-switcher a { font-size:var(--text-caption); }
.section-index a:hover,.programme-switcher a:hover { color:var(--ink); }
.primary-link,.secondary-link,.support-invitation .primary-link { min-height:var(--target-control); max-width:100%; border-radius:var(--radius-action); padding:10px 24px; font-size:var(--text-control); line-height:1.6; letter-spacing:0; white-space:normal; text-align:center; }
.primary-link { background:var(--ink); }
.secondary-link { color:var(--ink); border-color:var(--line); }
.secondary-link:hover { background:var(--surface-ash); border-color:var(--ink); }
.primary-link svg,.catalog-resources svg,.related-resource svg,.page-links svg,.event-links svg { display:none; }
.site-page .site-footer { font-size:var(--text-footer); line-height:1.9; padding-block:var(--space-6); }
.site-page .site-footer nav a { font-size:var(--text-footer); }
.page-footer { margin-top:0; }
.page-footer::before { border-color:var(--line); }
.site-menu { border-radius:var(--radius-photo); }

/* The book covers remain the primary imagery on the home page. */
.home-page main { padding-block:var(--space-10) 0; }
.entry-intro h1 { font-size:var(--text-display); line-height:1.35; font-weight:700; letter-spacing:-.03em; }
.book-grid { gap:var(--space-10) var(--space-16); margin-top:var(--space-12); }
.book-cover { height:278px; }
.book-cover img { max-width:184px; max-height:278px; box-shadow:none; transition:opacity 160ms ease-out; }
.book-cover:hover img { transform:none; box-shadow:none; opacity:.84; }
.support-invitation { margin-top:var(--space-12); }
.support-inner { padding-top:var(--space-6); }
.support-invitation p { font-size:var(--text-caption); }
.home-page .site-footer { padding-block:var(--space-4) var(--space-6); }

/* Catalogue: covers and bibliographic information, without card decoration. */
.catalog-heading { margin-bottom:var(--space-12); }
.catalog-section { grid-template-columns:136px minmax(0,1fr); gap:var(--space-10); margin-bottom:var(--space-16); }
.publications-page .catalog-section>h2,.catalog-resources>h2 { font-size:var(--text-caption); font-weight:500; color:var(--muted); margin-top:4px; }
.catalog-list { gap:var(--space-10) var(--space-8); }
.catalog-entry { grid-template-columns:128px minmax(0,1fr); gap:var(--space-6); }
.catalog-entry img { box-shadow:none; }
.catalog-title { font-size:var(--text-body); font-weight:500; line-height:1.55; }
.catalog-author,.catalog-series { font-size:var(--text-caption); line-height:1.75; }
.catalog-author { margin-top:var(--space-3); }
.catalog-series { margin-top:var(--space-1); }
.catalog-resources { grid-template-columns:136px minmax(0,1fr); gap:var(--space-10); padding-top:var(--space-8); }
.catalog-resources a { font-size:var(--text-caption); }

/* Education: named groups and text links, separated by space. */
.education-page .education-intro { margin-bottom:var(--space-3); }
.education-page .section-index { margin-bottom:var(--space-12); gap:0 var(--space-8); }
.education-directory { border:0; }
.education-category { grid-template-columns:224px minmax(0,1fr); gap:var(--space-12); padding:0; border:0; }
.education-category+.education-category { margin-top:var(--space-16); }
.education-category>h2 { margin:10px 0 0; font-size:var(--text-section); font-weight:500; line-height:1.55; letter-spacing:-.025em; }
.education-directory .event-title-list { column-gap:var(--space-8); }
.event-title-list a { min-height:52px; padding:12px 8px; margin-inline:-8px; border-radius:4px; font-size:var(--text-body); line-height:1.65; transition:background-color 160ms ease-out; }
.event-title-list a:hover { background:var(--surface-ash); color:var(--ink); }
.event-title-list a:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }
.programme-index-page .event-title-list { border:0; }
.programme-index-page .event-title-list li { border:0; }
.programme-index-page .event-title-list a { min-height:60px; font-size:var(--text-body); }

/* Readable detail pages retain all source content and media. */
.book-detail-copy h1 { font-size:var(--text-heading); }
.book-description,.event-description,.record-section p,.record-syllabus,.about-copy,.about-lead { font-size:var(--text-body); line-height:1.85; }
.book-author,.book-meta,.book-series,.event-meta,.record-facts>div,.facts>div { font-size:var(--text-caption); line-height:1.8; }
.record-section>h2,.about-section h2,.site-page .giving-guide h2 { font-size:var(--text-section); font-weight:500; line-height:1.5; }
.record-section { margin-top:var(--space-8); }
.record-section>h2 { margin-bottom:var(--space-4); }
.record-materials li,.material-list li,.paper-title { font-size:var(--text-body); line-height:1.8; }
.record-materials li>span,.material-list li>span,.paper-person,.course-teacher,.lecturer { font-size:var(--text-caption); }
.about-introduction { gap:var(--space-10); margin-top:var(--space-8); }
.about-statement { font-size:var(--text-section); font-weight:500; line-height:1.6; }
.about-work dd,.organisation-groups dd { font-size:var(--text-body); line-height:1.85; }
.about-photo img,.record-photo img,.conference-photo img { border-radius:var(--radius-photo); }
.site-page .giving-options { gap:var(--space-16); margin-top:var(--space-12); }
.site-page .giving-option h2 { font-size:var(--text-section); font-weight:500; }
.site-page .giving-option p { font-size:var(--text-body); line-height:1.85; }
.site-page .giving-guide { grid-template-columns:136px minmax(0,1fr); gap:var(--space-10); margin-top:var(--space-12); padding-top:var(--space-8); }
.site-page .giving-guide dl>div { font-size:var(--text-body); line-height:1.85; }
.notice-list a { font-size:var(--text-body); }
.notice-date { font-size:var(--text-caption); }
.video-library .video-caption,.video-choices a,.video-choices small { font-size:var(--text-caption); }

@media (min-width:761px) and (max-width:1000px) {
  .home-page,.publications-page,.education-page,.site-page .site-header,.site-page .site-footer { --gutter:var(--space-8); }
  .book-grid { column-gap:var(--space-8); }
  .book-cover img { max-width:100%; max-height:256px; }
  .catalog-section { grid-template-columns:1fr; gap:var(--space-6); }
  .education-category { grid-template-columns:176px minmax(0,1fr); gap:var(--space-8); }
  .education-directory .event-title-list { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  :root { --text-display:1.75rem; --text-page:1.75rem; --text-heading:1.5625rem; --text-section:1.375rem; --text-body:1.125rem; }
  .home-page,.publications-page,.education-page,.site-page .site-header,.site-page .site-footer { --gutter:var(--space-6); }
  .site-page .site-header { min-height:80px; }
  .site-page .brand img { width:146px; }
  .site-page .subpage { padding-block:var(--space-6) var(--space-8); }
  .home-page main { padding-top:var(--space-6); }
  .entry-intro h1 { line-height:1.45; }
  .book-grid { max-width:460px; margin-top:var(--space-8); gap:var(--space-6) var(--space-8); }
  .book-cover { height:216px; }
  .book-cover img { max-width:min(100%,146px); max-height:216px; }
  .support-invitation { margin-top:var(--space-8); }
  .support-inner { gap:var(--space-4); }
  .support-invitation p { font-size:var(--text-caption); }
  .home-page .site-footer { padding-top:var(--space-3); }
  .catalog-heading { margin-bottom:var(--space-8); gap:var(--space-2); }
  .catalog-section { grid-template-columns:1fr; gap:var(--space-6); margin-bottom:var(--space-12); }
  .catalog-entry { grid-template-columns:112px minmax(0,1fr); gap:var(--space-6); }
  .catalog-title { font-size:var(--text-body); }
  .catalog-author,.catalog-series { font-size:var(--text-caption); }
  .catalog-resources { grid-template-columns:1fr; gap:var(--space-3); }
  .education-page .section-index { gap:0 20px; margin-bottom:var(--space-8); }
  .education-page .section-index a { font-size:var(--text-caption); }
  .education-category { grid-template-columns:1fr; gap:var(--space-3); }
  .education-category+.education-category { margin-top:var(--space-10); }
  .education-category>h2 { margin:0; font-size:var(--text-section); }
  .event-title-list a,.programme-index-page .event-title-list a { min-height:var(--target-row); font-size:var(--text-body); }
  .education-directory .event-title-list { grid-template-columns:1fr; }
  .site-page .giving-options { gap:var(--space-10); margin-top:var(--space-8); }
  .site-page .giving-guide { grid-template-columns:1fr; gap:var(--space-6); margin-top:var(--space-10); }
  .record-materials li,.material-list li { font-size:var(--text-body); }
  .about-section { grid-template-columns:1fr; }
  .about-introduction { gap:var(--space-6); }
  .site-page .site-footer { padding-block:var(--space-4); }
}
@media (max-width:350px) {
  .home-page,.publications-page,.education-page,.site-page .site-header,.site-page .site-footer { --gutter:20px; }
  .entry-intro h1 { font-size:var(--text-display-compact); }
  .book-grid { column-gap:var(--space-6); }
  .book-cover { height:186px; }
  .book-cover img { max-width:100%; max-height:186px; }
  .catalog-entry { grid-template-columns:96px minmax(0,1fr); gap:20px; }
  .catalog-title { font-size:var(--text-body); }
}
@media (prefers-reduced-motion:reduce) {
  .book-cover img,.event-title-list a { transition:none; }
}

/* Reading and metadata roles also cover the preserved detail-page layouts. */
.site-page main { overflow-wrap:anywhere; }
.site-page main .about-section>p,.site-page main .record-content>p,
.site-page main .meeting-inline-body,.site-page main .syllabus,
.site-page main .course-record p,.site-page main .course-brief p,
.site-page main .abstract-body p,.site-page main .lesson-grid p {
  font-size:var(--text-body);
}
.site-page main .event-meta,.site-page main .event-date,
.site-page main .record-content>.event-meta,
.site-page main .speaker,.site-page main .meeting-inline-meta,
.site-page main .meeting-presenters,.site-page main .book-author,
.site-page main .book-series,.site-page main .book-meta,
.site-page main .booktalk-grid time,.site-page main small,
.site-page main .lesson-grid span,.site-page main .course-teacher span,
.site-page main .lecturer span,.site-page main .organisation-groups dd span,
.site-page main .facts dt,.site-page main .facts dd,
.site-page main .record-facts dt,.site-page main .record-facts dd {
  font-size:var(--text-caption);
}
.site-page main .text-link,.site-page main .page-links a,
.site-page main .book-additional a { font-size:var(--text-control); }
.site-page main .paper-link { font-size:var(--text-body); }
.site-page main .video-choices h3,.site-page .institute-people h3 {
  font-size:var(--text-body); color:var(--ink);
}
.site-page main .course-record h2,.site-page main .course-brief h2,
.site-page main .booktalk-grid h2,.site-page main .talk-abstract h2,
.site-page main .meeting-inline-heading h2 { font-size:var(--text-section); }
.site-page main:focus-visible { outline:2px solid var(--ink); outline-offset:var(--space-1); }
.site-page .site-footer a[href^="mailto:"],.site-page .site-footer a[href^="tel:"] {
  display:inline-flex; align-items:center; min-height:var(--target-control);
  font-size:var(--text-footer);
}
.site-page ::selection { color:var(--paper); background:var(--ink); }
.event-meta,.event-date,.record-facts,.book-meta,.catalog-book-meta,
.notice-date,.programme-date,.home-programme-date,.resource-date {
  font-variant-numeric:tabular-nums;
}
