div#primer {
    display: flex;
    justify-content: space-between;
}

body {
    margin: 4em;
    margin-top: 0.5em;
    margin-bottom: 2em;
}

p {
    word-wrap: break-word;
}

.output-th {
    font-size: 1.3em;
    padding: 0.3em 0.8em;
    background-color: color(srgb 0.5338 0.7473 0.785);
    color: white;
    font-weight: 500;
}

#primer_results_table {
    width: 100%;
}

.amplicon-cell {
    font-weight: 500;
}

.amplicon-cell--ok-single {
    color: green;
}

.amplicon-cell--ok-multi {
    color: #c41e3a;
}

.amplicon-cell--empty {
    color: #444;
}

.amplicon-cell--na {
    color: #666;
    font-style: italic;
}

.amplicon-cell--error {
    color: #b45309;
}

.amplicon-cell--unknown {
    color: #555;
}

.amplicon-error-label {
    cursor: help;
    border-bottom: 1px dotted currentColor;
}

.amplicon-not-selected {
    cursor: help;
    border-bottom: 1px dotted currentColor;
}

.amplicon-count-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

/* Inline action buttons in results tables (amplicon + SNP) */
.inline-detail-btn {
    font-family: var(--font-main);
    font-size: 0.85em;
    padding: 0.35em 0.85em;
    cursor: pointer;
    border-radius: var(--radius-pill);
    font-weight: 600;
    line-height: 1.25;
    box-shadow: var(--shadow-light);
    transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.inline-detail-btn:hover {
    transform: scale(1.03);
    filter: brightness(0.97);
}

.inline-detail-btn:focus-visible {
    outline: 2px solid color(srgb 0.35 0.55 0.58);
    outline-offset: 2px;
}

.inline-detail-btn--teal {
    border: 1px solid color(srgb 0.35 0.55 0.58);
    background: linear-gradient(180deg, var(--color-bg-light) 0%, var(--color-bg-medium) 100%);
    color: color(srgb 0.12 0.38 0.44);
}

.inline-detail-btn--teal:hover {
    background: linear-gradient(180deg, #eefcff 0%, #b8e4ec 100%);
}

.inline-detail-btn--amber {
    border: 1px solid color(srgb 0.82 0.58 0.12);
    background: linear-gradient(180deg, #fff9eb 0%, #ffe9a8 100%);
    color: color(srgb 0.42 0.28 0.04);
}

.inline-detail-btn--amber:hover {
    background: linear-gradient(180deg, #fff4d6 0%, #ffdc7a 100%);
}

.amplicon-details-btn {
    font-family: var(--font-main);
    font-size: 0.85em;
    padding: 0.35em 0.85em;
    cursor: pointer;
    border-radius: var(--radius-pill);
    font-weight: 600;
    line-height: 1.25;
    box-shadow: var(--shadow-light);
    transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
    border: 1px solid color(srgb 0.35 0.55 0.58);
    background: linear-gradient(180deg, var(--color-bg-light) 0%, var(--color-bg-medium) 100%);
    color: color(srgb 0.12 0.38 0.44);
}

.amplicon-details-btn:hover {
    transform: scale(1.03);
    background: linear-gradient(180deg, #eefcff 0%, #b8e4ec 100%);
}

.snp-banner {
    margin: 0.75em 0.5em 1em;
    padding: 0.75em 1em;
    border-radius: var(--radius-md);
    background: color(srgb 0.94 0.97 0.98);
    border: 1px solid color(srgb 0.55 0.72 0.78);
    font-size: 1.05em;
    line-height: 1.45;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65em 0.75em;
}

.snp-banner__message {
    flex: 1 1 12em;
}

.snp-banner--active {
    background: linear-gradient(180deg, color(srgb 1 0.96 0.86) 0%, color(srgb 1 0.91 0.68) 100%);
    border: 1px solid color(srgb 0.9 0.65 0.2);
    color: color(srgb 0.48 0.3 0.04);
    box-shadow: var(--shadow-light);
}

.snp-banner--warn {
    background: lightsalmon;
    border-color: color(srgb 0.82 0.42 0.08 / 0.55);
    color: color(srgb 0.26 0.11 0.03);
}

.vcf-banner--active {
    background: linear-gradient(180deg, color(srgb 0.93 0.98 0.99) 0%, color(srgb 0.82 0.94 0.96) 100%);
    border: 1px solid color(srgb 0.35 0.62 0.68);
    color: color(srgb 0.12 0.35 0.4);
}

.vcf-modal-lead {
    margin: 0 0 0.75em;
    font-size: 0.95em;
    line-height: 1.4;
}

.vcf-legend-sample {
    display: inline-block;
    padding: 0.05em 0.35em;
    border-radius: 0.2em;
    background-color: color(srgb 0.88 0.82 0.98);
    box-shadow: inset 0 0 0 1px color(srgb 0.55 0.42 0.78 / 0.55);
}

.snp-legend-sample {
    display: inline-block;
    padding: 0.05em 0.35em;
    border-radius: 0.2em;
    background: color(srgb 1 0.9 0.55);
    box-shadow: inset 0 0 0 1px color(srgb 0.92 0.68 0.18 / 0.55);
    font-weight: 600;
    color: color(srgb 0.48 0.3 0.04);
}

.snp-cell {
    font-weight: 500;
}

.snp-cell--none {
    color: #2d6a4f;
}

.snp-cell--caution {
    color: #b45309;
}

.snp-cell--conflict {
    color: #b91c1c;
    font-weight: 700;
}

.snp-cell--na,
.snp-cell--skipped {
    color: #666;
    font-style: italic;
}

.snp-cell--error {
    color: #b45309;
}

.snp-details-btn {
    font-family: var(--font-main);
    font-size: 0.85em;
    padding: 0.35em 0.85em;
    cursor: pointer;
    border-radius: var(--radius-pill);
    font-weight: 600;
    line-height: 1.25;
    box-shadow: var(--shadow-light);
    transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
    border: 1px solid color(srgb 0.82 0.58 0.12);
    background: linear-gradient(180deg, #fff9eb 0%, #ffe9a8 100%);
    color: color(srgb 0.42 0.28 0.04);
}

.snp-details-btn:hover {
    transform: scale(1.03);
    background: linear-gradient(180deg, #fff4d6 0%, #ffdc7a 100%);
}

.amplicon-dialog {
    border: none;
    border-radius: 8px;
    padding: 0;
    max-width: min(96vw, 1200px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.amplicon-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.amplicon-dialog-panel {
    position: relative;
    padding: 1.25em 1.5em 1em;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.amplicon-dialog-x {
    position: absolute;
    top: 0.35em;
    right: 0.45em;
    border: none;
    background: transparent;
    font-size: 1.6em;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 0 0.2em;
}

.amplicon-dialog-x:hover {
    color: #111;
}

.amplicon-dialog-title {
    margin: 0 2em 0.75em 0;
    font-size: 1.25em;
    font-weight: 600;
    color: color(srgb 0.2 0.45 0.5);
}

.amplicon-reference-note {
    margin: 0 2em 1em 0;
    font-size: 0.95em;
    line-height: 1.45;
    color: #444;
    max-width: 55em;
    text-align: left;
}

/* Clearance so fixed Documentation / UI-size controls do not cover results */
.silico-pcr-results {
    padding-bottom: 5.5em;
}

.amplicon-dialog-scroll {
    overflow: auto;
    max-height: min(70vh, 560px);
    margin-bottom: 1em;
    border: 1px solid #c5dce0;
    border-radius: 6px;
}

.amplicon-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82em;
}

.amplicon-detail-table th,
.amplicon-detail-table td {
    border: 1px solid #c5dce0;
    padding: 0.35em 0.5em;
    text-align: left;
    vertical-align: top;
}

.amplicon-detail-table thead th {
    background: color(srgb 0.5338 0.7473 0.785);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.amplicon-summary-cell {
    max-width: 14em;
    white-space: normal;
    word-break: break-word;
}

.amplicon-chrom-cell {
    max-width: 12em;
    word-break: break-all;
}

.amplicon-seq-cell {
    max-width: 10em;
    word-break: break-all;
    font-family: ui-monospace, monospace;
    font-size: 0.95em;
}

.amplicon-dialog-actions {
    display: flex;
    justify-content: flex-end;
}

.amplicon-dialog-close-btn {
    font-family: var(--font-main);
    padding: 0.45em 1.35em;
    cursor: pointer;
    border-radius: var(--radius-pill);
    border: 1px solid color(srgb 0.35 0.55 0.58);
    background: linear-gradient(
        180deg,
        color(srgb 0.58 0.78 0.82) 0%,
        color(srgb 0.48 0.7 0.76) 100%
    );
    color: white;
    font-weight: 600;
    font-size: 0.95em;
    box-shadow: var(--shadow-light);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.amplicon-dialog-close-btn:hover {
    transform: scale(1.03);
    filter: brightness(1.05);
}
