/* Kvam application design system. Shared across roles and screen sizes. */
:root{--blue:#285aba;--ink:#191c24;--muted:#626778;--line:#e7e8f1;--paper:#eff0f5;--radius:24px;--ease-app:cubic-bezier(.2,.8,.2,1);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);background:var(--paper)}
.boot{position:fixed;inset:0;z-index:100;height:100vh;height:100dvh;display:grid;place-items:center;background:#296fff}.boot-logo{display:block;width:min(55vw,320px);height:auto;aspect-ratio:706/300;transform-origin:center;filter:brightness(0) invert(1)}
@media(prefers-reduced-motion:no-preference){.boot-letter{animation:kvam-boot-letter .5s cubic-bezier(.2,.8,.2,1) both}.boot-letter:nth-of-type(2){animation-delay:.18s}.boot-letter:nth-of-type(3){animation-delay:.36s}.boot-letter:nth-of-type(4){animation-delay:.54s}@keyframes kvam-boot-letter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}}
/* The student home is a continuous page, with sections instead of floating cards. */
#content:has(.student-home){padding:0;max-width:none;background:#fff}
.student-home{background:#fff}
.student-discover{padding:clamp(48px,7vw,92px) clamp(26px,6vw,80px) 64px}
.student-discover h1{font-size:clamp(38px,5.3vw,66px);line-height:1.08;letter-spacing:-.05em;margin:0 0 20px;font-weight:730}
.student-discover>p:not(.student-search-error){font-size:clamp(20px,2.2vw,26px);letter-spacing:-.025em;color:#6f7988;margin:0 0 35px}
.student-discover strong{color:var(--blue);font-weight:700}
.student-subject-search{display:flex;align-items:center;gap:10px;background:#f3f5f8;border:1px solid #edf0f4;border-radius:16px;padding:7px;max-width:590px}
.student-subject-search input{flex:1;min-width:0;height:52px;padding:0 14px;border:0;background:transparent;font-size:17px;box-shadow:none}
.student-subject-search input:focus{box-shadow:none;border:0;outline:none}.student-subject-search input::placeholder{color:#a2aab6}
.student-subject-search button{width:48px;height:48px;border:0;border-radius:12px;background:var(--blue);color:#fff;display:grid;place-items:center;flex:none;cursor:pointer}
.student-subject-search button .icon{width:21px;height:21px}
.student-search-error{color:#bb4650;font-size:14px;margin:9px 0 0;min-height:0}.student-search-error:empty{display:none}
.student-applications:not(:empty){--application-inset:clamp(26px,6vw,80px);padding-block-start:34px}
.student-applications > .section-head,
.student-applications .request-card{padding-inline:var(--application-inset)}
.student-referral{background:#f4f6f9;padding:clamp(48px,7vw,92px) clamp(26px,6vw,80px) 64px;color:#1b2434}.student-referral h2{font-size:clamp(38px,5.3vw,66px);line-height:1.08;letter-spacing:-.05em;margin:0 0 20px;font-weight:730;max-width:850px}.student-referral p{max-width:850px;color:#6f7988;font-size:clamp(18px,2vw,24px);letter-spacing:-.025em;line-height:1.45}.student-referral p b{color:var(--blue);font-weight:700}.student-referral label{display:block;max-width:590px}.student-referral input{width:100%;margin-top:8px}.student-referral .actions{justify-content:flex-start}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:780px){.student-discover{padding:56px 24px 48px}.student-discover h1{font-size:40px}.student-discover>p:not(.student-search-error){font-size:20px;margin-bottom:30px}.student-applications:not(:empty){--application-inset:24px;padding-block-start:32px}.student-referral{padding:48px 24px}.student-referral h2{font-size:40px}.student-referral p{font-size:20px}}
body{background:var(--paper);letter-spacing:-.012em}h1,h2,h3{letter-spacing:-.035em}h1{font-size:32px;font-weight:700}h2{font-weight:680}p{line-height:1.55}
.sidebar{width:248px;padding:34px 18px 20px;border-color:var(--line);background:#fff}.sidebar>.logo{margin:0 14px 45px}.workspace{margin-left:248px}.workspace-label{font-size:10px;letter-spacing:.08em;color:#a2a9b5}.sidebar nav .nav-link{border-radius:12px;color:#646f81;font-size:14px;font-weight:560;margin:2px 0;padding:12px 13px;transition:background .2s var(--ease-app),color .2s var(--ease-app),transform .2s var(--ease-app)}.sidebar nav .nav-link:hover{background:#f5f7fa;color:#202b3c}.sidebar nav .nav-link.active{background:#edf3ff;color:var(--blue)}.sidebar-bottom .small-note{color:#9ba3af}.topbar{height:76px;padding:0 38px;border-color:var(--line);background:#ffffffed;backdrop-filter:blur(18px)}.breadcrumb{color:#8b94a2;font-size:13px}.breadcrumb b{color:#202b3c;font-weight:650}.icon-button{border-color:transparent;background:#f4f6f8;transition:background .2s var(--ease-app),transform .2s var(--ease-app)}.icon-button:hover{background:#eaeef5}.avatar{background:#eef2fa;color:#4b648d}#content{max-width:1280px}.page-footer{color:#a3aab5}
.panel,.empty{border:1px solid #edf0f3;background:#fff;border-radius:var(--radius);box-shadow:0 3px 14px rgba(27,36,52,.025)}.panel{padding:24px}.empty{border-style:solid;padding:44px 24px}.empty-symbol{width:48px;height:48px;border-radius:15px;background:#f1f4f8;color:#8190a7}.empty h3{font-size:17px}.empty p{font-size:14px;color:#828b98}
.button{min-height:44px;padding:11px 16px;border-radius:11px;border:1px solid #e7ebf0;background:#fff;color:#263244;font-weight:600;box-shadow:none;transition:background .2s var(--ease-app),border-color .2s var(--ease-app),color .2s var(--ease-app),transform .16s var(--ease-app),box-shadow .2s var(--ease-app)}.button:hover{background:#f6f8fa;border-color:#dce1e8;color:#202b3c}.button.primary{background:var(--blue);border-color:var(--blue);color:#fff}.button.primary:hover{background:#103b8b;border-color:#103b8b;color:#fff}.button.soft{background:#f3f5f8;border-color:#f3f5f8;color:#344155}.button.soft:hover{background:#e9edf2;border-color:#e9edf2;color:#1c283a}.button:active,.icon-button:active,.nav-link:active,.mobile-navigation button:active{transform:scale(.97)}.text-button{font-weight:600;color:var(--blue)}
input,select,textarea{border-color:#e4e8ee;background:#fff;border-radius:11px;transition:border-color .2s,box-shadow .2s,background .2s}input:focus,select:focus,textarea:focus{border-color:#9bbcff;box-shadow:0 0 0 3px #174caa16}.tag{background:#f1f3f6;color:#647085;border-radius:8px}.tag.green{background:#eaf6f0;color:#338663}.tag.amber{background:#fff7e9;color:#a87927}.inline-note{background:#f4f6f9;color:#617084}.divider{background:#eef0f3}
.welcome{margin-bottom:28px}.welcome h1{font-size:30px}.welcome p{font-size:14px;color:#87909f}.date-label{color:#9da5af}.home-grid{gap:16px}.hero{background:#fff;color:var(--ink);border:1px solid #e9edf2;border-radius:20px;min-height:255px;padding:30px;box-shadow:0 4px 18px #17233b08}.hero .overline{color:#8a95a4;letter-spacing:.09em}.hero h2{color:#1b2434;font-size:30px;line-height:1.18;font-weight:700;max-width:390px}.hero p{color:#788493;font-size:14px;line-height:1.6;max-width:440px}.hero .button{background:var(--blue);border:1px solid var(--blue);color:white;font-size:14px;padding:10px 16px}.hero .button:hover{background:#103b8b;color:white}.steps-panel{border-radius:20px}.step-circle{background:#f1f4f8;color:#6c7b8f}.how-step p{color:#8a94a2}.request-grid{gap:14px}.request-card{border-radius:18px}.request-card h3{font-size:18px}.subject-symbol{background:#f0f3f8;color:#62748e}.price small{color:#9099a6}.list-entry{border-radius:14px}.list-entry:hover{border-color:#dce3ed;background:#fafbfd}.stat-grid .panel{border-radius:16px}
.menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:none}.menu-grid .button{position:relative;justify-content:flex-start;min-height:62px;padding:17px 46px 17px 18px;background:#fff;color:#263244;border:1px solid #edf0f3;border-radius:14px;text-align:left;font-size:14px;font-weight:600}.menu-grid .button::after{content:'›';position:absolute;right:18px;color:#a7b0bd;font-size:22px;font-weight:400}.menu-grid .button:hover{background:#f9fafc;border-color:#dfe5ed}.referral-hero{background:#fff}.referral-link input{background:#f7f8fa}.balance-hero{background:#202a39;color:#fff}.balance-hero p{color:#d6dce5}.balance-hero .overline{color:#b6c2d3}
.tabs{gap:4px;border-bottom:1px solid #e8ebf0}.tab{color:#8993a2;transition:color .2s,border-color .2s,background .2s}.tab.active{color:#263b60;border-color:var(--blue)}.check-grid span{border-radius:10px;transition:background .2s,border-color .2s,color .2s,transform .15s}.check-grid input:checked+span{background:#edf3ff;border-color:#bdd1ff}.choice{transition:border-color .2s,background .2s,transform .16s}.choice:active{transform:scale(.985)}
.chat-layout[data-messenger]{border-color:#e9edf2;border-radius:18px;box-shadow:0 4px 18px #17233b08}.chat-layout .chat-contact{border-radius:12px;transition:background .2s,color .2s,transform .16s}.chat-layout .chat-contact.active{background:#f0f4fa}.chat-avatar{background:#eaf0fa;color:#57719a;border-radius:15px}.chat-layout .messages{background:#f6f7f9}.chat-layout .bubble{box-shadow:0 2px 8px #17233b08}.chat-layout .chat-composer{border-color:#edf0f3}.file-control{border-color:#dfe5ed;background:#f8f9fb;color:#65748b}.file-control:hover{background:#f2f5f8;border-color:#b8c6d8}.send-message{transition:transform .18s var(--ease-app),background .18s}.send-message:active{transform:scale(.92)}
.auth-page:not(.hidden){background:#f6f7f9}.auth-card{border-radius:22px;border-color:#edf0f3;box-shadow:0 10px 40px #17233b08}.auth-card h2{font-size:27px}.auth-methods .button{border-radius:11px}.auth-methods .button.soft{background:#f5f6f8;border-color:#f5f6f8;color:#344155}
@keyframes kvam-screen-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes kvam-message-in{from{opacity:0;transform:translateY(5px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes kvam-spin{to{transform:rotate(360deg)}}
#content>*,.auth-card{animation:kvam-screen-in .34s var(--ease-app) both}.request-grid>.request-card,.people-list>.list-entry,.stat-grid>.panel,.menu-grid>.button{animation:kvam-screen-in .32s var(--ease-app) both}.request-grid>:nth-child(2),.people-list>:nth-child(2),.stat-grid>:nth-child(2),.menu-grid>:nth-child(2){animation-delay:.035s}.request-grid>:nth-child(3),.people-list>:nth-child(3),.stat-grid>:nth-child(3),.menu-grid>:nth-child(3){animation-delay:.07s}.request-grid>:nth-child(n+4),.people-list>:nth-child(n+4),.menu-grid>:nth-child(n+4){animation-delay:.105s}.messages .bubble{animation:kvam-message-in .22s var(--ease-app) both}.loading{position:relative;animation:kvam-screen-in .2s ease both}.loading::before{content:'';display:inline-block;width:14px;height:14px;margin-right:10px;border:2px solid #d8e4fa;border-top-color:var(--blue);border-radius:50%;vertical-align:-2px;animation:kvam-spin .8s linear infinite}#toast{transition:opacity .2s var(--ease-app),transform .2s var(--ease-app)}
@media(max-width:1050px) and (min-width:781px){.sidebar{width:205px}.workspace{margin-left:205px}}
@media(max-width:780px){.sidebar{display:none}.workspace{margin-left:0}#app .topbar{display:none}body:not(.conversation-open) #app > .workspace{padding-top:env(safe-area-inset-top,0px)}.mobile-navigation{background:#ffffffed;border-color:#e9edf2;box-shadow:0 -4px 18px #17233b08}.mobile-navigation button{color:#929ba9;font-size:10px;transition:color .2s,transform .16s}.mobile-navigation button.active{color:var(--blue)}.mobile-navigation .icon{stroke-width:1.7}.welcome h1{font-size:26px}.home-grid{gap:12px}.hero{padding:24px;min-height:0}.hero h2{font-size:27px}.hero p{font-size:14px;max-width:100%}.panel{padding:20px}.menu-grid{grid-template-columns:1fr;gap:8px}.menu-grid .button{min-height:58px;font-size:14px;padding:16px 44px 16px 17px}.auth-page:not(.hidden){background:#fff}.auth-card{border:0;box-shadow:none}.chat-layout[data-messenger]{border-radius:16px}.conversation-open .chat-layout[data-messenger]{border:0;border-radius:0}.chat-layout .messages{background:#f6f7f9}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
.shortcuts-panel{padding:23px 16px}.shortcuts-panel h3{font-size:15px;margin:0 8px 10px}.shortcut-list{display:grid}.shortcut-row{display:flex;align-items:center;gap:12px;width:100%;padding:12px 8px;background:transparent;border:0;border-radius:10px;text-align:left;color:var(--ink);transition:background .2s var(--ease-app),transform .16s var(--ease-app)}.shortcut-row:hover{background:#f6f8fa}.shortcut-row:active{transform:scale(.985)}.shortcut-icon{width:37px;height:37px;display:grid;place-items:center;border-radius:11px;color:#73829a;background:#f2f5f8}.shortcut-icon .icon{width:19px;height:19px}.shortcut-copy{flex:1;min-width:0}.shortcut-copy strong,.shortcut-copy small{display:block}.shortcut-copy strong{font-size:13px;font-weight:650}.shortcut-copy small{font-size:12px;color:#9aa3b1;margin-top:3px}.shortcut-arrow{color:#b1b9c4;font-size:21px}.mobile-navigation button{min-width:0;flex:1}
@media(prefers-reduced-motion:reduce){.shortcut-row{transition:none}}
/* Keep the selected section visible while its data is fetched. */
.screen-placeholder{max-width:880px;min-height:190px}.screen-placeholder h1{margin:0 0 24px;font-size:30px}.placeholder-card{padding:24px;border:1px solid #edf0f3;border-radius:18px;background:#fff;display:grid;gap:14px}.placeholder-line{display:block;width:100%;height:12px;border-radius:8px;background:#f0f2f5}.placeholder-line.short{width:32%;height:15px}.placeholder-line.medium{width:65%}
@media(max-width:780px){.screen-placeholder h1{font-size:26px;margin-bottom:20px}.placeholder-card{padding:20px}}
/* A simple, phone-first sign-in screen. */
.auth-page:not(.hidden){min-height:100dvh;background:#fff}
.auth-right{min-height:100dvh;padding:40px clamp(10px,2.5vw,24px);align-items:center}
.auth-card{width:100%;max-width:520px;padding:clamp(10px,2.8vw,26px);border:0;border-radius:0;box-shadow:none}
.auth-card .auth-brand{width:116px;height:40px;margin:0 0 34px}
.auth-description{font-size:16px;color:#7b8492;margin:0 0 28px}
.auth-methods{display:grid;gap:12px;margin:0}
.phone-auth{display:grid;gap:10px;margin:0}
.phone-auth label{font-size:13px;font-weight:600;color:#434e60}
.phone-auth input{margin:0;min-height:56px;border:1px solid #dfe4eb;background:#fff;border-radius:12px;padding:0 16px;font-size:16px;color:#1b2434}
.phone-auth input::placeholder{color:#a8b0bb}
.auth-methods .auth-continue{min-height:54px;margin-top:6px;font-size:15px;border-radius:12px}
.auth-divider{display:flex;align-items:center;gap:14px;color:#a0a8b4;font-size:13px;margin:12px 0}
.auth-divider::before,.auth-divider::after{content:'';height:1px;background:#e9edf2;flex:1}
.auth-methods .auth-provider{position:relative;min-height:54px;background:#fff;border:1px solid #e3e7ed;border-radius:12px;color:#263244;font-size:14px;font-weight:600}
.auth-methods .auth-role-switch{display:flex;align-items:center;justify-content:center;gap:10px}
.auth-role-switch .icon{width:20px;height:20px;color:var(--blue);stroke-width:1.7}
.auth-card #auth-title:not([hidden]){font-size:25px;line-height:1.2;letter-spacing:-.035em;margin:0 0 28px}
.auth-methods .auth-provider:hover:not(:disabled):not([aria-disabled=true]){background:#f7f8fa;border-color:#d4dbe4}
.auth-methods .auth-provider:disabled,.auth-methods .auth-provider[aria-disabled=true]{background:#f7f8fa;color:#8c96a5;border-color:#edf0f3;cursor:not-allowed;opacity:1}
.provider-mark{position:absolute;left:17px;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;font-weight:750;font-size:15px}
.yandex-mark{background:#ef3340;color:#fff}.max-mark{background:#eef0f5;color:#596a8a;font-size:13px}
.auth-unavailable{font-size:12px;line-height:1.5;color:#7b8492;margin:0}
@media(max-width:780px){.auth-right{min-height:100dvh;display:flex;align-items:flex-start;padding-block:calc(64px + env(safe-area-inset-top)) 28px}.auth-card{margin:0 auto}.auth-card .auth-brand{margin-bottom:30px}}
/* Desktop entry: a focused form beside a quiet introduction. */
.auth-showcase{display:none}
@media(min-width:901px){
  .auth-page:not(.hidden){grid-template-columns:minmax(420px,46%) minmax(0,1fr);gap:0}
  .auth-right{padding:60px clamp(24px,4vw,64px);min-height:100dvh}
  .auth-showcase{display:flex;min-width:0;padding:24px 24px 24px 0}
  .auth-showcase-inner{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:calc(100dvh - 48px);width:100%;overflow:hidden;border-radius:26px;background:#f3f6fc;padding:clamp(40px,6vw,92px);color:#1a2943}
  .auth-showcase-kicker{position:relative;z-index:1;font-size:10px;letter-spacing:.13em;font-weight:700;color:#7890b6}
  .auth-showcase h1{position:relative;z-index:1;font-size:clamp(30px,3.2vw,46px);line-height:1.15;letter-spacing:-.045em;margin:20px 0 17px;font-weight:700}
  .auth-showcase-inner>p{position:relative;z-index:1;max-width:355px;font-size:15px;line-height:1.65;color:#7b8ba3;margin:0}
  .auth-illustration{position:relative;align-self:center;width:min(100%,420px);height:300px;margin:18px auto 0;flex-shrink:0}
  .auth-orbit{position:absolute;border:1px solid #dee7f7;border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%)}
  .auth-orbit-one{width:240px;height:240px}.auth-orbit-two{width:340px;height:340px;border-color:#e7edf8}
  .auth-visual-card{position:absolute;display:flex;align-items:center;gap:13px;background:#fff;border:1px solid #edf1f8;border-radius:16px;box-shadow:0 15px 36px #415a8010;padding:15px;animation:kvam-visual-in .6s var(--ease-app) both}
  .auth-visual-profile{width:245px;left:50%;top:103px;transform:translateX(-50%);z-index:2;padding:18px}
  .auth-visual-calendar{width:168px;left:12px;top:40px;animation-delay:.09s}.auth-visual-message{width:168px;right:12px;bottom:34px;animation-delay:.16s}
  .auth-visual-avatar,.auth-visual-icon,.auth-visual-check{display:grid;place-items:center;flex-shrink:0}.auth-visual-avatar{width:45px;height:45px;border-radius:14px;background:#eaf0ff;color:#4b77d6}.auth-visual-icon{width:38px;height:38px;border-radius:12px;background:#f2f5fa;color:#8598b3}.auth-visual-check{width:27px;height:27px;border-radius:50%;background:#eaf6f0;color:#47a277}
  .auth-visual-card svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.auth-visual-check svg{width:16px;height:16px}
  .auth-visual-lines{display:grid;gap:7px;flex:1}.auth-visual-lines i{display:block;height:6px;border-radius:6px;background:#e9edf3}.auth-visual-lines i:last-child{width:65%;background:#f1f3f6}
  .auth-showcase-bottom{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:15px;color:#93a0b3;font-size:11px}.auth-showcase-bottom span+span::before{content:'·';margin-right:12px;color:#bac4d2}
  @keyframes kvam-visual-in{from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}
}
@media(prefers-reduced-motion:reduce){.auth-visual-card{animation:none}}
.auth-card .auth-brand{width:160px;height:54px}
/* The viewBox removes the wordmark's transparent margins, aligning the first letter. */
.auth-card .auth-brand{width:160px;height:auto;aspect-ratio:706 / 300}
.auth-card .auth-brand .auth-logo-art{display:block;width:100%;height:auto}
.auth-logo-letter{animation:kvam-logo-appear .6s var(--ease-app) both}
.auth-logo-letter:nth-of-type(2){animation-delay:.09s}
.auth-logo-letter:nth-of-type(3){animation-delay:.18s}
.auth-logo-letter:nth-of-type(4){animation-delay:.27s}
@keyframes kvam-logo-appear{from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}
@media(prefers-reduced-motion:reduce){.auth-logo-letter{animation:none}}
.phone-call-step h2{font-size:24px;margin:0 0 12px}.phone-call-step p{font-size:14px;line-height:1.55}.call-number{display:block;margin:24px 0 14px;color:var(--blue);font-size:27px;font-weight:700;letter-spacing:-.02em}.call-status{font-size:13px!important;color:#788293}.phone-call-step .text-button{margin-top:12px}
#desktop-student-navigation{display:none}
.modern-profile{max-width:920px;margin:auto;padding-bottom:30px}.profile-intro{margin-bottom:36px}.profile-kicker{font-size:.7rem;letter-spacing:.12em;font-weight:700;color:#8995a6;margin:0 0 12px}.profile-intro h1{font-size:clamp(2.2rem,1.45rem + 2.5vw,3.4rem);line-height:1.1;margin:0 0 12px}.profile-intro>p:last-child{color:#7b8796;margin:0;font-size:1rem}
.profile-view-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:28px}.profile-view-heading h1{font-size:clamp(2rem,1.4rem + 2vw,3rem);line-height:1.1;letter-spacing:-.04em;margin:0 0 8px;text-wrap:balance}.profile-view-heading p,.profile-view-note{color:#7b8796;margin:0;line-height:1.5}.profile-view-edit,.profile-view-actions button{min-height:44px}.own-profile-card{max-width:680px;overflow-wrap:anywhere}.own-profile-card .tutor-photo{aspect-ratio:1;object-fit:cover}.profile-view-actions{margin-top:24px}.profile-view-note{margin-top:20px}
/* The profile is a continuous screen; sections share the same page edges. */
#content:has(.modern-profile){padding:0;max-width:none;background:#fff}
.modern-profile{max-width:none;margin:0;padding:0;background:#fff;overflow-wrap:anywhere}
.profile-hero,.profile-view-section,.modern-profile .profile-intro,.modern-profile .profile-picture-block,.modern-profile .profile-block,.modern-profile .profile-save{padding:clamp(32px,5vw,64px) clamp(26px,6vw,80px)}
.profile-page-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;color:#768295;font-weight:600;font-size:.9rem;margin-bottom:clamp(30px,4vw,52px)}
.profile-edit-link,.profile-rating{display:inline-flex;align-items:center;gap:10px;min-height:44px;border:0;background:transparent;padding:0;color:var(--blue);font:inherit;font-weight:650;cursor:pointer;text-align:left}
.profile-person{display:flex;align-items:center;gap:clamp(24px,4vw,48px);max-width:1000px}.profile-person-info{min-width:0}.profile-portrait{display:grid;place-items:center;flex:none;width:clamp(100px,15vw,176px);aspect-ratio:1;border-radius:50%;overflow:hidden;background:#edf3ff;color:var(--blue);font-size:clamp(2rem,4vw,3rem);font-weight:650}.profile-portrait img{width:100%;height:100%;object-fit:cover}.profile-person h1{font-size:clamp(2rem,1.25rem + 3vw,3.75rem);letter-spacing:-.045em;line-height:1.08;margin:0 0 12px;text-wrap:balance}.profile-person-subjects{font-size:clamp(1rem,.9rem + .5vw,1.3rem);color:#6f7988;margin:0}.profile-rating{margin-top:10px;color:#344155}.profile-rating span:first-child{color:#e3a632}
.profile-view-section-alt{background:#f5f7fa}.profile-view-section h2{font-size:clamp(1.6rem,1.2rem + 1.2vw,2.4rem);margin:0 0 28px}.profile-info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:28px 56px;max-width:1050px}.profile-info-grid>article{min-width:0}.profile-info-grid h3{font-size:.9rem;color:#768295;font-weight:600;margin:0 0 9px}.profile-info-grid p{font-size:1.05rem;line-height:1.55;margin:0;color:#273347}.profile-subjects{display:flex;flex-wrap:wrap;gap:8px}.profile-subject{padding:8px 14px;background:#edf3ff;color:#285fc5;border-radius:10px;font-weight:600}.profile-placeholder{color:#768295}.profile-links{max-width:700px}.profile-links button{display:flex;justify-content:space-between;align-items:center;gap:20px;width:100%;min-height:58px;padding:12px 0;border:0;border-bottom:1px solid #e2e7ef;background:transparent;color:#263244;font:inherit;font-weight:600;text-align:left;cursor:pointer}.profile-links button > span:last-child{color:#788293;font-size:1.2rem}.profile-view-note{margin:0;padding:24px clamp(26px,6vw,80px);color:#62748e}
.modern-profile .profile-intro{margin:0}.modern-profile .profile-editor{display:block;border:0;border-radius:0;overflow:visible;background:#fff}.modern-profile .profile-editor>.profile-block:nth-of-type(even){background:#f5f7fa}.modern-profile .profile-documents{margin:0;border:0;border-radius:0;background:#f5f7fa}.modern-profile .profile-editor>.form-error:not(:empty){padding:16px clamp(26px,6vw,80px)}
@media(max-width:600px){.profile-hero,.profile-view-section,.modern-profile .profile-intro,.modern-profile .profile-picture-block,.modern-profile .profile-block,.modern-profile .profile-save{padding:32px 24px}.profile-person{align-items:flex-start;gap:20px}.profile-person h1{font-size:2rem}.profile-page-heading{margin-bottom:30px}.profile-portrait{width:86px}.profile-info-grid{gap:24px}.profile-view-section h2{margin-bottom:24px}}
.profile-editor{display:grid;gap:1px;background:#e9edf2;border:1px solid #edf0f4;border-radius:24px;overflow:hidden}.profile-picture-block,.profile-block,.profile-save{background:#fff;padding:32px}.profile-picture-block{display:flex;align-items:center;gap:24px}.profile-picture{width:112px;height:112px;flex:none;display:grid;place-items:center;border-radius:24px;background:#edf3ff;color:var(--blue);font-size:2rem;font-weight:700;overflow:hidden}.profile-picture img{width:100%;height:100%;object-fit:cover}.profile-picture-block h2,.profile-block h2{font-size:1.2rem;letter-spacing:-.025em;margin:0 0 7px}.profile-picture-block p,.profile-block-heading p{font-size:.9rem;color:#7b8796;margin:0 0 15px;line-height:1.5}
.profile-upload{display:inline-flex;align-items:center;justify-content:center;position:relative;min-height:44px;padding:10px 15px;border-radius:11px;background:#edf3ff;color:var(--blue);font-size:.9rem;font-weight:650;cursor:pointer}.profile-upload input{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}.profile-upload:focus-within{outline:3px solid #93b7ff;outline-offset:3px}.profile-picture-block .profile-hint{font-size:.75rem;margin:9px 0 0}
.profile-block-heading{margin-bottom:24px}.profile-fields{display:grid;gap:20px;max-width:680px}.profile-fields label,.profile-rates label{display:grid;gap:8px;color:#344155;font-size:.9rem;font-weight:600}.profile-fields input:not([type=checkbox]),.profile-fields textarea,.profile-fields select,.profile-rates select{width:100%;font-size:1rem;min-height:48px;padding:12px 14px}.profile-fields textarea{resize:vertical;line-height:1.5}.field-optional{font-weight:400;color:#9aa4b2;font-size:.8rem}.profile-choice{border:0;padding:0;margin:0 0 24px}.profile-choice:last-child{margin-bottom:0}.profile-choice legend{font-size:.9rem;font-weight:650;color:#344155;margin-bottom:12px}.modern-profile .check-grid label{min-height:44px}.modern-profile .check-grid span{min-height:44px;display:inline-flex;align-items:center;border-color:#dfe5ed;padding:10px 15px;font-size:.9rem}.modern-profile .check-grid input:checked+span::before{content:'✓';margin-right:7px}.modern-profile .check-grid input:focus-visible+span{outline:3px solid #93b7ff;outline-offset:3px}.profile-rates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.profile-rates label[hidden]{display:none}.modern-profile #profile-metro{margin:0}.modern-profile .all-metro{font-size:.9rem;border-radius:12px;padding:16px}.profile-save{display:flex;align-items:center;justify-content:space-between;gap:20px}.profile-save p{margin:0;color:#7b8796;font-size:.85rem}.profile-save button{min-height:48px}.profile-editor>.form-error{margin:0;padding:0 32px;background:#fff}.profile-editor>.form-error:empty{display:none}.profile-documents{margin-top:20px;border:1px solid #edf0f4;border-radius:24px}.modern-profile .upload-block input[type=file]{font-size:.85rem;max-width:100%}
@media(max-width:780px){.modern-profile{padding-bottom:20px}.profile-intro{margin-bottom:26px}.profile-picture-block,.profile-block,.profile-save{padding:24px 20px}.profile-picture-block{align-items:flex-start;gap:16px}.profile-picture{width:82px;height:82px;border-radius:18px;font-size:1.5rem}.profile-editor,.profile-documents{border-radius:18px}.profile-rates{grid-template-columns:1fr}.profile-save{align-items:stretch;flex-direction:column}.profile-save button{width:100%}.profile-editor>.form-error{padding:0 20px}}
.tutor-home-rating{padding:0 clamp(26px,6vw,80px) 64px}
.rating-summary{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px 30px;background:#f4f6f9;border-radius:20px}
.rating-eyebrow{display:block;color:#6f7988;font-size:.9rem;font-weight:600;margin-bottom:9px}
.rating-summary strong{display:block;color:#1b2434;font-size:clamp(1.5rem,1.15rem + 1vw,2.25rem);letter-spacing:-.04em;line-height:1.1}
.rating-summary strong span{font-size:1rem;color:#8993a2;font-weight:500}.rating-summary p{margin:8px 0 0;color:#6f7988;font-size:.9rem}
.rating-link{border:0;background:#fff;border-radius:12px;color:var(--blue);padding:14px 18px;min-height:48px;font-weight:650;white-space:nowrap}.rating-link span{margin-left:8px}.rating-link:hover{background:#e9f0ff}
.ratings-page{max-width:900px;margin:auto}.ratings-page>h1{font-size:clamp(2rem,1.3rem + 2vw,3rem);margin-bottom:28px}.ratings-page .rating-summary{margin-bottom:42px}
.reviews-heading{display:flex;align-items:baseline;gap:12px;margin:0 0 18px}.reviews-heading h2{margin:0;font-size:1.3rem}.reviews-heading>span{color:#8c96a5}
.reviews-list{display:grid;gap:12px}.review-card{container-type:inline-size;background:#fff;border:1px solid #edf0f3;border-radius:18px;padding:24px;min-width:0}
.review-card header{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.review-card header strong,.review-stars{color:var(--blue);letter-spacing:.12em;font-size:1.05rem}.review-card header strong span{color:#bbc6d8}
.review-card header h2{font-size:1.1rem;margin:0}.review-card time{font-size:.8rem;color:#8893a2}.review-card p{color:#677487;line-height:1.6;margin:14px 0 0;overflow-wrap:anywhere}.review-card .button{margin-top:16px}
.ratings-empty{color:#758091;line-height:1.6}.rating-picker{border:0;padding:0;margin:0}.rating-picker legend{font-weight:650;margin-bottom:12px}.rating-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.request-card,.tutor-card{transition:border-color .2s var(--ease-app),box-shadow .2s var(--ease-app)}
.request-card:hover,.tutor-card:hover{border-color:#dbe4f3;box-shadow:0 8px 28px #17233b0b}
.request-card h3,.tutor-card h2{letter-spacing:-.03em}.request-meta{line-height:1.55}
.request-card .request-bottom,.tutor-card .actions{gap:12px}.request-card .price,.tutor-card .price-line{letter-spacing:-.025em}
.screen-placeholder .placeholder-line{background:linear-gradient(100deg,#f0f2f5 20%,#f8f9fb 45%,#f0f2f5 70%);background-size:200% 100%;animation:rating-shimmer 1.8s linear infinite}
@keyframes rating-shimmer{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.screen-placeholder .placeholder-line{animation:none}}
.rating-choices label{position:relative;display:block;margin:0}.rating-choices input{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}.rating-choices label>span{display:flex;align-items:center;justify-content:center;gap:5px;min-height:52px;padding:8px;border:1px solid #dce2eb;border-radius:12px;background:#fff;color:#647084;font-weight:600;cursor:pointer}
.rating-choices input:checked+span{background:#edf3ff;border-color:var(--blue);color:#1856d5;box-shadow:inset 0 0 0 1px var(--blue)}.rating-choices input:focus-visible+span{outline:3px solid #93b7ff;outline-offset:3px}
@container (max-width: 340px){.review-card header{align-items:flex-start;flex-direction:column}}
@media(max-width:780px){.tutor-home-rating{padding:0 24px 48px}.rating-summary{padding:22px;gap:14px}.rating-summary strong{font-size:1.45rem}.ratings-page .rating-summary{margin-bottom:30px}.review-card{padding:20px}}
#avatar{border:0;padding:0;flex:none;transition:background .2s,transform .16s}
#avatar:hover{background:#dfe8fa}#avatar:active{transform:scale(.96)}
.ui-icon{display:inline-block;width:1.15em;height:1.15em;vertical-align:-.2em;margin-right:.28em;flex:none;color:currentColor}
.button .ui-icon,.tab .ui-icon{width:1.2em;height:1.2em}
.nav-label{position:relative;display:inline-block}
.request-dot{position:absolute;top:-5px;right:-9px;width:8px;height:8px;border-radius:50%;background:#ed3d48;box-shadow:0 0 0 2px #fff}
#content:has(.tutor-home){padding:0;max-width:none;background:#fff}
.tutor-upcoming{padding:clamp(48px,7vw,92px) clamp(26px,6vw,80px) 64px}
.tutor-upcoming h1{font-size:clamp(38px,5.3vw,66px);line-height:1.08;letter-spacing:-.05em;margin:0 0 20px;font-weight:730}
.tutor-upcoming-empty{color:#6f7988;font-size:clamp(18px,2vw,24px);margin:0}
@media(max-width:780px){.tutor-upcoming{padding:56px 24px 48px}.tutor-upcoming h1{font-size:40px}}
@media(min-width:781px){
  .student-layout .sidebar{display:none}
  .student-layout .workspace{margin-left:0}
  .student-layout .topbar{position:relative;padding:0 clamp(26px,4vw,64px)}
  .student-layout .topbar>.mobile-brand{display:inline-flex;width:110px;height:38px;align-items:center}
  .student-layout .breadcrumb,.student-layout .page-footer{display:none}
  .student-layout .topbar-actions{gap:18px}
  .student-layout .topbar-actions>.icon-button{margin-right:0}
  .student-layout #desktop-student-navigation{position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:4px}
  .student-layout .desktop-nav-link{display:flex;align-items:center;gap:8px;border:0;background:transparent;border-radius:10px;padding:11px 14px;color:#667181;font-size:14px;font-weight:600;white-space:nowrap;cursor:pointer;transition:background .2s,color .2s}
  .student-layout .desktop-nav-link .icon{width:20px;height:20px;stroke-width:1.7}
  .student-layout .desktop-nav-link:hover{background:#f4f6f9;color:#202b3c}
  .student-layout .desktop-nav-link.active{color:var(--blue);background:#edf3ff}
  .student-layout .identity{min-width:0}
  .student-layout .identity span{display:none}
}
/* Continuous application pages and a consistent selection sheet. */
.student-layout #content .request-grid{grid-template-columns:minmax(0,1fr);gap:16px}
.student-layout #content .request-card{width:100%;margin:0}
.request-card:has(.request-card-open){cursor:pointer}
.request-card-open:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
@media (min-width:781px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .request-card:has(.request-card-open){scale:1;transition:scale .2s var(--ease-app)}
  .request-card:has(.request-card-open):hover{scale:1.005}
}
#content:has(#application-list){max-width:none;padding:0}
#content:has(#application-list)>.section-head{margin:0;padding:clamp(28px,4vw,52px) clamp(24px,6vw,80px)}
#application-list>.tabs{margin:0;padding:0 clamp(24px,6vw,80px);gap:24px}
#application-list .request-card{padding:28px clamp(24px,6vw,80px)}

#content:has(.balance-page){padding:0;max-width:none;background:#fff}
.balance-page{background:#fff}.balance-overview,.balance-section{padding:clamp(32px,5vw,64px) clamp(24px,6vw,80px);border-bottom:8px solid #f2f4f7}
.balance-overview h1{font-size:clamp(2.4rem,1.8rem + 2vw,3.7rem);margin:0 0 34px}.balance-caption{color:#6f7988;margin:0 0 8px;font-size:1rem}.balance-amount{font-size:clamp(2rem,1.5rem + 2vw,3.2rem);font-weight:700;letter-spacing:-.04em}.balance-detail{font-size:.9rem;color:#778395;max-width:720px;line-height:1.55;margin:14px 0 20px}.balance-section h2{font-size:clamp(1.6rem,1.3rem + 1vw,2.3rem);margin:0 0 28px}.balance-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:28px;max-width:1000px}.balance-stats span,.balance-stats strong{display:block}.balance-stats span{font-size:.9rem;color:#738092;margin-bottom:8px}.balance-stats strong{font-size:1.4rem;color:#1b2434}.balance-links{max-width:700px}.balance-links button{width:100%;display:flex;align-items:center;justify-content:space-between;min-height:58px;border:0;border-bottom:1px solid #e8ebef;background:#fff;text-align:left;color:#263244;font:inherit;font-weight:600;cursor:pointer}
.select-native{position:fixed!important;left:0!important;bottom:0!important;width:1px!important;height:1px!important;min-height:0!important;opacity:0!important;pointer-events:none!important;padding:0!important;margin:0!important}
.select-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:48px;margin-top:9px;padding:12px 14px;border:1px solid #dfe5ef;border-radius:11px;background:#fff;color:#263244;font:inherit;text-align:left;cursor:pointer}.select-trigger::after{content:'⌄';color:#7b8796;font-size:1.2em}.select-trigger[aria-invalid=true]{border-color:#b93345}.select-trigger:disabled{opacity:.55;cursor:default}
.select-dialog{width:min(520px,calc(100% - 32px));max-height:min(80dvh,720px);padding:0;border:0;border-radius:20px;box-shadow:0 18px 80px #10182733;background:#fff;color:#1b2434;overscroll-behavior:contain}.select-dialog::backdrop{background:#17233b77;overflow:hidden;overscroll-behavior:contain}.select-dialog[open]{display:flex;flex-direction:column}.select-dialog header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;background:#fff;border-bottom:1px solid #edf0f4}.select-dialog h2{font-size:1.15rem;margin:0}.select-dialog-close{width:44px;height:44px;border:0;border-radius:50%;background:#f4f6f9;color:#344155;font-size:1.7rem;cursor:pointer}.select-dialog-options{overflow-y:auto;overscroll-behavior:contain;padding:8px 24px 24px}.select-dialog-option{display:flex;width:100%;align-items:center;justify-content:space-between;min-height:54px;padding:14px 0;border:0;border-bottom:1px solid #edf0f4;background:#fff;color:#263244;font:inherit;text-align:left;cursor:pointer}.select-dialog-option.selected{color:var(--blue);font-weight:650}.select-dialog-option.selected::after{content:'✓';margin-left:15px}.select-dialog-option:disabled{opacity:.45;cursor:default}
@media(max-width:780px){.select-dialog{position:fixed;inset:0;width:100%;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;border-radius:0}.select-dialog header{padding-top:max(16px,env(safe-area-inset-top))}.select-dialog-options{flex:1;padding-bottom:max(24px,env(safe-area-inset-bottom))}.balance-overview,.balance-section{padding:36px 24px}.balance-stats{grid-template-columns:1fr;gap:22px}}
.datalist-trigger{min-height:44px;border:0;background:transparent;color:var(--blue);font:inherit;font-size:.9rem;font-weight:600;padding:8px 12px;cursor:pointer}.student-subject-search .datalist-trigger{width:auto;height:auto;min-width:64px;background:transparent;color:var(--blue);border-radius:8px}.student-subject-search .datalist-trigger:hover{background:#e8efff}
.modern-profile .profile-editor>.profile-block:nth-of-type(even),.modern-profile .profile-documents,.rating-summary{background:#fff}.modern-profile .profile-block,.modern-profile .profile-documents,.tutor-home-rating,.student-applications:not(:empty){border-top:8px solid #f2f4f7}
.select-error:not([hidden]){display:block;margin-top:6px;color:#b93345;font-size:.85rem}
/* Keep the last control scrollable above the fixed mobile navigation. */
@media(max-width:780px){
  html{scroll-padding-bottom:calc(100px + env(safe-area-inset-bottom, 0px))}
  .app:not(.hidden) .workspace{padding-bottom:calc(100px + env(safe-area-inset-bottom, 0px))}
  .conversation-open .app:not(.hidden) .workspace{padding-bottom:0}
}
.student-subject-search .select-trigger{display:flex;flex:1;min-width:0;width:auto;height:52px;margin:0;padding:0 14px;border:0;background:transparent;color:#263244;font-size:17px;font-weight:500;text-align:left}
.student-subject-search .select-trigger:hover{background:transparent}
.student-subject-search .select-trigger:focus-visible{outline:3px solid #93b7ff;outline-offset:-3px}
.student-subject-search select:not(.select-native){flex:1;min-width:0;width:auto;height:52px;margin:0;padding:0 14px;border:0;background:transparent;font-size:17px}
.student-subject-search .select-error:not([hidden]){position:absolute;top:100%;left:0}
.student-subject-search{position:relative}
.student-subject-search .select-trigger.select-placeholder{color:#a2aab6}
/* A selected value is marked by a soft surface and a check, not a heavy outline. */
.select-dialog-option{padding:14px 16px;border-radius:12px}
.select-dialog-option.selected{background:#f1f5fc;color:#234f9c}
.select-dialog-option:focus-visible{outline:2px solid #7b8da8;outline-offset:-3px}
.choice.selected{border-color:#dbe5f5;background:#f3f6fb;box-shadow:none;color:#2459bd}
.check-grid input:checked+span{border-color:#dbe5f5;background:#f3f6fb;box-shadow:none;color:#2459bd}

@media (min-width: 781px) {
  body {
    --desktop-text: 1.125rem;
    --desktop-label: 1rem;
    --desktop-caption: .875rem;
    --desktop-control: 3.25rem;
    font-size: var(--desktop-text);
    line-height: 1.5;
  }

  h1, .welcome h1, .screen-placeholder h1, .wizard-panel h1 {font-size: 2.25rem}
  h2, .section-head h2, .tutor-heading h2 {font-size: 1.75rem}
  h3, .request-card h3, .lesson-card h3, .empty h3 {font-size: 1.375rem}
  .price, .price-line {font-size: 1.5rem}

  .section-head p, .empty p, .request-goal, .about-text, .notification p,
  .inline-note, .wizard-panel > .muted, .lesson-card > .muted, .transaction p,
  .review-row p, .balance-detail, .chat-layout .bubble, .chat-placeholder p,
  .profile-info-grid p, .phone-call-step p, #toast {font-size: var(--desktop-text)}

  label, legend, .profile-fields label, .profile-rates label, .profile-choice legend,
  .check-grid span, .modern-profile .check-grid span, .confirm-check, .choice small,
  .field-note, .form-error, .request-meta, .lesson-date, .tag, .rating,
  .profile-info-grid h3, .profile-picture-block p, .profile-block-heading p,
  .balance-stats span, .transaction summary, .rating-summary p, .stat-grid span,
  .identity, .breadcrumb, .sidebar nav .nav-link, .chat-contact .contact-heading strong,
  .chat-header-copy strong, .contact-preview, .chat-rules p, .file-control-copy strong,
  .phone-auth label, .auth-methods p, .auth-methods .auth-divider {font-size: var(--desktop-label)}

  .price small, .price-line small, .notification time, .review-row time, .review-card time,
  .mini-label, .contact-heading time, .contact-subject, .chat-header-copy small,
  .chat-rules summary, .message-day span, .message-meta time, .message-document small,
  .file-control-copy small, .field-optional, .profile-picture-block .profile-hint,
  .auth-unavailable, .auth-showcase-bottom {font-size: var(--desktop-caption)}

  .button, .request-bottom .button, .tutor-card .actions .button, .menu-grid .button,
  .hero .button, .learning-form .button, .chat-readonly .button,
  .auth-methods .auth-continue, .auth-methods .auth-provider,
  .choice, .segmented button, .select-trigger, .select-dialog-option, .profile-upload,
  .modern-profile .all-metro {
    font-size: var(--desktop-label);
    min-block-size: var(--desktop-control);
    padding-block: .75rem;
  }
  .button, .request-bottom .button, .tutor-card .actions .button {padding-inline: 1.125rem}
  .text-button, .back, .tab, .datalist-trigger, .chat-header-action {
    font-size: var(--desktop-label);
    min-block-size: 2.75rem;
  }
  .student-layout .desktop-nav-link {
    font-size: var(--desktop-label);
    min-block-size: 3rem;
    padding-inline: clamp(.625rem, 1.2vw, 1rem);
  }
  .topbar-actions > :is(.avatar, .icon-button), .composer-attachment, .send-message {
    min-inline-size: 2.75rem;
    min-block-size: 2.75rem;
  }

  /* Keep the existing mobile input sizing while increasing desktop input text. */
  input:not([type="checkbox"], [type="radio"], [type="file"]),
  textarea, select, .messaging-view .chat-search input, .chat-layout .chat-composer textarea {
    font-size: var(--desktop-text) !important;
  }
  input:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"]),
  select:not(.select-native), .phone-auth input {min-block-size: var(--desktop-control)}
  .student-subject-search .select-trigger {height: auto; font-size: var(--desktop-text)}
  .chat-layout .chat-composer textarea {min-block-size: var(--desktop-control); line-height: 1.4}
}

@media (min-width: 781px) and (max-width: 1050px) {
  .student-layout .topbar {padding-inline: 1.5rem}
  .student-layout .topbar-actions {gap: .5rem}
  .student-layout .desktop-nav-link {gap: .375rem; padding-inline: .5rem}
  .student-layout .identity {max-inline-size: clamp(3rem, calc(18vw - 5rem), 6rem)}
}

.metro-line-dot {
  display: inline-block;
  inline-size: .73em;
  block-size: .73em;
  border-radius: 50%;
  margin-inline-end: .2em;
  box-shadow: inset 0 0 0 1px #0002;
}


.request-card h3 {font-size: clamp(1.5rem, 1.35rem + .6vw, 2rem); line-height: 1.2}
.request-card .request-goal, .panel > .prose {
  max-inline-size: 68ch;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: #344155;
  overflow-wrap: anywhere;
}
.request-card .request-meta {font-size: 1.0625rem; color: #4f5d70}
.request-card .tag, .request-card .price small {font-size: .9375rem; line-height: 1.45}
.request-card .price {font-size: 1.5rem}
.request-card .request-bottom {flex-wrap: wrap}
.request-bottom .button {min-block-size: 2.75rem; font-size: 1rem}

@media (max-width: 780px) {
  body {font-size: 1.0625rem; line-height: 1.5}
  .section-head p, .empty p, .about-text, .notification p, .chat-layout .bubble,
  .profile-info-grid p, .inline-note, .wizard-panel > .muted, .lesson-card > .muted {
    font-size: 1.0625rem;
    line-height: 1.55;
  }
  label, legend, .choice small, .profile-fields label, .modern-profile .check-grid span,
  .contact-preview, .chat-rules p, .check-grid span {font-size: 1rem}
  .field-note, .form-error, .lesson-date, .notification time, .price-line small,
  .chat-header-copy small, .message-meta time, .contact-heading time {font-size: .875rem}
  .section-head .muted, .welcome p, .empty p, .contact-preview, .field-note {color: #536074}
  .button, .tab, .choice, .menu-grid .button, .select-trigger, .select-dialog-option,
  .tutor-card .actions .button, .text-button, .back {
    font-size: 1rem;
    min-block-size: 2.75rem;
  }
  .mobile-navigation button {font-size: .8125rem; min-block-size: 2.75rem; min-inline-size: 0; color: #536074}
  .request-card .request-bottom {align-items: stretch; flex-direction: column}
  .request-card .request-bottom .button {width: 100%}
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 780px) {
    .mobile-navigation {
      inset-inline: 12px;
      bottom: max(8px, env(safe-area-inset-bottom));
      border: 1px solid rgba(255,255,255,.88);
      border-radius: 32px;
      padding: 6px;
      background: rgba(249,251,255,.84);
      -webkit-backdrop-filter: blur(22px) saturate(165%);
      backdrop-filter: blur(22px) saturate(165%);
      box-shadow: inset 0 1px 0 white, 0 3px 18px #243a621f;
    }
    .mobile-navigation button {flex: 1; border-radius: 25px}
  }
}
@media (prefers-reduced-transparency: reduce) {
  .mobile-navigation {background: white; backdrop-filter: none; -webkit-backdrop-filter: none}
}

@media (max-width: 780px) {
  #mobile-navigation {
    isolation: isolate;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  #mobile-navigation::before,
  #mobile-navigation:not([data-lens]) button[aria-current="page"] {
    border-radius: 999px;
    background: linear-gradient(155deg, #ffffffda, #c8dfffaa 65%, #f9ffffd6);
    box-shadow: inset 0 1px 2px white, inset 0 -1px 3px #6f9cdc88, 0 2px 9px #456a9e30;
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    backdrop-filter: blur(10px) saturate(150%);
  }
  #mobile-navigation:not([data-lens]) button[aria-current="page"] {
    color: var(--blue);
    font-weight: 700;
  }
  #mobile-navigation::before {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: -1;
    inset: 0 auto auto 0;
    width: var(--lens-width, 0);
    height: var(--lens-height, 0);
    transform: translate(var(--lens-x, 0px), var(--lens-y, 0px)) scaleX(var(--lens-stretch, 1));
    opacity: 0;
    transition: opacity 130ms ease;
  }
  #mobile-navigation[data-lens]::before {opacity: 1}
  #mobile-navigation[data-lens="settle"]::before {transition: transform 200ms cubic-bezier(.2,.85,.25,1), opacity 130ms}
  #mobile-navigation[data-lens] button {background: transparent; transform: none}
  #mobile-navigation[data-lens] .lens-target {color: var(--blue); font-weight: 700}
}
@media (prefers-reduced-motion: reduce) {
  #mobile-navigation::before {--lens-stretch: 1 !important}
  #mobile-navigation::before, #mobile-navigation[data-lens="settle"]::before {transition: none}
}
@media (prefers-reduced-transparency: reduce) {
  #mobile-navigation::before,
  #mobile-navigation:not([data-lens]) button[aria-current="page"] {
    background: #e3edff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (forced-colors: active) {
  #mobile-navigation button[aria-current="page"] {outline: 2px solid Highlight; outline-offset: -2px}
}

/* Use the same white, outlined surfaces as the More menu for reading blocks. */
#content :is(.section-head p, .request-goal, .request-meta, .price small, .field-note,
  .profile-hint, .muted, .inline-note, .mini-label, .empty h3, .profile-placeholder,
  .request-card h3, .empty p, .contact-preview, .tutor-upcoming-empty, .review-card p) {color: #111}
#content :is(.inline-note, .request-goal, .tutor-upcoming-empty, .ratings-empty),
#content > .section-head p, .wizard-panel .summary > div, .referral-bubbles p,
.calendar-panel, #calendar-day article, #calendar-day > p {
  background: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 14px;
  padding: .875rem 1rem;
  color: #111;
}
.subject-symbol {background: #eaf2ff; color: #2066db}
.section-head .button.find-tutor, .wizard-panel .actions.end .button.primary {
  min-height: 3.5rem; padding: .9rem 1.6rem; font-size: 1.1875rem;
}
#request-form .choice-grid .choice {min-height: 4rem; font-size: 1.25rem; text-align: center}
#request-form .summary {grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem}
#request-form .summary .mini-label {display: block; margin-bottom: .35rem; font-size: 1rem; color: #333}
#request-form .summary strong {font-size: 1.25rem; line-height: 1.4; overflow-wrap: anywhere; color: #111}
.referral-bubbles {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; max-width: 50rem; margin-bottom: 1.5rem}
.student-referral .referral-bubbles p {margin: 0; font-size: 1.0625rem; line-height: 1.5; color: #111}
.calendar-panel, #calendar-day {max-width: 42rem}
.calendar-panel header {display: flex; align-items: center; justify-content: space-between; gap: .5rem}
.calendar-panel header h2 {font-size: 1.2rem; margin: 0}
.calendar-grid {display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 2px; margin-top: 1rem; text-align: center}
.calendar-grid b {font-size: .875rem; padding-bottom: .5rem}
.calendar-grid button {position: relative; border: 0; border-radius: 12px; padding: 0; min-height: 44px; background: #f5f7fa; color: #111; font-size: 1rem}
.calendar-grid .has-lessons::after {content: ''; position: absolute; bottom: 4px; left: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: var(--blue)}
.calendar-grid [aria-pressed="true"] {background: #214fb2; color: white; font-weight: 700}
.calendar-grid [aria-pressed="true"]::after {background: white}
#calendar-day {margin-top: 1.5rem}
#calendar-day article {margin-block: .6rem}
#calendar-day article p {margin: .35rem 0 0}
@media (max-width: 600px) {
  #content:has(#application-list) > .section-head {align-items: stretch; flex-direction: column}
  .section-head .find-tutor, #request-form .actions.end .button {width: 100%}
  .referral-bubbles, #request-form .summary {grid-template-columns: minmax(0,1fr)}
  #request-form .summary .wide {grid-column: 1 / -1}
}
#content :is(.student-discover, .tutor-upcoming, .welcome) > p:not(:empty):not(.form-error),
#content .profile-info-grid > article, #content .lesson-card > .prose {
  background: white; border: 1px solid #e3e7ee; border-radius: 14px;
  padding: .875rem 1rem; color: #111;
}
#content .profile-info-grid :is(h3,p), #content .lesson-card > .muted {color: #111}

/* Teacher profile, editor, and the profile card shown to students. */
#content :is(.modern-profile, .tutor-card) {
  --profile-body: 1.25rem;
  font-size: var(--profile-body);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.modern-profile :is(.profile-person h1, .profile-intro h1) {
  font-size: clamp(2.25rem, 1.75rem + 2vw, 3.75rem);
}
.modern-profile :is(.profile-view-section, .profile-block, .profile-picture-block) h2,
.tutor-card .tutor-heading h2 {
  font-size: clamp(1.625rem, 1.45rem + 1vw, 2.375rem);
  line-height: 1.2;
}
#content .modern-profile :is(.profile-person-subjects, .profile-info-grid p, .profile-subject,
  .profile-links button, .document-row strong, .profile-intro > p:last-child),
#content .tutor-card :is(.about-text, .request-meta) {
  font-size: var(--profile-body);
  line-height: 1.55;
}
#content .modern-profile :is(.profile-page-heading, .profile-edit-link, .profile-rating, .profile-info-grid h3,
  label, legend, summary, .check-grid span, .select-trigger, .back, .button, .profile-save p,
  .profile-picture-block p, .profile-block-heading p, .profile-view-note, .profile-hint, .field-note,
  .field-optional, .file-control-copy strong, .file-control-copy small, .form-error),
#content .tutor-card :is(.mini-label, .rating, .rating span, .price-line small, .button),
body:has(#teacher-profile) .select-dialog-option {
  font-size: 1.125rem;
  line-height: 1.45;
}
#teacher-profile :is(input:not([type="checkbox"], [type="file"]), select, textarea) {
  font-size: 1.25rem !important;
}
#content .modern-profile :is(.profile-hint, .field-note, .field-optional, .profile-block-heading p,
  .profile-picture-block p, .profile-save p) {color: #344155}
.modern-profile .profile-info-grid p {max-inline-size: 65ch}
.modern-profile :is(.profile-subject, .check-grid label, .profile-fields, .document-row > div) {
  min-inline-size: 0; max-inline-size: 100%;
}
.modern-profile .file-control-copy strong {white-space: normal}
@media (max-width: 420px) {
  .modern-profile :is(.profile-person, .profile-picture-block) {flex-direction: column; align-items: flex-start}
  .modern-profile .profile-picture-block > div {max-inline-size: 100%}
}

.mobile-navigation .nav-balance-amount:not(:empty) {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 2px;
  max-inline-size: calc(100% - 4px);
  padding: 2px 4px;
  overflow: hidden;
  border: 1px solid white;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: .625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.accented-title {
  display: flex;
  align-items: center;
  gap: .38em;
  color: #111;
  font-weight: 640;
  line-height: 1.2;
}
.accented-title-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  inline-size: 1.35em;
  block-size: 1.35em;
  border-radius: .32em;
  background: #eaf2ff;
  color: var(--blue);
}
.accented-title-icon .ui-icon {
  inline-size: .74em;
  block-size: .74em;
  margin: 0;
}
.accented-title > :last-child {min-inline-size: 0; text-wrap: balance}
#content .profile-info-grid h3:has(.accented-title) {font-size: 1.375rem; margin-block-end: .75rem}
.balance-overview .balance-amount {color: var(--blue); font-variant-numeric: tabular-nums}

/* The rounded surfaces and highlights of the bottom navigation carry through the app. */
:root {
  --surface-soft: #e8eaf2;
  --surface-button: #fff;
  --surface-button-hover: #f8f9fd;
  --surface-action: #e6e9fa;
  --surface-selected: #dce3fa;
  --surface-search: #eceef7;
  --glass-edge: #e3e5f0;
  --glass-fill: var(--surface-soft);
  --glass-selected: var(--surface-selected);
  --glass-sheen: none;
  --glass-shadow: none;
  --screen-inset: clamp(16px, 3.4vw, 42px);
  --section-gap: 10px;
}
body {
  background: var(--paper);
}
#content:has(:is(.student-home, .tutor-home, .modern-profile, .balance-page)),
:is(.student-home, .modern-profile, .balance-page),
.modern-profile .profile-editor {
  background: transparent;
}
#content :is(.panel, .empty, .rating-summary, .review-card, .calendar-panel, .inline-note,
  .profile-info-grid > article, .referral-bubbles p, .wizard-panel .summary > div),
#calendar-day :is(article, p:only-child),
.auth-card, .auth-showcase-inner, .select-dialog,
body:not(.conversation-open) .chat-layout[data-messenger] {
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  background: var(--glass-fill);
  box-shadow: var(--glass-shadow);
}
#content .menu-grid .button,
#content :is(.profile-links, .balance-links) button,
#content .list-entry {
  border: 1px solid var(--glass-edge);
  border-radius: 17px;
  background: var(--glass-fill);
  color: var(--ink);
  box-shadow: var(--glass-sheen);
}
#content :is(.profile-links, .balance-links) button {
  padding: 12px 16px;
  margin-block-end: .5rem;
}
#content :is(.panel, .request-card, .review-card, .rating-summary) {min-inline-size: 0}
#application-list {
  padding-inline: 0;
}
#application-list > .tabs {padding-inline: 0}
#application-list .request-card {
  padding: clamp(18px, 3.3vw, 32px);
}
.student-applications .request-grid {
  padding-inline: 0;
}
.student-applications .request-card {padding-inline: clamp(18px, 3.3vw, 32px)}
#home-referral, .student-discover, .tutor-upcoming,
.modern-profile :is(.profile-hero, .profile-view-section, .profile-intro, .profile-picture-block, .profile-block, .profile-save),
.balance-page > section {
  margin: var(--section-gap) 0;
  padding: clamp(22px, 4vw, 54px);
  border: 1px solid var(--glass-edge);
  border-radius: clamp(22px, 3vw, 32px);
  background: var(--glass-fill);
  box-shadow: var(--glass-shadow);
}
.modern-profile .profile-editor > .profile-block:nth-of-type(even) {background: var(--glass-fill)}
#content .balance-stats > div,
#content :is(.student-discover, .tutor-upcoming, .welcome) > p:not(:empty):not(.form-error) {
  background: #ffffffca;
  border: 1px solid var(--glass-edge);
  border-radius: 16px;
  padding: .875rem 1rem;
  color: var(--ink);
}
.button, .select-trigger, .student-subject-search, .profile-upload,
input:not([type="checkbox"],[type="radio"],[type="file"]), select, textarea {
  border-radius: 15px;
}
.button.soft, .select-trigger, .student-subject-search, .auth-methods .auth-provider:not(:disabled):not([aria-disabled=true]) {
  background: var(--surface-search);
  border-color: var(--glass-edge);
  color: var(--ink);
}
#app input:not([type="checkbox"],[type="radio"],[type="file"]),
#app :is(textarea, select), .auth-card input {
  border-color: #92a6c2;
}
#app :is(input, textarea, select):focus, .auth-card input:focus {
  border-color: var(--blue);
}
.student-subject-search .select-trigger {background: transparent; border: 0; color: var(--ink)}
.button.primary, .hero .button, .send-message {
  background: var(--surface-action);
  border-color: var(--surface-action);
  color: var(--ink);
  box-shadow: none;
}
:is(.button.primary, .hero .button, .send-message):hover {
  background: var(--surface-selected);
  border-color: var(--surface-selected);
  color: var(--ink);
}
.check-grid input:checked + span, .choice.selected, .select-dialog-option.selected,
#content :is(.menu-grid .button, .list-entry):hover,
.sidebar nav .nav-link.active, .student-layout .desktop-nav-link.active,
.chat-layout .chat-contact.active {
  background: var(--glass-selected);
  color: var(--blue);
}
.chat-layout .chat-contact.active {box-shadow: inset 3px 0 var(--blue)}
.calendar-grid [aria-pressed="true"] {background: var(--blue)}
#app :is(.topbar, .sidebar), .chat-layout .chat-composer, .select-dialog header {
  background: #f6f9ffeb;
  border-color: var(--glass-edge);
}
#app .topbar {
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  backdrop-filter: blur(22px) saturate(155%);
}
.auth-page:not(.hidden), .chat-layout .chat-pane, .chat-layout .messages {
  background: var(--paper);
}
.chat-layout .bubble {background: var(--glass-fill); border-color: var(--glass-edge)}
.chat-layout .bubble.mine {background: var(--surface-action); border-color: var(--glass-edge); color: var(--ink)}
.message-day span {color: #425778; background: #f0f5ff}
.accented-title-icon, .subject-symbol, .empty-symbol {
  background: var(--glass-selected);
  color: var(--blue);
  box-shadow: var(--glass-sheen);
}
@media (max-width: 780px) {
  .select-dialog {border: 0; border-radius: 0}
  #mobile-navigation {
    border-color: #fff;
    background: #f5f9ffdd;
  }
}
@media (prefers-reduced-transparency: reduce) {
  #app .topbar, #mobile-navigation, .chat-layout .chat-composer, .select-dialog header {
    background: #f7faff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.modern-profile {
  max-inline-size: none;
  margin-inline: 0;
}
.modern-profile .profile-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--surface-soft);
  border-color: var(--glass-edge);
  color: var(--ink);
  box-shadow: none;
}
.profile-hero .profile-person {flex: 1 1 26rem; min-inline-size: 0}
.profile-hero .profile-portrait {
  inline-size: clamp(82px, 12vw, 132px);
  background: var(--glass-selected);
  border: 3px solid #ffffffe6;
  box-shadow: 0 4px 14px #10356d55;
}
.profile-page-label {margin: 0 0 .4rem; font-size: 1.125rem; font-weight: 600; color: var(--muted)}
.profile-hero .profile-person h1 {margin-bottom: 0; color: inherit}
.profile-hero .profile-edit-link {
  padding: .65rem .95rem;
  background: #f7faff;
  border-color: #fff;
  color: var(--blue);
  box-shadow: var(--glass-shadow);
}
.profile-hero .profile-edit-link:hover {background: #dceaff; color: #103b8b}
.profile-hero .profile-rating {
  padding: .3rem .65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
}
.profile-hero .profile-rating span:first-child {color: #855717}
.profile-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--section-gap);
  margin: var(--section-gap) 0;
}
.modern-profile .profile-overview-grid .profile-view-section {margin: 0}
.profile-overview-grid .profile-info-grid {grid-template-columns: minmax(0, 1fr); gap: .7rem}
#content .profile-overview-grid .profile-info-grid > article {
  padding: .875rem 1rem;
  border-radius: 16px;
  background: #f9fbff;
  box-shadow: var(--glass-sheen);
}
.profile-view-section .profile-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: .7rem;
  max-inline-size: none;
}
#content .profile-view-section .profile-links button {margin: 0; min-inline-size: 0}
#content .profile-view-note {margin: var(--section-gap) 0}
.modern-profile .profile-fields {max-inline-size: none}
.modern-profile .profile-upload {background: var(--glass-selected); border: 1px solid var(--glass-edge)}
@media (min-width: 980px) {
  .profile-overview-grid {grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr)}
}
@media (max-width: 600px) {
  .modern-profile .profile-hero, .modern-profile .profile-view-section {padding: 18px}
  .profile-hero .profile-edit-link {inline-size: 100%; justify-content: center}
}

#content .profile-view .profile-links button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  min-block-size: 64px;
  padding: .75rem;
  background: #fff;
  color: #17233b;
}
.profile-link-icon {
  display: grid;
  place-items: center;
  inline-size: 2.25rem;
  block-size: 2.25rem;
  border-radius: 12px;
  background: #e8f0ff;
  color: var(--blue);
}
.profile-link-icon .ui-icon, .profile-edit-link .ui-icon {margin: 0}
.profile-link-copy {display: grid; gap: .125rem; line-height: 1.3}
.profile-link-copy strong {font-weight: 650; font-size: 1.125rem}
.profile-link-copy small {color: #475972; font-size: 1rem}
#content .profile-links button .profile-link-arrow {color: var(--blue)}
#content .profile-view .profile-edit-link {
  min-block-size: 52px;
  gap: .55rem;
  color: #174caa;
  line-height: 1.25;
  text-align: center;
}
@media (max-width: 780px) {
  .modern-profile .profile-hero {display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem}
  .profile-hero .profile-person {flex-direction: column; align-items: center; gap: 1rem; text-align: center}
  .profile-hero .profile-portrait {width: clamp(152px, 46vw, 220px); font-size: 3rem}
  .profile-hero .profile-edit-link {width: 100%; justify-content: center}
  .profile-view-section .profile-links {grid-template-columns: minmax(0, 1fr)}
  .modern-profile .profile-picture {width: clamp(128px, 36vw, 174px); height: auto; aspect-ratio: 1}
}

.tutor-card .tutor-card-actions {
  flex-wrap: wrap;
  align-items: stretch;
}
.tutor-card .tutor-card-actions .button {
  flex: 1 0 auto;
  max-inline-size: 100%;
  overflow-wrap: normal;
}
.tutor-card .tutor-card-actions .primary {
  flex-basis: 100%;
}
@media (max-width: 520px) {
  .tutor-card .tutor-card-actions {flex-direction: column}
  .tutor-card .tutor-card-actions .button {inline-size: 100%}
}

@media (max-width: 780px) {
  .tutor-card .tutor-heading:has(> img.tutor-photo) {
    flex-direction: column;
    align-items: stretch;
  }
  .tutor-card .tutor-heading > img.tutor-photo,
  .profile-hero .profile-portrait:has(> img) {
    width: 100%;
    max-width: 440px;
    height: auto;
    aspect-ratio: 1;
    border-radius: 22px;
  }
  .tutor-card .tutor-heading > img.tutor-photo {
    align-self: center;
    object-fit: cover;
  }
}

.install-gate[hidden], .install-gate [hidden] {display: none}
.install-gate {
  display: grid; place-items: center; min-height: 100dvh; margin: 0;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background: #fff;
}
.install-gate-content {width: min(100%, 26rem); text-align: center}
.install-gate-content img {border-radius: 19px}
.install-gate-content h1 {margin: 20px 0 10px; font-size: clamp(1.65rem, 6vw, 2.1rem)}
.install-gate-content p {margin: 12px 0; line-height: 1.55}
.install-gate-content :is(#install-apple-help, #install-android-help) {color: #4e596e}
#install-app {min-height: 48px; margin: 10px auto 0}
#install-status:empty {margin: 0}

/* The fill and label carry the button state; borders don't draw a second edge. */
@media (forced-colors: none) {
  :is(button, .button, [role="button"], input[type="button"], input[type="submit"],
    input[type="reset"], .file-control, .profile-upload,
    .check-grid input + span, .rating-choices input + span) {
    border-color: transparent !important;
  }
  .rating-choices input:checked + span {box-shadow: none}
  .choice:not(.selected), .file-control:not(.file-control-compact) {background: var(--surface-soft)}
  .select-trigger[aria-invalid="true"] {background: #fff1f3; color: #a82438}
}

:where(button, .button, [role="button"], input[type="button"], input[type="submit"],
  input[type="reset"]):focus-visible {
  outline: 2px solid CanvasText;
  outline-offset: 3px;
}

.install-safari-intro {font-size: .9rem}
.install-safari-steps {
  display: grid; gap: 8px; margin: 12px 0; padding-inline-start: 2rem;
  text-align: start;
}
.install-safari-steps li {
  padding: 10px 12px; border-radius: 14px; background: #f5f7fb;
}
.install-safari-steps li::marker {color: #174caa; font-weight: 700}
.install-safari-steps li > span {display: inline-block; vertical-align: middle}
.install-safari-steps li > span:last-child {width: calc(100% - 57px); padding-inline-start: 8px}
.install-safari-steps strong, .install-safari-steps small {display: block; line-height: 1.35}
.install-safari-steps strong {color: var(--ink)}
.install-safari-steps small {margin-top: 3px; font-size: .82rem}
.install-safari-steps .install-safari-icon {
  position: relative; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px; background: white; color: #174caa;
}
.install-safari-icon svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.install-safari-launch {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--ink); font-weight: 650; font-size: .9rem;
}
.install-gate-content .install-safari-launch img {flex: none; border-radius: 7px}

@media (prefers-reduced-motion: no-preference) {
  .install-safari-icon::after {
    content: ""; position: absolute; inset: 0; border: 2px solid #296fff;
    border-radius: inherit; opacity: 0; pointer-events: none;
    animation: install-safari-tap 900ms ease-out 150ms;
  }
  .install-safari-steps li:nth-child(2) .install-safari-icon::after {animation-delay: 1050ms}
  .install-safari-steps li:nth-child(3) .install-safari-icon::after {animation-delay: 1950ms}
  @keyframes install-safari-tap {
    0% {opacity: 0; transform: scale(.9)}
    28% {opacity: .85}
    100% {opacity: 0; transform: scale(1.18)}
  }
}

/* Flat surfaces and light controls keep the same palette across screens. */
.student-subject-search {background: var(--surface-search); border-color: transparent}
.student-subject-search input::placeholder, .student-subject-search .select-trigger {color: var(--muted)}
.student-subject-search button:not(.select-trigger) {background: #fff; color: var(--ink)}
#content :is(.request-card, .tutor-card) {background: var(--surface-soft); border-color: var(--glass-edge)}
#content :is(.request-card, .tutor-card):hover {background: var(--surface-action)}
#content .request-card-open {background: #fff; color: var(--ink)}
#content .request-card-open:hover {background: var(--surface-selected)}
#content .profile-link-arrow {
  display: grid; place-items: center; flex: none; min-width: 2.25rem; min-height: 2.25rem;
  border-radius: 11px; background: #fff; color: var(--ink);
}
#app .menu-grid .button[data-view="support"], #app button.shortcut-row[data-view="support"] {
  background: #fff; color: var(--ink);
}
#app .menu-grid .button[data-view="support"]:hover, #app button.shortcut-row[data-view="support"]:hover {
  background: var(--surface-selected);
}

/* Full-width sections; the padding belongs inside each section. */
#app #content {
  max-inline-size: none;
  padding-inline: 0;
  background: var(--paper);
}
#app :is(.student-home, .tutor-home, .balance-page, .modern-profile) {background: transparent}
#app :is(.student-referral, .tutor-home-rating) {background: var(--surface-soft)}
#app #home-referral {margin-inline: 0}
#content > :is(.section-head, .welcome, .messenger-title, .page-footer),
#application-list > .tabs,
#content > .wizard-wrap > :is(.section-head, .wizard-top, .back) {
  padding-inline: var(--screen-inset);
}
#content > .wizard-wrap {max-inline-size: none; margin-inline: 0}
#content :is(.balance-links, .profile-links) {max-inline-size: none}

#app :is(.topbar, .sidebar), #app .chat-layout .chat-composer, .select-dialog header,
.auth-page:not(.hidden), .install-gate {background: var(--paper)}
.auth-card {background: transparent}
#app :is(.button, .select-trigger, .choice, .icon-button, .shortcut-row, .select-dialog-close,
  .send-message, .rating-link, .profile-upload, .file-control, .sidebar .nav-link.active),
#app #content :is(.list-entry, .menu-grid .button, .profile-links button, .balance-links button),
.auth-page .button, .install-gate .button, .select-dialog button,
#app :is(.check-grid, .rating-choices) label > span {
  background: var(--surface-button);
  color: var(--ink);
}
#app :is(.button, .select-trigger, .choice, .icon-button, .shortcut-row, .send-message):hover,
#app #content :is(.list-entry, .menu-grid .button, .profile-links button, .balance-links button):hover,
.auth-page .button:hover, .install-gate .button:hover, .select-dialog button:hover {
  background: var(--surface-button-hover);
}
#app :is(.choice.selected, .select-dialog-option.selected, .select-trigger[aria-expanded="true"]),
body .select-dialog .select-dialog-option.selected,
#app :is(.check-grid, .rating-choices) input:checked + span {
  color: var(--blue);
  font-weight: 700;
}
#app .select-trigger[aria-invalid="true"] {color: #a82438}
#app .student-subject-search .select-trigger {background: transparent; color: var(--muted)}
#app .student-subject-search {background: var(--surface-search)}
#app .calendar-grid button {background: var(--surface-button); color: var(--ink)}
#app .calendar-grid [aria-pressed="true"] {
  background: var(--surface-button); color: var(--blue); font-weight: 750;
  text-decoration: underline; text-underline-offset: .22em;
}

/* A single back control across screens; existing labels remain available to screen readers. */
#app #content button.back,
#app .chat-header button.chat-back {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #191c24;
  box-shadow: none;
}
#app #content button.back {font-size: 0; line-height: 0}
#app #content button.back::before {
  content: "";
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
#app #content button.back:hover, #app .chat-header button.chat-back:hover {background: #f8f9fd}
#app #content button.back:focus-visible, #app .chat-header button.chat-back:focus-visible {
  outline: 2px solid CanvasText;
  outline-offset: 3px;
}

/* Remove decorative block borders while retaining their background and spacing. */
@media (forced-colors: none) {
  #app :is(.panel, .empty, .hero, .request-card, .tutor-card, .review-card,
    .rating-summary, .calendar-panel, .inline-note, .placeholder-card, .chat-layout,
    .bubble, .profile-hero, .profile-view-section, .profile-intro, .profile-picture-block,
    .profile-block, .profile-save, .profile-editor, .profile-documents, .profile-overview-grid,
    .student-discover, .student-referral, .student-applications, .tutor-upcoming,
    .balance-page > section, .balance-stats > div, .profile-info-grid > article,
    .referral-bubbles p, .wizard-panel .summary > div, .student-subject-search,
    .list-entry, .menu-grid .button, .select-dialog, .chat-pane, .messages),
  #app #home-referral, #app #calendar-day :is(article, p:only-child),
  .auth-card, .auth-showcase-inner {
    border-color: transparent !important;
    box-shadow: none;
  }
}
@media (forced-colors: active) {
  #app #content button.back::before {background: ButtonText; forced-color-adjust: none}
}

/* A larger, quieter phone sign-in screen. */
.auth-card .auth-brand {display: none}
.auth-card {max-width: 580px}
.auth-methods {gap: 18px}
.phone-auth {gap: 14px}
.phone-auth label {
  color: var(--ink);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}
.auth-card .phone-auth input {
  box-sizing: border-box;
  min-height: 68px;
  padding-inline: 20px;
  border: 0;
  background: #fff;
  color: var(--ink);
  font-size: 1.25rem;
  box-shadow: none;
}
.auth-card .phone-auth input:focus-visible {
  outline: 2px solid #285aba;
  outline-offset: 3px;
}
.auth-methods :is(.auth-continue, .auth-provider) {
  min-height: 68px;
  padding: 16px 20px;
  font-size: 1.125rem;
}
.auth-methods .auth-role-switch .icon {width: 24px; height: 24px}
.auth-methods .auth-divider {font-size: 1rem}
@media (max-width: 780px) {
  .auth-right {padding-inline: 24px}
}

.auth-methods .auth-provider.auth-role-tutor:not(:disabled):not([aria-disabled="true"]) {
  justify-content: flex-start;
  gap: 16px;
  min-height: 96px;
  padding: 20px;
  background: #fff;
  color: #191c24;
  text-align: left;
}
.auth-methods .auth-provider.auth-role-tutor:hover:not(:disabled):not([aria-disabled="true"]) {
  background: #f8f9fd;
  color: #191c24;
}
.auth-methods .auth-role-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #296fff;
  color: #fff;
}
.auth-methods .auth-role-icon .icon {width: 24px; height: 24px; color: inherit}
.auth-role-copy {display: grid; gap: 4px; line-height: 1.25}
.auth-role-copy strong {font-size: 1.2rem; font-weight: 700}
.auth-role-copy small {font-size: 1rem; font-weight: 500}

/* Keep the phone field just above centre without clipping short screens. */
.auth-right {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: 100dvh;
  padding-block: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-bottom));
}
.auth-card {margin-block: auto}


/* The sign-in form and role button share the screen without overlapping. */
.auth-right:has(#auth-methods:not(.hidden)) {align-items: stretch}
.auth-card:has(#auth-methods:not(.hidden)) {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
  margin-block: 0;
}
.auth-methods:not(.hidden) {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 18px;
}
.auth-methods:not(.hidden) .phone-auth {
  width: 100%;
  margin-block: auto;
}
.auth-methods:not(.hidden) .auth-role-switch {
  position: static;
  width: 100%;
  flex: none;
  margin: 0;
}

/* Phone confirmation: the call target is the main action. */
.phone-call-step:not(.hidden) {display: grid; gap: 18px}
.auth-card .phone-call-step h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.2rem, 1.7rem + 2vw, 3rem);
  line-height: 1.1;
}
.auth-card .phone-call-step .call-instruction {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem);
  font-weight: 650;
  line-height: 1.35;
}
.auth-card .phone-call-step .call-number {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-start;
  box-sizing: border-box;
  min-height: 82px;
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  margin: 0;
  padding: 18px 20px;
  border-radius: 16px;
  background: #fff;
  color: #191c24;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2rem);
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.call-number:focus-visible {outline: 2px solid CanvasText; outline-offset: 3px}
.auth-card .phone-call-step :is(.call-hint, .call-status) {
  margin: 0;
  color: #4c5668;
  font-size: 1.1rem;
  line-height: 1.45;
}
.auth-card .phone-call-step .call-change {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 80px;
  margin-top: 8px;
  padding: 16px 20px;
  background: #fff;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 700;
  text-align: left;
}
.phone-call-step .auth-role-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #296fff;
  color: #fff;
}
.phone-call-step .auth-role-icon .icon {width: 24px; height: 24px; color: inherit}

.auth-right:has(.phone-call-step:not(.hidden)) {align-items: stretch}
.auth-card:has(.phone-call-step:not(.hidden)) {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
  margin-block: 0;
}
.phone-call-step:not(.hidden) {display: flex; flex: 1; flex-direction: column; gap: 18px}
.phone-call-step .call-main {display: grid; gap: 18px; margin-block: auto}
.auth-card .phone-call-step .call-change {flex: none; margin-top: 0}

/* Two readable referral steps, side by side when space allows. */
#content #home-referral .referral-bubbles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 54rem;
  margin: 0 0 24px;
}
#content #home-referral .referral-bubbles p {
  display: block;
  min-width: 0;
  min-height: 136px;
  margin: 0;
  padding: clamp(18px, 3vw, 28px);
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
  color: #191c24;
  font-size: clamp(1.2rem, 1rem + .9vw, 1.6rem);
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
#content #home-referral .referral-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 0 22px;
  color: #3f4655;
  font-size: 1rem;
  line-height: 1.5;
}
@media (max-width: 400px) {
  #content #home-referral .referral-bubbles {gap: 8px}
  #content #home-referral .referral-bubbles p {padding: 16px; font-size: 1.1rem}
}

#content #home-referral .referral-stats span {
  display: inline-flex; align-items: center; gap: .4rem;
  background: #235ede; color: #fff; border-radius: 14px;
  padding: 12px 16px; line-height: 1.35;
}
#home-referral .actions {margin-top: 14px}
.select-dialog-options {display: flex; flex-direction: column; gap: 8px}
.select-dialog-options .select-dialog-option {flex: none}

.name-onboarding:not(.hidden) {display: grid; gap: 16px}
.name-onboarding h1 {margin: 0 0 12px; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1.15; letter-spacing: -.035em}
.name-onboarding label {font-size: 1.1rem; font-weight: 650}
.auth-card .name-onboarding input {box-sizing: border-box; width: 100%; min-height: 68px; padding: 18px 20px; border: 0; background: white; font-size: 1.2rem}
.auth-card .name-onboarding input:focus-visible {outline: 2px solid #285aba; outline-offset: 3px}
.name-onboarding .button {min-height: 68px; font-size: 1.125rem}
.name-onboarding .form-error:empty {display: none}

.student-discover h1 .student-greeting, .student-discover h1 .student-question {display: block}
.student-discover h1 .student-greeting {margin-block-end: clamp(120px, 20vw, 210px)}
