/* WITAN — style */

:root {
  --bg: #f4f0e6;
  --bg-elev: #ebe6d8;
  --bg-dark: #2b2825;
  --ink: #16171a;
  --muted: #5a5a5a;
  --muted-on-dark: #b8b0a0;
  --accent: #8b2135;   /* deep claret */
  --accent-soft: #a94255;
  --rule: #c8bfab;
  --rule-dark: #45403a;

  --content-width: 900px;
  --hero-width: 1160px;

  --serif: "Fraunces", "Source Serif 4", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variation-settings: "opsz" 18, "SOFT" 50;
}

img { max-width: 100%; display: block; }

.shell {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 32px;
}

.shell-wide {
  max-width: var(--hero-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   Site header (nav)
   ============================================================ */

.site-header {
  background: var(--bg);
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

.site-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 28, "SOFT" 100;
}

.site-name .site-name-mark {
  color: var(--accent);
  font-style: italic;
}

.site-header nav {
  display: flex;
  gap: 30px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
}

.site-header nav a:hover { color: var(--ink); }
.site-header nav a.active { color: var(--accent); }

/* ============================================================
   Hero (Home page)
   ============================================================ */

.masthead {
  padding: 72px 0 0;
}

.masthead-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 9.5vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0 0 48px;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 0;
}

.masthead-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  border-top: 1px solid var(--ink);
  padding-top: 24px;
  margin-bottom: 48px;
}

.masthead-lede {
  font-size: clamp(19px, 1.8vw, 23px);
  line-height: 1.45;
  margin: 0;
  max-width: 640px;
  font-variation-settings: "opsz" 24;
}

.masthead-facts {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  margin: 2px 0 0;
  font-variation-settings: "opsz" 20;
}

.masthead-facts span { display: block; }
.masthead-facts .facts-date { color: var(--accent); }
.masthead-facts .facts-hosts { margin-top: 14px; }
.masthead-facts .facts-hosts em {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 1px;
}

.schools {
  border-top: 1px solid var(--rule);
  margin-top: 48px;
  padding: 24px 0 8px;
}

.schools-label {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}

.schools-logos {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  align-items: center;
  gap: 28px 28px;
}

.schools-logos li { display: flex; align-items: center; justify-content: center; }

.schools-logos img {
  height: 38px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(1) contrast(1.1);
  mix-blend-mode: multiply;
  opacity: 0.72;
  transition: filter .2s, opacity .2s;
}

.schools-logos li:hover img { filter: none; opacity: 1; }

.schools-logos .logo-kings img,
.schools-logos .logo-imperial img { filter: grayscale(1) brightness(0.45) contrast(1.2); }

/* optical sizing — logos differ in shape, so heights are tuned by eye */
.schools-logos .logo-bayes img { height: 46px; }
.schools-logos .logo-cambridge-judge img { height: 42px; }
.schools-logos .logo-imperial img { height: 30px; }
.schools-logos .logo-kings img { height: 46px; }
.schools-logos .logo-lbs img { height: 48px; }
.schools-logos .logo-lse img { height: 38px; }
.schools-logos .logo-oxford img { height: 40px; }
.schools-logos .logo-ucl-som img { height: 38px; }
.schools-logos .logo-warwick img { height: 44px; }

@media (max-width: 960px) {
  .schools-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
}

.masthead-photo { margin: 0; }

.masthead-photo img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center 35%;
}

.masthead-photo figcaption {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

.masthead-photo figcaption a { color: inherit; }

/* ============================================================
   Page header (non-home)
   ============================================================ */

.page-header {
  padding: 88px 0 44px;
  border-bottom: 1px solid var(--rule);
}

.page-header .eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-header .eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

.page-header h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 800px;
  font-variation-settings: "opsz" 80, "SOFT" 30;
}

.page-header .lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.45;
  color: var(--muted);
  margin: 28px 0 0;
  max-width: 680px;
  font-variation-settings: "opsz" 24;
}

/* ============================================================
   Main content
   ============================================================ */

.page-body {
  padding-top: 56px;
  padding-bottom: 112px;
}

article.page section + section { margin-top: 64px; }

/* ------------------------------------------------------------
   "On this page" sidebar (pages with 2+ sections)
   ------------------------------------------------------------ */

.toc { display: none; }

@media (min-width: 1040px) {
  body.has-toc .page-header > .shell,
  body.has-toc .page-body {
    max-width: var(--hero-width);
  }

  body.has-toc .page-header > .shell {
    padding-left: calc(32px + 180px + 64px);
  }

  body.has-toc .page-body {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }

  body.has-toc article.page { max-width: 760px; }

  .toc {
    display: block;
    position: sticky;
    top: 40px;
    font-family: var(--sans);
    font-size: 13.5px;
    line-height: 1.4;
  }

  .toc-label {
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 14px;
  }

  .toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--rule);
  }

  .toc li + li { margin-top: 2px; }

  .toc a {
    display: block;
    padding: 5px 0 5px 14px;
    margin-left: -1px;
    border-left: 1px solid transparent;
    color: var(--muted);
    text-decoration: none;
  }

  .toc a:hover { color: var(--ink); }
  .toc a.active { color: var(--accent); border-left-color: var(--accent); }
}

h2[id] { scroll-margin-top: 32px; }
html { scroll-behavior: smooth; }
article.page section > * + * { margin-top: 1em; }

h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

h2::before {
  content: "";
  width: 20px; height: 1px;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 36px 0 14px;
}

p {
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
}

article.page p + p { margin-top: 1em; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover { color: var(--ink); }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.muted { color: var(--muted); }

.note {
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

/* ============================================================
   Figures (images with captions)
   ============================================================ */

figure.figure {
  margin: 40px 0;
  padding: 0;
}

figure.figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

figure.figure figcaption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ============================================================
   Facts / meta lists
   ============================================================ */

dl.facts {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px 32px;
  font-size: 17px;
  margin: 0;
}

dl.facts dt {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  padding-top: 6px;
}

dl.facts dd {
  margin: 0;
  font-variation-settings: "opsz" 18;
}

/* ============================================================
   Rotation & sessions
   ============================================================ */

ul.rotation, ul.sessions {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.rotation li {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 17px;
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: baseline;
  gap: 24px;
}

ul.rotation li:last-child { border-bottom: none; }

ul.rotation .year {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.03em;
}

ul.rotation .year.current { color: var(--accent); }

ul.rotation .host {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  font-variation-settings: "opsz" 20;
}

ul.rotation .who {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

ul.sessions li {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
  line-height: 1.55;
}

ul.sessions li:last-child { border-bottom: none; }
ul.sessions strong { font-weight: 600; }

ol.programme {
  list-style: none;
  padding: 0;
  margin: 0;
}

ol.programme li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
  line-height: 1.55;
}

ol.programme li:last-child { border-bottom: none; }
ol.programme .time {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
ol.programme strong { font-weight: 600; }
ol.programme p { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; }

.download {
  font-family: var(--sans);
  font-size: 14px;
  margin: 20px 0 0;
}
.download a { color: var(--accent); }
.download a::before { content: "\2193\00a0"; }
.download.pending { color: var(--muted); }

.edition-organisers {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 20px;
}

/* ============================================================
   Past editions
   ============================================================ */

.edition { padding-bottom: 48px; }

.edition + .edition {
  border-top: 1px solid var(--rule);
  padding-top: 56px;
  margin-top: 56px;
}

.edition-title {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 30px);
  color: var(--ink);
  font-weight: 500;
  margin: 8px 0 6px;
  letter-spacing: -0.015em;
  text-transform: none;
  display: block;
  font-variation-settings: "opsz" 40, "SOFT" 50;
}

.edition-title::before {
  display: none;
}

.edition-meta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.edition.muted { opacity: 0.72; }

/* ============================================================
   Blog
   ============================================================ */

.empty-state {
  font-style: italic;
  color: var(--muted);
  font-size: 17px;
  padding: 48px 32px;
  border: 1px solid var(--rule);
  text-align: center;
  background: var(--bg-elev);
  margin-top: 32px;
  font-variation-settings: "opsz" 20;
}

/* ============================================================
   Contact
   ============================================================ */

.contact-block {
  font-size: 17px;
  line-height: 1.9;
}

.contact-block .name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

.contact-block .role {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  display: block;
}

.contact-block .email {
  font-family: var(--sans);
  font-size: 14px;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--bg-dark);
  color: var(--muted-on-dark);
  padding: 48px 0 56px;
  margin-top: 0;
  font-family: var(--sans);
  font-size: 13px;
}

.site-footer .footer-inner {
  max-width: var(--hero-width);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
}

.site-footer .footer-mark {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--bg);
  font-variation-settings: "opsz" 20;
}

.site-footer p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; }

.site-footer a { color: var(--muted-on-dark); text-decoration: underline; }
.site-footer a:hover { color: var(--bg); }

/* ============================================================
   Mobile
   ============================================================ */

@media (max-width: 720px) {
  .shell, .shell-wide, .site-footer .footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  body { font-size: 16.5px; }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .site-header nav { gap: 20px; flex-wrap: wrap; }
  .site-name { font-size: 20px; }

  .masthead { padding-top: 48px; }
  .masthead-title { margin-bottom: 32px; }
  .masthead-row { grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
  .masthead-photo img { aspect-ratio: 4 / 3; }

  .page-header { padding: 56px 0 32px; }
  .page-body { padding-bottom: 80px; }

  dl.facts { grid-template-columns: 1fr; gap: 4px; }
  dl.facts dt { margin-top: 18px; }
  dl.facts dt:first-child { margin-top: 0; }

  ul.rotation li {
    grid-template-columns: 60px 1fr;
    gap: 16px;
  }
  ul.rotation .who {
    grid-column: 2;
    text-align: left;
    margin-top: 4px;
  }

  .site-footer .footer-inner {
    grid-template-columns: 1fr;
  }
}
