/* Student portal — a dedicated learning space built from the school's identity. */
.student-shell {
  --portal-blue-dark: #055ba6;
  --portal-blue: #0568a6;
  --portal-blue-light: #18a2d9;
  --portal-orange: #f28c0f;
  --portal-ink: #0d0d0d;
  --portal-paper: #f4f8fb;
  --portal-line: #dce8ef;
  --portal-muted: #5c6f7d;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  direction: rtl;
  color: var(--portal-ink);
  background: var(--portal-paper);
}

.student-shell :focus-visible {
  outline-color: var(--portal-orange);
}

.portal-sidebar {
  position: sticky;
  z-index: 3;
  top: 0;
  height: 100vh;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  padding: 25px 17px 18px;
  color: #fff;
  background: linear-gradient(160deg, #055ba6 0%, #03467f 100%);
  box-shadow: -14px 0 40px rgb(5 55 96 / 9%);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 4px 20px;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
}

.portal-brand img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  padding: 3px;
  border-radius: 50%;
  clip-path: circle(50%);
}

.portal-brand > span,
.portal-sidebar__student > span {
  min-width: 0;
  display: grid;
  line-height: 1.45;
}

.portal-brand strong {
  font-size: 0.92rem;
}

.portal-brand small {
  color: rgb(255 255 255 / 72%);
  font-size: 0.72rem;
}

.portal-sidebar__student {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 1px 6px;
  padding: 12px 10px;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 16px 7px 16px 16px;
}

.portal-sidebar__student strong {
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-avatar--sidebar {
  width: 39px;
  height: 39px;
  font-size: 1.2rem;
}

.student-avatar--sidebar > .lucide {
  width: 11px;
  height: 11px;
}

.portal-sidebar__student small {
  color: rgb(255 255 255 / 74%);
  font-size: 0.67rem;
}

.portal-sidebar__label {
  margin: 24px 10px 9px;
  color: rgb(255 255 255 / 65%);
  font-size: 0.69rem;
  font-weight: 700;
}

.portal-nav {
  display: grid;
  gap: 5px;
}

.portal-nav__item {
  min-width: 0;
  min-height: 47px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  color: rgb(255 255 255 / 82%);
  text-align: right;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px 5px 14px 14px;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.portal-nav__more,
.portal-nav__more-menu {
  display: none;
}

.portal-nav__item > .lucide:first-child {
  width: 19px;
  height: 19px;
  color: #a8e5fa;
}

.portal-nav__item:hover {
  color: #fff;
  background: rgb(255 255 255 / 10%);
}

.portal-nav__item.is-active {
  color: #07365c;
  background: #fff;
  border-color: rgb(255 255 255 / 80%);
  font-weight: 750;
  box-shadow: 0 7px 20px rgb(0 27 52 / 13%);
}

.portal-nav__item.is-active > .lucide:first-child {
  color: var(--portal-blue);
}

.portal-nav__active-mark {
  width: 15px;
  height: 15px;
  margin-inline-start: auto;
  color: var(--portal-orange);
}

.portal-sidebar__bottom {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgb(255 255 255 / 18%);
}

.portal-sidebar__bottom a,
.portal-logout {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  color: rgb(255 255 255 / 84%);
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: right;
  font-size: 0.76rem;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.portal-sidebar__bottom a:hover,
.portal-logout:hover {
  color: #fff;
  background: rgb(255 255 255 / 9%);
}

.student-shell .portal-sidebar__bottom .whatsapp-link--sidebar {
  min-height: 44px;
  justify-content: flex-start;
  padding-inline: 10px;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 0.76rem;
}

.student-shell
  .portal-sidebar__bottom
  .whatsapp-link--sidebar
  > .lucide:first-child {
  color: #a8e5fa;
}

.student-shell .portal-sidebar__bottom .whatsapp-link--sidebar:hover {
  background: rgb(255 255 255 / 9%);
  transform: none;
}

.portal-sidebar__bottom .lucide {
  width: 18px;
  height: 18px;
  color: #a8e5fa;
}

.student-main {
  width: min(100%, 1450px);
  min-width: 0;
  justify-self: center;
  padding: clamp(22px, 3.4vw, 48px) clamp(18px, 4.2vw, 62px) 32px;
  background:
    radial-gradient(ellipse at 6% 4%, rgb(24 162 217 / 7%), transparent 26rem),
    radial-gradient(
      ellipse at 92% 38%,
      rgb(242 140 15 / 5%),
      transparent 22rem
    ),
    var(--portal-paper);
}

.student-topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.student-topbar .section-index,
.student-topbar .section-index > span {
  color: var(--portal-blue);
}

.student-topbar .section-index > span {
  background: var(--portal-orange);
}

.student-topbar h1 {
  max-width: 760px;
  margin: 3px 0 0;
  color: var(--portal-ink);
  font-family: var(--font-ar, "Segoe UI", sans-serif);
  font-size: clamp(1.35rem, 2.25vw, 2rem);
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.student-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.today-date {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #315266;
  background: rgb(255 255 255 / 82%);
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  font-size: 0.74rem;
  white-space: nowrap;
}

.today-date .lucide {
  color: var(--portal-blue-light);
}

.student-shell .student-topbar__logout {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--portal-blue-dark);
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  font-size: 0.74rem;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.student-shell .student-topbar__logout:hover {
  color: #fff;
  background: var(--portal-blue-dark);
  border-color: var(--portal-blue-dark);
  transform: translateY(-1px);
}

.student-shell button {
  touch-action: manipulation;
}

.student-shell .whatsapp-link--quick {
  display: none;
}

.student-topbar__logout .lucide {
  width: 17px;
  height: 17px;
}

.student-content,
.portal-home,
.study-page {
  min-width: 0;
}

.student-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(300px, 27vw, 354px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(210px, 0.75fr);
  align-items: center;
  gap: 18px;
  overflow: hidden;
  padding: clamp(24px, 2.4vw, 34px) clamp(23px, 4vw, 52px);
  color: #fff;
  background: linear-gradient(125deg, #055ba6 0%, #0568a6 58%, #0878b5 100%);
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: 30px 8px 30px 8px;
  box-shadow: 0 20px 48px rgb(5 91 166 / 18%);
}

.student-hero.is-visible .student-photo-frame {
  animation: student-portrait-arrive 620ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes student-portrait-arrive {
  from {
    opacity: 0.72;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.student-hero__float-field {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.student-floating-icon {
  position: absolute;
  width: var(--icon-size, 34px);
  height: var(--icon-size, 34px);
  object-fit: contain;
  opacity: var(--icon-opacity, 0.72);
  filter: drop-shadow(0 5px 9px rgb(3 35 64 / 13%));
  pointer-events: none;
  animation: student-icon-drift var(--icon-duration, 9s) ease-in-out infinite;
  animation-delay: var(--icon-delay, 0s);
}

.student-floating-icon--hero {
  top: 10%;
  left: 5%;
  --icon-size: 42px;
  --icon-opacity: 0.75;
  --icon-duration: 8.5s;
}

.student-floating-icon--route {
  top: 16%;
  left: 42%;
  --icon-size: 30px;
  --icon-opacity: 0.56;
  --icon-duration: 10.5s;
  --icon-delay: -3s;
}

@keyframes student-icon-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-5deg);
  }
  50% {
    transform: translate3d(0, -7px, 0) rotate(4deg);
  }
}

.student-hero::before,
.student-hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.student-hero::before {
  top: -190px;
  left: 13%;
  width: 430px;
  height: 430px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgb(255 255 255 / 3%),
    0 0 0 68px rgb(255 255 255 / 2%);
}

.student-hero::after {
  right: -45px;
  bottom: -128px;
  width: 330px;
  height: 220px;
  background: radial-gradient(ellipse, rgb(24 162 217 / 38%), transparent 68%);
}

.student-hero__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.student-hero__eyebrow,
.student-hero__facts span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.student-hero__eyebrow {
  color: #d6f3ff;
  font-size: 0.76rem;
  font-weight: 700;
}

.student-hero__eyebrow .lucide {
  width: 17px;
  height: 17px;
  color: #ffb344;
}

.student-hero__greeting {
  margin: 16px 0 1px;
  color: rgb(255 255 255 / 82%);
  font-size: 0.84rem;
}

.student-hero h2 {
  max-width: 100%;
  margin: 0;
  color: #fff;
  font-family: var(--font-ar, "Segoe UI", sans-serif);
  font-size: clamp(2rem, 4.1vw, 3.5rem);
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.student-hero__class {
  margin: 7px 0 0;
  color: #d8f0fb;
  font-size: 0.95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.student-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 13px;
  color: rgb(255 255 255 / 82%);
  font-size: 0.76rem;
}

.student-hero__facts .lucide {
  width: 15px;
  height: 15px;
  color: #ffb344;
}

.hero-profile-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 0 15px;
  color: #163c55;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 11px 4px 11px 11px;
  font-size: 0.76rem;
  font-weight: 750;
  transition:
    transform 170ms ease,
    background 170ms ease,
    box-shadow 170ms ease;
}

.hero-profile-link:hover {
  background: #eaf8ff;
  box-shadow: 0 8px 20px rgb(0 30 57 / 17%);
  transform: translateY(-2px);
}

.hero-profile-link:active,
.section-jump:active,
.portal-nav__item:active {
  transform: scale(0.97);
}

.hero-profile-link .lucide {
  width: 16px;
  height: 16px;
  color: var(--portal-orange);
}

.student-hero__portrait {
  position: relative;
  min-width: 210px;
  min-height: 300px;
  display: grid;
  place-items: center;
}

.student-hero__portrait-label {
  position: absolute;
  z-index: 3;
  top: 14%;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  color: #17425e;
  background: rgb(255 255 255 / 94%);
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 12px 4px 12px 12px;
  box-shadow: 0 8px 22px rgb(0 30 57 / 13%);
  font-size: 0.68rem;
  font-weight: 750;
  transform: rotate(-3deg);
  animation: student-label-arrive 520ms 120ms both;
}

.student-hero__portrait-label .lucide {
  width: 16px;
  height: 16px;
  color: var(--portal-orange);
}

@keyframes student-label-arrive {
  from {
    opacity: 0;
    transform: translateY(6px) rotate(-3deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(-3deg);
  }
}

.student-photo-frame {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: end center;
  overflow: hidden;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 26%, rgb(24 162 217 / 10%), transparent 66%),
    linear-gradient(180deg, #fff 0%, #f4faff 100%);
  border: 1px solid rgb(255 255 255 / 92%);
  border-radius: 48% 48% 17px 17px;
  box-shadow: 0 14px 32px rgb(0 34 65 / 17%);
}

.student-photo-frame::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgb(5 91 166 / 9%);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.student-photo-frame__image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center bottom;
}

.student-photo-frame--hero {
  width: clamp(142px, 14vw, 178px);
  height: 276px;
}

.student-photo-frame--profile {
  width: clamp(108px, 12vw, 150px);
  height: 238px;
  border-radius: 44% 44% 14px 14px;
}

.student-photo-frame[data-avatar-kind="unknown"] {
  place-items: center;
}

.student-photo-frame[data-avatar-kind="male"],
.student-photo-frame[data-avatar-kind="female"],
.student-photo-frame[data-avatar-kind="unknown"],
.student-photo-frame[data-avatar-kind="fallback"] {
  overflow: visible;
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
}

.student-photo-frame[data-avatar-kind="male"]::before,
.student-photo-frame[data-avatar-kind="female"]::before,
.student-photo-frame[data-avatar-kind="unknown"]::before,
.student-photo-frame[data-avatar-kind="fallback"]::before {
  display: none;
}

.student-photo-frame--hero[data-avatar-kind="unknown"],
.student-photo-frame--profile[data-avatar-kind="unknown"] {
  height: auto;
  aspect-ratio: 1.508;
}

.student-photo-frame[data-avatar-kind="unknown"] .student-photo-frame__image {
  object-position: center;
}

.student-photo-frame.is-image-unavailable .student-photo-frame__image {
  visibility: hidden;
}

.student-photo-frame.is-image-unavailable::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--portal-blue-dark);
  content: attr(data-fallback-initial);
  font-family: var(--font-ar, "Segoe UI", sans-serif);
  font-size: 3.4rem;
  font-weight: 800;
}

.student-hero__companion {
  position: absolute;
  z-index: 2;
  bottom: 14px;
  left: 0;
  width: clamp(56px, 6vw, 82px);
  height: 166px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 12px rgb(0 37 71 / 18%));
  pointer-events: none;
}

.student-avatar {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  color: var(--portal-blue-dark, #055ba6);
  background: linear-gradient(145deg, #fff 0%, #dff3fb 100%);
  border: 2px solid rgb(255 255 255 / 78%);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgb(0 33 62 / 18%);
}

.student-avatar > span {
  position: relative;
  z-index: 1;
  line-height: 1;
}

.student-avatar > .lucide {
  position: absolute;
  top: 18%;
  left: 18%;
  width: 17px;
  height: 17px;
  color: var(--portal-orange, #f28c0f);
}

.hero-orbit {
  position: absolute;
  width: 230px;
  height: 230px;
  border: 1px solid rgb(255 255 255 / 26%);
  border-radius: 50%;
  transform: rotate(-25deg) scaleY(0.62);
}

.hero-orbit--two {
  width: 275px;
  height: 275px;
  border-color: rgb(255 255 255 / 13%);
  transform: rotate(37deg) scaleY(0.68);
}

.hero-planet {
  position: absolute;
  z-index: 2;
  display: block;
  border: 3px solid #167eb8;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgb(0 36 69 / 22%);
}

.hero-planet--blue {
  top: 19%;
  right: 14%;
  width: 17px;
  height: 17px;
  background: #18a2d9;
}

.hero-planet--orange {
  bottom: 22%;
  left: 11%;
  width: 13px;
  height: 13px;
  background: #f28c0f;
}

.feature-heading__art,
.fees-feature__art,
.study-page__illustration,
.empty-state__art {
  display: block;
  flex: 0 0 auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.feature-heading__art {
  width: 48px;
  height: 76px;
  align-self: flex-start;
}

.study-page__floating-icon {
  position: absolute;
  z-index: 0;
  top: 4%;
  left: clamp(90px, 12vw, 170px);
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: 0.32;
  pointer-events: none;
  animation: student-icon-drift 10s ease-in-out infinite;
}

.fees-feature__art {
  width: 50px;
  height: 78px;
  margin-inline-start: auto;
}

.student-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: start;
  gap: 16px;
  margin-top: 17px;
}

.student-community {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: clamp(210px, 22vw, 285px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  margin-top: 15px;
  padding: 14px clamp(16px, 3vw, 30px);
  overflow: hidden;
  background: linear-gradient(110deg, #e8f5fb 0%, #f6fbfd 54%, #fff4e4 100%);
  border: 1px solid #d8eaf2;
  border-radius: 9px 28px 9px 28px;
}

.student-community::before {
  position: absolute;
  z-index: -1;
  top: -70px;
  right: 28%;
  width: 210px;
  aspect-ratio: 1;
  border: 1px solid rgb(5 91 166 / 12%);
  border-radius: 50%;
  box-shadow: 0 0 0 19px rgb(255 255 255 / 24%);
  content: "";
  pointer-events: none;
}

.student-community__copy {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  padding-block: 10px;
}

.student-community__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--portal-blue);
  font-size: 0.72rem;
  font-weight: 750;
}

.student-community__eyebrow .lucide {
  width: 17px;
  height: 17px;
  color: var(--portal-orange);
}

.student-community h2 {
  margin: 0;
  color: var(--portal-blue-dark);
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  font-weight: 800;
}

.student-community__copy > p {
  max-width: 31rem;
  margin: 0;
  color: var(--portal-muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.student-community__faces {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  color: #436278;
  font-size: 0.68rem;
  font-weight: 700;
}

.student-community__face {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  background: #fff;
  border: 1px solid #d8eaf2;
  border-radius: 50%;
}

.student-community__scene {
  width: 100%;
  height: 100%;
  min-height: 185px;
  max-height: 250px;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 9px 12px rgb(5 55 96 / 8%));
}

.student-community__spark {
  position: absolute;
  top: 15px;
  left: 18px;
  color: var(--portal-orange);
  opacity: 0.8;
  animation: student-icon-drift 8s ease-in-out infinite;
}

.student-community__spark .lucide {
  width: 19px;
  height: 19px;
}

.attendance-feature,
.day-path,
.results-feature,
.fees-feature,
.attendance-journal,
.attendance-overview,
.profile-story,
.result-island,
.fee-entry,
.week-ribbon__day {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--portal-line);
  box-shadow: 0 8px 28px rgb(24 74 108 / 4%);
}

.attendance-feature,
.day-path,
.results-feature,
.fees-feature {
  padding: clamp(18px, 2.2vw, 27px);
  border-radius: 7px 22px 7px 22px;
}

.attendance-feature {
  grid-column: 1;
  grid-row: 1;
}

.day-path {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.results-feature {
  grid-column: 1;
  grid-row: 2;
}

.fees-feature {
  grid-column: 1 / -1;
  grid-row: 3;
  background: linear-gradient(110deg, #fff 45%, #eaf7fc 100%);
  border-inline-start: 4px solid var(--portal-orange);
}

.feature-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.feature-heading h2,
.fees-feature h2 {
  margin: 2px 0 0;
  color: var(--portal-ink);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.4;
}

.feature-kicker,
.study-page__eyebrow {
  color: var(--portal-blue);
  font-size: 0.74rem;
  font-weight: 750;
}

.feature-heading > .lucide {
  width: 21px;
  height: 21px;
  color: var(--portal-blue-light);
}

.attendance-orbit-layout {
  display: grid;
  grid-template-columns: minmax(120px, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(12px, 2vw, 25px);
  padding-block: 3px 9px;
}

.attendance-orbit {
  position: relative;
  width: min(100%, 165px);
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
}

.attendance-orbit svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.attendance-orbit circle {
  fill: none;
  stroke-width: 8;
}

.attendance-orbit__track {
  stroke: #e4eff5;
}

.attendance-orbit__value {
  stroke: #f28c0f;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.attendance-feature.is-visible .attendance-orbit__value {
  stroke-dashoffset: var(--attendance-offset, 100);
}

.attendance-orbit > div {
  display: grid;
  justify-items: center;
  gap: 1px;
}

.attendance-orbit strong {
  color: var(--portal-blue-dark);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 850;
  line-height: 1.2;
}

.attendance-orbit > div span {
  color: var(--portal-muted);
  font-size: 0.68rem;
}

.attendance-counts {
  display: grid;
  gap: 5px;
}

.attendance-counts p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f5;
}

.attendance-counts p:last-child {
  border-bottom: 0;
}

.attendance-counts span {
  color: var(--portal-muted);
  font-size: 0.73rem;
}

.attendance-counts strong {
  color: var(--portal-blue-dark);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.section-jump {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 0 2px;
  color: var(--portal-blue);
  background: transparent;
  border: 0;
  font-size: 0.75rem;
  font-weight: 750;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.section-jump:hover {
  color: var(--portal-orange);
  transform: translateX(-3px);
}

.section-jump .lucide {
  width: 16px;
  height: 16px;
}

.day-path__list,
.subject-trail,
.attendance-journal__list,
.week-ribbon__day ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.day-path__list {
  position: relative;
  padding-block: 3px;
}

.day-path__list::before {
  position: absolute;
  top: 19px;
  right: 15px;
  bottom: 20px;
  width: 1px;
  background: linear-gradient(#18a2d9 0%, #d9eaf2 100%);
  content: "";
}

.day-path__list li {
  position: relative;
  display: grid;
  grid-template-columns: 32px 58px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px 0;
}

.day-path__marker {
  z-index: 1;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--portal-blue);
  background: #edf8fd;
  border: 1px solid #d5edf7;
  border-radius: 50%;
  font-size: 0.64rem;
  font-weight: 750;
}

.day-path__list time {
  padding-top: 6px;
  color: #315d78;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.day-path__list li > div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding-top: 3px;
}

.day-path__list strong {
  font-size: 0.79rem;
  overflow-wrap: anywhere;
}

.day-path__list small {
  color: var(--portal-muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.feature-heading__count {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: var(--portal-blue);
  background: #edf8fd;
  border: 1px solid #d9edf6;
  border-radius: 999px;
  font-size: 0.67rem;
}

.subject-trail {
  display: grid;
  gap: 4px;
}

.subject-trail li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f5;
}

.subject-trail li:last-child {
  border-bottom: 0;
}

.subject-trail li > div:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.subject-trail strong {
  min-width: 0;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.subject-trail li > div:first-child span {
  flex: 0 0 auto;
  color: var(--portal-blue-dark);
  font-size: 0.74rem;
  font-weight: 800;
}

.study-progress {
  height: 7px;
  grid-column: 1 / -1;
  overflow: hidden;
  background: #e8f0f4;
  border-radius: 999px;
}

.study-progress > span {
  width: 0;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #18a2d9, #f28c0f);
  border-radius: inherit;
  transition: width 850ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.is-visible .study-progress > span {
  width: var(--progress, 0%);
}

.grade-token {
  min-width: 42px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 4px 9px;
  color: #07578c;
  background: #e7f5fb;
  border: 1px solid #d4ebf5;
  border-radius: 10px 4px 10px 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.fees-feature__heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fees-feature__icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: var(--portal-blue);
  background: #e6f5fb;
  border-radius: 14px 5px 14px 14px;
}

.fees-feature__icon .lucide {
  width: 21px;
  height: 21px;
}

.fees-feature__heading h2 {
  font-size: 1.1rem;
}

.fees-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.fees-total span,
.fees-feature__meta {
  color: var(--portal-muted);
  font-size: 0.72rem;
}

.fees-total strong {
  color: var(--portal-blue-dark);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.fees-feature .study-progress {
  margin-top: 11px;
}

.fees-feature__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.student-shell .empty-state {
  align-items: flex-start;
  gap: 11px;
  padding: 15px 0;
  color: var(--portal-ink);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.student-shell .empty-state__icon {
  width: 34px;
  height: 34px;
  color: var(--portal-blue);
  background: #e8f6fc;
  border-radius: 11px 4px 11px 11px;
}

.student-shell .empty-state__icon .lucide {
  width: 17px;
  height: 17px;
}

.student-shell .empty-state strong {
  font-size: 0.78rem;
}

.student-shell .empty-state p {
  margin-top: 3px;
  color: var(--portal-muted);
  font-size: 0.74rem;
  line-height: 1.65;
}

.student-shell .empty-state--illustrated {
  align-items: center;
  padding-block: 7px;
}

.empty-state__art {
  width: 70px;
  height: 118px;
}

.study-page__heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 3vw, 26px);
  margin: 4px 0 22px;
}

.study-page__heading-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1 1 auto;
}

.study-page__illustration {
  position: relative;
  z-index: 1;
  width: clamp(88px, 12vw, 140px);
  height: 164px;
  align-self: flex-end;
}

.study-page__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.study-page__eyebrow::before {
  width: 22px;
  height: 2px;
  background: var(--portal-orange);
  content: "";
}

.study-page__heading h2 {
  max-width: 100%;
  margin: 7px 0 3px;
  color: var(--portal-ink);
  font-family: var(--font-ar, "Segoe UI", sans-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.study-page__heading p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 0.84rem;
}

.profile-story {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3.4vw, 38px);
  border-radius: 9px 30px 9px 30px;
}

.profile-story::before {
  position: absolute;
  top: -100px;
  left: -70px;
  width: 250px;
  height: 250px;
  border: 1px solid #e3f2f8;
  border-radius: 50%;
  box-shadow:
    0 0 0 22px #f7fbfd,
    0 0 0 45px #fbfdfe;
  content: "";
  pointer-events: none;
}

.profile-story__identity {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 17px;
}

.profile-story__identity > div:last-child > span,
.profile-story__identity p {
  color: var(--portal-muted);
  font-size: 0.74rem;
}

.profile-story__identity h3 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  overflow-wrap: anywhere;
}

.profile-story__identity p {
  margin: 2px 0 0;
}

.profile-story__seal {
  position: absolute;
  top: 26px;
  left: 28px;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--portal-blue-light);
  font-size: 0.62rem;
}

.profile-story__seal .lucide {
  width: 25px;
  height: 25px;
}

.profile-story__details {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 29px 0 0;
}

.profile-story__details > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  background: #f5fafe;
  border: 1px solid #e7f1f6;
  border-radius: 14px 5px 14px 14px;
}

.profile-story__details dt {
  color: var(--portal-muted);
  font-size: 0.7rem;
}

.profile-story__details dd {
  margin: 0;
  color: var(--portal-blue-dark);
  font-size: 0.9rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.attendance-overview {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 20px;
  padding: clamp(20px, 3vw, 34px);
  background: linear-gradient(120deg, #fff 50%, #edf8fd 100%);
  border-radius: 8px 26px 8px 26px;
}

.attendance-overview__lead > span {
  color: var(--portal-blue);
  font-size: 0.72rem;
  font-weight: 750;
}

.attendance-overview__lead > strong {
  display: block;
  margin-top: 4px;
  color: var(--portal-blue-dark);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.attendance-overview__lead > strong small {
  margin-inline-start: 3px;
  color: var(--portal-orange);
  font-size: 0.55em;
}

.attendance-overview__lead > p {
  margin: 6px 0 0;
  color: var(--portal-muted);
  font-size: 0.74rem;
}

.attendance-overview__counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.attendance-overview__counts > div {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 5px;
  padding: 13px 11px;
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 13px 5px 13px 13px;
}

.attendance-overview__counts .lucide {
  width: 18px;
  height: 18px;
  color: var(--portal-blue-light);
}

.attendance-overview__counts > div:last-child .lucide {
  color: var(--portal-orange);
}

.attendance-overview__counts span {
  color: var(--portal-muted);
  font-size: 0.67rem;
}

.attendance-overview__counts strong {
  color: var(--portal-ink);
  font-size: 1.15rem;
}

.attendance-journal {
  margin-top: 15px;
  padding: clamp(18px, 2.6vw, 28px);
  border-radius: 7px 22px 7px 22px;
}

.attendance-journal .feature-heading h3 {
  margin: 2px 0 0;
  font-size: 1.15rem;
}

.attendance-journal__list {
  border-top: 1px solid #edf2f5;
}

.attendance-journal__list li {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(130px, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid #edf2f5;
}

.attendance-journal__list time {
  color: var(--portal-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.attendance-journal__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--portal-blue-dark);
  font-size: 0.75rem;
  font-weight: 700;
}

.attendance-journal__status .lucide {
  width: 16px;
  height: 16px;
  color: var(--portal-blue-light);
}

.attendance-journal__list li > small {
  color: var(--portal-muted);
  font-size: 0.7rem;
}

.results-atlas,
.fee-ledger {
  display: grid;
  gap: 10px;
}

.result-island {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) minmax(150px, 0.7fr);
  align-items: center;
  gap: 17px;
  padding: 19px clamp(16px, 2.6vw, 28px);
  border-radius: 7px 20px 7px 20px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.result-island:hover,
.fee-entry:hover,
.week-ribbon__day:hover {
  box-shadow: 0 14px 34px rgb(24 74 108 / 9%);
  transform: translateY(-2px);
}

.result-island__index,
.fee-entry__number {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  color: var(--portal-blue);
  background: #edf8fd;
  border: 1px solid #dbeef6;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
}

.result-island__subject > span,
.result-island__score > span {
  color: var(--portal-muted);
  font-size: 0.66rem;
}

.result-island__subject h3 {
  margin: 2px 0 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.result-island__score {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 4px;
}

.result-island__score > strong:not(.grade-token) {
  color: var(--portal-blue-dark);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}

.result-island__score > strong small {
  margin-inline-start: 2px;
  color: var(--portal-orange);
  font-size: 0.62em;
}

.result-island__score .study-progress {
  width: 100%;
}

.fee-entry {
  padding: 19px clamp(16px, 2.6vw, 28px);
  border-radius: 7px 20px 7px 20px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.fee-entry__title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fee-entry__title h3 {
  margin: 0;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.fee-entry__status {
  display: inline-block;
  margin-top: 3px;
  color: var(--portal-blue);
  font-size: 0.68rem;
}

.fee-entry__amounts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin: 18px 0 13px;
}

.fee-entry__amounts p {
  min-width: 0;
  display: grid;
  gap: 3px;
  margin: 0;
}

.fee-entry__amounts span {
  color: var(--portal-muted);
  font-size: 0.67rem;
}

.fee-entry__amounts strong {
  color: var(--portal-ink);
  font-size: 0.79rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.fee-entry .study-progress {
  height: 6px;
}

.week-ribbon {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 13px;
}

.week-ribbon__day {
  overflow: hidden;
  border-radius: 7px 21px 7px 21px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.week-ribbon__day > header {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 17px;
  background: #f5fafe;
  border-bottom: 1px solid #e6f0f5;
}

.week-ribbon__day.is-today > header {
  background: #eaf7fc;
  border-bottom-color: #d4ecf6;
  box-shadow: inset -3px 0 var(--portal-orange);
}

.week-ribbon__day > header > span {
  color: var(--portal-blue-light);
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.week-ribbon__day h3 {
  min-width: 0;
  margin: 0;
  font-size: 0.91rem;
  overflow-wrap: anywhere;
}

.week-ribbon__day > header small {
  margin-inline-start: auto;
  padding: 4px 8px;
  color: #fff;
  background: var(--portal-blue);
  border-radius: 999px;
  font-size: 0.63rem;
}

.week-ribbon__day ol {
  padding: 4px 17px 10px;
}

.week-ribbon__day li {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(62px, auto) minmax(0, 1fr) 15px;
  align-items: start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #edf2f5;
}

.week-ribbon__day li:last-child {
  border-bottom: 0;
}

.week-ribbon__day time {
  padding-top: 2px;
  color: var(--portal-blue);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.week-ribbon__day li > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.week-ribbon__day li strong {
  font-size: 0.77rem;
  overflow-wrap: anywhere;
}

.week-ribbon__day li small {
  color: var(--portal-muted);
  font-size: 0.65rem;
  overflow-wrap: anywhere;
}

.week-ribbon__day li > .lucide {
  width: 15px;
  height: 15px;
  margin-top: 3px;
  color: #9ab2c1;
}

.platform-space {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: clamp(20px, 3vw, 34px);
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 8px 28px 8px 28px;
}

.platform-space > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--portal-blue);
  background: #eaf7fc;
  border-radius: 15px 5px 15px 15px;
}

.student-footer {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 8px 12px;
  margin-top: 30px;
  padding-top: 14px;
  color: #6d8290;
  border-top: 1px solid var(--portal-line);
  font-size: 0.67rem;
}

.student-footer__school {
  color: var(--portal-blue);
  font-weight: 750;
}

.student-footer__motto {
  text-align: end;
}

.student-footer__developer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px 8px;
  color: var(--portal-muted);
  text-align: end;
  overflow-wrap: anywhere;
}

.student-footer__developer strong {
  color: var(--portal-blue-dark);
}

.student-footer__developer .lucide {
  width: 14px;
  height: 14px;
  color: var(--portal-blue-light);
}

.student-footer__developer:hover {
  color: var(--portal-blue-dark);
}

.logout-dialog {
  width: min(430px, calc(100vw - 32px));
  max-width: none;
  max-height: min(90dvh, 520px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--portal-ink);
  background: #fff;
  border: 1px solid rgb(5 91 166 / 12%);
  border-radius: 24px 8px 24px 8px;
  box-shadow: 0 24px 70px rgb(0 30 57 / 24%);
}

.logout-dialog::backdrop {
  background: rgb(5 29 49 / 54%);
  backdrop-filter: blur(3px);
}

.logout-dialog[open] {
  animation: logout-dialog-enter 220ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes logout-dialog-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logout-dialog__content {
  display: grid;
  justify-items: start;
  gap: 9px;
  padding: clamp(22px, 6vw, 34px);
}

.logout-dialog__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  color: var(--portal-blue-dark);
  background: #eaf6fb;
  border: 1px solid #d7edf6;
  border-radius: 16px 5px 16px 16px;
}

.logout-dialog__icon .lucide {
  width: 22px;
  height: 22px;
}

.logout-dialog__eyebrow {
  color: var(--portal-orange);
  font-size: 0.74rem;
  font-weight: 750;
}

.logout-dialog h2 {
  margin: 0;
  font-size: clamp(1.2rem, 5vw, 1.5rem);
  line-height: 1.45;
}

.logout-dialog p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 0.86rem;
  line-height: 1.8;
}

.logout-dialog__actions {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
  margin-top: 12px;
}

.logout-dialog__actions button {
  min-width: 0;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px 4px 12px 12px;
  font-size: 0.82rem;
  font-weight: 750;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.logout-dialog__actions button:active {
  transform: scale(0.98);
}

.logout-dialog__stay {
  color: var(--portal-blue-dark);
  background: #fff;
  border-color: var(--portal-line) !important;
}

.logout-dialog__stay:hover {
  background: #f1f8fb;
  border-color: #b9dceb !important;
}

.logout-dialog__confirm {
  color: #fff;
  background: var(--portal-blue-dark);
}

.logout-dialog__confirm:hover {
  background: #034b88;
}

.motion-ready .student-shell [data-reveal] {
  opacity: 0;
  transform: translateY(13px);
  transition:
    opacity 420ms ease,
    transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--path-index, var(--entry-index, 0)) * 45ms);
}

.motion-ready .student-shell [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .student-shell {
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .student-main {
    padding-inline: clamp(16px, 3vw, 34px);
  }

  .student-footer {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .student-footer__developer {
    grid-column: 1 / -1;
    justify-content: center;
    padding-top: 7px;
    border-top: 1px solid var(--portal-line);
    text-align: center;
  }

  .student-hero {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.72fr);
  }

  .attendance-orbit-layout {
    grid-template-columns: 1fr;
  }

  .attendance-orbit {
    width: min(100%, 145px);
  }
}

@media (max-width: 1024px) {
  .student-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-sidebar {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(175px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 0 18px;
    padding: 11px clamp(14px, 2vw, 24px);
    box-shadow: 0 8px 20px rgb(5 55 96 / 10%);
  }

  .portal-brand {
    grid-column: 1;
    min-width: 0;
    padding: 0 2px;
    border-bottom: 0;
  }

  .portal-sidebar__student,
  .portal-sidebar__label,
  .portal-sidebar__bottom {
    display: none;
  }

  .portal-nav {
    position: fixed;
    z-index: 60;
    inset-inline: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    max-width: 920px;
    min-height: 78px;
    margin-inline: auto;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: clamp(3px, 1vw, 12px);
    padding: 8px clamp(8px, 2vw, 18px);
    overflow: visible;
    background: rgb(255 255 255 / 97%);
    border: 1px solid #d8e7ef;
    border-radius: 20px 8px 20px 20px;
    box-shadow: 0 12px 34px rgb(12 54 83 / 20%);
    backdrop-filter: blur(14px);
  }

  .portal-nav__item {
    min-width: 0;
    min-height: 60px;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 5px 4px;
    color: #496477;
    border-radius: 13px 5px 13px 13px;
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .portal-nav__item > .lucide:first-child {
    width: 19px;
    height: 19px;
    color: var(--portal-blue);
  }

  .portal-nav__item.is-active {
    color: #fff;
    background: var(--portal-blue-dark);
    border-color: var(--portal-blue-dark);
  }

  .portal-nav__item.is-active > .lucide:first-child {
    color: #fff;
  }

  .portal-nav__active-mark {
    display: none;
  }

  .portal-nav__more {
    display: none;
  }

  .portal-nav__more-menu {
    display: none;
  }

  .student-shell .whatsapp-link--quick {
    min-height: 44px;
    display: inline-flex;
    gap: 6px;
    padding-inline: 10px;
    font-size: 0.73rem;
    white-space: nowrap;
  }

  .student-shell .whatsapp-link--quick > .lucide:first-child {
    width: 17px;
    height: 17px;
  }

  .student-shell .whatsapp-link--quick .whatsapp-link__arrow {
    display: none;
  }

  .student-main {
    width: 100%;
    padding: 23px clamp(18px, 4vw, 38px)
      calc(122px + env(safe-area-inset-bottom));
  }

  .student-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .student-topbar__title {
    min-width: 0;
    flex: 1 1 280px;
  }

  .student-topbar__actions {
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .student-home-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.88fr);
  }

  .student-community {
    min-height: 220px;
  }

  .attendance-feature {
    grid-column: 1;
  }

  .day-path {
    grid-column: 2;
  }

  .results-feature {
    grid-column: 1;
  }

  .fees-feature {
    grid-column: 1 / -1;
  }

  .attendance-overview {
    grid-template-columns: 1fr;
  }

  .attendance-overview__counts > div {
    justify-items: center;
  }
}

@media (max-width: 680px) {
  .portal-sidebar {
    padding: 11px 16px 9px;
  }

  .portal-brand {
    grid-column: 1;
    padding-bottom: 0;
  }

  .portal-brand img {
    width: 39px;
    height: 39px;
    border-radius: 13px;
  }

  .portal-brand strong {
    font-size: 0.84rem;
  }

  .portal-brand small {
    font-size: 0.66rem;
  }

  .portal-nav {
    bottom: calc(8px + env(safe-area-inset-bottom));
    min-height: 72px;
    gap: 3px;
    padding: 6px;
    border-radius: 17px 7px 17px 17px;
  }

  .portal-nav__item {
    min-width: 0;
    min-height: 58px;
    padding: 4px 2px;
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .portal-nav__item:not([data-phone-primary="true"]):not(.portal-nav__more) {
    display: none;
  }

  .portal-nav__more {
    display: flex;
  }

  .portal-nav__more.is-active {
    color: #fff;
    background: var(--portal-blue-dark);
    border-color: var(--portal-blue-dark);
  }

  .portal-nav__more.is-active > .lucide:first-child {
    color: #fff;
  }

  .portal-nav__more-menu:not([hidden]) {
    position: absolute;
    z-index: 1;
    inset-inline-end: 4px;
    bottom: calc(100% + 9px);
    width: min(240px, calc(100% - 8px));
    display: grid;
    gap: 4px;
    padding: 7px;
    background: #fff;
    border: 1px solid #d8e7ef;
    border-radius: 17px 7px 17px 17px;
    box-shadow: 0 14px 38px rgb(12 54 83 / 22%);
    animation: portal-menu-enter 160ms ease-out both;
  }

  @keyframes portal-menu-enter {
    from {
      opacity: 0;
      transform: translateY(6px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .portal-nav__more-item {
    min-width: 0;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    color: var(--portal-ink);
    background: transparent;
    border: 0;
    border-radius: 11px 4px 11px 11px;
    text-align: start;
    font-size: 0.82rem;
  }

  .portal-nav__more-item .lucide {
    width: 18px;
    height: 18px;
    color: var(--portal-blue);
  }

  .portal-nav__more-item:hover,
  .portal-nav__more-item.is-active {
    color: var(--portal-blue-dark);
    background: #eaf6fb;
  }

  .student-main {
    padding: 17px 14px calc(96px + env(safe-area-inset-bottom));
  }

  .student-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
  }

  .student-topbar__title {
    min-width: 0;
  }

  .student-topbar .section-index {
    font-size: 0.67rem;
  }

  .student-topbar h1 {
    max-width: none;
    font-size: 1.14rem;
    line-height: 1.4;
  }

  .student-topbar__actions {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    align-items: flex-end;
    justify-content: end;
    gap: 6px;
  }

  .today-date {
    grid-column: 1 / -1;
    min-height: 32px;
    max-width: 172px;
    gap: 5px;
    padding: 5px 7px;
    font-size: 0.61rem;
    white-space: normal;
    line-height: 1.35;
  }

  .today-date .lucide {
    width: 14px;
    height: 14px;
  }

  .student-shell .student-topbar__logout {
    min-height: 44px;
    gap: 5px;
    padding-inline: 8px;
    border-radius: 9px;
    font-size: 0.64rem;
  }

  .student-shell .whatsapp-link--quick {
    min-height: 44px;
    gap: 5px;
    padding-inline: 8px;
    border-radius: 9px;
    font-size: 0.64rem;
  }

  .student-shell .whatsapp-link--quick > .lucide:first-child {
    width: 14px;
    height: 14px;
  }

  .student-topbar__logout .lucide {
    width: 14px;
    height: 14px;
  }

  .student-hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(76px, 100px);
    align-items: center;
    gap: 7px;
    padding: 22px 17px 23px;
    border-radius: 22px 7px 22px 7px;
  }

  .student-hero__eyebrow {
    gap: 5px;
    font-size: 0.7rem;
  }

  .student-hero__eyebrow .lucide {
    width: 15px;
    height: 15px;
  }

  .student-hero__greeting {
    margin-top: 19px;
    font-size: 0.73rem;
  }

  .student-hero h2 {
    font-size: clamp(1.55rem, 7.3vw, 2.2rem);
    line-height: 1.35;
  }

  .student-hero__class {
    margin-top: 5px;
    font-size: 0.75rem;
  }

  .student-hero__facts {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.68rem;
  }

  .student-hero__facts .lucide {
    width: 13px;
    height: 13px;
  }

  .hero-profile-link {
    min-height: 38px;
    gap: 6px;
    margin-top: 15px;
    padding-inline: 9px;
    font-size: 0.65rem;
  }

  .hero-profile-link .lucide {
    width: 14px;
    height: 14px;
  }

  .student-hero__portrait {
    min-width: 0;
    min-height: 0;
    align-self: center;
    margin-top: 0;
  }

  .student-photo-frame--hero {
    width: clamp(68px, 21vw, 92px);
    height: clamp(148px, 46vw, 176px);
  }

  .student-photo-frame--hero[data-avatar-kind="unknown"] {
    width: min(100%, 114px);
    height: auto;
    aspect-ratio: 1.508;
  }

  .student-photo-frame--profile {
    width: 82px;
    height: 158px;
  }

  .student-photo-frame--profile[data-avatar-kind="unknown"] {
    width: 112px;
    height: auto;
    aspect-ratio: 1.508;
  }

  .student-hero__companion,
  .student-hero__portrait-label,
  .study-page__floating-icon {
    display: none;
  }

  .student-floating-icon--hero {
    top: 7%;
    left: 6%;
    --icon-size: 27px;
    --icon-opacity: 0.72;
  }

  .student-floating-icon--route {
    top: auto;
    bottom: 8%;
    left: 31%;
    --icon-size: 23px;
    --icon-opacity: 0.58;
  }

  .study-page__illustration {
    width: 76px;
    height: 118px;
  }

  .feature-heading__art,
  .fees-feature__art {
    width: 40px;
    height: 68px;
  }

  .empty-state__art {
    width: 54px;
    height: 94px;
  }

  .hero-orbit {
    width: 142px;
    height: 142px;
  }

  .hero-orbit--two {
    width: 163px;
    height: 163px;
  }

  .hero-planet--blue {
    top: 12%;
    right: 2%;
  }

  .hero-planet--orange {
    bottom: 13%;
    left: 1%;
  }

  .student-home-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 10px;
  }

  .student-community {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 11px;
    padding: 0 14px 14px;
    border-radius: 7px 21px 7px 21px;
  }

  .student-community__scene {
    grid-row: 1;
    width: 100%;
    height: clamp(145px, 48vw, 185px);
    min-height: 0;
    max-height: none;
  }

  .student-community__copy {
    grid-row: 2;
    padding: 0 0 2px;
  }

  .student-community__spark {
    top: 10px;
    left: 12px;
  }

  .attendance-feature,
  .day-path,
  .results-feature,
  .fees-feature {
    grid-column: 1;
    grid-row: auto;
    padding: 17px 15px;
    border-radius: 6px 18px 6px 18px;
  }

  .day-path {
    grid-row: 1;
  }

  .attendance-feature {
    grid-row: 2;
  }

  .results-feature {
    grid-row: 3;
  }

  .fees-feature {
    grid-row: 4;
  }

  .feature-heading {
    margin-bottom: 11px;
  }

  .feature-heading h2,
  .fees-feature h2 {
    font-size: 1.08rem;
  }

  .attendance-orbit-layout {
    grid-template-columns: minmax(110px, 0.75fr) minmax(0, 1.25fr);
    gap: 8px;
  }

  .attendance-orbit {
    width: min(100%, 130px);
  }

  .attendance-orbit strong {
    font-size: 1.42rem;
  }

  .attendance-orbit > div span {
    font-size: 0.6rem;
  }

  .attendance-counts p {
    padding: 6px 0;
  }

  .attendance-counts span {
    font-size: 0.67rem;
  }

  .attendance-counts strong {
    font-size: 0.85rem;
  }

  .day-path__list li {
    grid-template-columns: 29px 53px minmax(0, 1fr);
    gap: 7px;
    padding: 8px 0;
  }

  .day-path__list::before {
    right: 14px;
  }

  .day-path__marker {
    width: 29px;
    height: 29px;
  }

  .day-path__list time {
    font-size: 0.66rem;
  }

  .day-path__list strong {
    font-size: 0.74rem;
  }

  .day-path__list small {
    font-size: 0.68rem;
  }

  .subject-trail li {
    gap: 7px 10px;
    padding: 8px 0;
  }

  .subject-trail strong,
  .subject-trail li > div:first-child span {
    font-size: 0.7rem;
  }

  .fees-total strong {
    font-size: 1.35rem;
  }

  .study-page__heading {
    margin: 1px 0 16px;
  }

  .study-page__heading h2 {
    font-size: 2rem;
  }

  .study-page__heading p {
    font-size: 0.79rem;
  }

  .profile-story {
    padding: 19px 15px;
  }

  .profile-story__identity {
    gap: 11px;
    padding-inline-end: 0;
  }

  .profile-story__identity h3 {
    font-size: 1rem;
  }

  .profile-story__identity > div:last-child > span,
  .profile-story__identity p {
    font-size: 0.7rem;
  }

  .profile-story__seal {
    display: none;
  }

  .profile-story__seal .lucide {
    width: 20px;
    height: 20px;
  }

  .profile-story__details {
    gap: 7px;
    margin-top: 20px;
  }

  .profile-story__details > div {
    gap: 3px;
    padding: 11px 9px;
  }

  .profile-story__details dt {
    font-size: 0.64rem;
  }

  .profile-story__details dd {
    font-size: 0.77rem;
  }

  .attendance-overview {
    gap: 14px;
    padding: 19px 15px;
  }

  .attendance-overview__lead > strong {
    font-size: 2.3rem;
  }

  .attendance-overview__counts {
    gap: 5px;
  }

  .attendance-overview__counts > div {
    gap: 4px;
    padding: 10px 5px;
  }

  .attendance-overview__counts span {
    font-size: 0.65rem;
  }

  .attendance-overview__counts strong {
    font-size: 1rem;
  }

  .attendance-journal {
    margin-top: 10px;
    padding: 16px 13px;
  }

  .attendance-journal__list li {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 6px 9px;
    padding: 11px 2px;
  }

  .attendance-journal__list time,
  .attendance-journal__status {
    font-size: 0.68rem;
  }

  .attendance-journal__list li > small {
    grid-column: 2;
    font-size: 0.64rem;
  }

  .result-island {
    grid-template-columns: 35px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px 11px;
  }

  .result-island__index,
  .fee-entry__number {
    width: 32px;
    height: 32px;
    font-size: 0.68rem;
  }

  .result-island__subject > span,
  .result-island__score > span {
    font-size: 0.65rem;
  }

  .result-island__subject h3 {
    font-size: 0.77rem;
  }

  .result-island__score > strong:not(.grade-token) {
    font-size: 1.2rem;
  }

  .result-island__score .study-progress {
    width: min(150px, 100%);
  }

  .fee-entry {
    padding: 15px 13px;
  }

  .fee-entry__title h3 {
    font-size: 0.8rem;
  }

  .fee-entry__amounts {
    gap: 6px;
    margin-block: 13px 10px;
  }

  .fee-entry__amounts span {
    font-size: 0.64rem;
  }

  .fee-entry__amounts strong {
    font-size: 0.68rem;
  }

  .week-ribbon {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .week-ribbon__day > header {
    min-height: 56px;
    padding: 9px 13px;
  }

  .week-ribbon__day > header small {
    font-size: 0.68rem;
  }

  .week-ribbon__day ol {
    padding-inline: 13px;
  }

  .week-ribbon__day li {
    grid-template-columns: minmax(56px, auto) minmax(0, 1fr) 14px;
    gap: 8px;
  }

  .student-footer {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    margin-top: 20px;
    font-size: 0.68rem;
  }

  .student-footer__motto {
    text-align: start;
  }

  .student-footer__developer {
    grid-column: 1 / -1;
    justify-content: center;
    padding-top: 7px;
    border-top: 1px solid var(--portal-line);
    text-align: center;
  }
}

@media (max-width: 375px) {
  .student-main {
    padding-inline: 11px;
  }

  .student-hero {
    grid-template-columns: minmax(0, 1fr) 99px;
    padding-inline: 13px;
  }

  .student-hero h2 {
    font-size: 1.48rem;
  }

  .hero-orbit {
    width: 125px;
    height: 125px;
  }

  .hero-orbit--two {
    width: 145px;
    height: 145px;
  }

  .today-date {
    max-width: 128px;
    font-size: 0.57rem;
  }

  .attendance-orbit-layout {
    grid-template-columns: minmax(100px, 0.72fr) minmax(0, 1.28fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready .student-shell [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .student-shell *,
  .student-shell *::before,
  .student-shell *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
