.student-practice-momentum {
  width: min(100%, 540px);
  min-width: 0;
}

.student-practice-momentum__surface {
  width: 100%;
  min-height: 196px;
}

.student-practice-momentum__card {
  display: grid;
  grid-template-rows: auto minmax(62px, 1fr) auto;
  gap: 14px;
  min-height: 188px;
  width: 100%;
  padding: 16px 18px 14px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--student-theme-primary, #5a78ff) 20%, rgba(31, 47, 82, .1));
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--student-theme-secondary, #dce6ff) 48%, transparent) 0 34%, transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, .96), color-mix(in srgb, #eef4ff 74%, var(--student-theme-secondary, #dce6ff) 26%));
  box-shadow: inset 0 1px rgba(255, 255, 255, .78), 0 18px 34px rgba(31, 47, 82, .1);
}

.student-practice-momentum__top,
.student-practice-momentum__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.student-practice-momentum__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.student-practice-momentum__copy span {
  color: color-mix(in srgb, var(--text-body) 86%, var(--student-theme-primary, #5a78ff) 14%);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1.05;
  text-transform: uppercase;
}

.student-practice-momentum__copy strong {
  color: var(--text-strong);
  font-size: 1.04rem;
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.student-practice-momentum__pill {
  flex: 0 0 auto;
  min-width: 58px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--student-theme-primary, #5a78ff) 24%, rgba(31, 47, 82, .12));
  background: rgba(255, 255, 255, .72);
  color: color-mix(in srgb, var(--student-theme-primary, #5a78ff) 74%, var(--text-strong) 26%);
  font-size: .86rem;
  font-weight: 900;
  line-height: 1;
}

.student-practice-momentum__chart {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: clamp(8px, 1.4vw, 14px);
  min-height: 70px;
  padding: 8px 2px 2px;
}

.student-practice-momentum__bar {
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--bar-height, 32%);
  min-height: 22px;
  border-radius: 16px 16px 10px 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--student-theme-primary, #5a78ff) 52%, #ffffff 48%), color-mix(in srgb, var(--student-theme-primary, #5a78ff) 76%, #ffffff 24%));
  box-shadow: inset 0 1px rgba(255, 255, 255, .62), 0 10px 18px rgba(31, 47, 82, .1);
}

.student-practice-momentum__bar.is-latest {
  background: linear-gradient(180deg, #f6d47a, #e9b94f);
}

.student-practice-momentum__bar.is-empty {
  min-height: 18px;
  border: 1px dashed color-mix(in srgb, var(--student-theme-primary, #5a78ff) 26%, rgba(31, 47, 82, .18));
  background: rgba(255, 255, 255, .44);
  box-shadow: none;
}

.student-practice-momentum__footer {
  align-items: end;
  color: var(--text-body);
  font-size: .82rem;
  font-weight: 720;
  line-height: 1.25;
}

.student-practice-momentum__footer span,
.student-practice-momentum__footer small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.student-practice-momentum__footer small {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--text-soft) 86%, var(--student-theme-primary, #5a78ff) 14%);
  font-size: .74rem;
  font-weight: 820;
  text-align: right;
}

.student-practice-page--ux-refresh .student-storage-mode-switch--hero .student-storage-mode-switch__control.student-segmented--views {
  min-height: 52px;
}

.student-practice-page--ux-refresh .student-storage-mode-switch--hero .student-storage-mode-switch__control .student-segmented__button {
  min-height: 44px;
}

html[data-appearance="dark"] .student-practice-momentum__card,
html[data-theme="dark"] .student-practice-momentum__card,
body.theme-dark .student-practice-momentum__card {
  border-color: color-mix(in srgb, var(--student-theme-primary, #5a78ff) 34%, rgba(188, 198, 230, .2));
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--student-theme-primary, #5a78ff) 28%, transparent) 0 34%, transparent 35%),
    linear-gradient(145deg, rgba(19, 28, 48, .96), rgba(10, 16, 30, .94));
  box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 18px 34px rgba(0, 0, 0, .3);
}

html[data-appearance="dark"] .student-practice-momentum__pill,
html[data-theme="dark"] .student-practice-momentum__pill,
body.theme-dark .student-practice-momentum__pill {
  background: rgba(255, 255, 255, .1);
  color: var(--text-strong);
}

html[data-appearance="high-contrast"] .student-practice-momentum__card {
  border-color: #111;
  background: #fff;
  box-shadow: none;
}

html[data-appearance="high-contrast"] .student-practice-momentum__bar {
  background: #111;
  box-shadow: none;
}

html[data-appearance="high-contrast"] .student-practice-momentum__bar.is-latest {
  background: #444;
}

@media (max-width: 760px) {
  .student-practice-momentum__surface {
    min-height: 168px;
  }

  .student-practice-momentum__card {
    grid-template-rows: auto minmax(52px, 1fr) auto;
    min-height: 160px;
    gap: 10px;
    padding: 13px 14px 12px;
    border-radius: 20px;
  }

  .student-practice-momentum__chart {
    min-height: 58px;
    gap: 8px;
  }

  .student-practice-momentum__copy strong {
    font-size: .96rem;
  }

  .student-practice-momentum__footer {
    font-size: .78rem;
  }
}

@media (max-width: 720px) {
  .student-practice-page--ux-refresh.student-game-hub-page:not(.student-home-page) .student-section-hero__aside {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
  }

  .student-practice-page--ux-refresh .student-section-hero__aside .student-practice-momentum {
    width: 100%;
  }

  .student-practice-page--ux-refresh .student-practice-momentum__surface {
    min-height: 138px;
  }

  .student-practice-page--ux-refresh .student-practice-momentum__card {
    grid-template-rows: auto minmax(38px, 1fr) auto;
    min-height: 132px;
    padding: 12px;
  }

  .student-practice-page--ux-refresh .student-practice-momentum__chart {
    min-height: 44px;
    padding-top: 2px;
  }

  .student-practice-page--ux-refresh .student-practice-momentum__bar {
    min-height: 16px;
    border-radius: 12px 12px 8px 8px;
  }
}

@media (max-width: 430px) {
  .student-practice-momentum__top,
  .student-practice-momentum__footer {
    gap: 8px;
  }

  .student-practice-momentum__pill {
    min-width: 50px;
    padding-inline: 9px;
  }

  .student-practice-momentum__footer small {
    max-width: 9ch;
  }
}
