/* The help widget, customer-facing. Propshaft also serves this file to the rep app (:app), so
   everything here is scoped under body.outpost and its own tokens.

   Dispatch Desk (the rep app's approved palette and type), scaled to a ~400px iframe, with each
   product's own accent (Chase, Oct 5 2026), taken from the products' code: HEY's purple (haystack
   --rgb-purple), Basecamp's primary-button green (bc3 --color-green-60). Spaces, Intercom-style:
   Home, Messages, Help and News in a tab bar along the bottom. */

.outpost {
  --w-bg: #f6f4ee;
  --w-surface: #fffefa;
  --w-sunken: #eaece3;
  --w-ink: #232e25;
  --w-muted: #606c61;
  --w-rule: #d7ddd1;
  --w-accent: #28543c;
  --w-accent-ink: #fffefa;
  --w-ai: #6b4fbb;
  --w-danger: #a8382c;
  --w-note: #f5ecd0;
  --w-note-rule: #ecd98c;
  --w-accent-soft: color-mix(in srgb, var(--w-accent) 12%, var(--w-surface));
  --w-link: var(--w-accent);
  --w-heading: Georgia, "Times New Roman", serif;

  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--w-bg); color: var(--w-ink);
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  color-scheme: light dark;
}
.outpost.outpost--hey { --w-accent: rgb(85 34 250); --w-accent-ink: #fff; }
.outpost.outpost--basecamp { --w-accent: hsl(148.4 68.8% 31.4%); --w-accent-ink: #fff; }

@media (prefers-color-scheme: dark) {
  .outpost {
    --w-bg: #242520;
    --w-surface: #1c211e;
    --w-sunken: #19221c;
    --w-ink: #e8eee8;
    --w-muted: #adb7ac;
    --w-rule: #3d493d;
    --w-accent: #95c7a3;
    --w-accent-ink: #14271b;
    --w-ai: #b9a4ff;
    --w-danger: #f0948a;
    --w-note: #3c3725;
    --w-note-rule: #6b5d2b;
  }
  .outpost.outpost--hey { --w-accent: rgb(134 126 255); --w-accent-ink: #120d2e; }
  .outpost.outpost--basecamp { --w-accent: hsl(133.5 40% 60.8%); --w-accent-ink: #0d1f13; }
}

.outpost *, .outpost *::before, .outpost *::after { box-sizing: border-box; }
.outpost [hidden] { display: none !important; }
.outpost a { color: var(--w-link); text-decoration: none; }
.outpost a:hover { text-decoration: underline; }
.outpost h1, .outpost h2, .outpost h3 { margin: 0; line-height: 1.25; }

/* Frame: a slim header (every space but Home), the page, the tab bar. */
.outpost .outpost__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--w-rule); background: var(--w-surface); }
.outpost .outpost__head-text { display: grid; flex: 1; min-width: 0; }
.outpost .outpost__expand { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--w-muted); cursor: pointer; }
.outpost .outpost__expand:hover { background: var(--w-accent-soft); color: var(--w-accent); }
.outpost .outpost__expand[aria-pressed="true"] .outpost__expand-grow,
.outpost .outpost__expand[aria-pressed="false"] .outpost__expand-shrink { display: none; }
/* Close: the loader hides the frame (outpost.js asks it). Shown only inside a product's page, where a
   product with its own help button has no launcher to close it with. */
.outpost .outpost__close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--w-muted); cursor: pointer; }
.outpost .outpost__close:hover { background: var(--w-accent-soft); color: var(--w-accent); }
.outpost .outpost__corner { position: absolute; top: 10px; right: 10px; z-index: 2; }
.outpost .outpost__head-title { font: 500 17px var(--w-heading); }
.outpost .outpost__head-sub { color: var(--w-muted); font-size: 12px; }
.outpost a.outpost__back { color: var(--w-ink); font-size: 20px; line-height: 1; padding: 0 4px; }
.outpost a.outpost__back:hover { text-decoration: none; color: var(--w-accent); }
.outpost .outpost__main { flex: 1; display: grid; gap: 14px; align-content: start; padding: 18px 16px 24px; }
/* Expanded for reading: the page keeps a comfortable measure, centered; the header and tabs span. */
@media (min-width: 560px) {
  .outpost .outpost__main { width: 100%; max-width: 680px; margin-inline: auto; }
}
.outpost .outpost__title { font: 500 21px var(--w-heading); }
.outpost .outpost__lede { margin: 0; color: var(--w-muted); }
.outpost .outpost__muted { margin: 0; color: var(--w-muted); font-size: 13px; }
.outpost .outpost__subhead { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--w-muted); text-transform: uppercase; letter-spacing: 0.06em; }

.outpost .outpost__tabs { position: sticky; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  border-top: 1px solid var(--w-rule); background: var(--w-surface); }
.outpost a.outpost__tab { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 10px; color: var(--w-muted); font-size: 12px; text-decoration: none; }
.outpost a.outpost__tab:hover { color: var(--w-ink); }
.outpost a.outpost__tab--current, .outpost a.outpost__tab--current:hover { color: var(--w-accent); font-weight: 600; }

/* Home: the faces of who answers (top right), a hello in the product's color, then the paths. */
.outpost .home__hero { display: grid; gap: 6px; margin: -18px -16px 0; padding: 18px 16px 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--w-accent) 16%, var(--w-bg)), var(--w-bg)); }
.outpost .home__hello { display: grid; margin: 0; font: 500 28px/1.2 var(--w-heading); }
.outpost .home__hello-greeting { color: var(--w-muted); }
.outpost .home__faces { display: flex; flex: none; justify-self: end; margin-bottom: 18px; }
/* In a frame, Home's close sits in the corner where the faces end: they move over for it. */
.outpost.outpost--framed .home__faces { margin-right: 36px; }
.outpost .home__faces .avatar { margin-left: -8px; border: 2px solid var(--w-bg); }
.outpost .home__faces .avatar:first-child { margin-left: 0; }
/* The three paths as actions: each opens its own panel. */
.outpost .home__actions { display: grid; border: 1px solid var(--w-rule); border-radius: 8px; background: var(--w-surface); overflow: hidden; }
.outpost a.home__action { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 13px 14px; color: var(--w-ink); }
.outpost a.home__action + a.home__action { border-top: 1px solid var(--w-rule); }
.outpost a.home__action:hover { background: var(--w-accent-soft); text-decoration: none; }
.outpost .home__action-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--w-accent-soft); color: var(--w-accent); }
.outpost .home__action-text { display: grid; gap: 1px; min-width: 0; }
.outpost .home__action-text strong { font-weight: 600; }
.outpost .home__action-text span { color: var(--w-muted); font-size: 13px; }
.outpost .home__action-go { color: var(--w-muted); font-size: 20px; line-height: 1; }
.outpost a.home__card { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--w-rule); border-radius: 8px; background: var(--w-surface); color: var(--w-ink); }
.outpost a.home__card:hover { border-color: var(--w-accent); text-decoration: none; }
.outpost .home__card-label { color: var(--w-muted); font-size: 12px; }
.outpost .home__card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.outpost .home__card--recent { border-left: 3px solid var(--w-accent); }
.outpost .home__popular { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--w-rule); border-radius: 8px; background: var(--w-surface); }
.outpost .home__popular .home__card-label { margin: 0; font-weight: 400; }
.outpost .home__articles { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.outpost .home__articles a { color: var(--w-link); font-weight: 500; }

.outpost .avatar { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; overflow: hidden; border-radius: 50%;
  background: var(--w-accent-soft); color: var(--w-accent); font-size: 12px; font-weight: 600; }
.outpost .avatar img { width: 100%; height: 100%; object-fit: cover; }

.outpost .outpost__choices { display: grid; gap: 10px; }
.outpost .choice { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--w-rule); border-radius: 8px; background: var(--w-surface); }
.outpost .choice h2 { font-size: 15px; font-weight: 600; }
.outpost .choice p { margin: -4px 0 0; color: var(--w-muted); font-size: 13px; }
.outpost .choice--compact { gap: 6px; padding: 12px; }
.outpost .choice__form { display: grid; gap: 8px; }
.outpost .choice__form--inline { grid-template-columns: 1fr auto; }

.outpost input, .outpost textarea, .outpost select { width: 100%; padding: 9px 12px; border: 1px solid var(--w-rule); border-radius: 8px;
  background: var(--w-surface); color: var(--w-ink); font: inherit; }
.outpost input::placeholder, .outpost textarea::placeholder { color: var(--w-muted); }
.outpost textarea { resize: vertical; }
.outpost input:focus, .outpost textarea:focus, .outpost select:focus { outline: 2px solid var(--w-accent); outline-offset: -1px; }
.outpost .outpost__field { display: grid; gap: 4px; }
.outpost .outpost__field > span { color: var(--w-muted); font-size: 13px; font-weight: 600; }

.outpost .outpost__button { display: inline-block; justify-self: start; padding: 9px 16px; border: 1px solid var(--w-accent); border-radius: 8px;
  background: var(--w-accent); color: var(--w-accent-ink); font: inherit; font-weight: 600; text-align: center; cursor: pointer; }
.outpost a.outpost__button { color: var(--w-accent-ink); text-decoration: none; }
.outpost .outpost__button--quiet, .outpost a.outpost__button--quiet { background: transparent; color: var(--w-accent); }

.outpost .outpost__results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.outpost .outpost__results li { padding: 10px 12px; border: 1px solid var(--w-rule); border-radius: 8px; background: var(--w-surface); }
.outpost .outpost__results a { font-weight: 600; }
.outpost .outpost__results p { margin: 4px 0 0; color: var(--w-muted); font-size: 13px; }
.outpost mark { background: color-mix(in srgb, #e5a50a 30%, transparent); color: inherit; border-radius: 2px; }

/* Messages: writing to us first, then the conversations. */
/* Messages: the list (or "No messages yet", centred in the space) above "Ask a question", centred at the foot. */
.outpost .outpost__main:has(> .messages) { align-content: stretch; }
.outpost .messages { display: grid; grid-template-rows: 1fr auto; gap: 14px; min-height: 100%; }
.outpost .messages__list { align-self: start; }
.outpost .messages__empty { align-self: center; justify-self: center; margin: 0; color: var(--w-muted); font: 500 18px var(--w-heading); }
.outpost .messages__ask { display: flex; justify-content: center; padding-bottom: 4px; }
.outpost .messages__button { display: inline-flex; align-items: center; gap: 8px; }

/* Help: the docs to browse, by category, before anything is typed. */
.outpost .help__categories { display: grid; border: 1px solid var(--w-rule); border-radius: 8px; background: var(--w-surface); }
.outpost .help__category + .help__category { border-top: 1px solid var(--w-rule); }
.outpost .help__category summary { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; font-weight: 600; cursor: pointer; list-style: none; }
.outpost .help__category summary::-webkit-details-marker { display: none; }
.outpost .help__category ul { list-style: none; margin: 0; padding: 0 12px 10px; display: grid; gap: 6px; font-size: 13px; }

/* News: the product's updates, newest first. */
.outpost .news { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.outpost .news__item { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--w-rule); border-radius: 8px; background: var(--w-surface); }
.outpost .news__title { font: 500 17px var(--w-heading); }
.outpost .news__summary { color: var(--w-ink); font-size: 13px; }
.outpost .news__summary p { margin: 0; }
.outpost .news__more { font-size: 13px; font-weight: 600; }

.outpost .outpost__bubble { padding: 10px 14px; border-radius: 12px; }
.outpost .outpost__bubble p { margin: 0; }
.outpost .outpost__bubble p + p { margin-top: 8px; }
.outpost .outpost__bubble--customer { justify-self: end; max-width: 85%; background: var(--w-accent-soft); }
.outpost .outpost__bubble--ai { border: 1px solid color-mix(in srgb, var(--w-ai) 35%, transparent); background: var(--w-surface); }
.outpost .outpost__ai-label { color: var(--w-ai); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }

.outpost .outpost__trail { padding: 10px 14px; border-left: 3px solid var(--w-note-rule); border-radius: 8px; background: var(--w-note); font-size: 13px; }
.outpost .outpost__trail p, .outpost__trail ul { margin: 0; }
.outpost .outpost__trail ul { padding-left: 18px; margin-top: 4px; }
.outpost .outpost__error { margin: 0; color: var(--w-danger); font-weight: 600; }
.outpost .outpost__helped { margin: 0; padding-top: 12px; border-top: 1px solid var(--w-rule); color: var(--w-muted); font-size: 13px; }

.outpost .outpost__feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; }
.outpost .outpost__feedback form { margin: 0; }
.outpost .outpost__feedback--thanks { display: grid; }

.outpost .outpost__article .outpost__title { margin-bottom: 12px; }
.outpost .article-body { font-size: 14px; line-height: 1.6; }
.outpost .article-body > * + * { margin-top: 0.8em; }
.outpost .article-body p, .outpost .article-body ul, .outpost .article-body ol { margin-bottom: 0; }
.outpost .article-body h2, .outpost .article-body h3, .outpost .article-body h4 { margin-top: 1.4em; font-size: 15px; }
.outpost .article-body img { display: block; max-width: 100%; height: auto; border: 1px solid var(--w-rule); border-radius: 8px; }
.outpost .article-body pre { padding: 10px 12px; overflow-x: auto; border-radius: 8px; background: var(--w-sunken); font-size: 13px; }
.outpost .article-tabs { border: 1px solid var(--w-rule); border-radius: 8px; }
.outpost .article-tabs__bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 6px 0; border-bottom: 1px solid var(--w-rule); }
.outpost .article-tabs__radio { position: absolute; opacity: 0; pointer-events: none; }
.outpost .article-tabs__bar label { margin-bottom: -1px; padding: 6px 12px; border: 1px solid transparent; border-radius: 6px 6px 0 0; color: var(--w-muted); font-size: 13px; cursor: pointer; }
.outpost .article-tabs__radio:checked + label { border-color: var(--w-rule); border-bottom-color: var(--w-surface); background: var(--w-surface); color: var(--w-ink); font-weight: 600; }
.outpost .article-tabs__radio:focus-visible + label { outline: 2px solid var(--w-accent); }
.outpost .article-tabs__panel { display: none; padding: 12px 16px; }
.outpost .article-tabs__panel > * + * { margin-top: 0.6em; }
/* Radio n checked shows panel n. Eight is more tabs than any doc uses. */
.outpost .article-tabs:has(> .article-tabs__bar > .article-tabs__radio:nth-of-type(1):checked) > .article-tabs__panel:nth-of-type(1),
.outpost .article-tabs:has(> .article-tabs__bar > .article-tabs__radio:nth-of-type(2):checked) > .article-tabs__panel:nth-of-type(2),
.outpost .article-tabs:has(> .article-tabs__bar > .article-tabs__radio:nth-of-type(3):checked) > .article-tabs__panel:nth-of-type(3),
.outpost .article-tabs:has(> .article-tabs__bar > .article-tabs__radio:nth-of-type(4):checked) > .article-tabs__panel:nth-of-type(4),
.outpost .article-tabs:has(> .article-tabs__bar > .article-tabs__radio:nth-of-type(5):checked) > .article-tabs__panel:nth-of-type(5),
.outpost .article-tabs:has(> .article-tabs__bar > .article-tabs__radio:nth-of-type(6):checked) > .article-tabs__panel:nth-of-type(6),
.outpost .article-tabs:has(> .article-tabs__bar > .article-tabs__radio:nth-of-type(7):checked) > .article-tabs__panel:nth-of-type(7),
.outpost .article-tabs:has(> .article-tabs__bar > .article-tabs__radio:nth-of-type(8):checked) > .article-tabs__panel:nth-of-type(8) { display: block; }
/* The table of contents, at the top of an article with a few sections. */
.outpost .article-toc { border: 1px solid var(--w-rule); border-radius: 8px; background: var(--w-surface); }
.outpost .article-toc summary { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; cursor: pointer; font-weight: 600; list-style: none; }
.outpost .article-toc summary::-webkit-details-marker { display: none; }
.outpost .article-toc[open] summary { border-bottom: 1px solid var(--w-rule); }
.outpost .article-toc[open] .article-toc__chevron { transform: rotate(180deg); }
.outpost .article-toc ol { list-style: none; margin: 0; padding: 8px 14px 10px; display: grid; gap: 2px; }
.outpost .article-toc li a { display: block; padding: 3px 0; color: var(--w-muted); }
.outpost .article-toc li a:hover { color: var(--w-ink); }
.outpost .article-toc .article-toc__sub { padding-left: 14px; font-size: 0.92em; }
.outpost .plan-note { display: inline-block; margin-top: 4px; color: var(--w-muted); font-size: 12px; }
.outpost .plan-note--off { color: var(--w-ink); font-weight: 600; }
.outpost .article-body table { border-collapse: collapse; font-size: 13px; }
.outpost .article-body th, .outpost .article-body td { padding: 5px 10px; border: 1px solid var(--w-rule); text-align: left; }
.outpost .article-body__table { overflow-x: auto; }
.outpost .callout { padding: 10px 14px; border-left: 3px solid var(--w-note-rule); border-radius: 8px; background: var(--w-note); }

.outpost .outpost__thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.outpost .outpost__bubble--team { justify-self: start; max-width: 85%; border: 1px solid var(--w-rule); background: var(--w-surface); }
.outpost .outpost__bubble-who { display: flex; gap: 8px; justify-content: space-between; color: var(--w-muted); font-size: 12px; font-weight: 600; }
.outpost .outpost__bubble-who span, .outpost .outpost__bubble-who time { font-weight: 400; }
.outpost .outpost__bubble .lexxy-content p { margin: 0; }
.outpost .outpost__bubble .lexxy-content p + p { margin-top: 8px; }

.outpost .outpost__preview { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--w-sunken); color: var(--w-muted); font-weight: 600; letter-spacing: 0; }
.outpost .outpost__sources { margin-top: 10px; font-size: 13px; }
.outpost .outpost__sources ul { margin: 4px 0 0; padding-left: 18px; }
.outpost .outpost__sources blockquote { margin: 4px 0; padding-left: 10px; border-left: 3px solid var(--w-rule); color: var(--w-muted); }

/* Files a rep attached to a reply: a screenshot shows in the bubble, anything else downloads. */
.outpost .outpost__files { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.outpost .outpost__image { display: block; max-width: 100%; max-height: 320px; border: 1px solid var(--w-rule); border-radius: 8px; }
.outpost .outpost__file { font-weight: 500; }

/* A conversation's head: who it's with, then the subject kept small (it's often the customer's whole first
   sentence), then where it stands. */
.outpost .outpost__eyebrow { margin: 0; color: var(--w-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.outpost .thread__head { display: grid; gap: 4px; margin-bottom: 14px; }
.outpost .thread__title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* The reply box as a chat box: the clip, a box that grows, and Send, on one line. */
.outpost .chat { display: flex; align-items: flex-end; gap: 6px; margin-top: 14px; padding: 6px; border: 1px solid var(--w-rule); border-radius: 14px; background: var(--w-surface); }
.outpost .chat:focus-within { border-color: var(--w-accent); }
.outpost .chat__input:focus { outline: none; } /* the box's border shows focus */
.outpost .chat__input { flex: 1; min-width: 0; max-height: 160px; margin: 0; padding: 7px 4px; border: 0; background: transparent; color: var(--w-ink); font: inherit; line-height: 1.4; resize: none; outline: none; }
.outpost .chat__attach { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--w-muted); cursor: pointer; }
.outpost .chat__attach:hover, .outpost .chat__attach:focus-within { background: var(--w-sunken); color: var(--w-ink); }
.outpost .chat__files { position: absolute; width: 1px; height: 1px; opacity: 0; }
.outpost .chat__hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.outpost .chat__send { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: var(--w-accent); color: var(--w-accent-ink); cursor: pointer; }
.outpost .chat__note { margin-top: 6px; text-align: center; }
.outpost .chat + .outpost__error, .outpost .outpost__error + .chat { margin-top: 10px; }

/* The AI path as a chat (questions/new and show): its thread fills the space, the ask box sits at the foot. */
.outpost .outpost__main:has(> .ai-chat) { align-content: stretch; }
.outpost .ai-chat { display: grid; grid-template-rows: 1fr auto; gap: 14px; min-height: 100%; }
.outpost .ai-chat__thread { align-content: start; }
.outpost .ai-chat__thread > .outpost__bubble--ai { justify-self: start; max-width: 85%; }
.outpost .ai-chat__meta { margin-top: -4px; color: var(--w-muted); font-size: 12px; }
.outpost .ai-chat__ask { position: sticky; bottom: 60px; z-index: 1; margin-top: 0; box-shadow: 0 -10px 12px var(--w-bg); } /* just above the tab bar as the thread grows */

