/* ==========================================================================
   Benchmark Evidence Drawer (Side Sheet)
   ========================================================================== */
.benchmark-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.benchmark-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.benchmark-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 660px;
    max-width: 92vw;
    height: 100vh;
    background: rgba(12, 12, 15, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.8);
    z-index: 100200;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.benchmark-drawer-panel.is-open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(18, 18, 24, 0.6);
}

.drawer-title {
    font-family: 'AlibabaPuHuiTi-Heavy', var(--font-ui), sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.drawer-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.drawer-scroll-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.6rem 2rem 3rem;
    overscroll-behavior: contain;
}

.drawer-section {
    margin-bottom: 2.2rem;
}

.drawer-sec-title {
    font-family: 'AlibabaPuHuiTi-Heavy', var(--font-ui), sans-serif;
    font-size: 1.02rem;
    color: #ffffff;
    margin: 0 0 0.8rem 0;
    letter-spacing: 0.06em;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.drawer-text {
    font-size: 0.86rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 1rem 0;
}

.drawer-data-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1rem 1.2rem;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.82rem;
    gap: 1rem;
}

.data-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.data-label {
    color: #9ca3af;
    white-space: nowrap;
    font-weight: 500;
}

.data-val {
    color: rgba(255, 255, 255, 0.88);
    text-align: right;
    line-height: 1.5;
}

/* Benchmark Table */
.benchmark-table-wrapper {
    overflow-x: auto;
    margin: 1rem 0 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(18, 18, 22, 0.5);
}

.benchmark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    text-align: left;
}

.benchmark-table th {
    background: rgba(255, 255, 255, 0.05);
    color: #e5e5ea;
    padding: 0.7rem 0.8rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.benchmark-table td {
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.45;
}

.benchmark-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.num-highlight {
    color: #4ea57f;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
}

.grade-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.grade-opt,
.grade-perfect {
    background: rgba(78, 165, 127, 0.12);
    color: #4ea57f;
    border: 1px solid rgba(78, 165, 127, 0.35);
}

.grade-pass {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Latency Grid */
.latency-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.latency-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1rem;
}

.latency-num {
    font-family: var(--font-mono, monospace);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.3rem;
}

.latency-unit {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.latency-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 0.25rem;
}

.latency-sub {
    font-size: 0.72rem;
    color: #9ca3af;
    line-height: 1.4;
}

/* Checksum & Terminal */
.checksum-box, .terminal-box {
    background: #09090c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.8rem;
}

.checksum-header, .terminal-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    color: #9ca3af;
    font-family: var(--font-mono, monospace);
}

.checksum-algo {
    color: rgba(255, 255, 255, 0.5);
}

.checksum-code, .terminal-code {
    margin: 0;
    padding: 0.9rem 1rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.72rem;
    line-height: 1.6;
    color: #e5e5ea;
    overflow-x: auto;
    white-space: pre;
}

.terminal-bar {
    gap: 0.5rem;
}

.term-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
}

.terminal-title {
    flex: 1;
    margin-left: 0.3rem;
}

.copy-term-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.68rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.copy-term-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}


@media (max-width: 768px) {
    .benchmark-drawer-panel {
        width: 100vw;
        max-width: 100vw;
    }
}
