/* Urgency classes from report.json (pipeline/report.py), as used in Explore: chips, list, cluster card, legend.
   One hue, brighter means more urgent. "Check first" is hatched, the same as the possible tier on the map.
   The hex values match CONFIG.triage in js/config.js. Tokens come from app.css. */
.tri{display:inline-flex;align-items:center;gap:6px}
.tri>i{flex:none;width:10px;height:10px;border-radius:2px;background:var(--tri,#746F4E)}
.tri-urgent{--tri:#FFD21F}
.tri-important{--tri:#CFAB24}
.tri-backlog{--tri:#9C872E}
.tri-wait{--tri:#746F4E}
.tri-check>i{background:repeating-linear-gradient(45deg,#FFD21F 0 1.5px,transparent 1.5px 4px);box-shadow:inset 0 0 0 1px rgba(255,210,31,.7)}
.chip[aria-pressed="false"] .tri>i{opacity:.35}

/* Layers panel: "Colour by" caption with its two-option switch */
.row-cap{align-items:center;justify-content:space-between}
.row-cap .mono{white-space:nowrap}

/* Cluster card: why a unit is only possible, then the advice block */
.reason{margin:10px 0 0;font-size:.8125rem;line-height:1.4;color:var(--ink-2);text-wrap:pretty}
.todo{padding:12px;border-radius:var(--r-card);background:rgba(255,255,255,.04);box-shadow:var(--inner-ring)}
.todo-head{display:flex;justify-content:space-between;align-items:center;gap:var(--s-2)}
.todo-why{margin:10px 0 0;font:500 .9375rem/1.3 var(--font-sans);color:var(--ink);text-wrap:balance}
.todo-list{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;margin:10px 0 0}
.todo-list dt{padding-top:2px;font:400 .6875rem/1.5 var(--font-mono);text-transform:uppercase;letter-spacing:.08em;color:var(--ink-2)}
.todo-list dd{margin:0;font-size:.8125rem;line-height:1.4;color:var(--ink);text-wrap:pretty}
.spring b small{margin-left:6px;font:400 .6875rem var(--font-mono);color:var(--ink-2);font-variant-numeric:tabular-nums}

/* List: search by unit number */
.find{width:7rem;min-height:var(--hit);padding:0 10px;border:0;border-radius:var(--r-control);background:rgba(13,19,16,.6);box-shadow:var(--inner-ring);color:var(--ink);font:500 .8125rem/1 var(--font-sans);font-variant-numeric:tabular-nums;transition:background-color var(--t-state) var(--ease)}
.find::placeholder{color:var(--ink-2);opacity:1}
.find:hover{background:var(--raised)}
.list-panel td .badge{white-space:nowrap}

/* Explore: an open cluster card reaches the lower right corner, so the map controls move to its left edge.
   The move uses translate, which .fx already transitions when motion is allowed. */
@media (width > 720px){
  body[data-mode="explore"]:has(#clusterCard.is-open) .mapctl{translate:-360px 0}
}
/* Below about 1380px wide the stat strip reaches under the moved controls: lift them 12px so the two do not touch. */
@media (720px < width < 1380px){
  body[data-mode="explore"]:has(#clusterCard.is-open) .mapctl{translate:-360px -12px}
}
/* Below about 1520px wide the open list reaches that spot and covered the top of the controls.
   With the card and the list both open, the controls go to the top of the map, still beside the card (72px is the top of the card). */
@media (720px < width < 1520px){
  body[data-mode="explore"]:has(#clusterCard.is-open):has(#listPanel.is-open) .mapctl{translate:-360px calc(204px - 100vh)}
}
/* With the urgency column the list table needs about 600px. The panel is narrower than that below about 1340px wide,
   so the cells close up and the Checks column stays in view. */
@media (720px < width < 1340px){
  .list-panel.has-tri td,.list-panel.has-tri th button{padding-inline:8px}
}

/* Legend: with urgency colours on, a four-step key replaces the single "Likely" swatch */
.legend .lg-tri{display:none}
body[data-colour="triage"] .legend .lg-tri{display:inline-flex}
body[data-colour="triage"] .legend .lg-likely{display:none}
.lg-ramp{display:inline-flex;gap:2px}
.lg-ramp b{width:10px;height:10px;border-radius:2px;background:var(--tri)}
