.hero {
  --specimen-width: min(95vw, 160svh);
  --specimen-filter: var(--brain-filter);
  --specimen-wash: light-dark(rgb(83 102 110 / 6%), rgb(172 183 186 / 5%));
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  min-height: calc(100vh - var(--masthead-height));
  min-height: calc(100svh - var(--masthead-height));
  overflow: clip;
  background: linear-gradient(to bottom, var(--page), transparent 6rem),
              radial-gradient(ellipse at 72% 36%, var(--specimen-wash), transparent 70%), var(--page);
  border-bottom: 1px solid var(--line);
}
.hero__copy {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.5rem, 6svh, 4.5rem);
  pointer-events: none;
}
.hero__copy > * { width: fit-content; pointer-events: auto; }
.lab-name { margin-bottom: .95rem; color: var(--muted); font-size: .93rem; font-weight: 550; }
.hero h1 { max-width: 15ch; font-size: clamp(3.2rem, 5vw, 5.8rem); line-height: 1.04; }
.hero h1:lang(zh) { max-width: 11em; white-space: pre-line; font-size: clamp(2.75rem, 4.3vw, 5.1rem); line-height: 1.18; }
.hero__intro { max-width: min(38vw, 49ch); margin-top: 1rem; color: var(--muted); font-size: clamp(1rem, 1.1vw, 1.13rem); }
.hero__actions { margin-top: 1.4rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1.22rem; text-decoration: none; font-size: .92rem; font-weight: 550; }
.button:hover { background: var(--hover); text-decoration: none; }
.button--solid { background: var(--action); border-color: var(--action); color: var(--on-action); }
.button--solid:hover { background: var(--ink); opacity: .86; }
.brain-specimen { position: absolute; inset: 0; min-width: 0; margin: 0; }
.brain-view { position: relative; aspect-ratio: 32 / 17; }
.brain-specimen .brain-view {
  position: absolute;
  width: var(--specimen-width);
  right: -1.5%;
  top: 42%;
  transform: translateY(-50%);
  --specimen-mask: radial-gradient(ellipse 64% 83% at 0% 100%, transparent 13%, rgb(0 0 0 / 14%) 40%, #000 84%);
}
.brain-view:focus-visible { outline: 2px solid var(--muted); outline-offset: -4px; }
.brain-view img, .brain-view canvas {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  filter: var(--specimen-filter, none);
  mask-image: var(--specimen-mask, none);
}
.brain-view canvas[hidden], .brain-view.is-live picture { display: none; }
.brain-specimen figcaption {
  position: absolute; right: max(var(--inset), calc((100% - var(--frame)) / 2)); bottom: clamp(2.5rem, 6svh, 4.5rem);
  display: flex; align-items: center; gap: .85rem;
  color: var(--muted); font: .8rem/1.5 var(--sans);
}
.brain-scale { display: grid; justify-items: center; gap: .18rem; width: calc(var(--specimen-width) * 50 / 840); font-size: .65rem; white-space: nowrap; }
.brain-scale::before { content: ""; width: 100%; height: 4px; border: 1px solid currentColor; border-top: 0; }
.brain-specimen figcaption a { text-decoration-thickness: 1px; text-underline-offset: .22em; }
.brain-motion { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.brain-motion[hidden] { display: none; }
.brain-motion:hover { background: var(--hover); color: var(--ink); }
.brain-motion::before { content: ""; width: 8px; height: 10px; border-inline: 2px solid currentColor; }
.brain-motion.is-paused::before { width: 0; height: 0; border: solid transparent; border-width: 5px 0 5px 8px; border-left-color: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .brain-view.has-wave {
    mask-image: linear-gradient(102deg, #000a 32%, #000b 40%, #000 47%, #000c 50%, #000e 53%, #000a 63%);
    mask-size: 270% 100%;
    mask-repeat: no-repeat;
    animation: brain-light-wave 7.5s linear -1.7s infinite paused;
  }
  .brain-view.has-wave.is-waving { animation-play-state: running; }
  @keyframes brain-light-wave {
    from { mask-position: 100% 0; }
    87%, to { mask-position: 0% 0; }
  }
}
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .brain-view.has-wave { animation-timing-function: steps(120, end); }
}
@media (max-width: 64rem) and (orientation: portrait) {
  .hero {
    --specimen-width: min(114vw, 86svh);
    grid-template-rows: minmax(auto, 1fr) auto;
    align-items: stretch;
  }
  .brain-specimen { position: relative; grid-row: 1; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; padding-top: 1rem; }
  .brain-specimen .brain-view { position: relative; top: auto; right: auto; left: 50%; transform: translateX(-50%); --specimen-mask: none; }
  .brain-specimen figcaption { position: static; margin: .65rem var(--inset) 0; gap: .55rem; justify-content: end; font-size: .73rem; }
  .brain-scale { margin-right: auto; }
  .hero__copy { grid-row: 2; padding-block: clamp(1.5rem, 4svh, 3rem) clamp(2rem, 5svh, 3rem); }
  .lab-name { margin-bottom: .6rem; }
  .hero h1 { max-width: 17ch; font-size: clamp(2.35rem, 7vw, 3.8rem); }
  .hero h1:lang(zh) { font-size: clamp(2rem, 6.8vw, 3.5rem); }
  .hero__intro { max-width: 43ch; margin-top: .8rem; }
  .hero__actions { margin-top: 1.1rem; }
}
@media (max-height: 34rem) and (orientation: landscape) {
  .hero { --specimen-width: min(87vw, 148svh); }
  .brain-specimen .brain-view { top: 46%; }
  .hero__copy { padding-block: 1.5rem; }
  .hero h1, .hero h1:lang(zh) { font-size: clamp(2rem, 4vw, 2.8rem); }
  .hero h1:lang(en) { max-width: 22ch; }
  .hero__intro { max-width: min(46vw, 49ch); margin-top: .55rem; font-size: .93rem; }
  .hero__actions { margin-top: .75rem; }
  .brain-specimen figcaption { bottom: 1.5rem; }
}
.home-section { padding-top: clamp(2.4rem, 4.4vw, 4.3rem); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.15rem; }
.section-heading a { font-size: .9rem; color: var(--muted); }
.chat-studio h2 {
  grid-area: 1 / 1; align-self: end; margin: 0 0 clamp(1.25rem, 2.3vw, 2rem);
  color: var(--ink); text-align: center; text-wrap: balance; white-space: pre-line;
  font: 500 clamp(1.55rem, 3.15vw, 3rem)/1.22 var(--display);
}
.chat-studio h2:lang(zh) { font: 500 clamp(1.3rem, 2.65vw, 2.5rem)/1.52 var(--sans); }
@media (min-width: 64rem) {
  .chat-studio h2 { align-self: center; margin: 0; }
}
.chat-studio {
  position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center;
  grid-template: minmax(0, 1fr) auto minmax(0, 1fr) / minmax(0, 1fr);
  container-type: size; width: 100%; aspect-ratio: 8 / 5; min-height: 33rem;
}
.globe-cap {
  --radius: max(75cqw, 55cqh);
  --cap-height: min(59cqh, calc(var(--radius) * .89));
  --ocean-lit: light-dark(#f9fbfb, #303639); --ocean-mid: light-dark(#f4f6f7, #272d30); --ocean-low: light-dark(#e7edef, #1c2022);
  --land-lit: light-dark(#c3d1d4, #516166); --land-mid: light-dark(#ccd8d9, #465458); --land-low: light-dark(#d3dddd, #3a474b);
  --wire-lit: light-dark(#7d9099, #a1b2b8); --wire-mid: light-dark(#9eafb6, #65777e); --wire-low: light-dark(#abbac0, #49585e);
  position: absolute; z-index: -1; left: 52%; top: calc(100% - var(--cap-height));
  width: calc(2 * var(--radius)); height: auto; transform: translateX(-50%); pointer-events: none;
}
.globe-cap__land {
  fill: url(#cap-continent); stroke: light-dark(#879da2, #869a9e);
  stroke-width: .76; stroke-opacity: .91; stroke-linejoin: round; vector-effect: non-scaling-stroke;
}
.globe-cap__wire { fill: none; stroke: url(#cap-grid); stroke-width: .85; opacity: .66; vector-effect: non-scaling-stroke; }
.globe-cap__rim { fill: none; stroke: light-dark(#84949c, #a4b4b9); stroke-width: 1.05; stroke-opacity: .87; vector-effect: non-scaling-stroke; }
@media (max-width: 600px) {
  .globe-cap { --radius: max(83cqw, 52cqh); left: 51%; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .globe-cap { --cap-height: 63cqh; }
}
.chat-glass, .chat-studio noscript { grid-area: 2 / 1; }
.chat-glass {
  width: clamp(21rem, 39%, 32rem); max-width: calc(100% - 2.5rem);
  padding: clamp(.7rem, 1.2vw, 1.05rem); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: clamp(1.1rem, 1.8vw, 1.55rem); background: color-mix(in srgb, var(--page) 66%, transparent); color: var(--ink);
  -webkit-backdrop-filter: blur(16px) saturate(115%); backdrop-filter: blur(16px) saturate(115%);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 10%), 0 8px 30px light-dark(rgb(0 0 0 / 5%), rgb(0 0 0 / 14%));
}
.chat-glass:focus-within { border-color: var(--muted); }
.chat-glass__input {
  display: block; width: 100%; min-height: 5rem; resize: none; border: 0; border-radius: .75rem;
  padding: .68rem .84rem; background: light-dark(rgb(0 0 0 / 3.5%), rgb(0 0 0 / 16%)); color: var(--ink);
  font: 450 clamp(1rem, 1.45vw, 1.25rem)/1.5 var(--sans); caret-color: var(--ink);
}
.chat-glass__input::placeholder { color: var(--muted); opacity: 1; }
.chat-glass__input:focus-visible { outline: 1px solid var(--muted); outline-offset: 1px; }
.chat-glass__actions { display: flex; align-items: center; justify-content: space-between; gap: .85rem; padding: .65rem .12rem 0 .45rem; }
.chat-glass__actions span { color: var(--muted); font: 450 .8rem/1.4 var(--sans); }
.chat-glass__send, .chat-studio__motion {
  display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer;
}
.chat-glass__send { width: 44px; height: 44px; border: 0; background: var(--action); color: var(--on-action); }
.chat-glass__send:hover { opacity: .82; }
.chat-glass__send:focus-visible, .chat-studio__motion:focus-visible { outline-color: var(--ink); }
.chat-studio__motion {
  position: absolute; bottom: clamp(.45rem, 1.5vw, 1.25rem); right: clamp(.45rem, 1.5vw, 1.25rem);
  width: 44px; height: 44px; border: 0; color: var(--ink); background: color-mix(in srgb, var(--page) 75%, transparent);
}
.chat-studio__motion:hover { background: var(--hover); color: var(--ink); }
.chat-studio__motion[hidden] { display: none; }
.chat-studio__motion::before { content: ""; width: 9px; height: 11px; border-inline: 2px solid currentColor; }
.chat-studio__motion.is-paused::before { width: 0; height: 0; border: solid transparent; border-width: 6px 0 6px 9px; border-left-color: currentColor; }
.chat-glass__fallback { display: inline-block; padding: .6rem 1.15rem; border-radius: 2rem; background: var(--action); color: var(--on-action); }
@media (max-width: 32rem) {
  .chat-studio { aspect-ratio: auto; height: clamp(30rem, 130vw, 37rem); min-height: 0; }
  .chat-studio h2:lang(zh) { font-size: min(1.3rem, 6.5cqw); }
  .chat-glass { max-width: calc(100% - 1rem); }
  .chat-studio__motion { bottom: 0; right: 0; }
}
.paper-list {
  display: grid; grid-template-columns: max-content fit-content(13rem) minmax(0,1fr);
  column-gap: clamp(1.5rem, 3vw, 3rem); list-style: none; padding: 0;
}
.paper-list li {
  display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: baseline;
  padding-block: 1rem; border-top: 1px solid var(--line);
}
.paper-list time, .paper-kind { color: var(--muted); font-size: .85rem; }
.paper-list time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.paper-kind { font-weight: 500; overflow-wrap: anywhere; }
.paper-list a { grid-column: 3; text-decoration: none; font-weight: 550; }
.paper-list a:hover { text-decoration: underline; }
@media (max-width: 46rem) {
  .paper-list { grid-template-columns: max-content minmax(0,1fr); column-gap: .9rem; }
  .paper-list li { row-gap: .25rem; }
  .paper-list a { grid-column: 1 / -1; }
}
