 /* --- Help -----------------------------------------------------------------
    Ported from design_handoff_dealarena_redesign/designs/Help.dc.html and
    designs/Help Doc.dc.html. Both designs are the phone layout; the geometry,
    type and colour here are theirs, widened for the desktop app frame.

    One stylesheet, one .p-help root, two layouts: the hub, and .p-help.is-doc
    for a single guide. Namespaced .hlp-*.

    EVERY selector in this file is already scoped to .p-help by hand. Do not
    run a blanket scoping pass over it: one ran on 2026-08-20 and prefixed the
    comment lines too, which killed the root rule and one media block.

    Shelf colour comes from [data-tone] on the shelf, which the server sets per
    group. It only ever resolves to a palette token.
    ------------------------------------------------------------------------ */

.p-help {
  --hlp-tone: var(--brand);
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 32px 80px;
}

.p-help [data-tone="brand"]  { --hlp-tone: var(--brand); }
.p-help [data-tone="purple"] { --hlp-tone: var(--purple); }
.p-help [data-tone="green"]  { --hlp-tone: var(--green); }
.p-help [data-tone="amber"]  { --hlp-tone: var(--amber); }
.p-help [data-tone="blue"]   { --hlp-tone: var(--blue); }
.p-help [data-tone="ink"]    { --hlp-tone: var(--ink-3); }

 /* Hero */
.p-help .hlp-hero { max-width: 720px; }
.p-help .hlp-kick {
  font-family: ui-monospace, monospace; font-size: 10px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--brand);
}
.p-help .hlp-h1 {
  font-size: 32px; line-height: 1.06; letter-spacing: -.032em; font-weight: 700;
  color: var(--ink); margin: 14px 0 0;
}
.p-help .hlp-lede { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); margin: 13px 0 0; }

.p-help .hlp-search {
  display: flex; align-items: center; gap: 10px;
  margin-top: 20px; padding: 0 14px; height: 52px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-1);
  transition: border-color 130ms, box-shadow 130ms;
}
.p-help .hlp-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.p-help .hlp-search svg { flex: none; color: var(--ink-4); }
.p-help .hlp-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font-family: 'Onest', system-ui, sans-serif; font-size: 15px; outline: none;
}
.p-help .hlp-search input::placeholder { color: var(--ink-4); }
.p-help .hlp-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

 /* Shelves */
.p-help .hlp-shelves { display: flex; flex-direction: column; gap: 22px; margin-top: 26px; }
.p-help .hlp-shelf[hidden] { display: none; }

.p-help .hlp-shelf-head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.p-help .hlp-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--hlp-tone); flex: none; }
.p-help .hlp-shelf-label {
  font-family: ui-monospace, monospace; font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4); white-space: nowrap;
}
.p-help .hlp-shelf-rule {
  flex: 1; height: 1px; min-width: 12px;
  background: linear-gradient(90deg, color-mix(in oklab, var(--hlp-tone) 45%, transparent), transparent 70%);
}

.p-help .hlp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.p-help .hlp-card {
  display: flex; align-items: center; gap: 12px;
  min-height: 62px; padding: 12px 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg-1);
  color: var(--ink); text-decoration: none;
  transition: border-color 130ms, transform 130ms, box-shadow 130ms;
}
.p-help .hlp-card:hover {
  border-color: var(--hlp-tone); color: var(--ink);
  transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.07);
}
.p-help .hlp-card[hidden] { display: none; }
.p-help .hlp-card-txt { flex: 1; min-width: 0; }
.p-help .hlp-card-t { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.p-help .hlp-card-m {
  display: block; margin-top: 4px;
  font-family: ui-monospace, monospace; font-size: 10.5px; color: var(--ink-4);
}
.p-help .hlp-card-go { flex: none; display: flex; color: var(--ink-4); transition: color 130ms, transform 130ms; }
.p-help .hlp-card:hover .hlp-card-go { color: var(--hlp-tone); transform: translateX(2px); }

.p-help .hlp-none {
  padding: 22px; text-align: center; border: 1px dashed var(--line-2);
  border-radius: 14px; font-size: 14.5px; color: var(--ink-3);
}

 /* Ask console */
.p-help .hlp-ask {
  margin-top: 30px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--bg-1); overflow: hidden;
}
.p-help .hlp-ask-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px;
  padding: 15px 18px 13px; border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.p-help .hlp-ask-led {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand); align-self: center;
  box-shadow: none;  flex: none;
}
.p-help .hlp-ask-h { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); margin: 0; }
.p-help .hlp-ask-note { font-size: 12.5px; color: var(--ink-3); }

.p-help .hlp-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 0; }
.p-help .hlp-chip {
  padding: 7px 12px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2);
  font-family: 'Onest', system-ui, sans-serif; font-size: 12.5px;
  transition: border-color 130ms, color 130ms, background 130ms;
}
.p-help .hlp-chip:hover { border-color: var(--brand); color: var(--ink); background: var(--brand-soft); }
.p-help .hlp-chips[hidden] { display: none; }

.p-help .hlp-log {
  padding: 16px 18px; min-height: 200px; max-height: 52vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.p-help .hlp-msg { max-width: 88%; }
.p-help .hlp-msg.is-user { align-self: flex-end; max-width: 76%; }
.p-help .hlp-who {
  font-family: ui-monospace, monospace; font-size: 9.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 5px;
}
.p-help .hlp-msg.is-user .hlp-who { text-align: right; }
.p-help .hlp-body {
  padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink);
}
.p-help .hlp-msg.is-user .hlp-body { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.p-help .hlp-body.is-wait { color: var(--ink-3); font-family: ui-monospace, monospace; font-size: 12px; }
.p-help .hlp-body.is-wait i {
  display: inline-block; width: 5px; height: 11px; margin-left: 2px; vertical-align: -1px;
  background: currentColor; animation: da-blink 1.1s step-end infinite;
}
.p-help .hlp-src {
  margin-top: 7px; font-family: ui-monospace, monospace; font-size: 10.5px;
  color: var(--ink-4); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline;
}
.p-help .hlp-src a { color: var(--link); text-decoration: none; border-bottom: 1px solid transparent; }
.p-help .hlp-src a:hover { border-bottom-color: currentColor; }
.p-help .hlp-esc { margin-top: 10px; }

.p-help .hlp-compose {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end;
  padding: 14px 18px 18px; border-top: 1px solid var(--line);
}
.p-help .hlp-compose textarea {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--ink); padding: 11px 13px; resize: none; outline: none;
  font-family: 'Onest', system-ui, sans-serif; font-size: 14px; line-height: 1.5;
  min-height: 44px; max-height: 140px;
}
.p-help .hlp-compose textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.p-help .hlp-compose textarea::placeholder { color: var(--ink-4); }
.p-help .hlp-compose .da-plate-btn[disabled] { opacity: .5; cursor: default; transform: none; }

 /* Still stuck */
.p-help .hlp-stuck { margin-top: 26px; }
.p-help .hlp-stuck-card {
  border-radius: 16px; border: 1px solid #2a2420; padding: 24px 22px;
  background: linear-gradient(160deg, #16120f, #0b0908);
}
.p-help .hlp-stuck-h { font-size: 22px; font-weight: 700; letter-spacing: -.025em; color: #f3e9da; margin: 0; }
.p-help .hlp-stuck-p { font-size: 14.5px; line-height: 1.6; color: #a39d92; margin: 10px 0 0; max-width: 560px; }
.p-help .hlp-stuck-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; margin-top: 18px;
  border-radius: 11px; text-decoration: none;
  font-family: ui-monospace, monospace; font-size: 13px; font-weight: 500;
  background: var(--brand); color: var(--on-brand); box-shadow: 0 4px 0 var(--edge);
  transition: transform 90ms, box-shadow 90ms, filter 120ms;
}
.p-help .hlp-stuck-cta:hover { filter: brightness(1.05); color: var(--on-brand); }
.p-help .hlp-stuck-cta:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.p-help .hlp-stuck-cta::after { content: '\2192'; }

 /* One doc */
.p-help.is-doc { max-width: none; padding: 0; }

.p-help .hlp-prog { position: sticky; top: 0; z-index: 6; height: 3px; background: var(--bg-3); }
.p-help .hlp-prog span { display: block; width: 0; height: 100%; background: var(--brand); transition: width 90ms linear; }

.p-help .hlp-doc { max-width: 820px; margin: 0 auto; padding: 16px 32px 80px; }

.p-help .hlp-back {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px;
  font-family: ui-monospace, monospace; font-size: 11.5px;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
}
.p-help .hlp-doc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.p-help .hlp-tag {
  font-family: ui-monospace, monospace; font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase; padding: 4px 8px; border-radius: 5px;
  background: color-mix(in oklab, var(--hlp-tone) 14%, transparent); color: var(--hlp-tone);
}
.p-help .hlp-doc-read { font-family: ui-monospace, monospace; font-size: 10.5px; color: var(--ink-4); }

.p-help .hlp-toc {
  margin-top: 18px; border: 1px solid var(--line); border-radius: 13px;
  background: var(--bg-2); padding: 14px 16px;
}
.p-help .hlp-toc[hidden] { display: none; }
.p-help .hlp-toc-h {
  font-family: ui-monospace, monospace; font-size: 9.5px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 8px;
}
.p-help .hlp-toc-list { display: flex; flex-direction: column; }
.p-help .hlp-toc-list a {
  display: flex; align-items: center; min-height: 32px; font-size: 14px;
  text-decoration: none; border-bottom: 1px solid transparent; width: fit-content;
}
.p-help .hlp-toc-list a:hover { border-bottom-color: currentColor; }

 /* The markdown body, under .hlp-prose so a doc heading cannot take the hub's type */
.p-help .hlp-prose { margin-top: 24px; font-size: 15.5px; line-height: 1.72; color: var(--ink-2); }
.p-help .hlp-prose h1 {
  font-size: 30px; line-height: 1.12; letter-spacing: -.03em; font-weight: 700;
  color: var(--ink); margin: 0 0 14px;
}
.p-help .hlp-prose h2 {
  font-size: 21px; line-height: 1.25; letter-spacing: -.02em; font-weight: 700;
  color: var(--ink); margin: 30px 0 10px; scroll-margin-top: 14px;
}
.p-help .hlp-prose h3 { font-size: 16.5px; line-height: 1.3; font-weight: 700; color: var(--ink); margin: 22px 0 8px; }
.p-help .hlp-prose p { margin: 0 0 14px; }
.p-help .hlp-prose ul,
.p-help .hlp-prose ol { padding-left: 22px; margin: 0 0 14px; }
.p-help .hlp-prose li { margin-bottom: 7px; }
.p-help .hlp-prose strong,
.p-help .hlp-prose b { color: var(--ink); font-weight: 700; }
.p-help .hlp-prose hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.p-help .hlp-prose code {
  font-family: ui-monospace, monospace; font-size: 13px;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 5px; color: var(--ink);
}
.p-help .hlp-prose pre {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 15px; overflow-x: auto; margin: 0 0 16px;
  font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.55; color: var(--ink);
}
.p-help .hlp-prose pre code { background: transparent; border: 0; padding: 0; }
 /* A blockquote is the doc corpus's only callout, so it is the design's TIP plate */
.p-help .hlp-prose blockquote {
  margin: 0 0 16px; padding: 13px 15px; border-radius: 12px;
  background: var(--brand-soft); border: 1px solid var(--brand); color: var(--ink-2);
}
.p-help .hlp-prose blockquote > :last-child { margin-bottom: 0; }
.p-help .hlp-prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 13.5px; }
.p-help .hlp-prose th,
.p-help .hlp-prose td { text-align: left; padding: 9px 12px; border: 1px solid var(--line); }
.p-help .hlp-prose th {
  background: var(--bg-2); color: var(--ink); font-weight: 700;
  font-family: ui-monospace, monospace; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
}
.p-help .hlp-prose img { max-width: 100%; height: auto; border-radius: 10px; }

.p-help .hlp-doc-foot { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.p-help .hlp-doc-foot-h {
  font-family: ui-monospace, monospace; font-size: 9.5px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4);
}
.p-help .hlp-doc-foot-p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin: 10px 0 0; max-width: 560px; }
.p-help .hlp-doc-foot-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.p-help .hlp-doc-foot-btns .da-plate-btn { text-decoration: none; }
.p-help .hlp-doc-foot-btns .da-plate-btn.is-secondary { color: var(--ink-2); }

.p-help .hlp-updown {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
}
.p-help .hlp-updown-a {
  display: block; padding: 14px 15px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-1); text-decoration: none;
  transition: border-color 130ms;
}
.p-help .hlp-updown-a:hover { border-color: var(--brand); }
.p-help .hlp-updown-a.is-next { text-align: right; }
.p-help .hlp-updown-k {
  display: block; margin-bottom: 5px;
  font-family: ui-monospace, monospace; font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4);
}
.p-help .hlp-updown-t { font-size: 14.5px; color: var(--ink); }

.p-help .hlp-doc-stamp {
  margin-top: 22px; font-family: ui-monospace, monospace;
  font-size: 10.5px; color: var(--ink-4);
}

@media (max-width: 900px) {
   /* The designs are 390px wide, so this is the layout they were drawn at */
  .p-help .hlp-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .p-help { padding: 24px 18px 44px; }
  .p-help .hlp-h1 { font-size: 30px; }
  .p-help .hlp-doc { padding: 14px 18px 44px; }
  .p-help .hlp-prose h1 { font-size: 27px; }
  .p-help .hlp-msg,
  .p-help .hlp-msg.is-user { max-width: 100%; }
  .p-help .hlp-compose { grid-template-columns: minmax(0, 1fr); }
  .p-help .hlp-compose .da-plate-btn { justify-content: center; }
  .p-help .hlp-updown { grid-template-columns: minmax(0, 1fr); }
  .p-help .hlp-stuck-cta { width: 100%; min-height: 52px; }
}
