/* ==========================================================
   QPRIMORA V1.22.2
   GROVER SEARCH
   BUILT DIRECTLY ON TSP VISUAL STRUCTURE
   ========================================================== */


/* Same main geometry as TSP */

.grover-main{
    max-width:1380px;
    margin:auto;
    padding:135px 7vw 100px
}


/* Hero */

.grover-hero{
    max-width:1050px;
    padding-bottom:55px
}

.grover-hero h1{
    font-size:clamp(44px,6vw,78px);
    line-height:1.05;
    margin:15px 0
}

.grover-hero .english-name{
    color:var(--gold);
    font-weight:700;
    letter-spacing:.03em
}

.grover-hero .hero-question{
    max-width:900px;
    font-size:21px;
    line-height:1.75;
    color:#d8e2ef
}

.grover-hero .hero-purpose{
    margin-top:25px;
    padding:18px 22px;
    border-left:2px solid var(--gold);
    background:#07111f;
    color:#aebdd0;
    line-height:1.8
}

.grover-hero .hero-purpose strong{
    color:#e4ebf4
}


/* Sections */

.grover-section{
    padding:65px 0;
    border-top:1px solid var(--line)
}

.grover-section h2{
    margin:10px 0 28px;
    font-size:clamp(30px,4vw,48px)
}

.grover-section .section-lead{
    max-width:900px;
    color:var(--muted);
    line-height:1.8
}


/* Controls */

.grover-control-label{
    display:block;
    margin-top:32px
}

.grover-preview-card{
    border:1px solid var(--line);
    background:#07111f;
    padding:28px
}

.problem-summary{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
    margin-bottom:20px
}

.problem-summary>div{
    padding:15px;
    border:1px solid var(--line);
    background:#030914
}

.problem-summary span,
.problem-summary small{
    display:block;
    color:#91a3ba;
    font-size:10px
}

.problem-summary strong{
    display:block;
    margin:6px 0;
    color:var(--gold);
    font-size:25px
}


/* Candidate space */

.candidate-preview{
    display:grid;
    grid-template-columns:repeat(8,1fr);
    gap:7px;
    min-height:270px;
    align-content:center;
    padding:20px;
    border:1px solid rgba(255,255,255,.08);
    background:
      radial-gradient(
        circle at 50% 50%,
        rgba(35,77,115,.17),
        transparent 60%
      ),
      #030914
}

.candidate-cell{
    padding:9px 4px;
    border:1px solid #172537;
    text-align:center;
    color:#91a3ba;
    font-size:11px
}

.candidate-cell.target{
    border-color:#e7b85b;
    color:#e7b85b;
    background:rgba(231,184,91,.07)
}

.problem-sentence{
    margin-top:18px;
    color:#c5d0de;
    line-height:1.7
}


/* Transformation */

.grover-algorithm-flow{
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
    margin-top:22px
}

.grover-algorithm-flow span{
    padding:11px 15px;
    border:1px solid var(--line);
    background:#030a13
}

.grover-algorithm-flow i{
    color:#e7b85b
}


/* Classical trace */

.classical-trace{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-top:25px;
    padding:18px;
    border:1px solid rgba(255,255,255,.08);
    background:#030914;
    min-height:95px
}

.trace-cell{
    min-width:38px;
    padding:8px;
    border:1px solid #172537;
    text-align:center;
    color:#8fa1b7;
    font-size:11px
}

.trace-cell.found{
    color:#e7b85b;
    border-color:#e7b85b
}


/* Probability evolution */

.probability-panel{
    margin-top:25px;
    padding-top:20px;
    border-top:1px solid var(--line)
}

.iteration-chart{
    display:flex;
    align-items:flex-end;
    gap:8px;
    height:180px;
    margin-top:18px;
    padding:15px;
    border:1px solid rgba(255,255,255,.08);
    background:#030914
}

.iter-column{
    flex:1;
    height:100%;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    align-items:center;
    gap:7px
}

.iter-bar-wrap{
    width:70%;
    flex:1;
    display:flex;
    align-items:flex-end
}

.iter-bar{
    width:100%;
    min-height:2px;
    background:linear-gradient(
        180deg,
        #e7b85b,
        #8e672d
    )
}

.iter-column small{
    color:#8193a9;
    font-size:9px
}

.iter-column strong{
    color:#d9e3ef;
    font-size:10px
}


/* Measurement distribution */

.measurement-row{
    margin:13px 0
}

.measurement-info{
    display:flex;
    justify-content:space-between;
    gap:14px;
    align-items:flex-end;
    margin-bottom:6px
}

.measurement-info span{
    color:#aebdd0;
    font-size:11px
}

.measurement-info strong{
    color:var(--gold);
    font-size:12px
}

.measurement-track{
    height:7px;
    overflow:hidden;
    background:#101b29;
    border-radius:10px
}

.measurement-bar{
    height:100%;
    min-width:2px;
    background:linear-gradient(
        90deg,
        #9c7331,
        #e7b85b
    );
    border-radius:10px
}

.grover-extra-metrics{
    margin-top:25px
}


/* Scale */

.grover-scale-table{
    margin-top:30px;
    border-top:1px solid var(--line)
}

.grover-scale-table>div{
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    border-bottom:1px solid var(--line)
}

.grover-scale-table span,
.grover-scale-table strong{
    padding:17px 20px
}

.grover-scale-table span{
    color:#96a8bd
}

.grover-scale-table strong{
    color:#e7b85b
}

.grover-scale-table .scale-head{
    background:#07111f
}

.grover-scale-table .scale-head span{
    color:#9eafc5;
    font-size:10px;
    font-weight:800;
    letter-spacing:.1em
}


/* Run errors */

.run-status.error{
    color:#ff9d9d
}

.run-status.success{
    color:#e7b85b
}


/* Responsive */

@media(max-width:900px){

    .candidate-preview{
        grid-template-columns:repeat(4,1fr)
    }

    .problem-summary{
        grid-template-columns:1fr
    }
}

@media(max-width:600px){

    .grover-main{
        padding-left:6vw;
        padding-right:6vw
    }

    .candidate-preview{
        grid-template-columns:repeat(3,1fr)
    }

    .grover-scale-table span,
    .grover-scale-table strong{
        padding:13px 8px;
        font-size:12px
    }
}
