/*
 * Formatted NTW answers outside the homepage chat (paid chat, shared chats).
 * Markup comes from docs/ntw-markdown.js; the homepage chat keeps the same
 * look in docs/styles.css. The gold-barred block is how Scripture is quoted.
 */

.ntw-markdown > :first-child {
  margin-top: 0;
}

.ntw-markdown > :last-child,
.ntw-markdown :is(blockquote, li, td, th) > :last-child {
  margin-bottom: 0;
}

.ntw-markdown :is(p, ul, ol, blockquote, pre) {
  margin: 0 0 0.85rem;
}

.ntw-markdown :is(h3, h4, h5, h6) {
  margin: 1.15rem 0 0.5rem;
  color: #f8fbff;
  line-height: 1.24;
}

.ntw-markdown h3 {
  font-size: 1.28em;
}

.ntw-markdown h4 {
  font-size: 1.16em;
}

.ntw-markdown :is(ul, ol) {
  padding-left: 1.45rem;
}

.ntw-markdown li + li {
  margin-top: 0.28rem;
}

.ntw-markdown li > :is(ul, ol) {
  margin-top: 0.28rem;
  margin-bottom: 0;
}

.ntw-markdown li[data-task] {
  list-style: none;
}

.ntw-markdown .ntw-chat-task-box {
  color: #ffdc73;
}

.ntw-markdown strong {
  color: #fff;
  font-weight: 700;
}

.ntw-markdown s {
  color: rgba(232, 239, 255, 0.72);
}

.ntw-markdown blockquote {
  padding: 0.65rem 0.85rem;
  border-left: 3px solid rgba(255, 220, 115, 0.72);
  background: rgba(255, 220, 115, 0.06);
  color: #e8efff;
}

.ntw-markdown blockquote blockquote {
  margin-top: 0.65rem;
}

.ntw-markdown code {
  padding: 0.08rem 0.32rem;
  border-radius: 6px;
  background: rgba(3, 8, 22, 0.72);
  font-size: 0.92em;
}

.ntw-markdown pre {
  max-width: 100%;
  padding: 0.85rem;
  overflow-x: auto;
  border: 1px solid rgba(122, 168, 255, 0.24);
  border-radius: 12px;
  background: rgba(3, 8, 22, 0.72);
  white-space: pre;
}

.ntw-markdown pre code {
  padding: 0;
  background: transparent;
}

.ntw-markdown hr {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid rgba(122, 168, 255, 0.24);
}

.ntw-markdown a {
  color: #9fc0ff;
  text-decoration: underline;
}

.ntw-markdown .ntw-chat-table-wrap {
  max-width: 100%;
  margin: 0 0 0.85rem;
  overflow-x: auto;
  border: 1px solid rgba(122, 168, 255, 0.24);
  border-radius: 12px;
  background: rgba(3, 8, 22, 0.42);
  color-scheme: dark;
}

.ntw-markdown .ntw-chat-table-wrap:last-child {
  margin-bottom: 0;
}

.ntw-markdown .ntw-chat-table-wrap:focus-visible {
  outline: 2px solid #ffdc73;
  outline-offset: 2px;
}

.ntw-markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  line-height: 1.45;
}

.ntw-markdown :is(th, td) {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(122, 168, 255, 0.18);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
}

.ntw-markdown th {
  color: #ffdc73;
  font-weight: 800;
  background: rgba(255, 220, 115, 0.06);
}

.ntw-markdown tbody tr:last-child td {
  border-bottom: 0;
}

.ntw-markdown [data-align="center"] {
  text-align: center;
}

.ntw-markdown [data-align="right"] {
  text-align: right;
}

/* Plain-text fallback if the formatter could not load. */
.ntw-markdown .ntw-markdown-plain {
  white-space: pre-wrap;
}

/* Shared chats show where a link goes, so a shared answer cannot hide a
   look-alike address behind NTW-branded link text. */
.ntw-markdown .ntw-link-host {
  color: #aebddb;
  font-size: 0.88em;
}
