/* Risk Radar. Every colour a token; motion only where it shows the radar working. */
.rd-scope { --rd-bg: #0f1114; --rd-line: #262a2f; --rd-line-2: #353a40; --rd-text: #e8eaed; --rd-muted: #8a9099; --rd-ember: #f0722e; --rd-crit: #e5534b; --rd-med: #e3b341; --rd-ai: #5b9fd6; background: var(--rd-bg); color: var(--rd-text); border-radius: 12px; padding: var(--s-5); }
.rd-title { font: 600 var(--fs-small-ui)/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--rd-ember); }
.rd-legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; font-size: var(--fs-ui-small); color: var(--rd-muted); }
.rd-svg { width: 100%; max-width: 640px; margin: 0 auto; display: block; overflow: visible; }
.rd-ring { fill: none; stroke: var(--rd-line-2); stroke-width: 1; }
.rd-ring--owner { stroke: var(--rd-ember); stroke-width: 1.5; }
.rd-ring--world { stroke-dasharray: 2 4; }
.rd-spoke { stroke: var(--rd-line); stroke-width: 1; }
.rd-ringlabel { fill: var(--rd-muted); font: 500 10px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.rd-sector { fill: var(--rd-text); font: 600 12px/1 var(--font-body); }
.rd-beam { transform-origin: 300px 300px; animation: rd-sweep 7s linear infinite; }
.rd-beam-1 { fill: var(--rd-ember); opacity: .10; }
.rd-beam-2 { fill: var(--rd-ember); opacity: .08; }
.rd-beam-edge { stroke: var(--rd-ember); stroke-width: 1.5; opacity: .7; }
@keyframes rd-sweep { to { transform: rotate(360deg); } }
.rd-blip { cursor: pointer; transition: transform 2.4s cubic-bezier(.2,.8,.2,1), opacity 1.5s ease; outline: none; }
.rd-blip .rd-core { fill: var(--rd-muted); }
.rd-blip--critical .rd-core { fill: var(--rd-crit); }
.rd-blip--high .rd-core { fill: var(--rd-ember); }
.rd-blip--medium .rd-core { fill: var(--rd-med); }
.rd-blip--low .rd-core { fill: var(--rd-muted); }
.rd-blip--ai .rd-core { fill: var(--rd-ai); }
.rd-blip--backlog .rd-core { opacity: .55; }
.rd-kev { fill: none; stroke: #ff3b6b; stroke-width: 1.5; stroke-dasharray: 2 2; }
.rd-stage--world .rd-core { opacity: .55; }
.rd-halo { fill: none; stroke: currentColor; color: var(--rd-ember); stroke-width: 1.5; animation: rd-pulse 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.rd-blip--critical .rd-halo { color: var(--rd-crit); }
.rd-blip--ai .rd-halo { color: var(--rd-ai); }
@keyframes rd-pulse { 0% { opacity: .9; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.8); } }
.rd-blip.rd-fade { opacity: .28; }
.rd-blip:hover .rd-core, .rd-blip:focus .rd-core, .rd-blip.is-sel .rd-core { stroke: var(--rd-text); stroke-width: 2; }
.rd-blip--real .rd-core { stroke: var(--rd-ember); stroke-width: 1.5; }
.rd-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rd-muted); flex: none; }
.rd-dot--critical { background: #e5534b; } .rd-dot--high { background: #f0722e; } .rd-dot--medium { background: #e3b341; } .rd-dot--ai { background: #5b9fd6; } .rd-dot--low { background: #8a9099; } .rd-dot--kev { background: transparent; border: 1.5px dashed #ff3b6b; box-sizing: border-box; }
.rd-ticker { min-height: 22px; font: 400 var(--fs-small-ui)/1.4 var(--font-mono); color: var(--rd-muted); text-align: center; }
.rd-tick { animation: rd-in .5s ease-out; display: inline-block; }
.rd-funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.rd-funnel > div { display: flex; flex-direction: column; gap: 2px; padding: var(--s-3); background: var(--app-tile); border-radius: 8px; }
.rd-num { font: 700 var(--fs-stat)/1.1 var(--font-body); color: var(--bone-0); }
.rd-num--ember { color: var(--ember-text); }
.rd-num.is-tick { animation: rd-bump .45s ease-out; }
@keyframes rd-bump { 0% { transform: translateY(-3px); opacity: .4; } 100% { transform: none; opacity: 1; } }
.rd-grow { flex: 1 1 auto; }
.rd-feed { display: flex; flex-direction: column; }
.rd-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; border: 0; border-top: 1px solid var(--app-card-border); background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; animation: rd-in .6s ease-out; }
.rd-row:first-child { border-top: 0; }
.rd-row:hover .rd-row-t { color: var(--ember-text); }
.rd-row--world { opacity: .62; }
.rd-row-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.rd-row-t { font-size: var(--fs-small-ui); font-weight: 600; color: var(--bone-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes rd-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.rd-v { flex: none; font: 600 var(--fs-ui-small)/1.2 var(--font-body); padding: 3px 8px; border-radius: var(--r-chip); white-space: nowrap; }
.rd-v--none { background: var(--app-tile); color: var(--bone-3); }
/* How far inward an advisory got is not a control status (UI-11): ink, filled once it has an owner */
.rd-v--sbom { background: var(--app-card); color: var(--bone-1); box-shadow: inset 0 0 0 1px var(--border-strong); }
.rd-v--runs { background: var(--app-card); color: var(--bone-0); box-shadow: inset 0 0 0 1px var(--bone-2); }
.rd-v--owner { background: var(--bone-0); color: #fff; }
.rd-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); border-left: 2px solid var(--app-card-border); }
.rd-steps li { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s-3); padding-left: var(--s-3); position: relative; font-size: var(--fs-small-ui); animation: rd-in .5s ease-out both; }
.rd-steps li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bone-3); }
.rd-steps li.is-now::before { background: var(--ember-500); box-shadow: 0 0 0 4px var(--ember-dim); }
.rd-steps li:nth-child(2) { animation-delay: .08s; } .rd-steps li:nth-child(3) { animation-delay: .16s; } .rd-steps li:nth-child(4) { animation-delay: .24s; } .rd-steps li:nth-child(5) { animation-delay: .32s; }
.rd-step-t { min-width: 64px; font-family: var(--font-mono); color: var(--bone-3); white-space: nowrap; }
.rd-journey { display: flex; flex-direction: column; gap: var(--s-3); }
.rd-src { display: flex; align-items: center; gap: var(--s-3); }
.rd-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--bone-1); flex: none; opacity: .5; transition: opacity .3s; }
/* A feed that failed is said in words, in a neutral style (UI-20): a hollow dot, not a red one */
.rd-src--off .rd-pulse { background: var(--bone-3); opacity: .35; } .rd-src--err .rd-pulse { background: transparent; border: 1.5px solid var(--bone-2); box-sizing: border-box; opacity: 1; } .rd-src--off .le-name-sm { color: var(--bone-3); }
.rd-pulse.is-on { opacity: 1; box-shadow: 0 0 0 5px var(--app-tile); }
.rd-heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: var(--s-3); }
.rd-tile { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 2px; padding: var(--s-4); background: var(--app-card); border: 1px solid var(--app-card-border); border-radius: 8px; transition: border-color .4s, background .4s; }
.rd-tile.is-hot { border-color: var(--bone-0); box-shadow: inset 0 0 0 1px var(--bone-0); }
@media (prefers-reduced-motion: reduce) { .rd-beam, .rd-halo, .rd-row, .rd-tick, .rd-steps li, .rd-num.is-tick { animation: none; } .rd-blip { transition: none; } }
@media (max-width: 600px) { .rd-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rd-scope { padding: var(--s-3); } }
/* Selection shows on the row (MOB-12). On the phone the numbers and Just in come before the
   drawing, ring labels (6 px at that size) are hidden, and a row opens in place. */
.rd-row.is-sel { box-shadow: inset 3px 0 0 var(--accent-mark); padding-left: var(--s-3); }
.rd-row.is-sel .rd-row-t { color: var(--bone-0); }
.rd-item .rd-row { width: 100%; border-top: 1px solid var(--app-card-border); }
.rd-item:first-child .rd-row { border-top: 0; }
.rd-x { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-2) 0 var(--s-4) var(--s-3); border-left: 3px solid var(--accent-mark); }
.rd-x[hidden] { display: none; }
@media (max-width: 600px), (hover: none) and (max-width: 950px) and (max-height: 500px) {
  .rd-scope { order: 2; }
  .rd-ringlabel { display: none; }
}
@media (max-width: 600px) {
  .rd-sector { font-size: 20px; }
  .rd-row { min-height: var(--hit); width: 100%; flex-wrap: wrap; row-gap: var(--s-1); }
  .rd-row-main { flex: 1 1 calc(100% - 24px); }
  .rd-row .rd-v { margin-left: calc(8px + var(--s-3)); }
  .rd-row-t { white-space: normal; }
  .rd-legend { font-size: 13px; }
}
/* What to upgrade first (EST-037) */
.rd-upg { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--s-3); }
.rd-upg-card { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); background: var(--app-card); border: 1px solid var(--app-card-border); border-radius: 8px; }
.rd-upg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s-3); padding-top: var(--s-2); border-top: 1px solid var(--app-card-border); }
.rd-upg-c { font-size: var(--fs-small-ui); }
.rd-upg-n { font: 700 var(--fs-small-ui)/1.4 var(--font-body); color: var(--bone-1); text-align: right; }
.rd-upg-n.is-crit { color: var(--bone-0); }
.rd-upg-w { grid-column: 1 / -1; }
/* The detail of the blip just chosen, brought into view and marked (UI-19) */
.rd-flash { animation: rd-flash 1.6s ease-out; }
@keyframes rd-flash { 0%, 40% { box-shadow: 0 0 0 2px var(--accent-mark); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .rd-flash { animation: none; box-shadow: 0 0 0 2px var(--accent-mark); } }
.mlp-card:has(> * #rd-journey), .mlp-card:has(#rd-journey) { scroll-margin-top: var(--s-4); }
