/* ---------- Design tokens ---------- */
:root {
  /* Brand colours, matched to the Canva designs */
  --brand-blue: #003087;
  --brand-dark-blue: #00205b;
  --brand-yellow: #ffb81c;
  --brand-green: #009639;
  --bg: #f0f4f5;
  --surface: #ffffff;
  --surface-2: #e8edee;
  --text: #212b32;
  --muted: #4c6272;
  --border: #d8dde0;
  --brand: var(--brand-blue);
  --brand-ink: #ffffff;
  /* Blue for links and accent text; lighter in dark mode so it stays readable */
  --brand-text: var(--brand-blue);
  --accent: var(--brand-yellow);
  --keynote: #330072;
  --workshop: #007f3b;
  --panel: #8a1538;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(33, 43, 50, .08), 0 6px 18px rgba(33, 43, 50, .06);
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --display: var(--font);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e151d;
    --surface: #16212c;
    --surface-2: #1d2a37;
    --text: #e6edf3;
    --muted: #9aabbc;
    --border: #2a3a4a;
    --brand: #003087;
    --brand-ink: #ffffff;
    --brand-text: #8fb8ef;
    --accent: #ffb81c;
    --keynote: #b58be0;
    --workshop: #4cc192;
    --panel: #e98a63;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e151d;
  --surface: #16212c;
  --surface-2: #1d2a37;
  --text: #e6edf3;
  --muted: #9aabbc;
  --border: #2a3a4a;
  --brand: #003087;
  --brand-ink: #ffffff;
  --brand-text: #8fb8ef;
  --accent: #ffb81c;
  --keynote: #b58be0;
  --workshop: #4cc192;
  --panel: #e98a63;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
}
img, video, iframe { max-width: 100%; display: block; }
a { color: var(--brand-text); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.sample-banner {
  background: var(--accent); color: #241a00; text-align: center;
  font-size: 14px; padding: 6px 16px;
}

/* ---------- Buttons, chips, avatars ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  background: var(--brand); color: var(--brand-ink); font-weight: 600;
  text-decoration: none; cursor: pointer; font-size: 15px;
}
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.chip {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
}
.chip-keynote { background: color-mix(in srgb, var(--keynote) 18%, transparent); color: var(--keynote); }
.chip-workshop { background: color-mix(in srgb, var(--workshop) 18%, transparent); color: var(--workshop); }
.chip-panel { background: color-mix(in srgb, var(--panel) 18%, transparent); color: var(--panel); }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; flex: none; object-fit: cover;
  display: inline-grid; place-items: center; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--keynote)); color: #fff;
}
.avatar-lg { width: 112px; height: 112px; font-size: 34px; }
.avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.avatar-md { width: 48px; height: 48px; font-size: 16px; }

/* ---------- Media ---------- */
.media { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.media iframe, .media video, .media img { width: 100%; height: 100%; border: 0; object-fit: cover; }
.media-empty { display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.media-icon { font-size: 28px; }
.media-link { display: grid; place-items: center; text-decoration: none; font-weight: 600; }

/* ---------- Website ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.logo img { width: 44px; height: 44px; border-radius: 10px; }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--text); }
@media (max-width: 760px) { .site-nav { display: none; } }

.hero {
  background: var(--brand-blue);
  color: #fff; padding: 72px 0 64px;
}
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5.5vw, 54px); }
.hero .eyebrow { font-size: 14px; font-weight: 700; opacity: .95; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 16px 0 28px; opacity: .92; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn { background: var(--brand-yellow); color: #212b32; }
.hero-strip { background: #fff; color: #212b32; border-bottom: 1px solid var(--border); padding: 14px 0; font-size: 15px; }
.hero-strip strong { display: block; }
.hero-strip .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.network-logo { height: 84px; width: auto; margin: -14px 0; }
/* Crowd photo with the emblem's Thames ribbon flowing across its lower edge */
.hero-visual { position: relative; padding-bottom: 28px; }
.hero-photo { aspect-ratio: 4 / 3; border-radius: 120px 24px 24px 24px; overflow: hidden; background: var(--brand-dark-blue); }
.hero-photo .media { aspect-ratio: auto; height: 100%; border-radius: 0; background: var(--brand-dark-blue); color: #cfe0f2; }
.hero-photo .media-empty { color: #cfe0f2; }
.hero-ribbon { position: absolute; left: -6%; bottom: 0; width: 106%; height: 34%; }
.hero .btn-ghost { background: transparent; color: #fff; }
.countdown { display: flex; gap: 12px; margin-top: 28px; }
.countdown div { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 14px; text-align: center; min-width: 70px; }
.countdown strong { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 12px; opacity: .8; }
@media (max-width: 860px) { .hero .container { grid-template-columns: 1fr; } }

section.block { padding: 64px 0; }
section.block.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 4vw, 36px); margin: 0; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
section.alt .card { background: var(--bg); }
.card-body { padding: 18px; }

.speaker-card .card-body { display: flex; gap: 14px; align-items: flex-start; }
.speaker-card h3 { font-size: 18px; margin: 0; }
.speaker-card p { margin: 4px 0 0; }
.speaker-card button { all: unset; cursor: pointer; color: var(--brand-text); font-weight: 600; font-size: 14px; margin-top: 8px; display: inline-block; }

.programme { display: grid; gap: 10px; }
.prog-row { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 16px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.prog-row.break { background: transparent; border-style: dashed; color: var(--muted); }
.prog-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.prog-row h3 { font-size: 16px; margin: 0 0 4px; }
.prog-faces { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 270px; }
.prog-faces button { all: unset; cursor: pointer; border-radius: 50%; line-height: 0; }
.prog-faces button:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
@media (max-width: 560px) {
  .prog-row { grid-template-columns: 1fr; gap: 4px; }
  .prog-faces { justify-content: flex-start; max-width: none; margin-top: 6px; }
}

.past-meeting { margin-bottom: 48px; }
.prog-day { margin: 20px 0 4px; font-size: 18px; color: var(--brand-text); }
.prog-day:first-child { margin-top: 0; }

/* Pre-meeting workshop */
.eyebrow-dark { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text); margin: 0 0 8px; }
#workshop h2 { font-size: clamp(26px, 4vw, 36px); }
.lede { font-size: 18px; max-width: 760px; }
.ws-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 24px 0; }
.ws-facts div { background: var(--brand); color: var(--brand-ink); border-radius: var(--radius); padding: 14px 18px; }
.ws-facts span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.ws-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.ws-stats div { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px; border-radius: 999px; background: color-mix(in srgb, var(--brand-yellow) 25%, transparent); }
.ws-stats strong { font-size: 22px; }
.ws-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.ws-cols h3 { font-size: 17px; margin-top: 0; }
.ws-cols ul { padding-left: 20px; margin: 0; display: grid; gap: 6px; }
.faculty-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.faculty { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); font-weight: 600; font-size: 14px; }
@media (max-width: 760px) { .ws-cols { grid-template-columns: 1fr; } }
.past-meeting h3 { font-size: 22px; font-family: var(--display); }
.past-meeting { padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.past-meeting:last-child { border-bottom: 0; }
.past-programme { margin: 16px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 18px; }
.past-programme summary { cursor: pointer; font-weight: 700; padding: 12px 0; color: var(--brand-text); }
.past-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.past-row .faculty-list { margin: 8px 0 0; }
@media (max-width: 560px) { .past-row { grid-template-columns: 1fr; gap: 4px; } }
.prize { margin-top: 20px; }
.prize h4 { font-size: 18px; margin: 0 0 12px; }
.presenter { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.presenter > span { display: grid; gap: 2px; }
.presenter .talk { margin-top: 6px; font-size: 14px; font-style: italic; }
.modal-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 20px; }
.highlight-card h4 { margin: 0; font-size: 16px; }

.app-promo { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.app-promo .qr { background: #fff; padding: 12px; border-radius: 12px; width: 184px; height: 184px; }
.app-promo .qr svg { width: 100%; height: 100%; display: block; }
.app-promo ol { padding-left: 20px; }
@media (max-width: 700px) { .app-promo { grid-template-columns: 1fr; } }

.board-hero { padding-block: 56px 8px; }
.board-hero h1 { font-size: clamp(32px, 5vw, 48px); margin: 0 0 12px; }
.board-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.board-card { display: flex; gap: 18px; align-items: flex-start; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
section.alt .board-card { background: var(--bg); }
.board-card h3 { font-size: 19px; margin: 0 0 4px; }
.board-card p { margin: 0; }
.board-role { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text); margin-bottom: 4px !important; }
.board-bio { margin-top: 10px !important; font-size: 15px; }
@media (max-width: 400px) { .board-grid { grid-template-columns: 1fr; } .board-card { flex-direction: column; } }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 700; }
/* Registration and contact form */
.register-wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: start; }
.register-wrap h2 { font-size: clamp(26px, 4vw, 36px); }
.small { font-size: 14px; }
.contact-form { display: grid; gap: 16px; padding: 22px; }
section.alt .contact-form { background: var(--bg); }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form textarea {
  font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 100%; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 1px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-type { border: 0; padding: 0; margin: 0; display: flex; gap: 20px; }
.form-type label, .form-sessions label { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; }
.form-sessions { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 8px; }
.form-sessions legend { font-weight: 600; font-size: 14px; padding: 0 4px; }
.form-status { margin: 0; min-height: 1.4em; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 760px) { .register-wrap, .form-grid { grid-template-columns: 1fr; } }
.site-footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }

dialog.modal {
  width: min(640px, 100% - 32px); max-height: 85vh; border: 0; padding: 0;
  border-radius: var(--radius); background: var(--surface); color: var(--text);
}
dialog.modal::backdrop { background: rgba(8, 16, 24, .55); }
.modal-inner { padding: 24px; }
.modal-close { float: right; all: unset; cursor: pointer; font-size: 24px; line-height: 1; padding: 4px 8px; float: right; }
