/* Figures A for the paper page "UVID recovery methods and dark storage metastability" (uvidrec-a.js).
   Used with uvid-whitepaper.css and paper.css; every rule is scoped to the page wrapper .ur. */
.ur{--ur-day:#9aa65a;--ur-night:#c06a62;--ur-gold:#d8b45a;--ur-silver:#b9bcc6;--ur-bronze:#c08456}

/* step rows: two states for the I-V curve, four moments in the lab */
.ur #s-uvid .pp-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
.ur #s-lab .pp-steps{grid-template-columns:repeat(4,minmax(0,1fr))}

/* chart text helpers */
.ur .ur-loss{font-size:12px;fill:var(--ur-night)}
.ur .ur-q{font-family:var(--f-display);font-size:44px;font-weight:500;fill:var(--muted)}
.ur .ur-val{font-family:var(--f-display);font-size:20px;font-weight:500;fill:var(--ink)}
.ur .ur-on-bar{fill:#fff}
.ur .ur-click{cursor:pointer}

/* field to lab timeline bands: green while lit, red while dark, neutral in the lab */
.ur .ur-band{transition:fill-opacity .6s ease}
.ur .ur-band-l{fill:var(--ur-day);fill-opacity:.08}
.ur .ur-band-d{fill:var(--ur-night);fill-opacity:.08}
.ur .ur-band-n{fill:var(--accent);fill-opacity:.05}
.ur .ur-band-l.on{fill-opacity:.2}
.ur .ur-band-d.on{fill-opacity:.2}
.ur .ur-band-n.on{fill-opacity:.12}
.ur .ur-seg{font-size:12px;fill:var(--muted);transition:fill .4s ease}
.ur .ur-seg.on{fill:var(--ink)}
.ur .ur-ico{transition:opacity .4s ease;opacity:.55}
.ur .ur-ico.on{opacity:1}
.ur .ur-qbox{opacity:0;transition:opacity .8s ease}
.ur .ur-qbox.on{opacity:1}
.ur .ur-qbox.on .ur-q{animation:ur-pulse 1.2s ease-out 1 forwards}

/* lab: heat marks rise once above the bar while the module is too hot, then stay */
.ur .ur-heat path{animation:ur-rise .9s ease-out 1 backwards}
.ur .ur-heat path:nth-child(2){animation-delay:.2s}
.ur .ur-heat path:nth-child(3){animation-delay:.4s}
@keyframes ur-rise{0%{transform:translateY(6px);opacity:0}100%{transform:none;opacity:1}}
@keyframes ur-pulse{0%{opacity:.4}100%{opacity:1}}

/* ranking cards: 1, 2, 3 and disqualified, revealed one by one */
.ur .ur-rank{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(10px,1.6vw,18px)}
.ur .ur-rank li{position:relative;margin:0;padding:clamp(14px,1.8vw,20px);min-width:0;border:1px solid var(--line);border-radius:5px;background:var(--surface);display:flex;flex-direction:column;gap:6px;transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.2,1),border-color .4s ease}
.ur .ur-rank li:nth-child(2){transition-delay:.18s}
.ur .ur-rank li:nth-child(3){transition-delay:.36s}
.ur .ur-rank li:nth-child(4){transition-delay:.54s}
.ur .ur-rank.pre li{opacity:0;transform:translateY(16px);transition:none}
.ur .ur-rank li[data-r="1"]{border-color:var(--accent);background:linear-gradient(160deg,var(--accent-soft),var(--surface) 70%)}
.ur .ur-rank b{display:block;font-family:var(--f-display);font-weight:500;font-size:var(--t-lg);line-height:1.2;color:var(--ink)}
.ur .ur-rank p{margin:0;font-size:var(--t-sm);line-height:1.5;color:var(--body)}
.ur .ur-medal{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;font-family:var(--f-display);font-weight:600;font-size:19px;line-height:1;color:#17140f;margin-bottom:6px;box-shadow:inset 0 -3px 0 rgba(0,0,0,.18),0 0 0 3px rgba(255,255,255,.06)}
.ur .ur-rank li[data-r="1"] .ur-medal{background:var(--ur-gold)}
.ur .ur-rank li[data-r="2"] .ur-medal{background:var(--ur-silver)}
.ur .ur-rank li[data-r="3"] .ur-medal{background:var(--ur-bronze)}
.ur .ur-rank li[data-r="x"] .ur-medal{background:transparent;color:var(--ur-night);border:2px solid var(--ur-night);box-shadow:none}
.ur .ur-rank li[data-r="x"] b{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--ur-night);text-decoration-thickness:1px}
.ur .ur-rank li[data-r="x"] p{color:var(--muted)}

@media (max-width:899px){
  .ur .ur-rank{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:519px){
  .ur .ur-rank{grid-template-columns:minmax(0,1fr)}
  .ur #s-lab .pp-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (prefers-reduced-motion:reduce){
  .ur .ur-rank li,.ur .ur-band,.ur .ur-seg,.ur .ur-ico,.ur .ur-qbox{transition:none}
  .ur .ur-heat path,.ur .ur-qbox.on .ur-q{animation:none}
}
