/* ============================================================
   ERI
   Enterprise Risk Intelligence
   Minimal Intelligence Research UI
   ============================================================ */


/* ============================================================
   RESET
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    background: #f5f6f8;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Hiragino Sans GB",
        "Microsoft YaHei",
        Arial,
        sans-serif;

    background: #f5f6f8;
    color: #111827;

    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


/* ============================================================
   GLOBAL
   ============================================================ */

button,
textarea,
input {
    font-family: inherit;
}

button {
    outline: none;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ============================================================
   APP SHELL
   ============================================================ */

.app-shell {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}


/* ============================================================
   TOPBAR
   ============================================================ */

.topbar {
    display: none;
}


/* ============================================================
   MAIN
   ============================================================ */

.main-container {
    width: 100%;
    max-width: 1320px;

    margin: 0 auto;

    padding:
        70px 48px 100px;
}


/* ============================================================
   HERO
   ============================================================ */

.hero-section {
    max-width: 1000px;

    margin-bottom: 54px;
}


/* ============================================================
   EYEBROW
   ============================================================ */

.hero-eyebrow {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 22px;

    font-size: 12px;
    line-height: 1;

    font-weight: 700;

    letter-spacing: 2.4px;

    color: #52627a;

    text-transform: uppercase;
}

.eyebrow-line {
    display: block;

    width: 18px;
    height: 2px;

    background: #52627a;
}


/* ============================================================
   HERO TITLE
   ============================================================ */

.hero-section h1 {
    margin: 0 0 20px;

    font-size: clamp(48px, 5vw, 72px);

    line-height: 1.08;

    letter-spacing: -3.5px;

    font-weight: 800;

    color: #101827;
}

.hero-section h1 span {
    color: #8b95a5;

    font-weight: 500;
}


/* ============================================================
   HERO DESCRIPTION
   ============================================================ */

.hero-description {
    max-width: 780px;

    margin: 0;

    font-size: 18px;

    line-height: 1.8;

    color: #59677d;

    font-weight: 400;
}


/* ============================================================
   HERO META
   ============================================================ */

.hero-meta {
    display: none;
}


/* ============================================================
   RESEARCH PANEL
   ============================================================ */

.research-panel {
    width: 100%;

    background: #ffffff;

    border: 1px solid #dce1e8;

    padding: 34px 36px 32px;

    box-shadow:
        0 12px 35px rgba(20, 31, 48, 0.035);
}


/* ============================================================
   PANEL HEADER
   ============================================================ */

.panel-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 20px;
}

.panel-label {
    margin-bottom: 8px;

    font-size: 10px;

    line-height: 1;

    font-weight: 800;

    letter-spacing: 1.8px;

    color: #718096;

    text-transform: uppercase;
}

.panel-header h2 {
    margin: 0;

    font-size: 16px;

    line-height: 1.4;

    font-weight: 750;

    color: #101827;
}


/* ============================================================
   SECURITY LABEL
   ============================================================ */

.secure-label {
    display: none;
}


/* ============================================================
   INPUT
   ============================================================ */

.input-wrapper {
    width: 100%;
}

#question {
    display: block;

    width: 100%;

    min-height: 210px;

    resize: vertical;

    padding: 20px 21px;

    border: 1px solid #d2d8e1;

    border-radius: 0;

    background: #ffffff;

    color: #182234;

    font-size: 16px;

    line-height: 1.8;

    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

#question::placeholder {
    color: #9aa3af;

    opacity: 1;
}

#question:hover {
    border-color: #b9c2ce;
}

#question:focus {
    border-color: #7b8799;

    box-shadow:
        0 0 0 3px rgba(83, 98, 120, 0.07);
}


/* ============================================================
   INPUT FOOTER
   ============================================================ */

.input-footer {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-top: 9px;

    min-height: 18px;

    font-size: 11px;

    color: #9aa3af;
}

#charCount {
    color: #a0a8b4;
}


/* ============================================================
   EXAMPLES
   ============================================================ */

.example-section {
    margin-top: 40px;
}

.example-header {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 13px;

    font-size: 10px;

    line-height: 1;

    letter-spacing: 1.8px;

    font-weight: 750;

    color: #7c8798;

    text-transform: uppercase;
}

.example-header span:last-child {
    font-size: 11px;

    letter-spacing: 0;

    font-weight: 400;

    color: #9aa3af;

    text-transform: none;
}

.example-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;
}

.example-card {
    display: flex;

    align-items: center;

    width: 100%;

    min-height: 62px;

    padding: 13px 16px;

    border:
        1px solid #d7dde5;

    border-radius: 0;

    background: #ffffff;

    color: #3e4b5f;

    cursor: pointer;

    text-align: left;

    transition:
        border-color 0.16s ease,
        background 0.16s ease,
        color 0.16s ease;
}

.example-card:hover {
    border-color: #aeb8c6;

    background: #fafbfc;

    color: #182234;

    transform: none;
}

.example-card:active {
    transform: none;
}

.example-icon {
    flex: 0 0 auto;

    margin-right: 13px;

    font-size: 10px;

    line-height: 1;

    font-weight: 800;

    letter-spacing: 0.8px;

    color: #9aa3af;
}

.example-content {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 3px;
}

.example-content strong {
    display: block;

    font-size: 13px;

    line-height: 1.4;

    font-weight: 700;

    color: #334155;
}

.example-content span {
    display: block;

    font-size: 11px;

    line-height: 1.4;

    color: #9aa3af;
}

.example-arrow {
    margin-left: auto;

    padding-left: 12px;

    font-size: 16px;

    color: #a3acb9;

    transition:
        transform 0.16s ease,
        color 0.16s ease;
}

.example-card:hover .example-arrow {
    transform: translateX(2px);

    color: #566579;
}


/* ============================================================
   ERROR
   ============================================================ */

.error {
    display: none;

    margin-top: 16px;

    padding: 12px 14px;

    border:
        1px solid #e6caca;

    background: #fff8f8;

    color: #a33a3a;

    font-size: 13px;

    line-height: 1.6;
}

.error.visible {
    display: block;
}


/* ============================================================
   PRIMARY BUTTON
   ============================================================ */

.primary-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 18px;

    margin-top: 26px;

    min-width: 120px;
    min-height: 52px;

    padding: 0 21px;

    border: none;
    border-radius: 0;

    background: #111827;

    color: #ffffff;

    cursor: pointer;

    transition:
        background 0.16s ease,
        transform 0.16s ease,
        opacity 0.16s ease;
}

.primary-button:hover {
    background: #202b3c;

    transform: translateY(-1px);
}

.primary-button:active {
    transform: translateY(0);
}

.primary-button:disabled {
    opacity: 0.55;

    cursor: wait;

    transform: none;
}

.button-main {
    font-size: 14px;

    line-height: 1;

    font-weight: 750;
}

.button-sub {
    display: none;
}

.button-arrow {
    font-size: 17px;

    line-height: 1;

    opacity: 0.7;
}


/* ============================================================
   RESEARCH NOTE
   ============================================================ */

.research-note {
    display: flex;

    align-items: center;

    gap: 7px;

    margin-top: 13px;

    font-size: 11px;

    line-height: 1.6;

    color: #9aa3af;
}

.research-note > span {
    font-size: 12px;

    color: #8d98a8;
}


/* ============================================================
   HIDDEN HOME SECTIONS
   ============================================================ */

.capability-section,
.footer {
    display: none;
}


/* ============================================================
   ============================================================
   RESEARCH OVERLAY
   ============================================================
   ============================================================ */

.research-overlay {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px;

    background:
        rgba(15, 23, 42, 0.42);

    backdrop-filter: blur(4px);

    -webkit-backdrop-filter: blur(4px);
}

.research-overlay.hidden {
    display: none;
}


/* ============================================================
   RESEARCH MODAL
   ============================================================ */

.research-modal {
    width: 100%;

    max-width: 720px;

    max-height: calc(100vh - 60px);

    overflow-y: auto;

    background: #ffffff;

    border:
        1px solid #d9dfe7;

    padding: 34px 36px;

    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.18);
}


/* ============================================================
   MODAL TOP
   ============================================================ */

.modal-top {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 30px;

    margin-bottom: 38px;
}

.modal-eyebrow {
    margin-bottom: 9px;

    font-size: 10px;

    line-height: 1;

    letter-spacing: 1.8px;

    font-weight: 800;

    color: #778397;

    text-transform: uppercase;
}

.modal-top h2 {
    margin: 0;

    font-size: 23px;

    line-height: 1.35;

    letter-spacing: -0.5px;

    font-weight: 750;

    color: #111827;
}


/* ============================================================
   LIVE INDICATOR
   ============================================================ */

.live-indicator {
    display: flex;

    align-items: center;

    gap: 7px;

    flex: 0 0 auto;

    padding-top: 4px;

    font-size: 9px;

    line-height: 1;

    font-weight: 800;

    letter-spacing: 1.2px;

    color: #758196;
}

.live-indicator span {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #66758a;

    animation:
        livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 0.35;
    }

    50% {
        opacity: 1;
    }
}


/* ============================================================
   PROGRESS AREA
   ============================================================ */

.progress-area {
    margin-bottom: 30px;
}

.progress-number {
    display: flex;

    align-items: baseline;

    gap: 3px;

    margin-bottom: 13px;

    color: #111827;
}

#progressValue {
    font-size: 48px;

    line-height: 1;

    font-weight: 750;

    letter-spacing: -2px;
}

.progress-number small {
    font-size: 14px;

    color: #7b8798;
}


/* ============================================================
   PROGRESS TRACK
   ============================================================ */

.progress-track {
    width: 100%;

    height: 5px;

    overflow: hidden;

    background: #e7ebf0;
}

.progress-bar {
    display: block;

    width: 0%;

    height: 100%;

    background: #182234;

    transition:
        width 0.5s ease;
}


/* ============================================================
   CURRENT STAGE
   ============================================================ */

.current-stage {
    padding:
        20px 0 22px;

    border-top:
        1px solid #e2e6eb;

    border-bottom:
        1px solid #e2e6eb;
}

.stage-label {
    margin-bottom: 7px;

    font-size: 9px;

    line-height: 1;

    letter-spacing: 1.6px;

    font-weight: 800;

    color: #8993a3;

    text-transform: uppercase;
}

.stage-text {
    font-size: 15px;

    line-height: 1.6;

    font-weight: 700;

    color: #1b2638;
}

.detail-text {
    margin-top: 4px;

    font-size: 12px;

    line-height: 1.7;

    color: #8791a0;
}


/* ============================================================
   RESEARCH TIMELINE
   ============================================================ */

.research-timeline {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    margin-top: 25px;

    border:
        1px solid #e0e5eb;
}

.timeline-item {
    position: relative;

    min-width: 0;

    padding: 17px 16px;

    border-right:
        1px solid #e0e5eb;

    background: #ffffff;
}

.timeline-item:last-child {
    border-right: none;
}

.timeline-marker {
    margin-bottom: 8px;

    font-size: 9px;

    line-height: 1;

    letter-spacing: 1px;

    font-weight: 800;

    color: #a0a8b4;
}

.timeline-title {
    font-size: 12px;

    line-height: 1.5;

    font-weight: 700;

    color: #4b586b;
}

.timeline-description {
    margin-top: 2px;

    font-size: 9px;

    line-height: 1.4;

    color: #a0a8b4;
}

.timeline-item.active {
    background: #f7f8fa;
}

.timeline-item.active .timeline-marker,
.timeline-item.active .timeline-title {
    color: #182234;
}


/* ============================================================
   TIMELINE STATES
   ============================================================ */

.timeline-item.completed {
    background: #fafbfc;
}

.timeline-item.completed .timeline-marker {
    color: #687589;
}

.timeline-item.completed .timeline-title {
    color: #2f3b4d;
}

.timeline-item.error {
    background: #fff8f8;
}

.timeline-item.error .timeline-title {
    color: #9f3b3b;
}


/* ============================================================
   MODAL WARNING
   ============================================================ */

.modal-warning {
    margin-top: 18px;

    font-size: 10px;

    line-height: 1.6;

    color: #929baa;
}

.modal-warning span {
    margin-right: 4px;
}


/* ============================================================
   ============================================================
   REPORT PAGE
   ============================================================
   ============================================================ */

.report-page {
    width: 100%;

    max-width: 1180px;

    margin: 0 auto;

    padding: 60px 32px 100px;
}


/* ============================================================
   REPORT HEADER
   ============================================================ */

.report-header {
    padding-bottom: 28px;

    margin-bottom: 30px;

    border-bottom:
        1px solid #d8dee6;
}

.report-header h1 {
    margin: 0 0 12px;

    font-size: 42px;

    line-height: 1.2;

    letter-spacing: -1.5px;

    font-weight: 800;

    color: #111827;
}

.report-header p {
    margin: 0;

    font-size: 14px;

    color: #697588;
}


/* ============================================================
   REPORT META
   ============================================================ */

.report-meta {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    margin-bottom: 34px;

    border:
        1px solid #dce1e8;

    background: #ffffff;
}

.meta-item {
    padding: 17px 19px;

    border-right:
        1px solid #e1e5eb;
}

.meta-item:last-child {
    border-right: none;
}

.meta-label {
    margin-bottom: 6px;

    font-size: 9px;

    letter-spacing: 1.4px;

    font-weight: 800;

    color: #8b95a4;

    text-transform: uppercase;
}

.meta-value {
    font-size: 14px;

    font-weight: 700;

    color: #1d2939;
}


/* ============================================================
   EXECUTIVE SUMMARY
   ============================================================ */

.executive-summary {
    display: grid;

    grid-template-columns:
        180px 1fr;

    gap: 25px;

    padding: 27px 0;

    margin-bottom: 40px;

    border-top:
        2px solid #182234;

    border-bottom:
        1px solid #dce1e8;
}

.executive-summary-title {
    font-size: 10px;

    letter-spacing: 1.6px;

    font-weight: 800;

    color: #7b8798;

    text-transform: uppercase;
}

.executive-summary-content {
    font-size: 16px;

    line-height: 1.9;

    color: #303c4f;
}


/* ============================================================
   REPORT SECTION
   ============================================================ */

.report-section {
    margin-bottom: 48px;
}

.report-section-header {
    display: flex;

    align-items: baseline;
    justify-content: space-between;

    gap: 20px;

    padding-bottom: 11px;

    margin-bottom: 20px;

    border-bottom:
        1px solid #dce1e8;
}

.report-section-number {
    font-size: 10px;

    letter-spacing: 1.6px;

    font-weight: 800;

    color: #8d97a6;
}

.report-section-title {
    font-size: 22px;

    font-weight: 750;

    color: #182234;
}


/* ============================================================
   FINDINGS
   ============================================================ */

.findings-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}

.finding-card {
    padding: 22px;

    min-height: 175px;

    border:
        1px solid #dce1e8;

    background: #ffffff;
}

.finding-number {
    margin-bottom: 16px;

    font-size: 10px;

    font-weight: 800;

    color: #929baa;
}

.finding-title {
    margin-bottom: 9px;

    font-size: 16px;

    line-height: 1.5;

    font-weight: 750;

    color: #182234;
}

.finding-description {
    font-size: 13px;

    line-height: 1.75;

    color: #687589;
}


/* ============================================================
   RISK
   ============================================================ */

.risk-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 15px;
}

.risk-card {
    padding: 22px;

    border:
        1px solid #dce1e8;

    background: #ffffff;
}

.risk-card-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 15px;
}

.risk-name {
    font-size: 16px;

    font-weight: 750;

    color: #182234;
}

.risk-level {
    padding: 4px 7px;

    border:
        1px solid #ccd3dc;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;

    color: #687589;

    text-transform: uppercase;
}

.risk-card p {
    margin: 0;

    font-size: 13px;

    line-height: 1.8;

    color: #687589;
}


/* ============================================================
   TABLE
   ============================================================ */

.report-table {
    width: 100%;

    border-collapse: collapse;

    border:
        1px solid #dce1e8;

    background: #ffffff;
}

.report-table th {
    padding: 12px 14px;

    border-bottom:
        1px solid #dce1e8;

    background: #f6f7f9;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.7px;

    color: #718096;

    text-align: left;

    text-transform: uppercase;
}

.report-table td {
    padding: 13px 14px;

    border-bottom:
        1px solid #e6e9ee;

    font-size: 13px;

    line-height: 1.7;

    color: #3e4a5c;

    vertical-align: top;
}

.report-table tr:last-child td {
    border-bottom: none;
}


/* ============================================================
   EVIDENCE
   ============================================================ */

.evidence-list {
    display: flex;

    flex-direction: column;

    gap: 9px;
}

.evidence-item {
    display: grid;

    grid-template-columns:
        100px 1fr;

    gap: 15px;

    padding: 15px 17px;

    border:
        1px solid #dfe4ea;

    background: #ffffff;
}

.evidence-type {
    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;

    color: #7d8899;

    text-transform: uppercase;
}

.evidence-content {
    font-size: 13px;

    line-height: 1.75;

    color: #435064;
}


/* ============================================================
   ACTION
   ============================================================ */

.action-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}

.action-card {
    min-height: 180px;

    padding: 23px;

    background: #182234;

    color: #ffffff;
}

.action-priority {
    margin-bottom: 18px;

    font-size: 9px;

    letter-spacing: 1.4px;

    font-weight: 800;

    opacity: 0.58;

    text-transform: uppercase;
}

.action-title {
    margin-bottom: 9px;

    font-size: 16px;

    line-height: 1.5;

    font-weight: 750;
}

.action-description {
    font-size: 12px;

    line-height: 1.75;

    opacity: 0.72;
}


/* ============================================================
   SOURCES
   ============================================================ */

.sources {
    padding-top: 21px;

    border-top:
        1px solid #dce1e8;
}

.source-item {
    padding: 7px 0;

    border-bottom:
        1px solid #e7e9ed;

    font-size: 12px;

    line-height: 1.7;

    color: #697588;
}


/* ============================================================
   REPORT CONTENT
   ============================================================ */

#reportContent {
    font-size: 15px;

    line-height: 1.9;

    color: #303c4f;
}

#reportContent h1,
#reportContent h2,
#reportContent h3 {
    color: #182234;

    font-weight: 780;
}

#reportContent h1 {
    margin: 42px 0 18px;

    font-size: 30px;

    line-height: 1.3;
}

#reportContent h2 {
    margin: 38px 0 18px;

    padding-bottom: 10px;

    border-bottom:
        1px solid #dce1e8;

    font-size: 23px;

    line-height: 1.4;
}

#reportContent h3 {
    margin: 26px 0 10px;

    font-size: 17px;
}

#reportContent p {
    margin: 0 0 15px;
}

#reportContent ul,
#reportContent ol {
    margin: 12px 0 20px;

    padding-left: 24px;
}

#reportContent li {
    margin: 7px 0;
}


/* ============================================================
   REPORT CONTAINER
   ============================================================ */

.report-container {
    margin-top: 45px;

    padding: 48px 55px;

    border:
        1px solid #dce1e8;

    background: #ffffff;

    box-shadow:
        0 12px 35px rgba(20, 31, 48, 0.035);
}


/* ============================================================
   REPORT TOP BAR
   ============================================================ */

.report-topbar {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding-bottom: 18px;

    margin-bottom: 34px;

    border-bottom:
        1px solid #dce1e8;
}

.report-topbar-left {
    font-size: 10px;

    letter-spacing: 1.8px;

    font-weight: 800;

    color: #7b8493;

    text-transform: uppercase;
}

.report-topbar-right {
    font-size: 10px;

    color: #9aa3af;
}


/* ============================================================
   PDF / REPORT ACTION BAR
   ============================================================ */

.report-actions {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    margin-bottom: 25px;
}

.report-action-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 40px;

    padding: 0 14px;

    border:
        1px solid #cfd6df;

    background: #ffffff;

    color: #465267;

    font-size: 12px;

    font-weight: 700;

    cursor: pointer;

    transition:
        border-color 0.16s ease,
        background 0.16s ease,
        color 0.16s ease;
}

.report-action-button:hover {
    border-color: #9ea9b8;

    background: #f8f9fa;

    color: #182234;
}

.report-action-button.primary {
    border-color: #182234;

    background: #182234;

    color: #ffffff;
}

.report-action-button.primary:hover {
    border-color: #26344a;

    background: #26344a;

    color: #ffffff;
}

.report-action-button:disabled {
    opacity: 0.5;

    cursor: wait;
}


/* ============================================================
   ============================================================
   LEGACY STATUS PAGE
   ============================================================
   ============================================================ */

.status-page {
    width: 100%;

    max-width: 920px;

    margin: 0 auto;

    padding: 70px 30px 100px;
}

.status-header {
    margin-bottom: 40px;
}

.status-header h1 {
    margin: 0 0 12px;

    font-size: 42px;

    letter-spacing: -1.5px;

    color: #111827;
}

.status-header p {
    margin: 0;

    font-size: 15px;

    color: #697588;
}


/* ============================================================
   PROGRESS PANEL
   ============================================================ */

.progress-panel {
    padding: 30px;

    border:
        1px solid #dce1e8;

    background: #ffffff;

    box-shadow:
        0 10px 30px rgba(20, 31, 48, 0.035);
}

.progress-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 14px;
}

.progress-label {
    font-size: 10px;

    letter-spacing: 1.5px;

    font-weight: 800;

    color: #7d8899;

    text-transform: uppercase;
}

.progress-number {
    font-size: 14px;

    font-weight: 800;

    color: #182234;
}

.progress-fill {
    width: 0%;

    height: 100%;

    background: #182234;

    transition:
        width 0.5s ease;
}


/* ============================================================
   CURRENT STAGE
   ============================================================ */

.current-stage {
    margin-top: 22px;

    padding-top: 20px;

    border-top:
        1px solid #e2e6eb;
}

.current-stage-label {
    margin-bottom: 7px;

    font-size: 9px;

    letter-spacing: 1.6px;

    font-weight: 800;

    color: #8993a3;

    text-transform: uppercase;
}

.current-stage-text {
    font-size: 15px;

    font-weight: 700;

    color: #182234;
}

.current-stage-detail {
    margin-top: 5px;

    font-size: 12px;

    color: #7d8899;
}


/* ============================================================
   PIPELINE
   ============================================================ */

.research-pipeline {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    margin-top: 28px;

    border:
        1px solid #dce1e8;

    background: #ffffff;
}

.pipeline-step {
    padding: 16px;

    border-right:
        1px solid #e2e6eb;
}

.pipeline-step:last-child {
    border-right: none;
}

.pipeline-number {
    margin-bottom: 8px;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;

    color: #9aa3af;
}

.pipeline-title {
    font-size: 12px;

    font-weight: 700;

    color: #4c586b;
}

.pipeline-step.active {
    background: #f7f8fa;
}

.pipeline-step.active .pipeline-title {
    color: #182234;
}


/* ============================================================
   LOADING
   ============================================================ */

.loading-state {
    display: flex;

    align-items: center;

    gap: 9px;

    font-size: 12px;

    color: #7d8899;
}

.loading-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #182234;

    animation:
        pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;

        transform: scale(0.8);
    }

    50% {
        opacity: 1;

        transform: scale(1);
    }
}


/* ============================================================
   STATUS BADGE
   ============================================================ */

.status-badge {
    display: inline-flex;

    align-items: center;

    padding: 5px 9px;

    border:
        1px solid #d4dae2;

    background: #f8f9fa;

    font-size: 9px;

    letter-spacing: 1px;

    font-weight: 800;

    color: #697588;

    text-transform: uppercase;
}


/* ============================================================
   UTILITY
   ============================================================ */

.hidden {
    display: none !important;
}

.no-print {
    display: block;
}


/* ============================================================
   PRINT
   ============================================================ */

@media print {

    html,
    body {
        background: #ffffff;
    }

    .topbar,
    .research-overlay,
    .report-actions,
    .no-print {
        display: none !important;
    }

    .report-page {
        max-width: none;

        padding: 0;
    }

    .report-container {
        margin: 0;

        padding: 0;

        border: none;

        box-shadow: none;
    }

    .report-header {
        border-bottom:
            1px solid #d8dee6;
    }

    .action-card {
        break-inside: avoid;
    }

    .finding-card,
    .risk-card,
    .evidence-item {
        break-inside: avoid;
    }

    .report-section {
        break-inside: avoid;
    }

    #reportContent {
        color: #000000;
    }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {

    .main-container {
        padding:
            55px 28px 80px;
    }

    .hero-section h1 {
        font-size: 52px;

        letter-spacing: -2.5px;
    }

    .research-panel {
        padding:
            28px;
    }

    .example-grid {
        grid-template-columns: 1fr;
    }

    .report-meta {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .meta-item:nth-child(2) {
        border-right: none;
    }

    .meta-item:nth-child(-n+2) {
        border-bottom:
            1px solid #e1e5eb;
    }

    .findings-grid {
        grid-template-columns: 1fr;
    }

    .risk-grid {
        grid-template-columns: 1fr;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .research-pipeline {
        grid-template-columns: 1fr;
    }

    .pipeline-step {
        border-right: none;

        border-bottom:
            1px solid #e3e7ec;
    }

    .pipeline-step:last-child {
        border-bottom: none;
    }

    .executive-summary {
        grid-template-columns: 1fr;

        gap: 14px;
    }

    .report-container {
        padding:
            35px 28px;
    }

    .research-timeline {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .timeline-item:nth-child(2) {
        border-right: none;
    }

    .timeline-item:nth-child(-n+2) {
        border-bottom:
            1px solid #e0e5eb;
    }

    .report-actions {
        justify-content: flex-start;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {

    .main-container {
        padding:
            42px 16px 65px;
    }

    .hero-section {
        margin-bottom: 32px;
    }

    .hero-eyebrow {
        font-size: 10px;

        letter-spacing: 1.8px;
    }

    .hero-section h1 {
        font-size: 40px;

        line-height: 1.12;

        letter-spacing: -2px;
    }

    .hero-description {
        font-size: 15px;

        line-height: 1.75;
    }

    .research-panel {
        padding:
            23px 20px 24px;
    }

    .panel-header {
        margin-bottom: 15px;
    }

    #question {
        min-height: 170px;

        padding: 16px;

        font-size: 14px;
    }

    .input-footer {
        font-size: 10px;
    }

    .example-section {
        margin-top: 28px;
    }

    .example-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 5px;
    }

    .example-card {
        min-height: 58px;
    }

    .primary-button {
        width: 100%;

        margin-top: 22px;
    }

    .research-note {
        align-items: flex-start;
    }

    .research-overlay {
        padding: 15px;
    }

    .research-modal {
        max-height: 90vh;

        overflow-y: auto;

        padding:
            25px 21px;
    }

    .modal-top {
        margin-bottom: 28px;
    }

    .modal-top h2 {
        font-size: 19px;
    }

    #progressValue {
        font-size: 42px;
    }

    .research-timeline {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        border-right: none;

        border-bottom:
            1px solid #e0e5eb;
    }

    .timeline-item:last-child {
        border-bottom: none;
    }

    .report-page {
        padding:
            38px 16px 70px;
    }

    .report-header h1 {
        font-size: 31px;
    }

    .report-meta {
        grid-template-columns: 1fr;
    }

    .meta-item {
        border-right: none;

        border-bottom:
            1px solid #e1e5eb;
    }

    .meta-item:last-child {
        border-bottom: none;
    }

    .evidence-item {
        grid-template-columns: 1fr;

        gap: 8px;
    }

    .report-container {
        margin-top: 30px;

        padding:
            25px 20px;
    }

    #reportContent {
        font-size: 14px;
    }

    .report-actions {
        flex-direction: column;

        align-items: stretch;
    }

    .report-action-button {
        width: 100%;
    }

    .status-page {
        padding:
            45px 16px 70px;
    }

    .status-header h1 {
        font-size: 34px;
    }

    .progress-panel {
        padding: 22px 20px;
    }

    .modal-top {
        flex-direction: column;

        gap: 12px;
    }

    .live-indicator {
        padding-top: 0;
    }
}


/* ============================================================
   DARK TECH THEME OVERRIDE  (科技蓝深色主题)
   ============================================================ */

html {
    background: #070d1a;
}

body {
    background: linear-gradient(180deg, #070d1a 0%, #0b1a30 60%, #0a1830 100%);
    color: #e8f0fb;
    background-attachment: fixed;
}

.hero-eyebrow { color: #60a5fa; }
.eyebrow-line { background: #60a5fa; }

.hero-section h1 { color: #f4f8ff; }
.hero-section h1 span { color: #5b7ba3; }

.hero-description { color: #9db3cc; }

.research-panel {
    background: rgba(15, 33, 56, 0.85);
    border: 1px solid #1c3a5e;
    box-shadow: 0 12px 40px rgba(0, 10, 30, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.panel-label { color: #60a5fa; }
.panel-header h2 { color: #f4f8ff; }

#question {
    background: #0a1a30;
    border: 1px solid #244066;
    color: #e8f0fb;
}
#question::placeholder { color: #546b8a; }
#question:hover { border-color: #3b6aa0; }
#question:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.input-footer, #charCount { color: #5b7394; }

.example-header { color: #60a5fa; }
.example-header span:last-child { color: #6f88a6; }

.example-card {
    background: #0f2138;
    border: 1px solid #1c3a5e;
    color: #c8d8ec;
}
.example-card:hover {
    background: #16304f;
    border-color: #3b82f6;
    color: #ffffff;
}
.example-icon { color: #60a5fa; }
.example-content strong { color: #e8f0fb; }
.example-content span { color: #6f88a6; }
.example-arrow { color: #5b7394; }
.example-card:hover .example-arrow { color: #60a5fa; }

.primary-button {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}
.primary-button:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.research-note { color: #5b7394; }
.research-note > span { color: #6f88a6; }

/* 研究进度弹层 */
.research-overlay { background: rgba(3, 8, 20, 0.7); }
.research-modal {
    background: #0c1e36;
    border: 1px solid #1c3a5e;
    box-shadow: 0 30px 80px rgba(0, 5, 15, 0.6);
}
.modal-eyebrow { color: #60a5fa; }
.modal-top h2 { color: #f4f8ff; }
.live-indicator { color: #6f88a6; }
.live-indicator span { background: #22c55e; }

.progress-number { color: #f4f8ff; }
#progressValue { color: #f4f8ff; }
.progress-number small { color: #6f88a6; }
.progress-track { background: #16294a; }
.progress-bar { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

.current-stage {
    border-top: 1px solid #1c3a5e;
    border-bottom: 1px solid #1c3a5e;
}
.stage-label { color: #60a5fa; }
.stage-text { color: #e8f0fb; }
.detail-text { color: #7d95b3; }

.research-timeline { border: 1px solid #1c3a5e; }
.timeline-item {
    border-right: 1px solid #1c3a5e;
    background: #0c1e36;
}
.timeline-marker { color: #546b8a; }
.timeline-title { color: #b8cbe3; }
.timeline-description { color: #546b8a; }
.timeline-item.active { background: #132c4a; }
.timeline-item.active .timeline-marker,
.timeline-item.active .timeline-title { color: #f4f8ff; }
.timeline-item.completed { background: #0f2440; }
.timeline-item.completed .timeline-marker { color: #60a5fa; }
.timeline-item.completed .timeline-title { color: #d6e4f5; }
.timeline-item.error { background: #2a1420; }
.timeline-item.error .timeline-title { color: #f87171; }

.modal-warning { color: #5b7394; }

/* 报告页 */
.report-header { border-bottom: 1px solid #1c3a5e; }
.report-header h1 { color: #f4f8ff; }
.report-header p { color: #8aa3c2; }

.report-meta {
    border: 1px solid #1c3a5e;
    background: #0c1e36;
}
.meta-item { border-right: 1px solid #1c3a5e; }
.meta-label { color: #60a5fa; }
.meta-value { color: #e8f0fb; }

.executive-summary {
    border-top: 2px solid #3b82f6;
    border-bottom: 1px solid #1c3a5e;
}
.executive-summary-title { color: #60a5fa; }
.executive-summary-content { color: #c8d8ec; }

.report-section-header { border-bottom: 1px solid #1c3a5e; }
.report-section-number { color: #60a5fa; }
.report-section-title { color: #f4f8ff; }

.finding-card {
    border: 1px solid #1c3a5e;
    background: #0c1e36;
}
.finding-number { color: #60a5fa; }
.finding-title { color: #e8f0fb; }
.finding-description { color: #9db3cc; }

.risk-card {
    border: 1px solid #1c3a5e;
    background: #0c1e36;
}
.risk-name { color: #e8f0fb; }
.risk-level {
    border: 1px solid #3b6aa0;
    color: #60a5fa;
}
.risk-card p { color: #9db3cc; }

.report-table {
    border: 1px solid #1c3a5e;
    background: #0c1e36;
}
.report-table th {
    background: #132c4a;
    border-bottom: 1px solid #1c3a5e;
    color: #60a5fa;
}
.report-table td {
    border-bottom: 1px solid #16304f;
    color: #c8d8ec;
}

.evidence-item {
    border: 1px solid #1c3a5e;
    background: #0c1e36;
}
.evidence-type { color: #60a5fa; }
.evidence-content { color: #c8d8ec; }

.action-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #ffffff;
}

.sources { border-top: 1px solid #1c3a5e; }
.source-item {
    border-bottom: 1px solid #16304f;
    color: #8aa3c2;
}

#reportContent { color: #c8d8ec; }
#reportContent h1,
#reportContent h2,
#reportContent h3 { color: #f4f8ff; }
#reportContent h2 { border-bottom: 1px solid #1c3a5e; }

.report-container {
    border: 1px solid #1c3a5e;
    background: #0c1e36;
    box-shadow: 0 12px 40px rgba(0, 10, 30, 0.45);
}

.report-topbar { border-bottom: 1px solid #1c3a5e; }
.report-topbar-left { color: #60a5fa; }
.report-topbar-right { color: #6f88a6; }

.report-action-button {
    border: 1px solid #2c4d78;
    background: #0f2440;
    color: #c8d8ec;
}
.report-action-button:hover {
    border-color: #3b82f6;
    background: #16304f;
    color: #ffffff;
}
.report-action-button.primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}
.report-action-button.primary:hover {
    border-color: #3b82f6;
    background: #3b82f6;
}

/* 旧版状态页 */
.status-header h1 { color: #f4f8ff; }
.status-header p { color: #8aa3c2; }
.progress-panel {
    border: 1px solid #1c3a5e;
    background: #0c1e36;
    box-shadow: 0 10px 30px rgba(0, 10, 30, 0.45);
}
.progress-label { color: #60a5fa; }
.progress-number { color: #e8f0fb; }
.progress-fill { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.current-stage-text { color: #e8f0fb; }
.current-stage-detail { color: #7d95b3; }
.research-pipeline {
    border: 1px solid #1c3a5e;
    background: #0c1e36;
}
.pipeline-step { border-right: 1px solid #1c3a5e; }
.pipeline-number { color: #546b8a; }
.pipeline-title { color: #b8cbe3; }
.pipeline-step.active { background: #132c4a; }
.pipeline-step.active .pipeline-title { color: #ffffff; }
.loading-state { color: #7d95b3; }
.loading-dot { background: #3b82f6; }
.status-badge {
    border: 1px solid #2c4d78;
    background: #132c4a;
    color: #9db3cc;
}

.error {
    border: 1px solid #7f2d2d;
    background: #2a1420;
    color: #fca5a5;
}


/* ============================================================
   DARK THEME ENHANCEMENT (HUD 网格 / 渐变标题 / 辉光)
   ============================================================ */

body {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(168, 85, 247, 0.10) 0%, transparent 55%),
        linear-gradient(180deg, #070d1a 0%, #0b1a30 60%, #0a1830 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(96, 165, 250, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 165, 250, 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.main-container,
.report-page,
.status-page {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    background: linear-gradient(120deg, #f4f8ff 0%, #60a5fa 45%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-eyebrow {
    gap: 12px;
}
.eyebrow-line {
    width: 26px;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
}

.research-panel {
    border-radius: 14px;
    border-top: 2px solid transparent;
    background:
        linear-gradient(rgba(15, 33, 56, 0.9), rgba(15, 33, 56, 0.9)) padding-box,
        linear-gradient(135deg, rgba(96, 165, 250, 0.5), rgba(168, 85, 247, 0.25)) border-box;
    box-shadow:
        0 20px 60px rgba(0, 10, 30, 0.5),
        0 0 0 1px rgba(96, 165, 250, 0.05);
}

#question {
    border-radius: 10px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
#question:focus {
    border-color: #60a5fa;
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.2),
        0 0 24px rgba(59, 130, 246, 0.25);
}

.primary-button {
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    box-shadow:
        0 6px 24px rgba(37, 99, 235, 0.4),
        0 0 0 1px rgba(96, 165, 250, 0.2) inset;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.primary-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.primary-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow:
        0 10px 32px rgba(37, 99, 235, 0.55),
        0 0 0 1px rgba(147, 197, 253, 0.3) inset;
}
.primary-button:hover::after {
    left: 120%;
}

.example-card {
    border-radius: 10px;
    transition: border-color 0.18s ease, background 0.18s ease,
                box-shadow 0.18s ease, transform 0.18s ease;
}
.example-card:hover {
    transform: translateY(-2px);
    border-color: #60a5fa;
    box-shadow:
        0 8px 24px rgba(37, 99, 235, 0.25),
        0 0 16px rgba(96, 165, 250, 0.15);
}

.finding-card,
.risk-card,
.evidence-item,
.report-container,
.progress-panel {
    border-radius: 12px;
}

.timeline-item,
.pipeline-step {
    transition: background 0.18s ease;
}
.timeline-item:hover,
.pipeline-step:hover {
    background: #132c4a;
}

.live-indicator span {
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

@media print {
    body::before { display: none; }
    .hero-section h1 {
        -webkit-text-fill-color: #111827;
        color: #111827;
    }
}