.trade-tool {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.trade-hero,
.trade-panel {
    border: 1px solid rgba(226, 180, 67, .2);
    background: linear-gradient(180deg, rgba(24, 49, 39, .96), rgba(12, 27, 22, .96));
    box-shadow: var(--shadow);
}

.trade-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
    gap: 20px;
    align-items: stretch;
    padding: clamp(18px, 3vw, 28px);
    border-radius: 8px;
}

.trade-hero-copy h2,
.trade-panel h2 {
    margin: 0;
    color: #fff;
    letter-spacing: 0;
}

.trade-hero-copy h2 {
    max-width: 920px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.03;
}

.trade-lede {
    max-width: 880px;
    margin: 14px 0 0;
    color: #c9d8d0;
    font-size: 16px;
}

.trade-facts,
.trade-links,
.trade-filter-buttons,
.trade-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trade-facts {
    margin-top: 18px;
}

.trade-facts span,
.trade-links a,
.trade-count,
.trade-card-label {
    border: 1px solid rgba(226, 180, 67, .22);
    background: rgba(226, 180, 67, .08);
    color: #f3d783;
    border-radius: 6px;
}

.trade-facts span {
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
}

.trade-status-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    padding: 18px;
    border: 1px solid rgba(101, 168, 255, .24);
    border-radius: 8px;
    background: #0e1d22;
}

.trade-card-label {
    width: fit-content;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.trade-status-card output {
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.1;
}

.trade-status-card small {
    color: #a9bcb3;
    font-size: 13px;
}

.trade-links a {
    padding: 8px 11px;
    font-size: 13px;
    font-weight: 800;
}

.trade-links a:hover,
.trade-filter-buttons button:hover,
.trade-filter-buttons button.is-active,
.trade-tabs button:hover,
.trade-tabs button.is-active,
[data-trade-copy-log]:hover {
    border-color: rgba(226, 180, 67, .55);
    background: rgba(226, 180, 67, .18);
    color: #fff;
}

.trade-panel {
    padding: 18px;
    border-radius: 8px;
}

.trade-answer {
    display: grid;
    grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.trade-answer p:last-child,
.trade-list,
.trade-problem-note p {
    margin: 0;
    color: #c6d5cd;
}

.trade-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.trade-choice-grid,
.trade-check-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.trade-choice-grid label,
.trade-check-grid label {
    display: flex;
    gap: 10px;
    min-width: 0;
    min-height: 112px;
    padding: 12px;
    border: 1px solid rgba(139, 160, 150, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .035);
}

.trade-choice-grid label:has(input:checked),
.trade-check-grid label:has(input:checked) {
    border-color: rgba(68, 201, 130, .55);
    background: rgba(68, 201, 130, .12);
}

.trade-choice-grid input,
.trade-check-grid input {
    flex: 0 0 auto;
    margin-top: 2px;
    accent-color: var(--green);
}

.trade-choice-grid span,
.trade-check-grid span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.trade-choice-grid strong,
.trade-check-grid strong {
    color: #fff;
    font-size: 14px;
}

.trade-choice-grid em,
.trade-check-grid em,
.trade-steps em {
    color: #9fb3aa;
    font-size: 12px;
    font-style: normal;
}

.trade-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.trade-score {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    color: #cfe4d9;
    font-weight: 800;
}

.trade-score meter {
    width: min(240px, 50%);
}

.trade-steps {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.trade-steps li {
    display: grid;
    grid-template-columns: minmax(120px, .36fr) minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
    border: 1px solid rgba(139, 160, 150, .2);
    border-radius: 7px;
    background: rgba(255, 255, 255, .035);
}

.trade-steps span {
    color: #fff;
    font-weight: 850;
}

.trade-filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.trade-filter-row input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(139, 160, 150, .28);
    border-radius: 6px;
    background: #091612;
    color: #fff;
}

.trade-filter-buttons button,
.trade-tabs button,
[data-trade-copy-log] {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(139, 160, 150, .28);
    border-radius: 6px;
    background: rgba(255, 255, 255, .04);
    color: #cbd8d2;
    cursor: pointer;
}

.trade-count {
    flex: 0 0 auto;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 850;
}

.trade-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.trade-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.trade-table th,
.trade-table td {
    padding: 11px;
    border-bottom: 1px solid rgba(139, 160, 150, .18);
    text-align: left;
    vertical-align: top;
}

.trade-table th {
    color: #f0c85f;
    font-size: 12px;
    text-transform: uppercase;
}

.trade-table td {
    color: #d8e6df;
}

.trade-table td small {
    display: block;
    margin-top: 4px;
    color: #97aaa1;
}

.trade-table-wrap.compact .trade-table {
    min-width: 520px;
}

.trade-problem-note {
    min-height: 132px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid rgba(101, 168, 255, .22);
    border-radius: 8px;
    background: rgba(101, 168, 255, .08);
}

.trade-problem-note strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
}

.trade-log {
    overflow-x: auto;
    margin: 0;
    padding: 14px;
    border: 1px solid rgba(139, 160, 150, .22);
    border-radius: 8px;
    background: #08130f;
    color: #dce9e2;
    white-space: pre-wrap;
}

.trade-list {
    display: grid;
    gap: 8px;
    padding-left: 18px;
}

@media (max-width: 980px) {
    .trade-hero,
    .trade-answer,
    .trade-grid {
        grid-template-columns: 1fr;
    }

    .trade-choice-grid,
    .trade-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trade-status-card {
        min-height: 160px;
    }
}

@media (max-width: 680px) {
    .trade-hero,
    .trade-panel {
        padding: 14px;
    }

    .trade-hero-copy h2 {
        font-size: 30px;
    }

    .trade-choice-grid,
    .trade-check-grid,
    .trade-filter-row,
    .trade-steps li {
        grid-template-columns: 1fr;
    }

    .trade-choice-grid label,
    .trade-check-grid label {
        min-height: 0;
    }

    .trade-section-heading {
        flex-direction: column;
    }

    .trade-score {
        flex-direction: column;
        align-items: flex-start;
    }

    .trade-score meter {
        width: 100%;
    }
}
