.research-main { max-width: 1240px; padding: 42px 28px 70px; }
.research-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:30px; }
.research-heading h1 { font-size:28px; letter-spacing:-1.2px; margin:8px 0; }
.research-heading p,.connection-card>p,.gate>p { color:#6b7684; }
.research-tag { display:inline-block; font-size:12px; padding:5px 10px; border-radius:20px; background:#f2f4f6; color:#6b7684; white-space:nowrap; }
.research-tag.connected { color:#19724e; background:#e9f8f0; }
.gate { max-width:640px; padding:32px; margin:50px auto; }
.step-number { display:inline-grid; place-items:center; width:42px; height:42px; background:#e8f3ff; border-radius:12px; color:#3182f6; margin-bottom:18px; font-size:24px; }
.gate h2 { margin-bottom:8px; }.gate form { margin:25px 0 16px; }
.connection-grid { display:grid; grid-template-columns:1fr 1fr; gap:22px; margin-bottom:24px; }
.connection-card { padding:26px; }.card-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.provider-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:#202a35; color:white; font-size:24px; font-weight:700; }
.telegram-icon { background:#e8f5ff; color:#229ed9; }.connection-card h2 { font-size:21px; margin-bottom:6px; }
.connection-card small { display:block; color:#8b95a1; margin-top:18px; }.account-detail { margin:24px 0 14px; }
.input-row { display:flex; gap:8px; align-items:center; }.input-row input { flex:1; min-width:0; }.input-row .button { white-space:nowrap; }
.research-main label { display:block; color:#4e5968; font-size:13px; font-weight:600; }.research-main label .text-input { margin-top:7px; }.research-main .text-input { min-height:43px; width:100%; }
.research-main details { margin:16px 0; }.research-main summary { cursor:pointer; font-weight:600; }.research-main details p { color:#6b7684; font-size:12px; margin:12px 0; }
.research-main details a { color:#3182f6; text-decoration:underline; }.field-pair { display:grid; grid-template-columns:1fr 2fr; gap:12px; }
.device-login { background:#f2f7ff; padding:18px; border-radius:12px; margin-top:18px; }.device-login strong { display:block; letter-spacing:4px; font-size:26px; padding:10px 0; }.device-login p { font-size:12px; }.device-login .button { display:inline-block; margin-bottom:12px; }
#telegram-code-form { margin-top:16px; }.source-panel,.wiki-panel { margin-bottom:24px; }.source-panel>form { padding:22px 26px; }.source-fields { display:grid; grid-template-columns:1fr 190px auto; align-items:end; gap:14px; }.source-fields .button { min-height:43px; }
.source-permission { border-top:1px solid #eef0f3; padding-top:16px; }.source-permission summary { color:#6b7684; font-size:13px; }.source-permission summary span { color:#8b95a1; font-size:11px; margin-left:6px; }.permission-check { margin-top:12px; }.permission-check input { margin-right:7px; }.source-list { border-top:1px solid #eef0f3; }
.source-row { padding:20px 26px; border-bottom:1px solid #eef0f3; }.source-row-heading { display:flex; gap:14px; align-items:center; justify-content:space-between; }.source-row strong { overflow-wrap:anywhere; }.source-row p { color:#6b7684; margin-top:8px; font-size:12px; }.source-row .job-error { color:#d04b55; }.source-row-actions { display:flex; gap:12px; align-items:center; }.source-footnote { padding:16px 26px; font-size:12px; color:#8b95a1; }.empty-state { text-align:center; padding:42px 20px; color:#8b95a1; font-size:13px; line-height:1.9; }
.wiki-layout { display:grid; grid-template-columns:290px 1fr; min-height:300px; }.wiki-layout>div { border-right:1px solid #eef0f3; }.wiki-filters { display:flex; flex-wrap:wrap; padding:16px; gap:6px; }.wiki-filters button { border:0; background:transparent; padding:6px 16px; border-radius:8px; color:#8b95a1; }.wiki-filters button.selected { background:#e8f3ff; color:#3182f6; font-weight:600; }.wiki-item { width:100%; border:0; background:white; text-align:left; padding:15px 22px; border-top:1px solid #f2f4f6; }.wiki-item:hover,.wiki-item.selected { background:#f5f9ff; }.wiki-item small { display:block; color:#8b95a1; margin-top:4px; }.wiki-reader { min-width:0; padding:24px; }.wiki-reader pre { white-space:pre-wrap; overflow-wrap:anywhere; font:14px/1.9 inherit; font-family:inherit; margin:0; }.research-main .notice { margin-bottom:20px; }
@media(max-width:800px) { .research-main { padding:24px 16px; }.research-heading h1 { font-size:23px; }.research-heading>.research-tag { display:none; }.connection-grid { grid-template-columns:1fr; }.source-fields { grid-template-columns:1fr; }.wiki-layout { grid-template-columns:1fr; }.wiki-layout>div { border-right:0; border-bottom:1px solid #eef0f3; }.source-row-heading { align-items:flex-start; flex-direction:column; }.app-nav { padding:12px 16px; gap:18px; flex-wrap:wrap; }.app-brand { font-size:16px; }.app-nav nav { gap:16px; }.research-main .panel-heading { padding:20px; }.gate { margin:24px auto; padding:24px; } }

.research-tabs {display:flex; gap:8px; margin:20px 0 28px; border-bottom:1px solid var(--border,#dce3e8); padding-bottom:12px; overflow:auto}
.research-tabs button {white-space:nowrap; padding:10px 18px; border:0; background:transparent; color:inherit; border-radius:8px; cursor:pointer; font-weight:600}
.research-tabs button.selected {background:#193e35; color:#fff}
.overview-heading {display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px}
.overview-heading h2 {margin:5px 0}
.overview-stats {display:grid; grid-template-columns:repeat(4,1fr); gap:14px}
.stat-card {background:var(--surface,#fff); border:1px solid var(--border,#dde5df); border-radius:14px; padding:22px; display:flex; flex-direction:column; gap:10px}
.stat-card strong {font-size:34px; letter-spacing:-1px; color:#23634d}
.stat-card small,.report-card small,.source-summary small,.recent-page small {color:#68786f; line-height:1.6; display:block}
.pipeline-strip {display:flex; gap:14px; align-items:center; justify-content:center; flex-wrap:wrap; padding:22px 0; color:#536b5f; font-size:13px}
.pipeline-strip b {color:#8fa699}
.overview-grid {display:grid; grid-template-columns:1fr 1fr; gap:18px}
.wiki-overview .panel {margin-bottom:18px; padding:24px}
.wiki-overview h2 {font-size:19px; margin:8px 0 18px}
.source-summary {border-top:1px solid #e6ebe7; padding:12px 0; overflow-wrap:anywhere}
#publish-overview {display:grid; gap:9px; overflow-wrap:anywhere}
.report-grid {display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px}
.report-card {padding:16px; background:#f5f8f6; border-radius:10px; overflow-wrap:anywhere}
.report-card p {font-size:13px}
.report-card small {font-size:11px}
.recent-knowledge {display:grid; grid-template-columns:1fr 1fr; gap:8px}
.recent-page {display:block; text-align:left; border:1px solid #e3ebe5; background:transparent; border-radius:8px; padding:14px; cursor:pointer; overflow-wrap:anywhere}
.recent-page:hover {background:#f3f7f4}
/* The graph has its own viewport: wheel zoom never scrolls a wide SVG. */
.graph-panel {overflow:hidden}
.graph-description {padding:0 26px;margin:0 0 18px}
.graph-toolbar {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;background:#11191f;color:#c7d5df;border-bottom:1px solid #29353f;flex-wrap:wrap}
.graph-legend {display:flex;gap:18px;font-size:12px}
.graph-legend span {display:flex;align-items:center;gap:7px}
.graph-legend span::before {content:'';width:8px;height:8px;border-radius:50%;background:#e8ba68}
.graph-legend .company::before {background:#63a9ff}
.graph-legend .industry::before {background:#44d9b0}
.graph-controls {display:flex;align-items:center;gap:4px}
.graph-controls button {border:1px solid #374651;border-radius:7px;background:#1b2730;color:#e1ebf2;min-width:36px;min-height:36px;font-size:18px;cursor:pointer}
.graph-controls button:hover {background:#2c3d49}
.graph-controls button:focus-visible {outline:2px solid #63a9ff;outline-offset:3px}
.graph-controls #graph-fit {font-size:12px;padding:0 12px;margin-left:8px}
#graph-zoom {font-size:12px;min-width:48px;text-align:center;font-variant-numeric:tabular-nums}
.graph-viewport {position:relative;background:#0d1319;background-image:radial-gradient(#23303a 1px,transparent 1px);background-size:26px 26px}
#knowledge-graph {width:100%;height:clamp(440px,68vh,820px);display:block;touch-action:none;user-select:none;cursor:grab;outline-offset:-3px}
#knowledge-graph:focus-visible {outline:2px solid #63a9ff}
#knowledge-graph.graph-dragging,#knowledge-graph.graph-dragging .graph-node {cursor:grabbing}
.graph-edge {stroke:#647c8f;opacity:.28;pointer-events:none;vector-effect:non-scaling-stroke}
.graph-node {cursor:pointer;outline:none}
.graph-node circle {stroke:#0d1319;stroke-width:2}
.graph-node text {fill:#c5d2dd;font:11px system-ui,sans-serif;pointer-events:none;paint-order:stroke;stroke:#0d1319;stroke-width:3px;stroke-linejoin:round}
.graph-node:hover circle,.graph-node:focus circle,.graph-node.graph-match circle {stroke:#e6f4ff;stroke-width:2.5}
.graph-node.graph-active text,.graph-node:focus text {fill:#fff;font-weight:600}
.graph-node.graph-label-hidden text {visibility:hidden}
.graph-node.graph-active text,.graph-node:focus text,.graph-node.graph-match text {visibility:visible}
.graph-focused .graph-node:not(.graph-neighbor) {opacity:.16}
.graph-focused .graph-edge {opacity:.06}
.graph-focused .graph-edge.graph-active {opacity:.85;stroke:#adcfdf}
.graph-distant .graph-node:not(.graph-hub):not(.graph-match):not(.graph-neighbor):not(:focus) text {visibility:hidden}
#graph-empty {position:absolute;inset:35% 20px auto;text-align:center;color:#9fafbd;pointer-events:none;font-size:14px}
.graph-footer {display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 20px;background:#11191f;color:#a7b8c5;font-size:11px;border-top:1px solid #29353f}
.graph-footer p {margin:0;line-height:1.8}
@media(max-width:800px) {.graph-description {padding:0 20px}.graph-toolbar {padding:12px}.graph-legend {gap:12px}#knowledge-graph {height:58vh;min-height:360px}.graph-footer {padding:12px}.graph-controls {margin-left:auto}}
#wiki-search {margin-bottom:16px; max-width:460px}
[data-panel][hidden] {display:none!important}
@media(max-width:800px) {.overview-stats {grid-template-columns:repeat(2,1fr)} .overview-grid,.recent-knowledge {grid-template-columns:1fr} .report-grid {grid-template-columns:repeat(2,minmax(0,1fr))} .overview-heading {align-items:start;flex-direction:column} .stat-card {padding:16px} .research-tabs button {padding:9px 12px} [data-panel="graph"] .panel-heading {flex-direction:column;align-items:stretch}}

.report-grid > .subtle {grid-column:1/-1;margin:0}

#graph-search {max-width:360px}
[data-panel="graph"] .panel-heading > div {min-width:250px}

.collection-status {margin-bottom:26px;padding:24px;min-width:0}
#collection-overview-slot {min-width:0}
.collection-heading {display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.collection-heading h2 {font-size:17px;margin:0}
.collection-heading .subtle {font-size:12px}
.collection-grid {display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:start}
.collection-next {display:block;margin-top:12px;font-size:13px;line-height:1.7;color:#245b49;font-weight:600;overflow-wrap:anywhere}
.research-main .collection-card {margin:0;min-width:0;border:1px solid #dce5df;border-radius:12px;background:#fff;overflow:hidden}
.research-main .collection-card summary {padding:18px 20px;cursor:pointer;list-style:none}
.collection-card summary::-webkit-details-marker {display:none}
.collection-card summary:focus-visible {outline:2px solid #3182f6;outline-offset:-3px}
.collection-title {display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-weight:700;font-size:15px}
.collection-title::after {content:'⌄';margin-left:auto;color:#68786f}
.collection-card[open] .collection-title::after {content:'⌃'}
.collection-badge {font-size:11px;font-weight:600;padding:4px 8px;border-radius:6px;background:#edf0f2;color:#596773}
.collection-badge[data-tone="active"] {background:#e8f2ff;color:#205caa}
.collection-badge[data-tone="ready"] {background:#e6f4eb;color:#226346}
.collection-badge[data-tone="warning"] {background:#fff0db;color:#925614}
.collection-summary {display:block;margin-top:10px;color:#64736b;font-size:12px;font-weight:400;line-height:1.7;overflow-wrap:anywhere}
.collection-detail {padding:0 20px 18px;border-top:1px solid #edf1ee;font-size:12px;overflow-wrap:anywhere}
.collection-detail>.subtle {line-height:1.8;margin:14px 0}
.collection-detail .report-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
.collection-detail .report-card {padding:12px}
.collection-facts {display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px 18px;line-height:1.6;margin:16px 0}
.collection-facts dt {color:#68786f}
.collection-facts dd {margin:0}
.collection-detail .job-error {color:#ad3f46;font-size:12px;line-height:1.6}
@media(max-width:800px) {.collection-grid {grid-template-columns:1fr}.research-main .collection-card summary {padding:16px}.collection-detail {padding:0 16px 16px}.collection-title {font-size:14px}}
