.message-wrapper.bot .web-result-card {
    --web-line: var(--codex-border-soft, rgba(128, 140, 160, .2));
    --web-muted: var(--text-secondary, #9098a5);
    width: 100%;
    max-width: 620px;
    box-sizing: border-box;
    margin: 4px 0 22px;
    padding: 22px;
    border: 1px solid var(--web-line);
    border-radius: 18px;
    color: var(--text-primary, #edf0f5);
    background: var(--codex-surface-soft, rgba(128, 140, 160, .05));
    line-height: 1.5;
}
.message-wrapper.bot .web-result-card[hidden] { display: none !important; }
.web-result-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.web-result-eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--web-muted); }
.web-result-timestamp { color: var(--web-muted); font-size: 11px; }
.message-wrapper.bot .web-result-card .web-result-title { margin: 9px 0 3px; font-size: 19px; letter-spacing: -.02em; }
.message-wrapper.bot .web-result-card .web-result-subtitle { margin: 0; font-size: 12px; color: var(--web-muted); }
.message-wrapper.bot .web-result-kind-weather { background: linear-gradient(125deg, rgba(122, 161, 203, .12), rgba(128, 140, 160, .025)); }
.web-weather-current { display: flex; align-items: center; gap: 18px; padding: 24px 0; flex-wrap: wrap; }
.web-weather-icon { display: inline-flex; width: 62px; height: 62px; color: #d7ae52; flex-shrink: 0; }
.web-weather-icon svg { width: 100%; height: 100%; }
.web-weather-temperature { font-size: clamp(32px, 7vw, 48px); line-height: 1; letter-spacing: -.055em; font-weight: 500; }
.web-weather-condition { font-size: 14px; font-weight: 600; }
.web-result-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 16px; padding: 16px 0; border-top: 1px solid var(--web-line); }
.web-result-metric { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.web-result-metric-label, .web-result-item-name { font-size: 12px; color: var(--web-muted); }
.web-result-metric-value { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.web-weather-forecast { display: flex; gap: 6px; border-top: 1px solid var(--web-line); padding-top: 18px; overflow-x: auto; }
.web-weather-day { flex: 1 0 58px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; }
.web-weather-day .web-weather-icon { width: 28px; height: 28px; margin: 5px 0; }
.message-wrapper.bot .web-result-list { padding: 0; margin: 16px 0 0; list-style: none; }
.message-wrapper.bot .web-result-list .web-result-item { display: flex; align-items: baseline; gap: 14px; padding: 15px 0; border-top: 1px solid var(--web-line); margin: 0; }
.web-result-rank { color: var(--web-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.web-result-item-body { flex: 1; min-width: 0; }
.web-result-list .web-result-item-name { font-size: 14px; color: inherit; font-weight: 600; text-decoration: none; }
.web-result-list a.web-result-item-name:hover { text-decoration: underline; }
.message-wrapper.bot .web-result-card .web-result-item-description { margin: 4px 0 0; color: var(--web-muted); font-size: 12px; }
.web-result-table-scroll { overflow-x: auto; margin-top: 16px; }
.message-wrapper.bot .web-result-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0; }
.message-wrapper.bot .web-result-table th, .message-wrapper.bot .web-result-table td { padding: 12px 10px; border: 0; border-bottom: 1px solid var(--web-line); text-align: left; white-space: normal; }
.message-wrapper.bot .web-result-table th { color: var(--web-muted); font-size: 11px; font-weight: 500; }
.web-result-provenance { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--web-line); font-size: 10px; color: var(--web-muted); }
.web-result-provenance a { color: inherit; padding: 3px 8px; border: 1px solid var(--web-line); border-radius: 20px; text-decoration: none; overflow-wrap: anywhere; }
.web-result-provenance a:hover { color: var(--text-primary); }
@media (max-width: 480px) {
    .message-wrapper.bot .web-result-card { padding: 17px; border-radius: 14px; }
    .web-weather-current { gap: 12px; }
    .web-weather-current > .web-weather-icon { width: 45px; height: 45px; }
    .web-weather-detail { flex-basis: 100%; }
}

/* Compact provenance and interactive data use Logicum's existing surfaces. */
.web-sources-disclosure { margin: 12px 0; max-width: 620px; font-size: 12px; color: var(--text-secondary); }
/* Keep response actions aligned with the source summary as its list expands. */
.message-actions > .web-sources-disclosure ~ .message-actions-buttons-group {
    align-self: flex-start;
    margin-top: 16px;
}
.web-sources-summary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    box-sizing: border-box;
    min-height: 40px;
    padding: 9px 14px;
    border: 0 !important;
    border-radius: 20px !important;
    corner-shape: round !important;
    box-shadow: none !important;
    background: var(--input-bg, var(--codex-surface, var(--bg-secondary)));
    color: var(--text-secondary);
    font: inherit;
    line-height: 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color .16s ease, color .16s ease;
}
.web-sources-summary::-webkit-details-marker { display: none; }
.web-sources-summary::marker { content: ''; }
.web-sources-summary:hover,
.web-sources-disclosure[open] .web-sources-summary {
    background: var(--codex-surface-strong, var(--bg-hover));
    color: var(--text-primary);
}
.web-sources-summary:focus:not(:focus-visible) { outline: none; }
.web-sources-summary:active { background: var(--bg-hover); }
.web-sources-images { display: flex; align-items: center; padding-left: 5px; }
.web-source-image { box-sizing: border-box; width: 22px; height: 22px; object-fit: cover; border-radius: 50%; background: var(--codex-surface, var(--bg-secondary)); border: 2px solid var(--codex-surface, var(--bg-secondary)); margin-left: -5px; }
.web-sources-images:has(> img:not([hidden])) { margin-right: 1px; }
.web-sources-images:not(:has(> img:not([hidden]))) { display: none; }
.web-sources-label { font-size: 13px; font-weight: 500; }
.web-sources-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 6px; background: var(--codex-surface-soft, var(--bg-hover)); color: var(--text-secondary); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.web-sources-chevron { display: block; flex: 0 0 18px; width: 18px; height: 18px; margin-left: 2px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; transform-origin: center; transition: transform .18s ease; }
.web-sources-disclosure[open] .web-sources-chevron { transform: rotate(180deg); }
.web-sources-links { display: grid; gap: 3px; max-height: 260px; overflow-y: auto; margin-top: 8px; padding: 8px; background: var(--codex-surface-soft, var(--bg-secondary)); border: 1px solid var(--codex-border-soft, var(--border-color)); border-radius: 12px; }
.web-source-link { display: flex; gap: 10px; padding: 8px; color: inherit; text-decoration: none; border-radius: 8px; }
.web-source-link:hover { background: var(--codex-surface-strong, var(--bg-hover)); }
.web-source-name, .web-source-domain { display: block; overflow-wrap: anywhere; }
.web-source-domain { font-size: 11px; opacity: .7; margin-top: 2px; }
.web-source-number, .web-citation-number { color: var(--text-secondary); font-size: 10px; font-weight: 500; }
.web-citation-number { margin-left: 3px; }
.web-sources-summary:focus-visible, .web-result-card button:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 3px; }
.web-finance-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 16px 0; }
.web-finance-tab, .web-finance-ranges button { border: 1px solid var(--web-line); background: transparent; color: var(--web-muted); border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.web-finance-tab[aria-selected="true"], .web-finance-ranges button[aria-pressed="true"] { color: var(--text-primary); background: var(--codex-surface-strong, var(--bg-hover)); }
.web-finance-detail { border-top: 1px solid var(--web-line); padding-top: 18px; }
.web-finance-name { font-size: 14px; font-weight: 600; }
.web-finance-quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.web-finance-price { font-size: 28px; font-weight: 500; letter-spacing: -.03em; }
.web-finance-change { font-size: 13px; color: var(--web-muted); }
.web-finance-chart { margin: 18px 0 8px; color: var(--accent-color); }
.web-finance-chart svg { display: block; width: 100%; }
.web-finance-ranges { display: flex; gap: 6px; margin-bottom: 10px; }
.web-finance-link { display: inline-block; margin-top: 12px; color: var(--web-muted); font-size: 12px; }
.web-table-sort { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; padding: 0; }
.web-result-item-details summary { cursor: pointer; font-size: 11px; color: var(--web-muted); margin-top: 6px; }
button.web-weather-day { border: 0; background: transparent; color: inherit; cursor: pointer; border-radius: 8px; padding: 8px 4px; font-family: inherit; }
button.web-weather-day[aria-pressed="true"] { background: var(--codex-surface-strong, var(--bg-hover)); }
.message-wrapper.bot .web-result-kind-weather{background:var(--bg-secondary,var(--bg-color,transparent));border:0;border-top:1px solid var(--web-line);border-bottom:1px solid var(--web-line);border-radius:0;padding:18px 0;max-width:620px}
.web-result-kind-weather .web-weather-icon{color:var(--accent-color,#b87922)}
.web-weather-current{padding:14px 0 20px;gap:16px}
.web-weather-section-title{font-size:13px;font-weight:600;margin:16px 0 10px}
.web-weather-hourly{display:flex;gap:0;overflow-x:auto;border-top:1px solid var(--web-line);border-bottom:1px solid var(--web-line)}
.web-weather-hour{flex:1 0 68px;min-width:68px;display:flex;flex-direction:column;align-items:center;gap:7px;padding:12px 8px;border-right:1px solid var(--web-line);font-size:12px}
.web-weather-hour:last-child{border-right:0}
.web-weather-hour-time,.web-weather-hour-wind-label{color:var(--web-muted);font-size:11px}
.web-weather-hour .web-weather-icon{width:24px;height:24px}
.web-weather-hour-temperature{font-size:14px;font-variant-numeric:tabular-nums}
.web-weather-hour-wind{display:flex;flex-direction:column;align-items:center;gap:2px;font-variant-numeric:tabular-nums;white-space:nowrap}
@media (prefers-reduced-motion: reduce) { .web-sources-summary, .web-sources-chevron { transition: none; } }
