/* Help Center: floating button + panel (every page) and the /help module. Site colors and type only. */
/* The floating Sprout button never covers the last row or its buttons: room to scroll past it (phones already have 120px). */
@media (min-width: 801px) { body:has(.hc-fab) main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }
.hc-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 0;
  background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 18px rgba(17,17,17,.22), 0 1px 3px rgba(17,17,17,.2);
  transition: transform .18s ease, background .15s ease;
}
.hc-fab:hover { background: var(--navy); transform: translateY(-1px); }
.hc-fab:focus-visible { outline: 3px solid rgba(30,144,255,.35); outline-offset: 2px; }
.hc-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; transition: transform .22s ease, opacity .18s ease; }
.hc-fab .hc-fab-x { opacity: 0; transform: rotate(-90deg) scale(.6); }
.hc-fab.open .hc-fab-q { opacity: 0; transform: rotate(90deg) scale(.6); }
.hc-fab.open .hc-fab-x { opacity: 1; transform: none; }
.hc-dot {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center; border: 2px solid #fff;
}
.hc-fab.open .hc-dot { display: none; }
body.nav-open .hc-fab, body:has(dialog[open]:not(#pm-swap):not(.sprout-mini)) .hc-fab, body:has(.ttv:not([hidden])) .hc-fab { display: none; } /* Sprout Mini sheets (Quick Calc, Task Card) leave the help and mic buttons where they are, dimmed under the backdrop: hiding them made them jump (Travis Oct 21 2026 10:12 PM "sprout and mic jump again when it comes out"). */
@media print { .hc-fab, .hc-panel { display: none !important; } }

.hc-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 1200; /* above page sheets, fly-outs and the phone filter sheet (1000), below the photo viewer (1500) */
  width: 400px; height: min(640px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(17,17,17,.22), 0 2px 8px rgba(17,17,17,.08);
  transform-origin: bottom right; animation: hc-in .2s ease;
}
.hc-panel[hidden] { display: none; }
@keyframes hc-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.hc-head { display: flex; align-items: center; gap: 4px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); min-height: 54px; }
.hc-title { flex: 1; min-width: 0; font-size: 1rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-ib { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; box-shadow: none; }
.hc-ib:hover { background: var(--paper); color: var(--ink); }
.hc-ib svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hc-body { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; padding: 16px; overscroll-behavior: contain; }
.hc-hello { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.hc-av { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; flex: none; }
.hc-av .ico { width: 18px; height: 18px; }
.hc-bubble { background: var(--paper); border-radius: 4px 14px 14px 14px; padding: 10px 12px; max-width: 100%; }
.hc-bubble.me { margin-left: auto; background: var(--blue); color: #fff; border-radius: 14px 4px 14px 14px; }
.hc-msg { display: flex; gap: 10px; margin: 10px 0; }
.hc-h { margin: 16px 0 8px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.hc-menu { display: grid; gap: 8px; }
.hc-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; text-decoration: none; box-shadow: none;
}
.hc-item:hover { border-color: var(--blue); background: #fff; color: var(--ink); }
.hc-item > .ico { width: 20px; height: 20px; color: var(--blue); }
.hc-item span { flex: 1; min-width: 0; }
.hc-item b { display: block; font-weight: 650; }
.hc-item small { display: block; color: var(--muted); font-size: .8rem; }
.hc-item .badge { flex: none; }
.hc-item::after { content: "›"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.hc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: .82rem; cursor: pointer; box-shadow: none; }
.hc-chip:hover { border-color: var(--blue); color: var(--blue); background: #fff; }
.hc-ask { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.hc-ask input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; background: var(--paper); font: inherit; }
.hc-ask input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,144,255,.15); background: #fff; }
.hc-send { width: 40px; height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; flex: none; }
.hc-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.hc-suggest { display: grid; gap: 4px; margin-top: 6px; }
.hc-suggest button { text-align: left; }

/* Article text (panel and page) */
.hc-prose { line-height: 1.6; overflow-wrap: anywhere; }
.hc-tip { min-width: 0; }
.hc-prose h3 { font-size: .95rem; margin: 18px 0 6px; }
.hc-prose img { max-width: 100%; border: 1px solid var(--line); border-radius: 10px; cursor: zoom-in; }
.hc-prose code { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .85em; }
.hc-tip { border-left: 3px solid var(--grass); background: var(--paper); border-radius: 0 10px 10px 0; padding: 10px 12px; margin: 12px 0; }
.hc-tip::before { content: "Tip  "; font-weight: 650; }
.hc-keys { list-style: none; padding: 0; display: grid; gap: 4px; }
.hc-keys b { display: inline-block; min-width: 22px; color: var(--blue); }
.hc-vote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.hc-vote button.on { border-color: var(--blue); color: var(--blue); }
.hc-crumb { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; color: var(--muted); font-size: .82rem; }
.hc-crumb .ico { color: var(--blue); }
.hc-lead { margin-top: -4px; }

/* Announcements */
.hc-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .78rem; margin: 14px 0 8px; }
.hc-divider::before, .hc-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hc-news-item h3 { font-size: 1rem; margin: 6px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hc-news-item.unread h3::before, .hc-unread { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none; display: inline-block; }
.hc-edit { font-size: .8rem; font-weight: 400; margin-left: auto; }
.hc-pill { display: block; width: max-content; margin: 0 auto 4px; }

/* /help page */
.hc-hero { text-align: center; padding: 34px 20px 26px; background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); }
.hc-hero h2 { font-size: 1.45rem; margin: 10px 0 4px; letter-spacing: -.01em; }
.hc-hero-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--blue); color: #fff; }
.hc-hero-ico .ico { width: 28px; height: 28px; }
.hc-hero-bar { max-width: 620px; margin: 18px auto 0; }
.hc-hero-bar .list-search { height: 46px; font-size: 1rem; }
.hc-results { max-width: 620px; margin: 12px auto 0; text-align: left; display: grid; gap: 8px; }
.rk-cards.hc-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rk-cards.hc-topics .rk-card > span, .rk-cards.hc-topics b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .rk-cards.hc-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } } /* tablets: two across so topic names stay one line */
.hc-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.hc-two > * { min-width: 0; } /* one-line rows inside never widen the columns */
.hc-line { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.hc-line:hover b { color: var(--blue); }
.hc-line b { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one line: ellipsis only when there is no room */
.hc-line .muted { flex: none; white-space: nowrap; }
.hc-article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.hc-article { max-width: 760px; }
.hc-related a { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.hc-reply { color: var(--navy); font-size: .85rem; }
.hc-status { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 800px) {
  /* left/top pinned with 100vw: iOS Safari stretches inset:0 to a page that is wider than the screen. */
  .hc-panel { inset: 0; right: auto; width: 100vw; max-width: 100vw; box-sizing: border-box; height: auto; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom); z-index: 1200; animation-name: hc-up; }
  /* Full-screen on phone: keep the header below the status bar (same safe-area rule as .top, dialog.field-ask.screen, #task-panel). */
  @keyframes hc-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
  body.hc-on .hc-fab { display: none; }
  body.hc-on { overflow: hidden; }
  /* Follows the visible area above the iPhone keyboard (set in assets/help.js); full screen until then. */
  .hc-panel { top: var(--hc-vvt, 0px); bottom: auto; height: var(--hc-vvh, 100dvh); }
  .hc-kb .hc-panel { padding-bottom: 0; }
  .rk-cards.hc-topics, .hc-two, .hc-article-wrap { grid-template-columns: minmax(0, 1fr); }
  .hc-hero { padding: 24px 14px 18px; }
  .hc-hero h2 { font-size: 1.15rem; }
}
.hc-ans { flex: 1; min-width: 0; display: grid; gap: 6px; }
.hc-art-h { margin: 0 0 8px; font-size: 1.05rem; }
.hc-req { display: grid; gap: 6px; }
.hc-req label { font-weight: 600; margin-top: 6px; }
.hc-req .row { margin-top: 10px; }
.hc-item { height: auto; min-height: 0; line-height: 1.35; white-space: normal; }
.hc-hero-bar { display: flex; }
.hc-hero-bar > * { flex: 1; min-width: 0; }

/* First-visit label beside the button (once per user). */
.hc-intro {
  position: fixed; right: 82px; bottom: calc(var(--hc-lift, 0px) + 31px); z-index: 60;
  background: var(--ink); color: #fff; font-size: .85rem; font-weight: 600; padding: 8px 12px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(17,17,17,.22); white-space: nowrap; pointer-events: none;
  animation: hc-intro-in .35s ease both;
}
.hc-intro::after { content: ""; position: absolute; right: -5px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-right: 0; border-left-color: var(--ink); }
.hc-intro.out { animation: hc-intro-out .3s ease both; }
@keyframes hc-intro-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes hc-intro-out { to { opacity: 0; transform: translateX(14px); } }
.hc-fab { bottom: calc(var(--hc-lift, 0px) + 20px); transition: transform .18s ease, background .15s ease, bottom .2s ease, opacity .2s ease; }
.hc-fab.hc-shy { opacity: 0; pointer-events: none; }
body.hc-on .hc-intro, body.nav-open .hc-intro { display: none; }
@media (max-width: 800px) {
  /* Smaller and tucked into the corner (16px in, so Sprout's big canvas, mascot.css ttm-big, never runs off a phone screen); --hc-lift (help.js) is the height of whatever bar is fixed at the bottom (dock, action bars). */
  .hc-fab { right: max(16px, env(safe-area-inset-right)); bottom: calc(var(--hc-lift, 0px) + 10px); width: 44px; height: 44px; }
  .hc-fab svg { width: 22px; height: 22px; }
  .hc-intro { right: calc(max(16px, env(safe-area-inset-right)) + 54px); bottom: calc(var(--hc-lift, 0px) + 18px); font-size: .8rem; }
  body:has(input:focus, textarea:focus, select:focus, [contenteditable]:focus) .hc-fab, body:has(input:focus, textarea:focus, [contenteditable]:focus) .hc-intro { display: none; }
}
.hc-fab[hidden], .hc-intro[hidden] { display: none; }
@media (min-width: 801px) { .hc-panel { bottom: calc(var(--hc-lift, 0px) + 84px); } }
/* Hover, keyboard focus and press use the site's blue button fill, so every line inside turns white to stay readable. */
.hc-item:hover, .hc-item:focus-visible, .hc-item:active,
.hc-chip:hover, .hc-chip:focus-visible, .hc-chip:active { background: #1873cc; border-color: #1873cc; color: #fff; outline: none; }
.hc-item:hover small, .hc-item:focus-visible small, .hc-item:active small,
.hc-item:hover > .ico, .hc-item:focus-visible > .ico, .hc-item:active > .ico,
.hc-item:hover::after, .hc-item:focus-visible::after, .hc-item:active::after { color: #fff; }
.hc-ib:focus-visible { background: var(--paper); color: var(--ink); outline: none; }
/* Mascot on the chat button (includes/mascot.php, assets/mascot.css). Same button size and tap target; the mascot fades out for the close arrow when the panel is open. */
.hc-fab .hc-fab-m { grid-area: 1 / 1; display: grid; place-items: center; transition: transform .22s ease, opacity .18s ease; }
.hc-fab .hc-fab-m .ttm { --ttm-size: 36px; }
@media (max-width: 800px) { .hc-fab .hc-fab-m .ttm { --ttm-size: 30px; } }

/* Panel loading with the mascot spinner off: grey rows shaped like the guides, a soft shimmer. */
.hc-skel .hc-item { cursor: default; }
.hc-skel .hc-item:hover { border-color: var(--line); }
.hc-skel .hc-item::after { content: none; }
.hc-skel i, .hc-skel b, .hc-skel small { display: block; border-radius: 6px; background: linear-gradient(90deg, #eef0f3 0%, #f8f9fb 50%, #eef0f3 100%) 0 0 / 200% 100%; animation: hc-shim 1.2s linear infinite; }
.hc-skel i { flex: none; width: 20px; height: 20px; }
.hc-skel b { width: 55%; height: 12px; margin: 2px 0 7px; }
.hc-skel small { width: 80%; height: 10px; }
@keyframes hc-shim { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .hc-skel i, .hc-skel b, .hc-skel small { animation: none; } }
/* Nothing saved and no answer: one line with Try again beside it. */
.hc-err { display: flex; align-items: center; gap: 10px; margin: 0; white-space: nowrap; }
.hc-err span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hc-err button { flex: none; }
/* Where and How (includes/help_text.php help_text_where_how): the card help for this guide, from help_text.json at view time. */
.hc-where { margin: 22px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.hc-where h3 { margin: 0 0 10px; }
.hc-where-item { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--grass); border-radius: 10px; background: var(--paper); margin: 0 0 12px; }
.hc-where-item h4 { margin: 0; font-size: 1rem; }
.hc-where-path { margin: 2px 0 8px; font-size: .8rem; color: var(--muted); }
.hc-where-item h5 { margin: 12px 0 2px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hc-where-item p { margin: 0; }
.hc-where-item .steps { margin: 6px 0 0; }
.hc-where-src { margin: 4px 0 0; font-size: .75rem; color: var(--muted); }
