/* Student progress shares portal controls; the public display has its own quiet, cinematic canvas. */
.progress-overview {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr);
  background: #14223f;
  color: #f3f6fc;
  border-radius: 16px;
  overflow: hidden;
}
.progress-overview__world {
  min-width: 0;
  display: flex;
  align-items: center;
  background: radial-gradient(ellipse at center, #233c59 0, transparent 65%);
}
.progress-world {
  display: block;
  width: 100%;
  height: auto;
}
.progress-overview__world .progress-world {
  max-height: 280px;
}
.progress-mobile-sort {
  display: none;
}
.progress-mission {
  padding: 40px 32px;
  align-self: center;
  min-width: 0;
}
.progress-overview .progress-mission {
  padding: 24px 32px;
}
.progress-mission h2 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 500px;
  margin: 16px 0 24px;
  color: inherit;
}
.progress-eyebrow {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b6d7d9;
}
.progress-score {
  font-size: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 16px;
}
.progress-score > span {
  font-size: 0.48em;
  font-weight: 450;
  letter-spacing: 0;
  color: #c2cde0;
  white-space: nowrap;
}
.progress-meter {
  height: 12px;
  border-radius: 99px;
  background: #42536c;
  overflow: hidden;
  width: 100%;
}
.progress-meter > span {
  height: 100%;
  display: block;
  background: #a8d8ca;
  border-radius: 99px;
  transition: width 800ms ease;
}
.progress-next {
  margin: 14px 0 24px;
  color: #eee6ca;
  font-size: 17px;
  line-height: 1.5;
}
.progress-how {
  font-size: 15px;
  color: #bfcee0;
  line-height: 1.5;
  margin: 0;
}
.progress-overview__facts {
  grid-column: 1/-1;
  border-top: 1px solid #3d4e66;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 16px 24px;
  font-size: 13px;
  color: #c2d0e2;
}
.progress-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.progress-toolbar > .field {
  max-width: 220px;
  flex: 1;
}
.progress-connection {
  font-size: 13px;
  color: var(--color-text-secondary);
  padding-bottom: 12px;
  line-height: 1.5;
}
.progress-connection::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--color-success);
  border-radius: 50%;
  margin-right: 8px;
}
.progress-connection[data-phase='offline']::before,
.progress-connection[data-phase='forbidden']::before,
.progress-connection[data-phase='unauthorized']::before {
  background: var(--color-warning);
}
.progress-filters {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.progress-filters > .field:first-child {
  flex: 2;
  min-width: 200px;
}
.progress-filters > div:not(.field) {
  min-width: 140px;
  flex: 1;
}
.progress-filters > .field {
  flex: 1;
  min-width: 150px;
}
.progress-list__summary {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 16px;
  color: var(--color-text-secondary);
  font-size: 14px;
}
.progress-list__summary > span:first-child {
  margin-right: auto;
}
.progress-sort {
  font: inherit;
  font-weight: 600;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  padding: 8px 0;
  min-height: 36px;
  white-space: nowrap;
}
.progress-sort:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 3px;
}
.progress-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}
.progress-person > div > span {
  display: block;
  margin-top: 3px;
}
.progress-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #e5eef9;
  color: #244c7c;
  font-size: 26px;
  line-height: 1;
}
.progress-avatar--leaf {
  color: #226344;
  background: #e1f1e4;
}
.progress-avatar--orbit {
  color: #69498d;
  background: #eee5f6;
}
.progress-avatar--spark {
  color: #78531d;
  background: #f7edcc;
}
.progress-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.progress-date-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-height: 140px;
  overflow: auto;
}
.progress-date-list > span {
  background: var(--color-surface-sunken);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
}
.progress-history {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 320px;
  overflow: auto;
}
.progress-history > li {
  border-bottom: 1px solid var(--color-divider);
  padding: 16px 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-direction: column;
}
.progress-history > li > span {
  font-size: 13px;
  color: var(--color-text-secondary);
}
.progress-tv {
  box-sizing: border-box;
  min-height: 100svh;
  background: #14223f;
  color: #f5f7fd;
  padding: 32px 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  font-family: var(--font-sans);
}
.progress-tv__header {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  min-height: 50px;
  color: #b8c9de;
}
.progress-tv__brand {
  color: #f0dfb8 !important;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none !important;
}
.progress-tv__brand > span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  border-left: 1px solid #52607a;
  padding-left: 20px;
  color: #c5d9e6;
}
.progress-tv__year {
  margin-left: auto;
  font-size: 16px;
}
.progress-tv__controls {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.progress-tv__controls .btn {
  background: #213752;
  border-color: #57718e;
  color: #eef4fa;
  font-size: 13px;
  min-height: 36px;
}
.progress-tv__controls a {
  color: #c5d9e6;
}
.progress-tv__main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(350px, 1fr);
  align-items: center;
  gap: 0;
  min-height: 650px;
}
.progress-tv__scene {
  min-width: 0;
  background: radial-gradient(ellipse at 50% 55%, #23486070, transparent 67%);
  margin-left: -35px;
}
.progress-tv__goal {
  padding: 24px 12px 24px 20px;
  min-width: 0;
}
.progress-tv__goal > .progress-mission {
  padding: 0;
}
.progress-tv__goal h1 {
  font-size: clamp(46px, 3.65vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.045em;
  margin: 24px 0 40px;
  color: #f4f5fb;
}
.progress-tv__goal .progress-eyebrow {
  font-size: clamp(16px, 1.15vw, 22px);
  max-width: 400px;
  line-height: 1.5;
}
.progress-tv__goal .progress-score {
  font-size: clamp(48px, 4.2vw, 80px);
  margin-bottom: 28px;
}
.progress-tv__goal .progress-meter {
  height: 18px;
}
.progress-tv__goal .progress-next {
  font-size: clamp(24px, 1.7vw, 32px);
  margin: 24px 0 36px;
}
.progress-tv__goal .progress-how {
  font-size: clamp(22px, 1.5vw, 28px);
  max-width: 450px;
}
.progress-tv__footer {
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid #3a4d68;
  padding: 28px 0 10px;
}
.progress-tv__footer .progress-connection {
  color: #c1cfde;
  flex: none;
  font-size: 14px;
  max-width: 280px;
}
.progress-tv__footer .progress-connection::before {
  background: #a8d8ca;
}
.progress-tv__footer .progress-connection[data-phase='offline']::before {
  background: #e9bf77;
}
.progress-celebrations {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  flex: 1;
}
.progress-celebrations > .progress-eyebrow {
  width: 100%;
  font-size: 16px;
}
.progress-celebrations > p {
  font-size: clamp(22px, 1.6vw, 32px);
  margin: 0;
  color: #d4deed;
}
.progress-celebration {
  display: flex;
  gap: 16px;
  align-items: center;
  animation: progress-enter 400ms ease-out;
}
.progress-celebration .progress-avatar {
  width: 62px;
  height: 62px;
  font-size: 42px;
  border-radius: 20px;
}
.progress-celebration strong {
  font-size: 30px;
  display: block;
}
.progress-celebration span:not(.progress-avatar) {
  font-size: 20px;
  display: block;
  color: #c5d7e3;
  margin-top: 3px;
}
.progress-tv__unavailable:not([hidden]) {
  position: absolute;
  inset: 0;
  background: #14223f;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  padding: 48px;
  text-align: center;
}
.progress-tv__unavailable h1 {
  font-size: 56px;
  margin: 0;
}
.progress-tv__unavailable p {
  font-size: 28px;
  max-width: 700px;
  line-height: 1.5;
}
@keyframes progress-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 2200px) {
  .progress-tv {
    padding: 2vw 3vw;
  }
  .progress-tv__header {
    min-height: 4vw;
  }
  .progress-tv__main {
    min-height: 65vh;
  }
  .progress-tv__footer {
    min-height: 15vh;
  }
  .progress-tv__brand {
    font-size: 2vw;
  }
  .progress-tv__brand > span,
  .progress-tv__year,
  .progress-tv__footer .progress-connection {
    font-size: 1.1vw;
  }
  .progress-tv__goal h1 {
    font-size: 3.65vw;
  }
  .progress-tv__goal .progress-score {
    font-size: 4.2vw;
  }
  .progress-tv__goal .progress-next {
    font-size: 1.7vw;
  }
  .progress-tv__goal .progress-how {
    font-size: 1.5vw;
    max-width: none;
  }
  .progress-tv__goal .progress-eyebrow {
    font-size: 1.15vw;
    max-width: none;
  }
  .progress-tv__footer .progress-connection {
    max-width: 22vw;
  }
  .progress-celebration .progress-avatar {
    width: 3.4vw;
    height: 3.4vw;
    font-size: 2.2vw;
    border-radius: 1vw;
  }
  .progress-celebration {
    gap: 1vw;
  }
  .progress-celebration span:not(.progress-avatar) {
    font-size: 1.2vw;
    line-height: 1.4;
  }
  .progress-celebrations > .progress-eyebrow {
    font-size: 1vw;
  }
  .progress-celebrations > p {
    font-size: 1.6vw;
  }
  .progress-celebration strong {
    font-size: 1.7vw;
  }
}
@media (max-width: 1100px) {
  .progress-overview {
    grid-template-columns: minmax(220px, 0.8fr) 1fr;
  }
  .progress-mission {
    padding: 28px 24px;
  }
  .progress-tv {
    padding: 24px;
  }
  .progress-tv__main {
    grid-template-columns: 1.2fr 1fr;
    min-height: 550px;
  }
  .progress-tv__goal h1 {
    font-size: 42px;
  }
  .progress-tv__goal .progress-score {
    font-size: 46px;
  }
  .progress-tv__year {
    display: none;
  }
  .progress-tv__controls {
    margin-left: auto;
  }
  .progress-tv__footer {
    flex-wrap: wrap;
  }
  .progress-tv__goal .progress-next {
    font-size: 22px;
  }
}
@media (max-width: 700px) {
  .dialog:has([data-progress-dialog]) {
    max-width: 100vw;
  }
  .progress-overview {
    grid-template-columns: 1fr;
  }
  .progress-overview__world {
    max-height: 260px;
    overflow: hidden;
  }
  .progress-overview__world svg {
    height: 310px;
  }
  .progress-mission {
    padding: 20px 24px 28px;
  }
  .progress-mission h2 {
    font-size: 28px;
    margin-top: 12px;
  }
  .progress-toolbar {
    gap: 12px;
  }
  .progress-connection {
    width: 100%;
    padding: 0;
  }
  .progress-form-row {
    grid-template-columns: 1fr;
  }
  .progress-tv {
    padding: 20px;
  }
  .progress-tv__brand {
    font-size: 24px;
  }
  .progress-tv__brand > span {
    font-size: 11px;
    padding-left: 12px;
  }
  .progress-tv__header {
    gap: 12px;
  }
  .progress-tv__controls {
    width: 100%;
    justify-content: flex-end;
  }
  .progress-tv__main {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .progress-tv__scene {
    margin: 0;
  }
  .progress-tv__scene svg {
    max-height: 330px;
  }
  .progress-tv__goal {
    padding: 0 4px 32px;
  }
  .progress-tv__goal h1 {
    font-size: 40px;
    margin: 16px 0 24px;
  }
  .progress-tv__goal .progress-score {
    font-size: 48px;
  }
  .progress-tv__goal .progress-eyebrow {
    font-size: 14px;
  }
  .progress-tv__goal .progress-next {
    font-size: 22px;
    margin: 16px 0;
  }
  .progress-tv__goal .progress-how {
    font-size: 18px;
  }
  .progress-tv__footer {
    padding: 24px 4px;
  }
  .progress-celebration strong {
    font-size: 24px;
  }
  .progress-celebration span:not(.progress-avatar) {
    font-size: 16px;
  }
  .progress-celebrations > p {
    font-size: 20px;
  }
  .progress-tv__unavailable h1 {
    font-size: 36px;
  }
  .progress-tv__unavailable p {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .progress-meter > span {
    transition: none;
  }
  .progress-celebration {
    animation: none;
  }
}
@media (max-width: 700px) {
  .progress-mobile-sort {
    display: block;
    margin-top: 16px;
  }
}
