/* ── Gene pages ── */

/* ── Specimen card ── */
.specimen-card {
    position: relative;
    background: var(--wash, #f1f5f9);
    border: 1px solid var(--stone, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
}

/* Two-column layout */
.specimen-card-body {
    display: flex;
    gap: 32px;
}

.specimen-col-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.specimen-col-right {
    flex: 0 0 auto;
    min-width: 280px;
    max-width: 420px;
    border-left: 1px solid var(--stone, #e2e8f0);
    padding-left: 32px;
}

/* Details table in right column */
.specimen-details {
    font-size: 14px;
    border-collapse: collapse;
}

.specimen-details th {
    font-weight: 600;
    color: var(--pebble, #4a5568);
    padding: 4px 12px 4px 0;
    vertical-align: top;
    white-space: nowrap;
    text-align: left;
}

.specimen-details td {
    padding: 4px 0;
    color: var(--ink, #1a1f2b);
}

.specimen-edit-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 13px;
    color: var(--pebble-light, #94a3b8);
}

.specimen-edit-btn:hover {
    color: var(--creek, #3b82f6);
}

.specimen-orf {
    font-size: 18px;
    font-weight: 500;
    color: var(--pebble, #4a5568);
    font-family: var(--mono, monospace);
    line-height: 1.2;
}

.specimen-name-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 12px;
    margin-top: 2px;
}

.specimen-name {
    font-size: 30px;
    font-weight: 700;
    color: var(--ink, #1a1f2b);
    letter-spacing: -0.5px;
}

.specimen-aka {
    font-size: 20px;
    font-weight: 600;
    color: var(--pebble, #4a5568);
    letter-spacing: -0.3px;
}

.specimen-aka-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--pebble, #4a5568);
    font-style: italic;
}

.specimen-annotation {
    font-size: 16px;
    color: var(--pebble, #4a5568);
    margin-top: 6px;
    line-height: 1.5;
}

.specimen-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--pebble, #4a5568);
}

.specimen-meta-sep {
    color: var(--stone, #e2e8f0);
}

div.gene-title {
    font-family: var(--font-stack, sans-serif);
    font-size: 18px;
    color: var(--ink, #1a1f2b);
}

img.passage-slope {
    width: 100%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 600 / 400;
}

img.passage-slope-thumb {
    width: 100%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 240 / 120;
}

img.logistic-curve {
    width: 100%;
    max-width: 455px;
    height: auto;
    aspect-ratio: 455 / 400;
}

img.vulnerability {
    width: 100%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 600 / 400;
}

img.vulnerability-thumb {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 200 / 100;
}

img.drug-heatmap {
    width: 100%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 600 / 400;
}

/* ── Gene detail section spacing ── */
.gene-detail-section {
    margin-bottom: 24px;
}

/* ── Gene info ── */
div.gene-info {
    font-size: 16px;
    color: var(--ink, #1a1f2b);
    font-family: var(--font-stack, sans-serif);
}

th.gene-info {
    font-weight: 600;
    font-size: 16px;
    color: var(--pebble, #4a5568);
    padding: 6px 12px 6px 0;
    vertical-align: top;
}

td.gene-info {
    font-size: 16px;
    padding: 6px 0;
}

div.quick-links {
    font-size: 13px;
    padding-top: 10px;
    padding-bottom: 0px;
    color: var(--pebble, #4a5568);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: auto;
}

/* ── Essentiality table ── */
div.essentiality {
    font-family: var(--font-stack, sans-serif);
    padding: 10px 15px;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink, #1a1f2b);
    position: relative;
}

table.essentiality {
    margin: 10px 30px;
    font-family: var(--font-stack, sans-serif);
    text-align: left;
    font-size: 15px;
    border-collapse: collapse;
}

th.essentiality {
    border-top: 1px solid var(--stone, #e2e8f0);
    border-bottom: 1px solid var(--stone, #e2e8f0);
    padding: 8px;
    color: var(--pebble, #4a5568);
    font-weight: 600;
}

td.essentiality {
    border-bottom: 1px solid var(--stone, #e2e8f0);
    padding: 8px;
}

/* ── References ── */
li.references {
    padding: 5px;
    list-style-type: circle;
}

/* ── Gene search results page ── */
.search-results-page {
    font-size: 18px;
}
.search-results-page .info-header {
    font-size: 24px;
}
.gene-search-results {
    font-family: var(--font-stack, sans-serif);
    padding: 5px 5px;
    border-radius: var(--radius-md, 8px) var(--radius-md, 8px) 0 0;
    text-align: left;
}

/* ── Nav button (expand/collapse arrow) ── */
a.nav-button {
    padding-left: 10px;
    margin: 0;
    position: absolute;
    top: 23%;
}

/* ── Sequence info ── */
div.gene-sequence-info {
    font-family: var(--mono, "Courier New", monospace);
    word-wrap: break-word;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.5;
}

pre.fasta-header {
    font-family: var(--mono, "Courier New", monospace);
    font-size: 14px;
    font-weight: 600;
    color: var(--pebble, #4a5568);
    margin: 0 0 2px;
    padding: 0;
    background: none;
    border: none;
}

/* ── PAM color scale (DO NOT MODIFY — data visualization) ── */
span.pam1,span.pam2,span.pam3,span.pam4,span.pam5,span.pam6,
span.pam7,span.pam8,span.pam9,span.pam10,span.pam11,span.pam12,
span.pam13,span.pam14,span.pam15,span.pam16,span.pam17,span.pam18,
span.pam19,span.pam20,span.pam21,span.pam22,span.pam23,span.pam24,
span.pamoverlap {
    font-size: 15px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

span.pamoverlap{
    font-size: 15px;
    background-color: rgb(227, 134, 255);
}

span.pam1{
    background-color: rgb(195, 46, 49);
}
span.pam2{
    background-color: rgb(209, 73, 63);
}
span.pam3{
    background-color: rgb(221, 95, 75);
}
span.pam4{
    background-color: rgb(231, 116, 91);
}
span.pam5{
    background-color: rgb(239, 136, 107);
}
span.pam6{
    background-color: rgb(244, 152, 122);
}
span.pam7{
    background-color: rgb(247, 169, 139);
}
span.pam8{
    background-color: rgb(247, 184, 156);
}
span.pam9{
    background-color: rgb(245, 196, 172);
}
span.pam10{
    background-color: rgb(239, 206, 189);
}
span.pam11{
    background-color: rgb(231, 215, 206);
}
span.pam12{
    background-color: rgb(221, 220, 220);
}
span.pam13{
    background-color: rgb(197, 214, 242);
}
span.pam14{
    background-color: rgb(197, 214, 242);
}
span.pam15{
    background-color: rgb(185, 208, 249);
}
span.pam16{
    background-color: rgb(170, 199, 253);
}
span.pam17{
    background-color: rgb(155, 188, 255);
}
span.pam18{
    background-color: rgb(141, 176, 254);
}
span.pam19{
    background-color: rgb(126, 161, 250);
}
span.pam20{
    background-color: rgb(111, 146, 243);
}
span.pam21{
    background-color: rgb(98, 130, 234);
}
span.pam22{
    background-color: rgb(84, 112, 222);
}
span.pam23{
    background-color: rgb(70, 94, 207);
}
span.pam24{
    background-color: rgb(59, 76, 192);
}

/* ── SNP table ── */
table.snp-table {
    text-align: center;
    border-collapse: collapse;
    width: 100%;
}

table.snp-table td, table.snp-table th {
    padding: 4px 6px;
}

table.snp-table tbody td {
    font-size: 14px;
}

table.snp-table thead {
    background: var(--wash, #f1f5f9);
    border-bottom: 2px solid var(--stone, #e2e8f0);
}

table.snp-table thead th {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: var(--pebble, #4a5568);
}

/* SNP severity colors (data visualization — keep as-is) */
td.snp_high {
    background: #ff2626;
    font-weight: bold;
}

td.snp_moderate {
    background: #ffc826;
    font-weight: bold;
}

td.snp_low {
    background: #91ce65;
    font-weight: bold;
}

/* ── Comments ── */
span.comment-add, span.comment-edit, span.private-comment-add, span.private-comment-edit {
    font-size: 13px;
}

div.private-comment, div.public-comment {
    background: var(--wash, #f1f5f9);
    padding: 8px 12px;
    font-size: 14px;
    border-radius: var(--radius-sm, 4px);
    border: 1px solid var(--stone, #e2e8f0);
    margin-bottom: 8px;
}

span.private-comment-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--pebble, #4a5568);
}

blockquote.private-comment, blockquote.public-comment, pre.public-comment {
    font-size: 14px;
    font-style: normal;
    text-align: left;
    margin: 0.1em 5px;
    font-family: var(--font-stack, sans-serif);
}

/* ── Layout toggle ── */
.layout-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

/* ── Tabbed layout ── */
.pebble-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid var(--stone, #e2e8f0);
    margin-bottom: 0;
}

.pebble-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-stack, sans-serif);
    color: var(--pebble, #4a5568);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.pebble-tab:hover {
    color: var(--ink, #1a1f2b);
    background: var(--wash, #f1f5f9);
}

.pebble-tab--active,
.pebble-tab--active:hover {
    color: var(--creek, #3b82f6);
    border-bottom-color: var(--creek, #3b82f6);
    font-weight: 600;
    background: transparent;
}

.pebble-tab:focus-visible {
    outline: 2px solid var(--creek, #3b82f6);
    outline-offset: -2px;
    border-radius: var(--radius-sm, 4px) var(--radius-sm, 4px) 0 0;
}

.pebble-tab-panels {
    border: 1px solid var(--stone, #e2e8f0);
    border-top: none;
    border-radius: 0 0 var(--radius-lg, 12px) var(--radius-lg, 12px);
    background: var(--surface, #ffffff);
    min-height: 300px;
}

.pebble-tab-panel {
    display: none;
    padding: 24px 28px;
}

.pebble-tab-panel--active {
    display: block;
}

/* Remove collapsible behavior inside tabs — content is always visible */
.pebble-tab-panel .custom-collapsible {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink, #1a1f2b);
    cursor: default;
    pointer-events: none;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid var(--stone, #e2e8f0);
    border-radius: 0;
    margin-bottom: 16px;
    background: transparent;
    justify-content: flex-start;
    gap: 6px;
}

.pebble-tab-panel .custom-collapsible:hover {
    background: transparent;
}

.pebble-tab-panel .custom-collapsible a {
    pointer-events: auto;
}

.pebble-tab-panel .custom-collapsible .custom-arrow {
    display: none;
}

.pebble-tab-panel .custom-panel-content {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    padding: 16px !important;
    border: none;
}

/* Section header inside tabs (e.g. Notes sub-sections) */
.pebble-tab-section-header {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink, #1a1f2b);
    padding: 8px 0;
    border-bottom: 1px solid var(--stone, #e2e8f0);
    margin-bottom: 16px;
    font-family: var(--font-stack, sans-serif);
}

.pebble-tab-section-header a {
    font-size: 13px;
    font-weight: 400;
    margin-left: 6px;
}

/* Empty tab message */
.pebble-tab-empty {
    color: var(--pebble, #4a5568);
    font-style: italic;
    padding: 32px 0;
    text-align: center;
    font-size: 15px;
}

/* Help tab (?) */
.pebble-tab-help {
    position: relative;
    font-size: 16px;
    color: var(--pebble-light, #94a3b8);
    padding: 10px 14px;
    margin-left: auto;
}

.pebble-tab-help:hover {
    color: var(--creek, #3b82f6);
}

.pebble-tab-help-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    right: -8px;
    width: 320px;
    padding: 12px 16px;
    background: var(--ink, #1a1f2b);
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    margin-bottom: 8px;
    white-space: normal;
    word-wrap: break-word;
}

.pebble-tab-help-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 20px;
    border: 6px solid transparent;
    border-top-color: var(--ink, #1a1f2b);
}

.pebble-tab-help:hover .pebble-tab-help-tooltip {
    display: block;
}

/* ── Advanced search form ── */
input.vuln-input {
    width: 100px;
    padding: 6px 8px;
    font-size: 15px;
    font-family: var(--font-stack, sans-serif);
    border: 1.5px solid var(--pebble-light, #94a3b8);
    border-radius: var(--radius-sm, 4px);
}

input.vuln-input:focus {
    border-color: var(--creek, #3b82f6);
    outline: none;
}

fieldset select[multiple] {
    height: auto;
    min-width: 200px;
    padding: 4px;
    font-size: 15px;
    font-family: var(--font-stack, sans-serif);
    border: 1.5px solid var(--pebble-light, #94a3b8);
    border-radius: var(--radius-sm, 4px);
}

fieldset select[multiple]:focus {
    border-color: var(--creek, #3b82f6);
    outline: none;
}

.tooltip-dotted {
    border-bottom: 1.5px dotted var(--pebble, #4a5568);
    cursor: help;
}

/* ── Mobile responsive (gene pages) ── */
@media screen and (max-width: 768px) {
    .specimen-card {
        padding: 20px;
    }

    .specimen-card-body {
        flex-direction: column;
        gap: 20px;
    }

    .specimen-col-right {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--stone, #e2e8f0);
        padding-top: 20px;
        min-width: 0;
        max-width: none;
    }

    .specimen-name {
        font-size: 24px;
    }

    .specimen-aka {
        font-size: 17px;
    }

    .pebble-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pebble-tab {
        padding: 8px 14px;
        font-size: 13px;
    }

    .pebble-tab-panel {
        padding: 16px;
    }

    .pebble-tab-help-tooltip {
        width: 240px;
        right: -4px;
    }
}
