/* ==========================
Helper Text
============================= */
.input-instruction {
    font-size: 0.95rem;
    color: var(--color-text-subtle);
    margin-bottom: 40px;
    margin-top: 0px;
}
.disclaimer-mini {
    font-size: 0.95rem;
    color: var(--color-text-subtle);
    margin-bottom: 15px;
    margin-top: 25px;
}
 
/* ==========================
Article Link
============================= */
.article-link-box {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}
 
.article-link-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
 
.article-link-text {
    font-size: 0.95rem;
    color: var(--color-text-subtle);
}
 
.article-link-btn {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--color-teal-light);
    border: 1px solid var(--color-teal-border);
    border-radius: 12px;
    max-width: 320px;
    margin: 0;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-link-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    color: inherit;
}
 
/* ==========================
Button Bar
============================= */
.button-bar {
    display: flex;
    gap: 12px;
}
 
/* ==========================
Form Group
============================= */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 20px;
    margin-bottom: 15px;
}
 
/* ==========================
jSpreadsheet Table
============================= */
.jexcel_container {
    overflow: hidden;
    width: fit-content;
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--color-teal-border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
 
.jexcel_content {
    overflow: auto !important;
    border-radius: 0;
}
 
.jexcel {
    font-family: 'Inter', system-ui, Arial, sans-serif;
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}
 
/* ==========================
jSpreadsheet Header
============================= */
/* Table headers stay brand navy — strongest contrast anchor on the page */
.jexcel thead td {
    background: var(--color-brand) !important;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    padding: 10px 12px;
    height: auto;
    border-bottom: 2px solid rgba(255,255,255,0.15);
    border-right: 1px solid rgba(255,255,255,0.1);
    white-space: normal;
    word-break: break-word;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
 
/* ==========================
jSpreadsheet Body Cells
============================= */
.jexcel tbody td {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-teal-border);
    border-right: 1px solid var(--color-teal-light);
    padding: 9px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text);
    transition: background-color 0.1s ease;
}
 
/* alternating rows — teal tint */
.jexcel tbody tr:nth-child(even) td {
    background-color: var(--color-teal-light);
}
 
/* hover highlight */
.jexcel tbody tr:hover td {
    background-color: var(--color-teal-mid);
}
 
/* selected cell */
.jexcel td.selected {
    outline: 2px solid var(--color-teal-dark);
    outline-offset: -2px;
    background-color: var(--color-teal-mid) !important;
}
 
.jexcel td:focus {
    outline: none;
}
 
.jexcel td {
    min-width: 90px;
}
 
/* ==========================
jSpreadsheet Row Number Column
============================= */
.jexcel tbody tr td:first-child {
    background-color: var(--color-teal-light);
    color: var(--color-text-subtle);
    font-size: 11px;
    border-right: 1px solid var(--color-teal-border);
}
 
/* ==========================
jSpreadsheet Tablet
============================= */
@media (max-width: 1024px) {
 
    .jexcel thead td {
        padding: 8px;
        font-size: 0.75rem;
    }
 
    .jexcel tbody td {
        padding: 8px;
        font-size: 12px;
    }
 
    .jexcel td {
        min-width: 70px;
    }
}
 
/* ==========================
jSpreadsheet Mobile
============================= */
@media (max-width: 600px) {
 
    .jexcel thead td {
        padding: 6px;
        font-size: 0.7rem;
    }
 
    .jexcel tbody td {
        padding: 6px 8px;
        font-size: 11px;
    }
 
    .jexcel td {
        min-width: 60px;
    }
}

/* ==========================
Legend Box
============================= */
.legend-box {
    width: 100%;
    background-color: var(--color-white);
    border: 1px solid var(--color-teal-border);
    border-radius: 6px;
    padding: 18px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-top: 20px;
}
 
.legend-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 1px solid var(--color-teal-mid);
    padding-bottom: 6px;
}
 
.legend-list {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
}
 
.legend-column {
    flex: 1 1 auto;
    min-width: 200px;
}
 
.legend-row {
    display: flex;
    gap: 6px;
    align-items: baseline;
    margin-bottom: 10px;
    margin-top: 10px;
}
 
.legend-row:first-of-type {
    margin-top: 5px;
}
 
.legend-row dt {
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    min-width: 80px;
    flex-shrink: 0;
}
 
.legend-row dd {
    margin: 0;
    color: var(--color-text-subtle);
}
 
.legend-group-title {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: underline;
}
 
.legend-group-title.blue-group {
    color: var(--color-accent);
}
 
/* ==========================
References
============================= */
.references {
    background-color: var(--color-teal-light);
    border: 1px solid var(--color-teal-border);
    border-radius: 10px;
    padding: 16px 18px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
 
.references h3 {
    margin-top: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 10px;
}
 
.references ul {
    padding-left: 20px;
    margin: 0;
}
 
.references li {
    margin-bottom: 6px;
}

/* ==========================
Modal
============================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
 
.modal-content {
    background: var(--color-white);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--color-teal-border);
}
 
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}