/* FinChat guest chat — shared by the floating bubble, the homepage hero and /ask/.
   Markup contract lives in static/js/finchat-guest.js. */
.fcg { font-family: 'Inter Tight', system-ui, sans-serif; color: var(--c-text); }
.fcg [hidden] { display: none !important; }

.fcg-messages { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.fcg-row { display: flex; }
.fcg-user { justify-content: flex-end; }
.fcg-bubble { max-width: 88%; padding: 10px 14px; font-size: 14px; line-height: 1.6; border-radius: 16px; overflow-wrap: anywhere; }
/* Same chat look as the FinChat page and the homepage preview: your message in a
   light tile, answers as plain text. */
.fcg-user .fcg-bubble { background: var(--c-tile); color: var(--c-text); border-bottom-right-radius: 4px; }
.fcg-assistant .fcg-bubble { background: transparent; padding-left: 0; padding-right: 0; color: var(--c-text); }
.fcg-error .fcg-bubble { background: var(--c-warn-bg); border: 1px solid var(--c-warn-bg); padding: 10px 14px; color: var(--c-warn); }
.fcg-link { color: var(--c-brand); font-weight: 600; text-decoration: underline; text-decoration-color: var(--c-green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.fcg-link:hover { text-decoration-color: var(--c-brand); }
.fcg-bubble > * + * { margin-top: 8px; }
.fcg-bubble p { margin: 0; }
.fcg-list { margin: 0; padding-left: 1.3em; }
ol.fcg-list { list-style: decimal; }
ul.fcg-list { list-style: disc; }
.fcg-list li { padding-left: 2px; }
.fcg-list li + li { margin-top: 6px; }
.fcg-list li::marker { color: var(--c-brand); font-weight: 600; }
.fcg-disc { font-size: 12px; line-height: 1.5; color: var(--c-muted); }
.fcg-who { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-brand); }
.fcg-who::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-green); }

.fcg-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.fcg-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-grey); animation: fcgDot 1.2s infinite ease-in-out; }
.fcg-dots i:nth-child(2) { animation-delay: .15s; }
.fcg-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes fcgDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.fcg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fcg-chip { border: 1px solid var(--c-line); background: #fff; color: var(--c-brand); font-size: 13px; font-weight: 500; line-height: 1.3; padding: 8px 12px; border-radius: 999px; cursor: pointer; text-align: left; transition: background .15s, border-color .15s; font-family: inherit; }
.fcg-chip:hover { background: var(--c-mint-wash); border-color: var(--c-brand); }
.fcg-has-messages .fcg-chips { display: none; }
.fcg-busy .fcg-chip { pointer-events: none; opacity: .6; }

.fcg-form { display: flex; gap: 8px; align-items: center; }
.fcg-input { flex: 1; min-width: 0; border: 1px solid var(--c-line); background: #fff; border-radius: 12px; padding: 11px 14px; font-size: 15px; font-family: inherit; color: var(--c-text); }
.fcg-input:focus { outline: 3px solid var(--c-brand-hover); outline-offset: 1px; border-color: transparent; }
.fcg-send { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; min-width: 44px; padding: 0 18px; border: none; border-radius: 999px; background: var(--c-brand); color: #fff; font-size: 15px; font-weight: 500; cursor: pointer; font-family: inherit; }
.fcg-send:hover { background: var(--c-brand-hover); }
.fcg-send:disabled { opacity: .5; cursor: default; }

.fcg-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 13px; color: var(--c-muted); }
.fcg-meta [data-fcg-remaining] { white-space: nowrap; font-weight: 600; color: var(--c-brand); }
.fcg-wall { border: 1px solid var(--c-line); background: #fff; border-radius: 12px; padding: 16px; text-align: center; }
.fcg-wall p { margin: 0; font-size: 13px; color: var(--c-text); line-height: 1.5; }
.fcg-wall strong { display: block; font-size: 15px; color: var(--c-text); margin-bottom: 4px; }
.fcg-wall-ctas { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.fcg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 18px; border: 1.5px solid transparent; border-radius: 999px; font-size: 14px; font-weight: 500; line-height: 1.2; text-decoration: none; }
.fcg-btn-primary { background: var(--c-brand); color: #fff; }
.fcg-btn-primary:hover { background: var(--c-brand-hover); color: #fff; }
.fcg-btn-ghost { border-color: var(--c-brand); color: var(--c-brand); background: transparent; }

/* Homepage hero variant: white card, header line, chips on one row (scroll on phones). */
.fcg-hero { max-width: 720px; margin: 32px auto 0; background: #fff; border: 1px solid var(--c-line); border-radius: 20px; padding: 14px 16px 14px; text-align: left; box-shadow: 0 1px 2px rgba(52,68,62, .04), 0 18px 40px -24px rgba(15,107,75, .35); }
.fcg-hero-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; font-size: 15px; font-weight: 600; color: var(--c-brand); }
.fcg-hero-head svg { flex-shrink: 0; }
.fcg-hero-head span { font-weight: 500; color: var(--c-muted); }
.fcg-hero .fcg-messages { max-height: 380px; padding-right: 2px; }
.fcg-hero .fcg-assistant .fcg-bubble { background: transparent; }
.fcg-hero .fcg-input { background: var(--c-tile); }
.fcg-hero .fcg-input:focus { background: #fff; }
.fcg-hero .fcg-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fcg-hero .fcg-chips::-webkit-scrollbar { display: none; }
.fcg-hero .fcg-chip { flex-shrink: 0; white-space: nowrap; background: var(--c-tile); border-color: var(--c-line); }
.fcg-hero .fcg-messages:not(:empty) { margin-bottom: 12px; }
.fcg-hero .fcg-chips { margin-top: 12px; }
.fcg-hero .fcg-meta { margin-top: 10px; }

/* Floating bubble panel variant */
.fcg-panel .fcg-messages { flex: 1; padding: 16px; min-height: 240px; }
.fcg-panel .fcg-intro { font-size: 13px; color: var(--c-text); line-height: 1.5; margin: 0 0 4px; }
.fcg-panel .fcg-foot { border-top: 1px solid var(--c-line); padding: 10px 12px; background: var(--c-tile); display: flex; flex-direction: column; gap: 8px; }
.fcg-panel .fcg-input { font-size: 14px; padding: 9px 12px; }
.fcg-panel .fcg-send { height: 40px; min-width: 40px; padding: 0 12px; }

/* /ask/ page variant */
.fcg-page .fcg-messages { min-height: 200px; max-height: 60vh; margin-bottom: 16px; }

@media (max-width: 480px) {
  .fcg-hero { padding: 12px; border-radius: 16px; }
  .fcg-chip { font-size: 12.5px; }
}

/* Floating panel before the first message: no empty grey void. Greeting and
   starter questions sit at the top, the input at the bottom (Oct 2026). */
.fcg-panel { background: #fff !important; }
.fcg-panel:not(.fcg-has-messages) .fcg-messages { display: none; }
.fcg-panel:not(.fcg-has-messages) .fcg-foot { flex: 1; border-top: 0; background: #fff; padding: 20px 16px 12px; }
.fcg-panel:not(.fcg-has-messages) .fcg-chips { flex-direction: column; flex-wrap: nowrap; gap: 8px; margin-bottom: auto; }
.fcg-panel .fcg-intro { font-size: 15px; font-weight: 600; color: var(--c-text); margin: 0 0 6px; }
.fcg-panel:not(.fcg-has-messages) .fcg-chip { width: 100%; border-radius: 12px; padding: 11px 14px; font-size: 14px; background: var(--c-tile); border-color: transparent; }
.fcg-panel:not(.fcg-has-messages) .fcg-chip:hover { background: var(--c-mint-wash); border-color: transparent; }
.fcg-panel .fcg-messages { background: #fff; }
.fcg-intro-sub { font-size: 13px; color: var(--c-text); margin: 0 0 4px; }
.fcg-panel.fcg-has-messages .fcg-intro-sub { display: none; }
/* Home hero: on phones the starter questions wrap instead of scrolling off the edge. */
@media (max-width: 640px) {
  .fcg-hero .fcg-chips { flex-wrap: wrap; overflow-x: visible; }
  .fcg-hero .fcg-chip { white-space: normal; }
}

/* Facts tables from FinChat's market data tool */
.fcg-table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: 10px; }
.fcg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fcg-table th { background: var(--c-tile); text-align: left; font-weight: 600; color: var(--c-text); padding: 6px 10px; white-space: nowrap; }
.fcg-table td { padding: 6px 10px; border-top: 1px solid var(--c-line); color: var(--c-text); }
/* the bubble breaks long words anywhere; table labels should wrap at spaces only */
.fcg-table th, .fcg-table td { overflow-wrap: normal; word-break: normal; }
.fcg-table td + td, .fcg-table th + th { text-align: right; }

/* Answer bullets in mint, like the homepage FinChat preview. */
.fcg-assistant li::marker { color: var(--c-green); }
