/* Public commons — Public Commons register (scilence --s-commons-*).
   Path /commons/; /stacks/ 301s here. */

@import url('/scilence/tokens/index.css');
@import url('/css/brand-links.css');
@import url('/css/library-browse.css');

:root {
  /* Local aliases → scilence Public Commons register (fallbacks if tokens fail). */
  --st-bg: var(--s-commons-bg, oklch(99.2% 0.0015 185));
  --st-bg-subtle: var(--s-commons-bg-subtle, oklch(97.5% 0.002 185));
  --st-bg-inset: var(--s-commons-bg-inset, oklch(95.5% 0.0025 185));
  --st-border: var(--s-commons-border, oklch(87.5% 0.003 185));
  --st-border-muted: var(--s-commons-border-muted, oklch(92.5% 0.0025 185));
  --st-fg: var(--s-commons-fg, oklch(14% 0.004 185));
  --st-fg-muted: var(--s-commons-fg-muted, oklch(42% 0.006 185));
  --st-fg-subtle: var(--s-commons-fg-subtle, oklch(57% 0.007 185));
  --st-link: var(--s-commons-link, oklch(31% 0.015 185));
  --st-link-hover: var(--s-commons-link-hover, oklch(20% 0.012 185));
  --st-banner-bg: var(--st-bg-subtle);
  --st-mono: var(--s-commons-font-mono, ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace);
  --st-sans: var(--s-commons-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif);
  --st-radius: var(--s-commons-radius, 10px);
  --st-radius-sm: var(--s-commons-radius-sm, 6px);
  --st-space-1: var(--s-commons-space-1, 4px);
  --st-space-2: var(--s-commons-space-2, 8px);
  --st-space-3: var(--s-commons-space-3, 12px);
  --st-space-4: var(--s-commons-space-4, 16px);
  --st-space-5: var(--s-commons-space-5, 24px);
  --st-space-6: var(--s-commons-space-6, 40px);
  --st-space-7: var(--s-commons-space-7, 56px);
  --st-wide: var(--s-commons-wide, 1200px);
  /* Match marketing `--page-inline-inset` so the menu anchors to the nav rail */
  --st-inline-inset: max(
    var(--st-space-5),
    calc((100vw - var(--st-wide)) / 2 + var(--st-space-5))
  );
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--st-bg);
  color: var(--st-fg);
  font-family: var(--st-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--st-link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--st-link-hover); }

.st-app { min-height: 100vh; display: flex; flex-direction: column; }

.st-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--st-border);
  background: color-mix(in oklch, var(--st-bg) 92%, transparent);
  backdrop-filter: blur(10px);
}
.st-header--compact { border-bottom-color: var(--st-border-muted); }

.st-nav {
  background: transparent;
}
.st-nav__inner {
  max-width: var(--st-wide);
  margin: 0 auto;
  padding: var(--st-space-3) var(--st-space-5);
  display: grid;
  /* Reserved center track so trailing links cannot paint over search. */
  grid-template-columns: minmax(0, 1fr) minmax(9.5rem, 14rem) minmax(0, 1fr);
  align-items: center;
  column-gap: var(--st-space-4);
  min-height: 52px;
}
.st-nav__mark {
  grid-column: 1;
  justify-self: start;
  margin-right: 0;
  min-width: 0;
  z-index: 2;
}
.st-nav__center {
  grid-column: 2;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  max-width: none;
  z-index: 2;
  position: relative;
}
.st-nav__trailing {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--st-space-3);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  z-index: 1;
}
.st-nav__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius);
  background: var(--st-bg);
  cursor: pointer;
  flex-shrink: 0;
}
.st-nav__menu-icon,
.st-nav__menu-icon::before,
.st-nav__menu-icon::after {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--st-fg);
  position: relative;
}
.st-nav__menu-icon::before,
.st-nav__menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
}
.st-nav__menu-icon::before { top: -5px; }
.st-nav__menu-icon::after { top: 5px; }
.st-nav__mark {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--st-sans);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.035em;
  color: var(--st-fg);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}
/* Shared center search pill (also defined in site.css for marketing pages). */
.cs-header-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 34px;
  padding: 0 0.7rem 0 0.65rem;
  border: 1px solid var(--st-border-muted);
  border-radius: 999px;
  background: color-mix(in oklch, var(--st-bg) 88%, var(--st-fg) 4%);
  color: var(--st-fg-muted);
  font-family: var(--st-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.cs-header-search:hover {
  color: var(--st-fg);
  border-color: var(--st-border);
  background: var(--st-bg);
}
.cs-header-search__icon {
  flex: none;
  opacity: 0.75;
}
.cs-header-search__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-header-search__kbd {
  flex: none;
  font-family: var(--st-mono, ui-monospace, monospace);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.35rem;
  border-radius: 5px;
  border: 1px solid var(--st-border-muted);
  color: var(--st-fg-muted);
  background: color-mix(in oklch, var(--st-bg) 70%, transparent);
}
@media (max-width: 720px) {
  .cs-header-search__label,
  .cs-header-search__kbd { display: none; }
  .cs-header-search {
    width: 34px;
    min-width: 34px;
    padding: 0;
    justify-content: center;
  }
}
.st-nav__mark:hover { color: var(--st-fg); text-decoration: none; }
.st-nav__word { line-height: 1; }
.cs-mark-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-width: 0;
  line-height: 1;
}
.cs-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
  transform: translateY(0.02em);
}
.cs-mark__blob {
  display: block;
  width: 28px;
  height: 28px;
  overflow: visible;
}
.cs-mark__fluid {
  transform-origin: 16px 16px;
}
/* Settled flower in nav (static). Animated morph: Art Lab + commonscience-blob-animated.svg */
@media (max-width: 520px) {
  .cs-mark-lockup .st-nav__word,
  .cs-mark-lockup .mark__word { display: none; }
}
@media (max-width: 900px) {
  .st-nav--study .cs-mark-lockup .st-nav__word { display: none; }
}
.st-nav__links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--st-space-3);
  min-width: 0;
}
.st-nav__study {
  display: flex;
  align-items: center;
  gap: var(--st-space-3);
  flex: 1;
  min-width: 0;
}
/* Study mode keeps ecosystem links; study context sits beside them. */
.st-nav--study .st-nav__links { display: flex; }
.st-nav--study .st-nav__center {
  width: min(100%, 12rem);
}
.st-nav--study .st-nav__study {
  flex: 0 1 auto;
  max-width: min(28rem, 40vw);
}
.st-nav__study-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.st-nav__study-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--st-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.st-nav__study-author {
  font-size: 11px;
  color: var(--st-fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.st-nav__study-author a { color: inherit; }
.st-nav__study-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.st-nav__study-btn {
  font-family: var(--st-sans);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: -0.01em;
  color: var(--st-fg-muted);
  background: var(--st-bg);
  border: 1px solid var(--st-border-muted);
  border-radius: 999px;
  padding: 3px 9px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.st-nav__study-btn:hover {
  color: var(--st-fg);
  text-decoration: none;
  border-color: var(--st-border);
}
.st-nav__study-btn--primary {
  color: var(--st-bg);
  background: var(--st-fg);
  border-color: var(--st-fg);
}
.st-nav__study-btn--primary:hover { color: var(--st-bg); }
.st-nav__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--st-space-3);
  flex-shrink: 0;
}
.st-nav__link {
  font-family: var(--st-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--st-fg-muted);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.st-nav__link:hover,
.st-nav__link.is-current {
  color: var(--st-fg);
  text-decoration: none;
}
.st-nav__search-btn { font-weight: 550; }
.st-nav__cta {
  font-family: var(--st-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--st-bg);
  background: var(--st-fg);
  border: 1px solid var(--st-fg);
  border-radius: var(--st-radius);
  padding: 4px 10px;
  text-decoration: none;
}
.st-nav__cta:hover {
  background: oklch(24% 0.007 185);
  border-color: oklch(24% 0.007 185);
  color: var(--st-bg);
  text-decoration: none;
}
/* Inline is Commons · Writing only — drop Writing before icon-search collapse. */
@media (max-width: 960px) {
  .st-nav__links a:nth-child(n+2) { display: none; }
  .st-nav__inner {
    grid-template-columns: minmax(0, 1fr) minmax(8rem, 12rem) minmax(0, 1fr);
  }
}
@media (max-width: 900px) {
  .st-nav__links { display: none; }
  .st-nav__cta { display: none; }
  .st-nav--study .st-nav__study-author { display: none; }
}
@media (max-width: 720px) {
  .st-nav__inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .st-nav__center {
    width: auto;
    max-width: none;
    justify-self: center;
  }
}
@media (max-width: 640px) {
  .st-nav__study-btn:not(.st-nav__study-btn--primary) { display: none; }
}
@media (max-width: 380px) {
  .st-nav__actions .st-nav__link { display: none; }
}

.st-menu {
  /* Sibling of .st-header — must not sit under backdrop-filter */
  position: relative;
  z-index: 80;
}
.st-menu__backdrop {
  position: fixed;
  inset: 0;
  background: oklch(12% 0.02 185 / 0.42);
  z-index: 80;
}
.st-menu__panel {
  --st-menu-bg: oklch(14% 0.018 185);
  --st-menu-fg: oklch(92% 0.01 180);
  --st-menu-muted: oklch(68% 0.02 180);
  --st-menu-link: oklch(82% 0.06 175);
  position: fixed;
  /* Anchor to the nav rail (hamburger), not the viewport edge */
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(env(safe-area-inset-right, 0px), var(--st-inline-inset));
  bottom: auto;
  left: auto;
  z-index: 81;
  width: min(720px, calc(100vw - 2 * var(--st-inline-inset)));
  max-height: min(85vh, 640px);
  padding: 22px 22px 18px;
  background: var(--st-menu-bg);
  border: 1px solid oklch(28% 0.02 185);
  border-radius: 14px;
  box-shadow: 0 18px 48px oklch(8% 0.02 185 / 0.45);
  color: var(--st-menu-fg);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: auto;
  box-sizing: border-box;
}
.st-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.st-menu__brand {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  color: var(--st-menu-fg);
  line-height: 1.1;
}
button.st-menu__close {
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 4px 2px !important;
  margin: 0;
  font-family: var(--st-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--st-menu-muted) !important;
  cursor: pointer;
  line-height: 1.2;
}
button.st-menu__close:hover {
  color: var(--st-menu-fg) !important;
  background: transparent !important;
}
body.st-menu-open {
  overflow: hidden;
}
.st-menu__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 20px;
}
.st-menu__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.st-menu__hd {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--st-menu-muted);
}
.st-menu__col a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--st-menu-fg);
  text-decoration: none;
  line-height: 1.25;
}
.st-menu__col a:hover,
.st-menu__col a[aria-current="page"] {
  color: var(--st-menu-link);
  text-decoration: none;
}
.st-menu__foot {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid oklch(28% 0.02 185);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  flex-shrink: 0;
}
.st-menu__signin {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--st-menu-fg);
  text-decoration: none;
}
.st-menu__signin:hover { color: var(--st-menu-link); }
.st-menu__mail {
  font-size: 12px;
  color: var(--st-menu-muted);
  text-decoration: none;
}
.st-menu__mail:hover { color: var(--st-menu-fg); }
@media (max-width: 720px) {
  .st-menu__panel {
    top: max(8px, env(safe-area-inset-top, 0px));
    right: max(env(safe-area-inset-right, 0px), var(--st-inline-inset));
    left: max(env(safe-area-inset-left, 0px), var(--st-inline-inset));
    width: auto;
    max-height: min(90vh, 720px);
  }
  .st-menu__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .st-menu__cols { grid-template-columns: 1fr 1fr; }
}

/* Progressive inline-nav collapse — same priority as marketing (Docs→Media→GUIDE→Commons). */
@media (max-width: 1120px) {
  .st-nav__links .st-nav__link[data-nav-priority="4"] { display: none; }
}
@media (max-width: 960px) {
  .st-nav__links .st-nav__link[data-nav-priority="3"] { display: none; }
}
@media (max-width: 820px) {
  .st-nav__links .st-nav__link[data-nav-priority="2"] { display: none; }
}
@media (max-width: 680px) {
  .st-nav__links .st-nav__link[data-nav-priority="1"] { display: none; }
  .st-nav__links { display: none; }
}

.st-search-root { position: relative; z-index: 60; }
.st-search-palette {
  position: fixed;
  inset: 0;
  background: oklch(20% 0.01 185 / 0.28);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: min(10vh, 4.5rem) var(--st-space-4) var(--st-space-4);
}
.st-search-palette__panel {
  width: min(560px, 100%);
  max-height: min(82vh, 40rem);
  display: flex;
  flex-direction: column;
  background: var(--st-bg);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius);
  box-shadow: 0 16px 48px oklch(20% 0.02 185 / 0.12);
  overflow: hidden;
}
.st-search-palette__bar {
  display: flex;
  align-items: center;
  gap: var(--st-space-2);
  padding: 0.55rem var(--st-space-4);
  border-bottom: 1px solid var(--st-border-muted);
}
.st-search-palette__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--st-fg);
  outline: none;
}
.st-search-palette__close {
  border: 0;
  background: transparent;
  color: var(--st-fg-subtle);
  font-size: 11px;
  line-height: 1;
  padding: 0.25rem 0.15rem;
  cursor: pointer;
}
.st-search-palette__scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0.4rem var(--st-space-4);
  border-bottom: 1px solid var(--st-border-muted);
}
.st-search-scope {
  border: 1px solid var(--st-border-muted);
  border-radius: 999px;
  background: var(--st-bg);
  color: var(--st-fg-muted);
  font-size: 11px;
  font-weight: 550;
  line-height: 1.25;
  padding: 2px 9px;
  cursor: pointer;
}
.st-search-scope.is-on {
  color: var(--st-fg);
  border-color: var(--st-border);
  background: var(--st-bg-subtle);
}
.st-search-palette__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.2rem 0 0.55rem;
  scroll-padding-bottom: 0.55rem;
}
.st-search-palette__empty {
  margin: 0;
  padding: var(--st-space-3) var(--st-space-5);
  color: var(--st-fg-muted);
  font-size: 13px;
}
/* Reset global marketing `section { padding: … }` when both sheets load. */
.st-search-group {
  margin: 0;
  padding: 0;
}
.st-search-group__hd {
  margin: 0.55rem var(--st-space-5) 2px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-fg-subtle);
}
.st-search-group:first-child .st-search-group__hd {
  margin-top: 0.25rem;
}
.st-search-group__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.st-search-hit {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.4rem var(--st-space-5);
  text-decoration: none;
  color: inherit;
}
.st-search-hit:hover {
  background: var(--st-bg-subtle);
  text-decoration: none;
}
.st-search-hit__title {
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.02em;
  color: var(--st-fg);
}
.st-search-hit__blurb {
  font-size: 12px;
  color: var(--st-fg-muted);
  line-height: 1.3;
}

.st-banner {
  border-bottom: 1px solid var(--st-border-muted);
  background: var(--st-banner-bg);
  color: var(--st-fg-muted);
  font-family: var(--st-mono);
  font-size: 11px;
  letter-spacing: 0.01em;
}
.st-banner__inner {
  max-width: var(--st-wide);
  margin: 0 auto;
  padding: var(--st-space-2) var(--st-space-5);
}
.st-banner strong { color: var(--st-fg); font-weight: 650; }
.st-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--st-border);
  border-radius: 999px;
  background: var(--st-bg-subtle);
  color: var(--st-fg-muted);
  font-family: var(--st-sans);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.01em;
  line-height: 1.4;
  white-space: nowrap;
}
.st-chip--readonly {
  border-color: var(--st-border-muted);
  color: var(--st-fg-subtle);
}
.st-nb-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--st-space-2) var(--st-space-3);
}

.st-tabs {
  display: flex;
  gap: var(--st-space-4);
  border-bottom: 1px solid var(--st-border);
  max-width: var(--st-wide);
  margin: 0 auto;
  padding: 0 var(--st-space-5);
}
.st-tab {
  display: inline-block;
  padding: var(--st-space-4) var(--st-space-1);
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--st-fg-muted);
  font-size: 13px;
  font-weight: 550;
}
.st-tab:hover { color: var(--st-fg); text-decoration: none; border-bottom-color: var(--st-border); }
.st-tab[aria-current="page"] {
  color: var(--st-fg);
  border-bottom-color: var(--st-fg-muted);
}

.st-main {
  flex: 1;
  max-width: var(--st-wide);
  width: 100%;
  margin: 0 auto;
  padding: var(--st-space-6) var(--st-space-5) var(--st-space-7);
}
.st-main--browse {
  /* Same rail as `.st-nav__inner` / `.st-main` — keep header + content edges aligned */
  max-width: var(--st-wide);
}
.st-title {
  margin: 0 0 var(--st-space-3);
  font-family: var(--st-sans);
  font-size: 28px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.st-subtitle { margin: 0 0 var(--st-space-4); color: var(--st-fg-muted); font-size: 14px; font-weight: 400; }
.st-meta-row { display: flex; flex-wrap: wrap; gap: var(--st-space-3); margin-bottom: var(--st-space-4); color: var(--st-fg-muted); font-size: 11px; }

/* How to cite this study. Quiet by default — a citation is reference material,
   not a call to action — but the accession itself is mono and selectable,
   because its whole job is to be copied. Renders only when the study has an
   accession (489 of 492 commons studies have no ULID to promote), so there is
   no empty state to style. */
.st-cite { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--st-space-2); margin: 0 0 var(--st-space-4); font-size: 11px; color: var(--st-fg-muted); }
.st-cite__label { text-transform: uppercase; letter-spacing: .07em; font-size: 9.5px; }
/* The accession is a link now that /a/ resolves. It keeps `user-select: all`
   because copying it is still the primary act — a citation is copied far more
   often than it is clicked — so the underline is on hover only, and the click
   target does not fight the triple-click. */
.st-cite__id { font-family: var(--st-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 11px; color: var(--st-fg); user-select: all; text-decoration: none; border-bottom: 1px solid var(--st-border-muted); }
.st-cite__id:hover, .st-cite__id:focus-visible { border-bottom-color: currentColor; }
.st-cite__snap { color: var(--st-fg-muted); }
/* The fingerprint is the handle every study has, so it must be copyable too —
   but it is longer and less memorable than an accession, so it sits quieter. */
.st-cite__fp { font-family: var(--st-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 10.5px; color: var(--st-fg-muted); user-select: all; }
.st-tag {
  display: inline-block;
  padding: 0 var(--st-space-2);
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius);
  background: var(--st-bg-subtle);
  color: var(--st-fg-muted);
  font-size: 11px;
  line-height: 18px;
}
.st-actions { display: flex; flex-wrap: wrap; gap: var(--st-space-2); margin: var(--st-space-4) 0 var(--st-space-5); }
.st-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--st-space-2);
  padding: 8px 14px;
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-sm);
  background: var(--st-bg-subtle);
  color: var(--st-fg);
  font-family: var(--st-sans);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
}
.st-btn:hover { background: var(--st-bg-inset); text-decoration: none; color: var(--st-fg); }
.st-btn--primary {
  background: var(--st-fg);
  border-color: var(--st-fg);
  color: var(--st-bg);
}
.st-btn--primary:hover {
  background: oklch(24% 0.007 185);
  border-color: oklch(24% 0.007 185);
  color: var(--st-bg);
}
.st-btn--ghost { background: transparent; }

.st-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--st-space-4); }
@media (max-width: 768px) { .st-grid-2 { grid-template-columns: 1fr; } }

.st-panel {
  border-top: 1px solid var(--st-border);
  border-bottom: 1px solid var(--st-border);
  background: transparent;
  overflow: hidden;
}
.st-panel--featured { border-color: var(--st-border); }
.st-panel__hd {
  padding: var(--st-space-2) var(--st-space-3);
  border-bottom: 1px solid var(--st-border-muted);
  background: var(--st-bg-subtle);
  color: var(--st-fg-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.st-panel__bd { padding: var(--st-space-3); }
.st-pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--st-mono); font-size: 12px; line-height: 1.55; }
.st-ascii-box {
  margin: 0;
  padding: var(--st-space-3);
  border: 1px solid var(--st-border);
  background: var(--st-bg-subtle);
  font-family: var(--st-mono);
  font-size: 11px;
  line-height: 1.45;
  white-space: pre;
  overflow-x: auto;
}

.st-section { margin-top: var(--st-space-6); }
.st-section__hd {
  margin: 0 0 var(--st-space-2);
  font-family: var(--st-sans);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-fg-muted);
}
.st-section__lede {
  margin: 0 0 var(--st-space-4);
  font-size: 14px;
  color: var(--st-fg-muted);
  max-width: 36rem;
}

.st-card-list { display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-card-list.lb-results--grid,
.st-card-list--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--st-space-3);
}
@media (max-width: 640px) {
  .st-card-list.lb-results--grid,
  .st-card-list--grid { grid-template-columns: minmax(0, 1fr); }
}
.st-card-list.lb-results--grid .st-card,
.st-card-list--grid .st-card {
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius-sm);
  padding: var(--st-space-3) var(--st-space-4);
  background: var(--st-bg);
}
.st-card-list.lb-results--grid .st-card:last-child,
.st-card-list--grid .st-card:last-child { border-bottom: 1px solid var(--st-border-muted); }
.st-card-list.lb-results--grid .st-card__about,
.st-card-list--grid .st-card__about {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Windowed list for 400–1000 trails — only visible cards in DOM */
.st-card-list--virtual {
  position: relative;
  max-height: min(70vh, 720px);
  overflow-y: auto;
  gap: 0;
  border: 1px solid var(--st-border-muted);
  border-radius: 2px;
}
.st-card-list__spacer {
  width: 100%;
  pointer-events: none;
}
.st-card-list__window {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: var(--st-space-3);
  will-change: transform;
}
.st-card-list--virtual .st-card:first-child { border-top: none; }
.st-card {
  display: block;
  padding: var(--st-space-3) var(--st-space-4);
  border-top: 1px solid var(--st-border-muted);
  background: transparent;
  color: inherit;
  text-decoration: none;
}
.st-card:last-child { border-bottom: 1px solid var(--st-border-muted); }
.st-card:hover { background: var(--st-bg-subtle); text-decoration: none; }
.st-card__title {
  margin: 0 0 var(--st-space-1);
  font-family: var(--st-sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--st-fg);
}
.st-card:hover .st-card__title { text-decoration: underline; }
.st-card__meta { margin: 0 0 var(--st-space-2); color: var(--st-fg-muted); font-size: 11px; }
.st-card__about { margin: 0; color: var(--st-fg); font-size: 12px; }

.st-try-list { list-style: none; margin: 0; padding: 0; }
.st-try-item { padding: var(--st-space-2) 0; border-bottom: 1px solid var(--st-border-muted); }
.st-try-item:last-child { border-bottom: 0; }
.st-try-item a { font-weight: 600; }
.st-try-item__why { display: block; margin-top: 2px; color: var(--st-fg-muted); font-size: 11px; }

.st-explore {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 240px;
  gap: var(--st-space-3);
  min-height: 480px;
}
@media (max-width: 960px) { .st-explore { grid-template-columns: 1fr; } }

/* ── Story About (no left rail) ───────────────────────────────── */
.st-main--story { max-width: 1100px; }
.st-title--story {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.045em;
}
.st-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: var(--st-space-7);
  align-items: start;
}
@media (max-width: 900px) {
  .st-story { grid-template-columns: 1fr; }
}
.st-story-hero { margin-bottom: var(--st-space-7); }
.st-story-hero__invite {
  margin: 0 0 var(--st-space-5);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--st-fg);
  max-width: 40rem;
}
.st-story-hero__note {
  margin: var(--st-space-4) 0 0;
  font-size: 13px;
  color: var(--st-fg-muted);
  max-width: 40rem;
}
.st-steward-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--st-space-3);
  margin-bottom: var(--st-space-4);
}
.st-steward-col { display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-steward {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--st-space-3);
  padding: var(--st-space-3) var(--st-space-4);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius-sm);
  background: var(--st-bg);
  text-decoration: none;
  color: inherit;
}
.st-steward:hover { background: var(--st-bg-subtle); text-decoration: none; }
.st-steward__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-steward__name { font-weight: 600; font-size: 14px; letter-spacing: -0.02em; }
.st-steward__handle { font-family: var(--st-mono); font-size: 12px; font-weight: 500; color: var(--st-fg-muted); }
.st-steward__role { font-size: 12px; color: var(--st-fg-subtle); }

/* weird-little avatars */
.wl-avatar {
  --wl-size: 40px;
  display: inline-grid;
  place-items: center;
  width: var(--wl-size);
  height: var(--wl-size);
  flex: 0 0 var(--wl-size);
  border-radius: 22%;
  overflow: hidden;
  line-height: 0;
}
.wl-avatar--sm { --wl-size: 32px; }
.wl-avatar--md { --wl-size: 40px; }
.wl-avatar--lg { --wl-size: 56px; }
.wl-avatar--xl { --wl-size: 96px; }
.wl-avatar svg { display: block; width: 100%; height: 100%; }
.wl-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Brand ferroflower — keep multiply plates on a light ground; no cover-crop. */
.wl-avatar--brand .wl-avatar__img {
  object-fit: contain;
  background: #F7F7F5;
}
.st-team-list { display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-team {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--st-space-3) var(--st-space-4);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius-sm);
  background: var(--st-bg-subtle);
}
.st-team__name { font-weight: 600; font-size: 14px; letter-spacing: -0.02em; }
.st-team__role { font-size: 12px; color: var(--st-fg-muted); }
.st-team__note { font-size: 12px; color: var(--st-fg-subtle); line-height: 1.45; }
.st-mention {
  font-family: var(--st-mono);
  font-size: 0.95em;
  color: var(--st-fg);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.st-doi { font-family: var(--st-mono); font-size: 11px; }
.st-vtl {
  list-style: none;
  margin: 0 0 var(--st-space-5);
  padding: var(--st-space-3) 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--st-border);
  margin-left: 3.5rem;
}
.st-vtl__item {
  display: grid;
  grid-template-columns: 3.5rem 12px 1fr;
  gap: var(--st-space-2);
  align-items: baseline;
  margin-left: calc(-3.5rem - 2px);
  padding: var(--st-space-2) 0;
  cursor: pointer;
}
.st-vtl__item:hover .st-vtl__label,
.st-vtl__item.is-selected .st-vtl__label { text-decoration: underline; }
.st-vtl__year {
  font-family: var(--st-mono);
  font-size: 11px;
  color: var(--st-fg-muted);
  text-align: right;
}
.st-vtl__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--st-fg-muted);
  margin-top: 0.35em;
  justify-self: center;
}
.st-vtl__item.is-selected .st-vtl__dot { background: var(--st-fg); }
.st-vtl__label { font-size: 13px; }
.st-nb-digest {
  margin: 0 0 var(--st-space-6);
  padding: var(--st-space-4) var(--st-space-5);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius);
  background: var(--st-bg-subtle);
}
.st-nb-digest__line {
  margin: 0 0 var(--st-space-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--st-space-2) var(--st-space-3);
  align-items: baseline;
}
.st-nb-digest__kicker {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-fg-muted);
}
.st-nb-digest__counts {
  font-family: var(--st-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--st-fg);
}
.st-nb-digest__copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--st-fg-muted);
  max-width: 40rem;
}

/* ── Published timeline ─────────────────────────────────────────────────────
   The citable provenance artifact (2026-08-23 decision §3). Full width above
   the reading column. The SVG inside `.st-ptl__plot` is published bytes from
   commons/data/{slug}.json — this styles the frame around it and colours the
   marks through `currentColor`; it does not change what is drawn. */
.st-ptl {
  margin: 0 0 var(--st-space-6);
  padding: var(--st-space-5);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius);
  background: var(--st-bg-subtle);
  position: relative;
}
.st-ptl__hd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--st-space-3);
  margin-bottom: var(--st-space-4);
}
.st-ptl__kicker {
  font-family: var(--st-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--st-fg-muted);
}
.st-ptl__plot {
  color: var(--st-fg);
  line-height: 0;
}
.st-ptl__plot .s-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.st-ptl__plot .s-chart__cell.is-linked {
  cursor: pointer;
}
.st-ptl__plot .s-chart__cell.is-linked circle {
  transition: opacity 120ms ease;
}
.st-ptl__plot .s-chart__cell.is-linked:hover circle,
.st-ptl__plot .s-chart__cell.is-linked:focus-visible circle {
  opacity: 1;
}
.st-ptl__plot .s-chart__cell:focus-visible {
  outline: 2px solid var(--st-link);
  outline-offset: 2px;
}
.st-ptl__axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--st-mono);
  font-size: 12px;
  color: var(--st-fg-muted);
  margin-top: var(--st-space-2);
}
.st-ptl__note {
  margin: var(--st-space-2) 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--st-fg-subtle);
}
.st-ptl__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--st-space-3);
  margin-top: var(--st-space-4);
  padding-top: var(--st-space-3);
  border-top: 1px solid var(--st-border-muted);
}
.st-ptl__meta {
  margin: 0;
  font-size: 13px;
  color: var(--st-fg-muted);
}
.st-ptl__actions {
  display: flex;
  gap: var(--st-space-2);
  margin-left: auto;
}
.st-ptl__btn {
  font: inherit;
  font-size: 13px;
  padding: var(--st-space-1) var(--st-space-3);
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-sm);
  background: var(--st-bg);
  color: var(--st-fg);
  cursor: pointer;
}
.st-ptl__btn:hover { background: var(--st-bg-inset); }
.st-ptl__btn[aria-expanded='true'] {
  background: var(--st-bg-inset);
  border-color: var(--st-border);
}
.st-ptl__panel {
  margin-top: var(--st-space-4);
  padding-top: var(--st-space-4);
  border-top: 1px solid var(--st-border-muted);
}
.st-ptl__panel-hd {
  margin: 0 0 var(--st-space-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--st-fg-muted);
}
.st-ptl__panel-hd + * { margin-top: 0; }
.st-ptl__panel-p {
  margin: var(--st-space-3) 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--st-fg-muted);
}
.st-ptl__table-wrap {
  max-height: 20rem;
  overflow: auto;
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius-sm);
  background: var(--st-bg);
}
.st-ptl__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.st-ptl__table th,
.st-ptl__table td {
  padding: var(--st-space-2) var(--st-space-3);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--st-border-muted);
}
.st-ptl__table tr:last-child th,
.st-ptl__table tr:last-child td { border-bottom: 0; }
.st-ptl__table th {
  font-family: var(--st-mono);
  font-weight: 400;
  white-space: nowrap;
  color: var(--st-fg-muted);
  width: 1%;
}
.st-ptl__omits {
  margin: 0;
  padding-left: var(--st-space-5);
  font-size: 13px;
  line-height: 1.55;
  color: var(--st-fg-muted);
}
.st-ptl__omits li { margin-bottom: var(--st-space-2); }
.st-ptl__omits strong { color: var(--st-fg); font-weight: 600; }
.st-ptl__cite {
  margin: 0;
  padding: var(--st-space-3);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius-sm);
  background: var(--st-bg);
  font-family: var(--st-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--st-fg);
}
.st-ptl__panel-bd .st-ptl__btn { margin-top: var(--st-space-3); }
.st-ptl__tip {
  position: absolute;
  z-index: 5;
  max-width: 26rem;
  padding: var(--st-space-2) var(--st-space-3);
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-sm);
  background: var(--st-bg);
  color: var(--st-fg);
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
}

.st-story-timeline { margin-bottom: var(--st-space-7); }
.st-story-narrative { margin-top: var(--st-space-2); }
.st-story-foot {
  margin-top: var(--st-space-7);
  padding-top: var(--st-space-5);
  border-top: 1px solid var(--st-border-muted);
}
.st-story-block .st-figure {
  margin-top: var(--st-space-4);
}
.st-story-block {
  position: relative;
  margin: 0 0 var(--st-space-6);
  padding: var(--st-space-1) 0 var(--st-space-5);
  padding-right: 7.5rem; /* room for ai-sourced / ai-inferred chips */
  border-bottom: 1px solid var(--st-border-muted);
}
.st-honesty {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.st-honesty--top {
  position: absolute;
  top: var(--st-space-1);
  right: 0;
  max-width: none;
}
.st-honesty--bottom {
  position: absolute;
  bottom: var(--st-space-4);
  right: 0;
  max-width: none;
}
.st-honesty__chip {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--st-border-muted);
  border-radius: 999px;
  background: var(--st-bg-subtle);
  color: var(--st-fg-subtle);
  font-family: var(--st-sans);
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  text-transform: lowercase;
  opacity: 0.85;
}
.st-honesty__chip--sourced {
  border-color: oklch(88% 0.01 185);
}
.st-honesty__chip--inferred {
  border-style: dashed;
}
@media (max-width: 640px) {
  .st-story-block { padding-right: 0; }
  .st-honesty--top,
  .st-honesty--bottom {
    position: static;
    max-width: none;
    justify-content: flex-start;
    margin: 0 0 var(--st-space-2);
  }
}
.st-story-block__hd {
  display: flex;
  align-items: baseline;
  gap: var(--st-space-3);
  margin-bottom: var(--st-space-3);
}
.st-story-block__year {
  font-family: var(--st-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--st-fg-muted);
  min-width: 3rem;
}
.st-story-block__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.st-story-block__body {
  margin: 0 0 var(--st-space-4);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--st-fg);
  max-width: 40rem;
}
.st-story-block__body p { margin: 0 0 var(--st-space-3); }
.st-aside-block { margin-bottom: var(--st-space-4); }
.st-aside-block__hd {
  margin: 0 0 var(--st-space-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-fg-muted);
}
.st-aside-block__bd { font-size: 12px; }
.st-ref-list { list-style: none; margin: 0; padding: 0; }
.st-ref { margin: 0 0 var(--st-space-3); }
.st-ref a { font-weight: 600; font-size: 12px; }
.st-ref__meta {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--st-fg-muted);
  line-height: 1.4;
}
.st-aside-pdb { margin: 0 0 var(--st-space-2); }
.st-figure {
  margin: 0 0 var(--st-space-4);
  padding: var(--st-space-3);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius);
  background: var(--st-bg);
}
.st-figure__frame {
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius-sm);
  background: oklch(96% 0.01 230);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.st-figure__frame--img { text-decoration: none; }
.st-figure__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: oklch(96% 0.01 230);
}
.st-figure--structure .st-figure__frame {
  max-width: 420px;
}
.st-figure__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.st-figure__cap {
  margin-top: var(--st-space-3);
  font-size: 12px;
  color: var(--st-fg-muted);
  line-height: 1.5;
}
.st-table-wrap {
  overflow-x: auto;
  margin: 0;
  border-radius: var(--st-radius-sm);
  border: 1px solid var(--st-border-muted);
}
.st-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--st-mono);
  font-size: 12px;
}
.st-table th,
.st-table td {
  border-bottom: 1px solid var(--st-border-muted);
  padding: 8px 10px;
  text-align: left;
}
.st-table tr:last-child td { border-bottom: 0; }
.st-table th { background: var(--st-bg-subtle); font-weight: 650; }
/* Notebook stream measure matches GUIDE calm editor column; page chrome
   (nav / hero / aside) stays Commons register. */
.st-main--notebook { max-width: 1100px; }
.st-nb-hero { margin-bottom: var(--st-space-6); }
.st-lineage {
  margin: var(--st-space-5) 0 var(--st-space-6);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius);
  padding: var(--st-space-3) var(--st-space-4);
  background: var(--st-bg-subtle);
}
.st-lineage summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  color: var(--st-fg-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  list-style: none;
}
.st-lineage summary::-webkit-details-marker { display: none; }
.st-lineage__bd { margin-top: var(--st-space-4); }
.st-notebook {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: var(--st-space-6);
  align-items: start;
}
@media (max-width: 900px) {
  .st-notebook { grid-template-columns: 1fr; }
}
.st-notebook__aside {
  position: sticky;
  top: var(--st-space-5);
}
.st-notebook__stream {
  /* GUIDE restraint stream column = 820px; gap = narrative comfortable --s-space-5 */
  display: flex;
  flex-direction: column;
  gap: var(--s-space-5, var(--st-space-5));
  max-width: 820px;
}
.st-portal-panel {
  margin-top: var(--st-space-3);
  padding: var(--st-space-4);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius);
  background: var(--st-bg-subtle);
}
.st-portal-panel__hd {
  margin: 0 0 var(--st-space-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.st-portal-status {
  margin-top: var(--st-space-3);
  padding: var(--st-space-4);
  border: 1px dashed var(--st-border);
  border-radius: var(--st-radius-sm);
  font-size: 13px;
  line-height: 1.5;
}
.st-cell__note { margin: var(--st-space-2) 0 0; font-size: 12px; color: var(--st-fg-muted); }
.st-main--person,
.st-main--account { max-width: 960px; }
.st-avatar-studio {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--st-space-5);
  align-items: center;
  padding: var(--st-space-5);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius);
  background: var(--st-bg);
}
@media (max-width: 640px) {
  .st-avatar-studio { grid-template-columns: 1fr; }
}
.st-avatar-studio__preview { line-height: 0; }
.st-btn--file { cursor: pointer; }
.st-account-form {
  display: flex;
  flex-direction: column;
  gap: var(--st-space-4);
  max-width: 28rem;
}
.st-field { display: flex; flex-direction: column; gap: var(--st-space-2); }
.st-field__label {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--st-fg-muted);
}
.st-field__input {
  font-family: var(--st-sans);
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-sm);
  background: var(--st-bg);
  color: var(--st-fg);
}
.st-field__input--area { resize: vertical; min-height: 6rem; line-height: 1.5; }
.st-field__input:focus {
  outline: 2px solid oklch(70% 0.02 185);
  outline-offset: 1px;
}
.st-mono-inline {
  font-family: var(--st-mono);
  font-size: 12px;
}
.st-person {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: var(--st-space-7);
  align-items: start;
}
@media (max-width: 800px) {
  .st-person { grid-template-columns: 1fr; }
}
.st-person-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--st-space-5);
  margin-bottom: var(--st-space-6);
}
.st-person-hero__mark { flex: 0 0 auto; }
.st-person-hero__copy { flex: 1 1 16rem; min-width: 0; }
.st-title--person {
  font-size: clamp(1.85rem, 3.2vw, 2.4rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  margin-bottom: var(--st-space-2);
}
.st-person-hero__handle {
  margin: 0 0 var(--st-space-2);
  font-family: var(--st-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--st-fg-muted);
}
.st-person-hero__aff {
  margin: 0 0 var(--st-space-4);
  font-size: 15px;
  font-weight: 500;
  color: var(--st-fg-muted);
}
.st-person-hero__bio {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  max-width: 38rem;
}
.st-person-hero__note {
  margin: 0;
  font-size: 13px;
  color: var(--st-fg-subtle);
  max-width: 42rem;
}
.st-person-section--studies { margin-top: var(--st-space-2); }
.st-person-section--studies .st-section__hd {
  font-size: 13px;
  color: var(--st-fg);
}
.st-study-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--st-space-4);
}
.st-study-card {
  padding: var(--st-space-5);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius);
  background: var(--st-bg);
  box-shadow: 0 1px 0 oklch(0% 0 0 / 0.03);
}
.st-study-card__title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--st-fg);
  text-decoration: none;
}
.st-study-card__title:hover { text-decoration: underline; }
.st-study-card__about {
  margin: var(--st-space-2) 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--st-fg-muted);
  max-width: 40rem;
}
.st-person__aside {
  display: flex;
  flex-direction: column;
  gap: var(--st-space-5);
  padding-top: var(--st-space-1);
}
.st-person-section--quiet .st-profile-links,
.st-person-section--quiet .st-ref-list,
.st-person-section--quiet .st-team-list {
  opacity: 0.92;
}
.st-person-section--quiet .st-profile-links {
  grid-template-columns: 1fr;
}
.st-person-foot {
  margin-top: var(--st-space-7);
  padding-top: var(--st-space-5);
  border-top: 1px solid var(--st-border-muted);
}
.st-profile-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--st-space-3);
}
.st-profile-links--extra { margin-top: var(--st-space-3); }
.st-profile-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--st-space-3) var(--st-space-4);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius-sm);
  text-decoration: none;
  color: inherit;
  background: var(--st-bg);
  min-height: 3.5rem;
}
a.st-profile-link:hover {
  background: var(--st-bg-subtle);
  text-decoration: none;
}
.st-profile-link--claimable {
  border-style: dashed;
  color: var(--st-fg-subtle);
}
.st-profile-link__kind {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.st-profile-link__handle {
  font-family: var(--st-mono);
  font-size: 11px;
  color: var(--st-fg-muted);
}

.st-tl-list { list-style: none; margin: 0; padding: 0; }
.st-tl-item { padding: var(--st-space-2) 0; border-bottom: 1px solid var(--st-border-muted); cursor: pointer; }
.st-tl-item:last-child { border-bottom: 0; }
.st-tl-item:hover, .st-tl-item[aria-selected="true"] {
  background: var(--st-bg-subtle);
  margin: 0 calc(-1 * var(--st-space-3));
  padding-left: var(--st-space-3);
  padding-right: var(--st-space-3);
}
.st-tl-item__kind { display: inline-block; min-width: 4.5em; color: var(--st-fg-subtle); font-size: 10px; text-transform: uppercase; }
.st-tl-item__label { display: block; margin-top: 2px; color: var(--st-fg); font-size: 11px; }
.st-tl-item__when { color: var(--st-fg-subtle); font-size: 10px; }

/* Stream cells ≈ GUIDE `.nbclean` / calm inset — not cards.
   Edit vs read = chrome only (caret / focus wash / grips in GUIDE; readonly chip here). */
.st-cell {
  position: relative;
  margin: 0;
  padding: var(--s-space-3, 8px);
  padding-right: calc(var(--s-space-3, 8px) + 6.5rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.st-cell .st-honesty--top {
  top: var(--s-space-2, 5px);
  right: 0;
}
@media (max-width: 640px) {
  .st-cell { padding-right: var(--s-space-3, 8px); }
}
.st-cell__kind {
  color: var(--st-fg-subtle);
  font-family: var(--st-mono);
  font-size: 10px;
  font-weight: var(--s-font-weight-medium, 550);
  letter-spacing: 0.02em;
  text-transform: none;
}
/* Clean prose hides kind chrome (GUIDE clean hides outer __hd) */
.st-cell--markdown .st-cell__kind,
.st-cell--prose .st-cell__kind,
.st-cell--text .st-cell__kind,
.st-cell--section-header .st-cell__kind {
  display: none;
}
.st-cell__title {
  margin: var(--s-space-1, 3px) 0 var(--s-space-2, 5px);
  font-size: 15px;
  font-weight: var(--s-font-weight-semibold, 600);
  letter-spacing: -0.01em;
  color: var(--st-fg);
  line-height: 1.3;
}
.st-cell__body {
  margin: 0;
  color: var(--s-color-fg-secondary, var(--st-fg-muted));
  font-size: 15px;
  line-height: 1.62;
  white-space: pre-wrap;
}
/* Widget / code surfaces — light box like GUIDE `.nbc-surface--box` */
.st-cell--cas-sar,
.st-cell--data,
.st-cell--portal,
.st-cell--code,
.st-cell--compute {
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius-sm);
  background: var(--st-bg);
  padding-block: var(--s-space-2, 5px);
}
.st-cell--portal {
  background: var(--st-bg-subtle);
}
.st-cell--section-header {
  border: 0;
  box-shadow: none;
  padding: var(--s-space-5, 21px) 0 var(--s-space-2, 5px);
  background: transparent;
  padding-right: 0;
}
.st-cell--section-header .st-cell__title {
  font-size: 20px;
  font-weight: var(--s-font-weight-semibold, 600);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.st-cell__portal-hint {
  margin: var(--s-space-2, 5px) 0 0;
  font-size: 12px;
  color: var(--st-fg-subtle);
}
.st-cell__body--code {
  margin: var(--s-space-3, 8px) 0 0;
  padding: var(--s-space-3, 8px);
  border: 1px solid var(--st-border-muted);
  border-radius: var(--st-radius-sm);
  background: var(--st-bg-inset);
  color: var(--st-fg);
  font-family: var(--st-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
  overflow-x: auto;
}

.st-kv { margin: 0; font-size: 11px; }
.st-kv dt { color: var(--st-fg-subtle); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; margin-top: var(--st-space-2); }
.st-kv dt:first-child { margin-top: 0; }
.st-kv dd { margin: 2px 0 0; color: var(--st-fg); }

.st-footer {
  --st-foot-bg: oklch(18% 0.016 185);
  --st-foot-fg: oklch(94% 0.004 185);
  --st-foot-muted: oklch(72% 0.007 185);
  --st-foot-edge: oklch(32% 0.02 185);
  --st-foot-accent: oklch(78% 0.05 175);
  border-top: none;
  margin-top: var(--st-space-6);
  padding: clamp(36px, 6vh, 56px) clamp(20px, 4vw, 40px) clamp(20px, 3vh, 28px);
  background: var(--st-foot-bg);
  color: var(--st-foot-fg);
  font-size: 12px;
}
.st-footer__top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--st-space-2);
  margin-bottom: var(--st-space-4);
  max-width: 1100px;
}
.st-footer__mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--st-foot-fg);
  text-decoration: none;
  font-family: var(--st-sans);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.st-footer__mark:hover { color: var(--st-foot-fg); text-decoration: none; }
.st-footer__mark .cs-mark__blob { width: 18px; height: 18px; }
.st-footer__word { line-height: 1; }
@media (max-width: 360px) {
  .st-footer__mark .st-footer__word { display: none; }
}
.st-footer__note {
  margin: 0;
  max-width: 28ch;
  color: var(--st-foot-muted);
  line-height: 1.45;
  font-size: 13px;
}
.st-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--st-space-4);
  margin-bottom: var(--st-space-4);
  max-width: 1100px;
}
@media (max-width: 720px) {
  .st-footer__cols { grid-template-columns: 1fr 1fr; }
}
.st-footer__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.st-footer__hd {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--st-foot-muted);
}
.st-footer__col a {
  color: var(--st-foot-fg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.st-footer__col a:hover { color: var(--st-foot-accent); }
.st-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--st-space-2) var(--st-space-4);
  padding-top: var(--st-space-3);
  border-top: 1px solid var(--st-foot-edge);
  max-width: 1100px;
  color: var(--st-foot-muted);
}
.st-footer__bottom a {
  color: var(--st-foot-muted);
  font-weight: 500;
  text-decoration: none;
}
.st-footer__bottom a:hover { color: var(--st-foot-fg); }
.st-error { padding: var(--st-space-4); border: 1px solid var(--st-border); background: var(--st-bg-subtle); color: var(--st-fg-muted); }

.st-commons-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--st-space-3);
  margin-bottom: var(--st-space-4);
}
.st-commons-head .st-title { margin-bottom: var(--st-space-1); }
.st-commons-head .st-subtitle { margin-bottom: 0; }

.st-search { margin: 0 0 var(--st-space-4); }
.st-search__input {
  width: 100%;
  max-width: 420px;
  padding: 6px 10px;
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius);
  background: var(--st-bg);
  color: var(--st-fg);
  font-family: var(--st-mono);
  font-size: 12px;
  line-height: 1.4;
}
.st-search__input:focus {
  outline: 2px solid color-mix(in oklch, var(--st-link) 45%, transparent);
  outline-offset: 1px;
}

.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;
}

/* —— Browse / filters —— */
.st-commons-hero { margin-bottom: var(--st-space-4); }
.st-browse-bar {
  display: flex;
  flex-direction: column;
  gap: var(--st-space-3);
  margin: 0 0 var(--st-space-5);
  padding-bottom: var(--st-space-4);
  border-bottom: 1px solid var(--st-border-muted);
}
.st-browse-bar .st-search { margin: 0; }
.st-browse-bar .st-search__input { max-width: 100%; }
/* Row rhythm matches .st-browse-bar / .lb-browse (see library-browse.css). */
.st-browse-bar__secondary {
  display: flex;
  flex-direction: column;
  gap: inherit;
}
.st-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--st-space-2, 0.5rem);
}
.st-chip {
  appearance: none;
  border: 1px solid var(--st-border);
  background: var(--st-bg);
  color: var(--st-fg-muted);
  font-family: var(--st-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.st-chip:hover { color: var(--st-fg); border-color: var(--st-fg-subtle); }
.st-chip.is-active {
  background: var(--st-fg);
  border-color: var(--st-fg);
  color: var(--st-bg);
}
.st-browse-count {
  margin: 0;
  color: var(--st-fg-muted);
  font-size: 11px;
}

.st-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--st-space-3);
}
.st-card__field {
  flex: none;
  font-family: var(--st-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--st-fg-muted);
}
.st-card__hint {
  display: inline-block;
  margin-top: var(--st-space-2);
  font-size: 11px;
  color: var(--st-fg-subtle);
}
.st-card.is-selected {
  background: var(--st-bg-subtle);
  box-shadow: inset 3px 0 0 var(--st-fg);
}

/* —— List + inspector browse layout —— */
.st-browse-layout {
  display: block;
}
.st-browse-layout__primary {
  min-width: 0;
  transition: padding-right 160ms ease;
}
/* Desktop + tablet: full-height side drawer; leave room so the list isn't covered. */
@media (min-width: 641px) {
  .st-browse-layout.is-open .st-browse-layout__primary {
    padding-right: min(440px, 42vw);
  }
  .st-browse-layout.is-open .st-card__about,
  .st-browse-layout.is-open .st-card__hint {
    display: none;
  }
  .st-browse-layout.is-open .st-card {
    padding-top: var(--st-space-2);
    padding-bottom: var(--st-space-2);
  }
  .st-browse-layout.is-open .st-card-list--virtual {
    max-height: min(78vh, 820px);
  }
  .st-browse-layout.is-open .st-inspector {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 42vw);
    z-index: 70;
    min-width: 0;
  }
  .st-browse-layout.is-open .st-inspector__backdrop {
    display: none;
  }
  .st-browse-layout.is-open .st-inspector__panel {
    height: 100%;
    max-height: none;
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--st-border);
    box-shadow: -12px 0 40px oklch(14% 0.01 185 / 0.1);
  }
}

.st-inspector {
  min-width: 0;
}
.st-inspector__backdrop {
  display: none;
}
.st-inspector__panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--st-bg);
  border: 1px solid var(--st-border);
  border-radius: 10px;
  box-shadow: 0 10px 36px oklch(14% 0.01 185 / 0.08);
  overflow: hidden;
}
.st-inspector__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--st-space-3);
  padding: var(--st-space-3) var(--st-space-4);
  border-bottom: 1px solid var(--st-border-muted);
  background: var(--st-bg-subtle);
  flex-shrink: 0;
}
.st-inspector__kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-fg-muted);
}
.st-inspector__actions {
  flex-shrink: 0;
  padding: var(--st-space-3) var(--st-space-4);
  border-bottom: 1px solid var(--st-border-muted);
  background: var(--st-bg);
}
.st-inspector__actions .st-actions {
  margin: 0;
  flex-wrap: wrap;
}
.st-inspector__bd {
  padding: var(--st-space-4);
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.st-inspector__title {
  margin: 0 0 var(--st-space-2);
  font-family: var(--st-sans);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--st-fg);
}
.st-inspector__about {
  margin: var(--st-space-3) 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--st-fg);
}
.st-inspector__sub {
  margin: var(--st-space-4) 0 var(--st-space-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-fg-muted);
}
.st-inspector__list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--st-fg);
  font-size: 13px;
}
.st-inspector__list li { margin: 0 0 var(--st-space-2); }
.st-inspector__year {
  color: var(--st-fg-muted);
  margin-right: 0.35rem;
}
.st-inspector__honesty {
  margin: var(--st-space-3) 0 0;
  color: var(--st-fg-muted);
  font-size: 11px;
}
.st-inspector__near {
  margin: 0;
  padding: 0;
  list-style: none;
}
.st-inspector__near li {
  margin: 0 0 var(--st-space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.st-inspector__near a {
  font-weight: 550;
  letter-spacing: -0.02em;
  color: var(--st-fg);
  text-decoration: none;
}
.st-inspector__near a:hover { color: var(--st-link); }
.st-inspector__near-why {
  font-size: 11px;
  color: var(--st-fg-muted);
}

/* Phone: inspector becomes a bottom sheet over the list */
@media (max-width: 640px) {
  .st-browse-layout.is-open .st-browse-layout__primary {
    padding-right: 0;
  }
  .st-browse-layout.is-open .st-inspector {
    position: fixed;
    inset: 0;
    width: auto;
    z-index: 85;
  }
  .st-browse-layout.is-open .st-inspector__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: oklch(14% 0.01 185 / 0.4);
  }
  .st-browse-layout.is-open .st-inspector__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: auto;
    max-height: min(88vh, 760px);
    border-radius: 14px 14px 0 0;
    border: none;
    border-top: 1px solid var(--st-border);
    box-shadow: 0 -12px 40px oklch(14% 0.01 185 / 0.18);
    animation: st-inspector-sheet-in 180ms ease-out;
  }
  body.st-inspector-open { overflow: hidden; }
}
@keyframes st-inspector-sheet-in {
  from { transform: translateY(18px); opacity: 0.7; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 560px) {
  .st-card__top { flex-direction: column; align-items: flex-start; gap: var(--st-space-1); }
  .st-browse-layout.is-open .st-inspector__panel {
    max-height: 92vh;
    border-radius: 12px 12px 0 0;
  }
}
