/* The style of the page of a conversation and of the page between a message and the
   site its link leads to: system fonts, one column, light or dark as the system is. */

:root {
  color-scheme: light dark;
  --quiet: #5c6066;
  --rule: #d5d7da;
}

@media (prefers-color-scheme: dark) {
  :root {
    --quiet: #a3a7ad;
    --rule: #3b3e43;
  }
}

body {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem;
  font: 1rem/1.5 system-ui, sans-serif;
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.bar,
.meta,
.made,
#lines,
#empty {
  color: var(--quiet);
  font-size: 0.875rem;
}

/* The state of the connection, which the script writes. */
#state:not(:empty)::before {
  content: " · ";
}

#lines,
#feed {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

/* A branch stands under the line it starts from. */
#lines [data-depth="1"] {
  padding-left: 1.5rem;
}

#lines [data-depth="2"] {
  padding-left: 3rem;
}

.record {
  padding: 0.5rem 0;
  border-top: 1px solid var(--rule);
}

.meta,
.made {
  margin: 0;
}

.meta b {
  color: CanvasText;
}

/* What a participant wrote: its line breaks are kept and its long lines wrap. */
.text {
  margin: 0.25rem 0 0;
  white-space: pre-wrap;
}

/* A link of a message is a form with one button, which looks like a link. */
.out {
  display: inline;
}

.out button {
  padding: 0;
  border: 0;
  background: none;
  color: LinkText;
  font: inherit;
  text-align: start;
  text-decoration: underline;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: pointer;
}
