/* =========================================================
   PERPMETRIC RESEARCH WORKSPACE
   Market-first historical outcome research
   ========================================================= */

.research-workspace {
    scroll-margin-top: 20px;
}

.research-workspace-heading,
.research-detail-heading,
.research-workspace-footer,
.research-results-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.research-workspace-heading {
    margin-bottom: 20px;
}

.research-workspace-heading h2 {
    margin-bottom: 0;
}

.research-workspace-subtitle {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: var(--type-sm);
    line-height: 1.65;
}

.research-workspace-status {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(140, 173, 189, 0.06);
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: var(--type-2xs);
    font-weight: 700;
    letter-spacing: 0.055em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.research-workspace-status.is-ready {
    border-color: rgba(55, 224, 177, 0.3);
    background: rgba(55, 224, 177, 0.08);
    color: var(--mint);
}

.research-workspace-status.is-unavailable {
    border-color: rgba(223, 177, 84, 0.36);
    background: rgba(223, 177, 84, 0.08);
    color: var(--amber);
}

.research-workspace-status.is-delayed {
    border-color: rgba(223, 177, 84, 0.36);
    background: rgba(223, 177, 84, 0.08);
    color: var(--amber);
}

.research-freshness-notice {
    margin: -7px 0 18px;
    padding: 12px 14px;
    border: 1px solid rgba(223, 177, 84, 0.3);
    border-radius: var(--radius);
    background: rgba(223, 177, 84, 0.07);
    color: var(--text-soft);
    font-size: var(--type-xs);
    line-height: 1.55;
}

.research-freshness-notice strong {
    color: var(--amber);
}

.research-workspace-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--line-soft);
}

.research-summary-card {
    min-width: 0;
    padding: 15px 16px;
    background: rgba(10, 19, 25, 0.88);
}

.research-summary-card span,
.research-section-kicker,
.research-detail-quality span,
.research-market-search > span {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: var(--type-2xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.research-summary-card strong {
    display: block;
    overflow: hidden;
    margin-top: 7px;
    color: var(--text);
    font-size: var(--type-lg);
    font-weight: 720;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.research-summary-card small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: var(--type-2xs);
    line-height: 1.45;
}

.research-market-layout {
    display: grid;
    grid-template-columns: minmax(270px, 0.58fr) minmax(0, 1.82fr);
    gap: 18px;
    align-items: start;
}

.research-market-browser,
.research-market-detail,
.research-benchmark {
    min-width: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(5, 11, 16, 0.18);
}

.research-market-browser {
    position: sticky;
    top: 14px;
    padding: 18px;
}

.research-market-browser h3,
.research-detail-heading h3 {
    margin: 7px 0 0;
    color: var(--text);
    font-size: var(--type-md);
    line-height: 1.35;
}

.research-scope-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 17px;
    padding: 3px;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    background: rgba(140, 173, 189, 0.035);
}

.research-scope-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--mono);
    font-size: var(--type-2xs);
    font-weight: 750;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.research-scope-tab small {
    color: inherit;
    font-size: 9px;
}

.research-scope-tab:hover {
    color: var(--text-soft);
}

.research-scope-tab.is-active {
    border-color: rgba(55, 224, 177, 0.28);
    background: rgba(55, 224, 177, 0.1);
    color: var(--mint);
}

.research-market-search {
    display: grid;
    gap: 6px;
    margin-top: 14px;
}

.research-market-search input,
.research-filter-field select {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    outline: none;
    background: var(--surface-2);
    color: var(--text-soft);
    font-family: var(--mono);
    font-size: var(--type-2xs);
    font-weight: 650;
}

.research-filter-field select {
    padding-right: 30px;
}

.research-market-search input::placeholder {
    color: var(--text-muted);
}

.research-market-search input:hover,
.research-filter-field select:hover {
    border-color: rgba(140, 173, 189, 0.48);
}

.research-market-search input:focus-visible,
.research-filter-field select:focus-visible,
.research-filter-reset:focus-visible,
.research-show-all:focus-visible,
.research-scope-tab:focus-visible,
.research-market-option:focus-visible,
.research-table-frame:focus-visible,
.research-benchmark summary:focus-visible {
    outline: 2px solid rgba(55, 224, 177, 0.72);
    outline-offset: 2px;
}

.research-market-list-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    line-height: 1.35;
}

.research-market-list-meta span:last-child {
    text-align: right;
}

.research-market-list {
    display: grid;
    max-height: 590px;
    overflow-y: auto;
    margin: 10px -7px 0;
    padding: 0 7px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}

.research-market-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 11px 8px;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.research-market-option:hover {
    background: rgba(140, 173, 189, 0.045);
}

.research-market-option.is-selected {
    border-radius: 4px;
    background: rgba(55, 224, 177, 0.08);
    box-shadow: inset 2px 0 0 var(--mint);
}

.research-market-option-main,
.research-market-option-meta {
    display: grid;
    min-width: 0;
}

.research-market-option-main {
    gap: 3px;
}

.research-market-option-main strong {
    overflow: hidden;
    color: var(--text);
    font-size: var(--type-xs);
    font-weight: 720;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.research-market-option-main small,
.research-market-option-meta small {
    overflow: hidden;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.research-market-option-meta {
    justify-items: end;
    gap: 2px;
}

.research-market-option-meta > strong {
    color: var(--text-soft);
    font-family: var(--mono);
    font-size: var(--type-2xs);
}

.research-market-option-meta em,
.research-market-badge.is-historical {
    color: var(--amber);
}

.research-market-option-meta em {
    font-family: var(--mono);
    font-size: 8px;
    font-style: normal;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.research-market-list-state {
    padding: 36px 12px;
    color: var(--text-muted);
    font-size: var(--type-xs);
    line-height: 1.6;
    text-align: center;
}

.research-market-detail {
    overflow: hidden;
}

.research-detail-heading {
    padding: 18px;
}

.research-detail-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.research-market-badge,
.research-detail-freshness {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.research-market-badge {
    padding: 4px 6px;
    border: 1px solid rgba(55, 224, 177, 0.25);
    border-radius: 3px;
    background: rgba(55, 224, 177, 0.07);
    color: var(--mint);
}

.research-detail-heading p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: var(--type-xs);
}

.research-detail-freshness {
    padding-top: 4px;
    white-space: nowrap;
}

.research-detail-quality {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    background: var(--line-soft);
}

.research-detail-quality > div {
    min-width: 0;
    padding: 13px 14px;
    background: rgba(10, 19, 25, 0.72);
}

.research-detail-quality strong,
.research-detail-quality small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.research-detail-quality strong {
    margin-top: 6px;
    color: var(--text);
    font-size: var(--type-md);
}

.research-detail-quality small {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 9px;
}

.research-filters {
    padding: 15px 18px;
}

.research-filters fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.research-filters fieldset:disabled {
    opacity: 0.55;
}

.research-filters legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.research-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.research-filter-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.research-filter-field > span {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.research-filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 11px;
}

.research-filter-reset,
.research-show-all {
    min-height: 30px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.research-filter-reset:hover,
.research-show-all:hover {
    border-color: rgba(55, 224, 177, 0.38);
    color: var(--mint);
}

#researchFilterMatchCount {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    text-align: right;
}

.research-table-frame {
    max-width: 100%;
    overflow-x: auto;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.research-outcomes-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.research-benchmark-table {
    min-width: 760px;
}

.research-outcomes-table th,
.research-outcomes-table td {
    padding: 11px 13px;
    border-bottom: 1px solid var(--line-soft);
    text-align: right;
    vertical-align: middle;
}

.research-outcomes-table th:first-child,
.research-outcomes-table td:first-child {
    text-align: left;
}

.research-outcomes-table th {
    background: rgba(140, 173, 189, 0.035);
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.research-outcomes-table td {
    color: var(--text-soft);
    font-family: var(--mono);
    font-size: var(--type-2xs);
    white-space: nowrap;
}

.research-outcomes-table tbody tr:last-child td {
    border-bottom: 0;
}

.research-condition {
    display: grid;
    gap: 3px;
}

.research-condition strong {
    color: var(--text);
    font-family: var(--sans);
    font-size: var(--type-xs);
    font-weight: 680;
}

.research-condition span {
    color: var(--text-muted);
    font-size: 9px;
}

.research-value-positive {
    color: var(--mint) !important;
}

.research-value-negative {
    color: var(--coral) !important;
}

.research-loading-row,
.research-empty-row {
    height: 92px;
    color: var(--text-muted) !important;
    text-align: center !important;
}

.research-results-actions {
    align-items: center;
    padding: 12px 18px 14px;
}

.research-results-note {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--type-2xs);
    line-height: 1.6;
}

.research-show-all {
    flex: 0 0 auto;
}

.research-show-all[hidden] {
    display: none;
}

.research-benchmark {
    margin-top: 18px;
    overflow: hidden;
}

.research-benchmark summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 18px;
    cursor: pointer;
    list-style: none;
}

.research-benchmark summary::-webkit-details-marker {
    display: none;
}

.research-benchmark summary::after {
    content: "+";
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: var(--type-md);
}

.research-benchmark[open] summary::after {
    content: "−";
}

.research-benchmark summary > span:first-child {
    display: grid;
    gap: 4px;
}

.research-benchmark summary small,
#researchBenchmarkStatus {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.research-benchmark summary strong {
    color: var(--text);
    font-size: var(--type-sm);
}

#researchBenchmarkStatus {
    margin-left: auto;
}

.research-benchmark-body {
    border-top: 1px solid var(--line-soft);
}

.research-benchmark-body > p:first-child {
    margin: 0;
    padding: 13px 18px;
    color: var(--text-muted);
    font-size: var(--type-xs);
    line-height: 1.55;
}

.research-benchmark-body > .research-results-note {
    padding: 12px 18px 14px;
}

.research-workspace-footer {
    align-items: baseline;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

.research-workspace-footer span {
    flex: 0 0 auto;
    color: var(--steel);
    font-family: var(--mono);
    font-size: var(--type-2xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.research-workspace-footer p {
    max-width: 850px;
    margin: 0;
    color: var(--text-muted);
    font-size: var(--type-2xs);
    line-height: 1.55;
    text-align: right;
}

:root[data-theme="light"] .research-summary-card,
:root[data-theme="light"] .research-market-browser,
:root[data-theme="light"] .research-market-detail,
:root[data-theme="light"] .research-benchmark {
    background: #f8fafb;
}

:root[data-theme="light"] .research-detail-quality > div {
    background: #f8fafb;
}

:root[data-theme="light"] .research-outcomes-table th {
    background: #f1f5f6;
}

:root[data-theme="light"] .research-market-search input,
:root[data-theme="light"] .research-filter-field select {
    border-color: #d5dfe3;
    background: #ffffff;
    color: #344851;
}

:root[data-theme="light"] .research-filter-reset,
:root[data-theme="light"] .research-show-all {
    border-color: #cbd7dc;
    color: #52666f;
}

:root[data-theme="light"] .research-market-option:hover {
    background: #f0f5f6;
}

:root[data-theme="light"] .research-market-option.is-selected {
    background: #e8f7f3;
}

@media (max-width: 1180px) {
    .research-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .research-workspace-summary,
    .research-detail-quality {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .research-market-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .research-market-browser {
        position: static;
    }

    .research-market-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 14px;
        max-height: 340px;
    }
}

@media (max-width: 700px) {
    .research-workspace-heading,
    .research-detail-heading,
    .research-workspace-footer,
    .research-results-actions {
        flex-direction: column;
        gap: 12px;
    }

    .research-workspace-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .research-summary-card {
        padding: 13px 12px;
    }

    .research-summary-card strong {
        font-size: var(--type-md);
    }

    .research-market-browser,
    .research-detail-heading {
        padding: 15px;
    }

    .research-market-list {
        grid-template-columns: minmax(0, 1fr);
        max-height: 320px;
    }

    .research-detail-freshness {
        white-space: normal;
    }

    .research-detail-quality {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .research-detail-quality > div {
        padding: 12px;
    }

    .research-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .research-filters {
        padding: 14px 15px;
    }

    .research-filter-actions {
        align-items: flex-start;
    }

    .research-filter-reset,
    .research-show-all {
        min-height: 40px;
    }

    .research-table-frame {
        overflow: visible;
        padding: 0 12px 12px;
        border-bottom: 0;
    }

    .research-outcomes-table,
    .research-benchmark-table,
    .research-outcomes-table tbody,
    .research-outcomes-table tr,
    .research-outcomes-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .research-outcomes-table thead {
        display: none;
    }

    .research-outcomes-table tr {
        margin-top: 12px;
        padding: 5px 12px;
        border: 1px solid var(--line-soft);
        border-radius: 5px;
        background: rgba(140, 173, 189, 0.025);
    }

    .research-outcomes-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 8px 0;
        text-align: right;
        white-space: normal;
    }

    .research-outcomes-table td::before {
        content: attr(data-label);
        flex: 0 0 42%;
        color: var(--text-muted);
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-align: left;
        text-transform: uppercase;
    }

    .research-outcomes-table td:first-child {
        display: block;
        padding-top: 9px;
        text-align: left;
    }

    .research-outcomes-table td:first-child::before {
        display: block;
        margin-bottom: 6px;
    }

    .research-outcomes-table .research-loading-row,
    .research-outcomes-table .research-empty-row {
        display: block;
        height: auto;
        padding: 28px 8px;
        text-align: center !important;
    }

    .research-outcomes-table .research-loading-row::before,
    .research-outcomes-table .research-empty-row::before {
        display: none;
    }

    .research-results-actions {
        align-items: stretch;
        padding: 0 15px 15px;
    }

    .research-show-all {
        width: 100%;
    }

    .research-benchmark summary {
        align-items: flex-start;
        padding: 14px 15px;
    }

    #researchBenchmarkStatus {
        display: none;
    }

    .research-workspace-footer p {
        text-align: left;
    }
}

@media (max-width: 430px) {
    .research-workspace-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .research-market-option {
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .research-workspace {
        scroll-behavior: auto;
    }
}

/* =========================================================
   CONDITION-FIRST RESEARCH ANSWER
   ========================================================= */

.research-purpose {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid rgba(55, 224, 177, 0.18);
    border-radius: var(--radius);
    background: rgba(55, 224, 177, 0.045);
}

.research-purpose > span {
    flex: 0 0 auto;
    color: var(--mint);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.06em;
}

.research-purpose p {
    margin: 0;
    color: var(--text-soft);
    font-size: var(--type-xs);
    line-height: 1.55;
}

.research-purpose strong {
    color: var(--text);
}

.research-focus,
.research-answer {
    margin: 0 18px 16px;
    padding: 17px;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    background: rgba(140, 173, 189, 0.025);
}

.research-focus-heading,
.research-answer-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.research-focus h4,
.research-answer h4 {
    margin: 5px 0 0;
    color: var(--text);
    font-size: var(--type-sm);
    line-height: 1.35;
}

.research-live-state,
#researchAnswerReliability {
    flex: 0 0 auto;
    padding: 5px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.research-live-state.is-extreme,
.research-live-state.is-tail,
#researchAnswerReliability.is-strong {
    border-color: rgba(55, 224, 177, 0.28);
    background: rgba(55, 224, 177, 0.08);
    color: var(--mint);
}

#researchAnswerReliability.is-developing {
    border-color: rgba(223, 177, 84, 0.34);
    color: var(--amber);
}

#researchAnswerReliability.is-limited {
    border-color: rgba(236, 108, 125, 0.32);
    color: var(--coral);
}

.research-scenario-field {
    display: grid;
    gap: 7px;
    margin-top: 15px;
}

.research-scenario-field > span {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.research-scenario-field select {
    width: 100%;
    min-height: 42px;
    padding: 0 38px 0 11px;
    border: 1px solid var(--line);
    border-radius: 5px;
    outline: none;
    background: var(--surface-2);
    color: var(--text);
    font-family: var(--mono);
    font-size: var(--type-2xs);
    font-weight: 650;
}

.research-scenario-field select:focus-visible {
    outline: 2px solid rgba(55, 224, 177, 0.72);
    outline-offset: 2px;
}

.research-current-signal {
    margin-top: 12px;
    padding: 11px 12px;
    border-left: 2px solid var(--steel);
    background: rgba(140, 173, 189, 0.035);
    color: var(--text-soft);
    font-size: var(--type-xs);
    line-height: 1.55;
}

.research-current-signal strong {
    color: var(--text);
}

.research-answer {
    border-color: rgba(55, 224, 177, 0.2);
    background: linear-gradient(145deg, rgba(55, 224, 177, 0.055), rgba(140, 173, 189, 0.018));
}

.research-answer-copy {
    max-width: 920px;
    margin: 15px 0 0;
    color: var(--text-soft);
    font-size: var(--type-sm);
    line-height: 1.7;
}

.research-answer-copy strong {
    color: var(--text);
}

.research-answer-condition {
    display: inline-block;
    margin: 0 3px;
    padding: 2px 5px;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.025em;
    vertical-align: 1px;
}

.research-horizon-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.research-horizon-card {
    min-width: 0;
    padding: 13px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    background: rgba(5, 11, 16, 0.34);
    font-variant-numeric: tabular-nums;
}

.research-horizon-card > span,
.research-horizon-card > small,
.research-horizon-card > div,
.research-horizon-card > em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.research-horizon-card > span {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.research-horizon-card > strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: var(--type-lg);
    line-height: 1.15;
}

.research-horizon-card > small,
.research-horizon-card > div,
.research-horizon-card > em {
    margin-top: 6px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    font-style: normal;
}

.research-horizon-card > div {
    color: var(--text-soft);
}

.research-horizon-card > div i {
    color: var(--text-muted);
    font-style: normal;
}

.research-horizon-card > em {
    padding-top: 6px;
    border-top: 1px solid var(--line-soft);
}

.research-horizon-card.is-empty,
.research-horizon-card.is-loading {
    display: grid;
    align-content: center;
    min-height: 118px;
    color: var(--text-muted);
    font-size: var(--type-xs);
}

.research-answer-note {
    margin: 13px 0 0;
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.55;
}

.research-data-quality,
.research-advanced {
    border-top: 1px solid var(--line-soft);
}

.research-data-quality summary,
.research-advanced summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
}

.research-data-quality summary::-webkit-details-marker,
.research-advanced summary::-webkit-details-marker {
    display: none;
}

.research-data-quality summary::after,
.research-advanced summary::after {
    content: "+";
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: var(--type-md);
}

.research-data-quality[open] summary::after,
.research-advanced[open] summary::after {
    content: "−";
}

.research-data-quality summary > span:first-child,
.research-advanced summary > span:first-child {
    display: grid;
    gap: 4px;
}

.research-data-quality summary small,
.research-advanced summary small,
#researchQualityStatus,
#researchAdvancedStatus {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.research-data-quality summary strong,
.research-advanced summary strong {
    color: var(--text);
    font-size: var(--type-xs);
}

#researchQualityStatus,
#researchAdvancedStatus {
    margin-left: auto;
}

.research-data-quality .research-detail-quality {
    border-bottom: 0;
}

.research-advanced-body {
    border-top: 1px solid var(--line-soft);
}

:root[data-theme="light"] .research-purpose {
    background: #eef9f6;
}

:root[data-theme="light"] .research-focus,
:root[data-theme="light"] .research-horizon-card {
    background: #ffffff;
}

:root[data-theme="light"] .research-answer {
    background: linear-gradient(145deg, #eef9f6, #f8fafb);
}

:root[data-theme="light"] .research-current-signal {
    background: #f1f5f6;
}

:root[data-theme="light"] .research-scenario-field select {
    border-color: #d5dfe3;
    background: #ffffff;
    color: #344851;
}

@media (max-width: 1280px) {
    .research-horizon-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .research-purpose,
    .research-focus-heading,
    .research-answer-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .research-purpose {
        gap: 7px;
    }

    .research-focus,
    .research-answer {
        margin: 0 14px 14px;
        padding: 14px;
    }

    .research-horizon-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .research-horizon-card {
        display: grid;
        grid-template-columns: minmax(64px, 0.6fr) minmax(90px, 1fr);
        gap: 4px 10px;
        align-items: center;
    }

    .research-horizon-card > strong {
        margin-top: 0;
    }

    .research-horizon-card > small {
        grid-column: 1 / -1;
        margin-top: 4px;
        text-align: left;
    }

    .research-horizon-card > div,
    .research-horizon-card > em {
        grid-column: 2 / -1;
    }

    #researchQualityStatus,
    #researchAdvancedStatus {
        display: none;
    }
}
