/* ================================================================
   PGR Away Day 2026 — phone-first web app
   QUB School of Pharmacy · designed to stand on its own.
   ================================================================ */

:root {
  /* Brand palette (Queen's) */
  --qub-red: #ED1C24;
  --qub-red-dark: #B8151C;
  --qub-red-deep: #6B0B10;
  --qub-red-soft: #FDECEE;
  --qub-red-glow: rgba(237, 28, 36, 0.18);

  /* Expanded studio palette — the "wild" part */
  --ink: #0E0F12;         /* near-black for contrast */
  --ink-2: #1B1E24;
  --cream: #FAF7F2;       /* warm ivory */
  --cream-2: #F3EFE7;
  --gold: #C8A24B;        /* accent */
  --gold-soft: #EDE1C5;
  --teal: #0F7077;        /* data accent */
  --plum: #582A54;        /* cat accent */

  /* Neutral ladder */
  --grey-900: #1f2123;
  --grey-700: #53565A;   /* Cool Grey 11 */
  --grey-600: #6e7176;
  --grey-500: #888b8e;
  --grey-400: #b3b6b9;
  --grey-300: #d8d9da;
  --grey-200: #eceded;
  --grey-100: #f5f5f5;
  --grey-50:  #fafafa;
  --white: #ffffff;

  /* Shape */
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(14,15,18,0.05);
  --shadow-sm: 0 2px 6px rgba(14,15,18,0.06), 0 1px 2px rgba(14,15,18,0.04);
  --shadow-md: 0 12px 30px rgba(14,15,18,0.09), 0 4px 10px rgba(14,15,18,0.05);
  --shadow-lg: 0 30px 80px rgba(14,15,18,0.22);
  --shadow-red: 0 10px 28px rgba(237, 28, 36, 0.22);

  /* Layout */
  --topbar-h: 68px;
  --tabbar-h: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --safe-top: env(safe-area-inset-top, 0);

  /* Type (Brandon-Text-style) */
  --font-sans: "Brandon Text", "Brandon Grotesque", "Montserrat", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-display: "Brandon Grotesque", "Brandon Text", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  background:
    radial-gradient(1200px 600px at -10% -10%, var(--qub-red-soft) 0%, transparent 60%),
    radial-gradient(900px 500px at 110% 0%, var(--gold-soft) 0%, transparent 55%),
    var(--cream);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-top: calc(var(--topbar-h) + var(--safe-top));
  min-height: 100vh;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; color: inherit; }
a { color: var(--qub-red); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.012em;
  margin: 0 0 0.4em;
}

/* ================================================================
   Top bar — slim, centred logo, glassy
   ================================================================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: linear-gradient(180deg, var(--qub-red) 0%, var(--qub-red-dark) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  z-index: 100;
  box-shadow: 0 4px 14px rgba(184,21,28,0.18);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--white) 55%, var(--gold) 100%);
  opacity: 0.65;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  justify-content: space-between;
}
.topbar-logo {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.22));
  flex-shrink: 1;
  min-width: 0;
  max-width: 72%;
  object-fit: contain;
  object-position: left center;
}
.topbar-chip {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 7px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  font-family: var(--font-display);
  line-height: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.topbar-chip-label {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.96;
  font-weight: 800;
}
.topbar-chip-year {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--gold-soft);
}
@media (max-width: 420px) {
  .topbar-chip-label { font-size: 0.66rem; letter-spacing: 0.1em; }
  .topbar-chip-year { font-size: 1rem; }
  .topbar-chip { padding: 6px 12px; border-radius: 12px; }
}
@media (min-width: 720px) {
  :root { --topbar-h: 80px; }
  .topbar-logo { height: 60px; }
  .topbar-chip-label { font-size: 0.82rem; }
  .topbar-chip-year { font-size: 1.35rem; }
  .topbar-chip { padding: 9px 18px; }
}

/* ================================================================
   Happening Now ticker
   ================================================================ */
/* "Tap to update" banner — appears when a new SW version is waiting.
   Floats at the top of the viewport (above the topbar) and slides down. */
.update-banner {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 50%;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(92%, 440px);
  padding: 12px 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--qub-red) 0%, var(--qub-red-dark) 100%);
  color: var(--white);
  text-align: left;
  box-shadow: 0 14px 32px rgba(237, 28, 36, 0.32), 0 2px 6px rgba(14,15,18,0.18);
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  /* Off-screen by default; .visible animates it in. */
  transform: translate(-50%, calc(-100% - 24px));
  opacity: 0;
  transition: transform 0.42s cubic-bezier(.2,.9,.25,1.1), opacity 0.28s ease;
}
.update-banner.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
.update-banner[hidden] { display: none; }
.update-banner:hover { filter: brightness(1.06); }
.update-banner:active { transform: translate(-50%, 1px) scale(0.99); }
.update-banner-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
}
.update-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.update-banner-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
}
.update-banner-sub {
  font-size: 0.78rem;
  opacity: 0.88;
  margin-top: 1px;
}
.update-banner-cta {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  opacity: 0.88;
}
@media (max-width: 480px) {
  .update-banner { padding: 10px 14px; }
  .update-banner-title { font-size: 0.9rem; }
  .update-banner-sub   { font-size: 0.74rem; }
}

.now-ticker {
  position: sticky;
  top: calc(var(--topbar-h) + var(--safe-top));
  z-index: 90;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(14,15,18,0.18);
}
.now-ticker::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(237,28,36,0.22) 45%, transparent 100%);
  animation: nowShimmer 4s linear infinite;
  pointer-events: none;
}
@keyframes nowShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.now-ticker-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  max-width: 960px;
  margin: 0 auto;
  font-size: 0.88rem;
  line-height: 1.25;
}
.now-dot {
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--qub-red);
  position: relative;
  box-shadow: 0 0 0 0 rgba(237,28,36,0.7);
  animation: nowPulse 1.8s ease-out infinite;
}
@keyframes nowPulse {
  0%   { box-shadow: 0 0 0 0 rgba(237,28,36,0.7); }
  70%  { box-shadow: 0 0 0 14px rgba(237,28,36,0); }
  100% { box-shadow: 0 0 0 0 rgba(237,28,36,0); }
}
.now-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}
.now-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}
.now-go {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}
.now-go:hover { background: rgba(255,255,255,0.1); }
@media (max-width: 520px) {
  .now-label { display: none; }
  .now-go { padding: 5px 10px; }
}

/* ================================================================
   Views
   ================================================================ */
main#view-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 16px 24px;
}
.view { display: none; }
.view.active { display: block; animation: viewIn 320ms cubic-bezier(.2,.8,.2,1); }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px) scale(0.995); }
  to   { opacity: 1; transform: none; }
}

.view-head { margin-bottom: 18px; }
.view-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.1;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.view-intro {
  color: var(--grey-600);
  margin: 0;
  font-size: 0.98rem;
  max-width: 60ch;
}
@media (min-width: 720px) {
  .view-title { font-size: 2.4rem; }
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-500);
  font-weight: 700;
  margin: 26px 0 12px;
}
.section-heading .sh-line {
  flex: 0 0 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--qub-red) 0%, var(--gold) 100%);
  border-radius: 1px;
}

/* ================================================================
   HERO — animated mesh gradient, bold typography
   ================================================================ */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 28px 22px 26px;
  margin-bottom: 20px;
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow-md);
  isolation: isolate;
}
.hero-mesh {
  position: absolute; inset: -40%;
  background:
    radial-gradient(40% 45% at 18% 25%, var(--qub-red) 0%, transparent 55%),
    radial-gradient(35% 40% at 85% 20%, var(--qub-red-dark) 0%, transparent 55%),
    radial-gradient(42% 50% at 75% 85%, var(--plum) 0%, transparent 60%),
    radial-gradient(40% 40% at 25% 95%, var(--gold) 0%, transparent 55%);
  filter: blur(18px) saturate(1.08);
  animation: meshDrift 22s ease-in-out infinite alternate;
  z-index: -1;
}
@keyframes meshDrift {
  0%   { transform: translate(0%, 0%) scale(1); }
  50%  { transform: translate(-2%, -1.5%) scale(1.05); }
  100% { transform: translate(2%, 1%) scale(1.02); }
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-soft);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before {
  content: "";
  width: 24px; height: 2px;
  background: var(--gold);
  border-radius: 1px;
}
.hero-title {
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 2.6rem);
  line-height: 1.08;
  margin: 0 0 14px;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--gold-soft);
  letter-spacing: 0;
}
.hero-venue {
  font-size: 0.95rem;
  opacity: 0.92;
  margin-bottom: 18px;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-family: var(--font-display);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--white);
  color: var(--qub-red-dark);
  text-transform: uppercase;
}
.chip-ghost {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
}

/* ================================================================
   SPOTLIGHT — random abstract button
   ================================================================ */
.spotlight {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--plum) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  text-align: left;
  box-shadow: var(--shadow-md);
  transition: transform 220ms ease, box-shadow 220ms ease;
  position: relative;
  overflow: hidden;
}
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 50%, rgba(200, 162, 75, 0.28) 0%, transparent 55%);
  pointer-events: none;
}
.spotlight:hover, .spotlight:focus {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(14,15,18,0.28);
}
.spotlight-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 16px rgba(200, 162, 75, 0.35);
}
.spotlight-copy { flex: 1; min-width: 0; position: relative; }
.spotlight-kicker {
  font-family: var(--font-display);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold-soft);
  font-weight: 700;
  margin-bottom: 2px;
}
.spotlight-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}
.spotlight-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.78);
  margin-top: 2px;
}
.spotlight-arrow { width: 22px; height: 22px; flex-shrink: 0; color: var(--gold-soft); position: relative; }

/* ================================================================
   WELCOME CARDS — quote-led editorial style
   ================================================================ */
.welcome-cards {
  display: grid;
  gap: 16px;
  margin-bottom: 10px;
}
.welcome-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(14,15,18,0.05);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.welcome-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--qub-red) 0%, var(--gold) 100%);
}
.welcome-card-photo-col {
  display: flex;
  justify-content: center;
}
.welcome-photo-lg {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--white);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--qub-red), 0 8px 22px rgba(14,15,18,0.18);
}
.welcome-photo-lg--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--qub-red);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.04em;
}
.welcome-card-body { display: flex; flex-direction: column; align-items: center; text-align: center; }
.welcome-card-who h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.2;
  font-weight: 800;
}
.welcome-card-who .who-role {
  color: var(--qub-red-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.welcome-quote {
  margin: 16px 0 6px;
  padding: 0;
  position: relative;
  max-width: 40ch;
}
.welcome-quote-mark {
  width: 28px;
  height: 21px;
  color: var(--qub-red);
  opacity: 0.85;
  margin: 0 auto 6px;
  display: block;
}
.welcome-quote p {
  margin: 0;
  font-family: var(--font-serif, 'Fraunces', Georgia, serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--ink);
}
.welcome-read-more {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--qub-red);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms, transform 180ms;
}
.welcome-read-more svg { width: 16px; height: 16px; }
.welcome-read-more:hover { background: var(--qub-red-dark, #c61820); transform: translateY(-1px); }
.welcome-read-more:active { transform: translateY(0); }

/* Wider viewports: photo sits to the left of the content */
@media (min-width: 520px) {
  .welcome-card {
    grid-template-columns: 150px 1fr;
    align-items: center;
    padding: 22px 22px 22px 28px;
    gap: 22px;
  }
  .welcome-card-photo-col { justify-content: flex-start; }
  .welcome-card-body { align-items: flex-start; text-align: left; }
  .welcome-quote-mark { margin-left: 0; }
  .welcome-photo-lg { width: 140px; height: 140px; }
}

/* ================================================================
   WELCOME MODAL
   ================================================================ */
.welcome-modal .modal-panel { padding-top: 0; }
.welcome-modal-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 26px 22px 18px;
  background: linear-gradient(180deg, rgba(237,28,36,0.08) 0%, rgba(237,28,36,0) 100%);
  border-bottom: 1px solid rgba(14,15,18,0.06);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
.welcome-modal-photo-wrap {
  flex-shrink: 0;
}
.welcome-modal-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px var(--qub-red), 0 10px 24px rgba(14,15,18,0.16);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome-modal-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.welcome-modal-photo--initials {
  background: var(--qub-red);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
}
.welcome-modal-kicker {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qub-red);
  margin-bottom: 4px;
}
.welcome-modal-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}
.welcome-modal-role {
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--qub-red-dark, #c61820);
}
.welcome-modal-body {
  padding: 18px 22px 26px;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.62;
  max-height: 62vh;
  overflow-y: auto;
}
.welcome-modal-body p { margin: 0 0 14px; }
.welcome-modal-body p:last-child { margin-bottom: 0; }

@media (min-width: 720px) {
  .welcome-modal-photo { width: 112px; height: 112px; }
  .welcome-modal-name { font-size: 1.4rem; }
}

/* ================================================================
   QUICK LINKS — 2x2 tiles
   ================================================================ */
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 10px;
}
.quick-link {
  background: var(--white);
  border: 1px solid rgba(14,15,18,0.06);
  border-radius: var(--radius-lg);
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 180ms ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.quick-link::after {
  content: "";
  position: absolute;
  bottom: -30px; right: -30px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, var(--qub-red-soft) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 300ms;
  border-radius: 50%;
}
.quick-link:hover, .quick-link:focus {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--qub-red);
}
.quick-link:hover::after, .quick-link:focus::after { opacity: 1; }
.ql-icon {
  width: 32px; height: 32px;
  color: var(--qub-red);
  padding: 6px;
  background: var(--qub-red-soft);
  border-radius: 10px;
  margin-bottom: 4px;
}
.ql-label {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
}
.ql-sub {
  font-size: 0.78rem;
  color: var(--grey-500);
  font-weight: 500;
  letter-spacing: 0;
}

/* ================================================================
   TIMELINE PROGRAMME
   ================================================================ */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 11px; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg,
    var(--grey-300) 0%,
    var(--grey-300) var(--time-progress, 0%),
    var(--grey-200) var(--time-progress, 0%),
    var(--grey-200) 100%);
}
.timeline-progress {
  position: absolute;
  left: 11px; top: 10px;
  width: 2px;
  height: var(--time-progress, 0%);
  background: linear-gradient(180deg, var(--qub-red) 0%, var(--qub-red-dark) 100%);
  border-radius: 1px;
}

.sched-item {
  position: relative;
  margin-bottom: 14px;
}
.sched-item::before {
  /* the timeline dot */
  content: "";
  position: absolute;
  left: -22px; top: 18px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--grey-400);
  box-shadow: 0 0 0 3px var(--cream);
  z-index: 2;
}
.sched-item.cat-oral_session::before { border-color: var(--qub-red); }
.sched-item.cat-welcome::before, .sched-item.cat-closing::before { border-color: var(--gold); }
.sched-item.cat-athena::before, .sched-item.cat-sponsor::before { border-color: var(--plum); }
.sched-item.cat-break::before { border-color: var(--teal); }

.sched-item.is-now::before {
  background: var(--qub-red);
  border-color: var(--qub-red);
  animation: nowPulse 1.8s ease-out infinite;
}
.sched-item.is-past::before {
  background: var(--grey-300);
  border-color: var(--grey-400);
}

.sched-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(14,15,18,0.05);
  overflow: hidden;
  transition: transform 220ms, box-shadow 220ms;
}
.sched-item.is-now .sched-card {
  box-shadow: 0 12px 30px rgba(237, 28, 36, 0.22);
  border-color: var(--qub-red);
}
.sched-item.is-past .sched-card {
  opacity: 0.72;
}
.sched-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px 12px;
}
.sched-time {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--qub-red);
  font-size: 0.82rem;
  min-width: 92px;
  flex-shrink: 0;
  padding-top: 2px;
  letter-spacing: 0.02em;
}
.sched-title-wrap { flex: 1; min-width: 0; }
.sched-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.3;
}
.sched-sub {
  display: block;
  color: var(--grey-600);
  font-size: 0.84rem;
  font-weight: 500;
  margin-top: 3px;
}
.sched-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 800;
  margin-bottom: 6px;
}
.sched-item.cat-oral_session .sched-badge { background: var(--qub-red-soft); color: var(--qub-red-dark); }
.sched-item.cat-welcome .sched-badge, .sched-item.cat-closing .sched-badge { background: var(--gold-soft); color: #6d5420; }
.sched-item.cat-athena .sched-badge, .sched-item.cat-sponsor .sched-badge { background: #e9deec; color: var(--plum); }
.sched-item.cat-break .sched-badge { background: #daeeee; color: var(--teal); }

.sched-slots {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chair-line {
  font-size: 0.78rem;
  color: var(--grey-600);
  padding: 6px 10px;
  background: var(--cream-2);
  border-radius: var(--radius-sm);
}
.chair-line strong {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--ink);
  margin-right: 6px;
}
.sched-slot {
  display: flex;
  gap: 12px;
  padding: 11px 12px;
  background: var(--cream);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  text-align: left;
  width: 100%;
  color: var(--ink);
  transition: all 180ms;
  align-items: center;
}
.sched-slot:hover, .sched-slot:focus {
  border-color: var(--qub-red);
  background: var(--white);
  transform: translateX(2px);
}
.sched-slot.no-abstract { cursor: default; pointer-events: none; opacity: 0.65; }
.slot-time {
  flex-shrink: 0;
  min-width: 68px;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--qub-red);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.slot-info { flex: 1; min-width: 0; }
.slot-presenter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}
.slot-title {
  font-size: 0.82rem;
  color: var(--grey-600);
  line-height: 1.35;
  margin-top: 2px;
}
.slot-cta {
  align-self: center;
  color: var(--qub-red);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* ================================================================
   Abstract lists
   ================================================================ */
.search-row {
  position: relative;
  margin-bottom: 16px;
}
.search-row .search-icon {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--grey-500);
  pointer-events: none;
}
.search-row input[type="search"] {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 16px 14px 44px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
  -webkit-appearance: none;
  transition: all 180ms;
}
.search-row input[type="search"]:focus {
  outline: none;
  border-color: var(--qub-red);
  box-shadow: 0 0 0 4px var(--qub-red-glow);
}
.search-row input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.abstract-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.abstract-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(14,15,18,0.05);
  text-align: left;
  color: var(--ink);
  transition: all 180ms ease;
  width: 100%;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  font-family: inherit;
}
.abstract-card:hover, .abstract-card:focus {
  border-color: var(--qub-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.abstract-card .idx {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--qub-red) 0%, var(--qub-red-dark) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(237,28,36,0.25);
  letter-spacing: 0;
}
.abstract-card.poster .idx {
  background: linear-gradient(135deg, var(--ink) 0%, var(--plum) 100%);
  box-shadow: 0 4px 10px rgba(88, 42, 84, 0.25);
}
.abstract-card .meta { flex: 1; min-width: 0; }
.abstract-card .ab-presenter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.25;
}
.abstract-card .ab-title {
  font-size: 0.88rem;
  color: var(--grey-700);
  line-height: 1.45;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.abstract-card .ab-session {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  color: var(--qub-red);
  font-weight: 800;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.abstract-card .fav-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: var(--grey-400);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 180ms;
}
.abstract-card .fav-btn:hover { background: var(--qub-red-soft); color: var(--qub-red); }
.abstract-card .fav-btn.is-fav { color: var(--qub-red); }
.abstract-card .fav-btn.is-fav svg { fill: var(--qub-red); }
.abstract-card .fav-btn svg { width: 18px; height: 18px; }

.no-results {
  text-align: center;
  color: var(--grey-500);
  padding: 50px 10px;
  font-style: italic;
}
.no-results .big-icon {
  display: block;
  margin: 0 auto 8px;
  width: 40px; height: 40px;
  color: var(--grey-400);
}

/* ================================================================
   Info / Sponsors
   ================================================================ */
.info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  border: 1px solid rgba(14,15,18,0.05);
}
.info-card h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-card h3::before {
  content: "";
  width: 18px; height: 3px;
  background: var(--qub-red);
  border-radius: 2px;
}
.info-card p { margin: 0 0 10px; }
.info-card p:last-child { margin-bottom: 0; }
.info-card.small { font-size: 0.85rem; }
.info-card.muted {
  color: var(--grey-500);
  background: transparent;
  box-shadow: none;
  border: none;
  text-align: center;
}

.tidy-list { margin: 0; padding-left: 1.2em; }
.tidy-list li { margin-bottom: 8px; }
.tidy-list li:last-child { margin-bottom: 0; }
.tidy-list li strong {
  font-family: var(--font-display);
  color: var(--ink);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1.5px solid var(--qub-red);
  color: var(--qub-red);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 6px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 180ms;
}
.btn-outline:hover {
  background: var(--qub-red);
  color: var(--white);
  text-decoration: none;
}

.muted { color: var(--grey-500); font-size: 0.9rem; }

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  grid-auto-rows: 1fr;
  gap: 14px;
  margin-top: 12px;
  align-items: stretch;
}
/* On wider screens, switch to flexbox so the last row centres
   when it doesn't fill (e.g. 5 sponsors + 3 sponsors). */
@media (min-width: 720px) {
  .sponsor-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
  }
  .sponsor-grid .sponsor-tile {
    flex: 1 1 160px;
    max-width: 200px;
  }
}
.sponsor-tile {
  background: var(--cream);
  border: 1px solid rgba(14,15,18,0.05);
  border-radius: var(--radius-md);
  padding: 18px 12px 16px;
  text-align: center;
  transition: transform 180ms;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 148px;
}
.sponsor-tile:hover { transform: translateY(-2px); }
.sponsor-tile img {
  max-width: 100%;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}
.sponsor-tile .sponsor-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--grey-700);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ================================================================
   INSTALL-APP CARD + iOS HELP SHEET
   ================================================================ */
.install-card[hidden] { display: none !important; }
.install-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin: 16px 0 8px;
  background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
  border: 1px solid rgba(237, 28, 36, 0.18);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(237, 28, 36, 0.08);
  position: relative;
  overflow: hidden;
}
.install-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(237, 28, 36, 0.12), transparent 55%);
  pointer-events: none;
}
.install-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--qub-red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(237, 28, 36, 0.25);
}
.install-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.install-kicker {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qub-red);
}
.install-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}
.install-sub {
  font-size: 0.84rem;
  color: var(--grey-500);
  margin-top: 3px;
  line-height: 1.35;
}
.install-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--qub-red);
  color: white;
  border: none;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(237, 28, 36, 0.28);
  transition: transform 160ms, box-shadow 160ms;
}
.install-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(237, 28, 36, 0.32);
}
.install-cta svg {
  width: 16px;
  height: 16px;
}
@media (max-width: 520px) {
  .install-card {
    flex-wrap: wrap;
  }
  .install-copy { flex-basis: calc(100% - 58px); }
  .install-cta {
    flex-basis: 100%;
    justify-content: center;
    margin-top: 4px;
  }
}

/* iOS help sheet — modal-style overlay */
.ios-help {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.ios-help[hidden] { display: none; }
.ios-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 15, 18, 0.55);
  backdrop-filter: blur(2px);
}
.ios-help-panel {
  position: relative;
  width: min(480px, 100%);
  background: var(--cream);
  border-radius: 22px 22px 0 0;
  padding: 22px 22px 28px;
  box-shadow: 0 -10px 32px rgba(14, 15, 18, 0.18);
  max-height: 86dvh;
  overflow-y: auto;
}
.ios-help-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(14, 15, 18, 0.06);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.ios-help-close:hover { background: rgba(14, 15, 18, 0.12); }
.ios-help-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--qub-red-dark, #b2171d);
  margin: 0 0 8px;
}
.ios-help-intro {
  color: var(--grey-700);
  font-size: 0.95rem;
  margin: 0 0 16px;
  line-height: 1.45;
}
.ios-help-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ios-help-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: white;
  border: 1px solid rgba(14, 15, 18, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
}
.ios-help-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--qub-red);
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ios-help-text {
  font-size: 0.94rem;
  color: var(--ink);
  line-height: 1.4;
}
.ios-share-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: -4px;
  color: #007aff; /* iOS system blue */
  margin: 0 2px;
}
.ios-help-foot {
  font-size: 0.82rem;
  color: var(--grey-500);
  margin: 0;
  line-height: 1.45;
}

/* Desktop: centre the iOS help dialog instead of bottom-sheet */
@media (min-width: 720px) {
  .ios-help {
    align-items: center;
    padding: 32px;
  }
  .ios-help-panel {
    border-radius: 20px;
    max-height: 80dvh;
  }
}

/* ================================================================
   MODAL — refined
   ================================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(14, 15, 18, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 240ms ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* The panel itself is the scroll container — simpler and more reliable than
   a nested scroll child. The controls sit on top with position: sticky. */
.modal-panel {
  position: relative;
  background: var(--cream);
  width: 100%;
  max-width: 720px;
  max-height: 94vh;
  max-height: 94dvh;
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-lg);
  animation: slideUp 280ms cubic-bezier(.2,.8,.2,1);
  overflow-y: scroll;    /* always reserve scrollbar gutter so content doesn't shift */
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 10px 22px 28px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0));
  /* Firefox scrollbar colors */
  scrollbar-width: thin;
  scrollbar-color: var(--grey-300) transparent;
}
/* WebKit scrollbar — forced visible so users see there's more content */
.modal-panel::-webkit-scrollbar {
  width: 12px;
  background: transparent;
}
.modal-panel::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0;
}
.modal-panel::-webkit-scrollbar-thumb {
  background: rgba(14, 15, 18, 0.25);
  border-radius: 6px;
  border: 3px solid var(--cream);  /* padding around thumb */
  min-height: 40px;
}
.modal-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 15, 18, 0.4);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}

/* Controls: the fav + close buttons live in a sticky container pinned to the
   top of the scroll. The container is right-aligned and only as wide as the
   buttons need, so touches in the rest of the modal area go straight to the
   scroll. A small grabber handle sits centred above the content. */
.modal-controls {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: max-content;
  margin-left: auto;
  margin-right: 0;
  height: 0;              /* collapse height so content below can use this space */
  align-items: flex-start;
}
.modal-handle {
  width: 46px;
  height: 5px;
  border-radius: 3px;
  background: var(--grey-300);
  margin: 0 auto 10px;
  pointer-events: none;
}
.modal-close {
  background: var(--white);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.45rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  line-height: 1;
  padding: 0;
  transition: all 180ms;
}
.modal-close:hover { background: var(--qub-red); color: var(--white); transform: scale(1.05); }

.modal-fav {
  background: var(--white);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--grey-500);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  padding: 0;
  transition: all 180ms;
}
.modal-fav:hover { color: var(--qub-red); transform: scale(1.05); }
.modal-fav svg { width: 20px; height: 20px; }
.modal-fav.is-fav { color: var(--qub-red); background: var(--qub-red-soft); }
.modal-fav.is-fav svg { fill: var(--qub-red); }

.modal-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 6px 0 20px;
  border-bottom: 1px solid rgba(14,15,18,0.08);
}
.modal-avatar {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--qub-red) 0%, var(--qub-red-dark) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow-red);
  letter-spacing: 0;
}
.modal-avatar.poster {
  background: linear-gradient(135deg, var(--ink) 0%, var(--plum) 100%);
  box-shadow: 0 6px 16px rgba(88, 42, 84, 0.25);
}
/* When a presenter photo is supplied we drop the gradient and let the
   image fill the badge. Fixed width plus a clamped height: the photo grows
   with the text column up to a sensible maximum so a long title doesn't
   stretch the photo into a tall strip. */
.modal-avatar.has-photo {
  background: none;
  padding: 0;
  overflow: hidden;
  width: 110px;
  height: auto;
  align-self: stretch;
  min-height: 110px;
  max-height: 160px;
  border-radius: 18px;
}
.modal-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Bias to faces (top of frame) when the box is taller than the image. */
  object-position: center top;
  display: block;
  border-radius: inherit;
}
@media (max-width: 480px) {
  /* Slightly smaller photo on narrow phones so the title still has room. */
  .modal-avatar.has-photo {
    width: 84px;
    min-height: 84px;
    max-height: 124px;
    border-radius: 16px;
  }
}
.modal-hero-text { flex: 1; min-width: 0; padding-right: 96px; }
.modal-meta {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--qub-red);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.modal-title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.modal-authors {
  color: var(--grey-600);
  font-size: 0.88rem;
  font-style: italic;
}
.modal-body {
  font-size: 0.96rem;
  color: var(--grey-700);
  line-height: 1.68;
}
.modal-body p { margin: 0 0 12px; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body strong {
  color: var(--qub-red-dark);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  display: inline-block;
  margin-right: 2px;
}

/* References / bibliography */
.modal-body .ref-heading {
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(14,15,18,0.08);
  color: var(--qub-red-dark);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  font-weight: 800;
}
.modal-body .ref-list {
  margin: 0 0 8px;
  padding-left: 1.4em;
  font-size: 0.84rem;
  color: var(--grey-500);
  line-height: 1.5;
}
.modal-body .ref-list li {
  margin-bottom: 6px;
  padding-left: 4px;
}
.modal-body .ref-list li::marker {
  color: var(--qub-red);
  font-weight: 700;
}

/* ================================================================
   Bottom tab bar — glassy
   ================================================================ */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-top: 1px solid rgba(14,15,18,0.06);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 200;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -4px 20px rgba(14,15,18,0.05);
}
.tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--grey-500);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: var(--font-display);
  font-size: 0.66rem;
  padding: 6px 2px 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  transition: color 180ms;
}
.tab-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}
.tab::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--qub-red);
  transform: translateX(-50%) scaleX(0);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}
.tab.active {
  color: var(--qub-red);
}
.tab.active::before { transform: translateX(-50%) scaleX(1); }
.tab.active .tab-icon { transform: translateY(-2px) scale(1.1); }

/* ================================================================
   Responsive tweaks (desktop)
   ================================================================ */
@media (min-width: 720px) {
  /* Keep the tabbar pinned to the bottom on desktop too — just widen its hit
     targets and let its icons sit side-by-side with their labels. */
  .tabbar {
    /* position/fixed/bottom inherited from base rule — do not override */
    height: calc(72px + var(--safe-bottom));
    background: rgba(255,255,255,0.94);
  }
  .tab { font-size: 0.78rem; flex-direction: row; gap: 8px; padding: 0 10px; }
  .tab::before { top: 6px; width: 36px; }
  main#view-container { padding-top: 24px; }

  /* Desktop modal: centered dialog with breathing room, rounded all corners,
     and a predictable height so scroll works consistently. */
  .modal {
    align-items: center;
    padding: 32px;
  }
  .modal-panel {
    max-height: 82vh;
    max-height: 82dvh;
    border-radius: 24px;
    animation: fadeScaleIn 280ms cubic-bezier(.2,.8,.2,1);
    padding-top: 22px;
  }
  .modal-handle { display: none; }  /* grabber only makes sense as a bottom-sheet */
  @keyframes fadeScaleIn {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to   { opacity: 1; transform: none; }
  }

  .abstract-list.poster-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .quick-links { grid-template-columns: repeat(4, 1fr); }
  /* Keep welcome cards full-width so the pull-quote has room to breathe */
  .welcome-cards { grid-template-columns: 1fr; }
  .hero { padding: 40px 36px; }
}

@media (min-width: 1024px) {
  .abstract-list.poster-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Print helper */
@media print {
  .tabbar, .topbar, .modal, .splash, .now-ticker, .update-banner { display: none !important; }
  body { padding: 0; background: white; }
  .view { display: block !important; page-break-after: always; }
}

/* ================================================================
   SPLASH — kinetic entry
   ================================================================ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  background:
    radial-gradient(60% 80% at 80% 10%, var(--qub-red) 0%, transparent 60%),
    radial-gradient(70% 70% at 10% 90%, var(--qub-red-deep) 0%, transparent 55%),
    linear-gradient(160deg, var(--qub-red) 0%, var(--qub-red-dark) 55%, var(--qub-red-deep) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top, 0));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
  animation: splashIn 600ms cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}

.splash-molecules {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}
.splash-molecules .molecule { transform-origin: center; }
.splash-molecules .m1 { animation: floatA 18s ease-in-out infinite; }
.splash-molecules .m2 { animation: floatB 22s ease-in-out infinite; }
.splash-molecules .m3 { animation: floatA 14s ease-in-out infinite reverse; }
.splash-molecules .m4 { animation: floatB 20s ease-in-out infinite reverse; }
@keyframes floatA {
  0%,100% { transform: translate(0, 0) rotate(0deg); }
  50%     { transform: translate(10px, -14px) rotate(4deg); }
}
@keyframes floatB {
  0%,100% { transform: translate(0, 0) rotate(0deg); }
  50%     { transform: translate(-12px, 10px) rotate(-5deg); }
}

.splash::before,
.splash::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 65%);
  pointer-events: none;
  filter: blur(4px);
}
.splash::before { top: -220px; right: -220px; }
.splash::after  { bottom: -260px; left: -200px; }

.splash.leaving { animation: splashOut 520ms cubic-bezier(.4, 0, .6, 1) forwards; }
.splash.hidden { display: none; }

@keyframes splashIn {
  from { opacity: 0; transform: scale(1.02); }
  to   { opacity: 1; transform: none; }
}
@keyframes splashOut {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: scale(1.04) translateY(-10px); }
}

.splash-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-logo {
  width: min(88%, 420px);
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
  animation: logoIn 900ms 120ms cubic-bezier(.2,.8,.2,1) backwards;
}
@keyframes logoIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.splash-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  opacity: 0.95;
  margin-bottom: 10px;
  font-weight: 800;
  animation: fadeUp 700ms 380ms cubic-bezier(.2,.8,.2,1) backwards;
}
.kicker-line {
  flex: 0 0 28px;
  height: 1px;
  background: rgba(255,255,255,0.7);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.splash-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 12vw, 4.2rem);
  font-weight: 900;
  color: var(--white);
  line-height: 0.95;
  margin: 0 0 10px;
  letter-spacing: -0.035em;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.22em;
  justify-content: center;
}
.splash-title .st-word {
  display: inline-block;
  animation: wordIn 700ms cubic-bezier(.2,.8,.2,1) backwards;
}
.splash-title .st-word:nth-child(1) { animation-delay: 480ms; }
.splash-title .st-word:nth-child(2) { animation-delay: 600ms; }
@keyframes wordIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.splash-year {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 16vw, 6rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 6px 0 18px;
  display: inline-flex;
  gap: 0.02em;
}
.splash-year span {
  display: inline-block;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.6) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: yearDrop 700ms cubic-bezier(.2,.8,.2,1) backwards;
}
.splash-year span:nth-child(1) { animation-delay: 720ms; }
.splash-year span:nth-child(2) { animation-delay: 820ms; }
.splash-year span:nth-child(3) { animation-delay: 920ms; }
.splash-year span:nth-child(4) { animation-delay: 1020ms; }
@keyframes yearDrop {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: none; }
}

.splash-meta {
  margin-bottom: 32px;
  line-height: 1.5;
  animation: fadeUp 700ms 1100ms cubic-bezier(.2,.8,.2,1) backwards;
}
.splash-date {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.98;
}
.splash-venue {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-top: 4px;
  font-weight: 500;
}

.splash-enter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--qub-red-dark);
  border: none;
  border-radius: 999px;
  padding: 16px 34px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 16px 38px rgba(0,0,0,0.28), 0 0 0 0 rgba(255,255,255,0.4);
  transition: transform 200ms ease, box-shadow 200ms ease;
  animation: fadeUp 700ms 1250ms cubic-bezier(.2,.8,.2,1) backwards, btnPulse 2.6s 2s ease-in-out infinite;
}
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 16px 38px rgba(0,0,0,0.28), 0 0 0 0 rgba(255,255,255,0.3); }
  50%      { box-shadow: 0 16px 38px rgba(0,0,0,0.28), 0 0 0 14px rgba(255,255,255,0); }
}
.splash-enter:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0,0,0,0.35);
}
.splash-enter:active { transform: translateY(0); }
.splash-enter svg { width: 20px; height: 20px; }

@media (min-width: 720px) {
  .splash-logo { width: 440px; }
}

/* ================================================================
   Reduced motion
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .splash-molecules .molecule { animation: none; }
}
