/* Student sandbox (SPEC_student_sandbox.md). Leans on dashboard.css for the
   score-cell visuals; this file only lays out the builder and the map. */

.stu-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.stu-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stu-cat {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #FAFAFB;
}

.stu-cat__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stu-calc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.stu-calc__side {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------------- The map table ---------------- */

.stu-map-scroll {
    overflow-x: auto;
}

.stu-map {
    border-collapse: separate;
    border-spacing: 4px;
    margin-top: 8px;
    min-width: 560px;
}

.stu-map th {
    font-size: 12px;
    font-weight: 600;
    color: #4B5563;
    text-align: center;
    padding: 4px 6px;
}

.stu-map__company {
    font-size: 14px;
    color: #111827;
    border-bottom: 2px solid #E5E7EB;
}

.stu-map__cat {
    text-align: left !important;
    font-size: 14px;
    color: #111827;
    padding-right: 16px;
    white-space: nowrap;
}

.stu-map__cell {
    min-width: 104px;
    width: 104px;
    height: 58px;
    padding: 0;
}

/* Every score card is the SAME box. min-height was not enough: the 2025 cell
   carries a delta line, so its content grew past the minimum while 2024 stayed
   at it. A FIXED height makes both identical whatever is inside. */
.stu-map__cell .na-cell {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 58px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Linked EODHD variables: quieter rows under their category's score row, on
   the same company x year columns so the number sits under the signal. */
.stu-map__cat--var {
    font-size: 13px;
    color: #4B5563;
    font-weight: 400;
    padding-left: 14px;
}

.stu-map__cell--var {
    text-align: center;
    font-size: 13px;
    color: #374151;
    font-variant-numeric: tabular-nums;
    background: #F8FAFC;
    border-radius: 6px;
}

.stu-vars__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

/* ---------------- Evidence ---------------- */

.stu-evidence__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stu-evidence__item {
    margin-bottom: 14px;
}

.stu-evidence__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.stu-evidence__phrase {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.stu-evidence__quote {
    margin: 0;
    padding: 8px 12px;
    border-left: 3px solid #1E3A8A;
    background: #F8FAFC;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

/* ---------------- Metrics table ---------------- */

.stu-metrics {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.stu-metrics th {
    text-align: right;
    font-weight: 600;
    color: #4B5563;
    padding: 4px 8px;
    border-bottom: 1px solid #E5E7EB;
}

.stu-metrics td {
    text-align: right;
    padding: 6px 8px;
    border-bottom: 1px solid #F3F4F6;
    font-variant-numeric: tabular-nums;
}

.stu-metrics__label {
    text-align: left !important;
    color: #111827;
}

/* ---------------- FactSet-style company sheets ---------------- */

.stu-fact__row {
    display: flex;
    gap: 8px;
    margin-bottom: 3px;
    font-size: 13px;
    line-height: 1.35;
}

.stu-fact__label {
    min-width: 168px;
    color: #4B5563;
}

.stu-fact__value {
    color: #111827;
    font-variant-numeric: tabular-nums;
}

.stu-fact__group {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #1E3A8A;
    margin: 12px 0 6px;
}

/* ---------------- Price chart legend ---------------- */

.stu-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 6px;
    font-size: 13px;
    color: #374151;
}

.stu-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stu-legend__swatch {
    width: 12px;
    height: 3px;
    border-radius: 2px;
    display: inline-block;
}

.stu-legend__value {
    color: #898781;
    font-variant-numeric: tabular-nums;
}
