/* Chat integration docs (/docs/chat) and the transcript viewer
   (/integrations/transcripts/{id}). Loaded after style.css and built on its
   palette variables; both pages must read well on a phone. */

/* Docs layout: Discord's developer docs. The page list is a full height
   sidebar on the left and the article reads on the page itself; stacked on
   narrow screens with the list first. */
.site-app.docs-page .shell { padding: 0; align-items: stretch; }
.docs { flex: 1; width: 100%; display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: start;
  background: linear-gradient(90deg, var(--bg-1) 280px, transparent 280px); }
.docs-nav { position: sticky; top: 48px; height: calc(100vh - 48px); overflow-y: auto; padding: 24px 16px 32px; border-right: 1px solid var(--border-subtle); scrollbar-width: thin; }
.docs-nav-head { margin: 20px 10px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.docs-nav-head:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.docs-nav a { display: block; padding: 7px 10px; border-radius: var(--radius-xs); color: var(--text-label); font-weight: 500; font-size: 15px; line-height: 20px; }
.docs-nav a:hover { background: var(--bg-mod-hover); color: var(--text); text-decoration: none; }
.docs-nav a.active { background: var(--bg-mod-selected); color: #fff; }
.docs-nav-foot { margin: 24px 10px 0; padding-top: 16px; border-top: 1px solid var(--border-subtle); font-size: 13px; line-height: 1.7; color: var(--muted); }
.docs-nav-foot a { display: inline; padding: 0; font-weight: 500; font-size: 13px; color: var(--link); }
.docs-nav-foot a:hover { background: none; text-decoration: underline; }
.card.docs-body { max-width: 900px; width: 100%; margin: 0; padding: 40px clamp(20px, 5vw, 64px) 96px; background: none; box-shadow: none; border-radius: 0; font-size: 16px; line-height: 1.65; }
.docs-body h1 { margin: 0 0 16px; font-size: 32px; line-height: 1.2; font-weight: 800; color: var(--text-strong); letter-spacing: -.01em; }
.docs-body h2 { margin: 40px 0 12px; font-size: 22px; line-height: 1.3; font-weight: 700; color: var(--text-strong); padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle); }
.docs-body h3 { margin: 28px 0 8px; font-size: 18px; font-weight: 700; color: var(--text-strong); }
.docs-body h4, .docs-body h5, .docs-body h6 { margin: 20px 0 6px; font-size: 15px; font-weight: 700; color: var(--text-strong); }
.docs-body p, .docs-body ul, .docs-body ol, .docs-body blockquote { margin: 0 0 16px; }
.docs-body ul, .docs-body ol { padding-left: 24px; }
.docs-body li { margin: 6px 0; }
.docs-body li::marker { color: var(--muted); }
.docs-body strong { color: var(--text-strong); }
.docs-body code { background: var(--bg-0); border-radius: var(--radius-xs); padding: 2px 6px; color: var(--text-strong); font-size: .85em; }
.docs-body pre, .transcript pre { position: relative; background: var(--bg-floating); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; margin: 0 0 18px; box-shadow: inset 0 0 0 1px var(--border-subtle); }
.docs-body pre code, .transcript pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.6; white-space: pre; color: #e3e5e8; }
.docs-body blockquote { border-left: 4px solid var(--blurple); background: var(--blurple-soft); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; color: var(--text); }
.docs-body blockquote p { margin: 0; }
.docs-body hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 32px 0; }
.docs-table { overflow-x: auto; margin: 0 0 18px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.docs-body table { border-collapse: collapse; width: 100%; font-size: 14px; }
.docs-body th, .docs-body td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border-subtle); }
.docs-body tr:last-child td { border-bottom: 0; }
.docs-body th { color: var(--muted); background: var(--bg-1); font-size: 12px; text-transform: uppercase; letter-spacing: .02em; font-weight: 700; }
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); background: none; }
  .docs-nav { position: static; height: auto; padding: 14px 12px; background: var(--bg-1); border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .docs-nav ul { flex-direction: row; flex-wrap: wrap; }
  .docs-nav a { font-size: 14px; padding: 6px 10px; }
  .docs-nav-head { margin: 12px 10px 4px; }
  .docs-nav-foot { margin-top: 12px; padding-top: 10px; }
  .card.docs-body { padding: 28px 18px 64px; font-size: 15px; }
  .docs-body h1 { font-size: 26px; }
}

/* Transcript viewer */
.card.transcript { max-width: 860px; background: var(--bg-2); box-shadow: 0 0 0 1px var(--border-subtle), var(--shadow-high); }
.tr-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tr-head-text { min-width: 0; }
.tr-head .card-title { word-break: break-word; }
.tr-guild-icon { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; flex: none; }
.tr-eyebrow { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.tr-topic { background: var(--bg-2); border-left: 4px solid var(--blurple); border-radius: 0 6px 6px 0; padding: 10px 14px; margin: 0 0 14px; }
.tr-topic p { margin: 0; color: var(--text-strong); white-space: pre-wrap; word-break: break-word; }
.tr-topic .tr-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 2px; }
.tr-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; margin: 0 0 6px; }
.tr-meta dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.tr-meta dd { margin: 0; color: var(--text-strong); word-break: break-word; }
.tr-people { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tr-person { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border-radius: 999px; padding: 4px 10px 4px 4px; }
.tr-person-name { color: var(--text-strong); font-weight: 600; }
.tr-avatar-sm { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.tr-kind { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-radius: 3px; padding: 1px 5px; background: var(--bg-3); color: var(--muted); vertical-align: 1px; }
.tr-kind-bot { background: var(--blurple); color: #fff; }
.tr-kind-talker { background: var(--green); color: #fff; }
.tr-messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tr-msg { display: flex; gap: 12px; padding: 8px 4px; border-radius: 4px; }
.tr-msg:hover { background: var(--bg-2); }
.tr-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.tr-msg-main { min-width: 0; flex: 1; }
.tr-msg-head { margin: 0 0 2px; }
.tr-msg-author { color: var(--text-strong); font-weight: 600; }
.tr-dim { color: var(--muted); font-size: 12px; }
.tr-msg-content { color: var(--text); word-break: break-word; overflow-wrap: anywhere; }
.tr-msg-content code, .tr-embed code { background: var(--bg-0); border-radius: 3px; padding: 1px 4px; }
.tr-msg-content pre, .tr-embed pre { margin: 6px 0; }
.tr-attachments { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tr-attachments li { background: var(--bg-2); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; word-break: break-all; }
.tr-embed { margin: 6px 0 0; max-width: 520px; background: var(--bg-2); border-left: 4px solid var(--bg-hover); border-radius: 4px; padding: 8px 12px; }
.tr-embed p { margin: 0; }
.tr-embed-title { font-weight: 700; color: var(--text-strong); }
.tr-embed-desc { margin-top: 4px; word-break: break-word; }
.tr-embed-fields { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.tr-embed-field { flex: 1 1 100%; min-width: 0; }
.tr-embed-field.inline { flex: 1 1 140px; }
.tr-embed-name { font-weight: 700; font-size: 12.5px; color: var(--text-strong); }
.tr-embed-value { word-break: break-word; }
.tr-embed-footer { margin-top: 6px !important; font-size: 12px; color: var(--muted); }
.tr-foot { margin-top: 18px; }
@media (max-width: 640px) {
  .tr-avatar { width: 32px; height: 32px; }
  .tr-msg { gap: 10px; padding: 8px 0; }
  .tr-guild-icon { width: 44px; height: 44px; border-radius: 12px; }
}
