@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); }

/* TITI KONKUR: shared visual language with the public homepage. */
:root {
  --navy:#103650; --blue:#176e9c; --mint:#0d9a91; --ice:#f6fbfe;
  --muted:#4b6473; --white:#fff;
  --line:#cbdde7; --control:#537b91; --link:#12547a; --accent-text:#09685e;
  --brand-primary:linear-gradient(135deg,#237fa2,#12547a 85%);
  --brand-hero:radial-gradient(ellipse at 12% 18%,#c7e7f2,transparent 65%),linear-gradient(135deg,#e7f5fb,#e0f3f1 65%,#f6fbfe);
  --brand-gold:#7d531a; --brand-gold-line:#d8bf93; --brand-active:#e9f4f9;
  --brand-shadow:0 12px 28px -22px #10365080,0 1px 3px #10365012;
}
:root[data-theme="dark"] {
  --mint:#49bea9; --brand-primary:linear-gradient(135deg,#20718e,#12547a 85%);
  --brand-hero:radial-gradient(ellipse at 12% 18%,#20576d,transparent 72%),linear-gradient(135deg,#132f46,#164449 70%,#102839);
  --brand-gold:#f0ca85; --brand-gold-line:#886d40; --brand-active:#1d3d50;
  --brand-shadow:0 12px 28px -22px #000b,0 1px 3px #0005;
}
@media (prefers-color-scheme:dark) {
  :root:not([data-theme]) {
    --mint:#49bea9; --brand-primary:linear-gradient(135deg,#20718e,#12547a 85%);
    --brand-hero:radial-gradient(ellipse at 12% 18%,#20576d,transparent 72%),linear-gradient(135deg,#132f46,#164449 70%,#102839);
    --brand-gold:#f0ca85; --brand-gold-line:#886d40; --brand-active:#1d3d50;
    --brand-shadow:0 12px 28px -22px #000b,0 1px 3px #0005;
  }
}
#app-header { border-block-start:.26rem solid var(--navy); box-shadow:var(--brand-shadow); }
.login { border-color:var(--brand-gold-line); box-shadow:var(--brand-shadow); }
.login-intro, .hero, .student-panel .hero {
  background:var(--brand-hero); color:var(--ink);
  border-inline-start:.22rem solid var(--brand-gold-line);
}
.login-intro p { color:var(--brand-gold); }
.hero #role { color:var(--brand-gold); }
.hero #date { color:var(--secondary); }
.login-intro h1:focus-visible, .hero :focus-visible { outline-color:var(--link); }
.student-panel .hero { border-radius:1rem; padding:.75rem .9rem; margin-block-end:.65rem; }
.card, nav { box-shadow:var(--brand-shadow); }
.primary { background:var(--brand-primary); color:#fff; border-color:#12547a; }
nav button[aria-current="page"], .student-panel nav button[aria-current="page"] {
  background:var(--brand-active); color:var(--link); border-color:var(--control);
}
.ring-card { border-block-start:2px solid var(--brand-gold-line); }
.login-role-picker {
  position:relative; min-inline-size:0; margin:0 0 .75rem; padding:0; border:0;
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.35rem;
}
.login-role-picker legend { padding:0; margin-block-end:.35rem; font-weight:750; }
.login-role-picker input { position:absolute; inline-size:1px; min-height:0; block-size:1px; opacity:0; margin:0; padding:0; }
.login-role-picker label {
  display:grid; place-items:center; min-block-size:44px; padding:.2rem .15rem; text-align:center;
  border:1px solid var(--line); border-radius:.65rem; background:var(--surface);
  color:var(--ink); font-size:.84rem; font-weight:720; cursor:pointer;
}
.login-role-picker input:checked + label { background:var(--brand-active); color:var(--link); border-color:var(--control); }
.login-role-picker input:focus-visible + label { outline:3px solid var(--link); outline-offset:2px; }
.login-role-picker p {
  display:none; grid-column:1/-1; margin:0; padding:.4rem .6rem;
  border-inline-start:2px solid var(--brand-gold-line); color:var(--secondary);
  font-size:.82rem; line-height:1.75; background:var(--brand-active);
}
#login-role-student:checked ~ #login-student-help,
#login-role-advisor:checked ~ #login-advisor-help,
#login-role-admin:checked ~ #login-admin-help { display:block; }
.login-content .account-links { flex-wrap:wrap; }
@media (max-width:45.99rem) {
  .login { margin-block:.45rem 1rem; }
  .login-intro { padding:.85rem 1rem; }
}

.login-otp { display:grid; gap:.3rem; margin-block-start:.25rem; }
.login-otp label { font-size:.86rem; }
@supports selector(:has(*)) {
  .login-content:has(#login-role-admin:not(:checked)) .login-otp:not(:focus-within) { display:none; }
  .login-content:has(#login-role-advisor:not(:checked)) #activate-advisor:not(:focus) { display:none; }
  .login-content:has(#login-role-student:not(:checked)) #register-student:not(:focus) { display:none; }
}
.account-links:not([hidden]):not(:has(button:not([hidden]):focus)):empty { display:none; }
@supports selector(:has(*)) {
  .login-content:not(:has(#login-role-advisor:checked)):not(:has(#login-role-student:checked #register-student)) .account-links { border-color:transparent; }
}


/* Private conversation */
.tchat { display:grid; grid-template-rows:auto minmax(0,1fr) auto auto; min-width:0; height:clamp(23rem,68vh,41rem); height:clamp(23rem,68dvh,41rem); border:1px solid var(--line); border-radius:1rem; overflow:hidden; background:var(--surface); }
.tchat-top { padding:.65rem .85rem; display:flex; flex-wrap:wrap; gap:.55rem .85rem; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.tchat-person { display:flex; flex-direction:column; }
.tchat-title { font-size:1rem; font-weight:800; }
.tchat-sub { color:var(--secondary); font-size:.75rem; }
.tchat-select { max-width:100%; min-width:0; color:var(--ink); background:var(--page); border:1px solid var(--line); min-height:2.5rem; border-radius:.65rem; padding:.2rem .55rem; font:inherit; }
.tchat-scroll { position:relative; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; background:var(--page); background-image:radial-gradient(var(--line) 1px, transparent 1px); background-size:18px 18px; padding:.75rem; }
.tchat-history { margin:0; padding:0; display:flex; flex-direction:column; list-style:none; gap:.5rem; }
.tchat-bubble { align-self:flex-start; max-width:min(83%,34rem); border:1px solid var(--line); border-radius:1rem 1rem .22rem 1rem; background:var(--surface); color:var(--ink); padding:.38rem .7rem .22rem; overflow-wrap:anywhere; }
.tchat-bubble.tchat-out { align-self:flex-end; background:#dbf4eb; color:#153b39; border-color:#a6dacb; border-radius:1rem 1rem 1rem .22rem; }
:root[data-theme="dark"] .tchat-bubble.tchat-out { background:#173e3c;color:#e3faf4;border-color:#35726a; }
@media(prefers-color-scheme:dark) { :root:not([data-theme]) .tchat-bubble.tchat-out { background:#173e3c;color:#e3faf4;border-color:#35726a; } }
.tchat-body { margin:0; white-space:pre-wrap; text-align:start; line-height:1.75; }
.tchat-time { display:block; font-size:.67rem; text-align:end; opacity:.85; }
.tchat-empty { width:fit-content; max-width:100%; padding:.35rem .7rem; margin:.5rem auto; border-radius:.6rem; border:1px solid var(--line); background:var(--surface); color:var(--secondary); text-align:center; font-size:.85rem; }
.tchat-older { display:block; margin:0 auto .65rem; }
.tchat-status { padding:0 .7rem; color:var(--secondary); font-size:.77rem; }
.tchat-status:empty { display:none; }
.tchat-compose { margin:0 !important; padding:.55rem .65rem; border-top:1px solid var(--line); }
.tchat-inputrow, .tchat-voice { display:flex; align-items:center; gap:.4rem; }
.tchat-voice { flex-wrap:wrap; }
.tchat-input { flex:1; min-width:0; width:auto; min-height:2.75rem; padding:.45rem .7rem; border:1px solid var(--line); border-radius:.9rem; background:var(--page); color:var(--ink); resize:vertical; max-height:8rem; font:inherit; }
.tchat-action { border-color:transparent; background:#2866a6; color:white; border-radius:1.1rem; padding:.35rem .7rem; }
.tchat-action:not(:disabled):hover { background:#204e85; color:white; }
.tchat-mic { border-radius:50%; padding:0; width:2.8rem; flex:none; font-size:1.14rem; }
.tchat-cancel { color:var(--danger); }
.tchat-timer { font-size:.85rem; margin-inline-end:auto; color:var(--danger); }
.tchat-audio { width:min(14.5rem,100%); max-width:100%; height:2.4rem; direction:ltr; display:block; }
.tchat-voice .tchat-audio { flex:1 1 11rem; }
@media(max-width:500px) { .tchat { height:clamp(21rem,64dvh,34rem); } .tchat-top,.tchat-scroll { padding:.5rem; } .tchat-bubble { max-width:89%; } }


/* TITI KONKUR: prioritized home dashboards */
.focus-plan { border-color: color-mix(in srgb,var(--blue) 23%,var(--line)); }
.focus-today { display:flex; gap:1rem; align-items:center; justify-content:space-between; margin-block:.25rem .8rem; }
.focus-today p { margin:.2rem 0; overflow-wrap:anywhere; }
.focus-today .home-ring { flex-shrink:0; }
.focus-next { font-weight:700; color:var(--ink); }
.focus-primary { width:100%; min-height:46px; }
.focus-tests { width:100%; display:flex; align-items:center; justify-content:space-between; text-align:start; gap:.6rem; }
.focus-week .week-day { min-height:51px; color:var(--secondary); border-color:transparent; }
.focus-week .week-day[aria-current="date"] { border-color:var(--line); color:var(--ink); }
.focus-dot { margin-inline:auto; width:.6rem;height:.6rem;border-radius:50%;background:var(--line); }
.focus-dot-active { background:var(--mint); }
.focus-more { margin-block:.45rem 0; }
.focus-more summary { cursor:pointer; padding:.25rem; font-weight:700; }
.focus-more button { margin:.25rem; }
.focus-night .secondary { margin-top:0; }
.focus-advisor-home { display:grid; gap:.65rem; }
.focus-card-title { display:flex; align-items:center; justify-content:space-between; gap:.6rem; }
.focus-count { border-radius:.65rem; background:color-mix(in srgb,var(--mint) 27%,var(--surface)); color:var(--ink); padding:.12rem .5rem; }
.focus-roster-row { display:flex; flex-wrap:wrap; align-items:center; gap:.55rem; padding:.45rem 0; }
.focus-roster-row+.focus-roster-row { border-top:1px solid var(--line); }
.focus-initial { flex:0 0 2.25rem; height:2.25rem; border-radius:50%; display:grid; place-items:center; background:var(--page); border:1px solid var(--line); }
.focus-name { min-width:0; overflow-wrap:anywhere; }
.focus-row-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.32rem; margin-inline-start:auto; }
.focus-row-actions button { min-height:40px; padding:.25rem .55rem; }
.advisor-focus #sections button { display:grid; justify-items:center; gap:.1rem; line-height:1.25; }
.advisor-focus #sections button[aria-current="page"] { color:var(--accent-text); border-color:var(--accent-text); background:color-mix(in srgb,var(--mint) 14%,var(--surface)); }
@media(max-width:600px){
  .advisor-focus #sections { position:fixed; z-index:3; inset-inline:.45rem; bottom:max(.35rem,env(safe-area-inset-bottom)); display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:0; gap:.15rem; }
  .student-panel #sections { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.15rem; }
  .advisor-focus #sections button, .student-panel #sections button { white-space:nowrap; padding:.15rem; font-size:.72rem; min-height:52px; }
  .advisor-focus main { padding-block-end:calc(5.25rem + env(safe-area-inset-bottom)); }
  .focus-week .week-day { font-size:.72rem; padding:.15rem; }
}


/* TITI KONKUR shared identity */
:root { --navy:#142d4e; --blue:#3478c0; --mint:#2bbfa0; --ice:#f8fafc; --muted:#64748b; --brand-gold:#2866a6; --brand-gold-line:var(--line); --brand-primary:#2866a6; --brand-hero:var(--surface); --brand-shadow:0 12px 28px -24px #142d4e55,0 1px 3px #142d4e10; }
:root[data-theme="dark"] { --brand-gold:#9ccaff; --brand-gold-line:var(--line); }
@media(prefers-color-scheme:dark) { :root:not([data-theme]) { --brand-gold:#9ccaff; --brand-gold-line:var(--line); } }
.login { border-color:var(--line); }
.login-intro { border-inline-start:0; }
:root { --titi-action:#2866a6; --titi-action-hover:#1b5088; --titi-selected:#e8f1fb; }
:root[data-theme="dark"] { --titi-selected:#223d5d; }
@media(prefers-color-scheme:dark) { :root:not([data-theme]) { --titi-selected:#223d5d; } }
#app-header .brand { letter-spacing:0; font-weight:850; }
#app-header .top { min-height:3.85rem; }
.login-intro { background:var(--navy); color:var(--white); }
.login-intro p { color:#d0e0f2; }
#dashboard-hero.hero { padding:clamp(.7rem,2vw,1.12rem); border:1px solid var(--line); background:var(--surface); color:var(--ink); }
.student-panel #dashboard-hero.hero { background:transparent; border:0; padding:.25rem .15rem .65rem; }
#dashboard-hero #role,#dashboard-hero #date { color:var(--secondary); }
#dashboard-hero :focus-visible { outline-color:var(--link); }
.hero-avatar { background:var(--titi-selected); color:var(--ink); border-color:var(--line); }
.primary,.tchat-action { background:var(--titi-action); color:#fff; border-color:var(--titi-action); }
.primary:not(:disabled):hover,.tchat-action:not(:disabled):hover { background:var(--titi-action-hover); color:#fff; border-color:var(--titi-action-hover); }
#sections button[aria-current="page"] { color:var(--link); border-color:transparent; background:var(--titi-selected); }
#sections button[aria-current="page"] .nav-icon { color:var(--link); }
#panels progress { accent-color:var(--mint); }
.focus-plan { border-color:var(--line); }
.focus-count { background:var(--titi-selected); color:var(--link); }
.focus-initial { background:var(--titi-selected); color:var(--ink); }
.tchat-bubble.tchat-out { background:var(--titi-selected); color:var(--ink); border-color:var(--line); }
.tchat-scroll { background-color:var(--page); }

/* Persistent profile and sign-out controls */
#app-header.account-header {position:sticky;inset-block-start:0;z-index:4}
#app-header.account-header .top {display:flex;align-items:center;flex-wrap:nowrap;gap:.35rem}
.account-header .brand {white-space:nowrap;margin-inline-end:auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
.account-header .brand img {flex:none;width:30px;height:30px}
.account-header .actions {display:flex;align-items:center;flex-wrap:nowrap;gap:.2rem}
.account-header .hero-avatar {width:44px;height:44px;min-height:44px;flex:0 0 44px}
.account-header #logout {min-height:44px;padding-inline:.6rem;white-space:nowrap;color:var(--ink);border-color:var(--line)}
.account-header #theme {position:relative;width:44px;padding:0;display:grid;place-items:center;min-height:44px}
.account-header #theme-icon {margin:0;font-size:1.35rem}
.account-header #theme-text {position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
.profile-edit,.profile-edit-grid,.profile-edit-grid>div {display:grid;gap:.55rem;min-width:0}
.profile-edit-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
.profile-edit input,.profile-edit select,.profile-edit textarea{min-width:0;width:100%;box-sizing:border-box}
.profile-edit .primary {justify-self:start}
.profile-study-extra {padding:.6rem;border:1px solid var(--line);border-radius:.7rem}
.profile-study-extra summary {cursor:pointer}
.profile-study-extra[open] summary {margin-bottom:.55rem}
@media(max-width:385px) {
  .account-header .brand {font-size:.77rem;gap:.2rem}
  .account-header .brand img {width:22px;height:22px}
  .account-header #logout{padding-inline:.4rem;font-size:.81rem}
}
@media(max-width:335px) {
  .account-header .brand img {display:none}
  .profile-edit-grid {grid-template-columns:1fr}
}

/* Keep the student composer above the independently scrollable conversation. */
.tchat.tchat-compose-first { grid-template-rows:auto auto auto minmax(0,1fr); }
.tchat-compose-first .tchat-top { grid-row:1; }
.tchat-compose-first .tchat-compose { grid-row:2; border-top:0; border-bottom:1px solid var(--line); background:var(--surface); }
.tchat-compose-first .tchat-status { grid-row:3; overflow-wrap:anywhere; }
.tchat-compose-first .tchat-scroll { grid-row:4; }
.tchat-compose-first .tchat-input,.tchat-compose-first .tchat-action,.tchat-compose-first .tchat-cancel { min-height:44px; }
.tchat-compose-first .tchat-mic { width:auto; min-width:44px; border-radius:.9rem; padding:.35rem .65rem; font-size:.94rem; }
.tchat-compose-first .tchat-action,.tchat-compose-first .tchat-cancel { flex-shrink:0; }
@media(max-width:500px){
 .tchat.tchat-compose-first { height:clamp(18rem,61svh,32rem); }
 .tchat-compose-first .tchat-input { font-size:16px; }
 .tchat-compose-first .tchat-compose { padding:.4rem .5rem; }
 .tchat-compose-first .tchat-inputrow { gap:.3rem; }
}
.plan-more > summary,.plan-filter-more > summary,.plan-editor-more > summary { cursor:pointer; padding:.38rem .55rem; min-height:44px; color:var(--ink); }
.plan-more-options,.plan-optional-fields { display:flex; flex-wrap:wrap; gap:.45rem; align-items:end; }
.plan-more,.plan-filter-more,.plan-editor-more { max-width:100%; min-width:0; }
.plan-editor-more { margin-block:.3rem; }
.plan-editor-more > summary { border:1px solid var(--line); border-radius:.7rem; }
.plan-editor-more .plan-form-fields { margin-block:.55rem; }

/* Compact student planner controls and paired page range. */
.plan-toolbar:has(.plan-scope) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) auto; align-items:end; gap:.45rem; }
.plan-scope,.plan-section-select { display:grid; min-width:0; gap:.18rem; font-size:.84rem; }
.plan-scope select,.plan-section-select select { width:100%; min-width:0; min-height:44px; }
.plan-filter-more > summary { border:1px solid var(--line); border-radius:.6rem; }
.plan-filter-more[open] { grid-column:1/-1; }
.plan-optional-fields > label { flex:1 1 7rem; min-width:0; }
.plan-date:has(.plan-date-buttons) { justify-content:space-between; }
.plan-date-label { font-weight:700; font-size:.94rem; }
.plan-date-buttons { display:flex; flex-wrap:nowrap; align-items:center; gap:.25rem; }
.plan-date-buttons button { min-width:44px; min-height:44px; padding-inline:.55rem; }
.plan-page-range { margin:0; min-inline-size:0; grid-column:1/-1; border:1px solid var(--line); border-radius:.65rem; padding:.45rem .6rem .65rem; }
.plan-page-range legend { padding-inline:.3rem; }
.plan-page-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45rem; }
.plan-page-fields label,.plan-page-fields input { min-width:0; width:100%; }
@media (max-width:540px){
 .plan-toolbar:has(.plan-scope) { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .plan-toolbar:has(.plan-scope) .plan-filter-more { grid-column:1/-1; }
 .plan-date:has(.plan-date-buttons) { gap:.28rem .4rem; }
 .plan-date-label { font-size:.83rem; }
}

/* Compact student home, without hiding any of today's activities. */
.focus-plan-compact h2 { margin-block-end:.35rem; }
.today-compact-total { display:flex; flex-wrap:wrap; gap:.3rem .6rem; align-items:center; justify-content:space-between; margin-block-end:.35rem; }
.today-compact-total p { margin:0; font-size:.84rem; }
.today-plan-link { padding:.28rem .55rem; min-height:36px; font-size:.77rem; }
.today-task-tiles { display:flex; align-items:stretch; flex-wrap:wrap; gap:.36rem; }
.today-task-tile { flex:0 0 clamp(62px,17vw,88px); min-width:0; min-height:75px; padding:.3rem .18rem; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.1rem; text-align:center; border-radius:.72rem; color:var(--ink); background:var(--page); }
.today-task-tile .home-ring-small { flex-shrink:0; width:1.75rem; height:1.75rem; font-size:.56rem; }
.today-task-title,.today-task-minutes { display:block; max-width:100%; overflow-wrap:anywhere; line-height:1.42; }
.today-task-title { font-size:.72rem; }
.today-task-minutes { font-size:.64rem; color:var(--secondary); }
.focus-tests.focus-tests-compact { width:5.25rem; min-height:4.15rem; display:inline-grid; place-content:center; justify-items:center; text-align:center; gap:.1rem; padding:.35rem; font-size:.73rem; }
.focus-tests-compact .secondary { font-size:.66rem; }
:root[data-theme="light"] { --page:#dceff5; --line:#b4d4de; }
@media(prefers-color-scheme:light){ :root:not([data-theme]) { --page:#dceff5; --line:#b4d4de; } }

.today-task-tile { --tile-edge:clamp(62px,17vw,88px); flex-basis:var(--tile-edge); width:var(--tile-edge); min-height:0; aspect-ratio:1; }
.today-task-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.focus-tests.focus-tests-compact { width:4.7rem; min-height:4.7rem; aspect-ratio:1; }
.plan-toolbar:has(.plan-filter-more[open]) > .plan-filters { grid-column:1/-1; }
@media(max-width:540px){ .plan-toolbar:has(.plan-scope) > .plan-filters { grid-column:1/-1; } }


/* Advisor's two compact, clickable priorities. */
.advisor-quick-tiles { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:.45rem; align-items:start; }
.advisor-quick-tile { inline-size:5.7rem; block-size:5.7rem; border:1px solid var(--control); border-radius:.85rem; padding:.32rem; display:grid; place-content:center; text-align:center; gap:.18rem; background:var(--surface); color:var(--ink); }
.advisor-quick-count { font-size:1.55rem; line-height:1.15; color:var(--link); }
.advisor-quick-label { font-size:.72rem; font-weight:700; line-height:1.45; }
.advisor-quick-tile[data-kind="followup"] .advisor-quick-count { color:var(--accent-text); }
.advisor-quick-tile[aria-expanded="true"] { border-color:var(--link); box-shadow:inset 0 0 0 1px var(--link); }
#advisor-quick-messages,#advisor-quick-followup { grid-column:1/-1; }

/* Compact glyphs; interactive target widths and heights are unchanged. */
:root { --titi-icon-size: .95rem; }
#sections .nav-icon { font-size:var(--titi-icon-size); line-height:1; }
#theme-icon,.student-header #theme-icon,.account-header #theme-icon { font-size:1.04rem; }
.bell-icon { transform:scale(.82); }
.invite-icon { transform:scale(.85); transform-origin:center; }
.brand img,.student-header .brand img,.account-header .brand img { width:24px; height:24px; }
.focus-initial { flex-basis:1.72rem; height:1.72rem; font-size:.78rem; }
.tchat:not(.tchat-compose-first) .tchat-mic { font-size:var(--titi-icon-size); }
button > svg[aria-hidden="true"] { inline-size:var(--titi-icon-size); block-size:var(--titi-icon-size); }
@media(max-width:500px){
 .brand img,.student-header .brand img,.account-header .brand img { width:20px; height:20px; }
 #sections .nav-icon { font-size:.88rem; }
}

/* Pencil cue, with the original profile button as its full touch target. */
.profile-edit-indicator { position:absolute; z-index:1; inset-inline-end:-2px; inset-block-end:-2px; inline-size:18px; block-size:18px; display:grid; place-items:center; background:var(--navy); color:#fff; border:1px solid var(--surface); border-radius:50%; pointer-events:none; }
.profile-edit-indicator svg { inline-size:11px; block-size:11px; }
