/* experiments.css - the Experiments page: sub-headings and the rhamnolipid workflow figure */

.ex-heading,
.ex-flow {
    --ex-ink:        #26323C;
    --ex-muted:      #5C6873;
    --ex-panel:      #F9FAFC;
    --ex-panel-line: #D8E0E8;
    --ex-green:      #D2EAD7;
    --ex-green-line: #80BD8E;
    --ex-green-ink:  #3F6E4C;
    --ex-flow-line:  #80BD8E;
    --ex-cell:       #E7F1E9;
    --ex-cell-line:  #6FA87E;
    --ex-plasmid:    #E07A5F;
    --ex-glass:      #EDF2F6;
    --ex-glass-line: #A7B6C2;
    --ex-broth:      #F3E7C6;
    --ex-omww:       #8A6A3B;
    --ex-head:       #E6A93C;
    --ex-head-line:  #B2781B;
    --ex-tail:       #8A6A3B;
}

html[data-dark] .ex-heading,
html[data-dark] .ex-flow {
    --ex-ink:        #E6ECE8;
    --ex-muted:      #A9B4AE;
    --ex-panel:      #1E2420;
    --ex-panel-line: rgba(255,255,255,0.12);
    --ex-green:      #28402F;
    --ex-green-line: #5E9C6E;
    --ex-green-ink:  #BEE0C6;
    --ex-flow-line:  #5E9C6E;
    --ex-cell:       #2A3B30;
    --ex-cell-line:  #6FA87E;
    --ex-plasmid:    #E89177;
    --ex-glass:      #2A3137;
    --ex-glass-line: #7E8C99;
    --ex-broth:      #5A4F33;
    --ex-omww:       #6B5230;
    --ex-head:       #D9A24B;
    --ex-head-line:  #E8BE73;
    --ex-tail:       #C3A066;
}

/* ── sub-headings ───────────────────────────────────────────────── */

.ex-heading {
    margin: 2.2rem auto 0.6rem;
}

.ex-heading--h4 {
    margin-top: 1.6rem;
}

.ex-heading-title {
    margin: 0;
    color: var(--ex-ink);
}

.ex-heading--h4 .ex-heading-title {
    font-size: 1.02rem;
    letter-spacing: 0.01em;
}

/* ── the rhamnolipid workflow ───────────────────────────────────── */

.ex-flow {
    margin: 1.6rem 0 2rem;
    padding: 1.1rem 1.1rem 0.9rem;
    background: var(--ex-panel);
    border: 1px solid var(--ex-panel-line);
    border-radius: 14px;
}

.ex-flow-title {
    margin: 0 0 0.9rem;
    font-weight: 600;
    color: var(--ex-ink);
}

.ex-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.ex-scroll:focus-visible {
    outline: 2px solid var(--ex-green-line);
    outline-offset: 3px;
}

.ex-flow-track {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0 0 0.4rem;
    list-style: none;
    min-width: 46rem;
}

.ex-flow-step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    padding-right: 1.6rem;
}

/* the arrow between one step and the next */
.ex-flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0.45rem;
    top: 50%;
    width: 0.62rem;
    height: 0.62rem;
    border-top: 2px solid var(--ex-flow-line);
    border-right: 2px solid var(--ex-flow-line);
    transform: translateY(-50%) rotate(45deg);
}

.ex-flow-step:last-child {
    padding-right: 0;
}

.ex-flow-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.75rem 0.6rem;
    text-align: center;
    background: var(--ex-green);
    border: 1px solid var(--ex-green-line);
    border-radius: 12px;
    height: 100%;
    justify-content: center;
}

.ex-flow-step--split .ex-flow-box {
    height: auto;
}

.ex-flow-label {
    font-size: 0.86rem;
    line-height: 1.3;
    color: var(--ex-green-ink);
    font-weight: 600;
}

.ex-ico svg {
    display: block;
    width: 4.2rem;
    height: auto;
}

.ex-cell   { fill: var(--ex-cell);  stroke: var(--ex-cell-line);  stroke-width: 2; }
.ex-plasmid{ fill: none;            stroke: var(--ex-plasmid);    stroke-width: 2.4; }
.ex-bridge { stroke: var(--ex-cell-line); stroke-width: 3; fill: none; }
.ex-arrow-in { stroke: var(--ex-plasmid); stroke-width: 2.2; fill: none; stroke-linecap: round; }
.ex-tube   { fill: var(--ex-glass); stroke: var(--ex-glass-line); stroke-width: 2; }
.ex-rim    { stroke: var(--ex-glass-line); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.ex-broth  { fill: var(--ex-broth); stroke: none; }
.ex-omww   { fill: var(--ex-omww);  stroke: none; }
.ex-head   { fill: var(--ex-head);  stroke: var(--ex-head-line); stroke-width: 2; }
.ex-tail   { stroke: var(--ex-tail); stroke-width: 2.4; fill: none; stroke-linecap: round; }

.ex-flow-cap {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--ex-muted);
}

.ex-flow-cap a {
    color: inherit;
}

/* ── phones: the track scrolls sideways, so keep the boxes readable ── */

@media (max-width: 40rem) {
    .ex-flow {
        padding: 0.9rem 0.9rem 0.8rem;
    }

    .ex-flow-track {
        min-width: 40rem;
    }

    .ex-ico svg {
        width: 3.4rem;
    }

    .ex-flow-label {
        font-size: 0.8rem;
    }
}

/* ── Windows High Contrast ──────────────────────────────────────── */

@media (forced-colors: active) {
    .ex-flow,
    .ex-flow-box {
        border: 1px solid CanvasText;
    }

    .ex-flow-step:not(:last-child)::after {
        border-top-color: CanvasText;
        border-right-color: CanvasText;
    }

    .ex-cell, .ex-tube, .ex-broth, .ex-omww, .ex-head {
        fill: Canvas;
        stroke: CanvasText;
    }

    .ex-plasmid, .ex-bridge, .ex-arrow-in, .ex-tail, .ex-rim {
        stroke: CanvasText;
    }
}
