/* Performance statistics page — st- prefix */

.st-page {
  --st-pad: 16px;
  --st-border: #ededed;
  --st-green: #3cca55;
  --st-green-border: #cfe9d6;
  --st-bar: #ededed;
  --st-plot-h: 200px;
  --st-yaxis-w: 40px;
  background: var(--white);
}

@media (min-width: 768px) {
  .st-page {
    --st-pad: 48px;
    --st-plot-h: 260px;
    --st-yaxis-w: 48px;
  }
}

@media (min-width: 1024px) {
  .st-page {
    --st-plot-h: 340px;
  }
}

@media (min-width: 1440px) {
  .st-page {
    --st-pad: 100px;
  }
}

.st-container {
  width: 100%;
  max-width: calc(1240px + 2 * var(--st-pad));
  margin-inline: auto;
  padding-inline: var(--st-pad);
}

:where(.st-page) p {
  margin: 0;
}

.st-card {
  background: var(--white);
  border: 1px solid var(--st-border);
  border-radius: var(--radius-lg);
}

/* ---------- Hero + KPIs ---------- */

.st-hero {
  padding-top: 40px;
}

@media (min-width: 1024px) {
  .st-hero {
    padding-top: 64px;
  }
}

.st-hero__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 900px) {
  .st-hero__head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
  }
}

.st-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}

.st-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.36px;
  color: var(--black);
}

@media (min-width: 1024px) {
  .st-hero__title {
    font-size: 48px;
    letter-spacing: -0.48px;
  }
}

.st-hero__lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey-600);
}

.st-hero__updated {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--grey-700);
}

.st-hero__updated span {
  color: var(--grey-500);
}

.st-kpis {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .st-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .st-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 44px;
  }
}

.st-kpi {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

@media (min-width: 1024px) {
  .st-kpi {
    padding: 24px 28px 28px;
  }
}

.st-kpi__value {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.36px;
  color: var(--black);
  white-space: nowrap;
}

.st-kpi__label {
  margin-top: 24px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--black);
}

.st-kpi__label sup {
  font-size: 10px;
  line-height: 0;
  margin-left: 1px;
}

.st-note-ref {
  color: inherit;
  text-decoration: none;
}

.st-kpi__text {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--grey-600);
}

.st-kpi--positive {
  background: var(--green-50);
  border-color: var(--st-green-border);
}

.st-kpi--positive .st-kpi__value {
  color: var(--st-green);
}

/* ---------- Sections ---------- */

.st-section {
  padding-top: 48px;
}

@media (min-width: 1024px) {
  .st-section {
    padding-top: 64px;
  }
}

.st-section__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.28px;
  color: var(--black);
}

@media (min-width: 1024px) {
  .st-section__title {
    font-size: 32px;
    letter-spacing: -0.32px;
  }
}

.st-section__lead {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--grey-600);
}

/* ---------- Bar chart ---------- */

.st-chart {
  position: relative;
  margin-top: 20px;
  padding: 24px 16px 16px 12px;
}

@media (min-width: 768px) {
  .st-chart {
    margin-top: 24px;
    padding: 48px 32px 28px 28px;
  }
}

.st-chart__frame {
  display: grid;
  grid-template-columns: var(--st-yaxis-w) minmax(0, 1fr);
}

.st-chart__yaxis {
  position: relative;
  height: var(--st-plot-h);
}

.st-chart__yaxis span {
  position: absolute;
  left: 0;
  transform: translateY(50%);
  font-size: 11px;
  line-height: 1;
  color: var(--grey-500);
  white-space: nowrap;
}

.st-chart__main {
  min-width: 0;
}

.st-chart__plot {
  position: relative;
  height: var(--st-plot-h);
}

.st-chart__grid span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: #f2f2f2;
}

.st-chart__bars {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  height: 100%;
  outline: none;
  cursor: default;
  touch-action: pan-y;
}

.st-chart__bars:focus-visible {
  border-radius: 4px;
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--pink-600);
}

.st-chart__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 1px;
}

@media (min-width: 768px) {
  .st-chart__col {
    padding: 0 3px;
  }
}

.st-chart__bar {
  display: block;
  width: 100%;
  min-height: 1px;
  border-radius: 2px 2px 0 0;
  background: var(--st-bar);
  transition: background-color 120ms ease;
}

.st-chart__col.is-active .st-chart__bar {
  background: var(--pink-600);
}

.st-chart__tip {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px 7px;
  background: var(--white);
  border: 1px solid var(--pink-500);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(28, 1, 35, 0.06);
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -8px);
}

.st-chart__tip[data-mode="top-start"] {
  transform: translate(0, -8px);
}

.st-chart__tip[data-mode="top-end"] {
  transform: translate(-100%, -8px);
}

.st-chart__tip[data-mode="left"] {
  transform: translate(calc(-100% - 6px), 100%);
}

.st-chart__tip[data-mode="right"] {
  transform: translate(6px, 100%);
}

.st-chart__tip-label {
  font-size: 11px;
  line-height: 1.3;
  color: var(--grey-600);
}

.st-chart__tip-value {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--pink-600);
}

@media (min-width: 768px) {
  .st-chart__tip-label {
    font-size: 12px;
  }

  .st-chart__tip-value {
    font-size: 16px;
  }
}

.st-chart__xaxis {
  display: flex;
  height: 28px;
  padding-top: 10px;
}

.st-chart__xlabel {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: center;
  overflow: visible;
  font-size: 10px;
  line-height: 1;
  color: var(--grey-500);
  white-space: nowrap;
}

.st-chart__xlabel.is-year {
  color: var(--black);
  font-weight: 600;
}

.st-chart__xlabel.is-minor {
  visibility: hidden;
}

@media (min-width: 768px) {
  .st-chart__xlabel {
    font-size: 11px;
  }

  .st-chart__xlabel.is-minor {
    visibility: visible;
  }
}

/* ---------- Loan performance ---------- */

.st-perf {
  padding: 24px 16px 28px;
}

@media (min-width: 768px) {
  .st-perf {
    padding: 32px 30px 36px;
  }
}

.st-perf__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  color: var(--black);
}

@media (min-width: 1024px) {
  .st-perf__title {
    font-size: 24px;
  }
}

.st-perf__lead {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--grey-600);
}

.st-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.4;
  color: var(--grey-600);
}

.st-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.st-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.st-donuts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .st-donuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.st-donut {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.st-donut__chart {
  position: relative;
  width: 168px;
  height: 168px;
}

@media (min-width: 1024px) {
  .st-donut__chart {
    width: 200px;
    height: 200px;
  }
}

.st-donut__chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.st-donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.st-donut__center strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  color: var(--black);
}

.st-donut__center span {
  font-size: 11px;
  line-height: 1.3;
  color: var(--grey-500);
}

.st-donut__country {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--black);
}

/* ---------- Notes ---------- */

.st-notes {
  padding: 32px 0 64px;
}

@media (min-width: 1024px) {
  .st-notes {
    padding-bottom: 80px;
  }
}

.st-notes p {
  max-width: 900px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--grey-500);
}

.st-notes sup {
  font-size: 9px;
}
