/* Page-level visual system */
.home-page, .explorer-page, .download-page, .contact-page { max-width: 1360px; margin: 0 auto; }
.home-intro {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 28px; align-items: center; padding: 30px 34px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.home-title { margin-top: 6px; font-size: 44px; letter-spacing: 0.02em; color: #172033; }
.home-subtitle { margin: 8px 0 16px; color: var(--text-secondary); font-size: 17px; line-height: 1.5; }
.home-abstract { max-width: 680px; margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.75; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.home-intro-media { min-width: 0; }
.home-summary-image { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; border: 1px solid var(--border); border-radius: 10px; background: #f7faff; }
.image-caption { margin-top: 8px; color: var(--text-muted); font-size: 12px; }
.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 18px 0 32px; padding: 18px 20px; }
.stat-block { min-width: 0; padding: 0 18px; border-right: 1px solid var(--border); }
.stat-block:first-child { padding-left: 0; }
.stat-block:last-child { border-right: 0; }
.home-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 14px; }
.section-title { margin: 4px 0 0; color: var(--text-primary); font-size: 22px; }
.section-note { color: var(--text-muted); font-size: 13px; }
.home-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-feature-link { color: inherit; text-decoration: none; }
.home-feature-card { display: flex; align-items: center; gap: 14px; min-height: 112px; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.home-feature-card:hover { border-color: #aebfe3; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.home-feature-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 8px; background: #edf3ff; color: var(--primary); font-size: 20px; }
.home-feature-title { color: var(--text-primary); font-size: 16px; font-weight: 700; }
.home-feature-copy { margin-top: 4px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.home-feature-arrow { margin-left: auto; color: var(--text-muted); }

.page-intro { margin-bottom: 18px; }
.page-intro .page-heading { margin-top: 4px; }
.page-intro-copy { max-width: 720px; margin: 8px 0 0; color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.explorer-tabs { padding: 0 4px; }
.explorer-layout { display: grid; grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.explorer-panel, .plot-panel { min-width: 0; min-height: 560px; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.explorer-panel { align-self: stretch; }
.plot-panel { min-height: 560px; }
.control-label { margin: 0 0 7px; color: var(--text-primary); font-size: 13px; font-weight: 700; }
.control-group { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.control-group:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.filter-actions { display: flex; gap: 6px; margin: 8px 0; }
.cell-filter { max-height: 232px; overflow-y: auto; display: grid; grid-template-columns: 1fr; gap: 6px; }
.plot-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.plot-title { color: var(--text-primary); font-size: 15px; font-weight: 700; }
.plot-note { color: var(--text-muted); font-size: 12px; }
.plot-container { min-width: 0; min-height: 470px; }
.gene-layout { min-height: 560px; }
.gene-explorer-layout > .explorer-panel, .gene-explorer-layout > .plot-panel { height: 560px; }
.gene-explorer-layout .plot-container { height: calc(100% - 50px); min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 6px; }
.gene-pdf-card { flex: 0 0 auto; border-color: #cfdbef !important; background: #fbfdff; }
.gene-pdf-frame { width: 100%; height: 430px !important; max-height: 430px; background: #fff; }

.download-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); }
.download-toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.download-help { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 2px; color: var(--text-muted); font-size: 12px; }
.resource-command-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 18px 0 12px; padding: 14px 16px; border: 1px solid #c8d8f2; border-radius: var(--radius-md); background: linear-gradient(105deg, rgba(238,246,255,.96), rgba(248,252,255,.98)); box-shadow: 0 8px 22px rgba(29, 78, 216, .07); }
.resource-command-main { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--primary); }
.resource-command-main > .anticon { font-size: 20px; }
.resource-command-title { color: var(--text-primary); font-size: 13px; font-weight: 700; }
.resource-command-copy { margin-top: 2px; color: var(--text-muted); font-size: 12px; }
.resource-command-link { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 8px 12px; border: 1px solid #b7ccef; border-radius: 7px; color: var(--primary); background: rgba(255,255,255,.8); text-decoration: none; font-size: 12px; font-weight: 700; }
.resource-command-link:hover { border-color: var(--primary); background: #fff; box-shadow: 0 4px 12px rgba(29,78,216,.12); }
.file-list-panel { overflow: hidden; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.file-row { min-height: 52px; border-bottom: 1px solid #edf0f5; transition: background .15s ease; }
.file-row:last-child { border-bottom: 0; }
.file-row-main { min-width: 0; }
.file-row-main .anticon { color: var(--primary); }
.file-size { width: 78px; flex-shrink: 0; color: var(--text-muted); font-size: 12px; text-align: left; }
.file-name { min-width: 0; overflow: hidden; color: var(--text-primary); text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: var(--text-muted); font-size: 12px; }

.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.contact-panel { padding: 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.contact-panel-title { margin: 0 0 14px; color: var(--text-primary); font-size: 17px; font-weight: 700; }
.person-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.person-row:last-child { border-bottom: 0; }
.resource-link { border-radius: 7px !important; background: #f8fafc !important; border: 1px solid var(--border) !important; }
.funding-list { margin: 0; padding-left: 18px; color: var(--text-secondary); font-size: 13px; line-height: 1.7; }

.resource-link-github { color: #3f3f46 !important; }
.resource-link-github:hover { background: #f4f4f5 !important; border-color: #a1a1aa !important; }

/* A restrained technical grid gives the workspace more depth without competing with data. */
body { background-color: #eaf1fb; background-image: linear-gradient(rgba(29, 78, 216, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 193, 195, 0.035) 1px, transparent 1px), linear-gradient(135deg, rgba(255,255,255,.7), rgba(231,240,253,.72)); background-size: 32px 32px, 32px 32px, 100% 100%; background-attachment: fixed; }
.core-header-row { box-shadow: 0 1px 0 rgba(29, 78, 216, 0.08), 0 8px 22px rgba(25, 45, 90, 0.05); }
.core-page-shell { position: relative; }
.core-page-shell::before { content: ""; display: block; height: 3px; margin: -18px 0 18px; background: linear-gradient(90deg, var(--primary), #22c1c3 44%, #8b5cf6 70%, transparent 92%); opacity: .9; box-shadow: 0 0 14px rgba(34,193,195,.32); }
.home-intro, .explorer-panel, .plot-panel, .contact-panel, .download-toolbar, .file-list-panel { box-shadow: 0 0 0 1px rgba(74, 128, 219, .05), 0 14px 34px rgba(31, 63, 120, .09); }

@media (max-width: 900px) {
    .home-intro { grid-template-columns: 1fr; }
    .home-summary-image { max-height: 240px; }
    .home-feature-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .home-intro { padding: 22px 18px; gap: 20px; }
    .home-title { font-size: 34px; }
    .home-subtitle { font-size: 15px; }
    .home-stats { grid-template-columns: repeat(2, 1fr); gap: 16px 0; padding: 16px; }
    .stat-block { padding: 0 12px; border-right: 0; }
    .stat-block:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--border); }
    .home-section-heading { display: block; }
    .section-note { margin-top: 6px; }
    .explorer-layout { grid-template-columns: 1fr; }
    .plot-panel { min-height: 420px; }
    .plot-container { min-height: 340px; }
    .gene-explorer-layout > .explorer-panel, .gene-explorer-layout > .plot-panel { height: auto; min-height: 420px; }
    .gene-explorer-layout .plot-container { height: auto; }
    .resource-command-bar { align-items: flex-start; flex-direction: column; }
    .resource-command-link { align-self: stretch; justify-content: center; }
    .download-help { align-items: flex-start; flex-direction: column; }
    .contact-panel { padding: 18px; }
}
