/* Steward (web/steward-panel.js, web/ask-steward.js): the one assistant, its corner button, the one-time card and
 * the Help home banner. Its face is the AutoSteward mark, which stays blue in every design; everything else is the
 * design tokens, so all ten designs hold in light and dark. Sizes are the render system's whole-pixel steps
 * (CLAUDE.md, "Render system"). */

/* ---- the corner button ---- */
.st-launcher{position:fixed;right:20px;bottom:20px;z-index:120;display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:6px 18px 6px 6px;border:1px solid var(--line);border-radius:var(--r-stadium);color:var(--ink);background:var(--surface);font-family:inherit;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600;cursor:pointer;box-shadow:0 10px 28px rgba(6,20,38,.18);transition:transform .15s ease,border-color .15s ease}
.st-launcher:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--accent) 55%,var(--line))}
.st-launcher:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.st-launcher-mark{display:block;width:36px;height:36px;flex:none}
.st-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:var(--r-stadium);color:var(--accent-ink);background:var(--accent);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700}
.st-badge[hidden]{display:none}
.st-launcher .st-badge{position:absolute;top:-6px;right:-6px}
body.steward-open .st-launcher{display:none}

/* ---- the panel ---- */
.st-panel{position:fixed;top:0;right:0;bottom:0;z-index:150;display:flex;flex-direction:column;width:min(460px,100vw);color:var(--ink);background:var(--surface);border-left:1px solid var(--line);box-shadow:-16px 0 44px rgba(6,20,38,.2)}
.st-panel[hidden]{display:none}
@media (min-width:1280px){.st-panel{width:520px}}
/* The dealer sets the width by dragging the left edge (steward-panel.js setWidth). Open windows stop at the panel
 * instead of sitting under it: the auction import's fee boxes were behind it (owner, 2026-10-31). */
@media (min-width:641px){
  .st-panel{width:var(--st-panel-w,600px);max-width:70vw}
  body.steward-open :is(.modal-backdrop,.auction-modal-backdrop){right:var(--st-panel-w,600px)}
}
.st-resize{position:absolute;top:0;bottom:0;left:-4px;z-index:1;width:8px;cursor:ew-resize}
.st-resize::after{content:"";position:absolute;top:50%;left:2px;width:4px;height:40px;margin-top:-20px;border-radius:var(--r-stadium);background:var(--line)}
.st-resize:hover,.st-resize:focus-visible,body.st-resizing .st-resize{outline:0;background:color-mix(in srgb,var(--accent) 45%,transparent)}
body.st-resizing{cursor:ew-resize;user-select:none}
@media (max-width:640px){.st-resize{display:none}}
.st-head{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--accent) 6%,var(--surface))}
.st-head-mark{display:block;width:40px;height:40px;flex:none}
.st-head-name{display:flex;flex:1;flex-direction:column;min-width:0}
.st-head-name strong{font-size:var(--fs-lead);line-height:var(--lh-lead);font-weight:700}
.st-head-name small{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
.st-head-btn{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 12px;border:1px solid var(--line);border-radius:var(--r-stadium);color:var(--ink);background:var(--surface);font-family:inherit;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;cursor:pointer}
.st-head-btn:hover,.st-head-btn.on{border-color:var(--accent);color:var(--accent)}
.st-close{display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:var(--r-control);color:var(--muted);background:transparent;font-family:inherit;font-size:var(--fs-h3);line-height:var(--lh-h3);cursor:pointer}
.st-close:hover{color:var(--ink);background:var(--surface-soft)}
.st-body{flex:1;overflow-y:auto;padding:16px;container-type:inline-size}

/* ---- the conversation ---- */
.st-thread{display:flex;flex-direction:column;gap:18px}
.st-msg{display:flex;gap:10px;animation:stIn .2s ease}
@keyframes stIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.st-you{justify-content:flex-end}
.st-steward{align-items:flex-start}
.st-you p{max-width:85%;margin:0;padding:10px 14px;border-radius:18px 18px 4px 18px;color:var(--ink);background:color-mix(in srgb,var(--accent) 14%,var(--surface));overflow-wrap:anywhere}
.st-avatar{display:block;width:32px;height:32px;flex:none}
.st-bubble{display:flex;flex:1;flex-direction:column;gap:10px;min-width:0}
.st-answer-text{margin:0;overflow-wrap:anywhere}
.st-source{margin:0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
.st-muted{margin:0;color:var(--muted)}
.st-link{padding:0;border:0;color:var(--accent);background:none;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.st-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.st-thinking{display:flex;align-items:center;gap:10px;margin:0;color:var(--muted)}
.st-typing{display:inline-flex;gap:4px;align-items:center}
.st-typing i{width:6px;height:6px;border-radius:50%;background:var(--accent);animation:stDot 1s infinite ease-in-out}
.st-typing i:nth-child(2){animation-delay:.15s}
.st-typing i:nth-child(3){animation-delay:.3s}
@keyframes stDot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

/* ---- a guide, step by step ---- */
.st-guide{overflow:hidden;border:1px solid var(--line);border-radius:var(--r-surface);background:var(--surface)}
.st-guide-head{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-bottom:1px solid var(--line);background:var(--surface-soft)}
.st-guide-kicker{color:var(--accent);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.st-guide-head strong{font-size:var(--fs-body);line-height:var(--lh-body);font-weight:700}
.st-step{display:flex;flex-direction:column;gap:8px;padding:12px 14px}
.st-step-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.st-step-n{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
.st-dots{display:inline-flex;flex-wrap:wrap;gap:4px}
.st-dot{width:8px;height:8px;border-radius:50%;background:var(--line)}
.st-dot.on{background:var(--accent)}
.st-step h4{margin:0;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:700}
.st-step p{margin:0}
.st-warning{padding:8px 10px;border-left:4px solid var(--pui-risk,var(--accent));background:var(--surface-soft)}
.st-figure{display:flex;flex-direction:column;gap:6px;margin:0}
.st-zoom{position:relative;display:block;width:100%;padding:0;overflow:hidden;border:1px solid var(--line);border-radius:var(--r-control);background:var(--surface-soft);cursor:zoom-in}
.st-zoom img{display:block;width:100%;height:auto}
.st-marks{position:absolute;inset:0;pointer-events:none}
.st-mark{position:absolute;border:2px solid var(--accent);border-radius:6px;box-shadow:0 0 0 2px color-mix(in srgb,var(--surface) 70%,transparent)}
.st-mark b{position:absolute;top:-10px;left:-10px;display:flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:var(--r-stadium);color:var(--accent-ink);background:var(--accent);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700}
.st-figure figcaption{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
.st-pager{justify-content:space-between}
.st-done{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
.st-guide-foot{padding:10px 14px;border-top:1px solid var(--line);background:var(--surface-soft)}
.st-also{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
.st-chips{display:flex;flex-wrap:wrap;gap:8px}
.st-chip{min-height:32px;padding:4px 12px;border:1px solid var(--line);border-radius:var(--r-stadium);color:var(--ink);background:var(--surface);font-family:inherit;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:500;text-align:left;cursor:pointer}
.st-chip:hover{border-color:var(--accent);color:var(--accent)}
.st-did{gap:8px;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
.st-thanks{margin:0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}

/* ---- passing it to a person ---- */
.st-handoff{display:flex;flex-direction:column;gap:10px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r-surface);background:var(--surface-soft)}
.st-handoff p{margin:0}
.st-sent{border-color:var(--accent)}
.st-label{display:flex;flex-direction:column;gap:6px;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
.st-label textarea{width:100%;resize:vertical;font-family:inherit;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:400}
.st-check{display:flex;align-items:flex-start;gap:8px;font-size:var(--fs-small);line-height:var(--lh-small)}
.st-error{color:var(--pui-risk,var(--ink))}
.st-number{font-weight:600;letter-spacing:.02em}

/* ---- the first screen ---- */
.st-hello{display:flex;flex-direction:column;gap:10px}
.st-hello p{margin:0}
.st-hello-title{font-size:var(--fs-h3);line-height:var(--lh-h3);font-weight:700}
.st-hello .st-group{margin-top:6px;color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700;letter-spacing:.06em;text-transform:uppercase}

/* ---- the box ---- */
.st-foot{display:grid;grid-template-columns:1fr auto;align-items:end;gap:8px;padding:12px 16px 10px;border-top:1px solid var(--line)}
.st-foot textarea{min-height:44px;max-height:132px;padding:10px 12px;resize:none;border:1px solid var(--line);border-radius:var(--r-surface);color:var(--input-ink,var(--ink));background:var(--input-bg,var(--surface));font-family:inherit;font-size:var(--fs-body);line-height:var(--lh-body);outline:none}
.st-foot textarea:focus{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 18%,transparent)}
.st-send{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:var(--r-surface);color:var(--accent-ink);background:var(--accent);cursor:pointer}
.st-send svg{width:20px;height:20px}
.st-send:disabled{opacity:.5;cursor:default}
.st-privacy{grid-column:1/-1;margin:0;color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro)}
.st-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- your questions to the team ---- */
.st-questions{display:flex;flex-direction:column;gap:12px}
.st-questions-head{justify-content:space-between}
.st-questions h3{margin:0;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:700}
.st-tickets{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
.st-ticket{border:1px solid var(--line);border-radius:var(--r-surface)}
.st-ticket.unread{border-color:var(--accent)}
.st-ticket-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%;padding:10px 12px;border:0;color:var(--ink);background:transparent;text-align:left;font-family:inherit;font-size:var(--fs-body);line-height:var(--lh-body);cursor:pointer}
.st-status{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
.st-ticket .st-thread{gap:10px;padding:0 12px 12px}
.st-tmsg{padding:8px 10px;border-radius:var(--r-control);background:var(--surface-soft)}
.st-tmsg p{margin:0}
.st-tmsg-team{border-left:4px solid var(--accent)}
.st-from{color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700;letter-spacing:.04em;text-transform:uppercase}

/* ---- a picture, bigger ---- */
.st-lightbox{position:fixed;inset:0;z-index:160;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;background:rgba(8,16,26,.78)}
.st-lightbox-frame{position:relative;display:inline-block;max-width:96vw}
.st-lightbox-frame img{display:block;width:auto;max-width:96vw;max-height:82vh;border-radius:var(--r-control)}
.st-lightbox p{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;margin:0;color:#fff;text-align:center}

/* ---- the one-time card, and the Help home banner ---- */
.st-intro{position:fixed;right:196px;bottom:20px;z-index:141;display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;max-width:min(640px,calc(100vw - 232px));padding:14px 16px;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:var(--r-surface);box-shadow:var(--shadow-raised)}
.st-intro p{margin:0}
.st-intro .st-row{margin:0}
.st-intro-text{flex:1 1 280px;min-width:0}
.st-intro-mark{display:block;width:40px;height:40px;flex:none}
.help-ask-steward{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;margin:0 0 16px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-surface)}
.help-ask-steward img{display:block;width:44px;height:44px;flex:none}
.help-ask-steward>div{display:flex;flex:1;align-items:center;gap:14px;min-width:240px}
.help-ask-steward h2{margin:0 0 4px}
.help-ask-steward p{margin:0;color:var(--muted)}
/* "Ask Steward about this" inside a warning: the toast itself takes no clicks, its button does. */
.toast .toast-ask{display:block;margin-top:8px;padding:4px 10px;border:1px solid currentColor;border-radius:var(--r-control);color:inherit;background:transparent;font-family:inherit;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;cursor:pointer;pointer-events:auto}

/* On the guided sale the button is just Steward's face (owner's screenshots, 2026-10-28; QA 2026-10-27 MED 8): the
   sale card fills the middle of the window, and the full "Ask Steward" button floated over its right edge, and over the
   Total OTD, as the dealer scrolled. The face alone still opens the same panel; its name stays on it for screen readers. */
body:has(.sale-wizard) .st-launcher{padding:6px}
body:has(.sale-wizard) .st-launcher>span:not(.st-badge){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

@media (max-width:640px){
  .st-launcher{padding:6px}
  .st-launcher>span:not(.st-badge){display:none}
  .st-panel{width:100vw;border-left:0}
  .st-intro{right:16px;left:16px;bottom:84px;max-width:none}
  .st-chip,.st-head-btn,.st-link{min-height:44px}
  .st-row .button{min-height:44px}
}
