/* ═══════════════════════════════════════════════════
   EVERYTHINGTHREADS — RESULTS THEME
   Based on SESSION_ANALYSER_v3.html visual language.
   Include on any tool page that shows analysis results.

   Usage: <link rel="stylesheet" href="/styles/results-theme.css">
   ═══════════════════════════════════════════════════ */

/* ── STAT ROW — horizontal metric strip ──────────── */
.et-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
    background: rgba(255, 255, 255, .04);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.et-stat {
    padding: 1.25rem 1rem;
    text-align: center;
    background: rgba(10, 12, 18, .8);
}
.et-stat__label {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: .6rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(243, 239, 233, .35);
    margin-bottom: .4rem;
}
.et-stat__value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}
.et-stat__sub {
    font-size: .6rem;
    color: rgba(243, 239, 233, .3);
    margin-top: .3rem;
}

/* ── HEAT RING — circular score gauge ────────────── */
.et-heat-ring {
    position: relative;
    width: 88px;
    height: 88px;
    flex-shrink: 0;
}
.et-heat-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}
.et-heat-ring__bg {
    fill: none;
    stroke: rgba(255, 255, 255, .06);
    stroke-width: 8;
}
.et-heat-ring__fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset .8s cubic-bezier(.4, 0, .2, 1);
}
.et-heat-ring__label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.et-heat-ring__num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}
.et-heat-ring__text {
    font-family: 'JetBrains Mono', monospace;
    font-size: .5rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(243, 239, 233, .4);
    margin-top: .2rem;
}

/* ── SEVERITY BADGES ─────────────────────────────── */
.et-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
}
.et-badge--low { background: rgba(56, 203, 137, .12); color: #38cb89; }
.et-badge--med { background: rgba(255, 141, 45, .12); color: #ff8d2d; }
.et-badge--high { background: rgba(255, 95, 118, .12); color: #ff5f76; }
.et-badge--crit { background: rgba(255, 59, 48, .15); color: #ff3b30; }
.et-badge--m1 { background: rgba(26, 82, 118, .15); color: #4da6d9; }
.et-badge--m2 { background: rgba(108, 52, 131, .15); color: #b06ad9; }
.et-badge--m3 { background: rgba(15, 76, 92, .15); color: #3ab0b0; }
.et-badge--m4 { background: rgba(184, 115, 10, .15); color: #e8a530; }
.et-badge--m5 { background: rgba(44, 62, 80, .15); color: #7ea0bf; }
.et-badge--m6 { background: rgba(74, 72, 69, .15); color: #9a9895; }
.et-badge--uf { background: rgba(255, 95, 118, .12); color: #ff5f76; }

/* ── FINDING CARD — expandable result item ───────── */
.et-finding {
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
    margin-bottom: .6rem;
    transition: border-color .2s;
    overflow: hidden;
}
.et-finding:hover {
    border-color: rgba(255, 106, 31, .15);
}
.et-finding__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background .15s;
}
.et-finding__head:hover {
    background: rgba(255, 255, 255, .02);
}
.et-finding__title {
    flex: 1;
    font-size: .82rem;
    font-weight: 600;
    color: rgba(243, 239, 233, .85);
}
.et-finding__ex {
    font-family: 'JetBrains Mono', monospace;
    font-size: .6rem;
    color: rgba(243, 239, 233, .3);
    flex-shrink: 0;
}
.et-finding__body {
    display: none;
    padding: 0 16px 14px;
}
.et-finding.open .et-finding__body {
    display: block;
    animation: etFadeIn .2s ease;
}
@keyframes etFadeIn { from { opacity: 0; } to { opacity: 1; } }

.et-finding__evidence {
    font-size: .78rem;
    font-style: italic;
    color: rgba(255, 106, 31, .65);
    border-left: 2px solid rgba(255, 106, 31, .25);
    padding-left: .75rem;
    margin-bottom: .75rem;
    line-height: 1.6;
}
.et-finding__detail {
    font-size: .78rem;
    color: rgba(243, 239, 233, .5);
    line-height: 1.7;
}

/* ── INTERVENTION CARD — numbered action ─────────── */
.et-intervention {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 14px;
    padding: 1.25rem;
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
    margin-bottom: .75rem;
}
.et-intervention__num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 106, 31, .1);
    border: 1px solid rgba(255, 106, 31, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: .85rem;
    font-weight: 700;
    color: #ff6a1f;
}
.et-intervention__title {
    font-size: .88rem;
    font-weight: 700;
    color: rgba(243, 239, 233, .85);
    margin-bottom: .4rem;
}
.et-intervention__body {
    font-size: .78rem;
    color: rgba(243, 239, 233, .5);
    line-height: 1.7;
}
.et-intervention__action {
    font-family: 'JetBrains Mono', monospace;
    font-size: .65rem;
    color: #ff6a1f;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: .5rem;
    padding: .4rem .6rem;
    background: rgba(255, 106, 31, .06);
    border-radius: 4px;
    display: inline-block;
}

/* ── HEATBAR — horizontal gradient indicator ─────── */
.et-heatbar {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg,
        #0d4f80 0%,
        #1a6b5a 25%,
        #8a9400 50%,
        #e07a00 75%,
        #d42000 100%
    );
    position: relative;
    margin: 1rem 0;
}
.et-heatbar__labels {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: .5rem;
    color: rgba(243, 239, 233, .3);
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ── SIGNAL SEQUENCE — status indicator ──────────── */
.et-signal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .7rem;
    font-weight: 700;
}
.et-signal--hh { background: rgba(56, 203, 137, .1); color: #38cb89; }
.et-signal--ll { background: rgba(255, 255, 255, .04); color: rgba(243, 239, 233, .5); }
.et-signal--hl { background: rgba(255, 95, 118, .1); color: #ff5f76; }
.et-signal--lh { background: rgba(255, 141, 45, .1); color: #ff8d2d; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 768px) {
    .et-stat-row { grid-template-columns: repeat(2, 1fr); }
    .et-stat__value { font-size: 1.1rem; }
    .et-intervention { grid-template-columns: 32px 1fr; gap: 10px; padding: 1rem; }
    .et-intervention__num { width: 32px; height: 32px; font-size: .7rem; }
}
