/* Analytics & Readiness hero visualization — scoped to .ready-viz. Outer canvas is transparent.
   Phases (data-phase): readiness → risk → certification. One Plant overview screen throughout:
   the trend and bands draw in, at-risk operators are singled out, then the app's own
   Certification grid tab fills in who is certified where. */

.ready-viz {
  --rv-ink: #172235;
  --rv-muted: rgba(23, 34, 53, 0.6);
  --rv-faint: rgba(23, 34, 53, 0.42);
  --rv-line: rgba(23, 34, 53, 0.09);
  --rv-cyan: #0ea5e9;
  --rv-cyan-deep: #0369a1;
  --rv-teal: #0f766e;
  --rv-navy: #13324a;
  --rv-high: #22c55e;
  --rv-average: #0e7490;
  --rv-risk: #f59e0b;
  --rv-critical: #ef4444;
  --rv-none: #6b7280;
  --rv-ease: cubic-bezier(0.55, 0, 0.2, 1);
  container: ready-viz / inline-size;
  width: 100%;
  font-family: var(--font-inter-tight, "Inter Tight", system-ui, sans-serif);
  color: var(--rv-ink);
}

:where(.ready-viz) p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: inherit;
}

:where(.ready-viz) :is(ul, ol) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ready-viz__stage {
  position: relative;
  top: -20px;
  width: 100%;
  aspect-ratio: 4 / 3;
}

.ready-viz[data-phase="readiness"] [data-for="readiness"],
.ready-viz[data-phase="risk"] [data-for="risk"],
.ready-viz[data-phase="certification"] [data-for="certification"] {
  --on: 1;
}

/* Admin console, recreated from the Plant overview */
.ready-viz__app {
  position: absolute;
  top: 9%;
  left: 0;
  width: 74%;
  height: 70%;
  display: grid;
  grid-template-columns: 18% minmax(0, 1fr);
  overflow: hidden;
  border-radius: 14px;
  background: #f7f8fa;
  box-shadow:
    0 0 0 1px rgba(23, 34, 53, 0.06),
    0 32px 60px -30px rgba(15, 23, 42, 0.5),
    0 14px 26px -18px rgba(15, 23, 42, 0.35);
}

.ready-viz__side {
  min-width: 0;
  padding: 1.6cqw 0.9cqw;
  border-right: 1px solid var(--rv-line);
  background: #fff;
}

.ready-viz__brand {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 0.6cqw;
  font-size: clamp(8px, 1.35cqw, 11px);
  font-weight: 700;
  line-height: 1.3;
}

.ready-viz__brand span {
  width: 1.2em;
  height: 1.2em;
  border-radius: 50%;
  border: 2px solid var(--rv-cyan-deep);
  border-right-color: var(--rv-cyan);
}

.ready-viz__side ul {
  display: grid;
  gap: 0.15cqw;
  margin-top: 1.8cqw;
}

.ready-viz__side li {
  padding: 0.55cqw 0.7cqw;
  border-radius: 6px;
  font-size: clamp(7px, 1.1cqw, 9.5px);
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--rv-muted);
}

.ready-viz__side li.ready-viz__side-label {
  margin-top: 0.8cqw;
  padding-bottom: 0.2cqw;
  font-size: clamp(5.5px, 0.8cqw, 7px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rv-faint);
}

.ready-viz__side li.is-current {
  background: #eef1f5;
  font-weight: 600;
  color: var(--rv-ink);
}

.ready-viz__main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1cqw;
  padding: 1.7cqw 1.9cqw;
}

.ready-viz__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ready-viz__kicker {
  font-size: clamp(6px, 0.9cqw, 7.5px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rv-faint);
}

.ready-viz__title {
  margin-top: 0.2cqw;
  font-size: clamp(11px, 2.1cqw, 16px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.ready-viz__sub {
  margin-top: 0.3cqw;
  font-size: clamp(6.5px, 0.95cqw, 8.5px);
  line-height: 1.3;
  color: var(--rv-faint);
}

.ready-viz__ask {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: var(--rv-navy);
  font-size: clamp(7.5px, 1.2cqw, 10px);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  color: #fff;
}

.ready-viz__mark {
  position: relative;
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #7dd3fc, var(--rv-cyan-deep) 70%);
}

.ready-viz__mark::after {
  content: "";
  position: absolute;
  inset: 28%;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* Readiness / Certification grid tabs, as in the product */
.ready-viz__tabs {
  display: flex;
  gap: 0.4cqw;
  border-bottom: 1px solid var(--rv-line);
  font-size: clamp(7px, 1.05cqw, 9px);
  font-weight: 600;
  line-height: 1.3;
}

.ready-viz__tab {
  margin-bottom: -1px;
  padding: 0.5cqw 1cqw;
  border: 1px solid transparent;
  border-radius: 5px 5px 0 0;
  color: var(--rv-faint);
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.ready-viz:is([data-phase="readiness"], [data-phase="risk"]) .ready-viz__tab--readiness,
.ready-viz[data-phase="certification"] .ready-viz__tab--grid {
  border-color: var(--rv-line);
  border-bottom-color: #f7f8fa;
  background: #f7f8fa;
  color: var(--rv-ink);
}

/* KPI tiles; the tile behind the current step is ringed */
.ready-viz__kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8cqw;
}

.ready-viz__kpi {
  min-width: 0;
  padding: 0.9cqw 1cqw 1cqw;
  border: 1px solid var(--rv-line);
  border-radius: 7px;
  background: #fff;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.ready-viz__kpi p,
.ready-viz__kpi small {
  display: block;
  overflow: hidden;
  font-size: clamp(6px, 0.88cqw, 8px);
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ready-viz__kpi p {
  font-weight: 600;
  color: var(--rv-muted);
}

.ready-viz__kpi small {
  font-weight: 500;
  color: var(--rv-faint);
}

.ready-viz__kpi b {
  display: block;
  margin: 0.2cqw 0 0.15cqw;
  font-size: clamp(10px, 1.95cqw, 15px);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ready-viz__kpi--risk b {
  color: #dc2626;
}

.ready-viz__kpi i {
  display: block;
  height: 3px;
  margin-top: 0.5cqw;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rv-high) 77%, rgba(23, 34, 53, 0.08) 0);
}

.ready-viz[data-phase="readiness"] .ready-viz__kpi--readiness,
.ready-viz[data-phase="risk"] .ready-viz__kpi--risk,
.ready-viz[data-phase="certification"] .ready-viz__kpi--floor {
  border-color: rgba(14, 165, 233, 0.55);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.16);
}

/* Lower body: one view per tab. Visibility (not just opacity) keeps the hidden tab out of paint. */
.ready-viz__body {
  position: relative;
  flex: 1;
  min-height: 0;
}

.ready-viz__view {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.ready-viz:is([data-phase="readiness"], [data-phase="risk"]) .ready-viz__view--readiness,
.ready-viz[data-phase="certification"] .ready-viz__view--grid {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.ready-viz__view--readiness {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.8cqw;
}

.ready-viz__card {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 1cqw 1.1cqw;
  border: 1px solid var(--rv-line);
  border-radius: 7px;
  background: #fff;
}

.ready-viz__card-title {
  font-size: clamp(7px, 1.1cqw, 9.5px);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

/* Readiness over time */
.ready-viz__trend svg {
  flex: 1;
  width: 100%;
  min-height: 0;
  margin-top: 0.8cqw;
  overflow: visible;
}

.ready-viz__area {
  fill: rgba(14, 116, 144, 0.1);
  opacity: 0;
  transition: opacity 0.6s ease 0.6s;
}

.ready-viz__line {
  fill: none;
  stroke: var(--rv-average);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0s linear 0.6s;
}

.ready-viz__threshold {
  stroke: rgba(220, 38, 38, 0.55);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.4s ease;
}

.ready-viz__threshold-label {
  position: absolute;
  right: 1.1cqw;
  bottom: 30%;
  font-size: clamp(5.5px, 0.8cqw, 7px);
  font-weight: 600;
  line-height: 1;
  color: rgba(220, 38, 38, 0.7);
}

.ready-viz:is([data-phase="readiness"], [data-phase="risk"]) .ready-viz__line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.4s var(--rv-ease) 0.3s;
}

.ready-viz:is([data-phase="readiness"], [data-phase="risk"]) .ready-viz__area {
  opacity: 1;
}

.ready-viz[data-phase="risk"] .ready-viz__threshold {
  stroke: #dc2626;
}

/* Operators by readiness band */
.ready-viz__bands-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 1.2cqw;
  margin-top: 0.6cqw;
}

.ready-viz__donut {
  width: 38%;
  max-height: 100%;
  flex-shrink: 0;
  aspect-ratio: 1;
  overflow: visible;
}

.ready-viz__donut text {
  font-size: 8px;
  font-weight: 700;
  fill: var(--rv-ink);
}

.ready-viz__seg {
  fill: none;
  stroke-width: 6;
  stroke-dasharray: 0 100;
  stroke-dashoffset: var(--off);
  transition: stroke-dasharray 0s linear 0.6s, opacity 0.4s ease;
}

.ready-viz__seg--high { stroke: var(--rv-high); }
.ready-viz__seg--average { stroke: var(--rv-average); }
.ready-viz__seg--risk { stroke: var(--rv-risk); }
.ready-viz__seg--critical { stroke: var(--rv-critical); }
.ready-viz__seg--none { stroke: var(--rv-none); }

.ready-viz:is([data-phase="readiness"], [data-phase="risk"]) .ready-viz__seg {
  stroke-dasharray: calc(var(--len) * 1px) calc((100 - var(--len)) * 1px);
  transition: stroke-dasharray 1.1s var(--rv-ease) 0.35s, opacity 0.4s ease;
}

.ready-viz[data-phase="risk"] :is(.ready-viz__seg--high, .ready-viz__seg--average, .ready-viz__seg--none) {
  opacity: 0.22;
}

.ready-viz__legend {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.35cqw;
}

.ready-viz__legend li {
  display: flex;
  align-items: center;
  gap: 0.6cqw;
  font-size: clamp(6px, 0.92cqw, 8px);
  line-height: 1.25;
  color: var(--rv-muted);
  transition: opacity 0.4s ease, color 0.4s ease;
}

.ready-viz__legend li::before {
  content: "";
  width: 0.75em;
  height: 0.75em;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--rv-dot);
}

.ready-viz__legend span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ready-viz__legend b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--rv-ink);
}

.ready-viz__legend--high { --rv-dot: var(--rv-high); }
.ready-viz__legend--average { --rv-dot: var(--rv-average); }
.ready-viz__legend--risk { --rv-dot: var(--rv-risk); }
.ready-viz__legend--critical { --rv-dot: var(--rv-critical); }
.ready-viz__legend--none { --rv-dot: var(--rv-none); }

.ready-viz[data-phase="risk"] :is(.ready-viz__legend--high, .ready-viz__legend--average, .ready-viz__legend--none) {
  opacity: 0.4;
}

.ready-viz[data-phase="risk"] :is(.ready-viz__legend--risk, .ready-viz__legend--critical) {
  font-weight: 600;
  color: var(--rv-ink);
}

/* Who is certified where */
.ready-viz__matrix {
  height: 100%;
}

.ready-viz__matrix table {
  width: 100%;
  margin-top: 0.7cqw;
  border-collapse: separate;
  border-spacing: 0.4cqw 0.35cqw;
  table-layout: fixed;
  font-size: clamp(6px, 0.95cqw, 8.5px);
  line-height: 1.2;
}

.ready-viz__matrix th {
  overflow: hidden;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--rv-muted);
}

.ready-viz__matrix thead th {
  font-size: 0.92em;
  color: var(--rv-faint);
}

.ready-viz__matrix thead th:first-child,
.ready-viz__matrix tbody th {
  width: 30%;
}

.ready-viz__matrix td {
  padding: 0;
}

.ready-viz__cell {
  display: block;
  padding: 0.5cqw 0;
  border-radius: 3px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #fff;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0s linear 0.5s, transform 0s linear 0.5s;
}

.ready-viz__cell--full { background: #16a34a; }
.ready-viz__cell--partial { background: #f59e0b; }
.ready-viz__cell--low { background: #ef4444; }
.ready-viz__cell--empty { background: #eef0f3; }

.ready-viz__cell--empty::before {
  content: "\00a0";
}

.ready-viz[data-phase="certification"] .ready-viz__cell {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.3s ease calc(0.35s + var(--i) * 0.04s),
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.35s + var(--i) * 0.04s);
}

/* Steps panel: each step is clickable */
.ready-viz__panel {
  position: absolute;
  top: 3%;
  right: 0;
  width: clamp(180px, 29%, 220px);
  padding: 9px 14px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 28px -16px rgba(23, 34, 53, 0.28), 0 0 0 1px rgba(23, 34, 53, 0.04);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}

.ready-viz__panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(11.5px, 2.05cqw, 13px);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.ready-viz__panel-dot {
  position: relative;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--rv-cyan);
}

.ready-viz__panel-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--rv-cyan);
  opacity: 0;
  animation: ready-viz-echo 1.4s ease-out infinite;
}

@keyframes ready-viz-echo {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.6); opacity: 0; }
}

.ready-viz__steps {
  display: grid;
  gap: 2px;
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid rgba(23, 34, 53, 0.08);
}

.ready-viz__step {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% + 10px);
  margin: 0 -5px;
  padding: 2px 5px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: clamp(11px, 1.95cqw, 12.5px);
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  color: rgba(23, 34, 53, 0.42);
  cursor: pointer;
  transition: color 0.35s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.ready-viz__step:hover {
  background: rgba(23, 34, 53, 0.05);
}

.ready-viz__step:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.ready-viz__step[data-state="active"] {
  color: var(--rv-ink);
}

.ready-viz__step[data-state="done"] {
  color: rgba(23, 34, 53, 0.78);
}

.ready-viz__step-mark {
  position: relative;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(23, 34, 53, 0.2);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ready-viz__step[data-state="active"] .ready-viz__step-mark {
  border-color: var(--rv-cyan);
  border-right-color: rgba(14, 165, 233, 0.15);
  animation: ready-viz-spin 0.9s linear infinite;
}

.ready-viz.is-pinned .ready-viz__step[data-state="active"] .ready-viz__step-mark {
  animation: none;
  border-color: var(--rv-cyan);
  background: rgba(14, 165, 233, 0.15);
}

.ready-viz__step[data-state="done"] .ready-viz__step-mark {
  border-color: var(--rv-cyan-deep);
  background: var(--rv-cyan-deep);
}

.ready-viz__step[data-state="done"] .ready-viz__step-mark::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 1.5px;
  width: 3px;
  height: 6px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

@keyframes ready-viz-spin {
  to { transform: rotate(360deg); }
}

/* Detail card: the numbers behind the current step */
.ready-viz__detail {
  position: absolute;
  right: 0;
  bottom: 2%;
  width: clamp(220px, 36%, 270px);
  display: grid;
  padding: 11px 14px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px -16px rgba(23, 34, 53, 0.36), 0 0 0 1px rgba(23, 34, 53, 0.04);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}

.ready-viz__pane {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  opacity: var(--on, 0);
  transform: translateY(calc((1 - var(--on, 0)) * 4px));
  transition: opacity 0.35s ease calc(var(--on, 0) * 0.45s), transform 0.35s ease calc(var(--on, 0) * 0.45s);
}

.ready-viz__pane-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: clamp(8px, 1.3cqw, 9.5px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--rv-cyan-deep);
}

.ready-viz__pane-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 500;
  color: var(--rv-faint);
}

.ready-viz__big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
  font-size: clamp(20px, 4cqw, 28px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.ready-viz__big small {
  font-size: clamp(9.5px, 1.6cqw, 11px);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--rv-muted);
}

.ready-viz__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.ready-viz__split p {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(23, 34, 53, 0.05);
  font-size: clamp(9px, 1.5cqw, 10.5px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--rv-muted);
}

.ready-viz__split b {
  font-size: 1.25em;
  font-weight: 700;
  color: var(--rv-ink);
}

.ready-viz__split .is-below b {
  color: #dc2626;
}

.ready-viz__risk {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.ready-viz__risk li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(10px, 1.7cqw, 11.5px);
  line-height: 1.3;
  opacity: var(--on, 0);
  transform: translateX(calc((1 - var(--on, 0)) * 6px));
  transition:
    opacity 0.3s ease calc(var(--on, 0) * (0.6s + var(--i) * 0.12s)),
    transform 0.3s ease calc(var(--on, 0) * (0.6s + var(--i) * 0.12s));
}

.ready-viz__risk-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ready-viz__risk b {
  width: 2ch;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #dc2626;
}

.ready-viz__chip {
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1.6;
}

.ready-viz__chip--risk {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.ready-viz__chip--critical {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.ready-viz__bar {
  display: block;
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 34, 53, 0.08);
}

.ready-viz__bar i {
  display: block;
  width: 77%;
  height: 100%;
  border-radius: inherit;
  background: var(--rv-high);
  transform: scaleX(var(--on, 0));
  transform-origin: left center;
  transition: transform 0.9s var(--rv-ease) calc(var(--on, 0) * 0.6s);
}

.ready-viz__foot {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(23, 34, 53, 0.08);
  font-size: clamp(9.5px, 1.6cqw, 11px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--rv-teal);
}

[data-for="risk"] .ready-viz__foot {
  color: #b91c1c;
}

.ready-viz.is-paused *,
.ready-viz.is-paused *::before,
.ready-viz.is-paused *::after {
  animation-play-state: paused !important;
}

/* Narrow containers: taller stage, panel on top, app full width without the sidebar, detail below */
@container ready-viz (max-width: 480px) {
  .ready-viz__stage {
    aspect-ratio: 0.74;
  }

  .ready-viz__app {
    top: 22%;
    width: 100%;
    height: 46%;
    grid-template-columns: minmax(0, 1fr);
    border-radius: 12px;
  }

  .ready-viz__side,
  .ready-viz__sub,
  .ready-viz__kpi small {
    display: none;
  }

  .ready-viz__main {
    gap: 2cqw;
    padding: 3cqw;
  }

  .ready-viz__panel {
    top: 0;
    width: 66%;
    padding: 7px 9px 8px;
    border-radius: 10px;
  }

  .ready-viz__panel-title {
    gap: 6px;
    font-size: 11px;
  }

  .ready-viz__steps {
    margin-top: 6px;
    padding-top: 5px;
  }

  .ready-viz__step {
    gap: 6px;
    font-size: 10.5px;
  }

  .ready-viz__step-mark {
    width: 11px;
    height: 11px;
  }

  .ready-viz__step[data-state="done"] .ready-viz__step-mark::after {
    left: 2.6px;
    top: 0.8px;
  }

  .ready-viz__detail {
    bottom: 0;
    width: 74%;
    padding: 9px 11px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ready-viz *,
  .ready-viz *::before,
  .ready-viz *::after {
    animation: none !important;
    transition: none !important;
  }
}
