/* Keep the source and its selected figure together in the research workspace. */
#workbench {
  grid-template-columns: 186px minmax(0, 1fr);
  background: #f3f6fa;
}
#filings {
  max-height: calc(100dvh - 280px);
  overflow: auto;
}
#workbench .workspace {
  padding: 20px 28px;
  background: #fff;
}
.filing-header h1 {
  font: 600 28px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.5px;
}
.filing-header #metrics {
  display: none;
}
.reading-layout:has(#detail:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
}
#detail {
  padding: 20px;
  border-top: 4px solid #16766d;
  border-radius: 8px;
  background: #f4f8f7;
}
#detail-value {
  font-size: 30px;
  letter-spacing: -.5px;
}
#detail-period {
  font-size: 13px;
  line-height: 1.6;
}
#detail #related {
  background: #16766d;
  border-color: #16766d;
  color: #fff;
  padding: 12px;
  font-weight: 600;
}
#detail #related:hover {
  background: #105d56;
}
#detail #open-source {
  background: #fff;
  border-color: #b8ccc7;
  color: #173052;
}
.reading-main:has(#related-panel:not([hidden])) #panel {
  display: none;
}
#related-panel {
  scroll-margin-top: 16px;
}
.related-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin: 20px 0 14px;
}
#related-panel .related-heading h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -.4px;
}
.related-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
#related-caption {
  padding: 12px 14px;
  background: #f3f6fa;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.6;
}
#related-history {
  margin: 18px 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
#related-history-summary {
  font-size: 14px;
}
#related-panel .related-card {
  padding: 20px;
  border-radius: 6px;
  border-top: 3px solid #16766d;
}
#related-panel .related-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.4;
}
#related-panel .related-card > button {
  color: #16766d;
  border-color: #b8ccc7;
  font-weight: 600;
}
#related-panel .selected-figure td {
  background: #e2f2ed;
}
#related-panel .focused-excerpt:not(.show-neighbors) tbody tr:not(.selected-figure) {
  display: none;
}
#related-panel .figure-period {
  font-size: 10px;
  line-height: 1.4;
  margin: 2px 0 8px;
}
#related-panel .related-card > .context-toggle {
  margin-left: 8px;
  border-color: transparent;
  color: var(--muted);
}
.toolbar {
  margin-bottom: 12px;
}
#reader-note {
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 1100px) {
  .reading-layout:has(#detail:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }
  .reading-layout:has(#related-panel:not([hidden])) #detail {
    position: static;
    width: auto;
    max-height: none;
    box-shadow: none;
  }
}
@media (max-width: 700px) {
  #workbench {
    display: block;
  }
  #workbench .workspace {
    padding: 16px;
  }
  .related-heading {
    flex-direction: column;
  }
  #detail {
    padding: 14px;
  }
  #detail-value {
    font-size: 25px;
  }
  #detail #related {
    grid-column: 1 / -1;
  }
  #related-panel .related-card {
    padding: 12px;
  }
  #related-panel .related-card > button {
    display: block;
    width: 100%;
    margin: 8px 0 0;
  }
}
