/* Coach Austin — the persistent bottom bar (CORA's dock, in SwingCheck's approved cobalt / yellow / white).
   Mounted by sc_austin_dock.js on the signed-in app only (body.ax). The page reserves the bar's height, so the
   bar never covers content; on phones it sits on top of the tab bar, never over it. Page modals and sheets
   (z 54-56) and the full-screen player (z 200) still cover it. */
:root { --sc-adock-h: 84px; }
.sc-adock { position: fixed; z-index: 53; left: 184px; right: 0; bottom: 0; display: flex; justify-content: center;
  padding: 0 24px calc(12px + var(--sa-b, 0px)); pointer-events: none; font-family: inherit; }
.sc-adock-in { pointer-events: auto; width: 100%; max-width: 780px; display: flex; flex-direction: column; }
.sc-adock [hidden] { display: none !important; }
.sc-adock-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the panel: the whole conversation, above the bar */
.sc-adock-panel { display: flex; flex-direction: column; height: min(58dvh, 34rem); margin-bottom: 8px; overflow: hidden; background: #fff;
  border: 1px solid var(--sc-line, #dfe5f2); border-radius: 16px; box-shadow: 0 20px 35px -10px rgba(10, 30, 120, .22), 0 1px 3px rgba(10, 30, 120, .08);
  animation: sc-adock-in .16s ease-out both; }
@keyframes sc-adock-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sc-adock-panel { animation: none; } .sc-adock-mic:not(:disabled):not(.is-live) { animation: none !important; } }
.sc-adock-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; color: #fff; background: linear-gradient(120deg, var(--sc-cobalt-hi, #2a48e0), var(--sc-cobalt, #1029B8)); }
.sc-adock-head > img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .75); flex: none; }
.sc-adock-who { min-width: 0; flex: 1; }
.sc-adock-name { margin: 0; font-weight: 800; font-size: 15px; line-height: 1.1; display: flex; align-items: center; gap: 6px; }
.sc-adock-ai { font-size: 9px; font-weight: 800; letter-spacing: .08em; padding: 2px 5px; border-radius: 4px; background: var(--sc-yellow, #FFF000); color: #0a1650; }
.sc-adock-status { margin: 3px 0 0; font-size: 11.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-adock-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.sc-adock-tool { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 9px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.sc-adock-tool svg { width: 15px; height: 15px; }
.sc-adock-tool.is-on { background: var(--sc-yellow, #FFF000); color: #0a1650; border-color: var(--sc-yellow, #FFF000); }
.sc-adock-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: #fff; cursor: pointer; }
.sc-adock-x:hover, .sc-adock-tool:hover { background: rgba(255, 255, 255, .18); }
.sc-adock-tool.is-on:hover { background: #fff35a; }
.sc-adock-x svg { width: 18px; height: 18px; }
.sc-adock-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f7f9fe; }
.sc-adock-log .sc-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-adock-log .sc-msg.me { align-self: flex-end; background: var(--sc-cobalt, #1029B8); color: #fff; border-bottom-right-radius: 4px; }
.sc-adock-log .sc-msg.austin { align-self: flex-start; background: #fff; color: var(--sc-ink, #0a1650); border: 1px solid var(--sc-line, #dfe5f2); border-bottom-left-radius: 4px; }
.sc-adock-log .sc-msg.act { align-self: center; background: #fffcd0; color: var(--sc-ink, #0a1650); font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; }
.sc-adock-heard { margin: 0; padding: 8px 14px; font-size: 13px; font-style: italic; color: var(--sc-cobalt, #1029B8); background: #eef2fd; border-top: 1px solid var(--sc-line, #dfe5f2); }
.sc-adock-note { margin: 0; padding: 8px 14px; font-size: 12px; color: var(--sc-slate, #4a5578); background: #fffde0; border-top: 1px solid #f1e98a; }

/* the bar */
.sc-adock-bar { background: #fff; border: 1px solid var(--sc-line, #dfe5f2); border-radius: 14px; padding: 8px; box-shadow: 0 4px 14px -2px rgba(10, 30, 120, .16), 0 2px 4px -1px rgba(10, 30, 120, .06); }
.sc-adock-cap { display: none; margin: 0; padding: 0 4px 5px; font-size: 11px; line-height: 1; color: var(--sc-slate, #4a5578); }
.sc-adock-cap b { color: var(--sc-navy, #0a1650); font-size: 12px; } .sc-adock-cap i { font-style: normal; margin: 0 6px; color: #b9c2dc; }
.sc-adock-row { display: flex; align-items: flex-end; gap: 8px; }
.sc-adock-av { flex: none; width: 42px; height: 42px; padding: 0; border-radius: 50%; overflow: hidden; border: 2px solid var(--sc-yellow, #FFF000); background: #fff; cursor: pointer; box-shadow: 0 0 0 1px var(--sc-cobalt, #1029B8); }
.sc-adock-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.sc-adock-id { flex: none; display: flex; flex-direction: column; justify-content: center; height: 42px; padding-right: 12px; border-right: 1px solid var(--sc-line, #dfe5f2); }
.sc-adock-id b { font-size: 14px; font-weight: 800; color: var(--sc-navy, #0a1650); line-height: 1; } .sc-adock-id small { margin-top: 4px; font-size: 11px; color: var(--sc-slate, #4a5578); line-height: 1; }
#scBarInput { flex: 1; min-width: 0; min-height: 42px; max-height: 96px; resize: none; border: 0; outline: 0; background: transparent; padding: 11px 6px; font: inherit; font-size: 16px; line-height: 20px; color: var(--sc-ink, #0a1650); }
#scBarInput::placeholder { color: #8a94b3; }
.sc-adock-mic, .sc-adock-send { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.sc-adock-mic svg, .sc-adock-send svg { width: 20px; height: 20px; }
.sc-adock-mic { color: #fff; background: linear-gradient(180deg, var(--sc-cobalt-hi, #2a48e0), var(--sc-cobalt, #1029B8)); border-color: rgba(8, 20, 110, .5); box-shadow: 0 1px 2px rgba(5, 12, 60, .3);
  animation: sc-adock-beckon 2.4s ease-in-out infinite; }
@keyframes sc-adock-beckon { 0%, 100% { box-shadow: 0 0 0 0 rgba(16, 41, 184, .0), 0 1px 2px rgba(5, 12, 60, .3); } 50% { box-shadow: 0 0 0 5px rgba(16, 41, 184, .16), 0 1px 2px rgba(5, 12, 60, .3); } }
.sc-adock-mic.is-live { animation: none; color: #0a1650; background: var(--sc-yellow, #FFF000); border-color: #d8cb00; box-shadow: 0 0 0 4px rgba(16, 41, 184, .25); }
.sc-adock-mic:disabled { opacity: .4; cursor: not-allowed; animation: none; }
.sc-adock-send { color: #fff; background: var(--sc-navy, #0a1650); }
.sc-adock-send:hover:not(:disabled) { background: var(--sc-cobalt, #1029B8); }
.sc-adock-send:disabled { background: #c9d0e3; cursor: not-allowed; }
.sc-adock-av:focus-visible, .sc-adock-mic:focus-visible, .sc-adock-send:focus-visible, .sc-adock-tool:focus-visible, .sc-adock-x:focus-visible { outline: 3px solid var(--sc-yellow, #FFF000); outline-offset: 2px; }

/* the page makes room for the bar; the bar replaces the floating avatar shortcut (hidden, not removed) */
body.ax.sc-adock-on .ax-fab { display: none !important; }
@media (min-width: 901px) {
  body.ax.sc-adock-on .ax-main { padding-bottom: calc(40px + var(--sc-adock-h)); }
  html:has(body.ax.sc-adock-on) { scroll-padding-bottom: calc(var(--sc-adock-h) + 12px); }   /* scrolling to a control never parks it under the bar */
}
@media (max-width: 1180px) { .sc-adock { left: 172px; padding-left: 16px; padding-right: 16px; } }

/* phones: on top of the tab bar (64px + safe area), name and role as a caption line, full width */
@media (max-width: 900px) {
  :root { --sc-adock-h: 100px; }
  /* --sc-tabbar-h is the tab bar's measured height (safe area included), set by sc_austin_dock.js */
  body.ax.sc-adock-on { --ax-tab-h: calc(var(--sc-tabbar-h, 64px) + var(--sc-adock-h)); }   /* every bottom-reserving rule now clears the bar too */
  html:has(body.ax.sc-adock-on) { scroll-padding-bottom: calc(var(--sc-tabbar-h, 64px) + var(--sc-adock-h) + 8px); }
  .sc-adock { left: 0; padding: 0 calc(8px + var(--sa-r, 0px)) 6px calc(8px + var(--sa-l, 0px)); bottom: var(--sc-tabbar-h, 64px); }
  .sc-adock-bar { padding: 6px; }
  .sc-adock-cap { display: block; }
  .sc-adock-id { display: none; }
  .sc-adock-av, .sc-adock-mic, .sc-adock-send { width: 40px; height: 40px; } #scBarInput { min-height: 40px; padding: 10px 4px; }
  .sc-adock-panel { height: min(58dvh, calc(100dvh - var(--sc-tabbar-h, 64px) - var(--sc-adock-h) - var(--sa-t, 0px) - 16px)); }
  .sc-adock-tool span { display: none; } .sc-adock-tool { padding: 4px 8px; }
}
/* phone landscape: the tab bar is 56px, the caption goes, the panel takes what is left */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  :root { --sc-adock-h: 62px; }
  body.ax.sc-adock-on { --ax-tab-h: calc(var(--sc-tabbar-h, 56px) + var(--sc-adock-h)); }
  html:has(body.ax.sc-adock-on) { scroll-padding-bottom: calc(var(--sc-tabbar-h, 56px) + var(--sc-adock-h) + 8px); }
  .sc-adock { bottom: var(--sc-tabbar-h, 56px); padding-bottom: 4px; }
  .sc-adock-cap { display: none; }
  .sc-adock-panel { height: calc(100dvh - var(--sc-tabbar-h, 56px) - var(--sc-adock-h) - 12px); }
}

/* Austin's replies: light markdown rendered safely by sc_austin_dock.js (renderMd) */
.sc-adock-log .sc-msg.sc-md { white-space: normal; }
.sc-adock-log .sc-md p { margin: 0 0 6px; } .sc-adock-log .sc-md p:last-child, .sc-adock-log .sc-md ul:last-child, .sc-adock-log .sc-md ol:last-child { margin-bottom: 0; }
.sc-adock-log .sc-md .sc-md-h { font-weight: 800; margin: 6px 0 4px; } .sc-adock-log .sc-md .sc-md-h:first-child { margin-top: 0; }
.sc-adock-log .sc-md ul, .sc-adock-log .sc-md ol { margin: 0 0 6px; padding-left: 18px; } .sc-adock-log .sc-md li { margin: 2px 0; }

/* ── FULL-WIDTH BAR (Rich, 2026-11-10: "span the entire screen", CORA's integrated look) ─────────────────────────
   The bar is now a white strip along the whole bottom edge (border-top + soft shadow), not a floating card; the
   conversation still opens above it as a centred panel. The page keeps reserving the bar's height (.ax-main padding,
   --ax-tab-h on phones, --sc-dock-space on the site pages), so it never covers content. On the V2 desktop the strip
   runs under the side rail too, and the rail's footer is lifted clear of it. */
.sc-adock { left: 0 !important; right: 0; padding: 0 !important; }
.sc-adock-in { max-width: none; }
.sc-adock-panel { width: min(900px, calc(100% - 32px)); margin: 0 auto 8px; }
.sc-adock-bar { border: 0; border-top: 1px solid var(--sc-line, #dfe5f2); border-radius: 0; box-shadow: 0 -6px 18px -8px rgba(10, 30, 120, .18);
  padding: 10px max(24px, calc((100% - 1180px) / 2)) calc(10px + var(--sa-b, env(safe-area-inset-bottom, 0px))); }
@media (min-width: 901px) { body.ax.sc-adock-on .ax-side { padding-bottom: calc(var(--sc-adock-h) + 8px); } }
@media (max-width: 900px) {
  .sc-adock-bar { padding: 6px calc(10px + var(--sa-r, 0px)) 6px calc(10px + var(--sa-l, 0px)); }
  .sc-adock-panel { width: calc(100% - 16px); }
}
/* the site pages (no tab bar): the strip sits on the very bottom, with the home-indicator safe area inside it */
body.sc-adock-site .sc-adock-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
/* a button inside Austin's message (the guest "Sign Up Free"), and the guest question counter in the bar */
.sc-msg-cta { display: inline-flex; align-items: center; justify-content: center; margin-top: 10px; min-height: 44px; padding: 10px 20px; border-radius: 12px;
  background: var(--sc-yellow, #FFF000); color: var(--sc-navy, #0a1650) !important; font-weight: 800; font-size: 15px; text-decoration: none !important; box-shadow: 0 0 0 1px rgba(10, 22, 80, .18); }
.sc-msg-cta:hover, .sc-msg-cta:focus-visible { background: #fff86a; outline: 3px solid var(--sc-cobalt, #1029B8); outline-offset: 2px; }
.sc-guest-left { display: block; font-size: 11.5px; line-height: 1.2; color: var(--sc-slate, #4a5578); padding: 0 4px 4px; }
.sc-guest-left[data-left="0"] { color: var(--sc-cobalt, #1029B8); font-weight: 700; }

/* ── Rich, 2026-11-10 (screenshot): only the BACKGROUND strip spans the page; the chat itself is a centred bubble in a
   different colour from the strip, matching the page (soft cobalt-tinted strip, white bubble with a cobalt edge). ── */
.sc-adock-bar { background: #eef2fb; border-top-color: #d9e1f5; padding-left: max(16px, env(safe-area-inset-left, 0px)) !important; padding-right: max(16px, env(safe-area-inset-right, 0px)) !important; }
.sc-adock-row { width: 100%; max-width: 900px; margin: 0 auto; box-sizing: border-box; align-items: center; background: #fff;
  border: 1.5px solid #c7d2f3; border-radius: 18px; padding: 5px 6px 5px 8px; box-shadow: 0 2px 10px -3px rgba(16, 41, 184, .22); }
.sc-adock-row:focus-within { border-color: var(--sc-cobalt, #1029B8); box-shadow: 0 0 0 3px rgba(16, 41, 184, .14), 0 2px 10px -3px rgba(16, 41, 184, .22); }
.sc-adock-cap, .sc-guest-left { max-width: 900px; margin-left: auto !important; margin-right: auto !important; box-sizing: border-box; }
@media (max-width: 600px) { .sc-adock-row { border-radius: 16px; padding: 4px 4px 4px 6px; gap: 6px; } .sc-adock-id { display: none; } }
@media (max-height: 500px) { .sc-adock-bar { padding-top: 3px !important; padding-bottom: 3px !important; } .sc-adock-row { padding: 1px 3px 1px 5px; border-width: 1px; } }

/* ── 2026-11-11 (Rich): CORA's red microphone, always on the banner ─────────────────────────────────────────
   idle = solid red circle with a gentle beckon · listening = red with a pulsing ring · processing (Austin is
   thinking/speaking in a voice conversation) = yellow with a spinning ring · locked (voice not allowed for this
   account / browser) = visible, softer red, tap explains why. */
.sc-adock-mic { border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 30%, #ff5a5f, #e11d2e 55%, #b5121f); border-color: #9e0f1b;
  box-shadow: 0 2px 6px rgba(181, 18, 31, .45); animation: sc-adock-mic-beckon 2.4s ease-in-out infinite; }
.sc-adock-mic:hover:not(:disabled) { background: radial-gradient(circle at 35% 30%, #ff6b70, #ef2335 55%, #c0141f); }
@keyframes sc-adock-mic-beckon { 0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 46, 0), 0 2px 6px rgba(181, 18, 31, .45); } 50% { box-shadow: 0 0 0 6px rgba(225, 29, 46, .18), 0 2px 6px rgba(181, 18, 31, .45); } }
.sc-adock-mic.is-live { color: #fff; background: radial-gradient(circle at 35% 30%, #ff5a5f, #e11d2e 55%, #b5121f); border-color: #9e0f1b; animation: none; box-shadow: 0 0 0 4px rgba(225, 29, 46, .28); }
.sc-adock-mic.is-listening { animation: sc-adock-mic-listen 1.1s ease-out infinite; }
@keyframes sc-adock-mic-listen { 0% { box-shadow: 0 0 0 0 rgba(225, 29, 46, .55); } 100% { box-shadow: 0 0 0 14px rgba(225, 29, 46, 0); } }
.sc-adock-mic.is-busy { color: #0a1650; background: var(--sc-yellow, #FFF000); border-color: #d8cb00; position: relative; animation: none; box-shadow: none; }
.sc-adock-mic.is-busy::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid transparent; border-top-color: #e11d2e; animation: sc-adock-mic-spin .8s linear infinite; }
@keyframes sc-adock-mic-spin { to { transform: rotate(360deg); } }
.sc-adock-mic.is-locked { animation: none; opacity: .62; cursor: help; box-shadow: none; }
.sc-adock-mic:disabled { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .sc-adock-mic, .sc-adock-mic.is-listening, .sc-adock-mic.is-busy::after { animation: none !important; } }

/* 2026-11-11 (Rich): the send arrow reads clearly. Enabled (text entered) = strong cobalt circle, white arrow.
   Disabled only when there is genuinely nothing to send (empty box / Austin answering) = soft cobalt, still a
   visible white arrow, never washed-out grey. Same size and place; circular to match the red microphone. */
.sc-adock-send { border-radius: 50%; color: #fff; background: var(--sc-cobalt, #1029B8); border-color: #0a1d8a; box-shadow: 0 2px 6px rgba(16, 41, 184, .4); }
.sc-adock-send:hover:not(:disabled) { background: #2a48e0; }
.sc-adock-send:disabled { background: #8e9be0; border-color: transparent; box-shadow: none; color: #fff; cursor: not-allowed; }
.sc-adock-send svg { stroke-width: 2.6; }

/* 2026-11-11 (Rich): on the V2 desktop the bar starts to the RIGHT of the side rail, so it never covers the rail's lower
   items; the rail scrolls on its own if its items are taller than the screen. Phones (≤900px) and the site pages keep
   the full-width strip. Bar size, avatar, red mic and cobalt send are unchanged. */
@media (min-width: 901px) {
  body.ax.sc-adock-on .sc-adock { left: 184px !important; }
  body.ax.sc-adock-on .ax-side { padding-bottom: 12px; overflow-y: auto; overscroll-behavior: contain; }
}
@media (min-width: 901px) and (max-width: 1180px) { body.ax.sc-adock-on .sc-adock { left: 172px !important; } }
