/* ---------------------------------------------------------------------------
   /learn/http-vs-socks5-proxy/ -- residual page styles.
   Prefix: hsx- (HTTP/SOCKS5 eXchange). Used ONLY for the handshake-ladder
   decision aid, which the shared pxa- article system cannot express.
   Everything else on the page uses pxa- from article_assets.html.
   Colours are site CSS variables only -- no raw hex.
   --------------------------------------------------------------------------- */

.hsx-figure {
    margin: 2.2rem 0 1.6rem;
    padding: 0;
}

.hsx-figcaption {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding-left: 0.9rem;
    border-left: 2px solid var(--primary);
}

.hsx-figlabel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hsx-figlabel svg {
    color: var(--primary);
    flex-shrink: 0;
}

.hsx-figdesc {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.hsx-ladders {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.hsx-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem 0.85rem 0.75rem;
    min-width: 0;
}

.hsx-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    padding-bottom: 0.6rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.hsx-panel-title {
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hsx-panel-sub {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

/* --- the SVG ladder itself -------------------------------------------- */

.hsx-ladder {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    color: var(--text-primary);
}

.hsx-col {
    fill: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
}

.hsx-life {
    stroke: var(--border);
    stroke-width: 1;
    stroke-dasharray: 3 5;
}

.hsx-flow {
    stroke: var(--primary);
    stroke-width: 1.4;
    stroke-linecap: round;
}

.hsx-head {
    fill: var(--primary);
}

.hsx-cond {
    stroke: var(--text-secondary);
    stroke-width: 1.2;
    stroke-dasharray: 4 3;
    opacity: 0.8;
}

.hsx-cond-head {
    fill: var(--text-secondary);
}

.hsx-wire {
    fill: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 8px;
    /* knock the lifelines out from behind the message labels */
    paint-order: stroke fill;
    stroke: var(--bg-secondary);
    stroke-width: 3px;
    stroke-linejoin: round;
}

.hsx-wire.hsx-dim {
    fill: var(--text-secondary);
}

.hsx-note {
    fill: var(--text-secondary);
    font-size: 7.5px;
    letter-spacing: 0.01em;
}

.hsx-note-strong {
    fill: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 7.5px;
}

.hsx-box {
    fill: var(--bg-tertiary);
    stroke: var(--border);
    stroke-width: 1;
}

.hsx-rule {
    stroke: var(--success);
    stroke-width: 1.2;
    stroke-dasharray: 5 4;
    opacity: 0.8;
}

.hsx-rule-text {
    fill: var(--success);
    font-size: 7.5px;
    letter-spacing: 0.03em;
}

/* --- round-trip gutter tally ------------------------------------------ */

.hsx-tally {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.5rem 0 0;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--border);
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.hsx-tally-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    border: 1px solid var(--primary);
    background: var(--bg-tertiary);
    box-shadow: 0 0 10px var(--glow-color);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

.hsx-foot {
    display: block;
    margin: 0.9rem 0 0;
    padding: 0.7rem 0.9rem;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: var(--bg-tertiary);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.hsx-foot svg {
    vertical-align: -2px;
    color: var(--primary);
}

@media (max-width: 640px) {
    .hsx-ladders {
        grid-template-columns: 1fr;
    }

    .hsx-figure {
        margin: 1.6rem 0 1.2rem;
    }
}
