@font-face { font-family: Vazirmatn; src: url(/app/fonts/Vazirmatn-persian.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: light;
  --navy: #142d4e; --blue: #3478c0; --mint: #2bbfa0; --ice: #f8fafc;
  --muted: #64748b; --warning: #dc2626; --white: #fff;
  --page: var(--ice); --surface: var(--white); --ink: var(--navy);
  --secondary: var(--muted); --line: #d5dfea; --control: #506680;
  --link: #265e98; --danger: #b91c1c; --accent-text: #0b6454;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { color-scheme: dark; --page: #0b1728; --surface: #132541; --ink: #f8fafc; --secondary: #bdcbe0; --line: #30465f; --control: #8299b5; --link: #9ccaff; --danger: #ffafac; --accent-text: #85e6d1; }
}
:root[data-theme="dark"] { color-scheme: dark; --page: #0b1728; --surface: #132541; --ink: #f8fafc; --secondary: #bdcbe0; --line: #30465f; --control: #8299b5; --link: #9ccaff; --danger: #ffafac; --accent-text: #85e6d1; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); font: 1rem/1.85 Vazirmatn, Tahoma, sans-serif; }
header { background: var(--surface); border-bottom: 1px solid var(--line); }
.shell { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.top, .brand, .actions { display: flex; align-items: center; gap: .5rem; }
.top { justify-content: space-between; flex-wrap: wrap; min-height: 4.75rem; padding-block: .5rem; }
.brand { color: var(--ink); font-weight: 800; text-decoration: none; }
button, input { font: inherit; min-height: 44px; border: 1px solid var(--control); border-radius: .7rem; }
button { padding: .35rem .75rem; background: var(--surface); color: var(--ink); cursor: pointer; }
button:disabled { cursor: wait; }
input { width: 100%; padding: .35rem .7rem; background: var(--page); color: var(--ink); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.skip { position: absolute; inset-inline-start: 1rem; top: .5rem; z-index: 2; background: var(--surface); padding: .5rem; transform: translateY(-200%); }
.skip:focus { transform: none; }
main { padding-block: 1.25rem 6rem; }
#notice { margin: 0; color: var(--danger); }
#notice:not(:empty) { margin-block-end: 1rem; }
.login {
  display: grid;
  max-width: 52rem;
  margin: clamp(.5rem, 6vh, 4rem) auto;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: var(--surface);
}
.login-intro {
  display: grid;
  align-content: center;
  gap: .45rem;
  padding: clamp(1.25rem, 5vw, 2.5rem);
  border-radius: 1.25rem 1.25rem 0 0;
  background: var(--navy);
  color: var(--white);
}
.login-intro p { font-size: .9rem; font-weight: 700; color: #a5f1de; }
.login-intro h1:focus-visible { outline-color: var(--white); }
.login-content { min-inline-size: 0; padding: clamp(1rem, 4vw, 2.5rem); }
.login-content form { margin: 0; gap: .55rem; }
.login-content .primary { min-height: 48px; margin-block-start: .65rem; }
.login-content #direct-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-block-start: .55rem;
  color: var(--link);
  font-size: .9rem;
  text-underline-offset: .2em;
}
.password-label { font-weight: 650; }
.password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; }
.password-field input { min-width: 0; min-height: 48px; }
.password-field button { min-width: 4.5rem; color: var(--link); }
.password-field:has(button[hidden]) { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 46rem) {
  .login { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .login-intro { border-radius: 0 1.25rem 1.25rem 0; }
}
.card { background: var(--surface); border: 1px solid var(--line); padding: clamp(.9rem, 3vw, 1.5rem); border-radius: 1rem; min-width: 0; }
form { display: grid; gap: .45rem; margin-top: 1.2rem; }
form > label:not(:first-child) { margin-top: .5rem; }
.primary { background: #265e98; color: var(--white); border-color: #265e98; margin-top: 1rem; font-weight: 700; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.55rem, 4vw, 2.35rem); line-height: 1.45; }
h2 { font-size: 1.2rem; }
small, .secondary { color: var(--secondary); }
.hero { padding: clamp(1rem, 4vw, 2rem); border-radius: 1.15rem; background: var(--navy); color: var(--white); border-inline-start: .35rem solid var(--mint); }
.hero { display: flex; align-items: flex-start; gap: .85rem; }
.hero > div { min-inline-size: 0; overflow-wrap: anywhere; }
.hero-avatar {
  position: relative; display: grid; place-items: center; flex: 0 0 56px;
  width: 56px; height: 56px; padding: 0; border-radius: 50%;
  border-color: #9ccaff; background: #254567; color: var(--white);
  font-size: 1.4rem; font-weight: 750;
}
.hero-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.profile-panels, .student-home { display: grid; gap: .75rem; }
.avatar-editor { margin-block-start: .7rem; }
.avatar-editor input { max-inline-size: 100%; }
.avatar-editor .primary { justify-self: start; margin-block-start: .3rem; }
.profile-status:empty { display: none; }
.today-plan summary { cursor: pointer; min-height: 44px; align-content: center; font-size: 1.2rem; font-weight: 750; color: var(--link); }
.study-tasks li { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; justify-content: space-between; }
.study-tasks h3 { font-size: 1.04rem; }
.task-check { display: inline-flex; gap: .5rem; align-items: center; min-height: 44px; cursor: pointer; }
.task-check input { width: 1.2rem; min-height: 0; height: 1.2rem; margin: 0; accent-color: var(--link); }
.task-check input:checked + .task-state { color: var(--accent-text); font-weight: 700; }
#role { color: #a5f1de; }
#date { color: #d4e2f2; margin-top: .35rem; }
nav { display: flex; gap: .25rem; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; padding: .3rem; margin-block: 1rem; }
nav button { flex: 1; border-color: transparent; padding-inline: .2rem; font-size: .85rem; }
nav button[aria-current="page"] { color: var(--link); border-color: var(--control); font-weight: 800; }
.grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.grid + .card { margin-top: .75rem; }
.card + .grid { margin-top: .75rem; }
.metric { display: block; font-size: 1.55rem; margin-top: .25rem; }
ul { padding: 0; list-style: none; margin: .35rem 0 0; }
li { padding-block: .65rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
li:last-child { border: 0; }
.status { color: var(--accent-text); font-weight: 700; }
.follow { color: var(--danger); }
progress { display: block; width: 100%; margin-top: .5rem; accent-color: var(--blue); }
@media (max-width: 40rem) {
  nav { position: fixed; inset-inline: .5rem; bottom: max(.5rem, env(safe-area-inset-bottom)); margin: 0; }
  html { scroll-padding-bottom: 5rem; }
}
.hero :focus-visible { outline-color: var(--white); }
.profile-status { margin-block: .4rem; color: var(--ink); }
select, textarea { width: 100%; min-height: 44px; border: 1px solid var(--control); border-radius: .7rem; padding: .35rem .7rem; font: inherit; background: var(--page); color: var(--ink); }
textarea { resize: vertical; }
.account-links {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .7rem;
  margin-block-start: 1.15rem;
  padding-block-start: .55rem;
  border-block-start: 1px solid var(--line);
}
.account-links button { border-color: transparent; padding-inline: .35rem; color: var(--link); font-size: .9rem; }
#account-panel h2 { margin-block-end: .7rem; }
.account-feedback { overflow-wrap: anywhere; }
.account-feedback:empty { display: none; }
.invite-delivery { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; }
.invite-delivery:focus-visible { outline-offset: 3px; }
.invite-icon { display: inline-block; flex: 0 0 1.15rem; height: .85rem; color: #b9ddff; border: 2px solid currentColor; border-radius: .2rem; position: relative; }
.invite-icon::after {
  content: "";
  position: absolute;
  width: .45rem;
  height: .45rem;
  top: -.15rem;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.invite-delivery + .account-feedback { margin-block-start: .55rem; }
.invite-input-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: .45rem; }
.invite-input-row input { flex: 1 1 5rem; min-width: 0; width: auto; }
.invite-input-row .invite-delivery { flex: 1 0 auto; margin: 0; }
.student-header { position: sticky; inset-block-start: 0; z-index: 4; }
.student-header .top { min-height: 64px; flex-wrap: nowrap; gap: .3rem; }
.student-header .brand { white-space: nowrap; margin-inline-end: auto; }
.student-header .brand img { width: 32px; height: 32px; mix-blend-mode: multiply; }
:root[data-theme="dark"] .student-header .brand img { filter: invert(1); mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .student-header .brand img { filter: invert(1); mix-blend-mode: screen; }
}
.student-header .actions { gap: .2rem; }
.student-header #theme, .header-icon { position: relative; width: 44px; padding: 0; display: grid; place-items: center; }
.student-header #theme-text { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
#theme-icon { margin-inline-end: .25rem; font-size: 1.15rem; }
.student-header #theme-icon { margin: 0; font-size: 1.35rem; }
.student-header .hero-avatar { width: 44px; height: 44px; min-height: 44px; flex-basis: 44px; }
.bell-icon { position: relative; width: 14px; height: 15px; border: 2px solid currentColor; border-radius: 9px 9px 4px 4px; }
.bell-icon::after { content: ''; position: absolute; top: 100%; left: 3px; width: 4px; height: 3px; border-radius: 0 0 3px 3px; background: currentColor; }
#notification-count { position: absolute; top: 0; inset-inline-end: 0; min-width: 1.15rem; min-height: 1.15rem; border-radius: 99px; padding-inline: .15rem; background: #142d4e; color: white; font-size: .68rem; }
.student-panel .hero { border: 0; background: transparent; padding: .2rem .15rem .65rem; color: var(--ink); }
.student-panel .hero #role { display: none; }
.student-panel .hero #date { color: var(--secondary); }
.student-panel .hero :focus-visible { outline-color: var(--link); }
.student-panel .hero h1 { font-size: clamp(1.35rem,4vw,1.9rem); }
.student-panel #heading { scroll-margin-block-start: 5rem; }
.student-panel nav { position: fixed; inset-inline: max(.45rem,calc((100% - 70rem)/2)); bottom: max(.35rem,env(safe-area-inset-bottom)); z-index: 3; margin: 0; }
.student-panel nav button { display: grid; align-content: center; justify-items: center; min-height: 51px; color: var(--secondary); line-height: 1.3; }
.student-panel nav button[aria-current="page"] { color: var(--accent-text); border-color: var(--accent-text); background: color-mix(in srgb,var(--mint) 14%,var(--surface)); }
.nav-icon { font-size: 1.15rem; line-height: 1.2; }
.student-panel main { padding-block-start: .7rem; padding-block-end: calc(5.25rem + env(safe-area-inset-bottom)); }
.home-rings { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.ring-card { display: grid; place-items: center; gap: .5rem; min-width: 0; min-height: 8.6rem; padding: .7rem .35rem; text-align: center; }
.ring-card .secondary { font-size: .78rem; }
.home-ring {
  display: grid; place-items: center; position: relative; isolation: isolate;
  width: 5rem; height: 5rem; border-radius: 50%; 
  background: conic-gradient(var(--ring-color) var(--ring-fill), var(--line) 0);
  font-weight: 750; line-height: 1;
}
.home-ring::before { content: ''; position: absolute; z-index: -1; inset: .38rem; border-radius: 50%; background: var(--surface); }
.home-ring-small { width: 2rem; height: 2rem; font-size: .59rem; }
.home-ring-small::before { inset: .16rem; }
.ring-complete { animation: ring-complete .3s ease-out; }
@keyframes ring-complete { 50% { transform: scale(1.035); } }
@media (prefers-reduced-motion: reduce) { .ring-complete { animation: none; } }
.week-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem; margin-block: .35rem .55rem; }
.week-actions button { min-width: 44px; padding-inline: .35rem; font-size: .76rem; }
.week-actions span { font-size: .72rem; }
.week-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: .18rem; }
.week-day { display: grid; align-content: start; justify-items: center; gap: .25rem; min-width: 0; min-height: 3.8rem; font-size: .72rem; padding: .18rem 0; border-color: transparent; }
.week-day[aria-current="date"] { border-color: var(--link); color: var(--link); font-weight: 750; }
.week-summary { font-size: .78rem; margin-block-start: .45rem; }
@media (max-width: 360px) {
  .student-header .brand { font-size: .82rem; gap: .25rem; }
  .student-header .brand img { width: 24px; height: 24px; }
  .week-day { font-size: .6rem; }
}
.home-dialog { width: min(94vw,36rem); max-height: 86dvh; overflow: auto; border: 1px solid var(--control); border-radius: 1rem; background: var(--surface); color: var(--ink); padding: 1rem; }
.home-dialog::backdrop { background: rgb(13 25 41 / 65%); }
.home-dialog-top, .home-inline { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-block-end: .5rem; }
.home-dialog-top { justify-content: space-between; }
.home-form { min-width: 0; }
.home-form label { display: grid; gap: .25rem; }
.home-form .primary { margin-block-start: .3rem; }
.home-inline { margin-block-start: .45rem; }
.advisor-plan-item { display: grid; gap: .35rem; min-width: 0; border: 1px solid var(--line); border-radius: .6rem; padding: .6rem; margin-block: .35rem; }
.home-notice { display: block; width: 100%; text-align: start; margin-block: .4rem; }
.plan-panel, .plan-stack { display:grid; gap:.7rem; }
.plan-toolbar, .plan-date, .plan-tags, .plan-filters { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.plan-toolbar button, .plan-date button { padding-inline:.65rem; }
.plan-toolbar button[aria-pressed="true"], .plan-calendar-day[aria-current="date"] { border-color:var(--link); color:var(--link); font-weight:700; }
.plan-tags { margin-block:.3rem; }
.plan-tags span { color:var(--link); background:var(--page); border:1px solid var(--line); border-radius:1rem; padding:.1rem .5rem; font-size:.78rem; }
.plan-filters label { flex:1 1 7rem; min-width:0; font-size:.88rem; }
.plan-form-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr)); gap:.55rem; }
.plan-form-fields label { min-width:0; }
.plan-check { display:flex !important; flex-direction:row-reverse; justify-content:flex-end; align-items:center; gap:.55rem; min-height:44px; }
.plan-check input { width:1.15rem; min-height:1.15rem; accent-color:var(--link); }
.plan-audience { max-height:12rem; overflow:auto; min-width:0; border:1px solid var(--line); border-radius:.6rem; }
.plan-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.2rem; }
.plan-calendar-day { display:grid; justify-items:center; min-width:0; padding:.22rem 0; font-size:.75rem; }
.plan-calendar-day small { font-size:.63rem; }
.plan-timer-reading { font-size:1.15rem; font-weight:750; }
.plan-wide-dialog { width:min(94vw,48rem); }
.exam-panel { display:grid; gap:.75rem; }
.exam-panel .card .card { margin-block-start:.45rem; }
.exam-dialog { width:min(94vw,45rem); }
.exam-top { display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding:.75rem; margin-block-end:.5rem;
  background:#142D4E; color:#fff; border-radius:.75rem; }
.exam-clock { direction:ltr; font-variant-numeric:tabular-nums; }
.exam-question { margin:.65rem 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.exam-choices { display:grid; gap:.4rem; margin-block:.55rem; }
.exam-choices button { width:100%; text-align:start; white-space:pre-wrap; overflow-wrap:anywhere; }
.exam-choices button[aria-pressed=true], .exam-number.is-answered { background-color:color-mix(in srgb,var(--mint) 18%,var(--surface)); border-color:var(--accent-text); color:var(--accent-text); }
.exam-sheet { display:grid; grid-template-columns:repeat(auto-fit,minmax(44px,1fr)); gap:.26rem; margin:.6rem 0; }
.exam-number { padding-inline:.2rem; }
.exam-number.is-marked { box-shadow:inset 0 -3px #a95f16; }
.exam-number[aria-current=step] { outline:2px solid var(--link); outline-offset:1px; }
.exam-dialog img { max-width:100%; max-height:16rem; object-fit:contain; }
.exam-dialog pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.exam-dialog summary { cursor:pointer; padding-block:.45rem; }
.exam-dialog .card + .card { margin-block-start:.5rem; }
.exam-solution > * + * { margin-block-start:.4rem; }
.exam-bar { background:var(--line); height:.65rem; position:relative; border-radius:1rem; margin-block:.35rem; direction:ltr; }
.exam-bar::before { content:''; position:absolute; left:50%; top:0; height:100%; width:1px; background:var(--control); }
.exam-bar span { position:absolute; left:50%; width:var(--exam-score); height:100%; border-radius:1rem; background:var(--mint); }
.exam-bar span.is-negative { left:auto; right:50%; background:var(--danger); }
