:root {
    --marker-ink: #1b2b31;
    --marker-muted: #66777c;
    --marker-paper: #eef3f1;
    --marker-panel: #ffffff;
    --marker-line: #d4ded9;
    --marker-green: #2f6b3b;
    --marker-green-dark: #214e2c;
    --marker-green-soft: #deebdf;
    --marker-orange: #dc7b2b;
    --marker-orange-soft: #f9e2d1;
    --marker-navy: #263f4a;
    --marker-shadow: 0 16px 42px rgba(30, 60, 47, 0.09);
}

.markers-page {
    min-height: 75vh;
    color: var(--marker-ink);
    background:
        repeating-linear-gradient(0deg, rgba(42, 75, 59, 0.022) 0, rgba(42, 75, 59, 0.022) 1px, transparent 1px, transparent 29px),
        var(--marker-paper);
    font-family: "Segoe UI", Arial, sans-serif;
    font-variant-numeric: tabular-nums lining-nums;
}

.markers-page-width {
    width: min(1480px, calc(100% - 48px));
    margin: 0 auto;
}

.markers-hero {
    position: relative;
    overflow: hidden;
    color: #f7fbf7;
    background: linear-gradient(112deg, #1d3728 0%, #2b5936 58%, #356f42 100%);
}

.markers-hero::after {
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: 48%;
    opacity: 0.15;
    background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(255,255,255,.5) 22px 23px, transparent 23px 52px);
    transform: skewX(-13deg) translateX(55px);
}

.markers-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr minmax(430px, 0.72fr);
    gap: 80px;
    align-items: center;
    min-height: 245px;
    padding: 43px 0 46px;
}

.markers-kicker,
.markers-section-label {
    margin: 0 0 8px;
    color: #a7d8ae;
    font-family: "Arial Narrow", "Segoe UI", sans-serif;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.19em;
}

.markers-hero h2 {
    margin: 0;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.1rem, 6vw, 5.4rem);
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: -0.052em;
}

.markers-deck {
    max-width: 650px;
    margin: 18px 0 0;
    color: #d2e2d5;
    font-size: 1.03rem;
    line-height: 1.65;
}

.markers-reference {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 23px 27px;
    border: 1px solid rgba(226, 242, 228, 0.2);
    border-left: 3px solid #e8a25e;
    background: rgba(13, 39, 23, 0.38);
    box-shadow: 0 18px 46px rgba(8, 29, 16, 0.16);
}

.markers-reference > span { color: #9eb9a3; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.markers-reference strong { color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; font-weight: 400; }
.markers-reference b { color: #cbdccd; font-size: 0.78rem; font-weight: 500; }
.markers-reference a { margin-top: 5px; color: #f2bd87; font-size: 0.74rem; text-decoration: none; }
.markers-reference a:hover { color: #ffdbb6; text-decoration: underline; }
.markers-reference i { margin-left: 5px; font-size: 0.63rem; }

.markers-content { padding: 28px 0 64px; }
.markers-loading { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 350px; color: var(--marker-muted); }
.markers-loading > span { width: 20px; height: 20px; border: 2px solid #bbcfc0; border-top-color: var(--marker-green); border-radius: 50%; animation: marker-spin .75s linear infinite; }
@keyframes marker-spin { to { transform: rotate(360deg); } }

.markers-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 22px;
    border: 1px solid var(--marker-line);
    background: var(--marker-panel);
    box-shadow: var(--marker-shadow);
}

.markers-summary > div { position: relative; padding: 16px 21px; border-right: 1px solid var(--marker-line); }
.markers-summary > div:last-child { border-right: 0; }
.markers-summary > div::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--marker-green), transparent); }
.markers-summary span { display: block; color: var(--marker-muted); font-size: 0.67rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
.markers-summary strong { display: block; margin-top: 3px; color: var(--marker-green-dark); font-size: 1.4rem; font-weight: 750; }

.markers-workspace { display: grid; grid-template-columns: minmax(310px, 370px) minmax(0, 1fr); gap: 22px; align-items: stretch; }
.markers-selector-card, .markers-map-card, .markers-results-card { border: 1px solid var(--marker-line); background: var(--marker-panel); box-shadow: var(--marker-shadow); }
.markers-selector-card { padding: 25px 25px 22px; }
.markers-selector-card header h3, .markers-map-head h3, .markers-results-head h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.43rem; font-weight: 400; letter-spacing: -0.016em; }
.markers-section-label { color: var(--marker-green); }
.markers-selector-card header > p:last-child, .markers-map-head p:last-child, .markers-results-head p:last-child { margin: 7px 0 0; color: var(--marker-muted); font-size: 0.75rem; line-height: 1.5; }

.markers-chr-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.markers-chr-heading > span { color: #455a50; font-size: 0.72rem; font-weight: 750; }
.markers-chr-heading button { padding: 0; color: var(--marker-green); border: 0; border-bottom: 1px dotted currentColor; background: transparent; font-size: 0.66rem; font-weight: 700; }
.markers-chr-heading button + button { margin-left: 11px; }

.markers-chromosome-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 9px; }
.markers-chromosome-option { position: relative; margin: 0; }
.markers-chromosome-option input { position: absolute; opacity: 0; }
.markers-chromosome-option span { display: block; padding: 7px 3px 6px; color: #62736a; border: 1px solid #cedbd3; border-radius: 3px; background: #fafcfb; font-size: 0.68rem; font-weight: 750; text-align: center; cursor: pointer; }
.markers-chromosome-option small { display: block; margin-top: 1px; color: #8a9991; font-size: 0.54rem; font-weight: 600; }
.markers-chromosome-option input:checked + span { color: #fff; border-color: var(--marker-green); background: var(--marker-green); }
.markers-chromosome-option input:checked + span small { color: #d8eadb; }
.markers-chromosome-option input:focus-visible + span { outline: 3px solid rgba(220, 123, 43, .35); outline-offset: 2px; }

.markers-pool-size { margin: 9px 0 0; color: #73837b; font-size: 0.67rem; text-align: right; }
#markers-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--marker-line); }
.markers-field label { display: block; margin: 0 0 6px; color: #465b51; font-size: 0.72rem; font-weight: 750; }
.markers-field input { width: 100%; height: 42px; padding: 0 11px; color: var(--marker-ink); border: 1px solid #c5d4cb; border-radius: 3px; outline: none; background: #fbfdfc; font: inherit; font-size: 0.86rem; }
.markers-field input:focus { border-color: var(--marker-green); box-shadow: 0 0 0 3px rgba(47,107,59,.12); }
.markers-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 7px; }
.markers-presets button { padding: 5px; color: #62736a; border: 1px solid #d2ddd6; border-radius: 3px; background: #fff; font-size: 0.65rem; }
.markers-presets button:hover { color: var(--marker-green-dark); border-color: #9ab5a1; background: #f3f8f4; }

.markers-generate {
    width: 100%;
    height: 46px;
    margin-top: 17px;
    color: #fff;
    border: 0;
    border-radius: 3px;
    background: var(--marker-green-dark);
    box-shadow: 0 8px 18px rgba(33, 78, 44, .2);
    font-size: 0.81rem;
    font-weight: 750;
    transition: background .14s, transform .14s;
}
.markers-generate:hover { background: var(--marker-green); transform: translateY(-1px); }
.markers-generate:disabled { opacity: .68; cursor: wait; transform: none; }
.markers-generate i { margin-right: 7px; }
.markers-generate:focus-visible, .markers-results-actions button:focus-visible, .markers-pagination button:focus-visible { outline: 3px solid rgba(220,123,43,.38); outline-offset: 2px; }
.markers-error { margin-top: 12px; padding: 10px 11px; color: #843a31; border-left: 3px solid #b75848; background: #fff0ed; font-size: 0.72rem; line-height: 1.45; }

.markers-method-note { display: flex; gap: 10px; margin-top: 19px; padding: 12px; color: #5f7167; background: #f0f6f1; }
.markers-method-note > i { flex: 0 0 auto; margin-top: 2px; color: var(--marker-green); }
.markers-method-note p { margin: 0; font-size: 0.66rem; line-height: 1.5; }
.markers-method-note strong { color: #334b3d; }

.markers-map-card { overflow: hidden; }
.markers-map-head, .markers-results-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 24px 27px 18px; border-bottom: 1px solid var(--marker-line); }
.markers-map-legend { display: flex; gap: 13px; color: var(--marker-muted); font-size: 0.68rem; white-space: nowrap; }
.markers-map-legend span { display: flex; align-items: center; gap: 5px; }
.markers-map-legend i { display: inline-block; width: 16px; height: 3px; }
.markers-map-legend .all-marker { background: var(--marker-green); }
.markers-map-legend .selected-marker { background: var(--marker-orange); }
.markers-map-scroll { overflow-x: auto; padding: 12px 20px 3px; background: #fbfcfb; }
.markers-map { display: block; width: 100%; min-width: 810px; height: 565px; }
.markers-map .axis-line { stroke: #53645c; stroke-width: 1.2; }
.markers-map .axis-tick { stroke: #83918a; stroke-width: 1; }
.markers-map .axis-label, .markers-map .chromosome-label { fill: #53645c; font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; font-weight: 650; }
.markers-map .axis-title { fill: #6c7b74; font-family: "Segoe UI", Arial, sans-serif; font-size: 12px; font-weight: 700; }
.markers-map .chromosome-body { fill: #eef1ef; stroke: #9eaaa3; stroke-width: 1; cursor: pointer; }
.markers-map .chromosome-body:hover { fill: #e2e9e4; stroke: var(--marker-green); stroke-width: 2; }
.markers-map .core-tick { stroke: var(--marker-green); stroke-width: 1.1; opacity: .82; pointer-events: none; }
.markers-map .selected-tick { stroke: var(--marker-orange); stroke-width: 3; opacity: .98; pointer-events: none; }
.markers-map .selected-halo { stroke: #fff; stroke-width: 5; opacity: .8; pointer-events: none; }
.markers-map .chromosome-selected { fill: #f5faf6; stroke: var(--marker-green); stroke-width: 2; }
.markers-map-footer { display: flex; justify-content: space-between; gap: 20px; padding: 10px 27px 14px; color: #718078; border-top: 1px solid var(--marker-line); background: #f8faf9; font-size: 0.65rem; }

.markers-results-card { margin-top: 22px; overflow: hidden; }
.markers-results-actions { display: flex; gap: 8px; }
.markers-results-actions button { padding: 8px 11px; color: var(--marker-green-dark); border: 1px solid #b8cabd; border-radius: 3px; background: #fff; font-size: 0.7rem; font-weight: 750; }
.markers-results-actions button:hover:not(:disabled) { border-color: var(--marker-green); background: #f2f8f3; }
.markers-results-actions button:disabled { color: #a3afa7; cursor: not-allowed; background: #f4f6f5; }
.markers-results-actions i { margin-right: 5px; }

.markers-selected-summary { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 27px; border-bottom: 1px solid var(--marker-line); background: #f7faf8; }
.markers-selected-summary span { padding: 4px 7px; color: #4f6558; border: 1px solid #d2dfd5; border-radius: 2px; background: #fff; font-size: 0.64rem; }
.markers-selected-summary strong { color: var(--marker-green-dark); }

.markers-empty { min-height: 300px; padding: 65px 20px; text-align: center; }
.markers-empty > i { color: #88a18f; font-size: 2rem; }
.markers-empty h4 { margin: 15px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.28rem; font-weight: 400; }
.markers-empty p { margin: 7px 0 0; color: var(--marker-muted); font-size: 0.76rem; }

.markers-table-wrap { overflow-x: auto; }
.markers-table { width: 100%; border-collapse: collapse; font-size: 0.73rem; }
.markers-table th { padding: 11px 10px; color: #5a6c62; border-bottom: 1px solid #cbd8cf; background: #f1f6f2; font-size: 0.62rem; font-weight: 800; letter-spacing: .035em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.markers-table th:first-child, .markers-table td:first-child { padding-left: 26px; }
.markers-table td { padding: 10px; color: #3e5147; border-bottom: 1px solid #e2e9e4; vertical-align: middle; white-space: nowrap; }
.markers-table tbody tr:hover { background: #f7faf8; }
.markers-index { color: #8a9890; font-weight: 700; }
.markers-marker-id { color: var(--marker-green-dark); font-family: "SFMono-Regular", Consolas, monospace; font-weight: 750; }
.markers-position { color: #3c5547; font-family: "SFMono-Regular", Consolas, monospace; }
.markers-primer-name { display: block; max-width: 270px; overflow: hidden; color: #77867e; font-size: .58rem; text-overflow: ellipsis; }
.markers-primer-sequence { display: block; margin-top: 2px; color: #273f33; font-family: "SFMono-Regular", Consolas, monospace; font-size: .68rem; letter-spacing: .025em; }
.markers-copy { display: grid; place-items: center; width: 28px; height: 28px; color: #718078; border: 1px solid #d0dcd3; border-radius: 3px; background: #fff; }
.markers-copy:hover { color: var(--marker-green); border-color: #9bb3a1; }

.markers-pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; padding: 13px 26px; color: var(--marker-muted); border-top: 1px solid var(--marker-line); background: #f8faf9; font-size: 0.68rem; }
.markers-pagination > div { display: flex; align-items: center; gap: 10px; }
.markers-pagination button { display: grid; place-items: center; width: 29px; height: 29px; color: var(--marker-green-dark); border: 1px solid #c8d6cc; border-radius: 3px; background: #fff; }
.markers-pagination button:disabled { color: #b2bdb5; background: #f1f4f2; }
.markers-pagination > label { justify-self: end; }
.markers-pagination select { margin-left: 5px; padding: 4px 7px; color: var(--marker-ink); border: 1px solid #c8d6cc; border-radius: 3px; background: #fff; font-size: .68rem; }

@media (max-width: 1100px) {
    .markers-workspace { grid-template-columns: 1fr; }
    .markers-selector-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
    .markers-selector-card header, .markers-method-note { grid-column: 1 / -1; }
    .markers-chr-heading { grid-column: 1; }
    .markers-chromosome-picker, .markers-pool-size { grid-column: 1; }
    #markers-form { grid-column: 2; grid-row: 2 / span 3; margin-top: 22px; padding-top: 0; padding-left: 28px; border-top: 0; border-left: 1px solid var(--marker-line); }
    .markers-method-note { margin-top: 20px; }
}

@media (max-width: 820px) {
    .markers-page-width { width: min(100% - 26px, 700px); }
    .markers-hero-grid { grid-template-columns: 1fr; gap: 28px; padding: 38px 0; }
    .markers-reference { max-width: 570px; }
    .markers-summary { grid-template-columns: 1fr 1fr; }
    .markers-summary > div:nth-child(2) { border-right: 0; }
    .markers-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--marker-line); }
    .markers-map-head, .markers-results-head { display: block; }
    .markers-map-legend, .markers-results-actions { margin-top: 13px; }
    .markers-map { height: 500px; }
    .markers-pagination { grid-template-columns: 1fr auto; }
    .markers-pagination > label { display: none; }
}

@media (max-width: 570px) {
    .markers-page-width { width: calc(100% - 18px); }
    .markers-hero h2 { font-size: 3.1rem; }
    .markers-reference { padding: 19px 17px 19px 22px; }
    .markers-selector-card { display: block; padding: 22px 17px; }
    #markers-form { margin-top: 18px; padding-top: 18px; padding-left: 0; border-top: 1px solid var(--marker-line); border-left: 0; }
    .markers-chromosome-picker { grid-template-columns: repeat(3, 1fr); }
    .markers-map-head, .markers-results-head { padding: 21px 17px 17px; }
    .markers-map-scroll { padding-right: 8px; padding-left: 8px; }
    .markers-map-footer { display: block; padding: 10px 17px; }
    .markers-results-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .markers-table th:first-child, .markers-table td:first-child { padding-left: 17px; }
    .markers-pagination { padding: 12px 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .markers-page *, .markers-page *::before, .markers-page *::after { transition: none !important; animation-duration: .01ms !important; }
}
