/* The help box (assets/help.js). Uses the site's colour tokens from site.css, so it follows light, dark and Auto. */
.hc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.site-foot { padding-bottom: 5rem; }   /* room so the Help button never sits on the footer's last line */
.hc-launch { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: inline-flex; align-items: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.15rem .7rem .95rem; border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper); font: inherit; font-weight: 700; font-size: .98rem; cursor: pointer;
  box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .55); }
.hc-launch:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.hc-launch[aria-expanded="true"] { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.hc-launch .hc-icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hc-panel { position: fixed; right: 16px; bottom: 80px; z-index: 61; width: min(400px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 104px)); display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-radius: 14px;
  box-shadow: var(--shadow), 0 24px 60px -28px rgba(0, 0, 0, .6); font-family: var(--body); }
.hc-panel[hidden] { display: none; }

.hc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: .9rem .9rem .75rem 1.1rem;
  border-bottom: 1px solid var(--rule); background: var(--paper); }
.hc-h { margin: 0; font-family: var(--display); font-size: 1.2rem; line-height: 1.2; color: var(--ink); }
.hc-sub { margin: .2rem 0 0; font-size: .82rem; line-height: 1.4; color: var(--ink-2); }
.hc-close { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
  border: 1px solid var(--rule); background: var(--card); color: var(--ink); cursor: pointer; }
.hc-close:hover { border-color: var(--brass-soft); }
.hc-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.hc-log { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1rem .5rem; display: flex; flex-direction: column; gap: .75rem; }
.hc-log:focus-visible { outline-offset: -3px; }
.hc-msg { max-width: 100%; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.hc-you { align-self: flex-end; max-width: 85%; padding: .5rem .8rem; border-radius: 14px 14px 4px 14px; background: var(--ink); color: var(--paper); }
.hc-bot { align-self: stretch; padding: .8rem .95rem; border-radius: 4px 14px 14px 14px; background: var(--paper); border: 1px solid var(--rule-soft); }
.hc-from { margin: 0 0 .2rem; font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); }
.hc-title { margin: 0 0 .35rem; font-family: var(--display); font-size: 1.02rem; line-height: 1.3; color: var(--ink); }
.hc-text { margin: 0; color: var(--ink); }
.hc-where { margin: .55rem 0 0; font-size: .85rem; color: var(--ink-2); }
.hc-more { display: inline-flex; align-items: center; gap: .35rem; margin-top: .6rem; font-weight: 700; color: var(--accent); }
.hc-more .hc-arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hc-chips { margin-top: .75rem; }
.hc-chips-label { margin: 0 0 .4rem; font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.hc-chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.hc-chip { display: inline-block; min-height: 36px; padding: .4rem .75rem; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--card); color: var(--accent); font: inherit; font-size: .86rem; line-height: 1.3; text-align: left; cursor: pointer; }
.hc-chip:hover { background: var(--accent-wash); }

.hc-form { display: flex; gap: .5rem; padding: .7rem .8rem; border-top: 1px solid var(--rule); background: var(--card); }
.hc-input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: .55rem .8rem; border-radius: 10px; border: 1px solid var(--rule);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; }
.hc-input::placeholder { color: var(--ink-2); opacity: 1; }
.hc-input:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.hc-send { flex: none; min-height: 44px; padding: 0 1.05rem; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font: inherit; font-weight: 700; cursor: pointer; }
.hc-send:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }

.hc-stuck { margin: 0; padding: .55rem 1rem .7rem; font-size: .84rem; line-height: 1.4; color: var(--ink-2); background: var(--card); }
.hc-stuck strong { color: var(--ink); }
.hc-stuck-inline { margin-top: .7rem; padding: 0; background: none; }

/* Phones: the box becomes a sheet across the bottom of the screen. */
@media (max-width: 599px) {
  .hc-launch { right: 12px; bottom: 12px; }
  .hc-panel { left: 0; right: 0; bottom: 0; width: 100%; height: 88vh; height: 88dvh; border-radius: 14px 14px 0 0; border-left: 0; border-right: 0; border-bottom: 0; }
  .hc-is-open .hc-launch { display: none; }
}
@media (max-height: 520px) and (min-width: 600px) { .hc-panel { bottom: 72px; height: calc(100vh - 88px); } }
@media (prefers-reduced-motion: no-preference) {
  .hc-panel:not([hidden]) { animation: hc-in .16s ease-out; }
  @keyframes hc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media print { .hc-launch, .hc-panel { display: none !important; } }
