/* V-Advisor UI. One component system; page styles do not set its dimensions. */
#v-advisor,
.advisor-launcher,
.advisor-toast {
  --va-ink: #22242c;
  --va-muted: #777b87;
  --va-line: #e7e8ed;
  --va-soft: #f6f7f9;
  --va-accent: #6558e8;
  --va-accent-soft: #f0edff;
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--va-ink);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}
#v-advisor *,
.advisor-launcher *,
.advisor-toast { box-sizing: border-box; }
#v-advisor [hidden] { display: none !important; }
#v-advisor :is(h2,h3,h4,p,figure,dl,dt,dd) { margin: 0; }
#v-advisor :is(button,input,textarea) { font: inherit; letter-spacing: 0; }
#v-advisor button { appearance: none; cursor: pointer; margin: 0; flex-shrink: 0; }
#v-advisor button:disabled { cursor: not-allowed; opacity: .42; }
#v-advisor :is(button,input,textarea):focus-visible,
.advisor-launcher:focus-visible { outline: 2px solid var(--va-accent); outline-offset: 3px; }
#v-advisor svg { display: block; width: 20px; height: 20px; flex: none; }
.advisor-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Launcher and dialog frame */
.advisor-launcher { position: fixed; left: max(20px,env(safe-area-inset-left)); bottom: max(20px,env(safe-area-inset-bottom)); z-index: 10005; display: flex; align-items: center; gap: 12px; height: 64px; padding: 8px 16px 8px 8px; border: 1px solid #e7e8ed; border-radius: 20px; background: #fff; box-shadow: 0 6px 24px #20242c14; cursor: pointer; direction: ltr; text-align: start; }
.advisor-launcher-avatar { width: 46px; height: 46px; border-radius: 14px; overflow: hidden; background: #f2f1f6; flex: none; }
.advisor-launcher-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.advisor-launcher-copy { display: grid; gap: 1px; direction: rtl; }
.advisor-launcher-copy strong { font-size: 13px; font-weight: 700; }
.advisor-launcher-copy small { font-size: 11px; color: var(--va-muted); }
.advisor-launcher-pulse { display: none; }
html.advisor-open .advisor-launcher { visibility: hidden; }
#v-advisor { position: fixed; inset: 0; z-index: 10010; display: none; align-items: center; justify-content: center; padding: 24px; background: #161a2447; direction: rtl; overflow: hidden; }
#v-advisor.is-open { display: flex; }
#v-advisor .advisor-container { position: relative; width: min(700px,100%); max-width: 700px; margin: 0; padding: 0; }
#v-advisor .advisor-head,
#v-advisor .advisor-domain-gate { display: none; }
#v-advisor .advisor-shell { position: relative; display: flex; width: 100%; height: min(780px,calc(100dvh - 48px)); min-height: 0; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 1px solid #e7e8ed; border-radius: 24px; background: #fff; box-shadow: 0 24px 80px #11182726; opacity: 1; transform: none; filter: none; visibility: visible; transition: none; }
#v-advisor .advisor-chat { display: flex; flex-direction: column; width: 100%; min-width: 0; min-height: 0; background: #fff; }
#v-advisor .advisor-side { display: none; }
#v-advisor.show-summary .advisor-chat { display: none; }
#v-advisor.show-summary .advisor-side { display: flex; }

/* Header: stable 44px controls in every state */
#v-advisor .advisor-chat-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 14px 20px; border-bottom: 1px solid var(--va-line); background: #fff; flex: none; }
#v-advisor .advisor-agent { display: flex; align-items: center; gap: 10px; min-width: 0; }
#v-advisor .advisor-agent-avatar { display: block; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; background: #f2f1f6; overflow: hidden; }
#v-advisor .advisor-agent-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
#v-advisor .advisor-agent-meta { min-width: 0; }
#v-advisor .advisor-agent-meta strong { display: block; color: var(--va-ink); font-size: 16px; line-height: 24px; font-weight: 700; }
#v-advisor .advisor-agent-meta span { display: block; font-size: 11px; line-height: 18px; color: var(--va-muted); }
#v-advisor .advisor-top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
#v-advisor .advisor-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--va-muted); white-space: nowrap; margin-inline-end: 4px; }
#v-advisor .advisor-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #589975; flex: none; }
#v-advisor .advisor-status.is-typing::before { background: var(--va-accent); }
#v-advisor :is(.advisor-widget-close,.advisor-brief-toggle,.advisor-reset,.advisor-summary-back,.advisor-summary-close) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; min-height: 44px; border: 1px solid var(--va-line); border-radius: 12px; background: #fff; color: var(--va-ink); font-size: 13px; font-weight: 600; line-height: 20px; padding: 0 12px; white-space: nowrap; text-decoration: none; }
#v-advisor :is(.advisor-widget-close,.advisor-summary-close) { width: 44px; min-width: 44px; padding: 0; font-size: 24px; font-weight: 400; }
#v-advisor :is(.advisor-widget-close,.advisor-brief-toggle,.advisor-reset,.advisor-summary-back,.advisor-summary-close):hover { background: var(--va-soft); }
#v-advisor .advisor-nav-icon { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; width: 18px; height: 18px; }

/* Progress: equal tracks, no shrinking text or controls */
#v-advisor .advisor-stagebar { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--va-line); background: #fff; flex: none; overflow: hidden; }
#v-advisor .advisor-stage { display: flex; align-items: center; justify-content: center; gap: 6px; color: #9195a0; min-width: 0; font-size: 11px; line-height: 18px; }
#v-advisor .advisor-stage i { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border: 1px solid var(--va-line); border-radius: 50%; font-size: 10px; font-style: normal; font-weight: 600; }
#v-advisor .advisor-stage b { font-weight: 600; white-space: nowrap; }
#v-advisor .advisor-stage.is-active { color: var(--va-accent); }
#v-advisor .advisor-stage.is-active i { background: var(--va-accent); color: #fff; border-color: var(--va-accent); }
#v-advisor .advisor-stage.is-done { color: #5b7d6d; }
#v-advisor .advisor-stage.is-done i { background: #f0f6f2; border-color: #dfebe3; }

/* Conversation. Time is metadata beneath the bubble, never a text column. */
#v-advisor .advisor-messages { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; width: 100%; gap: 20px; padding: 24px 20px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d6d9e0 transparent; }
#v-advisor .advisor-msg { display: grid; grid-template-columns: 28px minmax(0,1fr); column-gap: 8px; row-gap: 4px; width: fit-content; max-width: 91%; align-items: end; direction: ltr; }
#v-advisor .advisor-msg.assistant { align-self: flex-start; margin-right: auto; }
#v-advisor .advisor-msg.user { align-self: flex-end; margin-left: auto; grid-template-columns: minmax(0,1fr) 28px; }
#v-advisor .advisor-msg-avatar { grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--va-soft); color: #606575; font-size: 9px; font-weight: 700; line-height: 1; }
#v-advisor .advisor-msg-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
#v-advisor .advisor-msg.user .advisor-msg-avatar { grid-column: 2; background: #eff0f5; }
#v-advisor .advisor-msg-bubble { grid-column: 2; grid-row: 1; min-width: 0; padding: 12px 16px; border: 1px solid #e9ebf0; border-radius: 18px 18px 18px 5px; background: #fff; color: var(--va-ink); font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; text-align: start; }
#v-advisor .advisor-msg.user .advisor-msg-bubble { grid-column: 1; background: var(--va-accent-soft); border-color: var(--va-accent-soft); border-radius: 18px 18px 5px 18px; color: #373047; }
#v-advisor .advisor-msg-time { grid-column: 2; grid-row: 2; justify-self: start; padding-inline: 4px; color: #969ba6; font-size: 10px; line-height: 16px; white-space: nowrap; direction: auto; }
#v-advisor .advisor-msg.user .advisor-msg-time { grid-column: 1; justify-self: end; }
#v-advisor .advisor-typing { display: flex; gap: 4px; padding: 8px 2px; }
#v-advisor .advisor-typing i { width: 5px; height: 5px; border-radius: 50%; background: #9694a3; animation: va-typing 1s infinite alternate; }
#v-advisor .advisor-typing i:nth-child(2) { animation-delay: .15s; }
#v-advisor .advisor-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes va-typing { to { opacity: .3; transform: translateY(-3px); } }
#v-advisor:not(.has-messages) .advisor-messages { flex: 0 1 auto; }
#v-advisor .advisor-suggestions { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 0 20px 24px 56px; margin-bottom: auto; flex: none; }
#v-advisor .advisor-suggestion { display: flex; align-items: center; justify-content: flex-start; min-width: 0; min-height: 44px; height: auto; padding: 10px 14px; border: 1px solid var(--va-line); border-radius: 12px; color: #626674; background: #fff; font-size: 13px; line-height: 22px; text-align: start; white-space: normal; }
#v-advisor .advisor-suggestion::after { content: '↗'; font-size: 17px; color: #a0a2ae; margin-inline-start: auto; padding-inline-start: 12px; }
#v-advisor .advisor-suggestion:hover { background: var(--va-soft); border-color: #d7d8e0; }
#v-advisor.has-messages .advisor-suggestions { display: none; }

/* One composer frame. The input grows; the 44px actions never do. */
#v-advisor .advisor-composer { position: relative; display: grid; grid-template-columns: 44px 44px minmax(0,1fr); grid-template-areas: 'send voice input'; direction: ltr; align-items: end; gap: 6px; flex: none; width: calc(100% - 40px); margin: 24px 20px 20px; padding: 8px; border: 1px solid #dcdfe6; border-radius: 18px; background: #fff; box-shadow: 0 2px 6px #20232b04; }
#v-advisor .advisor-composer:focus-within { border-color: #b6b0df; box-shadow: 0 0 0 2px #6558e80a; }
#v-advisor .advisor-input-wrap { grid-area: input; min-width: 0; width: 100%; }
#v-advisor .advisor-composer textarea { display: block; width: 100%; min-width: 0; min-height: 44px; max-height: 120px; margin: 0; padding: 10px 6px; resize: none; border: 0; border-radius: 0; background: transparent; color: var(--va-ink); font-size: 16px; line-height: 24px; box-shadow: none; outline: none; text-align: start; direction: rtl; overflow-y: auto; }
#v-advisor .advisor-composer textarea::placeholder { color: #9296a2; opacity: 1; }
#v-advisor .advisor-composer-meta { position: absolute; top: -24px; right: 8px; left: auto; color: #a1a5b0; font-family: system-ui,sans-serif; font-size: 11px; line-height: 18px; direction: ltr; }
#v-advisor :is(.advisor-send,.advisor-voice) { display: grid; place-items: center; width: 44px; min-width: 44px; max-width: 44px; height: 44px; min-height: 44px; max-height: 44px; padding: 0; border: 0; border-radius: 12px; box-shadow: none; transition: background-color .15s; }
#v-advisor .advisor-send { grid-area: send; color: #fff; background: #292b36; }
#v-advisor .advisor-send:hover { background: var(--va-accent); }
#v-advisor .advisor-voice { grid-area: voice; color: #777b87; background: #f5f6f8; }
#v-advisor .advisor-voice:hover { color: var(--va-accent); background: var(--va-accent-soft); }
#v-advisor .advisor-voice.is-listening { color: #fff; background: #ac3b57; }

/* Brief: a separate, scrollable document with a stable header. */
#v-advisor .advisor-side { flex-direction: column; width: 100%; height: 100%; padding: 0 24px 24px; overflow-y: auto; overflow-x: hidden; background: #fafbfc; scrollbar-width: thin; overscroll-behavior: contain; outline: none; }
#v-advisor .advisor-side-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -24px 20px; padding: 16px 24px; border-bottom: 1px solid var(--va-line); background: #fff; }
#v-advisor .advisor-side-head > div:first-child { min-width: 0; }
#v-advisor .advisor-side-head h3 { font-size: 17px; font-weight: 700; line-height: 26px; }
#v-advisor .advisor-private { display: block; color: var(--va-muted); font-size: 11px; line-height: 18px; }
#v-advisor .advisor-domain-chip,
#v-advisor .advisor-live-pill { display: none; }
#v-advisor .advisor-side-head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
#v-advisor .advisor-reset { width: 44px; min-width: 44px; padding: 0; font-size: 0; }
#v-advisor .advisor-reset::before { content: '+'; font-family: system-ui,sans-serif; font-size: 25px; font-weight: 300; }
#v-advisor .advisor-score { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--va-line); border-radius: 16px; margin-bottom: 16px; background: #fff; }
#v-advisor .advisor-score-ring { position: relative; width: 100%; height: 4px; margin-top: 20px; border-radius: 8px; background: linear-gradient(to left,var(--va-accent) var(--score,0%),#edeef2 0); }
#v-advisor .advisor-score-ring span { position: absolute; top: -24px; right: 0; font-family: system-ui,sans-serif; font-size: 12px; color: var(--va-accent); font-weight: 600; }
#v-advisor .advisor-score p { color: var(--va-muted); font-size: 12px; line-height: 1.7; }
#v-advisor .advisor-brief-readiness { margin-top: 4px; }
#v-advisor .advisor-brief-readiness.is-ready { color: #39705a; }
#v-advisor .advisor-summary-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
#v-advisor .advisor-summary-item { padding: 16px; border: 1px solid var(--va-line); border-radius: 14px; background: #fff; min-width: 0; }
#v-advisor .advisor-summary-item.is-empty { display: none; }
#v-advisor #advisorDecision { margin-block: 16px; }
#v-advisor #advisorDecision > summary { cursor: pointer; padding-block: 10px; font-weight: 700; }
#v-advisor #advisorDecision dd { margin: 0; }
#v-advisor #advisorDecision [hidden], #v-advisor .advisor-score[hidden] { display: none; }
#v-advisor .advisor-stagebar[hidden] { display: none; }
#v-advisor .advisor-ready-card { margin: 8px 0; padding: 16px; border: 1px solid var(--va-line); border-radius: 14px; background: #fff; width: 100%; box-sizing: border-box; text-align: start; }
#v-advisor .advisor-ready-card strong { font-size: 15px; }
#v-advisor .advisor-ready-card p { font-size: 13px; line-height: 1.8; margin: 6px 0 12px; color: var(--va-muted); }
#v-advisor .advisor-ready-card > div { display: flex; flex-wrap: wrap; gap: 8px; }
#v-advisor .advisor-ready-card button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--va-line); border-radius: 10px; background: #202d27; color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
#v-advisor .advisor-ready-card .advisor-ready-continue { color: #202d27; background: #fff; }
#v-advisor .advisor-ready-card button:focus-visible { outline: 2px solid var(--va-accent); outline-offset: 3px; }
#v-advisor .advisor-summary-item dt { color: var(--va-muted); font-size: 11px; line-height: 18px; margin-bottom: 6px; }
#v-advisor .advisor-summary-item dd { font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; text-align: start; }
#v-advisor .advisor-action-hint { margin: 18px 0 0; padding: 11px 13px; border: 1px dashed #d9dbe4; border-radius: 12px; color: var(--va-muted); background: #fff; font-size: 11px; line-height: 1.8; }
#v-advisor .advisor-action-hint.is-ready { border-style: solid; border-color: #dbe9e0; color: #39705a; background: #f6fbf7; }
#v-advisor .advisor-side-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding-top: 20px; }
#v-advisor .advisor-action { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #dfe1e8; border-radius: 12px; background: #fff; color: #545868; font-size: 12px; line-height: 22px; }
#v-advisor .advisor-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#v-advisor .advisor-action.primary { color: #fff; background: #292b36; border-color: #292b36; grid-column: 1 / -1; }
#v-advisor .advisor-action:hover { background: var(--va-soft); }
#v-advisor .advisor-action.primary:hover { background: #3b3b50; }
#v-advisor .advisor-review-panel { padding-top: 20px; }
#v-advisor .advisor-review-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 12px; }
#v-advisor .advisor-review-head strong { font-size: 14px; }
#v-advisor .advisor-review-head span { color: var(--va-muted); font-size: 11px; }
#v-advisor .advisor-review-grid { display: grid; gap: 12px; }
#v-advisor .advisor-review-card { display: grid; grid-template-columns: 28px minmax(0,1fr); column-gap: 10px; padding: 16px; border: 1px solid var(--va-line); border-radius: 14px; background: #fff; }
#v-advisor .advisor-review-icon { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--va-accent); background: var(--va-accent-soft); }
#v-advisor .advisor-review-card h4 { font-size: 13px; font-weight: 700; }
#v-advisor .advisor-review-card p { margin-top: 6px; font-size: 13px; line-height: 1.9; color: #626674; white-space: pre-wrap; }
#v-advisor .advisor-supervisor { padding: 12px 0; font-size: 11px; line-height: 1.8; color: var(--va-muted); }
#v-advisor .advisor-review-copy { margin-top: 8px; }
#v-advisor .advisor-lead { display: none; margin-top: 20px; padding: 20px; border: 1px solid var(--va-line); border-radius: 16px; background: #fff; }
#v-advisor .advisor-lead.is-open { display: block; }
#v-advisor .advisor-lead h4 { font-size: 15px; }
#v-advisor .advisor-lead p { color: var(--va-muted); font-size: 12px; margin: 6px 0 16px; }
#v-advisor .advisor-lead-grid { display: grid; gap: 12px; }
#v-advisor .advisor-lead-grid input:not([type=checkbox]) { width: 100%; height: 48px; min-width: 0; padding: 10px 12px; border: 1px solid #dfe1e8; border-radius: 10px; background: #fff; font-size: 16px; color: var(--va-ink); }
#v-advisor .advisor-consent { display: flex; gap: 10px; align-items: flex-start; color: var(--va-muted); font-size: 11px; line-height: 1.8; }
#v-advisor .advisor-consent input { appearance: auto; flex: none; margin-top: 3px; width: 18px; height: 18px; accent-color: var(--va-accent); }
#v-advisor .advisor-lead button[type=submit] { height: 44px; border: 0; border-radius: 10px; background: #292b36; color: #fff; font-size: 13px; }
#v-advisor .advisor-privacy { margin-top: 12px; font-size: 10px; line-height: 1.8; color: var(--va-muted); }
#v-advisor .advisor-visual { margin-top: 20px; border: 1px solid var(--va-line); border-radius: 16px; overflow: hidden; background: #fff; }
#v-advisor .advisor-visual img { display: block; width: 100%; height: auto; }
#v-advisor .advisor-visual figcaption { padding: 12px 16px; color: var(--va-muted); font-size: 11px; line-height: 1.7; }
.advisor-toast { position: fixed; z-index: 10030; left: 50%; bottom: 24px; transform: translate(-50%,150%); width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: #292b36; color: #fff; box-shadow: 0 4px 20px #22242c20; opacity: 0; pointer-events: none; transition: opacity .15s,transform .15s; text-align: center; font-size: 13px; }
.advisor-toast.is-visible { opacity: 1; transform: translate(-50%,0); }

/* English follows the same measurements; only the reading direction changes. */
html.advisor-en #v-advisor { direction: ltr; }
html.advisor-en .advisor-launcher-copy { direction: ltr; }
html.advisor-en #v-advisor .advisor-msg.assistant { align-self: flex-start; }
html.advisor-en #v-advisor .advisor-msg.user { align-self: flex-end; }
html.advisor-en #v-advisor .advisor-suggestions { padding: 0 56px 24px 20px; }
html.advisor-en #v-advisor .advisor-composer { grid-template-columns: minmax(0,1fr) 44px 44px; grid-template-areas: 'input voice send'; }
html.advisor-en #v-advisor .advisor-composer textarea { direction: ltr; }
html.advisor-en #v-advisor .advisor-composer-meta { right: auto; left: 8px; }
html.advisor-en #v-advisor .advisor-score-ring { background: linear-gradient(to right,var(--va-accent) var(--score,0%),#edeef2 0); }

@media (max-width: 600px) {
  #v-advisor { padding: 0; }
  #v-advisor .advisor-container { width: 100%; max-width: none; height: 100%; }
  #v-advisor .advisor-shell { width: 100%; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  #v-advisor .advisor-chat-top { min-height: 68px; padding: max(10px,env(safe-area-inset-top)) 16px 10px; gap: 12px; }
  #v-advisor .advisor-agent-avatar { width: 36px; height: 36px; flex-basis: 36px; border-radius: 12px; }
  #v-advisor .advisor-agent-meta strong { font-size: 15px; }
  #v-advisor .advisor-agent-meta span { font-size: 10px; }
  #v-advisor .advisor-status { font-size: 0; gap: 0; width: 7px; margin: 0; }
  #v-advisor .advisor-top-actions { gap: 6px; }
  #v-advisor .advisor-stagebar { gap: 4px; padding: 10px 12px; }
  #v-advisor .advisor-stage { flex-direction: column; gap: 4px; font-size: 10px; line-height: 16px; }
  #v-advisor .advisor-messages { padding: 20px 16px; gap: 16px; }
  #v-advisor .advisor-msg { max-width: 96%; column-gap: 7px; }
  #v-advisor .advisor-msg-bubble { font-size: 14px; padding: 10px 14px; line-height: 1.8; }
  #v-advisor .advisor-suggestions { padding: 0 16px 20px 51px; }
  html.advisor-en #v-advisor .advisor-suggestions { padding: 0 51px 20px 16px; }
  #v-advisor .advisor-composer { width: calc(100% - 32px); margin: 24px 16px max(12px,env(safe-area-inset-bottom)); padding: 6px; }
  #v-advisor .advisor-side { padding: 0 16px 24px; }
  #v-advisor .advisor-side-head { margin: 0 -16px 16px; padding: max(12px,env(safe-area-inset-top)) 16px 12px; gap: 8px; }
  #v-advisor .advisor-side-head h3 { font-size: 16px; }
  #v-advisor .advisor-summary-back { width: 44px; min-width: 44px; padding: 0; }
  #v-advisor .advisor-summary-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  #v-advisor .advisor-summary-list { grid-template-columns: 1fr; gap: 10px; }
  #v-advisor .advisor-side-actions { grid-template-columns: 1fr; }
  #v-advisor .advisor-side-head-actions { gap: 6px; }
  .advisor-launcher { left: 16px; bottom: max(16px,env(safe-area-inset-bottom)); }
}
@media (max-width: 359px) {
  #v-advisor .advisor-chat-top { padding-inline: 12px; gap: 6px; }
  #v-advisor .advisor-agent { gap: 6px; }
  #v-advisor .advisor-agent-meta span { display: none; }
  #v-advisor .advisor-status { display: none; }
  #v-advisor .advisor-brief-toggle { padding-inline: 10px; }
  #v-advisor .advisor-composer { width: calc(100% - 24px); margin-inline: 12px; gap: 4px; }
  #v-advisor .advisor-messages { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #v-advisor *, .advisor-launcher, .advisor-toast { animation: none !important; transition: none !important; }
}
/* Preserve the host site's advisor entry link without inheriting dialog rules. */
.hero-actions .btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 18px; border: 1px solid #6558e84d; border-radius: 14px; color: #6558e8; background: #fff; font-weight: 700; text-decoration: none; }
.hero-actions .btn-ghost:hover { color: #fff; background: #6558e8; }
