.tree-table p,
.tree-table li,
.tree-table ul,
.tree-table ol,
.journal p,
.journal li,
.journal ul,
.journal ol {
  margin: 0;
  padding: 0;
}

.tree-table p,
.journal p {
  display: flex;
}

.tree-table p > span,
.journal p > span {
  flex-shrink: 0;
  margin: 0;
  padding: 2px 4px;
}

.tree-table .num,
.journal .num {
  color: var(--color-text);
  font-family: var(--font-family-monospaced);
  text-align: right;
}

.tree-table .number,
.journal .num {
  white-space: nowrap;
}

.tree-table .head p > span,
.journal .head p > span {
  background-color: var(--color-table-header-background);
  color: var(--color-table-header-text);
  padding: 3px 4px;
}

.tree-table .head .num,
.journal .head .num {
  background-color: var(--color-table-header-background);
  color: var(--color-table-header-text);
  font-family: var(--font-family);
  text-align: inherit;
}

.tree-table .totals p > span,
.journal .totals p > span {
  background-color: var(--color-table-header-background);
  color: var(--color-table-header-text);
}

.journal > li,
.journal.show-custom .custom.budget,
.journal.show-document .document.discovered,
.journal.show-document .document.linked,
.journal .metadata,
.journal .postings {
  display: none;
}

.journal .head,
.journal.show-balance .balance,
.journal.show-close .close,
.journal.show-custom .custom,
.journal.show-document .document,
.journal.show-note .note,
.journal.show-open .open,
.journal.show-pad .pad,
.journal.show-query .query,
.journal.show-metadata .metadata,
.journal.show-postings .postings,
.transaction.show-postings .postings,
.transaction.show-postings .metadata {
  display: block;
}

.journal.show-transaction.show-cleared .transaction.cleared,
.journal.show-transaction.show-pending .transaction.pending,
.journal.show-transaction.show-other .transaction.other,
.journal.show-document.show-discovered .document.discovered,
.journal.show-document.show-linked .document.linked,
.journal.show-custom.show-budget .custom.budget {
  display: block;
}

.journal p,
.journal dl {
  border-bottom: thin solid var(--color-table-border);
}

.journal .payee {
  cursor: pointer;
}

.journal .postings {
  background-color: var(--color-journal-postings);
  font-size: .9em;
  opacity: .8;
}

.journal .postings .num {
  line-height: 16px;
  overflow: hidden;
}

/* Metadata */
.journal dl {
  font-size: .9em;
  margin: 0;
  padding: 2px 0;
}

.journal dt {
  color: var(--color-journal-metadata);
  display: inline-block;
  float: left;
  margin-left: 9rem;
  min-width: 4rem;
  width: auto;
}

.journal dd {
  cursor: pointer;
  margin-left: 15rem;
}

.journal p > .num {
  border-left: 1px solid var(--color-table-border);
  width: 9rem;
}

.journal .datecell,
.journal .flag {
  background-color: var(--entry-type-color);
  text-align: center;
}

.journal .datecell {
  white-space: nowrap;
  width: 5.5rem;
}

.journal .flag {
  width: 3rem;
}

.journal .change {
  font-weight: 500;
}

.journal .description {
  align-items: center;
  display: flex;
  flex: 1;
  padding-left: 8px;
}

.journal .description .separator {
  background-color: var(--color-text-lighter);
  height: 4px;
  margin: 0 6px;
  padding: 2px;
  width: 4px;
}

.journal .description .account-link {
  margin-right: .5em;
}

.journal .description .num {
  margin: 0 5px;
}

.journal .tag,
.journal .link {
  cursor: pointer;
  font-size: .9em;
  margin-left: 8px;
}

.journal .tag {
  color: var(--color-journal-tag);
}

.journal .link {
  color: var(--color-journal-link);
}

.journal .bal {
  background-color: var(--entry-type-color);
}

.journal a:hover {
  filter: brightness(80%);
}

.journal .filename {
  font-family: var(--font-family-monospaced);
  font-size: .9em;
}

.journal .document .filename {
  margin-left: 1em;
}

.journal .indicators {
  align-items: center;
  cursor: pointer;
  display: flex;
  flex-shrink: 3;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.journal .indicators span {
  background-color: var(--color-journal-posting-indicator);
  border-radius: 3px;
  height: 6px;
  margin-right: 4px;
  min-width: 6px;
  padding: 0;
}

.journal .indicators .pending,
.journal .indicators .other {
  background-color: var(--entry-type-color);
}

.journal .indicators .metadata-indicator {
  border-radius: 20px;
  color: var(--color-journal-metadata-indicator);
  font-size: 10px;
  height: 16px;
  line-height: 16px;
  padding: 0 6px;
  text-transform: lowercase;
}
