/* Phase 3C-1 visual refinement #4: pixel-match the locked Prediction Lab rendering. */

/* Fingerprint gauges use perimeter fill meters in the locked rendering — no needles. */
body.predictionLabPage .plGauge{
  --gauge-color:#3dd6d0;
  --gauge-track:#173348;
  --gauge-angle:0deg;
  background:conic-gradient(
    from 225deg,
    var(--gauge-color) 0deg var(--gauge-angle),
    var(--gauge-track) var(--gauge-angle) 270deg,
    transparent 270deg 360deg
  )!important;
  border:1px solid rgba(52,91,118,.42);
  box-shadow:0 0 0 1px rgba(80,129,158,.08),inset 0 0 20px rgba(0,0,0,.22);
}
body.predictionLabPage .plGauge[data-gauge="frequency"]{--gauge-color:#37d5cf}
body.predictionLabPage .plGauge[data-gauge="recent"]{--gauge-color:#e4aa31}
body.predictionLabPage .plGauge[data-gauge="balance"]{--gauge-color:#4bd28a}
body.predictionLabPage .plGauge[data-gauge="spread"]{--gauge-color:#38bdf2}
body.predictionLabPage .plGauge[data-gauge="popularity"]{--gauge-color:#48d18a}
body.predictionLabPage .plGauge:before{
  inset:8px!important;
  background:radial-gradient(circle at 50% 44%,#0c2232 0,#081624 68%,#07131f 100%)!important;
  border:1px solid #294a63!important;
  box-shadow:inset 0 0 17px rgba(0,0,0,.36)!important;
}
body.predictionLabPage .plGauge--hero:before{inset:10px!important}
body.predictionLabPage .plGauge:after,body.predictionLabPage .plGauge>i{display:none!important}
body.predictionLabPage .plGauge.isEmpty{
  background:conic-gradient(from 225deg,var(--gauge-track) 0deg 270deg,transparent 270deg 360deg)!important;
}
body.predictionLabPage .plGauge strong{top:31%!important}
body.predictionLabPage .plGauge span{top:56%!important}
body.predictionLabPage .plGauge small{top:71%!important}
body.predictionLabPage .plGauge--hero strong{top:29%!important}
body.predictionLabPage .plGauge--hero span{top:56%!important}
body.predictionLabPage .plGauge--hero small{top:70%!important}

@media (min-width:1281px){
  /* Locked rendering uses a tighter application frame and slightly squarer panels. */
  body.predictionLabPage .predictionLab{padding:0 10px 12px}
  body.predictionLabPage .plTopbar{min-height:66px;margin:0 -10px 8px;padding:10px 18px}
  body.predictionLabPage .plBrand{min-width:315px;gap:11px}
  body.predictionLabPage .plBrand>strong{font-size:2rem}
  body.predictionLabPage .plBrand b{font-size:1.35rem}
  body.predictionLabPage .plBrand small{font-size:.67rem}
  body.predictionLabPage .plFlask{width:31px;height:31px}
  body.predictionLabPage .plFlask svg{width:28px;height:28px}
  body.predictionLabPage .plNav{gap:5px}
  body.predictionLabPage .plNav a{padding:8px 11px;font-size:.76rem}
  body.predictionLabPage .plRankChip{min-width:166px;padding:6px 10px}
  body.predictionLabPage .plRankHex{width:34px;height:34px}
  body.predictionLabPage .plDashboard{gap:7px}
  body.predictionLabPage .plPanel{border-radius:7px;padding:12px}
  body.predictionLabPage .plSectionTitle{margin-bottom:9px;gap:8px}
  body.predictionLabPage .plSectionTitle>span{width:26px;height:26px;flex-basis:26px;font-size:.8rem}
  body.predictionLabPage .plSectionTitle h2{font-size:1.12rem}
  body.predictionLabPage .plSectionTitle p{font-size:.66rem}

  /* Compress the top row by removing residual vertical excess rather than shrinking controls. */
  body.predictionLabPage .plBuild{padding:9px 10px}
  body.predictionLabPage .plBuild .plSectionTitle{margin-bottom:4px}
  body.predictionLabPage .plBuild .plDrawBar{min-height:43px;padding:5px 7px;margin-bottom:5px}
  body.predictionLabPage .plBuild .plTabs{margin-bottom:5px}
  body.predictionLabPage .plBuild .plComposerMain,body.predictionLabPage .plBuild .plComposerBonus{padding:7px 8px}
  body.predictionLabPage .plBuild .plComposer small{margin-top:2px}
  body.predictionLabPage .plBuild .plComplete{margin:4px 0 2px}
  body.predictionLabPage .plBuild .plStrategyPrompt{margin:1px 0 3px}
  body.predictionLabPage .plBuild .plStrategies{gap:3px}
  body.predictionLabPage .plBuild .plStrategies button{min-height:47px;padding:4px 5px}
  body.predictionLabPage .plBuild .plBuildFooter{margin-top:4px}
  body.predictionLabPage .plBuild .plCurrentSet,body.predictionLabPage .plBuild .plControlToggle{min-height:43px;padding:5px 6px}
  body.predictionLabPage .plBuild .plSubmitRow{margin-top:4px}

  /* Fingerprint content should fill the row naturally, with the insight close to the stat strip. */
  body.predictionLabPage .plFingerprint{display:block}
  body.predictionLabPage .plFingerprint .plSectionTitle{margin-bottom:8px}
  body.predictionLabPage .plFingerprint .plGaugeCluster{padding:8px 2px 10px;gap:7px}
  body.predictionLabPage .plFingerprint .plFingerprintStats div{padding:8px 4px}
  body.predictionLabPage .plFingerprint .plInsight{margin-top:8px!important;padding:8px 10px}

  /* Debrief comparison must fit cleanly inside the left column like the locked rendering. */
  body.predictionLabPage .plDebrief .plCompare{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 88px;gap:5px}
  body.predictionLabPage .plDebrief .plCompare>div{min-width:0;overflow:hidden;padding:7px}
  body.predictionLabPage .plDebrief .plCompare .plBalls{gap:4px;flex-wrap:nowrap}
  body.predictionLabPage .plDebrief .plCompare .plBall{width:29px;height:29px;flex:0 0 29px;font-size:.65rem}
  body.predictionLabPage .plDebrief .plGhostBalls{gap:4px;flex-wrap:nowrap}
  body.predictionLabPage .plDebrief .plGhostBall{width:27px;height:27px;flex:0 0 27px}
  body.predictionLabPage .plDebrief .plResult strong{font-size:1.75rem}

  /* Achievements in the locked rendering are a four-part horizontal dashboard, not two stacked rows. */
  body.predictionLabPage .plAchievements{
    display:grid;
    grid-template-columns:minmax(0,.95fr) minmax(0,1.55fr);
    column-gap:12px;
    row-gap:5px;
    padding:10px 12px;
  }
  body.predictionLabPage .plAchievements>.plSectionTitle{grid-column:1/-1;grid-row:1;margin-bottom:3px}
  body.predictionLabPage .plAchievementGrid{
    grid-column:1;
    grid-row:2;
    grid-template-columns:repeat(7,minmax(0,1fr));
    gap:2px;
    padding-right:12px;
    border-right:1px solid #1f3d53;
    align-items:start;
  }
  body.predictionLabPage .plAchievementGrid article{
    border:0;
    background:transparent;
    padding:3px 1px;
    min-width:0;
  }
  body.predictionLabPage .plAchievementGrid article>span{width:48px;height:48px;font-size:1.25rem}
  body.predictionLabPage .plAchievementGrid b{font-size:.58rem;line-height:1.08;margin-top:4px}
  body.predictionLabPage .plAchievementGrid small{font-size:.46rem;line-height:1.15;margin-top:2px}
  body.predictionLabPage .plAchievementBottom{
    grid-column:2;
    grid-row:2;
    margin:0;
    padding:0;
    border-top:0;
    grid-template-columns:minmax(0,1.4fr) minmax(0,.9fr) minmax(0,.72fr);
    gap:0;
    align-items:stretch;
  }
  body.predictionLabPage .plAchievementBottom>div{padding:0 12px;border-right:1px solid #1f3d53}
  body.predictionLabPage .plAchievementBottom>div:last-child{border-right:0;padding-right:0}
  body.predictionLabPage .plAchievementBottom h3{font-size:.61rem;margin:0 0 5px}
  body.predictionLabPage .plTrackerList{gap:3px 10px}
  body.predictionLabPage .plTrackerList span{font-size:.53rem;line-height:1.25}
  body.predictionLabPage .plMasterProgress{align-items:center;justify-content:center;min-height:100%}
  body.predictionLabPage .plMasterRing{width:66px;height:66px}
  body.predictionLabPage .plMasterProgress p{margin:2px 0 0}
  body.predictionLabPage .plGlance div{padding:2px 0;font-size:.53rem}
  body.predictionLabPage .plGlance dt{display:flex;align-items:center;gap:4px}
  body.predictionLabPage .plGlance dt svg{color:#7895a8;flex:0 0 auto}

  /* The approved rendering keeps Instruments in the Lab nav rather than a second full-width dock. */
  body.predictionLabPage .plInstrumentStrip{display:none}

  /* Footer mirrors the approved restrained WTN safety/education footer. */
  body.predictionLabPage .plFooter{
    min-height:46px;
    margin-top:7px;
    padding:8px 12px 3px;
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:13px;
    font-size:.54rem;
  }
  body.predictionLabPage .plFooterBrand{font-size:1.35rem;font-weight:900;letter-spacing:-.07em;color:#eef5f9}
  body.predictionLabPage .plFooterCopy{color:#96a8b6;line-height:1.3}
  body.predictionLabPage .plFooterControl{color:#afbdc7;text-align:right;white-space:nowrap}

  body.predictionLabPage .plShareRow{display:flex;align-items:center;gap:7px;margin-top:5px;padding-top:5px;border-top:1px solid #1c384d;color:#8fa3b2;font-size:.5rem}
  body.predictionLabPage .plShareRow>span:first-child{margin-right:auto}
  body.predictionLabPage .plShareChip{border:1px solid #2a4860;border-radius:4px;padding:3px 6px;background:#091a28;color:#9fb0bc;font-size:.48rem}
  body.predictionLabPage .plShareChip.isCurrent{border-color:#39759a;color:#c9e4f3}

  body.predictionLabPage .plXpLabel{margin:5px 0 3px;color:#9eb0bc;font-size:.53rem;font-weight:800;text-transform:uppercase;letter-spacing:.035em}
  body.predictionLabPage .plViewAchievements{display:inline-flex;margin-top:7px;padding:5px 8px;border:1px solid #24506d;border-radius:5px;background:#0b2940;color:#cce7f6;text-decoration:none;font-size:.5rem;font-weight:750}
}

@media(max-width:1280px){
  body.predictionLabPage .plGauge:after,body.predictionLabPage .plGauge>i{display:none!important}
}
