/* Explain: Styles for UI components, including result colors and responsive table layout. */
.ledger-shell {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    box-shadow: var(--shadow-crisp);
}

.executive-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.executive-kicker::before {
    content: '';
    width: 1.6rem;
    height: 2px;
    border-radius: 999px;
    background: var(--primary-color);
}

.day-card {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    box-shadow: var(--shadow-crisp);
    transition: box-shadow 200ms ease, transform 200ms ease;
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.result-profit {
    color: var(--growth-green);
}

.result-loss {
    color: var(--loss-color);
}

.result-neutral {
    color: #5B6475;
}

.newsletter-panel {
    border: 1px solid var(--border-color);
    background:
        linear-gradient(135deg, rgba(18, 183, 106, 0.06), transparent 45%),
        var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.article-prose {
    color: var(--text-color);
    font-size: 1.125rem;
    line-height: 1.85;
}

.article-prose h2 {
    margin-top: 2.5rem;
    margin-bottom: 0.9rem;
    color: var(--text-color);
    font-size: clamp(1.5rem, 4vw, 1.9rem);
    line-height: 1.2;
}

.article-prose h3 {
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
    color: var(--text-color);
    font-size: 1.3rem;
}

.article-prose p {
    margin: 1rem 0;
}

.article-prose ul {
    margin: 1rem 0;
    padding-left: 1.35rem;
    list-style: disc;
}

.article-prose li {
    margin: 0.5rem 0;
}

.article-prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin: 1.25rem 0;
}

.article-prose th,
.article-prose td {
    border: 1px solid var(--border-color);
    padding: 0.65rem 0.85rem;
    text-align: left;
    white-space: nowrap;
}

.article-prose th {
    background: var(--surface-muted);
    font-weight: 700;
}

.comment-card {
    border: 1px solid var(--border-color);
    background: var(--surface-muted);
}

.article-prose td.net-pos {
    color: var(--growth-green);
    font-weight: 700;
}

.article-prose td.net-neg {
    color: var(--loss-color);
    font-weight: 700;
}

@media (max-width: 699px) {
    .article-prose table {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        border: none !important;
        background: transparent !important;
        overflow: visible !important;
        margin: 1.5rem 0 !important;
    }
    
    .article-prose thead,
    .article-prose tr:first-child:has(th) {
        display: none !important;
    }
    
    .article-prose tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
    }
    
    .article-prose tr {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem 0.75rem !important;
        padding: 1rem !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-card) !important;
        background: var(--surface-color) !important;
        box-shadow: var(--shadow-crisp) !important;
        border-left-width: 4px !important;
    }
    
    .article-prose tr.is-win { border-left-color: var(--growth-green) !important; }
    .article-prose tr.is-loss { border-left-color: var(--loss-color) !important; }

    .article-prose td {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        border: none !important;
        padding: 0 !important;
        white-space: normal !important;
        width: calc(50% - 0.5rem) !important;
    }
    
    .article-prose td:nth-child(1),
    .article-prose td:nth-child(2) {
        width: 100% !important;
    }
    
    .article-prose td:nth-child(1) {
        font-size: 0.8rem !important;
        color: var(--text-muted) !important;
        font-weight: 700 !important;
    }
    
    .article-prose td:nth-child(2) {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.5rem !important;
        color: var(--text-color) !important;
    }
    
    .article-prose td:nth-child(1)::before,
    .article-prose td:nth-child(2)::before {
        display: none !important;
    }
    
    .article-prose td::before {
        content: attr(data-label);
        font-size: 0.65rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        color: var(--text-muted) !important;
        margin-bottom: 0.15rem !important;
        font-weight: 700 !important;
    }
    
    .article-prose td.net-col {
        width: 100% !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: 0.5rem !important;
        padding-top: 0.75rem !important;
        border-top: 1px dashed var(--border-color) !important;
        text-align: right !important;
    }
    
    .article-prose td.net-col::before {
        margin-bottom: 0 !important;
    }
    
    .article-prose td.net-pos,
    .article-prose td.net-neg {
        font-size: 1.35rem !important;
        font-family: var(--font-heading) !important;
    }
}