
.student-masthead {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  margin-block: clamp(1.25rem, 4vw, 3rem) 1.5rem;
  padding: clamp(1.6rem, 4vw, 3.75rem);
  border: 1px solid #cbdde9;
  border-radius: 22px;
  background: linear-gradient(120deg, #f0f7fc, #dfedf8);
}

.student-masthead::after {
  position: absolute;
  inset: auto -5rem -12rem auto;
  z-index: -1;
  width: 25rem;
  height: 25rem;
  border: 1px solid #bbd1e2;
  border-radius: 50%;
  box-shadow: 0 0 0 3rem #cfe1ef73, 0 0 0 6rem #e1edf699;
  content: "";
}

.student-masthead h1,
.student-form-page h1,
.student-token h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -.052em;
  line-height: 1.05;
}

.student-masthead h1 { font-size: clamp(2.55rem, 6vw, 5rem); }

.student-masthead-copy > p:last-child {
  max-width: 38rem;
  margin-bottom: 0;
  color: var(--muted, #50657b);
}

.student-kicker {
  color: #4b667e;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .135em;
}

.student-profile-chip,
.student-account-title {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.student-profile-chip {
  max-width: 100%;
  padding: .65rem .9rem .65rem .65rem;
  border: 1px solid #c8dce9;
  border-radius: 14px;
  background: #f6fbff;
  overflow-wrap: anywhere;
}

.student-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border-radius: 50%;
  background: #14233b;
  color: #fff;
  font: 1.4rem/1 Georgia, serif;
}

.student-account-title h2 { margin-bottom: 0; }
.student-account-title .student-avatar { width: 3.25rem; height: 3.25rem; }

.student-information { min-block-size: 9rem; margin-bottom: clamp(.9rem, 2vw, 1.4rem); }
.student-information-heading { display: flex; align-items: center; gap: .85rem; margin-bottom: .8rem; }
.student-information-heading h2 { margin: 0; }
.student-information > p { max-width: 75ch; }

.student-dashboard {
  display: grid;
  align-items: stretch;
  gap: clamp(.9rem, 2vw, 1.4rem);
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
}


.student-heading,
.student-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
}

.student-heading > div:first-child { min-width: 0; }
.student-heading p:last-child,
.student-card-top h2 { margin-bottom: 0; }

.student-card-top { margin-bottom: 1rem; }
.student-card-top > .eyebrow { margin-bottom: 0; }

.student-tracking-card,
.student-contact-card,
.student-baseline {
  position: relative;
  background: #e8f3fa;
}

.student-tracking-card > .student-icon { margin-bottom: 1.25rem; }

.student-text-link {
  display: inline-flex;
  align-items: center;
  gap: .36rem;
  width: fit-content;
  max-width: 100%;
  color: #254761;
  font-size: .87rem;
  font-weight: 680;
  text-decoration: underline;
  text-decoration-color: #b2c9da;
  text-underline-offset: .22em;
}

.student-text-link:hover { text-decoration-color: currentColor; }
.student-back { margin-bottom: 1.15rem; }
.student-actions { margin-top: 1.2rem; }
.student-main-action,
.student-heading .button,
.student-contact-card .button { gap: .6rem; }

.student-icon {
  display: grid;
  flex: 0 0 auto;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border: 1px solid #ccdeeb;
  border-radius: 11px;
  background: #f5fafe;
  color: #345974;
}

.student-icon svg { width: 1.3rem; height: 1.3rem; }

.student-event,
.student-empty,
.student-alert {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.student-event { min-width: 0; }
.student-event-lead h2 { margin: 0; }

.student-date {
  display: grid;
  flex: 0 0 auto;
  width: 3.15rem;
  min-height: 3.25rem;
  align-content: center;
  gap: .25rem;
  padding: .38rem;
  border: 1px solid #cbdde9;
  border-radius: 10px;
  background: #edf5fb;
  text-align: center;
}

.student-date strong {
  display: block;
  font: 1.4rem/.95 Georgia, serif;
  font-variant-numeric: tabular-nums;
}

.student-date small {
  font-size: .65rem;
  font-weight: 720;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.student-empty {
  margin-block: .75rem 1.15rem;
  padding: 1rem;
  border: 1px solid #d5e4ef;
  border-radius: 12px;
  background: #f6fafd;
}

.student-empty p,
.student-alert p {
  margin: .25rem 0 0;
  color: var(--muted, #50657b);
  font-size: .89rem;
}

.student-alert {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0 0 1.4rem;
  padding: 1rem 1.25rem;
  border: 1px solid #d3dfeb;
  border-radius: 14px;
  background: #f4f8fc;
  overflow-wrap: anywhere;
}

.student-alert > div { flex: 1 1 16rem; }
.student-alert h2 { margin: 0; font-size: 1.16rem; }

.student-calendar-heading {
  padding-block: clamp(1.4rem, 4vw, 2.85rem) 1.15rem;
}

.student-calendar-heading h1 {
  margin-bottom: 0;
  font-size: clamp(2.25rem, 5vw, 3.7rem);
}

.student-calendar {
  display: grid;
  grid-template-columns: minmax(13.5rem, .9fr) minmax(0, 2.5fr);
  padding: 0;
}

.student-calendar-options,
.student-calendar-main {
  min-width: 0;
  padding: clamp(1.05rem, 2.5vw, 2rem);
}

.student-calendar-options {
  border-right: 1px solid var(--line);
  border-radius: var(--radius) 0 0 var(--radius);
  background: #f8fbfd;
}

.student-calendar-options h2,
.student-calendar-month h2,
.student-calendar-times h2 {
  margin-bottom: .6rem;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.student-duration-options {
  display: grid;
  gap: .5rem;
  margin-top: .5rem;
}

.student-duration-options .choice {
  padding: .64rem .8rem;
  background: #fff;
}

.student-duration-options .choice.selected {
  border-color: #315671;
  background: #e8f3fa;
}

.student-duration-options .choice:hover { background: #edf5fb; }

.student-duration-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem .55rem;
}

.student-recommended {
  padding: .17rem .45rem;
  border-radius: 5px;
  background: #dfeef8;
  color: #284f6b;
  font-size: .68rem;
  font-weight: 720;
}

.student-field-label { margin: 0; font-size: .92rem; font-weight: 680; }

.student-calendar-timezone {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin-top: 1.25rem;
  color: #365670;
  font-size: .83rem;
  font-weight: 700;
}

.student-calendar-timezone svg { flex: 0 0 auto; margin-top: .1rem; }
.student-calendar-timezone small { font-size: .73rem; font-weight: 550; }

.student-calendar-picker {
  display: grid;
  gap: clamp(.9rem, 2vw, 1.35rem);
}

.student-calendar-picker-with-times {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr);
}

.student-calendar-month {
  width: min(100%, 29rem);
  min-width: 0;
}

.student-calendar-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem .6rem;
  margin: .8rem 0 .5rem;
}

.student-calendar-month-name { margin: 0; font-size: .98rem; font-weight: 760; }

.student-calendar-arrows { display: flex; align-items: center; gap: .3rem; }

.student-calendar-arrow {
  display: inline-grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border-radius: 50%;
  background: #e8f3fa;
  color: #244c6a;
  font-size: 1.55rem;
  line-height: 1;
  text-decoration: none;
}

.student-calendar-arrow:not(.student-calendar-arrow-disabled):hover { background: #d8ebf8; }

.student-calendar-arrow-disabled {
  background: transparent;
  color: #8b9cac;
}

.student-calendar-month-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 .35rem;
  table-layout: fixed;
  text-align: center;
}

.student-calendar-month-grid th {
  padding: 0;
  color: #526d84;
  font-size: clamp(.6rem, 1.1vw, .7rem);
  font-weight: 760;
  letter-spacing: .06em;
}

.student-calendar-month-grid abbr { text-decoration: none; }
.student-calendar-month-grid td { padding: 0; }

.student-calendar-day {
  position: relative;
  display: inline-grid;
  width: min(calc(100% - 3px), 2.85rem);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  font-size: .88rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.student-calendar-day-unavailable { color: #788b9c; }
.student-calendar-day-available { background: #e8f3fa; color: #244c6a; }
.student-calendar-day-available:hover { background: #d8ebf8; }
.student-calendar-day-selected,
.student-calendar-day-selected:hover { background: #193d5b; color: #fff; }

.student-calendar-day-today::after {
  position: absolute;
  bottom: .27rem;
  width: .22rem;
  height: .22rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.student-calendar-hidden-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.student-calendar-legend {
  display: flex;
  align-items: center;
  gap: .48rem;
  margin: .8rem 0 0;
  color: var(--muted);
  font-size: .78rem;
}

.student-calendar-legend span {
  width: .75rem;
  height: .75rem;
  border: 1px solid #c5dce9;
  border-radius: 50%;
  background: #e8f3fa;
}

.student-calendar-times,
.student-calendar-review { scroll-margin-top: 2rem; }

.student-calendar-times:focus,
.student-calendar-review:focus { outline: none; }

.student-calendar-review { max-width: 40rem; }

.student-booking-preparation {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfd;
  overflow-wrap: anywhere;
}

.student-booking-preparation h3 { margin: 0 0 .45rem; font-size: 1.06rem; }
.student-booking-preparation p:last-child { margin-bottom: 0; }
.student-booking-topics { margin-bottom: 1rem; }
.student-booking-topics legend { padding: 0; font-weight: 700; }

.student-booking-topics #id_requested_topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: .4rem;
  margin-top: .6rem;
}

.student-booking-topics label {
  display: flex;
  height: 100%;
  align-items: center;
  gap: .5rem;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: .86rem;
  font-weight: 550;
  cursor: pointer;
}

.student-booking-topics label:has(input:checked) { border-color: #9cbed5; background: #e8f3fa; }
.student-booking-topics input { flex: 0 0 auto; margin: 0; }

.student-calendar-times {
  min-width: 0;
  padding-left: clamp(.8rem, 2vw, 1.35rem);
  border-left: 1px solid var(--line);
}

.student-calendar-times .slot-grid {
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.4rem), 1fr));
}

.student-calendar-times .slot-grid .button {
  padding-inline: .48rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  white-space: nowrap;
}

.student-calendar-empty { margin-bottom: 0; }

.student-facts {
  display: grid;
  gap: .55rem;
  margin: 1.2rem 0;
  padding: .8rem;
  border: 1px solid #d8e6ef;
  border-radius: 12px;
  background: #f7fbfd;
}

.student-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .35rem .8rem;
  padding: .25rem .2rem;
}

.student-facts dt { color: #50657b; font-size: .84rem; }
.student-facts dd { margin: 0; font-weight: 670; overflow-wrap: anywhere; }
.student-facts-compact { margin-top: .65rem; }

.student-callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem;
  padding: .9rem 1rem;
  border-radius: 10px;
  background: #eef6fb;
}

.student-callout h3 { margin: 0 0 .35rem; font-size: 1rem; }
.student-callout p { margin: 0; color: #50657b; font-size: .87rem; }

.student-status-confirmed {
  border-color: #c6e1d5;
  background: #edf7f2;
  color: #25604c;
}

.student-status-cancelled,
.student-status-missed {
  border-color: #eed3d8;
  background: #fdf0f2;
  color: #8b3544;
}

.student-records .student-record {
  padding: .8rem 0;
  border-color: #e2ecf3;
}

.student-records a.student-record:hover { color: #345974; }

.student-record-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem .85rem;
  margin-left: auto;
}

.student-score {
  padding: .38rem .55rem;
  border: 1px solid #d4e4ef;
  border-radius: 7px;
  background: #eef6fb;
  font-size: .91rem;
  font-weight: 690;
  font-variant-numeric: tabular-nums;
}

.student-big-score {
  margin: .7rem 0 .45rem;
  font: clamp(2.2rem, 6vw, 3.6rem)/1.05 Georgia, serif;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}

.student-progress-details {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid #c4dce9;
}

.student-progress-details summary {
  width: fit-content;
  color: #284f6b;
  font-size: .92rem;
  font-weight: 750;
  cursor: pointer;
}

.student-progress-details summary:hover { text-decoration: underline; }

.student-progress-details p { margin: .65rem 0 0; }
.student-progress-details .student-text-link { margin-top: .75rem; }

.student-progress-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: .65rem;
  max-width: 43rem;
  margin: .8rem 0 0;
}

.student-progress-stats > div {
  padding: .65rem .75rem;
  border: 1px solid #cfe2ee;
  border-radius: 9px;
  background: #f6fbfd;
}

.student-progress-stats dt { color: #50657b; font-size: .8rem; }
.student-progress-stats dd { margin: .15rem 0 0; font-weight: 750; font-variant-numeric: tabular-nums; }

.student-filters {
  display: grid;
  align-items: end;
  gap: .65rem;
  width: min(100%, 38rem);
  margin-top: 1rem;
  grid-template-columns: minmax(5.5rem, .6fr) minmax(0, 1.4fr) auto;
}

.student-filters label {
  display: block;
  margin-bottom: .25rem;
  font-size: .82rem;
}

.student-chart {
  margin: 1rem 0 .6rem;
  padding: .75rem 1rem;
  border: 1px solid #d8e7f1;
  border-radius: 14px;
  background: #f4f9fd;
}

.student-chart .chart { max-width: 52rem; margin: 0 auto; }
.student-chart .chart-line { stroke: #315d7a; stroke-width: 1.6; }
.student-chart .chart-point { fill: #315d7a; stroke: #f4f9fd; stroke-width: 1.2; }
.student-chart-labels { fill: #496681; font: 11px system-ui, sans-serif; }
.student-chart figcaption { text-align: center; color: #50657b; font-size: .8rem; }

.student-form-page {
  display: grid;
  align-items: start;
  gap: clamp(.8rem, 4vw, 3.5rem);
  width: min(100%, 62rem);
  margin: clamp(1.5rem, 6vw, 5rem) auto 0;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
}

.student-form-intro {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #d5e4ee;
  border-radius: 19px;
  background: linear-gradient(138deg, #f2f8fc, #e3f0fa);
}

.student-form-intro h1 { font-size: clamp(2.05rem, 4vw, 3.4rem); }
.student-form-intro > p:last-child:not(.eyebrow) { margin-bottom: 0; color: #50657b; }

.student-form-mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  margin-bottom: 1.1rem;
  border: 1px solid #bbd2e2;
  border-radius: 50%;
  background: #f5fafd;
  color: #14233b;
  font: 1.55rem/1 Georgia, serif;
}

.student-form-content { min-width: 0; }

.student-fields > p,
.student-fields .question { margin-bottom: 1.15rem; }

.student-fields label { font-size: .92rem; }
.student-fields .helptext { margin-top: .3rem; }

.student-form-actions {
  margin-top: .45rem;
  padding-top: 1rem;
  border-top: 1px solid #e3edf3;
}

.student-document { width: min(100%, 46rem); margin-inline: auto; }

.student-token {
  width: min(100%, 32rem);
  margin-top: clamp(1.5rem, 6vw, 4rem);
}

.student-token .student-icon { margin-bottom: 1rem; }

.student-answers > div,
.student-link-list a {
  padding: .75rem 0;
  border-bottom: 1px solid #dfebf2;
}

.student-answers dt { font-weight: 680; }
.student-answers dd { margin: .25rem 0 0; color: #50657b; }

.student-link-list a {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.student-history summary { color: #284a65; }
.student-history details .cards { margin-top: .8rem; }

.student-welcome .dialog-inner { padding: clamp(1.25rem, 4vw, 2rem); }


.student-progress-note {
  max-width: 23rem;
  margin: .65rem 0 0;
  color: var(--muted, #50657b);
  font-size: .82rem;
}

.student-fields fieldset:has(#id_topics) {
  margin: 0;
  padding: 0;
  border: 0;
}

.student-fields #id_topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: .5rem;
  margin-top: .75rem;
}

.student-fields #id_topics label {
  display: flex;
  align-items: flex-start;
  gap: .48rem;
  height: 100%;
  padding: .55rem .65rem;
  border: 1px solid #d5e4ef;
  border-radius: 8px;
  cursor: pointer;
}

.student-fields #id_topics label:has(input:checked) {
  border-color: #93b5cd;
  background: #e8f3fa;
}

.student-fields #id_topics input {
  flex: 0 0 auto;
  margin: .25em 0 0;
}

@media (max-width: 760px) {
  .student-dashboard,
  .student-calendar,
  .student-form-page { grid-template-columns: minmax(0, 1fr); }

  .student-masthead { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .student-form-page { margin-top: 1.1rem; }
  .student-calendar-options { border-right: 0; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
  .student-duration-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .student-duration-options .choice { justify-content: space-between; gap: .2rem; padding: .45rem .36rem; }
  .student-duration-top { flex-direction: column; align-items: flex-start; gap: .15rem; }
  .student-recommended { padding: .12rem .2rem; font-size: .6rem; white-space: nowrap; }
  .student-calendar-picker-with-times { grid-template-columns: minmax(0, 1fr); }
  .student-calendar-times { padding: 1rem 0 0; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 460px) {
  .student-filters { grid-template-columns: minmax(0, 1fr); }
  .student-filters > .button { justify-self: start; }
  .student-record-meta { margin-left: 0; }
  .student-heading .actions { width: 100%; }
  .student-alert > div { flex-basis: 11rem; }
}
