/* Shared controls and colour tokens for all public pages. */
:root {
  --header-h: 72px;
  --surface: #18202b;
  --surface-soft: #0c161c;
  --header-bg: rgba(10,16,22,.95);
  --accent: #27b8d6;
  color-scheme: dark;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf0f3;
  --bg2: #edf0f3;
  --card: #ffffff;
  --surface: #ffffff;
  --surface-soft: #e4e9ee;
  --text: #1c2b36;
  --muted: #526473;
  --brand: #086f91;
  --brand2: #086d8d;
  --accent: #086d8d;
  --border: #cbd5df;
  --header-bg: rgba(237,240,243,.97);
  --shadow: 0 8px 26px rgba(35,53,70,.08);
}
html[data-theme] { background: var(--bg); }
html[data-theme] body { background: var(--bg); color: var(--text); }
header.site { top:0; height:72px; background:var(--header-bg); }
header.site .container.bar { max-width:1440px; }
header.site .bar { min-height:72px; }
.site-preferences { flex:0 0 auto; margin-left:10px; font:13px/1.2 system-ui,sans-serif; color:var(--text); }
.preferences-inner { display:flex; align-items:center; gap:8px; }
.site-preferences button { font:inherit; font-weight:650; border:1px solid transparent; background:transparent; color:var(--muted); cursor:pointer; border-radius:6px; padding:4px 9px; min-height:28px; }
.site-preferences button:hover { color:var(--text); background:var(--surface-soft); }
.site-preferences button:focus-visible { outline:2px solid var(--brand2); outline-offset:2px; }
.site-preferences .language-switch { display:flex; gap:2px; }
.site-preferences button[aria-pressed="true"][data-language] { background:var(--brand); color:white; }
.preferences-divider { height:16px; width:1px; background:var(--border); }
.site-preferences [data-theme-toggle] { min-width:83px; text-align:left; }
@media (min-width:1361px) {
  nav#mainnav { gap:2px; font-size:14px; }
  nav#mainnav > a, nav#mainnav .drop > a { padding:10px 7px; }
  html[data-theme="light"] nav#mainnav { background:transparent; }
}
@media (max-width:1360px) {
  .menu-btn { display:inline-flex; }
  nav#mainnav { position:absolute; top:82px; right:20px; left:20px; display:none; flex-direction:column; gap:6px; padding:10px; background:var(--surface); border:1px solid var(--border); border-radius:14px; max-height:calc(100dvh - 100px); overflow-y:auto; }
  nav#mainnav.open { display:flex; }
  .menu.research { position:static; opacity:1; visibility:visible; transform:none; pointer-events:auto; box-shadow:none; border:none; padding:0; display:block; min-width:0; }
  .team { padding:0; margin-bottom:8px; }
  .team-title { border-radius:10px; }
  .flyout { position:static; display:none; border:none; border-left:4px solid transparent; border-radius:10px; padding:6px 0 0; box-shadow:none; min-width:0; margin-left:0; }
  .team.open .flyout, .team.is-open .flyout { display:block; }
  nav#mainnav .site-preferences { margin:8px 0 4px; padding-top:12px; border-top:1px solid var(--border); }
}
html[data-theme="light"] .brand img,
html[data-theme="light"] header.site .logo-large { content:url('logo/logo-nutriomics-logo-1000x350pxl.png'); filter:none; opacity:1; }
html[data-theme="light"] .lead,
html[data-theme="light"] .sub,
html[data-theme="light"] .participation-hero .lead,
html[data-theme="light"] .study .purpose { color:#425869; }
html[data-theme="light"] .person-status,
html[data-theme="light"] #membersState { color:var(--muted); }
html[data-theme="light"] .person-avatar { background:var(--surface-soft); color:var(--text); }
html[data-theme="light"] .person-links a {
  background:#e8f2f6;
  color:#15566d;
  border-color:#c5dce5;
}
html[data-theme="light"] .person-links a:hover,
html[data-theme="light"] .person-links a:focus-visible {
  background:#d5e9f1;
  color:#0b465d;
  border-color:var(--brand2);
}
html[data-theme="light"] .menu,
html[data-theme="light"] .flyout,
html[data-theme="light"] nav#mainnav,
html[data-theme="light"] .team-title,
html[data-theme="light"] .axis-btn,
html[data-theme="light"] .menu-btn,
html[data-theme="light"] .slideshow,
html[data-theme="light"] .inp,
html[data-theme="light"] .contact-msg-box,
html[data-theme="light"] .cookie-banner { background:var(--surface); color:var(--text); }
html[data-theme="light"] nav#mainnav a:hover,
html[data-theme="light"] nav#mainnav a.active,
html[data-theme="light"] .flyout .submenu a:hover,
html[data-theme="light"] .axis-btn:hover { background:var(--surface-soft); color:var(--text); }
html[data-theme="light"] .pill { background:#deedf2; color:#15566d; }
html[data-theme="light"] footer { color:var(--muted); }
html[data-theme="light"] .btn,
html[data-theme="light"] .btn-slim { color:white; }
html[data-theme="light"] .study { --accent:#087b9a; }
html[data-theme="light"] .study.nutrimmune { --accent:#087b71; }
html[data-theme="light"] .study.jemini { --accent:#7144bb; }
html[data-theme="light"] .study .button { color:white; }
html[data-theme="light"] .logo-large { filter:none; }
@media (min-width:1361px) { html[data-theme="light"] nav#mainnav { background:transparent; } }
.privacy-page { padding-top:0; }
.privacy-page .site-preferences { margin:18px 0 0; }
.privacy-page .wrapper { margin-top:32px; }
.privacy-home { display:inline-block; margin:0 0 20px; }
@media (max-width:600px) {
  .participation-page { --header-h:116px; }
  .participation-page header.site { height:auto; }
  .participation-page header.site .bar { flex-wrap:wrap; gap:4px; padding-top:6px; padding-bottom:10px; }
  .participation-page .participation-nav { flex-basis:100%; flex-wrap:wrap; justify-content:space-between; gap:8px; }
  .participation-page .site-preferences { margin-left:auto; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
