.phase3-visual-card {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid #d8e4ed;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(30, 58, 95, .055);
}
.phase3-visual-card[hidden] { display: none !important; }
.phase3-visual-card h3 {
  margin: 0;
  color: #172b43;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
}
.phase3-visual-intro, .phase3-visual-note {
  margin: 5px 0 10px;
  color: #587086;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.phase3-visual-note { margin: 9px 0 0; }
.phase3-visual-frame {
  overflow: hidden;
  border: 1px solid #dbe5ed;
  border-radius: 14px;
  background: #fbfdff;
}
.phase3-visual-frame svg {
  display: block;
  width: 100%;
  height: auto;
  outline-offset: -3px;
}
.phase3-visual-frame svg:focus-visible {
  outline: 3px solid #326d98;
  border-radius: 12px;
}
.phase3-visual-grid { stroke: rgba(30, 58, 95, .11); stroke-width: 1; }
.phase3-visual-axis { stroke: rgba(30, 58, 95, .24); stroke-width: 1; }
.phase3-visual-tick {
  fill: #526a80;
  font-size: 11px;
  font-weight: 750;
}
.phase3-visual-reference {
  stroke: #c47a20;
  stroke-width: 1.6;
  stroke-dasharray: 5 5;
}
.phase3-visual-average {
  stroke: #5b7f62;
  stroke-width: 2;
  stroke-dasharray: 6 5;
}
.phase3-visual-primary {
  fill: none;
  stroke: #1f5a87;
  stroke-width: 3.3;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.phase3-visual-secondary {
  fill: none;
  stroke: #5b7f62;
  stroke-width: 3;
  stroke-dasharray: 7 5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.phase3-visual-secondary.is-dense {
  stroke: #79a58b;
  stroke-width: 2.7;
  stroke-dasharray: none;
}
.phase3-visual-active { display: none; pointer-events: none; }
.phase3-visual-active.is-visible { display: initial; }
.phase3-visual-active line {
  stroke: #7da2bc;
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
}
.phase3-visual-active circle {
  fill: #fff;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}
.phase3-visual-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
}
.phase3-visual-key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid #dee7ee;
  border-radius: 999px;
  color: #51687d;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}
.phase3-visual-swatch {
  display: inline-block;
  width: 21px;
  border-top: 3px solid #1f5a87;
}
.phase3-visual-swatch.secondary {
  border-color: #5b7f62;
  border-top-style: dashed;
}
.phase3-visual-swatch.secondary.is-dense {
  border-color: #79a58b;
  border-top-style: solid;
}
.phase3-visual-swatch.average {
  border-color: #5b7f62;
  border-top-style: dashed;
}
.phase3-visual-swatch.target {
  border-color: #c47a20;
  border-top-style: dashed;
}
.phase3-visual-details {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #cbdbe7;
  border-radius: 11px;
  background: #f7fafc;
}
.phase3-visual-detail-date {
  color: #315f82;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.4;
}
.phase3-visual-detail {
  min-width: 0;
  padding-left: 10px;
  border-left: 1px solid #d8e4ec;
  color: #52697f;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.4;
}
.phase3-visual-detail strong {
  display: block;
  margin-top: 3px;
  color: #172b43;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.phase3-sf-outcome {
  width: fit-content;
  max-width: 100%;
  margin: 9px 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #a9c5ad;
  border-radius: 9px;
  background: #edf6ef;
  color: #315e3a;
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}
.phase3-sf-outcome.is-short {
  border-color: #dfbc8c;
  background: #fff5e7;
  color: #945619;
}
.phase3-sf-outcome[hidden] { display: none !important; }
.phase3-check-scroll-note {
  margin: 10px 0 5px;
  color: #52697f;
  font-size: 11px;
  font-weight: 750;
}
.phase3-check-scroll {
  max-height: 414px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 6px 4px 0;
  scrollbar-gutter: stable;
  border-bottom: 1px solid #dee7ee;
}
.phase3-check-row {
  display: block;
  width: 100%;
  margin: 0 0 5px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #172b43;
  font: inherit;
}
.phase3-check-row:hover,
.phase3-check-row:focus-visible,
.phase3-check-row.is-active {
  background: #eef6fb;
  border-color: #cbdbe7;
  outline: none;
}
.phase3-check-row.is-short { background: #fff9f0; }
.phase3-check-row.is-short.is-active,
.phase3-check-row.is-short:focus-visible { border-color: #dfaa74; }
.phase3-check-row.is-tightest { box-shadow: inset 3px 0 #c47a20; }
.phase3-check-row-head .phase3-check-tightest-label {
  padding: 2px 5px;
  border-radius: 7px;
  background: #f9eada;
  color: #875319;
  font-size: 10px;
}
.phase3-check-row-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.phase3-check-row-head strong { font-size: 12px; font-weight: 850; }
.phase3-check-row-head span {
  color: #315f82;
  font-size: 12px;
  font-weight: 850;
}
.phase3-check-row.is-short .phase3-check-row-head span { color: #9b5b12; }
.phase3-check-row.is-short .phase3-check-row-head .phase3-check-outcome {
  padding: 3px 7px;
  border: 1px solid #dfaa74;
  border-radius: 8px;
  background: #fff0da;
  color: #875019;
}
.phase3-check-track {
  position: relative;
  display: flex;
  width: 100%;
  height: 17px;
  background: #e8eef3;
  border-radius: 4px;
  overflow: hidden;
}
.phase3-check-segment { display: block; flex: 0 0 auto; height: 100%; min-width: 0; }
.phase3-check-segment.bills { background: #1f5a87; }
.phase3-check-segment.savings { background: #78a5c3; }
.phase3-check-segment.spending { background: #94a3b8; }
.phase3-check-segment.unallocated { background: #5b7f62; }
.phase3-check-detail-panel {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid #cbdbe7;
  border-radius: 11px;
  background: #f7fafc;
}
.phase3-check-detail-panel > strong {
  display: block;
  margin-bottom: 7px;
  color: #315f82;
  font-size: 12px;
}
.phase3-check-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.phase3-check-detail-grid span {
  color: #52697f;
  font-size: 10px;
  font-weight: 750;
}
.phase3-check-detail-grid strong {
  display: block;
  margin-top: 3px;
  color: #172b43;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.phase3-debt-list { display: grid; gap: 13px; margin-top: 12px; }
.phase3-debt-row {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e1e9ef;
  border-radius: 12px;
  background: #fbfdff;
}
.phase3-debt-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-bottom: 7px;
}
.phase3-debt-head strong { color: #172b43; font-size: 13px; }
.phase3-debt-head span { color: #52697f; font-size: 11px; font-weight: 750; }
.phase3-debt-bar-line { display: flex; align-items: center; gap: 9px; }
.phase3-debt-track {
  flex: 1;
  min-width: 0;
  height: 11px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5edf3;
}
.phase3-debt-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 99px;
  background: #1f5a87;
}
.phase3-debt-time {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex: 0 0 98px;
  color: #213e5e;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.phase3-debt-rank {
  border-radius: 8px;
  background: #eaf1f8;
  padding: 2px 5px;
  color: #1f5a87;
  font-size: 10px;
}
.phase3-debt-axis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
  padding: 0 120px 0 13px;
  color: #52697f;
  font-size: 11px;
  font-weight: 750;
}
.phase3-debt-axis span:nth-child(2) { justify-self: center; }
.phase3-debt-axis span:nth-child(3) { justify-self: end; }
@media (max-width: 600px) {
  .phase3-visual-card { padding: 13px; }
  .phase3-visual-tick { font-size: 12px; }
  .phase3-visual-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .phase3-visual-detail-date { grid-column: 1 / -1; }
  .phase3-visual-detail { padding-left: 8px; }
  .phase3-visual-detail:nth-child(2) { border-left: 0; padding-left: 0; }
  .phase3-check-detail-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .phase3-debt-time { flex-basis: 76px; flex-wrap: wrap; }
  .phase3-debt-axis { padding-right: 98px; }
  .phase3-debt-head { display: block; }
  .phase3-debt-head span { display: block; margin-top: 3px; }
}
