:root {
    --red:        #971a1a;
    --red-light:  #FFEBEE;
    --text:       #1a1a1a;
    --muted:      #6b6b6b;
    --border:     #e0e0e0;
    --bg:         #fafafa;
    --white:      #ffffff;
    --radius:     8px;
}


/* ── WRAPPER ── */
#site-header {
    position: relative;
    width: 100%;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

#site-nav {
width: 100%;
padding: 8px 24px;
border-bottom: 0.5px solid var(--border);
}

#catalog-btn {
display: inline-block;
background: #f5f5f5;
color: var(--muted);
font-size: 0.82rem;
padding: 6px 16px;
border-radius: 4px;
text-decoration: none;
font-family: 'Outfit', sans-serif;
}

#catalog-btn:hover {
color: var(--red);
}

#chromato-wrapper {
    font-family: 'Outfit', sans-serif;
    width: 95%;
    max-width: 1600px;
    margin: 40px auto;
    padding: 0 24px;
    color: var(--text);
    box-sizing: border-box;
}
/* ── HEADER ── */
#chromato-header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--red);
    margin-bottom: 24px;
    margin-top: 40px;
    text-align: center;
}

.header-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
    width: 100%;
    align-items: stretch;
}
.tool-description {
    background: #f5f5f5;
    border: none;
    border-radius: var(--radius);
    padding: 16px 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 130px;
    justify-content: space-between;
}
.nav-links a {
    display: block;
    padding: 4px 0;
    background-color: var(--white);
    border: none;
    border-radius: 0;
    text-decoration: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    transition: border-color 0.2s, color 0.2s;
    border-bottom: 0.5px solid var(--border);
}
.nav-links a:hover {
    border-color: var(--red);
    color: var(--red);
}

.nav-links a:last-child {
    border-bottom: none;
}

/* ── DIVIDER ── */
.divider {
    height: 1px;
    background: var(--border);
    margin: 28px 0;
}

/* ── FILE UPLOAD GRID ── */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "file1 file2";
    gap: 16px;
    margin-bottom: 20px;
    width: 100%;
}


.upload-card {
    border: 0.5px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    padding: 16px 12px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-card:hover {
    border-color: var(--red);
}
.upload-card h3 {
    font-size: 9px;
    font-weight: 500;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 10px;
}
.upload-card input[type="file"] {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    color: var(--muted);
    cursor: pointer;
    width: 100%;
}
.spinner-wrap {
    text-align: center;
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--muted);
}

/* VCF download/delete buttons inside upload card */
.vcf-download-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.btn-vcf {
    flex: 1;
    padding: 6px 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.btn-vcf:hover {
    border-color: var(--red);
    color: var(--red);
}
.btn-delete:hover {
    border-color: #680a0a;
    color: #911616;
}

/* ── meta text summary (4 lines) inside upload card ── */
.upload-meta {
    font-size: 0.85rem;
    color: #911616;
    line-height: 1.6;
    margin-top: 10px;
    text-align: center;
}

/* ── SETTINGS ── */
details#settings {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    width: 96%;
}

details#settings summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--muted);
    list-style: none;
    user-select: none;
}
details#settings summary::-webkit-details-marker { display: none; }
details#settings summary::before { content: '⚙  '; }
details#settings[open] summary::before { content: '⚙  '; }

/* ── RESULTS ── */
.results-section { margin-top: 8px; }

.results-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; 
  gap: 16px;
  margin-bottom: 20px;
}

.results-btn {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.results-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

/* Color legend toggle */
.color-legend-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--muted);
}
.hidden { display: none; }

.legend-item {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 8px;
font-size: 0.9rem;
color: var(--text);
}
.legend-dot {
width: 12px;
height: 12px;
border-radius: 3px;
flex-shrink: 0;
}

/* ── IDEOGRAM ── */
#ideogram_svg {
    width: 100%;
    padding: 4px 0;
    overflow-x: auto;
    user-select: none;
}

#ideogram_svg table td {
    overflow: visible;
    position: relative;
}


/* ── MISC NOTICE ── */
.chromato-notice {
    text-align: center;
    color: var(--red);
    font-size: 0.9rem;
    padding: 12px;
}

/* ── no table immediatly ── */
#segment_stats {
    display: none
}
