:root {
  --nav-paper:#f2efe7; --nav-ink:#191a18; --nav-muted:#50524e;
  --nav-rule:#cec7b7; --nav-accent:#79551f; --nav-button:#c6a467;
  --nav-button-ink:#21180a; --nav-hover:#e1c487;
  --preview-heading:clamp(2rem,4.2vw,4rem);
  --preview-body:clamp(1rem,1.4vw,1.125rem);
  --preview-leading:1.75; --preview-tracking:.01em;
}
html[data-theme="dark"] {
  --nav-paper:#171b20; --nav-ink:#f0f2f3; --nav-muted:#c1c9cf;
  --nav-rule:#535e69; --nav-accent:#c2d1de; --nav-button:#b8c7d3;
  --nav-button-ink:#151c23; --nav-hover:#d3dfe8;
}
html body .rk-header { background:var(--nav-paper)!important; color:var(--nav-ink)!important; border-bottom:1px solid var(--nav-rule)!important; }
body .rk-header .rk-header-inner {
  width:min(calc(100% - 48px),1440px); min-height:72px; height:auto; margin:auto;
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:clamp(12px,2vw,32px);
}
body .rk-header .rk-brand img { width:138px; height:auto; filter:none!important; display:block; }
html[data-theme="dark"] body .rk-header .rk-brand img { filter:invert(1)!important; }
body .rk-header .rk-nav { display:flex; justify-content:center; align-items:center; gap:clamp(10px,1.2vw,20px); }
body .rk-header .rk-nav a, body .rk-mobile a:not(.rk-cta) {
  font:500 .8125rem/1.4 var(--font-system,var(--font-sans,sans-serif));
  letter-spacing:.015em; color:var(--nav-muted); white-space:nowrap; text-decoration:none;
}
body .rk-header .rk-nav a[aria-current], body .rk-mobile a[aria-current] {
  color:var(--nav-ink); text-decoration:underline; text-decoration-color:var(--nav-accent); text-underline-offset:7px;
}
body .rk-header .rk-actions { display:flex; align-items:center; gap:8px; }
body .rk-header .rk-cta, body .rk-mobile .rk-cta {
  display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 13px;
  border:1px solid transparent; border-radius:2px; background:var(--nav-button); color:var(--nav-button-ink);
  font:600 .8125rem/1.4 var(--font-system,var(--font-sans,sans-serif)); letter-spacing:.03em; white-space:nowrap; text-decoration:none;
}
body .rk-header .rk-cta:hover, body .rk-mobile .rk-cta:hover { background:var(--nav-hover); color:var(--nav-button-ink); }
body .rk-header .theme-control { position:relative; display:block!important; }
body .rk-header .theme-trigger, body .rk-header .rk-menu-button {
  width:42px; height:42px; place-items:center; border:1px solid var(--nav-rule); border-radius:2px;
  background:transparent; color:var(--nav-ink); cursor:pointer;
}
body .rk-header .theme-trigger { display:grid; }
body .rk-header .rk-menu-button { display:none; }
.rk-header .theme-icon, .rk-header .theme-option svg { width:18px; height:18px; stroke:currentColor; stroke-width:1.5; fill:none; }
body .rk-header .theme-icon--moon, html[data-theme="dark"] body .rk-header .theme-icon--sun { display:none; }
html[data-theme="dark"] body .rk-header .theme-icon--moon { display:block; }
body .rk-header .theme-menu { display:none; position:absolute; right:0; top:calc(100% + 6px); z-index:150; width:152px; padding:5px; background:var(--nav-paper); border:1px solid var(--nav-rule); }
body .rk-header .theme-menu.open { display:grid; }
body .rk-header .theme-option { display:grid; grid-template-columns:20px 1fr 12px; gap:7px; align-items:center; padding:9px; border:0; text-align:left; color:var(--nav-ink); background:transparent; cursor:pointer; font:500 13px/1.3 var(--font-system,var(--font-sans,sans-serif)); }
body .rk-header .theme-option:hover, body .rk-header .theme-option[aria-checked="true"] { background:var(--nav-button); color:var(--nav-button-ink); }
body .rk-mobile { display:none; background:var(--nav-paper); color:var(--nav-ink); border-bottom:1px solid var(--nav-rule); top:64px; }
.rk-header :focus-visible, .rk-mobile :focus-visible { outline:2px solid var(--nav-accent); outline-offset:3px; }
.ai-page-tools { position:absolute; z-index:4; top:12px; right:24px; display:flex; gap:8px; }
.ai-page-tools button { color:var(--nav-ink); background:var(--nav-paper); border:1px solid var(--nav-rule); min-height:36px; }
body .ai-shell { background:var(--nav-paper); color:var(--nav-ink); }
body .ai-shell .empty-state :is(h1,em,.sub,.eyebrow) { color:var(--nav-ink); }
body :is(#how,#people,#contact) :is(h2,#contactTitle), body .today-hero h1, body .ai-shell .empty-state h1 {
  font-family:var(--font-philosophy,var(--font-serif,serif)); font-size:var(--preview-heading); line-height:1.2; letter-spacing:.005em;
}
body .ai-shell .empty-state h1 em { font-family:inherit; }
body :is(.science-copy,.team-copy,.contact-intro,.hero-copy) p:not([class]), body .contact-intro > p:not(.title-label), body .ai-shell .sub {
  font-family:var(--font-system,var(--font-sans,sans-serif)); font-size:var(--preview-body);
  line-height:var(--preview-leading); letter-spacing:var(--preview-tracking);
}

.rk-header {
  position:fixed;
  inset:0 0 auto;
  z-index:200;
}
.rk-brand { display:block; }
.rk-nav a [lang="en"], .rk-mobile a [lang="en"] {
  font-size:.91em;
  letter-spacing:.065em;
}
.rk-nav a { padding-block:12px; }
.rk-nav a:hover, .rk-mobile a:hover { color:var(--nav-ink); }
.rk-header a[aria-current], .rk-mobile a[aria-current] {
  text-decoration-thickness:1px;
}
.rk-mobile {
  position:fixed;
  z-index:199;
  inset-inline:0;
  max-height:calc(100dvh - 64px);
  overflow:auto;
}
body .title-label :is(.title-label-cn,.title-label-en) {
  font-family:var(--font-system,var(--font-sans,sans-serif));
  line-height:1.45;
}
body .title-label .title-label-en { letter-spacing:.085em; }
body .ai-page-tools button { padding-inline:12px; }
@media(max-width:1200px) {
  body .rk-header .rk-header-inner {
    width:calc(100% - 28px);
    min-height:64px;
    grid-template-columns:1fr auto;
    gap:8px;
  }
  body .rk-header .rk-nav { display:none; }
  body .rk-header .rk-menu-button { display:grid; }
  body .rk-mobile.open { display:grid; gap:2px; padding:12px 18px; }
  .rk-mobile a { padding:12px 4px; }
  .rk-mobile .rk-cta { justify-self:start; }
}
@media(max-width:420px) {
  body .rk-header .rk-brand img { width:104px; }
  body .rk-header .rk-cta { padding-inline:8px; }
}

html:has(.rk-header) { --rk-header-height: 73px; scroll-padding-top: var(--rk-header-height); }
body:has(> .rk-header) { padding-top: var(--rk-header-height); }
body .rk-mobile { top: var(--rk-header-height); max-height: calc(100dvh - var(--rk-header-height)); }
@media (max-width:1200px) {
  html:has(.rk-header) { --rk-header-height: 65px; }
}

/* Keep fixed chrome within the viewport, including when text is enlarged. */
.rk-header-inner, .rk-actions { min-width: 0; }
.rk-header .rk-menu-button,
.rk-header .theme-trigger { min-width: 44px; min-height: 44px; }
.rk-mobile { overscroll-behavior: contain; }
@media (max-width: 600px) {
  body .rk-header .rk-header-inner { width: calc(100% - 24px); }
  body .rk-header .rk-actions { gap: 6px; }
  body .rk-mobile a:not(.rk-cta) {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
