/* Front matter for the four project-page layouts. */
.rt-publication {
  --pub-ink: #243e39;
  --pub-muted: #485b53;
  --pub-rule: #aab9b0;
  color: var(--pub-ink);
  width: 100%;
  max-width: 53rem;
  margin: 1.3rem 0;
  font-family: inherit;
}
.blog-intro .rt-publication {
  --pub-ink: var(--rt-text, #203b3e);
  --pub-muted: var(--rt-muted, #46615f);
  --pub-rule: var(--rt-line, #b9cdc9);
}
.publication-header .rt-publication {
  --pub-ink: #193b4a;
  --pub-muted: #4e5d63;
  --pub-rule: #acb9bd;
  margin-inline: auto;
}
.home-info .rt-publication {
  --pub-ink: var(--primary);
  --pub-muted: var(--secondary);
  --pub-rule: color-mix(in srgb, var(--primary) 40%, transparent);
}
.rt-publication .rt-authors, .rt-publication .rt-institutions,
.rt-publication .rt-author-notes, .rt-publication .rt-resources {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}
.publication-header .rt-publication > * { justify-content: center; }
.rt-publication .rt-authors {
  gap: .22em .88em;
  font: 570 clamp(1rem, 1.22vw, 1.18rem)/1.5 system-ui, sans-serif;
}
.rt-author { white-space: nowrap; }
.rt-publication .rt-author a { color:inherit; font:inherit; text-decoration:none; text-underline-offset:.2em; }
.rt-publication .rt-author a:hover { color:var(--rt-accent,var(--pub-ink)); text-decoration:underline; }
.rt-publication .rt-author a:focus-visible { outline:2px solid var(--rt-accent,var(--pub-ink)); outline-offset:3px; border-radius:2px; }
.rt-publication sup {
  position: relative;
  top: -.43em;
  vertical-align: baseline;
  font: 500 .65em/0 system-ui, sans-serif;
  margin-inline-start: .13em;
}
.rt-publication .rt-institutions, .rt-publication .rt-author-notes {
  color: var(--pub-muted);
  font: 400 .83rem/1.55 system-ui, sans-serif;
}
.rt-publication .rt-institutions { gap: .14em 1em; margin: .45rem 0 .2rem; }
.rt-institution sup { margin: 0 .23em 0 0; }
.rt-publication .rt-author-notes { gap: 0 1.05em; font-size: .78rem; }
.rt-institution-logos {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center;
  gap:1.25rem 2.5rem; margin:1.5rem 0 1.35rem;
}
/* Optical sizing: circular university seals need more room than wordmarks. */
.rt-logo-sjtu { --logo-width:96px; }
.rt-logo-sharpa { --logo-width:142px; }
.rt-logo-shlab { --logo-width:123px; }
.rt-logo-ustc { --logo-width:100px; }
.rt-institution-logos > span { display:flex; align-items:center; justify-content:center; justify-self:center; width:var(--logo-width); max-width:100%; min-width:0; min-height:72px; }
.rt-institution-logos img { display:block; width:100%; max-width:100%; height:auto; object-fit:contain; }
.blog-intro .rt-publication .rt-institution-logos img { padding:0; margin:0; }
.rt-institution-logos .rt-logo-ustc img { height:var(--logo-width); object-fit:contain; }
.rt-logo-ustc .rt-logo-on-light { mix-blend-mode:multiply; }
.rt-logo-ustc .rt-logo-on-dark { filter:invert(1); mix-blend-mode:screen; }
.rt-institution-logos .rt-logo-on-dark { display:none; }
html[data-theme=dark] .rt-institution-logos .rt-logo-on-light { display:none; }
html[data-theme=dark] .rt-institution-logos .rt-logo-on-dark { display:block; }
html[data-theme=dark] .rt-institution-logos .rt-logo-monochrome { filter:brightness(0) invert(1); }
@media(max-width:620px) {
  .rt-institution-logos { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem 1.3rem; max-width:25rem; margin-inline:auto; }
}
.rt-publication .rt-resources {
  align-items: stretch;
  gap: .45rem;
  margin-top: 2.75rem;
}
.rt-publication .rt-resources .rt-resource {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: auto;
  margin: 0;
  padding: .54rem .86rem;
  min-height: 2.45rem;
  border-radius: .5rem;
  border: 1px solid var(--pub-rule);
  background: transparent;
  color: var(--pub-ink);
  font: 600 .89rem/1.1 system-ui, sans-serif;
  text-decoration: none;
  box-shadow: none;
  min-width: 0;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
}
.rt-publication .rt-resources .rt-primary {
  background: var(--pub-ink);
  color: #fff;
  border-color: var(--pub-ink);
}
.home-info .rt-publication .rt-resources .rt-primary { color: var(--theme); }
.rt-publication .rt-resources a.rt-resource { transition: background-color 160ms ease, border-color 160ms ease; }
.rt-publication .rt-resources a.rt-resource:hover {
  text-decoration: none;
  background: var(--rt-inset, #e2eeeb);
  border-color: var(--rt-accent, var(--pub-ink));
}
.rt-publication .rt-resources a:focus-visible { outline: 2px solid var(--pub-ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .rt-publication .rt-resources a.rt-resource { transition: none; }
}
.rt-publication .rt-resources .rt-resource:disabled {
  opacity: 1;
  color: var(--pub-muted);
  border-style: dashed;
  cursor: default;
}
.rt-resource small { font: 400 .7rem/1.1 system-ui, sans-serif; }
@media (max-width: 540px) {
  .rt-publication .rt-authors { gap: .16em .72em; }
  .rt-publication .rt-resources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 24rem; }
  .rt-publication .rt-resources .rt-resource { padding-inline: .5rem; }
  .publication-header .rt-publication .rt-resources { margin-inline: auto; }
}
@media (max-width: 300px) {
  .rt-publication .rt-resources { grid-template-columns: minmax(0, 1fr); }
}
.rt-resource svg.rt-resource-icon {
  display: block;
  flex: 0 0 auto;
  inline-size: 1.12rem;
  block-size: 1.12rem;
  margin: 0;
  color: inherit;
}
@media (max-width: 540px) {
  .rt-publication .rt-resources .rt-resource:disabled {
    display: grid;
    grid-template-columns: auto auto;
    gap: .2rem .35rem;
    justify-content: center;
    align-content: center;
  }
  .rt-resource:disabled small { grid-column: 1 / -1; }
}
