/* =====================================================================
   INDoS x EEG101 at OHBM BrainHack 2026
   Typography mirrors megqc_documentation (system font stack, sober
   sizes). Dark default with light-theme toggle. Three single-page tabs:
   Home, Programme, Links.
   ===================================================================== */

:root,
[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0c1018;
  --bg-elev: #141a26;
  --bg-elev-2: #1b2230;
  --card: #161d2b;
  --card-hover: #1d2638;
  --border: #232c40;
  --border-strong: #2e3a55;

  --text: #e7eef9;
  --text-strong: #ffffff;
  --muted: #98a4ba;
  --muted-strong: #b5c0d3;
  --quiet: #6f7b8c;

  --accent: #4fc3f7;
  --accent-strong: #7fd5ff;
  --accent-soft: rgba(79, 195, 247, 0.16);
  --mint: #66d9a8;
  --mint-soft: rgba(102, 217, 168, 0.18);
  --coral: #ff8b6b;
  --coral-soft: rgba(255, 139, 107, 0.18);
  --lime: #b8f46d;
  --violet: #bda6ff;

  --shadow-1: 0 4px 14px rgba(0, 0, 0, 0.32);
  --shadow-2: 0 10px 32px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 14px 40px rgba(0, 0, 0, 0.28);

  --panel-glass: rgba(22, 30, 44, 0.58);
  --panel-glass-strong: rgba(22, 30, 44, 0.82);
  --border-glass: rgba(255, 255, 255, 0.10);
  --glow-accent: rgba(79, 195, 247, 0.48);

  --radius: 14px;
  --max: 1180px;

  --header-bg: rgba(12, 16, 24, 0.78);
  --hero-copy: #dbe3ef;
  --line: var(--border);
  --panel: var(--card);
  --panel-strong: var(--bg-elev-2);
  --bg-soft: var(--bg-elev-2);
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #f5f8fc;
  --bg-elev: #ffffff;
  --bg-elev-2: #f0f4fa;
  --card: #ffffff;
  --card-hover: #f4f8fd;
  --border: #d9e2ee;
  --border-strong: #b8c6da;

  --text: #1a2233;
  --text-strong: #0c1320;
  --muted: #5b6779;
  --muted-strong: #3c4659;
  --quiet: #7f8a9e;

  --accent: #0a7fc4;
  --accent-strong: #075a8c;
  --accent-soft: rgba(10, 127, 196, 0.12);
  --mint: #1f9971;
  --mint-soft: rgba(31, 153, 113, 0.15);
  --coral: #b94f33;
  --coral-soft: rgba(185, 79, 51, 0.15);
  --lime: #3f7c14;
  --violet: #6550b8;

  --shadow-1: 0 4px 14px rgba(15, 25, 40, 0.08);
  --shadow-2: 0 12px 32px rgba(15, 25, 40, 0.14);
  --shadow-card: 0 12px 28px rgba(15, 25, 40, 0.12);

  --panel-glass: rgba(255, 255, 255, 0.72);
  --panel-glass-strong: rgba(255, 255, 255, 0.92);
  --border-glass: rgba(15, 25, 40, 0.08);
  --glow-accent: rgba(10, 127, 196, 0.32);

  --header-bg: rgba(245, 248, 252, 0.84);
  --hero-copy: #2c3848;
  --line: var(--border);
  --panel: var(--card);
  --panel-strong: var(--bg-elev-2);
  --bg-soft: var(--bg-elev-2);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open { overflow: hidden; }

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover, a:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
}

h1, h2, h3, h4 {
  color: var(--text-strong);
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: 2.4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.85rem; letter-spacing: -0.005em; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; color: var(--text); }
ul, ol { padding-left: 1.4em; }
li { margin: 0.25em 0; }

/* Subtle grid background, kept from previous version */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}
[data-theme="light"] body::before {
  background:
    linear-gradient(rgba(18, 23, 32, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 23, 32, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ---------- Containers ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 48px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.brand-logos { display: inline-flex; align-items: center; gap: 14px; }

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity .16s ease, transform .16s ease;
}
.brand-logo-link:hover, .brand-logo-link:focus-visible {
  opacity: 0.82;
  transform: translateY(-1px);
  text-decoration: none;
}
.brand-logo-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.brand-text {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.05;
}
.brand-subtitle {
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 600;
}

.brand-logo { height: auto; object-fit: contain; display: block; }
.brand-logo-indos { width: 168px; }
.brand-logo-eeg101 { width: 172px; }

/* Theme-specific image switching: each logo container holds a dark and a
   light variant. Only the variant matching the active theme is shown. */
[data-theme="dark"]  .theme-only-light { display: none !important; }
[data-theme="light"] .theme-only-dark  { display: none !important; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-tab {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 6px 14px;
  white-space: nowrap;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.page-tab:hover { color: var(--text); border-color: var(--accent); }
.page-tab[aria-current="page"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.page-view[hidden] { display: none !important; }

.theme-toggle {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  white-space: nowrap;
  transition: border-color .16s ease;
}
.theme-toggle:hover { border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-media, .hero-overlay { position: absolute; inset: 0; }

.hero-media { opacity: 0.6; }

.hero-shot {
  position: absolute;
  width: min(56vw, 720px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  object-fit: cover;
}
.shot-a { top: 11%; right: -7%; transform: rotate(-4deg); }
.shot-b { top: 7%;  left: 38%; width: min(33vw, 420px); transform: rotate(5deg); }
.shot-c { bottom: 15%; right: 18%; width: min(34vw, 500px); transform: rotate(3deg); }
.shot-d { bottom: 5%; left: 6%;  width: min(34vw, 460px); transform: rotate(-3deg); }
.shot-e { top: 40%; right: 1%;  width: min(28vw, 400px); transform: rotate(4deg); }
.shot-f { top: 31%; left: 8%;   width: min(24vw, 340px); transform: rotate(-5deg); }

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(12, 16, 24, 0.98) 0%, rgba(12, 16, 24, 0.82) 39%, rgba(12, 16, 24, 0.36) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(12, 16, 24, 0.08) 45%, rgba(12, 16, 24, 0.52) 100%);
}
[data-theme="light"] .hero-overlay {
  background:
    linear-gradient(90deg, rgba(245, 247, 251, 0.97) 0%, rgba(245, 247, 251, 0.84) 42%, rgba(245, 247, 251, 0.34) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(245, 247, 251, 0.06) 48%, rgba(245, 247, 251, 0.58) 100%);
}

.hero-content {
  position: relative;
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
  padding: 96px 0 64px;
  transform: translateX(calc((min(1180px, 100vw - 36px) - min(760px, 100vw - 36px)) / -2));
}

.eyebrow,
.section-kicker,
.action-eyebrow {
  display: block;
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

#hero-title {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.hero-copy {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--hero-copy);
  font-size: clamp(1rem, 1.15vw, 1.08rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  line-height: 1.1;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
  cursor: pointer;
}
.button.primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
}
.button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  text-decoration: none;
}
.button.ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}
.button.ghost:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- Workflow SVG (kept from previous) ---------- */
.workflow-animation { width: min(720px, 100%); height: auto; margin: 0 0 6px; opacity: 0.96; }
.workflow-graph { display: block; width: min(760px, 100%); overflow: visible; cursor: pointer; outline: none; }
.workflow-graph:focus-visible { filter: drop-shadow(0 0 0.75rem var(--glow-accent)); }

.workflow-click-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 0 16px;
  padding: 6px 14px;
  border: 1px solid rgba(79, 195, 247, 0.42);
  border-radius: 999px;
  background: rgba(12, 16, 24, 0.7);
  color: #eef7ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.82;
}
[data-theme="light"] .workflow-click-hint {
  border-color: rgba(10, 127, 196, 0.42);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}
.workflow-graph:hover + .workflow-click-hint,
.workflow-graph:focus-visible + .workflow-click-hint { opacity: 1; }
.workflow-graph.is-stepping + .workflow-click-hint { opacity: 0; }

.workflow-graph .workflow-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 10 12;
  animation: workflowDash 3.8s linear infinite;
}
.workflow-graph .main-line { stroke: rgba(79, 195, 247, 0.58); }
.workflow-graph .audit-line { stroke: rgba(184, 244, 109, 0.58); stroke-width: 2.4; animation-duration: 4.4s; }
.workflow-graph .qc-line { stroke: rgba(255, 139, 107, 0.64); stroke-width: 2.4; animation-duration: 4.1s; }

.workflow-graph .node-icon {
  fill: rgba(12, 16, 24, 0.62);
  stroke: rgba(239, 247, 255, 0.88);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.workflow-graph .workflow-node { animation: workflowNodePulse 4.8s ease-in-out infinite; }
.workflow-graph.is-stepping .workflow-node {
  animation: none;
  opacity: 0.64;
  transition: opacity 180ms ease, filter 180ms ease;
}
.workflow-graph .workflow-node.is-active,
.workflow-graph .workflow-node.is-path-active {
  opacity: 1;
  -webkit-filter: url(#workflow-node-glow);
  filter: url(#workflow-node-glow);
}
.workflow-graph .workflow-node.is-active .node-icon,
.workflow-graph .workflow-node.is-path-active .node-icon {
  stroke: rgba(255, 255, 255, 0.98);
  stroke-width: 2.8;
}
.workflow-graph .artemis-node    { animation-delay: 0.35s; }
.workflow-graph .bids-node       { animation-delay: 0.70s; }
.workflow-graph .meegqc-node     { animation-delay: 1.05s; }
.workflow-graph .fair-node       { animation-delay: 1.40s; }
.workflow-graph .community-node  { animation-delay: 1.75s; }

.workflow-graph .workflow-node text {
  fill: #f4f7fb;
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
}
/* Tool / sub-label tspans use the accent colour so the action verb on
   the first line stays distinct from the tool name(s) below. */
.workflow-graph .workflow-node text tspan:not(:first-child) {
  fill: var(--accent);
  font-weight: 800;
}
[data-theme="light"] .workflow-graph .workflow-node text { fill: var(--text); }
[data-theme="light"] .workflow-graph .workflow-node text tspan:not(:first-child) { fill: var(--accent-strong); }
[data-theme="light"] .workflow-graph .node-icon { fill: rgba(255, 255, 255, 0.72); stroke: rgba(18, 23, 32, 0.9); }

.workflow-mini-graph path { fill: none; stroke: rgba(189, 166, 255, 0.74); stroke-width: 2; }
.workflow-mini-graph circle { fill: var(--violet); }

.travel-dot { opacity: 0.95; pointer-events: none; -webkit-filter: url(#workflow-dot-glow); filter: url(#workflow-dot-glow); }
.dot-main  { color: var(--lime); fill: var(--lime); }
.dot-audit { fill: var(--accent); color: var(--accent); }
.dot-qc    { fill: var(--coral); color: var(--coral); }

.workflow-spotlight {
  fill: currentColor;
  color: var(--lime);
  opacity: 0;
  pointer-events: none;
  -webkit-filter: url(#workflow-spotlight-glow);
  filter: url(#workflow-spotlight-glow);
  transition: opacity 160ms ease, r 160ms ease;
}
.workflow-spotlight.is-visible { opacity: 0.96; }

.workflow-flash {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  opacity: 0;
  pointer-events: none;
  -webkit-filter: url(#workflow-flash-glow);
  filter: url(#workflow-flash-glow);
  transform-box: fill-box;
  transform-origin: center;
}
.workflow-flash.is-flashing { animation: nodeFlash 520ms ease-out both; }

.click-brain {
  opacity: 0;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 160ms ease, transform 220ms ease;
  -webkit-filter: url(#workflow-brain-glow);
  filter: url(#workflow-brain-glow);
}
.click-brain.is-visible { opacity: 1; }
.click-brain-halo {
  fill: rgba(7, 10, 16, 0.9);
  stroke: rgba(79, 195, 247, 0.72);
  stroke-width: 2;
  opacity: 0.94;
  animation: brainHalo 1.2s ease-in-out infinite;
}
[data-theme="light"] .click-brain-halo { fill: rgba(255, 255, 255, 0.94); stroke: rgba(10, 127, 196, 0.74); }

.brain-image {
  -webkit-filter: none;
  filter: none;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 220ms ease, transform 220ms ease;
}
.brain-final { opacity: 0; }
.click-brain.stage-0 .brain-start,
.click-brain.stage-1 .brain-start { opacity: 1; }
.click-brain.stage-2 .brain-start { opacity: 0.78; }
.click-brain.stage-3 .brain-start { opacity: 0.46; }
.click-brain.stage-4 .brain-start { opacity: 0.18; }
.click-brain.stage-5 .brain-start { opacity: 0; }
.click-brain.stage-0 .brain-final,
.click-brain.stage-1 .brain-final { opacity: 0; }
.click-brain.stage-2 .brain-final { opacity: 0.28; }
.click-brain.stage-3 .brain-final { opacity: 0.58; }
.click-brain.stage-4 .brain-final { opacity: 0.84; }
.click-brain.stage-5 .brain-final { opacity: 1; }
.click-brain.stage-5 .click-brain-halo { stroke: rgba(255, 139, 107, 0.82); }

.brainhack-pop {
  fill: #ffffff;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  -webkit-filter: url(#workflow-text-glow);
  filter: url(#workflow-text-glow);
}
.brainhack-pop.is-visible { animation: brainHackPop 1.2s ease-out both; }
[data-theme="light"] .brainhack-pop { fill: var(--text); }

@keyframes workflowDash { to { stroke-dashoffset: -44; } }
@keyframes workflowNodePulse { 0%, 100% { opacity: 0.82; } 45% { opacity: 1; } }
@keyframes brainHalo { 0%, 100% { transform: scale(0.92); } 50% { transform: scale(1.08); } }
@keyframes nodeFlash {
  0%   { opacity: 0.95; stroke-width: 6; transform: scale(0.25); }
  58%  { opacity: 0.9; }
  100% { opacity: 0; stroke-width: 1; transform: scale(3.2); }
}
@keyframes brainHackPop {
  0%   { opacity: 0; transform: translateY(8px) scale(0.84); }
  18%, 100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Home sections ---------- */
.home-section {
  padding: clamp(56px, 7vw, 88px) 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.home-section-alt { background: var(--bg-elev-2); }
[data-theme="light"] .home-section-alt { background: #eef3f8; }

.section-lead {
  max-width: 760px;
  margin: 0 0 32px;
  color: var(--muted-strong);
  font-size: 1.05rem;
  line-height: 1.7;
}

.action-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.action-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow-card);
}
.action-card header {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
}
.action-logo-wrap {
  display: grid;
  place-items: center;
  width: 168px;
}
.action-logo {
  width: 100%;
  height: auto;
  max-height: 96px;
  object-fit: contain;
  display: block;
}

@media (max-width: 720px) {
  .action-card header { grid-template-columns: 132px minmax(0, 1fr); gap: 16px; }
  .action-logo-wrap { width: 132px; }
}

.action-card header h3 {
  margin: 4px 0 0;
  font-size: 1.18rem;
  line-height: 1.25;
}
.action-eyebrow {
  margin: 0;
  font-size: 0.72rem;
}

.action-card p {
  color: var(--muted-strong);
  font-size: 0.98rem;
}

.action-bullets {
  margin: 8px 0 18px;
  padding-left: 1.2em;
  color: var(--muted-strong);
}
.action-bullets li {
  margin: 4px 0;
  font-size: 0.96rem;
}

.action-cta { margin: 0; }
.action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
}
.action-link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.format-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.format-card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.format-meta {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.format-card p { margin: 0; color: var(--muted-strong); font-size: 0.95rem; }

.home-section-foot { margin: 30px 0 0; }

/* ---------- Programme section ---------- */
.programme-section {
  padding: clamp(56px, 6vw, 84px) 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.schedule-wrapper {
  margin-top: 22px;
  margin-bottom: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 720px;
}

@media (max-width: 920px) {
  .schedule-wrapper { overflow-x: auto; }
  .schedule-table { min-width: 560px; }
}

.schedule-table thead th {
  text-align: left;
  padding: 12px 16px;
  background: var(--accent-soft);
  color: var(--text-strong);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}

.schedule-table th.col-time,
.schedule-table td {
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.schedule-table th.col-time {
  width: 160px;
  background: var(--bg-elev-2);
  color: var(--muted-strong);
  font-weight: 600;
  text-align: left;
}

.schedule-table .time-span {
  display: block;
  font-size: 0.94rem;
  color: var(--text-strong);
  font-weight: 700;
}
.schedule-table .time-duration {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  color: var(--quiet);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.schedule-day-row th {
  background: linear-gradient(90deg, var(--mint-soft), var(--accent-soft));
  color: var(--text-strong);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cell-link {
  display: block;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.cell-link + .cell-link-sub { margin-top: 4px; border-top: 1px dashed var(--border); padding-top: 10px; }
.cell-link:hover {
  background: var(--accent-soft);
  text-decoration: none;
  transform: translateY(-1px);
}
.cell-link strong { display: block; margin-top: 4px; color: var(--text-strong); font-weight: 700; line-height: 1.3; }

.cell-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}
.tag-indos   { background: var(--coral-soft); color: var(--coral); border-color: var(--coral-soft); }
.tag-wg1     { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.tag-wg2     {
  background: color-mix(in srgb, var(--violet), transparent 80%);
  color: var(--violet);
  border-color: color-mix(in srgb, var(--violet), transparent 60%);
}
.tag-wg3     { background: var(--mint-soft); color: var(--mint); border-color: var(--mint-soft); }
.tag-eeg101  { background: var(--accent-soft); color: var(--accent); }

.cell-indos  { background: color-mix(in srgb, var(--coral), transparent 92%); }
.cell-eeg101 { background: color-mix(in srgb, var(--accent), transparent 94%); }
.cell-both   { background: color-mix(in srgb, var(--mint), transparent 88%); text-align: center; padding: 14px 16px; }
.cell-break  { text-align: center; color: var(--quiet); font-style: italic; }
.cell-open   { color: var(--quiet); font-style: italic; }

.schedule-table tbody tr:last-child th,
.schedule-table tbody tr:last-child td { border-bottom: none; }

.schedule-footnote {
  padding: 12px 16px 0;
  margin: 0;
  color: var(--quiet);
  font-size: 0.84rem;
}

/* ---------- Programme blocks and cards ---------- */
.programme-block {
  max-width: var(--max);
  margin: 0 auto 32px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.programme-block-head {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
}
.programme-block-head h3 {
  margin: 4px 0 10px;
  font-size: 1.45rem;
}
.programme-block-head p { margin: 0 0 8px; color: var(--muted-strong); }
.block-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.programme-block.programme-indos { border-left: 4px solid var(--coral); }
.programme-block.programme-indos .block-kicker { color: var(--coral); }
.programme-block.programme-wg1   { border-left: 4px solid var(--accent); }
.programme-block.programme-wg1   .block-kicker { color: var(--accent); }
.programme-block.programme-wg2   { border-left: 4px solid var(--violet); }
.programme-block.programme-wg2   .block-kicker { color: var(--violet); }
.programme-block.programme-wg3   { border-left: 4px solid var(--mint); }
.programme-block.programme-wg3   .block-kicker { color: var(--mint); }

.programme-card {
  margin-top: 18px;
  padding: clamp(18px, 2.5vw, 26px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev-2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
  scroll-margin-top: 96px;
}
[data-theme="light"] .programme-card { box-shadow: 0 6px 16px rgba(15, 25, 40, 0.06); }
.programme-block .programme-card:first-of-type { margin-top: 0; }

.programme-card h3 {
  max-width: 980px;
  margin: 0 0 12px;
  font-size: 1.25rem;
  line-height: 1.25;
}
.programme-card h4 {
  margin: 14px 0 8px;
  color: var(--text-strong);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.programme-card p, .programme-card li { color: var(--muted-strong); }
.programme-card p { margin: 10px 0 0; font-size: 0.96rem; line-height: 1.65; }

.programme-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.programme-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--card);
}

.tutor-line {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 10px 0 0 !important;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 68%);
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 7px 12px;
  color: var(--text) !important;
  font-size: 0.86rem;
  font-weight: 600;
}
.tutor-line strong { color: var(--accent); }

.programme-pitch {
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  color: var(--text) !important;
}

.target-line { margin-top: 18px !important; color: var(--text) !important; }
.tag-line {
  margin-top: 14px !important;
  color: var(--mint) !important;
  font-size: 0.8rem;
  font-weight: 600;
}

.programme-card ul {
  display: grid;
  gap: 6px;
  margin: 6px 0 0;
  padding-left: 18px;
}

.programme-hacktrack { border-style: dashed; }

/* Resource chips. A tidy row of pill-style links shown at the bottom of
   each session card: website, tool, repository, paper, OHBM entry. */
.programme-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}
.programme-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .12s ease;
}
.programme-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.programme-link-kind {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.programme-link-target { color: inherit; }

.featured-session { border-color: color-mix(in srgb, var(--mint), transparent 60%); }

/* ---------- COST notice ---------- */
.cost-action-note {
  max-width: var(--max);
  margin: 0 auto 8px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 60%);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--text);
  scroll-margin-top: 96px;
}
.cost-action-note p { margin: 0; font-size: 0.92rem; }
.cost-action-note a { color: var(--accent); font-weight: 700; }

/* ---------- Page TOC (mirrors megqc docs) ---------- */
.page-toc {
  position: fixed;
  left: clamp(10px, 1.6vw, 22px);
  top: 92px;
  z-index: 25;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}
.page-toc-toggle {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--panel-glass-strong);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, border-color .2s ease;
}
.page-toc-toggle:hover,
.page-toc-toggle:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
  outline: none;
}
.toc-bars { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.toc-bars span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform .25s ease, opacity .2s ease;
}
.page-toc.is-open .toc-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.page-toc.is-open .toc-bars span:nth-child(2) { opacity: 0; }
.page-toc.is-open .toc-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.page-toc-panel {
  width: 244px;
  background: var(--panel-glass-strong);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 14px 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  transform: translateX(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s ease, opacity .22s ease;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.page-toc.is-open .page-toc-panel {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.page-toc-title {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 12px 10px;
}
.page-toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--muted-strong);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
  line-height: 1.35;
}
.page-toc-link:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-decoration: none;
}
.page-toc-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.page-toc-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  transition: background .2s ease, transform .2s ease;
}
.page-toc-link.is-active .page-toc-dot {
  background: var(--accent);
  transform: scale(1.4);
}

@media (max-width: 1100px) {
  .page-toc { top: 78px; }
  .page-toc-panel { width: 220px; }
}
@media (max-width: 760px) {
  .page-toc { top: 110px; left: 8px; }
  .page-toc-panel {
    width: min(280px, calc(100vw - 28px));
    max-height: calc(100vh - 140px);
  }
}

/* ---------- Links page ---------- */
.links-section {
  padding: clamp(56px, 6vw, 84px) 0;
  border-top: 1px solid var(--line);
}

.link-category { margin-top: 32px; }
.link-category-title {
  margin: 0 0 14px;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.resource-link {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}

.resource-link-imgwrap {
  display: grid;
  place-items: center;
  width: 130px;
  min-height: 64px;
}
.resource-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.resource-link span {
  display: block;
  color: var(--text-strong);
  font-weight: 700;
  font-size: 0.98rem;
}
.resource-link strong {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 2px;
  word-break: break-word;
}

.resource-link-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: transparent;
  border: none;
  padding: 0;
  display: block;
}

/* Brand wordmark logos (INDoS / EEG101): horizontal, render natively per
   theme via .theme-only-* sibling swap, no filter tricks. */
.resource-link-img-brand {
  width: 130px;
  height: auto;
  max-height: 72px;
}

/* App icons (macOS AppIcon PNGs): full-bleed square, no tinting. */
.resource-link-img-app {
  width: 72px;
  height: 72px;
}

.resource-link-glyph {
  width: 72px;
  height: 72px;
  justify-self: center;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 50%);
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 4vw, 48px);
  color: var(--quiet);
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 0; font-size: 0.9rem; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Modal (kept) ---------- */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.gallery-modal.is-open { opacity: 1; pointer-events: auto; }
.modal-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  width: min(1120px, 100%);
  max-height: min(780px, 88svh);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-2);
  transform: scale(0.96) translateY(12px);
  transition: transform 220ms ease;
}
.gallery-modal.is-open .modal-panel { transform: scale(1) translateY(0); }
.modal-panel img {
  width: 100%;
  height: 100%;
  max-height: 88svh;
  object-fit: contain;
  background: var(--bg);
}
.modal-copy { padding: clamp(22px, 4vw, 34px); overflow: auto; }
.modal-copy h2 { margin: 0; font-size: 1.55rem; line-height: 1.2; }
.modal-copy p:last-child { margin: 14px 0 0; color: var(--muted); }
.modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 52;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(12, 16, 24, 0.78);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 14px;
}
[data-theme="light"] .gallery-modal { background: rgba(16, 22, 32, 0.54); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Reveal (small chrome only) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 480ms ease, transform 480ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .nav-links { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .hero-content {
    width: min(100% - 32px, 760px);
    transform: none;
    padding-bottom: 54px;
  }
  .action-pair, .format-grid, .link-grid { grid-template-columns: 1fr; }
  .modal-panel { grid-template-columns: 1fr; max-height: 88svh; }
  .modal-panel img { max-height: 58svh; }
}

@media (max-width: 560px) {
  .brand-group {
    flex-wrap: wrap;
    font-size: 0.86rem;
    white-space: normal;
    gap: 10px;
  }
  .brand-text { max-width: 17ch; }
  .brand-logo-indos { width: 124px; }
  .brand-logo-eeg101 { width: 128px; }
  .nav-links { gap: 6px; font-size: 0.82rem; }
  .theme-toggle { width: 100%; }
  .button { width: 100%; }
  .home-section, .links-section, .programme-section {
    padding: 56px 0;
  }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .travel-dot, .click-brain, .brainhack-pop, .workflow-flash, .workflow-spotlight {
    display: none;
  }
}
