/* ===========================================================================
   PUBLIC CHAT WIDGET — WINDOWS 11 FLUENT DESIGN
   Matches marketing.css theme tokens (light + dark via [data-theme])
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. CHAT SECTION LAYOUT
   --------------------------------------------------------------------------- */
.chat-section {
    padding: var(--section-gap) 0;
    background: linear-gradient(135deg, var(--bg-alt) 0%, rgba(216,74,27,0.08) 40%, rgba(180,180,180,0.04) 100%);
    position: relative;
    overflow: hidden;
}
[data-theme="dark"] .chat-section {
    background: linear-gradient(135deg, var(--bg-alt) 0%, rgba(216,74,27,0.12) 40%, rgba(200,200,200,0.06) 100%);
}
/* Constellation dot grid behind chat */
.chat-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(216,74,27,0.3) 1.5px, transparent 2px),
        radial-gradient(circle, rgba(180,180,180,0.18) 1px, transparent 1.5px);
    background-size: 30px 30px, 45px 45px;
    background-position: 0 0, 15px 15px;
    mask-image: radial-gradient(ellipse 65% 55% at 50% 40%, black 5%, transparent 50%);
    -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 40%, black 5%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
[data-theme="dark"] .chat-section::before {
    background-image:
        radial-gradient(circle, rgba(216,74,27,0.35) 1.5px, transparent 2px),
        radial-gradient(circle, rgba(200,200,200,0.22) 1px, transparent 1.5px);
}
.chat-section > * {
    position: relative;
    z-index: 1;
}

.chat-section .section-head {
    text-align: center;
    margin-bottom: 40px;
}

.chat-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.chat-layout.has-images {
    grid-template-columns: 1fr 280px;
}

.chat-landing-calculators {
    width: 100%;
    margin: 24px auto 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--stroke) 82%, var(--accent) 18%);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--text) 7%, transparent);
}

.chat-landing-calculators summary {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 11px 18px;
    background:
        linear-gradient(100deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 38%),
        var(--surface);
    color: var(--text);
    cursor: pointer;
    list-style: none;
    text-align: left;
}

.chat-landing-calculators summary::-webkit-details-marker {
    display: none;
}

.chat-landing-calculators summary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 32%, transparent);
    outline-offset: -3px;
}

.chat-landing-calculator-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--stroke));
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 17px;
}

.chat-landing-calculator-heading {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.chat-landing-calculator-heading strong {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.2;
}

.chat-landing-calculator-heading small {
    color: var(--text-tertiary);
    font-size: 11.5px;
    line-height: 1.35;
}

.chat-landing-calculator-count {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--stroke) 82%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-alt) 86%, transparent);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.chat-landing-calculators summary > i {
    color: var(--text-tertiary);
    transition: transform 0.18s ease;
}

.chat-landing-calculators[open] summary {
    border-bottom: 1px solid var(--stroke);
}

.chat-landing-calculators[open] summary > i {
    transform: rotate(180deg);
}

.chat-landing-example-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    background: color-mix(in srgb, var(--surface-alt) 72%, var(--surface));
}

.chat-landing-example {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 132px;
    grid-template-rows: auto 1fr auto;
    gap: 11px;
    padding: 15px 16px 14px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--stroke) 88%, transparent);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    text-align: left;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.chat-landing-example::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--accent);
    opacity: 0.72;
}

.chat-landing-example:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 50%, var(--stroke));
    background: color-mix(in srgb, var(--surface) 96%, var(--accent) 4%);
    color: var(--text);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--text) 8%, transparent);
}

.chat-landing-example:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 32%, transparent);
    outline-offset: 2px;
}

.chat-landing-example-type {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--accent);
}

.chat-landing-example-type i {
    font-size: 13px;
}

.chat-landing-example-type small {
    color: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.045em;
    line-height: 1.2;
    text-transform: uppercase;
}

.chat-landing-example > strong {
    align-self: start;
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.3;
}

.chat-landing-example-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--stroke) 76%, transparent);
}

.chat-landing-example-footer small {
    color: var(--text-tertiary);
    font-size: 11px;
    line-height: 1.35;
}

.chat-landing-example-footer i {
    color: var(--accent);
    font-size: 13px;
    transition: transform 0.16s ease;
}

.chat-landing-example:hover .chat-landing-example-footer i {
    transform: translateX(3px);
}

@media (max-width: 920px) {
    .chat-landing-example-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .chat-layout,
    .chat-layout.has-images {
        grid-template-columns: 1fr;
    }

    .chat-landing-calculators summary {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 10px 12px;
    }

    .chat-landing-calculator-icon {
        width: 34px;
        height: 34px;
    }

    .chat-landing-calculator-count {
        display: none;
    }

    .chat-landing-example-grid {
        grid-template-columns: minmax(0, 1fr);
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chat-landing-calculators summary > i,
    .chat-landing-example,
    .chat-landing-example-footer i {
        transition: none;
    }
}

/* ---------------------------------------------------------------------------
   2. CHAT WIDGET CONTAINER
   --------------------------------------------------------------------------- */
#chat-widget {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    height: clamp(720px, 62vh, 860px);
    min-height: 720px;
    max-height: 860px;
}

/* ---------------------------------------------------------------------------
   3. CHAT HEADER
   --------------------------------------------------------------------------- */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--stroke);
    background: var(--surface-alt);
    flex-shrink: 0;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.chat-header-icon {
    font-size: 20px;
    color: var(--accent);
}

.chat-header-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.chat-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.chat-subtitle {
    font-size: 11px;
    color: var(--text-tertiary);
}

.chat-quota {
    font-size: 11px;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.chat-quota-warn {
    color: var(--accent);
}

.chat-quota-low {
    color: var(--red);
    font-weight: 600;
}

.chat-reset-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--stroke);
    background: var(--surface);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
    font-size: 14px;
}

.chat-reset-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.calculator-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 76% 0%, color-mix(in srgb, var(--accent) 3%, transparent) 0, transparent 30rem),
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 84%, var(--surface) 16%) 0%, var(--bg) 34rem);
    color: var(--text);
}

.calculator-hero {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 22px 0 26px;
}

.calculator-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.calculator-index-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--stroke) 78%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.calculator-index-link:hover {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 42%, var(--stroke));
    background: var(--surface);
}

.calculator-intro {
    display: grid;
    gap: 20px;
}

.calculator-copy {
    max-width: 940px;
}

.calculator-kicker {
    display: inline-block;
    margin-bottom: 9px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.calculator-copy h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(40px, 4.2vw, 58px);
    line-height: 1;
    letter-spacing: -0.035em;
    max-width: 920px;
}

.calculator-copy p {
    max-width: 820px;
    margin: 11px 0 0;
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.5;
}

.calculator-path {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--stroke) 86%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--text) 5%, transparent);
    list-style: none;
    overflow: hidden;
}

.calculator-path li {
    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 76px;
    padding: 13px 18px;
}

.calculator-path li + li {
    border-left: 1px solid var(--stroke);
}

.calculator-path-number {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--stroke));
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 800;
}

.calculator-path li > span:last-child {
    display: grid;
    gap: 2px;
}

.calculator-path strong {
    color: var(--text);
    font-size: 13px;
    line-height: 1.25;
}

.calculator-path small {
    color: var(--text-tertiary);
    font-size: 11px;
    line-height: 1.35;
}

.calculator-trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: -2px;
}

.calculator-trust-strip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 700;
}

.calculator-trust-strip i {
    color: var(--accent);
    font-size: 12px;
}

.calculator-trust-strip span:nth-child(2) i {
    color: var(--accent);
}

.calculator-trust-strip span:nth-child(3) i {
    color: var(--accent);
}

.calculator-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 20px 0 56px;
    border-top: 1px solid color-mix(in srgb, var(--stroke) 80%, transparent);
    align-items: start;
}

.calculator-work-column,
.calculator-chat-shell {
    min-width: 0;
}

.calculator-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    margin-bottom: 12px;
}

.calculator-section-heading > span {
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.calculator-section-heading h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.calculator-section-heading p {
    max-width: 680px;
    margin: 1px 0 0;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.45;
}

.calculator-chat-shell #chat-widget {
    height: clamp(620px, 72vh, 760px);
    min-height: 620px;
    max-height: 760px;
    border-color: color-mix(in srgb, var(--stroke) 72%, var(--text-tertiary) 28%);
    box-shadow: 0 18px 48px color-mix(in srgb, var(--text) 8%, transparent);
}

.calculator-decision-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: 16px;
    align-items: start;
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.calculator-verdict {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 22px 23px 20px;
    border: 1px solid color-mix(in srgb, var(--stroke) 82%, transparent);
    border-top: 3px solid var(--accent);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--text) 6%, transparent);
}

.calculator-verdict-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
}

.calculator-verdict-label span {
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.calculator-verdict h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 19px;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.calculator-verdict p {
    margin: 2px 0 0;
    padding-top: 13px;
    border-top: 1px solid var(--stroke);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.calculator-verdict-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.calculator-verdict-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--stroke) 78%, transparent);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
}

.calculator-source-panel {
    min-width: 0;
    padding: 21px 23px 22px;
    border: 1px solid color-mix(in srgb, var(--stroke) 82%, transparent);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--text) 6%, transparent);
}

.calculator-source-heading {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

.calculator-source-heading span {
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.calculator-source-heading h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.18;
}

.calculator-grounding-copy {
    margin: 0 0 14px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.58;
}

.calculator-source-disclosure {
    border-top: 1px solid var(--stroke);
}

.calculator-source-disclosure summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0;
    list-style: none;
    text-transform: none;
}

.calculator-source-disclosure summary::-webkit-details-marker {
    display: none;
}

.calculator-source-disclosure summary > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.calculator-source-disclosure summary > span > i {
    color: var(--accent);
}

.calculator-source-disclosure summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.calculator-source-disclosure summary small {
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.calculator-source-chevron {
    color: var(--text-tertiary);
    transition: transform 0.18s ease;
}

.calculator-source-disclosure[open] .calculator-source-chevron {
    transform: rotate(180deg);
}

.calculator-source-list {
    display: grid;
    gap: 0;
    max-height: 300px;
    overflow: auto;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--stroke) 86%, transparent);
    border-radius: 8px;
    background: var(--surface-alt);
}

.calculator-source-list a {
    display: grid;
    gap: 4px;
    padding: 11px 2px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--stroke) 86%, transparent);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    transition: color 0.16s ease;
}

.calculator-source-list a:last-child {
    border-bottom: 0;
}

.calculator-source-list a:hover {
    color: var(--accent);
}

.calculator-source-list a span {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.calculator-source-list a i {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.5;
}

.calculator-source-list b {
    font-size: 14px;
    line-height: 1.38;
    overflow-wrap: anywhere;
}

.calculator-source-list small {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

@media (max-width: 940px) {
    .calculator-decision-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
}

@media (max-width: 760px) {
    .calculator-hero,
    .calculator-workspace {
        width: min(100% - 28px, 1180px);
    }

    .calculator-hero {
        padding-top: 18px;
    }

    .calculator-hero-top {
        margin-bottom: 26px;
    }

    .calculator-path {
        grid-template-columns: 1fr;
    }

    .calculator-path li {
        min-height: 66px;
    }

    .calculator-path li + li {
        border-top: 1px solid var(--stroke);
        border-left: 0;
    }

    .calculator-workspace {
        padding-top: 18px;
    }

    .calculator-chat-shell #chat-widget {
        height: 620px;
        min-height: 560px;
    }
}

@media (max-width: 560px) {
    .calculator-hero-top,
    .calculator-verdict-meta {
        align-items: flex-start;
    }

    .calculator-hero-top {
        flex-direction: column;
    }

    .calculator-copy h1 {
        font-size: 38px;
    }

    .calculator-trust-strip span {
        width: auto;
    }

    .calculator-workspace {
        padding-bottom: 34px;
    }

    .calculator-section-heading p {
        font-size: 11px;
    }

    .calculator-source-panel,
    .calculator-verdict {
        padding-right: 17px;
        padding-left: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .calculator-source-chevron,
    .calculator-source-list a {
        transition: none;
    }
}

/* Status dots */
.chat-status-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-status-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: default;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.chat-status-dot.online {
    background: #4caf50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.55);
}

.chat-status-dot.offline {
    background: #b0b0b0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .chat-status-dot.offline {
    background: #666;
}

/* Tooltip popup */
.chat-status-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: -8px;
    width: 210px;
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 10px 12px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text);
    z-index: 1000;
    pointer-events: none;
    text-align: left;
    white-space: normal;
}

.chat-status-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 10px;
    border: 6px solid transparent;
    border-bottom-color: var(--stroke);
}

.chat-status-tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 11px;
    border: 5px solid transparent;
    border-bottom-color: var(--surface);
    z-index: 1;
}

.chat-status-dot:hover .chat-status-tooltip {
    display: block;
}

.chat-status-tooltip strong {
    font-size: 12px;
    color: var(--text);
}

.chat-status-label {
    font-weight: 600;
}

.chat-status-dot.online .chat-status-label {
    color: #4caf50;
}

.chat-status-dot.offline .chat-status-label {
    color: var(--red, #e53935);
}

.chat-trust-panel {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--stroke);
}

.chat-trust-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.chat-trust-summary span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    border: 1px solid var(--stroke);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 11px;
}

.chat-trust-sources {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 6px;
}

.chat-trust-sources a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 8px;
    border: 1px solid var(--stroke);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 11px;
}

.chat-trust-sources a:hover {
    border-color: var(--accent);
}

.chat-trust-sources small {
    color: var(--text-tertiary);
}

.chat-message-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 10px;
}

.chat-message-action {
    width: 28px;
    height: 28px;
    border: 1px solid var(--stroke);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-message-action:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chat-message-action.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.chat-status-desc {
    color: var(--text-secondary);
    font-size: 11px;
}

/* ---------------------------------------------------------------------------
   4. CHAT MESSAGES AREA
   --------------------------------------------------------------------------- */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--stroke-strong);
    border-radius: 3px;
}

/* ---------------------------------------------------------------------------
   5. WELCOME / SUGGESTIONS
   --------------------------------------------------------------------------- */
.chat-welcome {
    position: relative;
    text-align: center;
    padding: 32px 48px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-lg);
    margin: 8px 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.chat-welcome-dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    width: 32px;
    height: 32px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--stroke);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.chat-welcome-dismiss:hover,
.chat-welcome-dismiss:focus-visible {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

[data-theme="dark"] .chat-welcome {
    background: rgba(30, 30, 30, 0.85);
}

.chat-welcome strong {
    color: var(--text);
}

.chat-compare-picker {
    margin: 8px 16px 12px;
    padding: 12px;
    border: 1px solid var(--stroke);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .chat-compare-picker {
    background: rgba(30, 30, 30, 0.9);
}

.chat-compare-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.chat-compare-fields label {
    display: grid;
    gap: 5px;
    min-width: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.chat-compare-fields select,
.chat-compare-combo {
    width: 100%;
    min-width: 0;
    height: 34px;
    border: 1px solid var(--stroke);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    padding: 0 9px;
    font: inherit;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.chat-compare-combo:focus {
    border-color: var(--accent);
}

.chat-compare-submit {
    height: 34px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent);
    color: var(--text-on-accent);
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.chat-compare-submit:hover {
    background: var(--accent-hover);
}

.chat-compare-submit span {
    white-space: nowrap;
}

.chat-session-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    margin: 8px 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .chat-session-choice {
    background: rgba(30, 30, 30, 0.9);
}

.chat-session-choice-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.chat-session-choice-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.chat-session-choice-copy strong {
    font-size: 14px;
    font-weight: 650;
}

.chat-session-choice-copy span {
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.5;
}

.chat-session-choice-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chat-session-choice-btn {
    min-height: 32px;
    border: 1px solid var(--stroke);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    padding: 6px 14px;
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chat-session-choice-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chat-session-choice-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

.chat-session-choice-btn.primary:hover {
    background: var(--accent-hover);
    color: var(--text-on-accent);
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.chat-suggestion {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-family: var(--font-body);
}

.chat-suggestion:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
}

/* ---------------------------------------------------------------------------
   6. MESSAGE BUBBLES
   --------------------------------------------------------------------------- */
.chat-msg {
    display: flex;
}

.chat-msg-user {
    justify-content: flex-end;
}

.chat-msg-assistant {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    font-size: 13.5px;
    line-height: 1.65;
    word-break: break-word;
}

.chat-bubble-user {
    background: var(--accent);
    color: var(--text-on-accent);
    border-bottom-right-radius: var(--radius-sm);
}

.chat-bubble-assistant {
    background: var(--surface-alt);
    color: var(--text);
    border: 1px solid var(--stroke);
    border-bottom-left-radius: var(--radius-sm);
}

.chat-bubble-content code {
    background: rgba(0, 0, 0, 0.08);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
}

[data-theme="dark"] .chat-bubble-content code {
    background: rgba(255, 255, 255, 0.1);
}

.chat-bubble-content a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.chat-bubble-content strong {
    font-weight: 600;
}

/* ── Chat markdown block elements ── */
.chat-bubble-content .chat-md-h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 12px 0 6px;
    color: var(--text);
    border-bottom: 1px solid var(--stroke, #e0e0e0);
    padding-bottom: 4px;
}

.chat-bubble-content .chat-md-h3:first-child {
    margin-top: 0;
}

.chat-bubble-content .chat-md-h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 10px 0 4px;
    color: var(--text);
}

.chat-bubble-content .chat-md-p {
    margin: 0 0 6px;
    line-height: 1.6;
}

.chat-bubble-content .chat-md-p:last-child {
    margin-bottom: 0;
}

.chat-bubble-content .chat-md-list {
    margin: 4px 0 8px;
    padding-left: 18px;
    list-style: disc;
}

.chat-bubble-content .chat-md-list-num {
    list-style: decimal;
    padding-left: 24px;
}

.chat-bubble-content .chat-md-list-num li {
    position: static;
}

.chat-bubble-content .chat-md-list-num li::marker {
    font-weight: 600;
}

.chat-bubble-content .chat-md-list li {
    margin-bottom: 3px;
    line-height: 1.5;
}

.chat-reply-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chat-rag-diagnostic {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin-top: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--stroke);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
}

.chat-rag-diagnostic-warning {
    border-color: rgba(229, 57, 53, 0.45);
    color: var(--red, #e53935);
    background: rgba(229, 57, 53, 0.06);
}

.chat-rag-diagnostic-muted {
    color: var(--text-secondary);
    background: var(--surface-alt);
}

.chat-reply-option {
    min-height: 32px;
    border: 1px solid var(--accent);
    border-radius: 18px;
    background: var(--surface);
    color: var(--accent);
    padding: 6px 14px;
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.chat-reply-option:hover:not(:disabled) {
    background: var(--accent-soft);
}

.chat-reply-option.selected {
    background: var(--accent);
    color: var(--text-on-accent);
}

.chat-reply-option:disabled {
    cursor: default;
    opacity: 0.65;
}

/* ---------------------------------------------------------------------------
   7. TYPING INDICATOR
   --------------------------------------------------------------------------- */
.chat-stream-progress {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.chat-stream-progress .chat-typing {
    padding: 0;
}

.chat-typing {
    display: inline-flex;
    gap: 4px;
    padding: 4px 0;
    align-items: center;
}

.chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-tertiary);
    animation: chat-bounce 1.2s infinite ease-in-out;
}

.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chat-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ---------------------------------------------------------------------------
   8. INPUT BAR
   --------------------------------------------------------------------------- */
.chat-input-bar {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    border-top: 1px solid var(--stroke);
    background: var(--surface);
    flex-shrink: 0;
    position: relative;
}

.chat-input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--stroke);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 13.5px;
    color: var(--text);
    outline: none;
    font-family: var(--font-body);
    transition: border-color 0.15s ease;
    min-width: 0;
}

.chat-input::placeholder {
    color: var(--text-tertiary);
}

.chat-input:focus {
    border-color: var(--accent);
}

.chat-input:disabled {
    opacity: 0.5;
}

.chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: var(--text-on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    flex-shrink: 0;
    font-size: 15px;
}

.chat-send:hover:not(:disabled) {
    background: var(--accent-hover);
}

.chat-send:active:not(:disabled) {
    background: var(--accent-active);
    transform: scale(0.95);
}

.chat-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.chat-image-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--stroke);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
    font-size: 14px;
}

.chat-image-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.chat-image-previews {
    display: flex;
    gap: 8px;
    padding: 8px 16px 0;
    flex-wrap: wrap;
}

.chat-image-preview {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--stroke);
}

.chat-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------------------------------------------------------------------------
   8b. CITY SELECTOR (in input bar)
   --------------------------------------------------------------------------- */
.chat-city-selector {
    position: relative;
    flex-shrink: 0;
}

.chat-city-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--stroke);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
    font-size: 14px;
    padding: 0;
}

.chat-city-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chat-city-btn.has-city {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* Dropdown panel */
.chat-city-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    width: 240px;
    max-height: 320px;
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    z-index: 100;
    flex-direction: column;
    overflow: hidden;
}

.chat-city-dropdown.open {
    display: flex;
}

.chat-city-filter-wrap {
    padding: 8px;
    border-bottom: 1px solid var(--stroke);
    flex-shrink: 0;
}

.chat-city-filter {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 12.5px;
    color: var(--text);
    outline: none;
    font-family: var(--font-body);
    box-sizing: border-box;
}

.chat-city-filter::placeholder {
    color: var(--text-tertiary);
}

.chat-city-filter:focus {
    border-color: var(--accent);
}

.chat-city-list {
    overflow-y: auto;
    flex: 1;
}

.chat-city-list::-webkit-scrollbar {
    width: 5px;
}

.chat-city-list::-webkit-scrollbar-track {
    background: transparent;
}

.chat-city-list::-webkit-scrollbar-thumb {
    background: var(--stroke-strong);
    border-radius: 3px;
}

.chat-city-province {
    padding: 6px 12px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    background: var(--surface-alt);
    border-bottom: 1px solid var(--stroke);
    position: sticky;
    top: 0;
    z-index: 1;
}

.chat-city-item {
    padding: 7px 12px;
    font-size: 12.5px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.1s ease;
}

.chat-city-item:hover {
    background: var(--accent-soft);
}

.chat-city-item.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.chat-city-item.kb-focus {
    background: var(--accent-soft);
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.chat-city-clear {
    color: var(--text-tertiary);
    font-size: 12px;
    border-bottom: 1px solid var(--stroke);
}

.chat-city-clear:hover {
    color: var(--text);
    background: var(--surface-alt);
}

.chat-city-clear .bi-x-circle {
    font-size: 11px;
}

/* ---------------------------------------------------------------------------
   9. CITY BANNER IMAGE
   --------------------------------------------------------------------------- */
.chat-city-banner {
    max-width: 900px;
    margin: 0 auto 16px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 21 / 9;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--stroke);
}

.chat-city-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-city-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    display: flex;
    align-items: flex-end;
}

.chat-city-banner-overlay span {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ---------------------------------------------------------------------------
/* ---------------------------------------------------------------------------
   11. RESPONSIVE
   --------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .chat-city-banner {
        aspect-ratio: 16 / 9;
    }

    .chat-city-banner-overlay span {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .chat-compare-picker {
        grid-template-columns: 1fr;
    }

    .chat-compare-fields {
        grid-template-columns: 1fr;
    }

    .chat-compare-submit {
        width: 100%;
        justify-content: center;
    }

    #chat-widget {
        min-height: 360px;
        max-height: 480px;
    }

    .chat-bubble {
        max-width: 90%;
        font-size: 13px;
    }

    .chat-input {
        font-size: 13px;
        padding: 8px 14px;
    }

    .chat-header {
        padding: 10px 14px;
    }
}

/* ---------------------------------------------------------------------------
   15. CITY IMAGE BACKGROUND OVERLAY (inside chat widget)
   --------------------------------------------------------------------------- */
#chat-widget {
    position: relative;
}

.chat-city-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.2) 50%, transparent 80%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.2) 50%, transparent 80%);
    transition: opacity 0.4s ease;
}

[data-theme="dark"] .chat-city-bg {
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.12) 50%, transparent 80%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.12) 50%, transparent 80%);
}

/* Ensure chat content layers above the background */
.chat-header,
.chat-messages,
.chat-input-bar {
    position: relative;
    z-index: 1;
}

.chat-header {
    z-index: 4;
}

.chat-messages {
    z-index: 1;
}

.chat-input-bar {
    z-index: 3;
}

.chat-input-bar.city-dropdown-open {
    z-index: 5;
}

.weather-market-summary {
    margin-top: 18px;
    border-top: 1px solid var(--stroke, #e0e0e0);
}

.weather-market-summary-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 14px 0 0;
    cursor: pointer;
    list-style: none;
}

.weather-market-summary-header::-webkit-details-marker {
    display: none;
}

.weather-market-summary-header:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent, #d84a1b) 42%, transparent);
    outline-offset: 4px;
    border-radius: 6px;
}

.weather-market-summary-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
}

.weather-market-summary-title i {
    color: var(--accent, #d84a1b);
    font-size: 16px;
}

.weather-market-summary-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary, #666);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.weather-market-summary-toggle i {
    color: var(--text-tertiary, #999);
    font-size: 12px;
    transition: transform 0.2s ease;
}

.weather-market-summary[open] .weather-market-summary-toggle i {
    transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
    .weather-market-summary-toggle i {
        transition: none;
    }
}

.weather-market-summary-details {
    padding-top: 14px;
}

/* ---------------------------------------------------------------------------
   16. CITY DROPDOWN — FIXED POSITIONING (prevents clipping by overflow:hidden)
   --------------------------------------------------------------------------- */
.chat-city-dropdown.open {
    position: fixed;
    bottom: auto;
    left: auto;
    z-index: 20;
}

/* ---------------------------------------------------------------------------
   17. CHAT LANDING PAGE
   --------------------------------------------------------------------------- */
.chat-landing-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg, #f5f5f5);
    color: var(--text, #1a1a1a);
}

.chat-landing {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    zoom: var(--chat-page-font-zoom, 1);
}

@supports not (zoom: 1) {
    .chat-landing {
        font-size: calc(16px * var(--chat-page-font-zoom, 1));
    }
}

.chat-landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    flex-shrink: 0;
}

.chat-landing-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.chat-landing-logo-img {
    height: 32px;
    width: auto;
}

.chat-landing-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-font-controls {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--stroke, #ddd);
    border-radius: 999px;
    background: var(--surface, #fff);
}

.chat-font-controls button {
    min-width: 30px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary, #666);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.chat-font-controls button:hover:not(:disabled) {
    background: var(--accent-soft);
    color: var(--accent, #d84a1b);
}

.chat-font-controls button:disabled {
    opacity: 0.42;
    cursor: default;
}

.chat-landing-theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--stroke, #ddd);
    background: transparent;
    color: var(--text-secondary, #666);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: border-color 0.15s, color 0.15s;
}

.chat-landing-theme-toggle:hover {
    border-color: var(--accent, #d84a1b);
    color: var(--accent, #d84a1b);
}

.chat-landing-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 0 32px;
    max-width: none;
    margin: 0 auto;
    width: min(1180px, calc(100% - 48px));
}

.chat-landing-intro {
    width: 100%;
    text-align: center;
    margin-bottom: 24px;
}

.chat-landing-intro h1 {
    max-width: 760px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
    margin: 0 auto 8px;
}

.chat-landing-intro p {
    max-width: 760px;
    font-size: 15px;
    color: var(--text-secondary, #666);
    margin: 0 auto;
}

/* ── Market Insights Section ── */
.chat-landing-insights {
    width: 100%;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-landing-insights.is-refreshing {
    opacity: 0.62;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.insight-card {
    background: var(--surface, #fff);
    border: 1px solid var(--stroke, #e0e0e0);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}

.insight-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--stroke, #e0e0e0);
    background: var(--surface-alt, #fafafa);
}

.insight-card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text, #1a1a1a);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insight-card-header h2 i {
    color: var(--accent, #d84a1b);
    font-size: 18px;
}

.insight-date {
    font-size: 12px;
    color: var(--text-tertiary, #999);
    white-space: nowrap;
}

.insight-card-body {
    padding: 24px 24px 20px;
}

.market-decision-brief,
.mortgage-outlook-card,
.market-news-feed {
    border-color: rgba(15, 23, 42, 0.11);
}

.market-decision-brief .insight-card-body,
.mortgage-outlook-card .insight-card-body,
.market-news-feed .insight-card-body {
    padding-top: 18px;
}

.decision-brief-context {
    max-width: 760px;
    margin: 0 0 16px;
    color: var(--text-secondary, #667085);
    font-size: 13px;
    line-height: 1.55;
}

.decision-brief-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.decision-forecast-board,
.decision-action-board {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.decision-section-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    color: var(--text, #1a1a1a);
}

.decision-section-heading span {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.decision-section-heading small,
.decision-footnote {
    color: var(--text-secondary, #667085);
    font-size: 11px;
}

.decision-forecast-row {
    display: grid;
    grid-template-columns: minmax(190px, 0.52fr) minmax(0, 1.48fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.96));
}

.decision-segment-label {
    display: grid;
    gap: 4px;
    align-content: start;
    min-width: 0;
    padding-right: 4px;
}

.decision-segment-label strong {
    color: var(--text, #1a1a1a);
    font-size: 13px;
    font-weight: 800;
}

.decision-segment-label small {
    color: var(--text-secondary, #667085);
    font-size: 11px;
    line-height: 1.35;
}

.decision-horizon-grid,
.mortgage-outlook-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.decision-horizon-cell,
.mortgage-outlook-cell,
.decision-action-card {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-top: 3px solid transparent;
    border-radius: 8px;
    background: var(--surface, #fff);
}

.decision-horizon-cell,
.mortgage-outlook-cell {
    display: grid;
    gap: 5px;
    padding: 12px 13px;
}

.decision-horizon-cell span,
.mortgage-outlook-cell span,
.decision-action-card span {
    color: var(--text-tertiary, #999);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.decision-horizon-cell strong,
.mortgage-outlook-cell strong,
.decision-action-card strong {
    color: var(--text, #1a1a1a);
    font-size: 13.5px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.decision-horizon-cell small,
.mortgage-outlook-cell small,
.decision-action-card small {
    color: var(--text-secondary, #667085);
    font-size: 10.5px;
    line-height: 1.35;
}

.decision-horizon-cell.forecast-up,
.mortgage-outlook-cell.forecast-up,
.decision-action-card.forecast-up,
.news-feed-item.impact-up {
    border-left-color: #6f9d75;
    border-top-color: #6f9d75;
}

.decision-horizon-cell.forecast-up strong,
.mortgage-outlook-cell.forecast-up strong,
.decision-action-card.forecast-up strong {
    color: #4f7f59;
}

.decision-horizon-cell.forecast-down,
.mortgage-outlook-cell.forecast-down,
.decision-action-card.forecast-down,
.news-feed-item.impact-down {
    border-left-color: #c87972;
    border-top-color: #c87972;
}

.decision-horizon-cell.forecast-down strong,
.mortgage-outlook-cell.forecast-down strong,
.decision-action-card.forecast-down strong {
    color: #a65f59;
}

.decision-horizon-cell.forecast-same,
.mortgage-outlook-cell.forecast-same,
.decision-action-card.forecast-same,
.news-feed-item.impact-neutral {
    border-left-color: #8fa0ad;
    border-top-color: #8fa0ad;
}

.decision-horizon-cell.forecast-same strong,
.mortgage-outlook-cell.forecast-same strong,
.decision-action-card.forecast-same strong {
    color: #5f6f7d;
}

.decision-action-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 4px;
}

.decision-action-board .decision-section-heading {
    grid-column: 1 / -1;
}

.decision-action-card {
    display: grid;
    gap: 6px;
    align-content: start;
    min-height: 132px;
    padding: 13px 14px;
}

.decision-action-card p {
    margin: 0;
    color: var(--text-secondary, #667085);
    font-size: 12px;
    line-height: 1.45;
}

.mortgage-outlook-grid {
    margin-bottom: 10px;
}

.rate-pressure-track {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.rate-pressure-track span {
    display: block;
    height: 100%;
    max-width: 100%;
    border-radius: inherit;
    background: currentColor;
    opacity: 0.45;
}

.news-feed-list {
    display: grid;
    gap: 10px;
}

.market-news-brief {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--stroke, #e0e0e0);
    border-left: 3px solid color-mix(in srgb, var(--accent, #d84a1b) 62%, var(--stroke, #e0e0e0));
    border-radius: 8px;
    background: var(--surface-alt, #fafafa);
}

.market-news-lead {
    margin: 0;
    color: var(--text, #1a1a1a);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.market-news-brief-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.market-news-brief-section {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--stroke, #e0e0e0);
    border-radius: 8px;
    background: var(--surface, #fff);
}

.market-news-brief-section h3 {
    margin: 0;
    color: var(--text, #1a1a1a);
    font-size: 12px;
    font-weight: 800;
}

.market-news-brief-section p {
    margin: 0;
    color: var(--text-secondary, #667085);
    font-size: 12px;
    line-height: 1.48;
}

.market-news-brief-section small {
    color: var(--text-tertiary, #999);
    font-size: 10.5px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.news-feed-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--stroke, #e0e0e0);
    border-radius: 8px;
    background: var(--surface, #fff);
}

.market-news-feed .news-feed-item.impact-up,
.market-news-feed .news-feed-item.impact-down,
.market-news-feed .news-feed-item.impact-neutral {
    border-color: var(--stroke, #e0e0e0);
}

.news-feed-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.news-feed-title-row {
    display: flex;
    gap: 10px;
    align-items: baseline;
    justify-content: space-between;
    min-width: 0;
}

.news-feed-title-row a {
    color: var(--text, #1a1a1a);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    min-width: 0;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.news-feed-title-row a:hover {
    color: var(--accent, #d84a1b);
    text-decoration: underline;
}

.news-feed-title-row span,
.news-feed-tags span {
    flex-shrink: 0;
    padding: 2px 7px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    color: var(--text-secondary, #667085);
    font-size: 10px;
    font-weight: 800;
}

.news-feed-item p {
    margin: 0;
    color: var(--text-secondary, #667085);
    font-size: 12px;
    line-height: 1.45;
}

.news-feed-meta,
.news-feed-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    min-width: 0;
}

.news-feed-meta span {
    color: var(--text-tertiary, #999);
    font-size: 10.5px;
}

.news-feed-tags {
    align-content: start;
    justify-content: end;
    max-width: 150px;
}

[data-theme="dark"] .decision-forecast-row,
[data-theme="dark"] .news-feed-item {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.13);
}

[data-theme="dark"] .market-news-brief,
[data-theme="dark"] .market-news-brief-section {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.13);
}

[data-theme="dark"] .decision-horizon-cell,
[data-theme="dark"] .mortgage-outlook-cell,
[data-theme="dark"] .decision-action-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.13);
}

@media (max-width: 900px) {
    .decision-brief-grid {
        grid-template-columns: 1fr;
    }

    .metric-trend-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .decision-forecast-row,
    .decision-action-board,
    .metric-trend-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Insight text typography ── */
.insight-text {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--text-secondary, #555);
}

.insight-text p {
    margin: 0 0 14px;
}

.insight-text p:last-child {
    margin-bottom: 0;
}

.insight-text h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
    margin: 28px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--stroke, #e0e0e0);
}

.insight-text h3:first-child {
    margin-top: 0;
}

.insight-text h4 {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
    margin: 24px 0 8px;
    letter-spacing: -0.01em;
}

.insight-text h4:first-child {
    margin-top: 0;
}

.insight-text h5 {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary, #666);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 22px 0 8px;
}

.insight-text h5:first-child {
    margin-top: 0;
}

.insight-text h6 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary, #888);
    margin: 16px 0 6px;
}

.insight-text strong {
    font-weight: 600;
    color: var(--text, #1a1a1a);
}

.insight-text ul,
.insight-text ol {
    margin: 8px 0 16px;
    padding-left: 22px;
}

.insight-text ul {
    list-style: disc;
}

.insight-text ol {
    list-style: decimal;
}

.insight-text .analysis-list-heading {
    display: inline-block;
    font-weight: 700;
    color: var(--text, #1a1a1a);
}

.insight-text ol > li > ul {
    margin-top: 10px;
}

.insight-text ol > li > p {
    margin: 8px 0 0;
}

.insight-text li {
    margin-bottom: 6px;
    line-height: 1.65;
}

.insight-text li:last-child {
    margin-bottom: 0;
}

.insight-text hr {
    border: none;
    border-top: 1px solid var(--stroke, #e0e0e0);
    margin: 24px 0;
}

.insight-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--stroke, #e0e0e0);
    font-size: 12px;
    color: var(--text-tertiary, #999);
}

.insight-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.insight-meta i {
    font-size: 13px;
}

/* ── Market impact chips ── */
.impact-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid;
    line-height: 1.4;
}

.impact-up {
    color: #5f8f68;
    border-color: #8fb998;
}

.impact-down {
    color: #b86f69;
    border-color: #d7a19c;
}

.impact-neutral {
    color: var(--text-tertiary, #999);
    border-color: var(--text-tertiary, #999);
}

[data-theme="dark"] .impact-neutral {
    color: #9e9e9e;
    border-color: #9e9e9e;
}

[data-theme="dark"] .impact-up {
    color: #8fbd95;
    border-color: #8fbd95;
}

[data-theme="dark"] .impact-down {
    color: #d99892;
    border-color: #d99892;
}

/* ── Sourced market charts ── */
.insight-chart-panel {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--stroke, #e0e0e0);
    border-radius: 8px;
    background: var(--surface-alt, #fafafa);
}

.insight-chart-panel-compact {
    margin: 12px 14px;
}

.insight-text > .insight-chart-panel {
    margin: 18px 0 22px;
    line-height: 1.45;
    color: var(--text-secondary, #555);
}

[data-theme="dark"] .insight-chart-panel {
    background: rgba(255, 255, 255, 0.035);
}

.insight-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.insight-chart-collapsible .insight-chart-header {
    cursor: pointer;
    margin-bottom: 0;
    user-select: none;
}

.insight-chart-collapsible:not(.collapsed) .insight-chart-header {
    margin-bottom: 14px;
}

.insight-chart-toggle {
    align-items: center;
}

.insight-chart-body {
    display: block;
}

.insight-chart-collapsible.collapsed .insight-chart-body {
    display: none;
}

.insight-chart-header h3 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
}

.insight-chart-header span {
    max-width: 320px;
    text-align: right;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--text-tertiary, #999);
}

.insight-chart-chevron {
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--text-tertiary, #999);
    margin-left: auto;
    transition: transform 0.2s ease;
}

.insight-chart-collapsible.collapsed .insight-chart-chevron {
    transform: rotate(-90deg);
}

.insight-chart-description {
    max-width: 720px;
    margin: -4px 0 14px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary, #667085);
}

.insight-text .insight-chart-description {
    margin: -4px 0 14px;
}

[data-theme="dark"] .insight-chart-description {
    color: rgba(255, 255, 255, 0.68);
}

.model-quality-panel {
    margin-top: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.58);
}

.model-quality-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    color: var(--text, #1a1a1a);
    font-size: 12.5px;
    font-weight: 800;
}

.model-quality-panel > summary small {
    color: var(--text-secondary, #667085);
    font-size: 11px;
    font-weight: 600;
    text-align: right;
}

.model-quality-panel[open] {
    padding-bottom: 4px;
}

[data-theme="dark"] .model-quality-panel {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.035);
}

.stat-province-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 2px 0 14px;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.58);
}

.stat-province-filter-top {
    width: 100%;
    max-width: none;
    margin: 14px auto 0;
}

#stats-province-filter-shell {
    width: 100%;
}

[data-theme="dark"] .stat-province-filter {
    background: rgba(255, 255, 255, 0.035);
}

.stat-province-filter label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
}

.stat-province-filter select {
    min-height: 30px;
    min-width: 210px;
    max-width: 100%;
    padding: 5px 32px 5px 9px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 6px;
    background: var(--surface, #fff);
    color: var(--text, #1a1a1a);
    font-size: 12px;
}

.stat-province-filter span {
    margin-left: auto;
    font-size: 11.5px;
    color: var(--text-tertiary, #999);
}

.stat-province-filter.is-loading select {
    cursor: progress;
    opacity: 0.72;
}

.impact-trend-chart,
.coverage-chart,
.impact-vector-chart,
.outlook-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.evidence-board {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.evidence-category {
    display: grid;
    grid-template-columns: minmax(92px, 0.22fr) minmax(0, 1fr);
    align-items: start;
    min-width: 0;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.54);
}

.evidence-category h4 {
    margin: 3px 0 0;
    color: var(--text, #1a1a1a);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
}

.evidence-category .stat-chart {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.evidence-category .stat-chart-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 5px 10px;
    min-height: 82px;
    padding: 10px 12px;
    background: var(--surface, #fff);
}

.evidence-category .stat-chart-label {
    grid-column: 1;
}

.evidence-category .stat-chart-label small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.evidence-category .stat-chart-value {
    grid-column: 2;
    min-width: 78px;
}

.evidence-category .stat-chart-value small {
    max-width: 112px;
}

.evidence-category .stat-chart-source {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: 100%;
    padding-top: 5px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: left;
}

[data-theme="dark"] .evidence-category {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.035);
}

.stat-chart-city-header {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--stroke, #e0e0e0);
}

.insight-chart-panel > .stat-chart-city-header:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.stat-chart-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.25fr) minmax(104px, auto) minmax(110px, 0.8fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-left: 3px solid #aeb7c0;
    border-radius: 7px;
    background: rgba(248, 250, 252, 0.62);
}

.stat-chart-row.stat-dir-up {
    border-left-color: #86aa8b;
}

.stat-chart-row.stat-dir-down {
    border-left-color: #cf8c86;
}

.stat-chart-row.stat-dir-stable {
    border-left-color: #aeb7c0;
}

.stat-chart-row.stat-dir-reported {
    border-left-color: #d0a476;
}

.stat-chart-label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
}

.stat-chart-label span {
    overflow-wrap: anywhere;
}

.stat-chart-label small {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-secondary, #667085);
}

.stat-chart-value {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
}

.stat-chart-value strong {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text, #1a1a1a);
    white-space: nowrap;
}

.stat-chart-value small {
    max-width: 140px;
    overflow: hidden;
    color: var(--text-secondary, #667085);
    font-size: 10.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-chart-source {
    justify-self: end;
    max-width: 150px;
    overflow: hidden;
    color: var(--text-secondary, #667085);
    font-size: 11px;
    font-weight: 650;
    text-align: right;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-chart-source:hover {
    color: var(--accent, #d84a1b);
    text-decoration: underline;
}

.driver-timeline,
.metric-driver-matrix {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.44);
}

.driver-timeline-row,
.metric-driver-row {
    display: grid;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--text-secondary, #667085);
    font-size: 11.5px;
    line-height: 1.35;
}

.driver-timeline-row {
    grid-template-columns: 54px minmax(92px, 0.8fr) minmax(92px, 0.8fr) minmax(92px, 0.8fr) minmax(190px, 1.5fr) minmax(58px, auto);
}

.metric-driver-row {
    grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(110px, auto);
}

.driver-timeline-row:first-child,
.metric-driver-row:first-child {
    border-top: 0;
}

.driver-timeline-heading,
.metric-driver-heading {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-tertiary, #999);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.driver-date,
.driver-chip,
.metric-driver-row > span:first-child {
    color: var(--text, #1a1a1a);
    font-weight: 800;
}

.driver-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 10.5px;
    line-height: 1.15;
    text-align: center;
}

.driver-chip.impact-up,
.metric-driver-row .stat-dir-up {
    color: #5f8f68;
}

.driver-chip.impact-down,
.metric-driver-row .stat-dir-down {
    color: #b86f69;
}

.driver-chip.impact-neutral,
.metric-driver-row .stat-dir-stable {
    color: #6f7f8d;
}

[data-theme="dark"] .driver-timeline,
[data-theme="dark"] .metric-driver-matrix {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.035);
}

.metric-trend-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.metric-trend-card {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-left: 3px solid #aeb7c0;
    border-radius: 7px;
    background: rgba(248, 250, 252, 0.62);
}

.quarterly-signal-panel .insight-chart-description {
    max-width: 760px;
}

.metric-trend-section-heading {
    margin-top: 18px;
    margin-bottom: 10px;
}

.metric-trend-card.stat-dir-up {
    border-left-color: #86aa8b;
}

.metric-trend-card.stat-dir-down {
    border-left-color: #cf8c86;
}

.metric-trend-card.stat-dir-stable {
    border-left-color: #aeb7c0;
}

.metric-trend-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.metric-trend-card-header > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.metric-trend-card-header strong {
    color: var(--text, #1a1a1a);
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.25;
}

.metric-trend-card-header small,
.metric-trend-note {
    color: var(--text-secondary, #667085);
    font-size: 10.5px;
    line-height: 1.35;
}

.metric-trend-pill {
    flex-shrink: 0;
    padding: 2px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
}

.metric-trend-pill.stat-dir-up,
.signal-mix-value.stat-dir-up {
    color: #5f8f68;
}

.metric-trend-pill.stat-dir-down,
.signal-mix-value.stat-dir-down {
    color: #b86f69;
}

.metric-trend-pill.stat-dir-stable,
.signal-mix-value.stat-dir-stable {
    color: #6f7f8d;
}

.metric-sparkline {
    display: block;
    width: 100%;
    height: 62px;
    margin: 2px 0 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.48);
}

.metric-sparkline-grid {
    stroke: rgba(148, 163, 184, 0.22);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.metric-sparkline-line {
    fill: none;
    stroke: #aeb7c0;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.6;
    vector-effect: non-scaling-stroke;
}

.metric-sparkline-line.stat-dir-up {
    stroke: #7fa987;
}

.metric-sparkline-line.stat-dir-down {
    stroke: #c9827d;
}

.metric-sparkline-dot {
    fill: #aeb7c0;
    stroke: var(--surface, #fff);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.metric-sparkline-dot.stat-dir-up {
    fill: #7fa987;
}

.metric-sparkline-dot.stat-dir-down {
    fill: #c9827d;
}

.metric-trend-card-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.metric-trend-card-footer span {
    display: grid;
    gap: 1px;
    color: var(--text, #1a1a1a);
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.2;
}

.metric-trend-card-footer span:last-child {
    text-align: right;
}

.metric-trend-card-footer small {
    color: var(--text-secondary, #667085);
    font-size: 10px;
    font-weight: 500;
}

.metric-trend-card-footer strong {
    color: var(--text-secondary, #667085);
    font-size: 10.5px;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}

.signal-mix-chart {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 12px;
}

.signal-mix-row {
    display: grid;
    grid-template-columns: minmax(132px, 1.1fr) minmax(150px, 2fr) minmax(82px, auto);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.signal-mix-label {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.signal-mix-label span {
    overflow-wrap: anywhere;
    color: var(--text, #1a1a1a);
    font-size: 11.5px;
    font-weight: 800;
}

.signal-mix-label small {
    color: var(--text-secondary, #667085);
    font-size: 10px;
}

.signal-stack {
    display: flex;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.signal-segment {
    display: block;
}

.signal-segment-down {
    background: #cf8c86;
}

.signal-segment-stable {
    background: #b9c1ca;
}

.signal-segment-up {
    background: #86aa8b;
}

.signal-mix-value {
    font-size: 10.5px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

[data-theme="dark"] .metric-trend-card {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.045);
}

[data-theme="dark"] .metric-sparkline {
    background: rgba(255, 255, 255, 0.035);
}

[data-theme="dark"] .metric-sparkline-dot {
    stroke: #1f2329;
}

.impact-trend-row,
.coverage-row,
.impact-vector-row,
.outlook-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.impact-trend-label,
.coverage-label,
.impact-vector-label,
.outlook-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary, #666);
    white-space: nowrap;
}

.outlook-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.outlook-label small {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-tertiary, #999);
}

.outlook-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(201, 130, 125, 0.28), rgba(174, 183, 192, 0.28), rgba(127, 169, 135, 0.28));
}

.outlook-axis {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--stroke, #e0e0e0);
}

.outlook-marker {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    border: 2px solid var(--surface, #fff);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}

.outlook-marker.impact-up {
    background: #7fa987;
}

.outlook-marker.impact-down {
    background: #c9827d;
}

.outlook-marker.impact-neutral {
    background: #aeb7c0;
}

.outlook-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    max-width: 210px;
    font-size: 10.5px;
    color: var(--text-tertiary, #999);
    line-height: 1.25;
    text-align: right;
}

.outlook-values > span {
    font-weight: 800;
}

.outlook-values .impact-up {
    color: #5f8f68;
}

.outlook-values .impact-down {
    color: #b86f69;
}

.outlook-values .impact-neutral {
    color: #6f7f8d;
}

.forecast-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forecast-row {
    display: grid;
    grid-template-columns: minmax(118px, 0.8fr) repeat(3, minmax(92px, 1fr));
    gap: 8px;
    align-items: stretch;
}

.forecast-segment,
.forecast-cell {
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 7px;
    padding: 8px 10px;
    min-width: 0;
}

.forecast-segment {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    background: rgba(127, 145, 158, 0.07);
}

.forecast-segment strong,
.forecast-horizon {
    color: var(--text-primary, #202124);
    font-size: 12px;
    font-weight: 800;
}

.forecast-segment small,
.forecast-cell small {
    color: var(--text-tertiary, #777);
    font-size: 11px;
    line-height: 1.35;
}

.forecast-cell {
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    gap: 5px;
    background: rgba(255, 255, 255, 0.55);
}

.forecast-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 48px;
    padding: 2px 8px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.forecast-up {
    color: #5f8f68;
}

.forecast-down {
    color: #b86f69;
}

.forecast-same {
    color: #6f7f8d;
}

.forecast-leverage-line {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(148, 163, 184, 0.13);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.25;
}

.forecast-leverage-line.impact-up {
    color: #5f8f68;
}

.forecast-leverage-line.impact-down {
    color: #b86f69;
}

.forecast-leverage-line.impact-neutral {
    color: #6f7f8d;
}

.forecast-cell-empty {
    opacity: 0.72;
}

[data-theme="dark"] .forecast-segment,
[data-theme="dark"] .forecast-cell {
    border-color: rgba(255, 255, 255, 0.13);
}

[data-theme="dark"] .forecast-segment {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .forecast-cell {
    background: rgba(255, 255, 255, 0.035);
}

[data-theme="dark"] .forecast-up {
    color: #8fbd95;
}

[data-theme="dark"] .forecast-down {
    color: #d99892;
}

[data-theme="dark"] .forecast-same {
    color: #929daa;
}

.forecast-assessment-list,
.forecast-calibration-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.forecast-assessment-row,
.forecast-calibration-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 1.2fr) auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 7px;
    background: rgba(127, 145, 158, 0.055);
}

.forecast-calibration-row {
    grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.25fr) minmax(86px, auto);
}

.forecast-assessment-row > div,
.forecast-calibration-row > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.forecast-assessment-row strong,
.forecast-calibration-row strong {
    color: var(--text-primary, #202124);
    font-size: 12px;
    line-height: 1.25;
}

.forecast-assessment-row span,
.forecast-assessment-row small,
.forecast-calibration-row span,
.forecast-calibration-row small {
    color: var(--text-tertiary, #777);
    font-size: 11px;
    line-height: 1.35;
}

.forecast-calibration-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.forecast-calibration-metrics span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid rgba(127, 145, 158, 0.24);
    border-radius: 999px;
    color: var(--text-secondary, #555);
    background: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.forecast-assessment-row .forecast-chip {
    justify-self: end;
}

[data-theme="dark"] .forecast-assessment-row,
[data-theme="dark"] .forecast-calibration-row {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .forecast-calibration-metrics span {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
}

.impact-vector-stack {
    display: flex;
    min-width: 0;
    height: 11px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.impact-vector-segment {
    display: block;
    height: 100%;
    min-width: 0;
}

.impact-vector-positive {
    background: #7fa987;
}

.impact-vector-neutral {
    background: #aeb7c0;
}

.impact-vector-negative {
    background: #c9827d;
}

[data-theme="dark"] .impact-vector-positive {
    background: #8fbd95;
}

[data-theme="dark"] .impact-vector-neutral {
    background: #929daa;
}

[data-theme="dark"] .impact-vector-negative {
    background: #d99892;
}

.signal-brief-panel {
    display: grid;
    gap: 14px;
}

.signal-brief-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.85fr);
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-left: 4px solid #aeb7c0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.58);
}

.signal-brief-hero.impact-up {
    border-left-color: #5f8f68;
}

.signal-brief-hero.impact-down {
    border-left-color: #b86f69;
}

.signal-brief-hero.impact-neutral {
    border-left-color: #6f7f8d;
}

.signal-brief-answer {
    align-self: center;
    min-width: 0;
    padding: 18px 20px;
}

.signal-brief-answer span,
.signal-brief-context dt,
.signal-net-trend-header span {
    display: block;
    margin: 0 0 5px;
    color: var(--text-tertiary, #999);
    font-size: 10.5px;
    font-weight: 850;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.signal-brief-answer strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--text, #1a1a1a);
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.signal-brief-answer small,
.signal-brief-context small {
    display: block;
    margin-top: 6px;
    color: var(--text-tertiary, #999);
    font-size: 10.5px;
    line-height: 1.35;
}

.signal-brief-context {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    margin: 0;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.32);
}

.signal-brief-context > div {
    min-width: 0;
    padding: 16px;
}

.signal-brief-context > div + div {
    border-left: 1px solid rgba(148, 163, 184, 0.18);
}

.signal-brief-context dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text, #1a1a1a);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
}

.signal-brief-context .impact-up dd,
.signal-driver-row .impact-up,
.signal-net-row .impact-up {
    color: #5f8f68;
}

.signal-brief-context .impact-down dd,
.signal-driver-row .impact-down,
.signal-net-row .impact-down {
    color: #b86f69;
}

.signal-brief-context .impact-neutral dd,
.signal-driver-row .impact-neutral,
.signal-net-row .impact-neutral {
    color: #6f7f8d;
}

.signal-brief-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.insight-chart-body > .signal-brief-body {
    margin-top: 12px;
}

.signal-driver-matrix {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--stroke, #e0e0e0);
    border-radius: 8px;
}

.signal-driver-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.05fr) minmax(140px, 1.2fr) minmax(96px, 0.7fr) minmax(92px, 0.7fr) minmax(72px, 0.55fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
    border-top: 1px solid var(--stroke, #e0e0e0);
    font-size: 12px;
    line-height: 1.35;
}

.signal-driver-row:first-child {
    border-top: 0;
}

.signal-driver-heading {
    background: rgba(127, 127, 127, 0.055);
    color: var(--text-tertiary, #999);
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
}

.signal-driver-row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.signal-driver-row span:first-child,
.signal-driver-row span:nth-child(3) {
    font-weight: 800;
}

.plain-pressure-panel {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.plain-pressure-audience span,
.plain-scope-card span,
.plain-driver-result span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-tertiary, #777);
    font-size: 10.5px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.plain-move-card small,
.plain-scope-card small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary, #667085);
    line-height: 1.4;
}

.plain-pressure-audience {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.plain-pressure-audience article,
.plain-scope-card {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.62);
}

.plain-pressure-audience p {
    margin: 0;
    color: var(--text, #1a1a1a);
    font-size: 12.5px;
    line-height: 1.45;
}

.signal-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-top: 3px;
}

.signal-section-heading strong {
    color: var(--text, #1a1a1a);
    font-size: 11.5px;
    font-weight: 850;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.signal-section-heading span {
    color: var(--text-tertiary, #999);
    font-size: 10.5px;
    text-align: right;
}

.signal-recent-heading {
    margin-top: 2px;
    padding-top: 13px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.plain-evidence-mix,
.plain-driver-chart {
    display: grid;
    gap: 9px;
}

.plain-evidence-row,
.plain-driver-row {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(120px, auto) minmax(140px, 1.4fr) minmax(80px, auto);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.46);
}

.plain-evidence-row > span,
.plain-driver-label strong {
    color: var(--text, #1a1a1a);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.3;
}

.plain-evidence-row b,
.plain-driver-result span {
    font-size: 11.5px;
    font-weight: 850;
    line-height: 1.25;
}

.plain-evidence-row b.impact-up,
.plain-recent-reads .impact-up,
.plain-scope-card.impact-up strong,
.plain-driver-result .stat-dir-up {
    color: #5f8f68;
}

.plain-evidence-row b.impact-down,
.plain-recent-reads .impact-down,
.plain-scope-card.impact-down strong,
.plain-driver-result .stat-dir-down {
    color: #b86f69;
}

.plain-evidence-row b.impact-neutral,
.plain-recent-reads .impact-neutral,
.plain-scope-card.impact-neutral strong,
.plain-driver-result .stat-dir-stable {
    color: #6f7f8d;
}

.plain-evidence-row i,
.plain-direction-meter {
    display: flex;
    height: 12px;
    min-width: 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.plain-evidence-row em {
    display: block;
    min-width: 2px;
    height: 100%;
    border-radius: 999px;
}

.plain-evidence-row em.impact-up,
.plain-meter-up {
    background: #86aa8b;
}

.plain-evidence-row em.impact-down,
.plain-meter-down {
    background: #cf8c86;
}

.plain-evidence-row em.impact-neutral,
.plain-meter-stable {
    background: #b9c1ca;
}

.plain-evidence-row small,
.plain-driver-result small {
    color: var(--text-secondary, #667085);
    font-size: 10.5px;
    line-height: 1.3;
    text-align: right;
}

.plain-recent-reads {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.plain-recent-reads span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
}

.signal-brief-panel .plain-recent-reads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 6px;
}

.signal-brief-panel .plain-recent-reads span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-height: 48px;
    padding: 9px 10px 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-top: 2px solid currentColor;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.42);
    font-size: 10.5px;
    line-height: 1.2;
}

.signal-brief-panel .plain-recent-reads b {
    color: var(--text, #1a1a1a);
    font-size: 11px;
    font-weight: 850;
}

.plain-recent-reads-roomy {
    margin-top: 12px;
}

.plain-city-outlook {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.plain-scope-card strong {
    display: block;
    color: var(--text, #1a1a1a);
    font-size: 14px;
    line-height: 1.3;
}

.plain-driver-row {
    grid-template-columns: minmax(130px, 1fr) minmax(170px, 1.5fr) minmax(105px, auto);
}

.plain-driver-label {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.plain-driver-label small {
    color: var(--text-secondary, #667085);
    font-size: 10.5px;
    line-height: 1.35;
}

.plain-driver-result {
    min-width: 0;
    text-align: right;
}

.plain-driver-result span {
    margin-bottom: 2px;
}

.market-driver-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.market-driver-group {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--stroke, #e0e0e0);
    border-top: 3px solid color-mix(in srgb, var(--text-tertiary, #999) 42%, var(--stroke, #e0e0e0));
    border-radius: 8px;
    background: var(--surface, #fff);
}

.market-driver-group-header {
    display: grid;
    gap: 3px;
    margin-bottom: 10px;
}

.market-driver-group-header strong {
    color: var(--text, #1a1a1a);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
}

.market-driver-group-header span,
.market-driver-item small,
.market-driver-note {
    color: var(--text-secondary, #667085);
    font-size: 10.5px;
    line-height: 1.35;
}

.market-driver-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.market-driver-item strong {
    display: block;
    color: var(--text, #1a1a1a);
    font-size: 12px;
    line-height: 1.3;
}

.market-driver-item > span {
    flex: 0 0 auto;
    color: var(--text-secondary, #667085);
    font-size: 10.5px;
    line-height: 1.35;
    text-align: right;
}

.market-driver-note {
    margin: 10px 0 0;
}

.plain-move-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.plain-move-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--stroke, #e0e0e0);
    border-left: 3px solid color-mix(in srgb, var(--text-tertiary, #999) 42%, var(--stroke, #e0e0e0));
    border-radius: 8px;
    background: var(--surface, #fff);
}

.plain-move-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.plain-move-heading strong {
    color: var(--text, #1a1a1a);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.plain-move-heading span {
    color: var(--text-secondary, #667085);
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

.plain-move-values {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.plain-move-values span {
    display: grid;
    gap: 2px;
}

.plain-move-values span:last-child {
    text-align: right;
}

.plain-move-values b {
    color: var(--text, #1a1a1a);
    font-size: 14px;
    line-height: 1.2;
}

.plain-move-values small {
    margin: 0;
    color: var(--text-secondary, #667085);
    font-size: 10.5px;
}

.plain-move-values i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--text-secondary, #667085);
}

.plain-move-change {
    margin: 10px 0 0;
    color: var(--text, #1a1a1a);
    font-size: 12.5px;
    font-weight: 850;
}

[data-theme="dark"] .signal-brief-hero,
[data-theme="dark"] .signal-brief-context,
[data-theme="dark"] .plain-pressure-audience article,
[data-theme="dark"] .plain-scope-card,
[data-theme="dark"] .plain-evidence-row,
[data-theme="dark"] .plain-driver-row,
[data-theme="dark"] .market-driver-group,
[data-theme="dark"] .plain-move-card,
[data-theme="dark"] .signal-brief-panel .plain-recent-reads span {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.045);
}

.signal-net-trend-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--stroke, #e0e0e0);
    border-radius: 8px;
    background: rgba(127, 127, 127, 0.035);
}

.signal-net-trend-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
}

.signal-net-trend-header strong {
    font-size: 13px;
    color: var(--text-primary, #222);
}

.signal-net-trend-header span {
    margin-bottom: 0;
    text-align: right;
    text-transform: none;
    font-weight: 600;
}

.signal-net-trend {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 8px 12px;
}

.signal-net-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 5px 8px;
    align-items: center;
    min-width: 0;
    font-size: 11.5px;
}

.signal-net-date {
    font-weight: 800;
    color: var(--text-secondary, #555);
}

.signal-net-line {
    position: relative;
    height: 18px;
    min-width: 0;
}

.signal-net-row > span:last-child {
    grid-column: 2;
    line-height: 1.2;
}

.signal-net-line::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, #c9827d 0 44%, #aeb7c0 44% 56%, #7fa987 56% 100%);
    opacity: 0.7;
}

.signal-net-line::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: var(--stroke, #e0e0e0);
}

.signal-net-line i {
    position: absolute;
    top: 50%;
    z-index: 1;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.signal-net-line i.impact-up {
    background: #5f8f68;
}

.signal-net-line i.impact-down {
    background: #b86f69;
}

.signal-net-line i.impact-neutral {
    background: #6f7f8d;
}

.signal-net-axis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    font-size: 10.5px;
    color: var(--text-tertiary, #999);
}

.signal-net-axis span:nth-child(2) {
    text-align: center;
}

.signal-net-axis span:last-child {
    text-align: right;
}

[data-theme="dark"] .signal-driver-matrix,
[data-theme="dark"] .signal-net-trend-card {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .signal-net-line i {
    border-color: #1f1f1f;
}

.impact-track-group {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.market-pressure-axis {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    margin: 10px 0 8px 56px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-tertiary, #999);
    line-height: 1.2;
}

.market-pressure-axis span:first-child {
    color: #b86f69;
}

.market-pressure-axis span:nth-child(2) {
    color: #6f7f8d;
    text-align: center;
}

.market-pressure-axis span:last-child {
    color: #5f8f68;
    text-align: right;
}

.impact-track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: rgba(127, 127, 127, 0.12);
    overflow: hidden;
}

.impact-track::before {
    position: absolute;
    left: 4px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    font-size: 7px;
    font-weight: 800;
    color: var(--text-tertiary, #999);
    line-height: 1;
}

.impact-track:nth-child(1)::before {
    content: "L";
}

.impact-track:nth-child(2)::before {
    content: "P";
}

.impact-track:nth-child(3)::before {
    content: "N";
}

.impact-track-axis {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--stroke, #e0e0e0);
}

.impact-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    min-width: 2px;
    border-radius: 999px;
}

.impact-bar.impact-up {
    background: #7fa987;
    border-color: transparent;
}

.impact-bar.impact-down {
    background: #c9827d;
    border-color: transparent;
}

.impact-bar.impact-neutral {
    background: transparent;
    min-width: 0;
}

[data-theme="dark"] .impact-bar.impact-up {
    background: #8fbd95;
}

[data-theme="dark"] .impact-bar.impact-down {
    background: #d99892;
}

.impact-trend-metrics,
.coverage-values,
.impact-vector-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 64px;
    font-size: 10.5px;
    color: var(--text-tertiary, #999);
    line-height: 1.25;
}

.impact-vector-values .impact-up {
    color: #5f8f68;
    font-weight: 800;
}

.impact-vector-values .impact-down {
    color: #b86f69;
    font-weight: 800;
}

.impact-vector-values .impact-neutral {
    color: #6f7f8d;
    font-weight: 800;
}

.coverage-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
}

.coverage-bar {
    display: block;
    height: 9px;
    min-width: 2px;
    border-radius: 999px;
}

.coverage-summaries {
    background: #6f8faa;
}

.coverage-sources {
    background: #c89562;
}

[data-theme="dark"] .coverage-summaries {
    background: #8fb0c9;
}

[data-theme="dark"] .coverage-sources {
    background: #d9aa78;
}

.impact-chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--text-secondary, #666);
}

.impact-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary, #999);
}

.legend-local {
    background: #6f8faa;
}

.legend-provincial {
    background: #c89562;
}

.legend-national {
    background: #879d7f;
}

.legend-summaries {
    background: #6f8faa;
}

.legend-sources {
    background: #c89562;
}

.legend-positive {
    background: #7fa987;
}

.legend-neutral {
    background: #aeb7c0;
}

.legend-negative {
    background: #c9827d;
}

.legend-note {
    color: var(--text-tertiary, #999);
}

.insight-chart-sources {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--stroke, #e0e0e0);
    font-size: 12px;
    color: var(--text-secondary, #666);
}

.insight-chart-sources summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text, #1a1a1a);
}

.chart-source-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding-top: 10px;
}

.chart-source-row > span {
    color: var(--text-tertiary, #999);
    font-weight: 700;
}

.chart-source-row div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 0;
}

.chart-source-row-stacked div {
    flex-direction: column;
    align-items: flex-start;
}

.chart-source-row small {
    display: block;
    color: var(--text-tertiary, #999);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.chart-source-row small.stat-validation-note,
.stat-validation-note {
    color: #2f6f4e;
    font-weight: 600;
}

.chart-source-row a {
    color: var(--accent, #d84a1b);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.chart-source-row a:hover {
    text-decoration: underline;
}

/* ── Collapsible insight cards ── */
.insight-collapsible .insight-card-header {
    cursor: pointer;
    user-select: none;
}

.insight-collapsible .insight-card-header:hover {
    background: var(--surface-hover, #f0f0f0);
}

[data-theme="dark"] .insight-collapsible .insight-card-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.insight-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.insight-chevron {
    font-size: 14px;
    color: var(--text-tertiary, #999);
    transition: transform 0.25s ease;
}

.insight-collapsible.collapsed .insight-chevron {
    transform: rotate(-90deg);
}

.insight-collapsible .insight-card-body {
    overflow: visible;
    transition: padding 0.35s ease, opacity 0.25s ease;
    opacity: 1;
}

.insight-collapsible.collapsed .insight-card-body {
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.insight-collapsible.collapsed .insight-card-header {
    border-bottom-color: transparent;
}

.insight-key-trends {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: var(--surface-alt, #fafafa);
    border-radius: 8px;
    border-left: 3px solid var(--accent, #d84a1b);
}

[data-theme="dark"] .insight-key-trends {
    background: rgba(255, 255, 255, 0.04);
}

.key-trend-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text, #1a1a1a);
    line-height: 1.55;
}

.key-trend-item i {
    color: var(--accent, #d84a1b);
    font-size: 12px;
    margin-top: 3px;
    flex-shrink: 0;
}

.trend-visual-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--accent, #d84a1b) 18%, var(--stroke, #e0e0e0));
    border-radius: 8px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--accent, #d84a1b) 4%, transparent), transparent 58%),
        var(--surface, #fff);
}

.trend-decision-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--stroke, #e0e0e0);
    border-radius: 8px;
    background: var(--surface-alt, #fafafa);
}

.trend-decision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.trend-decision-card {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--stroke, #e0e0e0);
    border-radius: 8px;
    background: var(--surface, #fff);
}

.trend-decision-card span {
    color: var(--text-tertiary, #999);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.trend-decision-card strong {
    color: var(--text, #1a1a1a);
    font-size: 13.5px;
    line-height: 1.35;
}

.trend-decision-card p {
    margin: 0;
    color: var(--text-secondary, #667085);
    font-size: 12px;
    line-height: 1.45;
}

.trend-decision-card small {
    color: var(--text-tertiary, #999);
    font-size: 11px;
    line-height: 1.4;
}

.trend-decision-card b {
    color: var(--text-secondary, #667085);
    font-weight: 800;
}

.trend-visual-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.trend-visual-kpis > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--stroke, #e0e0e0);
    border-radius: 8px;
    background: var(--surface, #fff);
}

.trend-visual-kpis span,
.trend-theme-row span {
    display: block;
    color: var(--text-tertiary, #999);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.trend-visual-kpis strong {
    display: block;
    margin-top: 4px;
    color: var(--text, #1a1a1a);
    font-size: 18px;
    line-height: 1.15;
}

.trend-visual-kpis small {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary, #667085);
    font-size: 11px;
    line-height: 1.35;
}

.trend-theme-chart {
    display: grid;
    gap: 8px;
}

.trend-theme-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 10px;
}

.trend-theme-track {
    position: relative;
    overflow: hidden;
    height: 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
}

.trend-theme-track i {
    display: block;
    height: 100%;
    min-width: 8px;
    border-radius: inherit;
}

.trend-theme-track i.stat-dir-up {
    background: #86aa8b;
}

.trend-theme-track i.stat-dir-down {
    background: #cf8c86;
}

.trend-theme-track i.stat-dir-stable {
    background: #aeb7c0;
}

.trend-theme-track i.stat-dir-reported {
    background: #d0a476;
}

.trend-theme-row strong {
    color: var(--text, #1a1a1a);
    font-size: 12px;
    text-align: right;
}

.trend-coverage-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    gap: 9px;
    min-height: 116px;
    padding-top: 6px;
}

.trend-coverage-column {
    display: grid;
    grid-template-rows: minmax(72px, 1fr) auto;
    gap: 7px;
    min-width: 0;
}

.trend-coverage-bars {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 4px;
    min-height: 72px;
    padding: 8px 5px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.trend-coverage-bars i {
    width: 9px;
    min-height: 5px;
    border-radius: 999px 999px 0 0;
}

.trend-coverage-summaries {
    background: #86aa8b;
}

.trend-coverage-sources {
    background: #aeb7c0;
}

.trend-coverage-column span {
    overflow: hidden;
    color: var(--text-secondary, #667085);
    font-size: 10.5px;
    font-weight: 700;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme="dark"] .trend-visual-panel,
[data-theme="dark"] .trend-decision-panel,
[data-theme="dark"] .trend-visual-kpis > div,
[data-theme="dark"] .trend-decision-card {
    background: rgba(255, 255, 255, 0.04);
}

/* ── Data Sources ── */
.data-sources-intro {
    font-size: 13.5px;
    color: var(--text-secondary, #666);
    margin: 0 0 18px;
    line-height: 1.5;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--accent, #d84a1b) 20%, var(--stroke, #e0e0e0));
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent, #d84a1b) 5%, var(--surface, #fff));
}

.data-source-group {
    margin-bottom: 18px;
}

.data-source-group:last-child {
    margin-bottom: 0;
}

.data-source-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--stroke, #e0e0e0);
}

.data-source-category {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent, #d84a1b);
    margin: 0;
}

.data-source-category-count {
    color: var(--text-tertiary, #888);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.data-source-panels {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--stroke, #e0e0e0);
    border-radius: 8px;
    background: var(--surface, #fff);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.data-source-panel {
    position: relative;
    border-top: 1px solid color-mix(in srgb, var(--stroke, #e0e0e0) 74%, transparent);
    background: transparent;
    transition: background-color 0.15s ease;
}

.data-source-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: transparent;
    transition: background-color 0.15s ease;
}

.data-source-panel:first-child {
    border-top: 0;
}

.data-source-panel-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    list-style: none;
}

.data-source-panel:hover,
.data-source-panel.expanded {
    background: color-mix(in srgb, var(--surface-hover, #f0f0f0) 48%, transparent);
}

.data-source-panel-expandable:hover::before,
.data-source-panel.expanded::before {
    background: color-mix(in srgb, var(--accent, #d84a1b) 72%, transparent);
}

.data-source-toggle {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 0;
    text-align: left;
    font: inherit;
}

.data-source-toggle::before {
    content: "\F282";
    font-family: "bootstrap-icons";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-alt, #fafafa) 86%, var(--stroke, #e0e0e0));
    color: var(--text-tertiary, #888);
    font-size: 10px;
    line-height: 1;
    flex: 0 0 auto;
    margin-top: 1px;
    transition: transform 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.data-source-panel.expanded > .data-source-panel-summary .data-source-toggle::before,
.data-source-page.expanded > .data-source-page-summary .data-source-toggle::before {
    transform: rotate(90deg);
    background: color-mix(in srgb, var(--accent, #d84a1b) 13%, var(--surface, #fff));
    color: var(--accent, #d84a1b);
}

.data-source-toggle:focus-visible,
.data-source-link:focus-visible,
.data-source-page-link:focus-visible {
    outline: 2px solid var(--accent, #d84a1b);
    outline-offset: 2px;
}

.data-source-panel-main {
    display: grid;
    align-items: start;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.data-source-panel-static {
    padding-left: 26px;
}

.data-source-title {
    color: var(--text, #1a1a1a);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
}

.data-source-page-title {
    color: var(--text, #1a1a1a);
    font-size: 12.5px;
    line-height: 1.4;
    flex: 1 1 280px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.data-source-panel-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.data-source-link,
.data-source-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--text-tertiary, #888);
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.data-source-link:hover,
.data-source-page-link:hover {
    border-color: color-mix(in srgb, var(--accent, #d84a1b) 34%, transparent);
    background: color-mix(in srgb, var(--accent, #d84a1b) 8%, var(--surface, #fff));
    color: var(--accent, #d84a1b);
}

.data-source-link i,
.data-source-page-link i {
    font-size: 11px;
}

.data-source-impact {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.data-source-impact .impact-chip {
    gap: 3px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: 650;
    background: color-mix(in srgb, currentColor 6%, transparent);
}

.impact-chip-label {
    color: color-mix(in srgb, currentColor 62%, var(--text-tertiary, #888));
    font-weight: 600;
}

.data-source-page-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid color-mix(in srgb, var(--stroke, #e0e0e0) 76%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-alt, #fafafa) 72%, transparent);
    color: var(--text-tertiary, #888);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.data-source-page-count i {
    font-size: 11px;
}

.data-source-pages {
    border-top: 1px solid var(--stroke, #e0e0e0);
    padding: 5px 12px 9px 39px;
    background: color-mix(in srgb, var(--surface-alt, #fafafa) 62%, transparent);
}

.data-source-page {
    border-top: 1px solid color-mix(in srgb, var(--stroke, #e0e0e0) 70%, transparent);
}

.data-source-page:first-child {
    border-top: 0;
}

.data-source-page-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 8px 2px;
    list-style: none;
}

.data-source-page:hover {
    background: color-mix(in srgb, var(--surface-hover, #f0f0f0) 38%, transparent);
}

.data-source-page-toggle {
    align-items: flex-start;
    flex-wrap: wrap;
}

.data-source-page-toggle .data-source-impact {
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .data-source-category-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .data-source-panel-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .data-source-panel-actions {
        justify-content: space-between;
        padding-left: 26px;
    }

    .data-source-pages {
        padding-left: 26px;
    }
}

.data-source-page-text {
    color: var(--text-secondary, #666);
    font-size: 12.5px;
    line-height: 1.55;
    padding: 0 0 10px 20px;
}

.data-source-page-text p {
    margin: 0 0 7px;
}

.data-source-page-text p:last-child {
    margin-bottom: 0;
}

.data-source-page-text ul,
.data-source-page-text ol {
    margin: 4px 0 8px;
    padding-left: 18px;
}

.data-source-page-text h3,
.data-source-page-text h4,
.data-source-page-text h5,
.data-source-page-text h6 {
    margin: 10px 0 5px;
    color: var(--text, #1a1a1a);
    font-size: 13px;
    font-weight: 700;
}

/* ── Weather Forecast Grid ── */
.weather-forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.weather-day {
    background: var(--surface-alt, #fafafa);
    border: 1px solid var(--stroke, #e0e0e0);
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weather-day-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text, #1a1a1a);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.weather-day-condition {
    font-size: 12px;
    color: var(--text-secondary, #666);
}

.weather-day-temps {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
}

.weather-high {
    color: var(--accent, #d84a1b);
}

.weather-low {
    color: var(--text-tertiary, #999);
    font-weight: 400;
}

.weather-day-details {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-tertiary, #999);
}

.weather-day-details i {
    font-size: 11px;
}

.weather-day:only-child {
    display: grid;
    grid-template-columns: minmax(110px, 0.8fr) minmax(100px, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    text-align: left;
}

.weather-day:only-child .weather-day-temps,
.weather-day:only-child .weather-day-details {
    justify-content: flex-start;
}

/* Full-width chat widget on landing page */
.chat-landing .chat-layout {
    width: 100%;
    max-width: none;
}

.chat-landing #chat-widget {
    max-height: 600px;
    min-height: 480px;
}

.chat-landing-footer {
    flex-shrink: 0;
    padding: 20px 32px;
    border-top: 1px solid var(--stroke, #e0e0e0);
}

.chat-landing-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 760px;
    margin: 0 auto;
    font-size: 13px;
    color: var(--text-tertiary, #999);
}

.chat-landing-footer-links {
    display: flex;
    gap: 16px;
}

.chat-landing-footer-links a {
    color: var(--text-secondary, #666);
    text-decoration: none;
    transition: color 0.15s;
}

.chat-landing-footer-links a:hover {
    color: var(--accent, #d84a1b);
}

.chat-landing-footer-canada {
    font-size: 12px;
}

@media (max-width: 600px) {
    .weather-day:only-child {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px 12px;
    }

    .weather-market-summary-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .weather-market-summary-header .insight-date {
        display: none;
    }

    .weather-market-summary-toggle-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .chat-landing-header {
        padding: 12px 16px;
    }

    .chat-landing-header-actions {
        gap: 6px;
    }

    .chat-font-controls button {
        min-width: 28px;
    }

    .chat-landing-main {
        width: min(100% - 28px, 1180px);
        padding: 0 0 24px;
    }

    .chat-landing-intro h1 {
        font-size: 22px;
    }

    .chat-landing-intro p {
        font-size: 13px;
    }

    .chat-landing #chat-widget {
        min-height: 400px;
        max-height: 520px;
    }

    .insight-chart-header {
        flex-direction: column;
        gap: 4px;
    }

    .insight-chart-toggle {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .insight-chart-toggle span {
        grid-column: 1 / -1;
    }

    .insight-chart-toggle .insight-chart-chevron {
        grid-column: 2;
        grid-row: 1;
    }

    .insight-chart-header span {
        max-width: none;
        text-align: left;
    }

    .stat-province-filter {
        align-items: stretch;
    }

    .stat-province-filter select {
        width: 100%;
    }

    .stat-province-filter span {
        margin-left: 0;
    }

    .stat-chart-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
        gap: 7px;
    }

    .evidence-category .stat-chart-row {
        grid-template-columns: 1fr;
    }

    .evidence-category,
    .evidence-category .stat-chart {
        grid-template-columns: 1fr;
    }

    .evidence-category .stat-chart-label,
    .evidence-category .stat-chart-value,
    .evidence-category .stat-chart-source {
        grid-column: 1;
    }

    .stat-chart-value {
        align-items: flex-start;
        text-align: left;
    }

    .stat-chart-value small,
    .stat-chart-source {
        max-width: 100%;
        text-align: left;
    }

    .stat-chart-source {
        justify-self: start;
    }

    .evidence-board {
        grid-template-columns: 1fr;
    }

    .trend-visual-kpis,
    .trend-theme-row {
        grid-template-columns: 1fr;
    }

    .trend-theme-row strong {
        text-align: left;
    }

    .trend-coverage-chart {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .driver-timeline-row,
    .metric-driver-row {
        grid-template-columns: 1fr;
        gap: 6px;
        align-items: flex-start;
    }

    .driver-timeline-heading,
    .metric-driver-heading {
        display: none;
    }

    .driver-chip {
        justify-content: flex-start;
        width: fit-content;
    }

    .metric-trend-grid {
        grid-template-columns: 1fr;
    }

    .metric-trend-card-footer {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .metric-trend-card-footer span:last-child,
    .metric-trend-card-footer strong {
        text-align: left;
    }

    .market-news-brief-grid,
    .decision-brief-grid,
    .decision-forecast-row,
    .news-feed-item {
        grid-template-columns: 1fr;
    }

    .decision-horizon-grid,
    .mortgage-outlook-grid {
        grid-template-columns: 1fr;
    }

    .decision-section-heading,
    .news-feed-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .news-feed-tags {
        justify-content: flex-start;
        max-width: 100%;
    }

    .signal-mix-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .signal-mix-value {
        text-align: left;
    }

    .signal-brief-hero,
    .signal-brief-body {
        grid-template-columns: 1fr;
    }

    .signal-brief-context {
        border-top: 1px solid rgba(148, 163, 184, 0.22);
        border-left: 0;
    }

    .signal-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .signal-section-heading span {
        text-align: left;
    }

    .plain-pressure-audience,
    .plain-city-outlook,
    .market-driver-board,
    .plain-move-grid {
        grid-template-columns: 1fr;
    }

    .plain-evidence-row,
    .plain-driver-row {
        grid-template-columns: 1fr;
        gap: 7px;
        align-items: flex-start;
    }

    .plain-evidence-row small,
    .market-driver-item > span,
    .plain-driver-result,
    .plain-driver-result small {
        text-align: left;
    }

    .market-driver-item {
        display: grid;
        gap: 4px;
    }

    .plain-move-heading,
    .plain-move-values span:last-child {
        text-align: left;
    }

    .plain-move-heading {
        display: grid;
    }

    .plain-move-values {
        grid-template-columns: 1fr;
    }

    .plain-move-values i {
        transform: rotate(90deg);
    }

    .signal-driver-row {
        grid-template-columns: 1fr;
        gap: 5px;
        align-items: flex-start;
    }

    .signal-driver-heading {
        display: none;
    }

    .signal-net-trend {
        grid-template-columns: 1fr;
    }

    .signal-net-row {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .signal-net-row > span:last-child {
        grid-column: 2;
        font-size: 11px;
    }

    .impact-trend-row,
    .coverage-row,
    .impact-vector-row,
    .outlook-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .market-pressure-axis {
        margin-left: 48px;
        font-size: 10px;
    }

    .forecast-row {
        grid-template-columns: 1fr;
    }

    .forecast-cell {
        grid-template-columns: auto auto;
        grid-template-rows: auto auto;
        align-items: center;
    }

    .forecast-cell small {
        grid-column: 1 / -1;
    }

    .forecast-leverage-line {
        grid-column: 1 / -1;
    }

    .forecast-assessment-row,
    .forecast-calibration-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .forecast-calibration-metrics {
        grid-template-columns: 1fr;
    }

    .forecast-assessment-row .forecast-chip {
        justify-self: start;
    }

    .impact-trend-metrics,
    .coverage-values,
    .impact-vector-values,
    .outlook-values {
        grid-column: 2;
        flex-direction: row;
        justify-content: flex-end;
        align-items: flex-start;
        min-width: 0;
        max-width: none;
        text-align: left;
    }

    .chart-source-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .chat-landing-footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ---------------------------------------------------------------------------
   SLASH COMMAND MENU
   --------------------------------------------------------------------------- */
.chat-slash-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    z-index: 100;
    margin-bottom: 4px;
    padding: 4px 0;
}

.chat-slash-menu.open {
    display: flex;
}

.chat-slash-item {
    display: flex;
    flex-direction: column;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.chat-slash-item:hover,
.chat-slash-item.active {
    background: var(--accent-soft);
}

.chat-slash-item-name {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text);
}

.chat-slash-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 1px;
}

/* ---------------------------------------------------------------------------
   VALUATION STATISTICS PANEL
   --------------------------------------------------------------------------- */
/* ── Valuation Statistics Panel ── */

.val-stats-panel {
    margin-top: 16px;
    padding: 16px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--stroke);
}
[data-theme="dark"] .val-stats-panel {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

/* Metric cards row */
.val-stats-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.val-stats-card {
    flex: 1;
    min-width: 110px;
    padding: 10px 12px;
    background: var(--surface-alt);
    border-radius: 8px;
    border: 1px solid var(--stroke);
}
[data-theme="dark"] .val-stats-card {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.08);
}
.val-stats-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.val-stats-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.val-stats-positive { color: #5f8f68; }
[data-theme="dark"] .val-stats-positive { color: #8fbd95; }
.val-stats-negative { color: #b86f69; }
[data-theme="dark"] .val-stats-negative { color: #d99892; }

/* Section dividers */
.val-stats-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--stroke);
}
[data-theme="dark"] .val-stats-section {
    border-color: rgba(255,255,255,0.08);
}
.val-stats-section-title {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

/* Chart */
.val-stats-chart-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.val-stats-chart {
    width: 100%;
    min-height: 260px;
    display: block;
    position: relative;
    margin-bottom: 14px;
}
.val-stats-chart .apexcharts-canvas {
    max-width: 100% !important;
}
.val-stats-chart .apexcharts-text,
.val-stats-chart .apexcharts-legend-text {
    font-family: inherit !important;
}

/* Comparable detail cards */
.val-stats-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.val-stats-detail-row {
    padding: 10px 12px;
    background: var(--surface-alt);
    border-radius: 8px;
    border-left: 3px solid #d84a1b;
}
[data-theme="dark"] .val-stats-detail-row {
    background: rgba(255,255,255,0.04);
}
.val-stats-detail-addr {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.val-stats-detail-summary {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.val-stats-detail-summary .val-arrow {
    color: #d84a1b;
    font-weight: 600;
    padding: 0 4px;
}
.val-stats-detail-notes-toggle {
    margin-top: 4px;
    font-size: 11px;
}
.val-stats-detail-notes-toggle summary {
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 11px;
}
.val-stats-detail-note {
    font-size: 11px;
    color: var(--text-tertiary);
    padding: 2px 0 2px 8px;
    border-left: 2px solid var(--stroke);
    margin-top: 3px;
    line-height: 1.4;
}
[data-theme="dark"] .val-stats-detail-note {
    border-color: rgba(255,255,255,0.1);
}

/* Estimate range */
.val-stats-range {
    margin-top: 16px;
    padding: 14px 16px;
    background: rgba(216,74,27,0.06);
    border-radius: 10px;
    border: 1px solid rgba(216,74,27,0.15);
    text-align: center;
}
[data-theme="dark"] .val-stats-range {
    background: rgba(216,74,27,0.12);
    border-color: rgba(216,74,27,0.25);
}
.val-stats-range-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.val-stats-range-values {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 28px;
}
.val-stats-range-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.val-stats-range-cap {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.val-stats-range-item span:last-child {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}
.val-stats-range-mid .val-stats-range-mid-val {
    font-size: 22px;
    font-weight: 700;
    color: #d84a1b;
}

/* Market predictions */
.val-stats-predictions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}
@media (max-width: 600px) {
    .val-stats-predictions {
        grid-template-columns: 1fr;
    }
}
.val-stats-prediction-card {
    padding: 10px 12px;
    background: var(--surface-alt);
    border-radius: 8px;
    border: 1px solid var(--stroke);
    text-align: center;
}
[data-theme="dark"] .val-stats-prediction-card {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
}
.val-stats-prediction-period {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.val-stats-prediction-mid {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}
.val-stats-prediction-range {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}
.val-stats-prediction-justification {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.45;
    text-align: left;
    padding-top: 6px;
    border-top: 1px dashed var(--stroke);
}

/* Trend direction row (arrow + label) */
.val-stats-prediction-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}
.val-stats-prediction-arrow {
    font-size: 13px;
    line-height: 1;
}
.val-stats-prediction-dir-label {
    line-height: 1;
}
.val-dir-up {
    background: rgba(127, 169, 135, 0.16);
    color: #5f8f68;
}
.val-dir-down {
    background: rgba(201, 130, 125, 0.16);
    color: #b86f69;
}
.val-dir-stable {
    background: rgba(120, 120, 120, 0.14);
    color: #555;
}
[data-theme="dark"] .val-dir-up {
    background: rgba(76, 175, 80, 0.18);
    color: #81c784;
}
[data-theme="dark"] .val-dir-down {
    background: rgba(244, 67, 54, 0.18);
    color: #ef9a9a;
}
[data-theme="dark"] .val-dir-stable {
    background: rgba(200, 200, 200, 0.12);
    color: #bbb;
}

/* Confidence meter */
.val-stats-prediction-confidence {
    margin-top: 8px;
    text-align: left;
}
.val-stats-prediction-confidence-label {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.val-stats-prediction-confidence-label strong {
    color: var(--text);
    font-weight: 700;
}
.val-stats-prediction-confidence-bar {
    height: 5px;
    background: var(--stroke);
    border-radius: 999px;
    overflow: hidden;
}
.val-stats-prediction-confidence-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}
.val-stats-prediction-confidence-fill.val-dir-up {
    background: #4caf50;
}
.val-stats-prediction-confidence-fill.val-dir-down {
    background: #e53935;
}
.val-stats-prediction-confidence-fill.val-dir-stable {
    background: #9e9e9e;
}
[data-theme="dark"] .val-stats-prediction-confidence-bar {
    background: rgba(255,255,255,0.08);
}

.val-stats-chart-host {
    width: 100%;
    min-height: 260px;
}

.chart-fallback-message {
    padding: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.public-chat-w-pct-0 { width: 0%; }
.public-chat-w-pct-1 { width: 1%; }
.public-chat-w-pct-2 { width: 2%; }
.public-chat-w-pct-3 { width: 3%; }
.public-chat-w-pct-4 { width: 4%; }
.public-chat-w-pct-5 { width: 5%; }
.public-chat-w-pct-6 { width: 6%; }
.public-chat-w-pct-7 { width: 7%; }
.public-chat-w-pct-8 { width: 8%; }
.public-chat-w-pct-9 { width: 9%; }
.public-chat-w-pct-10 { width: 10%; }
.public-chat-w-pct-11 { width: 11%; }
.public-chat-w-pct-12 { width: 12%; }
.public-chat-w-pct-13 { width: 13%; }
.public-chat-w-pct-14 { width: 14%; }
.public-chat-w-pct-15 { width: 15%; }
.public-chat-w-pct-16 { width: 16%; }
.public-chat-w-pct-17 { width: 17%; }
.public-chat-w-pct-18 { width: 18%; }
.public-chat-w-pct-19 { width: 19%; }
.public-chat-w-pct-20 { width: 20%; }
.public-chat-w-pct-21 { width: 21%; }
.public-chat-w-pct-22 { width: 22%; }
.public-chat-w-pct-23 { width: 23%; }
.public-chat-w-pct-24 { width: 24%; }
.public-chat-w-pct-25 { width: 25%; }
.public-chat-w-pct-26 { width: 26%; }
.public-chat-w-pct-27 { width: 27%; }
.public-chat-w-pct-28 { width: 28%; }
.public-chat-w-pct-29 { width: 29%; }
.public-chat-w-pct-30 { width: 30%; }
.public-chat-w-pct-31 { width: 31%; }
.public-chat-w-pct-32 { width: 32%; }
.public-chat-w-pct-33 { width: 33%; }
.public-chat-w-pct-34 { width: 34%; }
.public-chat-w-pct-35 { width: 35%; }
.public-chat-w-pct-36 { width: 36%; }
.public-chat-w-pct-37 { width: 37%; }
.public-chat-w-pct-38 { width: 38%; }
.public-chat-w-pct-39 { width: 39%; }
.public-chat-w-pct-40 { width: 40%; }
.public-chat-w-pct-41 { width: 41%; }
.public-chat-w-pct-42 { width: 42%; }
.public-chat-w-pct-43 { width: 43%; }
.public-chat-w-pct-44 { width: 44%; }
.public-chat-w-pct-45 { width: 45%; }
.public-chat-w-pct-46 { width: 46%; }
.public-chat-w-pct-47 { width: 47%; }
.public-chat-w-pct-48 { width: 48%; }
.public-chat-w-pct-49 { width: 49%; }
.public-chat-w-pct-50 { width: 50%; }
.public-chat-w-pct-51 { width: 51%; }
.public-chat-w-pct-52 { width: 52%; }
.public-chat-w-pct-53 { width: 53%; }
.public-chat-w-pct-54 { width: 54%; }
.public-chat-w-pct-55 { width: 55%; }
.public-chat-w-pct-56 { width: 56%; }
.public-chat-w-pct-57 { width: 57%; }
.public-chat-w-pct-58 { width: 58%; }
.public-chat-w-pct-59 { width: 59%; }
.public-chat-w-pct-60 { width: 60%; }
.public-chat-w-pct-61 { width: 61%; }
.public-chat-w-pct-62 { width: 62%; }
.public-chat-w-pct-63 { width: 63%; }
.public-chat-w-pct-64 { width: 64%; }
.public-chat-w-pct-65 { width: 65%; }
.public-chat-w-pct-66 { width: 66%; }
.public-chat-w-pct-67 { width: 67%; }
.public-chat-w-pct-68 { width: 68%; }
.public-chat-w-pct-69 { width: 69%; }
.public-chat-w-pct-70 { width: 70%; }
.public-chat-w-pct-71 { width: 71%; }
.public-chat-w-pct-72 { width: 72%; }
.public-chat-w-pct-73 { width: 73%; }
.public-chat-w-pct-74 { width: 74%; }
.public-chat-w-pct-75 { width: 75%; }
.public-chat-w-pct-76 { width: 76%; }
.public-chat-w-pct-77 { width: 77%; }
.public-chat-w-pct-78 { width: 78%; }
.public-chat-w-pct-79 { width: 79%; }
.public-chat-w-pct-80 { width: 80%; }
.public-chat-w-pct-81 { width: 81%; }
.public-chat-w-pct-82 { width: 82%; }
.public-chat-w-pct-83 { width: 83%; }
.public-chat-w-pct-84 { width: 84%; }
.public-chat-w-pct-85 { width: 85%; }
.public-chat-w-pct-86 { width: 86%; }
.public-chat-w-pct-87 { width: 87%; }
.public-chat-w-pct-88 { width: 88%; }
.public-chat-w-pct-89 { width: 89%; }
.public-chat-w-pct-90 { width: 90%; }
.public-chat-w-pct-91 { width: 91%; }
.public-chat-w-pct-92 { width: 92%; }
.public-chat-w-pct-93 { width: 93%; }
.public-chat-w-pct-94 { width: 94%; }
.public-chat-w-pct-95 { width: 95%; }
.public-chat-w-pct-96 { width: 96%; }
.public-chat-w-pct-97 { width: 97%; }
.public-chat-w-pct-98 { width: 98%; }
.public-chat-w-pct-99 { width: 99%; }
.public-chat-w-pct-100 { width: 100%; }

/* Methodology notes */
.val-stats-notes {
    margin-top: 12px;
    font-size: 12px;
}
.val-stats-notes summary {
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 11px;
    padding: 4px 0;
}
.val-stats-notes ul {
    margin: 6px 0 0 0;
    padding-left: 18px;
}
.val-stats-notes li {
    color: var(--text-secondary);
    font-size: 11px;
    margin-bottom: 3px;
    line-height: 1.4;
}
