/* The neurosimulator.ai landing: the design system's tokens (landing/tokens.css) on one dark page. No framework. */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ba-color-canvas, #0B0E13); color: var(--ba-color-text-primary, #EEF2F7); scroll-behavior: smooth; }
/* site audit A3 (2026-10-07): small text at 5.3:1 on a card and 5.6:1 on the canvas; the token's #6F7A8A measures 4.2:1 and 4.4:1 */
:root { --ba-color-text-tertiary: #808B9B; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--ba-font-family-ui, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

/* ---- top bar */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: var(--ba-color-surface-translucent-topbar, rgba(11, 14, 19, 0.88));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ba-color-border-hairline, rgba(255,255,255,0.08));
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: 0.01em; }

/* ---- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--ba-color-border-medium, rgba(255,255,255,0.14));
  background: var(--ba-color-surface-translucent-panel, rgba(17, 21, 29, 0.84));
}
.btn:hover { background: var(--ba-color-surface-3, #1F2531); }
.btn.primary { background: var(--ba-color-accent-primary, #fff); color: var(--ba-color-accent-on-primary, #0B0E13); border-color: transparent; }
.btn.primary:hover { background: #E6EBF2; }
.btn.lg { padding: 12px 22px; font-size: 17px; }

/* ---- hero */
.hero { position: relative; min-height: min(92vh, 980px); display: grid; align-items: end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
/* site audit A4: the hero clip's own pause/play, bottom right, outside the aria-hidden media so it is reachable; the Latest clips have theirs (.u-play) */
.hero-play { position: absolute; right: 16px; bottom: 16px; z-index: 3; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(11, 14, 19, 0.72); color: var(--ba-color-text-primary, #EEF2F7); cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-play:hover { background: rgba(31, 37, 49, 0.9); }
.hero-play:focus-visible { outline: 2px solid var(--ba-color-text-link, #8AB4F8); outline-offset: 2px; }
.hero-play[hidden] { display: none; }
.hero-play .i-pause { width: 10px; height: 11px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.hero-play .i-play { width: 0; height: 0; margin-left: 3px; border-left: 9px solid currentColor; border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent; }
.hero-play .i-play, .hero-play.on .i-pause { display: block; }
.hero-play.on .i-play, .hero-play:not(.on) .i-pause { display: none; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--ba-color-canvas, #0B0E13) 0%, rgba(11, 14, 19, 0.55) 45%, rgba(11, 14, 19, 0.15) 100%),
    linear-gradient(to right, rgba(11, 14, 19, 0.75) 0%, rgba(11, 14, 19, 0) 70%);
}
.hero-copy { position: relative; padding: clamp(40px, 8vw, 96px) clamp(16px, 4vw, 48px) clamp(32px, 5vw, 64px); max-width: 900px; }
.eyebrow { color: var(--ba-color-text-secondary, #A7B0BE); font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; font-size: 13px; margin-bottom: 14px; }
h1 { font-size: clamp(36px, 5.6vw, 70px); line-height: 1.04; letter-spacing: -0.025em; font-weight: 650; text-wrap: balance; }
.lede { margin-top: 20px; font-size: clamp(17px, 1.6vw, 21px); color: var(--ba-color-text-primary, #EEF2F7); max-width: 720px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.note { margin-top: 16px; font-size: 14px; color: var(--ba-color-text-secondary, #A7B0BE); }
.methods { margin-top: 18px; font-size: 13px; line-height: 1.45; color: var(--ba-color-text-tertiary, #808B9B); max-width: 820px; }
.methods .k, .tile-methods summary { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ba-color-text-tertiary, #808B9B); }
.methods .k { margin-right: 10px; }

/* ---- sections */
.sec { padding: clamp(40px, 7vw, 88px) clamp(16px, 4vw, 48px); max-width: 1240px; margin: 0 auto; }
.sec-head { max-width: 760px; margin-bottom: 32px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -0.02em; font-weight: 640; line-height: 1.1; }
.sec-head p { margin-top: 12px; color: var(--ba-color-text-secondary, #A7B0BE); font-size: 17px; }
#methods .sec-head { max-width: 860px; }
#methods .sec-head p { color: var(--ba-color-text-primary, #EEF2F7); }

/* ---- modes */
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mode {
  display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 18px;
  background: var(--ba-color-surface-1, #11151D);
  border: 1px solid var(--ba-color-border-hairline, rgba(255,255,255,0.08));
}
.mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; aspect-ratio: 48 / 18; background: var(--ba-color-surface-2, #171C26); }
.tile { display: block; overflow: hidden; background: var(--ba-color-surface-2, #171C26); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.tile:hover img { transform: scale(1.03); }
.mosaic.blank {
  display: grid; place-items: center; color: var(--ba-color-text-disabled, #4C5563);
  background: radial-gradient(120% 120% at 20% 0%, var(--ba-color-surface-3, #1F2531) 0%, var(--ba-color-surface-1, #11151D) 70%);
}
.mode-body { padding: 20px 22px 22px; }
.mode-body h3 { font-size: 24px; letter-spacing: -0.015em; font-weight: 640; }
.mode-body .status { font-size: 15px; font-weight: 500; color: var(--ba-color-text-secondary, #A7B0BE); letter-spacing: 0; }
.mode.live .status { color: var(--ba-color-accent-success, #5CC98A); }
.mode-body .line { margin-top: 8px; font-size: 17px; }
.mode-body .blurb { margin-top: 10px; color: var(--ba-color-text-secondary, #A7B0BE); }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-weight: 600; }
.links a { color: var(--ba-color-text-link, #8AB4F8); text-decoration: none; }
.links a:hover { text-decoration: underline; }
.tile-methods { margin-top: 16px; border-top: 1px solid var(--ba-color-border-hairline, rgba(255,255,255,0.08)); padding-top: 10px; }
.tile-methods summary { cursor: pointer; list-style: none; }
.tile-methods summary::-webkit-details-marker { display: none; }
.tile-methods summary::after { content: " +"; }
.tile-methods[open] summary::after { content: " −"; }
.tile-methods dl { display: grid; gap: 8px; margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--ba-color-text-tertiary, #808B9B); }
.tile-methods dt { font-weight: 600; color: var(--ba-color-text-secondary, #A7B0BE); }

/* ---- what's being built */
.pieces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pieces li {
  padding: 18px 20px; border-radius: 14px; font-size: 15px; line-height: 1.5;
  color: var(--ba-color-text-secondary, #A7B0BE);
  background: var(--ba-color-surface-1, #11151D);
  border: 1px solid var(--ba-color-border-hairline, rgba(255,255,255,0.08));
}
.pieces b { display: block; margin-bottom: 6px; font-size: 17px; color: var(--ba-color-text-primary, #EEF2F7); }

/* ---- latest from the lab (site/landing/updates.py): cards from the item records, newest first */
/* the stream's muted text: 5.3:1 on the card (#11151D), 4.9:1 on surface-2; the shared tertiary is 4.2:1 (site audit A3) */
.updates { --u-muted: #808B9B; scroll-margin-top: 80px; }   /* /#latest clears the 63 px sticky bar (site audit A5) */
.updates .sec-head { margin-bottom: 24px; }
.u-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.u-list { display: grid; gap: 28px; max-width: 760px; }
.u-card {
  display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 16px;
  background: var(--ba-color-surface-1, #11151D);
  border: 1px solid var(--ba-color-border-hairline, rgba(255,255,255,0.08));
  scroll-margin-top: 72px;
}
.u-media { position: relative; aspect-ratio: 16 / 10; background: var(--ba-color-canvas, #0B0E13); }
.u-media img, .u-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.u-clip { opacity: 0; transition: opacity 300ms ease; }
.u-clip.playing { opacity: 1; }
.u-play {
  position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 999px; border: 1px solid var(--ba-color-border-medium, rgba(255,255,255,0.14)); cursor: pointer;
  color: var(--ba-color-text-primary, #EEF2F7); background: rgba(11, 14, 19, 0.72);
}
.u-play:hover { background: rgba(31, 37, 49, 0.9); }
.u-play:focus-visible { outline: 2px solid var(--ba-color-text-link, #8AB4F8); outline-offset: 2px; }
.u-play[hidden] { display: none; }
.u-play .i-pause, .u-play.on .i-play { display: none; }
.u-play.on .i-pause { display: block; }
.u-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.u-meta { display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 12px; font-weight: 500; letter-spacing: 0.02em; color: var(--u-muted); }
.u-team { color: var(--ba-color-text-secondary, #A7B0BE); font-weight: 600; }
.u-status.live { color: var(--ba-color-accent-success, #5CC98A); }
.u-status.ok { color: var(--ba-color-text-link, #8AB4F8); }
.u-body h3 { font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 640; text-wrap: balance; }
.u-body h3 a { text-decoration: none; }
.u-body h3 a:hover { text-decoration: underline; }
.u-line { color: var(--ba-color-text-secondary, #A7B0BE); font-size: 15px; line-height: 1.5; }
.u-methods, .u-sources { font-size: 12.5px; line-height: 1.45; color: var(--u-muted); }
.u-methods .k, .u-sources .k { margin-right: 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.u-methods .sep, .u-sources .sep { margin: 0 4px; }
.u-sources .sep.c { margin: 0 4px 0 0; }
details.u-methods summary { cursor: pointer; list-style: none; }
details.u-methods summary::-webkit-details-marker { display: none; }
details.u-methods summary::after { content: " +"; }
details.u-methods[open] summary::after { content: " −"; }
details.u-methods p { margin-top: 6px; }
.u-body .links { margin-top: auto; padding-top: 4px; font-size: 14px; }
.u-more { margin-top: 20px; }
.updates-page h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.06; letter-spacing: -0.02em; font-weight: 650; }
.updates-page .sec-head .links { margin-top: 14px; }
.updates-page .u-body h3 { font-size: 22px; }

/* ---- footer */
.foot { padding: 32px clamp(16px, 4vw, 48px) 48px; border-top: 1px solid var(--ba-color-border-hairline, rgba(255,255,255,0.08)); color: var(--ba-color-text-secondary, #A7B0BE); font-size: 14px; max-width: 1240px; margin: 0 auto; }
.foot a { color: inherit; }
.credits { margin-top: 10px; font-size: 13px; color: var(--ba-color-text-tertiary, #808B9B); max-width: 900px; }

@media (max-width: 1100px) {
  .u-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .modes { grid-template-columns: 1fr; }
  .pieces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hero { min-height: 78vh; }
  .btn.lg { padding: 10px 16px; font-size: 16px; }
  .pieces { grid-template-columns: 1fr; }
  .u-grid { grid-template-columns: 1fr; }
  .bar .btn { padding: 6px 12px; }
}
