
 body {
            font-family: sans-serif;
            padding: 20px;
            background-color: #f5f5f5;
        }

        /* CHECKBOX CONTROLS WRAPPER */
#controls-container {
    display: block;

    margin-bottom: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;

    overflow-x: auto;
}

#language-columns {
  
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
  gap: 4px;
    justify-content: flex-start;
        margin-top: 12px; /* adjust this value as needed (6–12px range usually best) */
  }
        #controls-container strong {
            grid-column: 1 / -1;
            margin-bottom: 5px;
        }
        #controls-container label {
            cursor: pointer;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
        }
       #controls-footer {
    grid-column: 1 / -1;

    display: flex;
    flex-direction: column;

    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;

    border-top: 1px solid #e0e0e0;
}
.language-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.footer-nav-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.psalm-nav {
    display: flex;
    flex-wrap: nowrap;

    gap: 4px;

    overflow-x: auto;
    overflow-y: hidden;

    white-space: nowrap;

    padding-top: 8px;
    border-top: 1px solid #eee;

    scrollbar-width: thin; /* Firefox */
}

.psalm-nav a {
    flex: 0 0 auto;

    text-decoration: none;
    color: #333;

    font-size: 12px;
    padding: 4px 8px;

    border: 1px solid #ddd;
    border-radius: 3px;

    background: #fafafa;
}

.psalm-nav a:hover {
    background: #e8f0ff;
}
        /* NEW: VISUAL COLOR KEY EXPLANATION */
        .color-key-panel {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin-bottom: 20px;
            background: #fff;
            padding: 12px 15px;
            border-radius: 4px;
            border: 1px solid #e0e0e0;
            font-size: 14px;
        }
        .key-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: bold;
        }
        .key-badge {
            width: 16px;
            height: 16px;
            border-radius: 3px;
            display: inline-block;
        }
   
   #language-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    background: #fff;
    padding: 12px 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
}
           #language-controls label {
            cursor: pointer;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        

        /* TABLE HOUSING WITH SCROLL PROTECTION */
        .table-scroll-wrapper {
            width: 100%;
  height: 95vh;
    overflow: auto;
    border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        #grid-container {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 1200px;
            background-color: #f5f5f5;
        }
     
        .grid-row {
            display: grid;
            grid-template-columns: repeat(var(--visible-cols), minmax(130px, 1fr)); 
        }

        /* BASE HEADER ROW SYSTEM Styles */
      
        .grid-row.header-row {
          position: sticky;
    top: 0;
    z-index: 10000;
    color: #fff;
    font-weight: bold;
}
     
        .grid-row.header-row .grid-cell {
            color: #fff;
            border-right: 1px solid rgba(255,255,255,0.15);
        }
        
  

        /* ==========================================
           COLOR CLASS RULES (Matched in JavaScript)
           ========================================== */
        /* Group 1: Core Identifier (Dark Blue) */
        .LXX { background-color: #301934 !important; }
        /* Group 2: Personal Biometrics (dark purple) */
        .MT { background-color: #00008B  !important; }
        /* Group 3: Functional Corporate Role (dark yellow) */
        .PS { background-color: #8B8000 !important; }
        /* Group 4: Payroll & Locations (Dark Red) */
        .mix { background-color: #8B0000  !important; }
                /* Group 5: (dark orange) */
        .other { background-color: #FF8C00 !important; }
        /* Fallback Default Color if no mapping matches (Dark Gray) */
        .col-default { background-color: #333333; }

        .grid-row:not(.header-row):nth-child(even) {
            background-color: #fcfcfc;
        }

        .grid-cell {
            padding: 12px;
            color: #333;
            border-right: 1px solid #e0e0e0;
            font-size: 16px;
            text-align: center;
            unicode-bidi: isolate;
            background-color: #ffffff;
                        border: 1px solid #e0e0e0;
}            


        .grid-cell:last-child {
            border-right: none;
        }

        .hide-col {
            display: none !important;
        }
        .first-col {
    position: sticky;
    left: 0;
    z-index: 5000;
    background: #fff; /* important so text doesn't overlap visually */
    border-right: 2px solid #ccc;
}

/* keep header row first column above everything */
.header-row .first-col {
    z-index: 10001;
    background: #333; /* matches header styling */
    color: #fff;
}

.psalm-nav a.deutero-psalm {
    background: #f6e7c1;
    color: #7a4d00;
}

.psalm-nav a.deutero-psalm:hover {
    background: #e8d29d;
}

.psalm-nav a.current-psalm {
    background: #1a73e8 !important;
    color: white !important;
}

.psalm-nav a.missing-psalm {
    background: #ddd;
    color: #888;
    pointer-events: none;
    cursor: default;
}

.psalm-nav a.missing-psalm:hover {
    background: #ccc;
}

@font-face{
  font-family: "Siloam";
  src: url("/fonts/SILOAM.TTF") format("truetype");
  font-weight: lighter;
  font-style: normal;
}
.paleo-hebrew{
  font-family: "Siloam";
   font-size: 19px;
        unicode-bidi: isolate;
}

.hebrew{
 font-size: 19px;
}

sup .hebrew{
  font-size: 14px;
  vertical-align: super;
}


.language-heading {
    font-size: 16px;
    font-weight: bold;
}


#psalm-index {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.text-type .psalm-nav,
#psalm-index {
    flex-wrap: wrap;
    overflow-x: visible;
    white-space: normal;
}

.editorial {
    color: #888;
}

sup {
  font-size: 9px
}

.language-heading {

    margin-bottom: 4px;
}

.language-heading label {

    display: flex;
    align-items: center;
    gap: 6px;

    font-size: 15px;
    font-weight: 700;
}



.language-section {
    display: flex;
    flex-direction: column;
  width: auto;
    min-width: 210px;
    padding: 6px 10px;
    margin: 0;
    background: #fafafa;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
}
.language-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.language-list label {
 display: flex;
    min-height: 22px;
    
    break-inside:avoid;
    margin-bottom:4px;
    align-items: center;

    gap: 6px;

    line-height: 1.25;

    font-size: 13px;
    font-weight: 400;
}

#controls-container > .language-section {
    height: fit-content;
}

.toggle-all-wrapper {
    display: block;
    margin: 12px auto;
    margin-bottom: 5px
}