/* Coffee Help. /help: a search on a tinted panel, then every topic with its first answers. A topic or answer page:
   a search bar, topics down the side, one answer in a readable column, with examples drawn the way Coffee shows them.
   Uses the site's tokens from styles.css. */

/* The search, on every page. */
.help-search { position: relative; }
.help-search input {
  width: 100%; box-sizing: border-box; height: 46px; padding: 0 46px 0 44px;
  border: 1px solid var(--field); border-radius: 12px; background: var(--bg); color: var(--text);
  font: 400 16px/1 Inter, -apple-system, system-ui, sans-serif; transition: border-color .16s ease, box-shadow .16s ease;
}
.help-search input::placeholder { color: var(--muted); }
.help-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.help-search-icon { position: absolute; left: 15px; top: 23px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.help-key {
  position: absolute; right: 12px; top: 23px; transform: translateY(-50%); min-width: 20px; padding: 1px 6px;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface);
  color: var(--muted); font: 500 12px/1.6 "Geist Mono", ui-monospace, monospace; text-align: center; pointer-events: none;
}
.help-search input:focus ~ .help-key, .help-search input:not(:placeholder-shown) ~ .help-key { display: none; }
.help-search-big input { height: 60px; padding: 0 54px 0 52px; border-radius: 16px; font-size: 18px; box-shadow: 0 10px 30px rgba(40, 30, 20, .07); }
.help-search-big .help-search-icon { left: 20px; top: 30px; width: 20px; height: 20px; }
.help-search-big .help-key { right: 16px; top: 30px; font-size: 13px; }

/* The list under the search bar on a topic or answer page. */
.help-suggest {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(30, 25, 20, .14);
}
.help-suggest a { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 10px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 15px; }
.help-suggest small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.help-suggest li[aria-selected="true"] a, .help-suggest a:hover { background: var(--surface); }
.help-suggest-all a { color: var(--accent); font-size: 14px; }
.help-suggest mark, .help-result-list mark { background: color-mix(in srgb, var(--highlight) 75%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Device buttons. */
.help-segment { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); }
.help-seg { border: 0; background: transparent; padding: 0 12px; min-height: 34px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--body); cursor: pointer; white-space: nowrap; }
.help-seg:hover { color: var(--heading); }
.help-seg[aria-pressed="true"] { background: var(--bg); color: var(--heading); font-weight: 500; box-shadow: 0 1px 2px rgba(20, 20, 30, .1); }

/* /help */
.help-hero { margin-top: 24px; padding: 64px 32px 52px; border-radius: 28px; background: var(--surface); text-align: center; }
.help-hero h1 { font-size: clamp(38px, 6vw, 58px); letter-spacing: -.035em; line-height: 1.05; }
.help-lede { margin: 14px auto 0; max-width: 560px; color: var(--body); font-size: 18px; }
.help-hero .help-search { max-width: 720px; margin: 28px auto 0; text-align: left; }
.help-popular { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.help-popular span { padding: 6px 2px; }
.help-popular a { padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--body); text-decoration: none; }
.help-popular a:hover { color: var(--heading); border-color: var(--field); }

.help-front-body { max-width: 1120px; margin: 0 auto; padding: 44px 0 24px; }
.help-browse-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.help-browse-head h2 { font-size: 24px; letter-spacing: -.02em; }
.help-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 22px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.help-tile { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.help-tile h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 17px; letter-spacing: -.01em; }
.help-tile h3 a { color: var(--heading); text-decoration: none; }
.help-tile h3 a:hover { color: var(--accent); }
.help-tile-count { font: 500 12px "Geist Mono", ui-monospace, monospace; color: var(--muted); }
.help-tile ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.4; }
.help-tile li a { color: var(--body); text-decoration: none; }
.help-tile li a:hover { color: var(--accent); }
.help-tile-all { margin-top: auto; padding-top: 4px; font-size: 14px; font-weight: 500; text-decoration: none; }

.help-results { max-width: 760px; margin: 0 auto; }
.help-status { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.help-result-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.help-result-list a { display: grid; gap: 4px; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.help-result-list a:hover .help-result-title, .help-result-list a:focus .help-result-title { color: var(--accent); }
.help-result-title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--heading); }
.help-result-text { color: var(--body); font-size: 15.5px; line-height: 1.5; }
.help-result-meta { color: var(--muted); font-size: 13px; }
.help-empty { padding: 20px 0; color: var(--body); }

.help-stuck { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between; margin-top: 44px; padding: 26px 28px; border-radius: 18px; background: var(--surface); }
.help-stuck h2 { font-size: 19px; }
.help-stuck p { margin: 6px 0 0; color: var(--body); }
.help-stuck-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* A topic or answer page. */
.help-bar { display: flex; align-items: center; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.help-bar-home { color: var(--heading); font-weight: 600; text-decoration: none; white-space: nowrap; }
.help-bar .help-search { flex: 1 1 auto; max-width: 620px; }
.help-layout { display: flex; flex-wrap: wrap; gap: 0 56px; align-items: flex-start; }
.help-side { flex: 0 1 260px; padding: 28px 0; font-size: 14.5px; }
.help-side summary { display: none; }
.help-tree, .help-tree-answers { list-style: none; margin: 0; padding: 0; }
.help-tree { display: grid; gap: 2px; }
.help-tree-topic { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--body); text-decoration: none; }
.help-tree-topic span { color: var(--muted); font-size: 13px; }
.help-tree-topic:hover { color: var(--heading); background: var(--surface); }
.help-tree .is-open > .help-tree-topic { color: var(--heading); font-weight: 600; }
.help-tree-topic[aria-current="page"] { background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.help-tree-answers { margin: 2px 0 8px 10px; padding-left: 12px; border-left: 1px solid var(--line); display: grid; gap: 1px; font-size: 14px; }
.help-tree-answers a { display: block; padding: 5px 10px; border-radius: 7px; color: var(--body); text-decoration: none; line-height: 1.35; }
.help-tree-answers a:hover { color: var(--heading); background: var(--surface); }
.help-tree-answers a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); color: var(--accent); font-weight: 500; }

.help-main { flex: 999 1 560px; min-width: 0; padding: 32px 0 56px 56px; border-left: 1px solid var(--line); box-sizing: border-box; }
.help-crumbs { margin: 0; font-size: 14px; color: var(--muted); }
.help-crumbs a { color: var(--muted); text-decoration: none; }
.help-crumbs a:hover { color: var(--accent); }
.help-main h1 { margin: 12px 0 0; max-width: 720px; font-size: clamp(32px, 4.5vw, 42px); letter-spacing: -.03em; line-height: 1.1; }
.help-platforms { display: flex; gap: 6px; margin: 14px 0 0; }
.help-platform { font-size: 12.5px; font-weight: 500; color: var(--body); padding: 2px 9px; border-radius: 999px; background: var(--surface); }

.help-prose { max-width: 700px; margin-top: 22px; color: var(--body); font-size: 17px; line-height: 1.65; }
.help-prose > p:first-child { font-size: 19px; line-height: 1.55; color: var(--text); }
.help-prose p { margin: 14px 0 0; }
.help-prose .help-h { margin: 34px 0 0; font-size: 20px; letter-spacing: -.015em; color: var(--heading); }
.help-prose ol, .help-prose ul { margin: 12px 0 0; padding-left: 24px; }
.help-prose li + li { margin-top: 6px; }
.help-prose ol { counter-reset: step; list-style: none; padding-left: 0; }
.help-prose ol > li { position: relative; padding-left: 40px; counter-increment: step; }
.help-prose ol > li::before {
  content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--heading); font: 600 13px/26px Inter, sans-serif; text-align: center;
}
.help-prose code { font: 500 .86em "Geist Mono", ui-monospace, monospace; padding: 1px 5px; border-radius: 5px; background: var(--surface); color: var(--text); overflow-wrap: anywhere; }
.help-prose pre { margin: 14px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--surface); overflow-x: auto; }
.help-prose pre code { padding: 0; background: none; overflow-wrap: normal; font-size: 14px; line-height: 1.6; }
.help-prose kbd { display: inline-block; min-width: 1.5em; padding: 0 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); font: 500 13px/1.6 "Geist Mono", ui-monospace, monospace; text-align: center; }
.help-prose blockquote { margin: 14px 0 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--line); }
.help-prose mark.help-hit { background: color-mix(in srgb, var(--highlight) 75%, transparent); color: inherit; border-radius: 3px; }

/* Examples: what you type, and what Coffee shows. */
.hx { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 16px 0 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg); }
.hx-only, .hx-sums { grid-template-columns: minmax(0, 1fr); }
.hx-side { min-width: 0; padding: 14px 16px 16px; }
.hx-src { background: #fbfaf7; border-right: 1px solid var(--line); }
.hx-only .hx-src { border-right: 0; }
.hx-label { display: block; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.hx-src pre { margin: 0; padding: 0; background: none; }
.hx-src code { font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; }
.hx-page { font-size: 15.5px; line-height: 1.6; color: var(--text); }
.hx-page > :first-child { margin-top: 0; }
.hx-page h1 { font-size: 24px; margin: 0; letter-spacing: -.02em; }
.hx-page h2 { font-size: 19px; margin: 12px 0 0; }
.hx-page h3 { font-size: 16px; margin: 10px 0 0; }
.hx-page p, .hx-page ul, .hx-page ol, .hx-page pre, .hx-page .table-scroll { margin: 8px 0 0; }
.hx-page ol { list-style: decimal; padding-left: 22px; counter-reset: none; }
.hx-page ol > li { padding-left: 0; }
.hx-page ol > li::before { content: none; }
.hx-page ul { padding-left: 20px; }
.hx-page li.task { list-style: none; margin-left: -20px; display: flex; gap: 8px; align-items: baseline; }
.hx-page table { border-collapse: collapse; font-size: 14px; width: 100%; }
.hx-page th, .hx-page td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.hx-page th { background: var(--surface); font-weight: 600; }
.hx-page mark { background: color-mix(in srgb, var(--highlight) 75%, transparent); border-radius: 3px; padding: 0 2px; }
.hx-link { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.hx-embed { display: block; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--field); color: var(--muted); }
.hx-callout { margin: 8px 0 0; padding: 10px 14px 12px; border-radius: 12px; }
.hx-callout strong { display: block; font-size: 14.5px; }
.hx-callout-note { background: #edf3fc; color: #1d3a63; } .hx-callout-note strong { color: #2557a7; }
.hx-callout-tip { background: #ebf6ee; color: #1d4a2c; } .hx-callout-tip strong { color: #217a3c; }
.hx-callout-important { background: #f3effc; color: #3b2a66; } .hx-callout-important strong { color: #6440b5; }
.hx-callout-warning { background: #fdf4e3; color: #5c3d08; } .hx-callout-warning strong { color: #9a6200; }
.hx-callout-caution { background: #fcecec; color: #5f1d1d; } .hx-callout-caution strong { color: #b42323; }
.hx-sums .hx-label { padding: 14px 16px 0; margin: 0; }
.hx-sums .hx-page { padding: 10px 16px 6px; }
.hx-sum { display: flex; justify-content: space-between; gap: 24px; padding: 5px 0; font: 500 14.5px/1.5 "Geist Mono", ui-monospace, monospace; }
.hx-sum-gap { padding: 4px 0; }
.hx-sum-answer { color: var(--accent); white-space: nowrap; }
.hx-note { margin: 0; padding: 0 16px 14px; font-size: 13px; color: var(--muted); }

.help-related { max-width: 700px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
.help-related h2 { font-size: 15px; }
.help-related ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.help-related a { display: inline-block; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14.5px; }
.help-related a:hover { border-color: var(--field); color: var(--accent); }
.help-pager { max-width: 700px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.help-pager a { display: block; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); color: var(--heading); font-weight: 500; text-decoration: none; }
.help-pager a:hover { border-color: var(--field); }
.help-pager span { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.help-pager-next { text-align: right; }
.help-more { max-width: 700px; margin: 26px 0 0; font-size: 14.5px; color: var(--muted); }

.help-topic-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; max-width: 760px; margin-top: 18px; }
.help-topic-tools p { margin: 0; color: var(--muted); font-size: 14px; }
.help-list { list-style: none; margin: 16px 0 0; padding: 0; max-width: 760px; border-top: 1px solid var(--line); }
.help-list a { display: grid; gap: 4px; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.help-list-title { font-size: 17px; font-weight: 600; color: var(--heading); }
.help-list a:hover .help-list-title { color: var(--accent); }
.help-list-snippet { color: var(--body); font-size: 15px; line-height: 1.5; }

@media (max-width: 860px) {
  .help-layout { display: block; }
  .help-side { padding: 14px 0 0; }
  .help-side summary { display: list-item; cursor: pointer; padding: 10px 12px; border-radius: 10px; background: var(--surface); font-weight: 500; color: var(--heading); }
  .help-side[open] summary { margin-bottom: 8px; }
  .help-main { padding: 24px 0 48px; border-left: 0; }
  .help-key, .help-bar-home { display: none; }
  .hx { grid-template-columns: minmax(0, 1fr); }
  .hx-src { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .help-hero { padding: 40px 18px 34px; border-radius: 20px; }
  .help-search-big input { height: 54px; font-size: 17px; }
  .help-browse-head .help-segment, .help-topic-tools .help-segment { width: 100%; }
  .help-seg { flex: 1; padding: 0 6px; font-size: 13px; }
  .help-pager { grid-template-columns: minmax(0, 1fr); }
  .help-pager-next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .help-search input { transition: none; } }

/* Code shows each character as typed: Geist Mono's ligatures and the body's stylistic sets would draw ###### as one squashed mark. */
.help-prose code, .help-prose pre, .help-prose kbd, .hx-src code, .hx-sum, .help-key, .help-tile-count { font-feature-settings: normal; font-variant-ligatures: none; }

/* Pictures of Coffee at work. */
.help-shot { margin: 18px 0 0; }
.help-shot img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 18px 40px rgba(40, 30, 20, .08); }
.help-shot figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.help-shot-phone img { max-width: 320px; }
.help-shot-tablet img { max-width: 480px; }
.help-shot-phone figcaption, .help-shot-tablet figcaption { max-width: 480px; }
