/* Shared interface typography, navigation, and detail-page presentation. */
:root {
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --preview-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --text-primary: #20282c;
    --text-secondary: #536169;
    --border-color: #e2e7e8;
    --border-color-strong: #cbd4d7;
}
body { font-family:var(--font-family); font-weight:400; }
button, input, select, textarea { font-family:inherit; }
button, a, summary { -webkit-tap-highlight-color:transparent; }
.op-menubar { min-height:64px; background:#fff; padding-right:28px; }
.op-wordmark { font-size:24px; font-weight:600; letter-spacing:-.5px; }
.op-tabs { align-items:center; gap:8px; padding-left:16px; }
.op-tabs > .op-tab, .op-help-navigation > summary {
    min-height:64px; padding:0 16px; display:flex; align-items:center;
    text-transform:none; letter-spacing:0; font-size:14px; font-weight:500;
    color:var(--text-secondary); border-radius:0;
}
.op-tabs > .op-tab.is-active { color:var(--primary); }
.op-tabs > .op-tab::after { left:16px; right:16px; }
.op-help-navigation { position:relative; margin-left:auto; }
.op-help-navigation > summary { gap:10px; list-style:none; cursor:pointer; }
.op-help-navigation > summary::-webkit-details-marker { display:none; }
.op-help-navigation:has(.op-tab.is-active) > summary { color:var(--primary); }
.op-help-navigation > summary::after { content:''; width:6px; height:6px; border-right:1.5px solid; border-bottom:1.5px solid; transform:rotate(45deg) translateY(-2px); }
.op-help-navigation-menu { position:absolute; top:calc(100% - 4px); right:0; z-index:90; min-width:200px; padding:6px; border:1px solid var(--border-color); border-radius:6px; background:white; box-shadow:0 8px 24px #172e3514; }
.op-help-navigation-menu .op-tab { display:block; width:100%; min-height:38px; padding:10px 12px; text-align:left; font-size:14px; letter-spacing:0; text-transform:none; border-radius:3px; }
.op-help-navigation-menu .op-tab::after { content:none; }
.op-help-navigation-menu .op-tab:hover, .op-help-navigation-menu .op-tab.is-active { background:#f1f7f6; color:var(--primary); }
.op-help-navigation summary:focus-visible { outline:2px solid var(--primary); outline-offset:-4px; }
.op-gv { max-width:1032px; padding-top:40px; gap:32px; }
.op-gv:has(.op-gv-search:not([hidden])) { max-width:816px; margin-left:auto; margin-right:auto; padding-top:64px; }
.op-gv-search { position:relative; top:auto; padding:0 0 12px; margin:0; }
.op-gv-body { gap:36px; }
.op-gv-identity h2, .op-gv-search h2 { font-size:28px; font-weight:600; letter-spacing:-.5px; }
.op-gv :is(.chart-card), .modal-body > .chart-card {
    padding:0; border:0; border-radius:0; box-shadow:none; background:transparent;
    backdrop-filter:none; gap:16px;
}
.op-gv-body > .chart-card + .chart-card { padding-top:4px; }
.card-header h4, .op-prot-head h4, .agent-overview-card > h4, .ai-commons-panel .op-prot-head h4 {
    margin:0; font-size:16px; line-height:1.4; font-weight:600; letter-spacing:0;
}
.op-prot-p { font-size:14px; line-height:1.75; max-width:82ch; }
.op-prot-more { font-size:13px; font-weight:500; line-height:1.5; }
.op-prot-meta .card-subtitle { font-size:12px; }
.op-gv-wait { font-style:normal; font-size:13px; color:var(--text-secondary); }
.op-gv-loading { font-style:normal; font-size:13px; color:var(--text-secondary); }
.agent-overview-card:has(#op-gv-agent-overview:empty) { display:none; }
.agent-overview-card[hidden], .ai-commons-panel[hidden] { display:none !important; }
.op-struct { border-radius:5px; box-shadow:none; }
.full-page-modal { backdrop-filter:none; }
.full-page-modal-content { width:100vw; height:100dvh; border:0; border-radius:0; box-shadow:none; }
#hotspot-modal .modal-header { padding:18px max(28px, calc((100vw - 1120px) / 2)); background:#fff; border-bottom:1px solid var(--border-color); }
#modal-hotspot-title { font-size:22px !important; font-weight:600; letter-spacing:-.5px; }
.modal-header .badge { border-radius:4px; font-size:10px; font-weight:500; letter-spacing:.025em; padding:4px 7px; }
.modal-body { padding:36px 28px 80px; gap:32px; }
.modal-body > * { max-width:1120px; }
.modal-body > .ai-commons-panel { margin:0 auto; }
#hotspot-modal .ai-overview-action { padding:0; margin:-12px auto 0; }
.agent-source-link { font-size:11px; text-decoration:none; }
.agent-source-link:hover { text-decoration:underline; }
.ai-glass-surface { display:contents !important; }
#hotspot-modal .ai-explore-trigger, #hotspot-modal .ai-explore-trigger:hover {
    width:auto; min-height:36px; padding:8px 12px; border:1px solid var(--primary);
    border-radius:5px; color:var(--primary); background:white; font-size:13px;
}
.ai-explore-trigger .ai-sparkles, #ai-title .ai-sparkles { display:none; }
#ai-exploration { background:transparent; border:0; box-shadow:none; padding:0; }
#ai-exploration .ai-inline-heading { justify-content:flex-end; margin:0 0 8px; }
#ai-exploration #ai-title { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#ai-exploration .ai-goal-grid { gap:8px; margin-bottom:16px; }
#ai-exploration .ai-goal-chip { border-radius:4px; padding:8px 12px; font-size:13px; box-shadow:none; }
#ai-exploration #ai-prompt-preview { background:#f4f6f7; border-color:var(--border-color); border-radius:0; }
#ai-exploration .ai-provider-actions { gap:10px; }
#ai-exploration .ai-provider-open, #ai-exploration .ai-provider-open:hover {
    width:auto; min-height:40px; padding:8px 14px; border:1px solid var(--border-color-strong);
    border-radius:5px; background:#fff; color:var(--text-primary); font-size:13px; box-shadow:none;
}
#ai-exploration .ai-provider-open:hover { border-color:var(--primary); background:#f6faf9; }
#ai-exploration .ai-provider-logo { width:22px; height:22px; flex-basis:22px; padding:2px; }
#ai-exploration .ai-connect-link { font-size:12px; margin-top:4px; }
#ai-exploration :is(pre, textarea), .op-seq, .op-seq code { font-family:var(--preview-mono); }
.op-doc { grid-template-columns:minmax(0, 816px); padding-top:36px; }
.op-doc h1 { font-size:28px; font-weight:600; letter-spacing:-.5px; }
.op-doc h2 { font-size:18px; font-weight:600; border:0; padding-bottom:0; margin:32px 0 14px; }
.op-doc :is(p, li) { font-size:14px; line-height:1.75; }
.op-doc summary h2 { margin:0; padding:0; border:0; font:inherit; }
.op-faq-item { border-bottom:1px solid var(--border-color); }
.op-faq-item summary { padding:18px 0; font-size:14px; }
.op-faq-item summary::before { width:6px; height:6px; border-width:1.5px; }
.support-citation-heading { margin-top:32px; }
.support-citation-heading h2 { margin:0; border:0; }
.op-sidebar-ui .sidebar { background:#fafbfb; }
.op-sidebar-ui .sidebar .control-group > label { text-transform:none; letter-spacing:0; font-weight:500; font-size:12px; }
.op-sidebar-ui .sidebar :is(#btn-open-cohort, #discovery-ptm) { border-radius:5px; font-size:13px; }
.op-sidebar-ui .sidebar :is(.column-picker-trigger, #discovery-advanced > summary) { background:transparent; border-color:transparent; padding-left:0; padding-right:4px; }
.op-sidebar-ui .sidebar :is(.column-picker-trigger, #discovery-advanced > summary):hover { background:#edf3f2; }
.op-sidebar-ui .sidebar .op-sidebar-actions :is(#btn-reset-filters, #btn-hotspots-export) { border:0; background:transparent; font-size:12px; padding-left:0; }
.op-sidebar-ui .sidebar .mode-toggle { border-radius:5px; }
#hotspots-table th { text-transform:none; letter-spacing:0; font-size:12px; font-weight:500; }
#hotspots-table td,
#hotspots-table tbody tr td.hs-dyn {
    font-family:var(--font-family);
    font-size:13px;
    font-weight:400;
    font-variant-numeric:tabular-nums;
    letter-spacing:0;
}
.discovery-mode { border-radius:5px; }
#op-gv-input, .op-help-search input { font-size:15px; font-family:var(--font-family); }
.op-gv-search:focus-within, .op-help-search:focus-within { box-shadow:none; }
#op-gv-input:focus { box-shadow:none; }
@media (max-width:760px) {
    .op-menubar { min-height:60px; padding:0 12px; flex-wrap:nowrap; gap:12px; }
    .op-brand { flex:0 0 auto; padding:12px 0; }
    .op-wordmark { font-size:20px; }
    .op-brand img, .op-brand svg { max-width:30px; }
    .op-tabs { flex:1; gap:0; padding:0; justify-content:flex-end; }
    .op-tabs > .op-tab, .op-help-navigation > summary { min-height:60px; padding:0 8px; font-size:12px; }
    .op-help-navigation { margin-left:0; }
    .op-help-navigation > summary { gap:6px; }
    .op-tabs > .op-tab::after { left:8px; right:8px; }
    .op-gv:has(.op-gv-search:not([hidden])) { padding-top:40px; }
    .op-gv, .op-doc { padding-left:20px; padding-right:20px; }
    .modal-body { padding:24px 20px 60px; }
    #hotspot-modal .modal-header { padding:14px 20px; }
    #hotspot-modal .modal-header > div:first-child { flex-basis:auto; }
    .op-gv-identity h2, .op-gv-search h2 { font-size:25px; }
    #ai-exploration .ai-provider-open { flex:0 1 auto; }
}

/* Secondary navigation stays hidden until its accessible menu is assembled. */
.op-tabs > .op-tab[data-view]:not([data-view="genes"]):not([data-view="hotspots"]):not([data-view="agents"]) { display:none; }

/* One quiet research surface: overview, action and expanded prompt stay together. */
#hotspot-modal .ai-research-section,
.op-gv .agent-overview-card {
    box-sizing:border-box; width:100%; padding:22px 24px;
    border:1px solid #d8eae7; border-radius:8px;
    background:linear-gradient(120deg, #edf8f5 0%, #f7fbfa 70%, #f2f8f8 100%);
    box-shadow:none; gap:14px;
}
#hotspot-modal .ai-research-section { display:flex; flex-direction:column; margin:0 auto; }
#hotspot-modal .ai-research-section .ai-commons-panel {
    padding:0; margin:0; border:0; border-radius:0; background:transparent; box-shadow:none; gap:10px;
}
.ai-research-section .op-prot-head h4, .op-gv .agent-overview-card > h4 {
    color:#246c63; font-size:12px; font-weight:600; letter-spacing:.04em;
}
#ai-commons-threads, #op-gv-agent-overview { gap:8px; }
.ai-research-section .op-prot-p, .agent-overview-card .op-prot-p { color:var(--text-primary); }
.ai-research-section .agent-source-link, .agent-overview-card .agent-source-link { color:var(--text-secondary); }
#hotspot-modal .ai-research-section .ai-overview-action { margin:2px 0 0; padding:0; }
#hotspot-modal .ai-research-section .ai-explore-trigger {
    padding:6px 0; min-height:32px; border:0; background:transparent; border-radius:3px;
    font-size:13px; font-weight:600; box-shadow:none;
}
#hotspot-modal .ai-research-section .ai-explore-trigger:hover { background:transparent; color:#175d54; text-decoration:underline; }
.ai-research-section .ai-explore-trigger .ai-sparkles { display:block; width:16px; height:16px; }
.ai-research-section #ai-exploration { margin:0; padding-top:12px; border-top:1px solid #d8eae7; width:100%; }
@media(max-width:600px) {
    #hotspot-modal .ai-research-section, .op-gv .agent-overview-card { padding:18px 16px; }
}

.ai-prompt-details { margin-top:14px; font-size:12px; color:var(--text-secondary); }
.ai-prompt-details > summary { cursor:pointer; width:fit-content; }
.ai-prompt-details[open] > summary { margin-bottom:12px; }
.ai-research-section #ai-exploration { padding-top:16px; }
.ai-research-section .ai-provider-actions { margin:0; }
#ai-status:empty { display:none; }

.op-prot-p > .op-prot-more { display:inline; margin:0 0 0 4px; padding:0; vertical-align:baseline; white-space:nowrap; }

.ai-overview-loading { display:grid; gap:10px; padding:6px 0; min-height:80px; align-content:start; }
.ai-overview-loading span { display:block; height:12px; border-radius:3px; background:#dceee9; }
.ai-overview-loading span:nth-child(2) { width:92%; }
.ai-overview-loading span:nth-child(3) { width:65%; }

/* Enlarge the existing section headings; offset only where the margin has room. */
#hotspot-modal .modal-body .card-header > :is(h3,h4) {
    font-size:24px !important; line-height:1.4;
}
#hotspot-modal #ai-commons-title { font-size:18px !important; line-height:1.4; }

/* Omics panels follow the same open section layout as structure and mutations. */
#hotspot-modal #modal-hpa-card { border:0 !important; border-radius:0 !important; }
#hotspot-modal #modal-hpa-card > .card-header { display:none; }
#hotspot-modal #modal-hpa-card > .card-body { padding:0 !important; }
#hotspot-modal .omics-bubble-grid { gap:32px; }
#hotspot-modal .omics-bubble { border:0; border-radius:0; background:transparent; overflow:visible; }
#hotspot-modal .omics-bubble-header {
    padding:0; margin:0 0 16px; border:0; background:transparent;
    color:var(--text-primary); font-size:24px; line-height:1.4; font-weight:600;
}
#hotspot-modal .omics-bubble-body { padding:0 !important; }

.op-gv-protein-header { display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.op-gv-identity { display:flex; align-items:baseline; flex-wrap:wrap; column-gap:14px; row-gap:4px; }
.op-gv-identity h2 { margin:0; }
#op-gv-protein-name { margin:0; font-size:14px; line-height:1.5; color:var(--text-secondary); font-weight:400; }
.op-gv-protein-meta { display:flex; align-items:baseline; gap:10px; font-size:12px; line-height:1.5; color:var(--text-secondary); }

.op-gv-protein-meta a:hover { text-decoration:underline; }
.op-gv-protein-meta > :not([hidden]) + :not([hidden])::before { content:'·'; margin-right:10px; }
.op-gv-protein-meta:has(> [hidden]:only-child) { display:none; }

/* One section-heading style across protein and hotspot detail views. */
.op-gv :is(.card-header > h2, .card-header > h3, .card-header > h4, .omics-bubble-header),
#hotspot-modal .modal-body :is(.card-header > h2, .card-header > h3, .card-header > h4, .omics-bubble-header),
#hotspot-modal #ai-commons-title {
    font-family:var(--font-family); font-size:24px !important; font-weight:600;
    line-height:1.4; letter-spacing:0; color:var(--text-primary); text-transform:none;
}

.hpa-cancer-plot { overflow-x:auto; overflow-y:hidden; height:518px; }

#modal-protein-length { font-size:12px; font-weight:400; color:var(--text-secondary); white-space:nowrap; }

.omics-bubble-header { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; }
.omics-bubble-header .omics-source-link { font-size:12px; font-weight:400; letter-spacing:0; }

/* Protein discovery keeps the search field as its primary action. */
.op-gv:has(.op-gv-search:not([hidden])) { max-width:720px; padding-top:clamp(64px, 15vh, 160px); }
.op-gv-search .discovery-home { text-align:center; margin-bottom:24px; }
#op-gv-examples { justify-content:center; }
#op-gv-input { height:62px; font-size:18px; border-radius:12px; }
#op-gv-ac { margin-top:8px; }
@media (max-width:600px) { .op-gv:has(.op-gv-search:not([hidden])) { padding-top:56px; } }

#op-gv-examples:not([hidden]) { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:8px; max-width:560px; margin:18px auto 0; }
#op-gv-examples button { width:100%; }
@media (max-width:480px) { #op-gv-examples:not([hidden]) { gap:6px; } #op-gv-examples button { padding:6px 3px; font-size:12px; } }

#op-gv-examples .op-search-suggestions-label { grid-column:1 / -1; text-align:center; margin:0 0 2px; }

.op-legal-footer { position:static; display:flex; justify-content:center; gap:18px; margin:32px 0 0; padding:18px 16px; border-top:1px solid var(--border-color); font-size:12px; font-weight:400; color:var(--text-muted); }
.op-doc > .op-legal-footer { margin-top:40px; }
.op-legal-footer a { color:inherit; text-decoration:underline; text-underline-offset:3px; }

/* An invitation below search; legal links remain after the full landing content. */
#genes-view:has(.op-gv-search:not([hidden])) > .op-gv { min-height:100dvh; box-sizing:border-box; }
#op-gv-examples button {
    width:100%; min-height:32px; padding:5px 4px;
    border:0; border-radius:0; background:transparent;
    box-shadow:none; color:var(--primary); text-decoration:none;
    text-underline-offset:4px;
}
#op-gv-examples button:hover {
    border:0; background:transparent; box-shadow:none;
    text-decoration:underline;
}
#op-gv-examples button:focus-visible {
    outline:2px solid var(--primary); outline-offset:2px;
    text-decoration:underline;
}


