/* Nerfies project-page styles (https://github.com/nerfies/nerfies.github.io), plus the catalog. */

:root {
  --grape: #8E5BA6;          /* ripe */
  --grape-light: #D2AEE3;    /* ripening */
  --leaf: #B9D67E;           /* unripe */
  --ink: #2a2230;
  --muted: #5d5566;
  --line: #e6e1ea;
  --tint: #f8f6fa;
  --link: #6a3d82;
  color-scheme: light;
}

body {
  font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}

a { color: var(--link); }
a:hover { color: #4b2a5e; text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 40;
  background: #fff;
  padding: .5rem .75rem;
  border: 2px solid var(--grape);
  border-radius: 6px;
}
.skip-link:focus { top: .5rem; }

.navbar { box-shadow: 0 2px 4px rgba(0, 0, 0, .1); }
.navbar, .navbar-container, .navbar-brand { min-height: 82px; }
.navbar-brand .navbar-item img { max-height: 40px; }
/* the bar follows the container widths of the DRAGONS homepage, so the logo sits where it does there */
.navbar-container { width: 100%; max-width: none; margin: 0 auto; padding: 0 .75rem; }
.navbar-container .navbar-brand { margin-left: -.75rem; }
@media screen and (min-width: 576px) { .navbar-container { max-width: 540px; } }
@media screen and (min-width: 768px) { .navbar-container { max-width: 720px; } }
@media screen and (min-width: 992px) { .navbar-container { max-width: 960px; } }
@media screen and (min-width: 1200px) { .navbar-container { max-width: 1140px; } }
@media screen and (min-width: 1400px) { .navbar-container { max-width: 1320px; } }
@media screen and (max-width: 1023px) { .navbar-menu { margin: 0 -.75rem; } }
.navbar-burger { align-self: center; background: none; border: 0; padding: 0; color: var(--ink); }
.navbar-link { font-weight: 600; color: var(--ink); }
.navbar-link:not(.is-arrowless)::after { border-color: var(--link); }
.navbar-dropdown a.navbar-item { display: block; border-radius: 6px; padding: .55rem .85rem; white-space: normal; }
@media screen and (min-width: 1024px) {
  .navbar-container { display: grid; grid-template-columns: 1fr auto 1fr; }
  .navbar-container .navbar-brand { justify-self: start; }
  .navbar-container .navbar-menu { margin-right: 0; }
  .navbar-link { padding-left: 1.125em; }
  .navbar-dropdown { left: 50%; transform: translateX(-50%); border-top: 0; border-radius: 10px; box-shadow: 0 10px 30px rgba(42, 34, 48, .14); padding: .4rem; min-width: 28rem; }
}
.navbar-title { display: block; font-weight: 600; color: var(--ink); }
.navbar-note { display: block; font-size: .8rem; color: var(--muted); }
a.navbar-item:hover,
.navbar-link:hover,
.navbar-item.has-dropdown:hover .navbar-link,
.navbar-item.has-dropdown:focus-within .navbar-link,
.navbar-dropdown a.navbar-item:hover { color: var(--link); background-color: var(--tint); text-decoration: none; }
.navbar-dropdown a.navbar-item:hover .navbar-title { color: var(--link); }

.publication-title {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  text-wrap: balance;
  line-height: 1.2;
}

.publication-authors {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  margin-top: .75rem;
}

.publication-affiliations { color: var(--muted); }

.author-block {
  display: inline-block;
  margin: 0 .2rem;
}

.publication-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}

.publication-links .button .icon svg { width: 1em; height: 1em; }

.section-tint { background: var(--tint); }

.lede {
  max-width: 48rem;
  margin: 0 auto 1.25rem;
  color: var(--muted);
}

/* readiness badges, colors of Figure 1 */
.badge {
  display: inline-block;
  padding: .05em .55em .1em;
  border-radius: 999px;
  font-size: .85em;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: baseline;
}
.badge.ripe { background: #8E5BA6; color: #fff; }
.badge.ripening { background: #D2AEE3; color: #2b1836; }
.badge.unripe { background: #B9D67E; color: #1f2d08; }

/* tables: each scrolls inside its own container */
.table-wrap {
  text-align: left;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table-wrap table { margin-bottom: 0; }

.data-table {
  width: 100%;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}
.data-table thead th {
  white-space: nowrap;
  background: #fbfafc;
  color: var(--ink);
}
.data-table td, .data-table th { vertical-align: top; }

#catalog-wrap .data-table { min-width: 880px; }

.sort-button {
  all: unset;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.sort-button:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; border-radius: 3px; }
.sort-button .arrow { color: #a99bb3; font-size: .8em; }
th[aria-sort="ascending"] .arrow, th[aria-sort="descending"] .arrow { color: var(--grape); }

.dataset-name { font-weight: 600; }
.expand-button {
  all: unset;
  cursor: pointer;
  font-weight: 600;
  color: var(--link);
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
}
.expand-button:hover { text-decoration: underline; }
.expand-button:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; border-radius: 3px; }
.expand-button .chev { display: inline-block; transition: transform .15s; font-size: .75em; }
.expand-button[aria-expanded="true"] .chev { transform: rotate(90deg); }

.source-links { font-size: .8rem; margin-top: .15rem; }
.source-links a { margin-right: .6rem; white-space: nowrap; }

tr.detail > td { background: var(--tint); padding: 1rem 1.25rem 1.25rem; }

/* the dataset column stays in view while the catalog scrolls sideways */
#catalog-table tbody th[scope="row"], #catalog-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 1px 0 0 var(--line);
}
#catalog-table thead th:first-child { background: #fbfafc; }
#catalog-table tbody tr.dataset-row:hover th[scope="row"] { background: #fafafa; }
#catalog-table tbody th[scope="row"] { width: 16rem; min-width: 11rem; overflow-wrap: anywhere; }
.detail-name { font-size: 1.05rem; font-weight: 700; margin: 0 0 .75rem; }
.reason { color: var(--muted); font-size: .85rem; }
.detail-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 1rem 1.5rem;
}
.detail-group h5 {
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .35rem;
}
.detail-group dl {
  display: grid;
  grid-template-columns: minmax(9rem, 40%) 1fr;
  gap: .2rem .75rem;
  font-size: .88rem;
  margin: 0;
}
.detail-group dt { color: var(--muted); }
.detail-group dd { margin: 0; min-width: 0; }

.catalog-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  margin-bottom: .75rem;
}
.catalog-tools .label { margin-bottom: 0; font-size: .9rem; }
.catalog-count { color: var(--muted); font-size: .9rem; }

.correction { margin-top: 1rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; font-size: .9rem; }

/* figures */
.figure { margin: 0 0 2.75rem; }
.figure img { display: block; width: 100%; height: auto; max-width: 100%; }
.figure figcaption { font-size: .9rem; color: var(--muted); margin-top: .6rem; }

/* readiness tree */
.readiness-scroll { overflow-x: auto; }
.readiness-tree svg { display: block; width: 100%; min-width: 680px; height: auto; margin: 0 auto; }
.readiness-tree text { font-size: 15px; fill: var(--ink); text-anchor: middle; }
.readiness-tree .rt-sub { font-size: 13px; fill: var(--muted); }
.readiness-tree .rt-label { font-size: 13px; font-style: italic; fill: var(--muted); text-anchor: start; }
.readiness-tree .rt-edge { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.readiness-tree .rt-arrow { fill: var(--muted); }
.readiness-tree rect { stroke-width: 1.5; }
.readiness-tree .rt-q rect { fill: var(--tint); stroke: var(--muted); }
.readiness-tree .rt-leaf text { font-weight: 600; }
.readiness-tree .rt-leaf .rt-sub { font-weight: 400; fill: var(--ink); }
.readiness-tree .rt-ripening rect { fill: var(--grape-light); stroke: #5e3a7a; }
.readiness-tree .rt-ripe rect { fill: var(--grape); stroke: #3b1c4e; }
.readiness-tree .rt-ripe text { fill: #fff; }
.readiness-tree .rt-ripe .rt-sub { fill: #fff; }
.readiness-tree .rt-unripe rect { fill: var(--leaf); stroke: #4f6e2b; }

.readiness-list { display: none; list-style: none; margin: 0 auto; max-width: 30rem; text-align: left; }
.readiness-list ul { list-style: none; margin: .25rem 0 0 .5rem; padding-left: .9rem; border-left: 2px solid var(--line); }
.readiness-list li { margin-top: .6rem; }
.readiness-list .rl-a { display: block; font-size: .8rem; font-style: italic; color: var(--muted); }
.readiness-list .rl-q { display: block; background: var(--tint); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .7rem; }
.readiness-list .rl-sub { color: var(--muted); font-size: .85rem; }
.readiness-list .rl-leaf { display: inline-block; border-radius: 8px; padding: .3rem .7rem; font-weight: 600; }
.readiness-list .rl-ripening { background: var(--grape-light); }
.readiness-list .rl-ripe { background: var(--grape); color: #fff; }
.readiness-list .rl-unripe { background: var(--leaf); }

@media screen and (max-width: 768px) {
  .readiness-scroll { display: none; }
  .readiness-list { display: block; }
}

.content pre.bibtex { text-align: left; font-size: .8rem; background: var(--tint); border-radius: 8px; }

.has-text-justified { hyphens: auto; }
#submit p { margin-bottom: 1.25rem; }
#contact { padding-bottom: 1.5rem; }

.title-emoji { margin-right: .1em; }


.footer { font-size: .9rem; }

.notice { padding: 1rem; }

@media screen and (max-width: 768px) {
  .publication-title { font-size: 1.6rem !important; }
  .section { padding: 2.5rem 1rem; }
  .footer { padding-left: 1rem; padding-right: 1rem; }
  .detail-group dl { grid-template-columns: minmax(0, 1fr); }
  .detail-group dd { margin-bottom: .35rem; }
}

/* below desktop width the catalog scrolls; keep the opened column inside the visible part */
@media screen and (max-width: 1100px) {
  .detail-inner {
    position: sticky;
    left: 1.25rem;
    max-width: calc(100vw - 2rem - 2.5rem - 2px);
  }
}
@media screen and (min-width: 769px) and (max-width: 1100px) {
  .detail-inner { max-width: calc(100vw - 4rem - 2.5rem - 2px); }
}

.section-tint .figure img { border-radius: 8px; }
