/* FirstMate Help Center search (2026-11-23). Home page only; scoped to the help home so shared header/footer are untouched.
   The red hero reaches the top of the page (behind the floating header) and uses the Ember glow for large red areas.
   Search mode: the hero compacts into a sticky bar ("Help Center", search box, popular topics until you scroll) and a
   ranked result list replaces the library. The switch is animated with a view transition (search.js); the CSS
   transitions below are the fallback for browsers without view transitions. */
.hc-main [data-hc-search-home]{--hc-under:122px;--hc-clear:120px;--hc-ease:cubic-bezier(.22,.8,.24,1)}
@media (max-width:960px){.hc-main [data-hc-search-home]{--hc-under:108px}}
@media (max-width:600px){.hc-main [data-hc-search-home]{--hc-under:98px}}

/* Hero: red to the top of the page, Ember glow. The gradient has a fixed height so it stays put while the hero shrinks. */
.hc-main [data-hc-search-home] .hc-hero{margin-top:calc(-1 * var(--hc-under));padding-top:calc(var(--hc-under) + 68px);
  background:linear-gradient(120deg,#db0000 0%,#b80c00 45%,#951400 100%) top/100% 640px no-repeat #951400;
  view-transition-name:hc-hero}
/* The title box hugs its text so the big and small headline have the same shape and scale into each other cleanly. */
.hc-main [data-hc-search-home] .hc-hero h1{view-transition-name:hc-title;width:fit-content;margin-inline:auto}
.hc-main [data-hc-search-home] .hc-search{view-transition-name:hc-search}
.hc-main [data-hc-search-home] .hc-popular-wrap{view-transition-name:hc-topics}
.hc-main [data-hc-search-home] .hc-results-head{view-transition-name:hc-results}
@media (max-width:760px){.hc-main [data-hc-search-home] .hc-hero{padding-top:calc(var(--hc-under) + 48px)}}

/* Popular topics fold away once you scroll the results. */
.hc-main .hc-hero .hc-popular-wrap{display:grid;grid-template-rows:1fr}
.hc-main .hc-hero .hc-popular-wrap>div{min-height:0;overflow:hidden}

/* Search mode */
.hc-main .is-searching .hc-hero{position:sticky;top:0;z-index:20;padding:calc(var(--hc-clear) + 10px) 0 20px;box-shadow:0 10px 24px -14px #4a0a0080}
/* The title keeps its size while searching (user, 2026-11-23); only the spacing around it tightens. */
.hc-main .is-searching .hc-hero h1{margin-bottom:20px}
.hc-main .is-searching .hc-search{margin-top:0}
.hc-main .is-searching .hc-popular{margin-top:16px}
.hc-main .is-searching.is-condensed .hc-hero .hc-popular-wrap{grid-template-rows:0fr;opacity:0;pointer-events:none}
/* Scrolling the results tightens the spacing a little more. */
.hc-main .is-searching.is-condensed .hc-hero{padding-top:calc(var(--hc-clear) + 2px);padding-bottom:14px}
.hc-main .is-searching.is-condensed .hc-hero h1{margin-bottom:12px}
@media (max-width:760px){
  .hc-main .is-searching .hc-hero{padding-bottom:16px}
  .hc-main .is-searching .hc-hero h1{margin-bottom:14px}
  .hc-main .is-searching.is-condensed .hc-hero{padding-bottom:12px}
  .hc-main .is-searching.is-condensed .hc-hero h1{margin-bottom:10px}
}

/* Fallback transitions (no view transitions) and the scroll condense of the topics. */
.hc-main .hc-hero,.hc-main .hc-hero h1,.hc-main .hc-search,.hc-main .hc-popular{transition:padding .4s var(--hc-ease),margin .4s var(--hc-ease),font-size .4s var(--hc-ease),letter-spacing .4s var(--hc-ease)}
.hc-main .hc-hero .hc-popular-wrap{transition:grid-template-rows .3s var(--hc-ease),opacity .2s ease}
html.hc-vt .hc-main .hc-hero,html.hc-vt .hc-main .hc-hero *,.hc-main .hc-no-anim .hc-hero,.hc-main .hc-no-anim .hc-hero *{transition:none!important}
@media (prefers-reduced-motion:reduce){.hc-main .hc-hero,.hc-main .hc-hero *{transition:none!important}}

/* View transition: the bar shrinks from the bottom while the title, box and topics glide to their new places. */
html.hc-vt::view-transition-group(*){animation-duration:.42s;animation-timing-function:var(--hc-ease,cubic-bezier(.22,.8,.24,1))}
html.hc-vt::view-transition-group(root){animation-duration:.3s}
/* The page below the bar: the old content leaves quickly, then the new content fades in (no muddy overlap). */
html.hc-vt::view-transition-old(root){animation:hc-vt-fade .12s ease both}
html.hc-vt::view-transition-new(root){animation:hc-vt-in .24s .1s ease both}
html.hc-vt::view-transition-old(hc-title),html.hc-vt::view-transition-new(hc-title){height:100%}
html.hc-vt::view-transition-group(hc-hero){overflow:clip}
html.hc-vt::view-transition-old(hc-hero),html.hc-vt::view-transition-new(hc-hero){height:100%;object-fit:none;object-position:top;mix-blend-mode:normal}
/* The red stays solid while it shrinks: the old bar holds full opacity and the new one fades in over it. */
html.hc-vt::view-transition-old(hc-hero){animation:none}
html.hc-vt-enter::view-transition-new(hc-hero){animation:hc-vt-in .18s ease both}
html.hc-vt-exit::view-transition-new(hc-hero){animation:none}
html.hc-vt::view-transition-old(hc-search),html.hc-vt::view-transition-new(hc-search){animation:none;mix-blend-mode:normal}
html.hc-vt::view-transition-old(hc-search){display:none}
html.hc-vt::view-transition-new(hc-results){animation:hc-vt-rise .38s .08s cubic-bezier(.22,.8,.24,1) both}
html.hc-vt::view-transition-old(hc-results){animation:hc-vt-fade .16s ease both}
@keyframes hc-vt-rise{from{opacity:0;transform:translateY(14px)}}
@keyframes hc-vt-fade{to{opacity:0}}
@keyframes hc-vt-in{from{opacity:0}}

/* One focus ring around the whole search box (white on red) instead of a red ring inside it. */
.hc-main .hc-search input:focus-visible{outline:none}
.hc-main .hc-search:focus-within{outline:3px solid #fff;outline-offset:3px}

/* Clear (x) button inside the search box replaces the browser's own, so every browser shows the same control. */
.hc-main .hc-search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;display:none}
.hc-main .hc-search .hc-search-clear{flex:none;display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:50%;background:transparent;color:#77716b;cursor:pointer}
.hc-main .hc-search .hc-search-clear:hover{background:#f8f6f4;color:#25221f}
.hc-main .hc-search .hc-search-clear svg{width:18px;height:18px;margin:0;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round}

/* Results */
.hc-main .hc-results{padding-block:34px 72px;min-height:62vh}
.hc-main .hc-results-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding-bottom:22px;border-bottom:1px solid var(--hc-line)}
.hc-main .hc-results-head h2{font-size:30px;font-weight:750;letter-spacing:-.7px;line-height:1.25;color:#25221f}
.hc-main .hc-results-head h2:focus{outline:none}
.hc-main .hc-results-q{color:#db0000;overflow-wrap:anywhere}
.hc-main .hc-results-meta{margin-top:8px;font-size:14.5px;color:var(--hc-muted)}
.hc-main .hc-results-note{margin-top:10px;font-size:14px;line-height:1.6;color:var(--hc-body)}
.hc-main .hc-results-note strong{color:#25221f;font-weight:700}
.hc-main .hc-results-clear{flex:none;font:inherit;font-size:13px;font-weight:600;color:#605b56;background:#fff;border:1px solid var(--hc-line);border-radius:999px;padding:10px 16px;cursor:pointer;margin-top:4px}
.hc-main .hc-results-clear:hover{border-color:#ffc8b5;color:#b80c00;background:#fff5f1}

.hc-main .hc-result-list{list-style:none;margin:0;padding:0}
.hc-main .hc-result-list>li{border-bottom:1px solid var(--hc-line);animation:hc-result-in .24s ease both}
.hc-main .hc-result-list>li:nth-child(2){animation-delay:.03s}.hc-main .hc-result-list>li:nth-child(3){animation-delay:.06s}
.hc-main .hc-result-list>li:nth-child(4){animation-delay:.09s}.hc-main .hc-result-list>li:nth-child(n+5){animation-delay:.12s}
@keyframes hc-result-in{from{opacity:0;translate:0 6px}}
@media (prefers-reduced-motion:reduce){.hc-main .hc-result-list>li{animation:none}}

.hc-main .hc-result{display:grid;grid-template-columns:128px minmax(0,1fr) 28px;align-items:center;gap:24px;margin:6px -14px;padding:14px;border-radius:12px;text-decoration:none;color:inherit}
.hc-main a.hc-result:hover{background:#f8f6f4}
.hc-main a.hc-result:hover .hc-result-title{color:#b80c00}
.hc-main .hc-result-thumb{display:block;aspect-ratio:8/5;border-radius:8px;overflow:hidden;background:#f8f6f4}
.hc-main .hc-result-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.hc-main .hc-result-text{display:flex;flex-direction:column;gap:5px;min-width:0}
.hc-main .hc-result-title{display:block;margin:0;font-size:18px;font-weight:700;letter-spacing:-.25px;line-height:1.35;color:#25221f;transition:color .15s}
.hc-main .hc-result-section{font-weight:600;color:var(--hc-body);margin-left:6px}
.hc-main .hc-result-section>span{color:var(--hc-muted);margin-right:2px}
.hc-main .hc-results-more{padding:22px 0 0}
.hc-main .hc-results-more button{font:inherit;font-size:14px;font-weight:600;color:#25221f;background:#fff;border:1px solid var(--hc-line);border-radius:999px;padding:11px 18px;cursor:pointer}
.hc-main .hc-results-more button:hover{border-color:#ffc8b5;background:#fff5f1;color:#b80c00}
.hc-main .hc-result-excerpt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:14.5px;line-height:1.65;color:var(--hc-body)}
.hc-main .hc-result-meta{font-size:12.5px;font-weight:600;color:var(--hc-muted)}
.hc-main .hc-result-go{display:grid;place-items:center;color:#db0000}
.hc-main .hc-result-go svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:translate .18s}
.hc-main a.hc-result:hover .hc-result-go svg{translate:4px 0}

/* Common questions in the results show their answer, open. */
.hc-main .hc-result-question{grid-template-columns:128px minmax(0,1fr);align-items:start}
.hc-main .hc-result-icon{display:grid;place-items:center;aspect-ratio:8/5;border-radius:8px;background:#fff5f1;color:#db0000;font-size:30px;font-weight:750;line-height:1}
.hc-main .hc-result-answer p{margin:0;font-size:14.5px;line-height:1.7;color:var(--hc-body);max-width:820px}
.hc-main .hc-result-answer p+p{margin-top:8px}
.hc-main .hc-result-answer a{color:#db0000;text-underline-offset:3px}
.hc-main .hc-result-answer a:hover{color:#b80c00}

/* Highlighted matches */
.hc-main .hc-results mark{background:#ffe6dc;color:inherit;border-radius:3px;padding:0 2px;margin:0 -1px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.hc-main .hc-result-title mark{background:#ffc8b5}

/* No results */
.hc-main .hc-results-empty{padding:34px 0 8px}
.hc-main .hc-results-empty>p{font-size:15.5px;line-height:1.7;color:var(--hc-body)}
.hc-main .hc-results-popular{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0 30px}
.hc-main .hc-results-popular a{font-size:14px;font-weight:600;color:#25221f;text-decoration:none;border:1px solid var(--hc-line);border-radius:999px;padding:10px 16px;background:#fff}
.hc-main .hc-results-popular a:hover{border-color:#ffc8b5;background:#fff5f1;color:#b80c00}
.hc-main .hc-results-help{display:flex;align-items:center;flex-wrap:wrap;gap:14px;font-size:15.5px;color:var(--hc-body)}
.hc-main .hc-results-support{display:inline-block;font-size:14px;font-weight:700;color:#fff!important;background:#db0000;border-radius:8px;padding:12px 20px;text-decoration:none}
.hc-main .hc-results-support:hover{background:#b80c00}

/* Phones (user, 2026-11-23): scrolling the results takes the title away and the bar stops with the search box just
   under the site menu bar, which stays put (sticky with a negative top, --hc-pin from search.js). Spacing stays fixed
   so the stop point doesn't move while scrolling. */
@media (max-width:760px){
  .hc-main .is-searching .hc-hero{top:calc(-1 * var(--hc-pin,0px))}
  .hc-main .is-searching.is-condensed .hc-hero{padding-top:calc(var(--hc-clear) + 10px)}
  .hc-main .is-searching.is-condensed .hc-hero h1{margin-bottom:14px}
}
@media (max-width:760px){
  .hc-main .is-searching .hc-hero{padding-bottom:12px}
  .hc-main .hc-results{padding-top:24px}
  .hc-main .hc-results-head{flex-direction:column;gap:14px}
  .hc-main .hc-results-head h2{font-size:24px}
  .hc-main .hc-result{grid-template-columns:84px minmax(0,1fr);gap:16px;margin-inline:-8px;padding:12px 8px}
  .hc-main .hc-result-go{display:none}
  .hc-main .hc-result-question{grid-template-columns:84px minmax(0,1fr)}
  .hc-main .hc-result-icon{font-size:22px}
  .hc-main .hc-result-title{font-size:16px}
  .hc-main .hc-result-excerpt,.hc-main .hc-result-answer p{font-size:14px}
}
@media (max-width:560px){
  .hc-main .hc-result,.hc-main .hc-result-question{grid-template-columns:64px minmax(0,1fr);gap:14px}
  .hc-main .hc-search{padding:5px;border-radius:10px}
  .hc-main .hc-search svg{width:19px;height:19px}
  .hc-main .hc-search input{font-size:16px;line-height:22px;padding:8px 4px}
  .hc-main .hc-search input::placeholder{font-size:13px}
  .hc-main .hc-search button{line-height:20px;padding:9px 14px;border-radius:7px}
  .hc-main .hc-search .hc-search-clear{width:30px;height:30px}
  .hc-main .hc-results-clear{display:none}
}
