/* Clear primary actions, event-aligned prices, and a roomy research conversation. */
.topic-heading-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:1rem; }
.topic-heading-actions>p { flex:1; min-width:12rem; margin:0; color:var(--muted); font-size:0.935rem; }
.topic-ai-button { display:inline-flex; align-items:center; justify-content:center; gap:.6rem; border:1px solid #cdd8d2; border-radius:.8rem; background:#fff; color:#536783; box-shadow:none; cursor:pointer; font-weight:650; white-space:nowrap; transition:background-color 160ms ease,border-color 160ms ease,color 160ms ease; }
.topic-ai-button.primary { min-height:46px; padding:.6rem 1.05rem; font-size:0.902rem; }
.topic-ai-button svg { flex:none; width:24px; height:24px; padding:4px; border-radius:7px; background:#f0f4f7; color:#5e7087; fill:none; stroke:currentColor; stroke-width:1.45; }
.topic-ai-button>span:last-child { margin-left:.25rem; color:#626d67; font-size:0.88rem; font-weight:400; }
.topic-ai-button:hover { border-color:#a9b9c5; background:#f5f8fa; color:#354e6c; }
.topic-ai-button:hover svg { background:#e9f0f5; color:#546f8e; }
.topic-ai-button:active { background:#edf3f4; }
.briefing-page .topic-ai-button:focus-visible { outline:2px solid #718ba5; outline-offset:3px; }
.topic-ai-button.compact { width:100%; min-height:34px; margin-top:auto; padding:.35rem .6rem; border-color:#dce4df; border-radius:.5rem; background:#fcfdfc; font-size:0.8125rem; font-weight:600; }
.topic-ai-button.compact svg { width:16px; height:16px; padding:0; background:transparent; }
.topic-ai-button.compact:hover { border-color:#a9b9c5; background:#f5f8fa; }
.topic-ai-button.compact:hover svg { background:transparent; }
.briefing-page .report-section[hidden],.hf-data-link[hidden] { display:none; }
.hf-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.7rem; margin-top:.2rem; }
.hf-footer .topic-ai-button { margin-left:auto; }
.fr { display:flex; flex-direction:column; gap:.75rem; }
.fr-preview { display:grid; grid-template-columns:1.4rem minmax(0,1fr); gap:.4rem .5rem; align-items:start; width:100%; padding:0; border:0; background:transparent; color:inherit; text-align:left; font:inherit; cursor:pointer; }
.fr-preview img { grid-column:1/3; }
.fr-preview:focus-visible { border-radius:.65rem; }
.statement-explorer { display:grid; grid-template-columns:230px minmax(0,1fr); overflow:hidden; border:1px solid var(--line); border-radius:1.2rem; background:#fff; box-shadow:var(--shadow); }
.statement-event-sidebar { padding:1.25rem 1rem; border-right:1px solid var(--line); background:#f8faf8; }
.statement-sidebar-head .section-kicker { font-size:0.8125rem; }
.statement-sidebar-head h3 { margin:.45rem 0 .55rem; font-size:1.188rem; letter-spacing:-.03em; }
.statement-archive-label { display:inline-flex; padding:.2rem .45rem; border-radius:999px; background:#edf1ee; color:#616e67; font-size:0.8125rem; }
.statement-event-list { display:grid; gap:.55rem; margin-top:1rem; }
.statement-event-button { display:flex; align-items:flex-start; gap:.7rem; width:100%; padding:.8rem .65rem; border:1px solid transparent; border-radius:.85rem; background:transparent; color:var(--ink); text-align:left; font:inherit; cursor:pointer; }
.statement-event-button:hover { background:#edf2ef; }
.statement-event-button[aria-pressed=true] { border-color:#c5d1f0; background:#fff; box-shadow:0 5px 15px rgba(65,105,225,.06); }
.statement-avatar { display:grid; flex:none; width:31px; height:31px; place-items:center; border:1px solid #dce5df; border-radius:50%; background:#fff; color:#53615c; font-size:0.8125rem; font-weight:800; }
.statement-event-button[aria-pressed=true] .statement-avatar { border-color:#4169e1; background:var(--blue); color:#fff; }
.statement-event-button b { display:block; font-size:0.8125rem; line-height:1.45; }
.statement-event-button small { display:block; margin-top:.3rem; color:#646e69; font-size:0.8125rem; line-height:1.5; }
.statement-workspace { min-width:0; padding:1.4rem 1.5rem; }
.statement-chart-heading { display:flex; justify-content:space-between; align-items:start; flex-wrap:wrap; gap:1rem; }
.statement-channel { color:var(--blue); font-size:0.8125rem; font-weight:700; }
.statement-chart-heading h3 { margin:.4rem 0 .45rem; font-size:1.25rem; letter-spacing:-.03em; }
.statement-datetime { margin:0; color:#647169; font-size:0.8125rem; }
.statement-source { color:var(--blue); font-size:0.8125rem; font-weight:700; white-space:nowrap; }
.statement-source:hover { text-decoration:underline; text-underline-offset:3px; }
.statement-excerpt { margin:1rem 0 1.2rem; padding:.7rem .9rem; border-left:3px solid #e6c765; background:#fbfaf3; color:#667066; font-size:0.8125rem; line-height:1.65; }
.statement-chart-toolbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.8rem; }
.statement-asset-controls { display:flex; gap:.4rem; }
.statement-asset-controls button { display:inline-flex; align-items:center; flex-wrap:wrap; gap:.35rem; padding:.4rem .55rem; border:1px solid var(--line); border-radius:.55rem; background:#fff; color:#657069; font-size:0.8125rem; font-weight:700; cursor:pointer; }
.statement-asset-controls button small { font-size:0.8125rem; font-weight:500; }
.statement-asset-controls button[aria-pressed=true] { background:#f7f9fc; color:var(--ink); border-color:#cbd5eb; }
.statement-asset-controls i { width:.45rem; height:.45rem; border-radius:50%; opacity:.3; }
.statement-asset-controls [aria-pressed=true] i { opacity:1; }
.statement-asset-controls .spy { background:#4169e1; }
.statement-asset-controls .qqq { background:#2d9c75; }
.statement-chart-options { display:flex; flex-wrap:wrap; gap:.6rem; }
.statement-chart-options label { display:grid; gap:.18rem; color:#646e69; font-size:0.8125rem; }
.statement-chart-options select { max-width:145px; padding:.3rem .4rem; border:1px solid var(--line); border-radius:.4rem; background:#fff; color:#53615c; font-size:0.8125rem; }
.statement-chart-scroll { overflow-x:auto; margin-top:1rem; scrollbar-width:thin; }
.statement-chart-scroll svg { display:block; width:100%; min-width:640px; height:auto; }
.statement-chart-scroll .statement-series { fill:none; stroke-width:2.6; stroke-linejoin:round; stroke-linecap:round; }
.statement-chart-scroll .chart-cursor-point { stroke:#fff; stroke-width:2; }
.statement-chart-key { display:flex; justify-content:space-between; flex-wrap:wrap; gap:.5rem; margin-top:.2rem; color:#646e69; font-size:0.8125rem; }
.statement-chart-key>span:first-child { display:inline-flex; align-items:center; gap:.4rem; color:#9f5c53; }
.statement-event-line { width:2px; height:.75rem; background:#d77e72; }
.statement-cursor { margin-top:1rem; padding:.75rem .85rem; border:1px solid var(--line); border-radius:.75rem; background:#fafbf9; }
.statement-cursor>label { color:#646f69; font-size:0.8125rem; }
.statement-cursor input { display:block; width:100%; height:12px; margin:.6rem 0; accent-color:#4169e1; cursor:pointer; }
.statement-readout { display:flex; flex-wrap:wrap; align-items:baseline; gap:.35rem 1rem; color:#53615c; font-size:0.8125rem; font-variant-numeric:tabular-nums; }
.statement-readout time { color:#636e67; font-size:0.8125rem; }
.statement-readout b { font-weight:750; }
.statement-readout .spy { color:#3e64d8; }
.statement-readout .qqq { color:#24795c; }
.statement-price-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.55rem; margin-top:.9rem; }
.statement-price-metrics>div { padding:.75rem; border-radius:.65rem; background:#f1f5f2; }
.statement-price-metrics small,.statement-price-metrics span { display:block; color:#66706a; font-size:0.8125rem; line-height:1.5; }
.statement-price-metrics b { display:block; margin:.3rem 0; font-size:1.155rem; letter-spacing:-.025em; font-variant-numeric:tabular-nums; }
.statement-chart-note { margin:1rem 0 0; color:#646e69; font-size:0.8125rem; line-height:1.7; }
.statement-reference { margin-top:1.25rem; }
.statement-reference>summary { padding:.5rem .1rem; color:var(--muted); font-size:0.825rem; cursor:pointer; }
.statement-reference .ref-list { margin-top:.7rem; }
.statement-latest-title { margin:1.8rem 0 .75rem; font-size:1.1rem; letter-spacing:-.02em; }
.statement-latest-title small { margin-left:.6rem; color:#646e69; font-size:0.8125rem; font-weight:500; }
body.topic-chat-open { overflow:hidden; }
.topic-chat-dialog { width:min(1140px,calc(100% - 3rem)); height:min(800px,calc(100dvh - 3rem)); max-width:none; max-height:none; padding:0; overflow:hidden; border:1px solid #d9e1dc; border-radius:1.5rem; background:#fff; color:var(--ink); box-shadow:0 35px 100px rgba(14,25,21,.3); }
.topic-chat-dialog::backdrop { background:rgba(12,24,20,.58); backdrop-filter:blur(6px); }
.topic-chat-shell { display:grid; grid-template-rows:auto minmax(0,1fr); height:100%; }
.topic-chat-header { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1.15rem 1.4rem; border-bottom:1px solid var(--line); background:#fff; }
.topic-chat-brand { display:flex; align-items:center; gap:.8rem; min-width:0; }
.topic-chat-logo { display:grid; flex:none; width:42px; height:42px; place-items:center; border-radius:13px; background:linear-gradient(135deg,#4169e1,#7955d4); color:#fff; font-size:0.88rem; font-weight:850; letter-spacing:-.06em; }
.topic-chat-brand h2 { margin:0; font-size:1.21rem; letter-spacing:-.035em; }
.topic-chat-brand p { margin:.2rem 0 0; color:#646e69; font-size:0.8125rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.topic-chat-header-actions { display:flex; align-items:center; gap:1rem; }
.topic-chat-connection { color:#646e69; font-size:0.8125rem; white-space:nowrap; }
.topic-chat-connection.ready { color:#24795c; }
#topicChatClose { display:grid; flex:none; width:34px; height:34px; padding:0; place-items:center; border:1px solid var(--line); border-radius:50%; background:#fff; color:#63706a; font-size:1.35rem; cursor:pointer; }
#topicChatClose:hover { background:#f1f5f2; color:var(--ink); }
.topic-chat-body { display:grid; grid-template-columns:285px minmax(0,1fr); min-height:0; }
.topic-chat-context { min-height:0; padding:1.5rem; overflow-y:auto; border-right:1px solid var(--line); background:#f6f8f5; }
.topic-chat-context>label { display:block; margin-bottom:.35rem; color:#646e69; font-size:0.8125rem; }
.topic-chat-context>select { width:100%; padding:.65rem .6rem; margin-bottom:1.6rem; border:1px solid #dce4df; border-radius:.6rem; background:#fff; color:#53615c; font:inherit; font-size:0.8125rem; }
.topic-chat-context>.section-kicker { font-size:0.8125rem; }
.topic-chat-context h3 { margin:.65rem 0 .8rem; font-size:1.25rem; letter-spacing:-.035em; line-height:1.55; }
.topic-chat-context>p { margin:0; color:#67726b; font-size:0.8125rem; line-height:1.85; }
.topic-chat-context dl { display:grid; gap:.5rem; margin:1.2rem 0; }
.topic-chat-context dl>div { padding:.7rem .8rem; border:1px solid #e4e9e5; border-radius:.65rem; background:#fff; }
.topic-chat-context dt { color:#646e69; font-size:0.8125rem; }
.topic-chat-context dd { margin:.2rem 0 0; font-size:0.957rem; font-weight:700; }
.topic-chat-context-source { display:grid; gap:.5rem; padding-top:1rem; border-top:1px solid #e0e7e1; }
.topic-chat-context-source span { color:#646e69; font-size:0.8125rem; }
.topic-chat-context-source a { color:var(--blue); font-size:0.8125rem; font-weight:700; cursor:pointer; }
.topic-chat-conversation { display:grid; grid-template-rows:minmax(0,1fr) auto; min-height:0; min-width:0; background:#fff; }
.topic-chat-scroll { min-height:0; overflow-y:auto; padding:1.5rem 1.8rem; scroll-behavior:smooth; }
.topic-chat-welcome { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:100%; max-width:30rem; margin:auto; padding:2rem 0; text-align:center; }
.topic-chat-welcome-mark { display:grid; width:64px; height:64px; margin-bottom:1rem; place-items:center; border:1px solid #dedff2; border-radius:1.2rem; background:linear-gradient(130deg,#eef2ff,#f2edff); color:#5c68b4; font-size:2.2rem; }
.topic-chat-welcome .section-kicker { font-size:0.8125rem; }
.topic-chat-welcome h3 { margin:.7rem 0; font-size:1.6rem; letter-spacing:-.045em; line-height:1.5; }
.topic-chat-welcome p { max-width:25rem; margin:0; color:#646e69; font-size:0.88rem; line-height:1.9; }
.topic-chat-messages { display:grid; gap:1.2rem; }
.topic-chat-message { display:flex; align-items:flex-start; gap:.6rem; min-width:0; }
.topic-chat-message.user { justify-content:flex-end; }
.topic-chat-message-avatar { display:grid; flex:none; width:29px; height:29px; margin-top:.2rem; place-items:center; border-radius:9px; background:#edf1fb; color:#4f66b9; font-size:0.8125rem; font-weight:800; }
.topic-chat-bubble { max-width:90%; padding:.9rem 1rem; border:1px solid #e6ebe7; border-radius:.95rem; background:#f7f9f6; color:#53615c; overflow-wrap:anywhere; }
.topic-chat-message.user .topic-chat-bubble { max-width:85%; border-color:#d9e2fb; background:#edf2ff; color:#3e527d; }
.topic-chat-bubble p { margin:0; white-space:pre-wrap; font-size:0.902rem; line-height:1.85; }
.topic-chat-message.pending .topic-chat-bubble { color:#646e69; }
.topic-chat-composer { padding:1rem 1.4rem 1rem; border-top:1px solid #f0f3f0; background:#fff; }
.topic-chat-suggestions { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.7rem; }
.topic-chat-suggestions button { padding:.4rem .65rem; border:1px solid #e0e6e1; border-radius:999px; background:#fff; color:#63706a; font-size:0.8125rem; cursor:pointer; }
.topic-chat-suggestions button:hover { border-color:#b9c8eb; background:#f7f9ff; color:#3e64d8; }
#topicChatForm { display:flex; align-items:flex-end; gap:.7rem; padding:.65rem; border:1px solid #dce3df; border-radius:.9rem; box-shadow:0 4px 15px rgba(24,37,33,.025); }
#topicChatForm:focus-within { border-color:#9eafe1; box-shadow:0 0 0 3px #f0f3fc; }
#topicChatInput { flex:1; min-width:0; min-height:52px; max-height:130px; padding:.25rem .35rem; resize:vertical; border:0; outline:0; background:transparent; color:var(--ink); font:inherit; font-size:0.913rem; line-height:1.6; }
#topicChatSend { display:flex; align-items:center; justify-content:center; flex:none; gap:.5rem; min-width:76px; min-height:38px; padding:.5rem .75rem; border:0; border-radius:.65rem; background:#4169e1; color:#fff; font:inherit; font-size:0.8125rem; font-weight:700; cursor:pointer; }
#topicChatSend:disabled { background:#bcc6de; cursor:default; }
.topic-chat-input-note { display:flex; justify-content:space-between; flex-wrap:wrap; gap:.2rem; margin:.55rem .15rem 0; color:#666e69; font-size:0.8125rem; }
.topic-chat-error { display:flex; align-items:center; justify-content:space-between; gap:.8rem; margin-bottom:.7rem; padding:.65rem .8rem; border-radius:.7rem; background:#fff5e0; color:#80692d; }
.topic-chat-error p { margin:0; font-size:0.8125rem; line-height:1.6; }
.topic-chat-error button { flex:none; padding:.35rem .5rem; border:1px solid #e0ce9f; border-radius:.45rem; background:#fff; color:#80692d; font-size:0.8125rem; cursor:pointer; }
.topic-chat-dialog :focus-visible { outline:2px solid #4169e1; outline-offset:3px; }
@media(max-width:1000px) {
 .statement-explorer { grid-template-columns:190px minmax(0,1fr); }
 .statement-workspace { padding:1.2rem; }
 .topic-chat-body { grid-template-columns:240px minmax(0,1fr); }
 .topic-chat-context { padding:1.15rem; }
}
@media(max-width:720px) {
 .topic-heading-actions { justify-content:flex-start; }
 .topic-heading-actions>p { min-width:0; flex-basis:100%; }
 .topic-ai-button.primary { min-height:42px; padding:.65rem 1rem; font-size:0.88rem; }
 .hf-footer { align-items:center; }
 .hf-footer .topic-ai-button { flex:1; }
 .statement-explorer { grid-template-columns:1fr; }
 .statement-event-sidebar { padding:1rem; border-right:0; border-bottom:1px solid var(--line); }
 .statement-sidebar-head { display:flex; flex-wrap:wrap; align-items:baseline; gap:.5rem; }
 .statement-sidebar-head .section-kicker { flex-basis:100%; }
 .statement-sidebar-head h3 { margin:.15rem 0; }
 .statement-event-list { display:flex; overflow-x:auto; gap:.5rem; margin-top:.7rem; scrollbar-width:thin; }
 .statement-event-button { flex:0 0 190px; }
 .statement-workspace { padding:1.05rem; }
 .statement-chart-heading h3 { font-size:1.21rem; }
 .statement-datetime { font-size:0.8125rem; line-height:1.65; }
 .statement-chart-toolbar { align-items:flex-start; }
 .statement-chart-options { width:100%; }
 .statement-chart-options label { flex:1; }
 .statement-chart-options select { width:100%; max-width:none; }
 .statement-price-metrics { grid-template-columns:1fr; }
 .statement-price-metrics>div { display:grid; grid-template-columns:1fr auto; align-items:center; gap:.2rem .7rem; }
 .statement-price-metrics b { grid-column:2; grid-row:span 2; margin:0; }
 .statement-price-metrics span { grid-row:2; }
 .statement-latest-title small { display:block; margin:.3rem 0 0; }
 .topic-chat-dialog { width:calc(100% - 1rem); height:calc(100dvh - 1rem); border-radius:1rem; }
 .topic-chat-header { gap:.5rem; padding:.85rem; }
 .topic-chat-logo { width:35px; height:35px; border-radius:10px; }
 .topic-chat-brand { gap:.6rem; }
 .topic-chat-brand h2 { font-size:1.1rem; }
 .topic-chat-brand p { max-width:180px; font-size:0.8125rem; }
 .topic-chat-header-actions { gap:.4rem; }
 .topic-chat-connection { display:none; }
 .topic-chat-body { grid-template-columns:1fr; }
 .topic-chat-context { display:none; }
 .topic-chat-scroll { padding:1.1rem .9rem; }
 .topic-chat-welcome { padding:1rem 0; }
 .topic-chat-welcome h3 { font-size:1.35rem; }
 .topic-chat-welcome p { font-size:0.825rem; }
 .topic-chat-composer { padding:.8rem; }
 .topic-chat-suggestions button { font-size:0.8125rem; padding:.35rem .5rem; }
 #topicChatSend { min-width:40px; padding:.5rem; }
 #topicChatSend>span:first-child { display:none; }
 .topic-chat-bubble { max-width:90%; padding:.8rem; }
 .topic-chat-bubble p { font-size:0.858rem; }
 .topic-chat-input-note>span { display:none; }
 .topic-chat-error { flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) { .topic-chat-scroll { scroll-behavior:auto; } }
@media(prefers-reduced-motion:reduce) { .topic-ai-button { transition:none; } }
.topic-chat-sample-label { display:block; margin-bottom:.45rem; color:#666f85; font-size:0.8125rem; font-weight:700; }
.topic-chat-message.pending { padding:.5rem; color:#646e69; font-size:0.8125rem; }
