/* Studio in-context help: "Show me" overlay, "?" panels and Ask Studio (help/coach.js).
   Brand: ink #1D1A1F, champagne #C5A572, orchid #8E3A6C, pearl #F6F5F7; Marcellus headings, Jost body; black primary buttons.
   Everything is namespaced .bsb-* so it can't clash with Studio's own styles. */
#bsbHelpRoot {
  --bsb-ink: #1D1A1F; --bsb-ink-soft: #5B5560; --bsb-champagne: #C5A572; --bsb-orchid: #8E3A6C; --bsb-pearl: #F6F5F7; --bsb-line: #E9E6EB; --bsb-silver: #DAD6DD;
  --bsb-display: "Marcellus", "Times New Roman", serif; --bsb-body: "Jost", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font: 400 17px/1.45 var(--bsb-body); color: var(--bsb-ink);
}
.bsb-safe-probe { position: fixed; inset: 0 auto auto 0; width: 0; height: 0; visibility: hidden; pointer-events: none;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
#bsbHelpRoot [hidden] { display: none !important; }
#bsbHelpRoot button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
#bsbHelpRoot :focus-visible { outline: 2px solid var(--bsb-orchid); outline-offset: 2px; }
#bsbHelpRoot .bsb-text:focus, #bsbHelpRoot .bsb-text:focus-visible { outline: none; }   /* focused only so screen readers read each step */
.bsb-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bsb-eyebrow { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--bsb-orchid); }
.bsb-muted { color: var(--bsb-ink-soft); margin: 0; padding: 12px 0; font-size: 16px; }
.bsb-soon { display: inline-block; margin-left: 8px; padding: 2px 8px; border: 1px solid var(--bsb-orchid); color: var(--bsb-orchid); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; vertical-align: middle; }

/* buttons: black primary, outlined secondary, 44pt minimum */
.bsb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--btn-h, 48px); min-width: 48px; padding: 10px 22px; border: 1px solid var(--bsb-ink); border-radius: 999px; background: #fff; color: var(--bsb-ink);
  font: 500 13px/1.2 var(--bsb-body) !important; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; text-decoration: none; transition: background .2s, color .2s; }
.bsb-btn-dark { background: var(--bsb-ink); color: #fff !important; box-shadow: 0 6px 16px -8px rgba(29, 26, 31, .6); }
.bsb-btn-sm { min-height: var(--btn-sm, 44px); padding: 8px 16px; }
.bsb-btn[disabled] { opacity: .45; cursor: default; }
@media (hover: hover) { .bsb-btn:not([disabled]):hover { background: var(--bsb-ink); color: #fff; } .bsb-btn-dark:not([disabled]):hover { background: #000; } }
.bsb-x { flex: none; width: var(--btn-h, 48px); height: var(--btn-h, 48px); display: grid; place-items: center; padding: 0; border: 1px solid var(--bsb-silver); border-radius: 50%; background: #fff; color: var(--bsb-ink); font: 400 18px/1 var(--bsb-body) !important; }
@media (hover: hover) { .bsb-x:hover { border-color: var(--bsb-ink); } }

/* ---------- the overlay: dim with a cut-out, a champagne ring and the callout ---------- */
.bsb-coach { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; }
.bsb-dim { position: fixed; background: rgba(29, 26, 31, .62); pointer-events: auto; transition: all .22s ease; }
.bsb-ring { position: fixed; pointer-events: none; border-radius: 10px; box-shadow: 0 0 0 2px var(--bsb-champagne), 0 0 0 6px rgba(197, 165, 114, .35), 0 12px 32px -8px rgba(0, 0, 0, .45); transition: all .22s ease; }
.bsb-coach.bsb-open .bsb-dim { background: rgba(29, 26, 31, .18); pointer-events: none; }   /* waiting for the person: don't block the page */
.bsb-coach.bsb-paused .bsb-dim, .bsb-coach.bsb-paused .bsb-ring, .bsb-coach.bsb-paused .bsb-callout { visibility: hidden; }
.bsb-callout { position: fixed; pointer-events: auto; box-sizing: border-box; max-height: calc(100vh - 24px); overflow: auto; padding: 18px 20px 18px; background: #fff; color: var(--bsb-ink);
  border-top: 3px solid var(--bsb-champagne); box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .12); display: grid; gap: 10px;
  transition: left .22s ease, top .22s ease; font: 400 17px/1.45 var(--bsb-body); }
.bsb-co-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px -8px 0 0; }
.bsb-callout h2 { margin: 0; font: 400 22px/1.2 var(--bsb-display); letter-spacing: .01em; color: var(--bsb-ink); }
.bsb-bar { height: 3px; background: var(--bsb-line); }
.bsb-bar i { display: block; height: 100%; background: var(--bsb-champagne); transition: width .22s ease; }
.bsb-text { margin: 4px 0 0; font-size: 17px; line-height: 1.45; outline: none; }
.bsb-note { margin: 0; padding: 10px 12px; background: var(--bsb-pearl); border-left: 3px solid var(--bsb-orchid); font-size: 15px; line-height: 1.45; color: var(--bsb-ink); }
.bsb-live { margin: 0; height: 0; overflow: hidden; }
.bsb-co-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.bsb-co-actions .bsb-btn-dark { min-width: 120px; }
.bsb-nudge { animation: bsb-nudge .35s ease; }
@keyframes bsb-nudge { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) {
  .bsb-dim, .bsb-ring, .bsb-callout, .bsb-bar i { transition: none; }
  .bsb-nudge { animation: none; }
}

@media (max-width: 500px) {
  .bsb-callout { padding: 14px 16px; gap: 8px; }
  .bsb-callout h2 { font-size: 19px; }
}

/* ---------- the Ask Studio button in every page header ---------- */
.bsb-ask-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--btn-h, 48px); min-width: var(--btn-h, 48px); padding: 0 20px 0 16px; border: 1px solid #DAD6DD; border-radius: 999px; background: #fff; color: #1D1A1F;
  font: 500 13px/1 "Jost", ui-sans-serif, system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: border-color .2s; }
.bsb-ask-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@media (hover: hover) { .bsb-ask-btn:hover { border-color: #1D1A1F; } }
@media (max-width: 767px) {
  .bsb-ask-btn { width: var(--btn-h, 48px); padding: 0; } .bsb-ask-btn span { display: none; }
  /* iPhone header: Ask sits beside the "?" at the top right */
  .cal-head { grid-template-areas: "date date date date ask help" "prev today next . block new" !important; }
  .cal-head .bsb-ask-btn { grid-area: ask; justify-self: end; }
  .page-head:not(.cal-head) { padding-right: calc(var(--pad, 16px) + 2 * var(--btn-h, 48px) + 16px) !important; }
  .page-head:not(.cal-head) .bsb-ask-btn { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: calc(var(--pad, 16px) + var(--btn-h, 48px) + 8px); }
}

/* ---------- "?" panel ---------- */
.bsb-pop-wrap, .bsb-ask-wrap { position: fixed; inset: 0; z-index: 2147482000; }
.bsb-pop-scrim { position: fixed; inset: 0; background: rgba(29, 26, 31, .12); }
.bsb-pop { position: fixed; box-sizing: border-box; overflow: auto; overscroll-behavior: contain; background: #fff; border: 1px solid var(--bsb-silver); border-top: 3px solid var(--bsb-champagne);
  box-shadow: 0 30px 60px -20px rgba(29, 26, 31, .5); padding: 16px 20px 14px; display: grid; gap: 12px; align-content: start; }
.bsb-pop-top, .bsb-ask-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bsb-pop h2, .bsb-ask h2 { margin: 4px 0 0; font: 400 24px/1.2 var(--bsb-display); color: var(--bsb-ink); }
.bsb-pop-ask { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid var(--bsb-silver); background: var(--bsb-pearl); color: var(--bsb-ink-soft); font-size: 16px !important; text-align: left; }
.bsb-pop-ask svg, .bsb-ask-field svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.bsb-pop-list { display: grid; }
.bsb-art { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--bsb-line); }
.bsb-art:last-child { border-bottom: 0; }
.bsb-art details { flex: 1; min-width: 0; }
.bsb-art summary { list-style: none; display: flex; align-items: center; flex-wrap: nowrap; min-height: 48px; padding: 6px 0; cursor: pointer; font-size: 17px; font-weight: 500; line-height: 1.3; }
.bsb-art-t { flex: 1; min-width: 0; }
.bsb-art summary::-webkit-details-marker { display: none; }
.bsb-art summary::after { content: "+"; margin-left: auto; padding-left: 10px; color: var(--bsb-orchid); font-weight: 400; }
.bsb-art details[open] summary::after { content: "–"; }
.bsb-art details p { margin: 0 0 6px; font-size: 16px; line-height: 1.45; color: var(--bsb-ink); }
.bsb-art .bsb-btn { margin-top: 2px; flex: none; }
.bsb-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--bsb-orchid); font-size: 16px; font-weight: 500; }
.bsb-pop-foot { border-top: 1px solid var(--bsb-line); padding-top: 4px; }
.bsb-pop-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--bsb-ink); font-size: 16px; font-weight: 500; }
.bsb-pop-foot a::after { content: "→"; margin-left: 8px; color: var(--bsb-orchid); }
/* iPhone: a bottom sheet, clear of the home indicator */
.bsb-sheet .bsb-pop-scrim { background: rgba(29, 26, 31, .5); }
.bsb-sheet .bsb-pop { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 82vh; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); border-left: 0; border-right: 0; }

/* ---------- Ask Studio ---------- */
.bsb-ask-scrim { position: fixed; inset: 0; background: rgba(29, 26, 31, .55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.bsb-ask { position: fixed; left: 50%; top: calc(48px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); box-sizing: border-box; width: min(680px, calc(100vw - 24px));
  max-height: calc(100vh - 72px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); overflow: auto; overscroll-behavior: contain;
  background: #fff; border-top: 3px solid var(--bsb-champagne); box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .6); padding: 20px 24px 24px; display: grid; gap: 14px; align-content: start; }
.bsb-ask-form { margin: 0; }
.bsb-ask-field { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 6px 0 16px; border: 1px solid var(--bsb-ink); background: #fff; color: var(--bsb-ink-soft); }
.bsb-ask-field input { flex: 1; min-width: 0; min-height: 52px; border: 0; outline: 0; background: transparent; color: var(--bsb-ink); font: 400 17px/1.3 var(--bsb-body); -webkit-appearance: none; appearance: none; }
.bsb-ask-field input:focus, .bsb-ask-field input:focus-visible { outline: none !important; }
.bsb-ask-field:focus-within { outline: 2px solid var(--bsb-ink); outline-offset: 0; }
.bsb-mic { flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--bsb-silver); border-radius: 50%; background: #fff; color: var(--bsb-ink); }
.bsb-mic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.bsb-mic.bsb-on { background: var(--bsb-orchid); border-color: var(--bsb-orchid); color: #fff; animation: bsb-pulse 1.4s ease-in-out infinite; }
@keyframes bsb-pulse { 50% { box-shadow: 0 0 0 8px rgba(142, 58, 108, .18); } }
@media (prefers-reduced-motion: reduce) { .bsb-mic.bsb-on { animation: none; } }
.bsb-ask-hint { margin: -4px 0 0; min-height: 22px; font-size: 15px; color: var(--bsb-ink-soft); }
.bsb-ask-results { display: grid; gap: 12px; }
.bsb-try-h { margin-top: 4px; }
.bsb-try { display: flex; flex-wrap: wrap; gap: 8px; }
.bsb-chip { min-height: 44px; padding: 0 16px; border: 1px solid var(--bsb-silver); border-radius: 999px; background: var(--bsb-pearl); color: var(--bsb-ink); font-size: 16px !important; }
@media (hover: hover) { .bsb-chip:hover { border-color: var(--bsb-ink); } }
.bsb-res { display: grid; gap: 8px; padding: 16px 18px; border: 1px solid var(--bsb-silver); background: #fff; }
.bsb-res-top { border-color: var(--bsb-ink); box-shadow: 0 14px 30px -20px rgba(29, 26, 31, .5); }
.bsb-res h3 { margin: 0; font: 400 21px/1.25 var(--bsb-display); }
.bsb-res > p:not(.bsb-eyebrow) { margin: 0; font-size: 17px; line-height: 1.45; }
.bsb-steps summary { display: inline-flex; align-items: center; min-height: 44px; min-width: 64px; cursor: pointer; color: var(--bsb-orchid); font-size: 16px; font-weight: 500; }
.bsb-steps ol { margin: 0 0 4px; padding-left: 22px; display: grid; gap: 6px; font-size: 16px; line-height: 1.45; }
.bsb-res-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 700px) {
  .bsb-ask { top: calc(8px + env(safe-area-inset-top, 0px)); left: 8px; right: 8px; transform: none; width: auto; max-height: calc(100vh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); padding: 16px 16px 18px; }
  .bsb-res { padding: 14px; }
}
